Motor PWM frequency

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

Motor PWM frequency

Post by theseankelly » Fri May 19, 2017 5:20 pm

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

tobias
Bitcraze
Posts: 1526
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Motor PWM frequency

Post by tobias » Mon May 22, 2017 8:39 am

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