×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

PWM Frequency for DC Motor Control

PWM Frequency for DC Motor Control

PWM Frequency for DC Motor Control

(OP)
I am programming a microcontroller to function as my PID control for a DC motor. The current is delivered via jfet stimulated by the microcontroller using PWM. I understand enough about PWM and dc motor control to make me a little dangerous. I know I need to set the period and duty cycle, but what I do not know and what I have not been able to find how to set them. That is, from what I can gather, the period is usually in the neighborhood of 0.5mS (2KHz). Ok, so outside of setting the motor up and running with that and a 50% duty cycle, is there some way to know if it will work ok, or is it a trial/error process?

I would thik that there shuld be some sort of guide for this. Does anyone have any advice/suggestions?

RE: PWM Frequency for DC Motor Control

You have to have a PWM frequency.  Your 2kHz.  Then you need to be able to to set what percentage of a single cycle is actually ON verses the remaining OFF time of that cycle.

This is the resolution of your output control.

Until you can do this and get a varying output speed of your motor you can't even consider PID.

Keith Cress
Flamin Systems, Inc.- http://www.flaminsystems.com

RE: PWM Frequency for DC Motor Control

(OP)
Yes, I know that. I have the PID designed in firmware. I also am already generating the PWM signal currently at 1.984kHz with 50% duty cycle. My question is more of a general nature.

Is there no guideline by which I set the frequency and duty cycle or is it just trial and error?

In other words, is there no way of knowing BEFOREHAND what frequency and duty cycle I should use to drive a particular size motor?

RE: PWM Frequency for DC Motor Control

I don't really understand your question.
The PWM percentage translates to the average voltage you are presenting to your DC motor.
If it's a 12 V motor and you have 12 V supply, you should be able to apply 0%...100% duty cycle for full range speed regulation.
If it's a 12 V motor and you have 24 V supply, your DC would vary between 0%...50% for full control.
And so on.
2 kHz is not a bad choice, at higher frequencies with cheap "can" DC motors you get significant iron losses from my experience.

Benta.

RE: PWM Frequency for DC Motor Control

(OP)
Ok, I'll see if I can restate my question in the terms in which I am really thinking about it.

I have a 0.25HP DC bushed motor.
I want to drive this motor using a microcontroller.
The FLA of the motor will be about 4A @ 90V.
This is WAY too high to drive from the output of the microcontroller, so I want to use a JFET to drive it, but I also want to minimize energy consumption while maximizing efficiency.
I opt for PWM of the DC power.

Now, how do I choose the frequency for the PWM signal? Is this an arbitrary choice? Is there a formula based on motor size or dc voltage level?

Does this help you understand what I am really asking about?

RE: PWM Frequency for DC Motor Control

I think you don't really understand how a DC motor works.
The r.p.m. of the motor is proportional to the voltage applied, in your case proportional to your duty cycle.
The current drawn by the motor is proportional to the torque needed by your load.
I don't see how you can talk about efficiency or reduction of energy consumption here, that's given by your mechanical requirements.

Benta.

RE: PWM Frequency for DC Motor Control

You're trying to minimize frequency dependant losses in the JFET and the motor, is that right?

RE: PWM Frequency for DC Motor Control

A 4A 90V JFET is going to take some finding. A similarly specc'd MOSFET will be fairly straightforward to obtain.
 

----------------------------------
  
If we learn from our mistakes I'm getting a great education!

RE: PWM Frequency for DC Motor Control

(OP)
JEEBUS Yoos Guys.

I really had no idea this was so difficult a question.

I'll try this again and leav off the crap that does not really have ANYthing to do with the question I am asking.

I want to drive a dc motor with PMW. Is there a way to know what frequency I should use for the PWM signal with no trial and error?

In other words, is there a way to calculate the frequency that will work best given any a particular motor?

Again, what frequency should I use and why?

Lastly, I want to know how to determine the FREQUENCY of the PWM signal I should use for my motor.

RE: PWM Frequency for DC Motor Control

I'm agree with "benta" about your understanding of DC motor control.
Pls try to reply yourself on following questions:
1. Do you want control of DC motor speed with/without speed sensor?
2. How do you to limit max motor current for acceleration/deceleration? How do current sensing?
3. What kind of PWM you plan to emplement - unipolar or bipolar?

Pay attention optimal PWM frequency is around 20 kHz - not 2kHz as posted above!

RE: PWM Frequency for DC Motor Control

The question is not that complicated. The frequency must be high enough that the motor current can be controlled with adequate responsiveness for your application. The other considerations include the fact that some devices dissipate much more heat during the transition from on to off than when they are on or off. For this reason a lower frequency is selected. Many PMW supplies use greater than 20kHz so that the switching frequency is not audible.

RE: PWM Frequency for DC Motor Control

