Motor PWM frequency

Firmware/software/electronics/mechanics
Post Reply
theseankelly
Expert
Posts: 153
Joined: Mon Dec 28, 2015 3:23 pm
Contact:

Motor PWM frequency

Post by theseankelly »

Hey Bitcraze -- I'm curious how the 328khz frequency was chosen for the motor driver. I'm researching this topic and not finding a ton of information, but what I'm finding suggests that motor efficiency drops off (and thrust is lost) if PWM frequency is too high, where most sources say "too high" is in the range of 30-40khz.

Have you conducted any thrust/efficiency tests of the motors at varying PWM frequencies? Could you explain a bit more about the comment in motors.h that reads "CF2 PWM ripple is filtered better at 382khz" (aka, what's a PWM ripple?)?

Thanks
Sean
http://www.thejumperwire.com
Tips, tutorials, and science about DIY electronics, drones, and embedded software.
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Motor PWM frequency

Post by tobias »

I'm mostly involved in this area and I can't say I have all the answers either and haven't really done a thorough investigation. This page explains some of it pretty well and if you use the formula accepting 10% current ripple you will get a PWM frequency of around 280Khz (L=17uH R=1ohm). That is mainly if you want to do current control though but the ripple also generate noise which effect sensors and radio. So keeping the ripple small is good, however as you mention, it will increase switching losses in the MOSFETs. That is so small I haven't been able to measure it doing flight duration tests and therefore having a high PWM frequency is better. The frequency to get low ripple needs to be that high because of the coreless motors which have very low inductance.
Post Reply