Motor whine when using COMP_PWM
I recently flashed 3-6-2014 with comp enabled. I'm using blue series ESCs with tiger 2216 1100kv motors. I noticed quite a bit more whine from the motors than before enabling comp. JUst as an experiement I tried flashing 5-15-2013 with comp enabled and it might be my imagination but the noise, while still there, seemed less loud. Is this possible? Is there any reason to be concerned about the noise? Motors seem to run cool as do the ESCs.
Tr3topflyer,
Could you explain how you enabled comp_pwm? I know it gets added to the .inc file but then how do you compile a new hex file from them. I'm trying to enable comp_pwm in the dlua40.hex file. Thanks.
Barry
Barry,
Follow the instructions in this post and I think you will find it very easy.
http://forums.openpilot.org/topic/19803-simonk-comp-pwm-on-f-30a-let-the-magic-smoke-out/?p=323613
From: Barry Mizes [mailto:[email protected]] Sent: Wednesday, April 16, 2014 10:30 AM To: sim-/tgy Cc: CHRIS YOUNG Subject: Re: [tgy] Motor whine when using COMP_PWM (#42)
Tr3topflyer,
Could you explain how you enabled comp_pwm? I know it gets added to the .inc file but then how do you compile a new hex file from them. I'm trying to enable comp_pwm in the dlua40.hex file. Thanks.
Barry
— Reply to this email directly or view it on GitHubhttps://github.com/sim-/tgy/issues/42#issuecomment-40605364.
Thanks. Just what I needed.
Barry On Apr 16, 2014 9:52 AM, "tr3topflyer" [email protected] wrote:
Barry,
Follow the instructions in this post and I think you will find it very easy.
http://forums.openpilot.org/topic/19803-simonk-comp-pwm-on-f-30a-let-the-magic-smoke-out/?p=323613
From: Barry Mizes [mailto:[email protected]] Sent: Wednesday, April 16, 2014 10:30 AM To: sim-/tgy Cc: CHRIS YOUNG Subject: Re: [tgy] Motor whine when using COMP_PWM (#42)
Tr3topflyer,
Could you explain how you enabled comp_pwm? I know it gets added to the .inc file but then how do you compile a new hex file from them. I'm trying to enable comp_pwm in the dlua40.hex file. Thanks.
Barry
— Reply to this email directly or view it on GitHub< https://github.com/sim-/tgy/issues/42#issuecomment-40605364>.
— Reply to this email directly or view it on GitHubhttps://github.com/sim-/tgy/issues/42#issuecomment-40608266 .
I have exactly the same problem after enabling COMP_PWM in RapidFlash. I flashed my ESC Afro 12A Opto with afro_nfet with RapidFlash. On the top of that I have additional problem of vibrations and jumps in speed at high throttle (https://github.com/sim-/tgy/issues/78). But definitely before enabling COMP_PWM and using TurboESC instead of OneShot125 motors sounded smoother.
I am subscribing to follow up this issue.
Hello! Increased motor whine is an artifact of trapezoidally-driving a motor that has sinusoidal back-EMF. If you spin the motor externally (like by a drill/driver) and look at the phase-to-phase back-EMF voltages generated on an oscilloscope, you would see traces similar to those I've captured here: http://0x.ca/sim/esc/motor_backemf/
In order to drive the motor more closely to that arrangement, more complicated software (at least) and PWM driving techniques are required, much like in power backup (UPS) or inverter products where you typically have to have "more stuff" to get "true sinusoidal" AC power. Since we're not doing that (yet) because doing so on an 8-bit micro is...tricky, almost all RC ESCs do trapezoidal driving. This means that the motor gets some torque ripple as a result of the PWM output voltage being higher and lower than the back-EMF throughout the commutation step.
Without complementary PWM, the areas where the voltage is lower just basically stop causing current flow, so a mostly unloaded motor has not too much torque ripple. However, with complementary PWM, current flows in reverse when the voltage is lower and actually produces negative torque, causing the motor to actually speed up and slow down during each step. This causes the whining that you can hear more easily than without complementary PWM.
This is one reason why I've been hesitant to ship with COMP_PWM enabled by default. It doesn't actually cause much of a problem in practice, and actually improves efficiency on most ESCs by reducing the time spent conducting through FET diodes (with diode forward voltage semiconductor losses) to almost nothing. I've been looking at the possibility of approximating sinusoidal drive to reduce this whine, but it's quite tricky on this hardware.
As for any other problems that may result, complementary PWM actually usually reduces sense noise and so typically improves timing sense feedback. However, if there is some other problem causing throttle cut, for example, no complementary PWM would just let the motor freewheel. I'll answer #78 separately.