Quote:

...the crap that does not really have ANYthing to do with the question I am asking.

You posted it. What do you expect us to do with it except try to answer your poorly structured question? hairpull3

Normally a DC motor works best on pure DC. Any AC component usually requires are derating of the motor, so the closer you can get to pure DC the better. Work out what gives the best result in your circuit. You've seen the circuit, we haven't so don't expect us to be able to comment on it. banghead

I've never seen a rule-of-thumb that relates switching frequency to motor size or motor speed, motor construction, or anything else in any meaningful manner which could be loosely fitted to an equation. A higher PWM frequency will allow you to use a faster control loop if this is a servo application. A lower PWM frequency will reduce your switching losses, which are usually the dominant losses in a PWM design. It is a trade-off of one thing against another to optimise the design of your overall system for whatever application you're using it for. But that's a secret, isn't it? poke
 

----------------------------------
  
If we learn from our mistakes I'm getting a great education!

RE: PWM Frequency for DC Motor Control

(OP)
Thank you. What I wanted to know was about the frequency -- nothing else.

You answered that. Faster is better, but it's a crap shoot.

Thanks.

Wow.

I feel like I've been running a marathon.

RE: PWM Frequency for DC Motor Control

Faster is not always better.

"Fast enough" and you won't hear that typical electric wheel chair, whining noise.

Too fast and your switching element,(a MOSFET), will melt.

There is NO optimal size verse PWM frequency rule.

Keith Cress
Flamin Systems, Inc.- http://www.flaminsystems.com

RE: PWM Frequency for DC Motor Control

Faster PWM has advantages and disadvantages, as does slower PWM. At some point 'faster' becomes too fast and the switch melts. At some point 'slower' becomes too slow and the circuit doesn't average the PWM properly.

Read my post again - slower will almost certainly be cooler in operation and so implicitly slower will likely be be more efficient because the losses are lower. Faster offers possibilities for tighter control if the rest of the system is designed to take advantage of this.
 

----------------------------------
  
If we learn from our mistakes I'm getting a great education!

RE: PWM Frequency for DC Motor Control

There is one thing that you have all avoided to mention. That is that there actually is a "best frequency" and that is related to the L/R time constant in the circuit.

The more L and the less R, the longer the time constant. There is also the question if this is a four quadrant, two quadrant or single quadrant application.

A single quadrant (one rotation direction and one torque direction) can, and should, use a free-wheeling diode.

Other applications can or can ot have them, depending on where you put them and if the it is speed or torque that changes direction.

Now, back to frequency. If this is an application with only one torque direction, you can use a rather high switching frequency since you do not have a lot of switching losses, thanks to the free-wheeling diode. And iron losses also stay rather low.

In an application where you need an H bridge, which seems unlikely in this case, you may need to think about cross-conduction and make sure your high and low transistors do not conduct overlapping. That reduces possible frequency to levels somewhere between 10 and 50 kHz, depending on transistor types and power levels. But, at those switching speeds, you need a fast micro to get the resolution you need.

That said, I would use your 2 kHz, which seems to be a good choice for a simple micro. That will give you enough resolution. But noise will probably be very irritating.

So, where does L/R time constant come into this? Simple, you probably want the torque ripple to be below a certain level. By making the switching period small compared to L/R, you can reduce torque ripple arbitrarily.

If there is a simple formula where you can plug in your parameters? Surely. One can set up all relationsships in the circuit and motor as a set of equations and solve for whatever is needed. But a little testing and some gut feeling works very well here.

Gunnar Englund
www.gke.org
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...

RE: PWM Frequency for DC Motor Control

adding to what Skogsgurra said about the electric time constant of the motor, L/R:

In my application where I was trying to control the current (to control the torque) of the dc motor, having a smooth current waveform was essential for servo control.  

For instance, if your PWM frequency is lower than your motor electrical frequency (R/L), you won't get an average current that you are "expecting" for servo control: the inductance isn't big enough to filter out the PWM effects.

For my application, I found that:

Frequency PWM =  10 times R/L

The motor I used was R/L ~ 100 Hz; I endup up using a 5,000 Hz PWM.   My application was for research/proof of concept, so I wasn't even considering the losses: just wanted to get my current control to work well ;)

Now, this was for my application.  If you're not trying to control the motor current, having a smooth current waveform might not be as important, and the PWM losses might be more significant to consider.  Like everything in engineering, it's a design trade-off.



   

RE: PWM Frequency for DC Motor Control

As a practical matter, 15 to 20 kHz is the usual switching frequency for motor drives.  This is so that audable noise is not a problem.  The ripple current will also be low for common values of motor inductances (current ripple increases the motor heating).  Most motor drives use IGBTs as the switching element and they are usually designed for 20 kHz switching.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources