Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
The PWM frequency should be selected so that it does not create too much current ripple in the motor windings. Current ripple results in heating of the motor. If you know the terminal inductance L and the terminal resistance R of the motor, you can calculate the electrical time constant of the motor (t = L/R). With the time constant, t, calculated you should make the PWM frequency (much) higher than 1/t [Hz]. Good servomotors can have time constants as low as 50 to 150 microseconds, requiring PWM frequencies up to 40 kHz to 60 kHz.
For controlling the motor speed (or position) efficiently, you must have a good closed-loop control of the motor speed and torque (current). Good commercial controllers have the speed (or position) control circuits clocked at 1 kHz. For a dynamic reaction of the motor, the torque required for the correction of speed (or position) must be reached as quickly as possible. Therefore the current controller is clocked approximately ten times faster (10 kHz).
The accuracy of the entire system depends on the accuracy of the sensors and the quality of the control algorithm.
But for most hobbyist purposes open loop is fine as long as they are monitoring rail voltage and current. taking those to numbers into account is fine unless you need absolute control instead of relative
Actually it is still open with respect to speed.If you measure the input voltage and current, and use that information in your control algorithm, you have a closed loop system.
To original poster XIST: Could you explain in more detail what do you mean by: "I want to Control my motor very accurately"? I assumed that you want to control the speed of the motor accurately, but is the application a constant speed regulation or a more dynamic servo control where the motor must follow a varying speed reference very accurately?
If the application is a constant speed regulation and does not require fast responses to load disturbances, then open loop (direct PWM control without feedback) speed control works fine (because of the inherent integrator in the dc-motor transfer function). For a dynamic servo control you need a closed loop system with good feedback. Usually a PD controller is used with DC-motors (the PD controller practically becomes a PID controller because of the integrator in the motor).
Actually it is still open with respect to speed.
Motor speed is proportional to the ideal motor voltage which is the power rail voltage time the PWM duty cycle.
The actual motor voltage includes the voltage drop across the armature resistance, which responds directly to the motor load causing the motor to slow down under load by robbing the "ideal armature" of voltage. Adding an error term in to the command proportional to the motor current maintains speed as the motor is loaded down-to much and it oscillates since you are adding positive feedback.
There is good dynamic response since the motor current changes as quickly as the motor inductance allows it to and the supply voltage is compensated, both factors are normally absorbed into the "loop response" making the system finickier than it need be.
There is no control loop in the normal sense since speed is not measured. Speed feedback is needed at that point more for extreme dynamic response (overcoming motor inductance), interchangeability (being able to swap motors or controllers with out recalibration), and absolute accuracy (compensate for system tolerance impact on speed verses command)
You are right, if you use the measurements just to compensate for changes in the supply voltage, it is not a closed loop system. But you can use the input voltage measurement, motor current measurement and the output signal (the PWM duty cycle) to create a closed loop control. It gets a bit complicated and you will need a good model of your system, but with state estimation, it is possible.
actually the motor speed is a direct result of the armature voltage... the PWM is command times the rail voltage times a constant plus the current times a constant. but you still need to worry about tolerances and motor inductance.
sorry no ... simple math and fact only.Are you trying to describe a control law there? Or was there something in my posts that you disagree with? That was all very confusing to me.
misterT, KMoffett and Ubergeek63 thanks for the kind help!!
Actually i m making plane for that purpose i use simple dc motor with direct attached a 11x4.7 propeller on it...so i want to control the speed of the motor...i make a c code for the pwm...but the problem is motor speed is varying to little extent automatically...and the motor drays 15amps of current...also my mosfet burns out. i used IRFZ44N...what could be the solution for that...