Current control of DC motor using PI controller
Current control of DC motor using PI controller
(OP)
Hi everybody!
I am trying to implement current control of a DC motor using a PI controller and was having a few questions.
I am supplying 19V as input voltage (and capable of supplying current upto 2A) to the H- bridge and the controlling is done via a microcontroller using PWM.
When I connect 19V (100 % duty )directly to the motor (with a small mechanical load) I measured the current through the DC motor to be 15mA. Does this mean that I can control the current only upto 15mA.
If for this same load and supply voltage, I now give a reference current of 25mA will the controller be able to take power current from the source and give it to the motor. If so, how? (as it was giving 15mA for 100% duty at 19V.)
If not, does it mean that there can be no PI control above 15mA for this case?
Is it possible to make a PI controller for any range of loads connected to the motor ?
Thanks!
I am trying to implement current control of a DC motor using a PI controller and was having a few questions.
I am supplying 19V as input voltage (and capable of supplying current upto 2A) to the H- bridge and the controlling is done via a microcontroller using PWM.
When I connect 19V (100 % duty )directly to the motor (with a small mechanical load) I measured the current through the DC motor to be 15mA. Does this mean that I can control the current only upto 15mA.
If for this same load and supply voltage, I now give a reference current of 25mA will the controller be able to take power current from the source and give it to the motor. If so, how? (as it was giving 15mA for 100% duty at 19V.)
If not, does it mean that there can be no PI control above 15mA for this case?
Is it possible to make a PI controller for any range of loads connected to the motor ?
Thanks!





RE: Current control of DC motor using PI controller
Try braking the shaft with something and you will get the current you have set.
Best way (if the motor can take it) is to clamp the shaft so motor stands still. Then adjust your current controller for optimum performance (fast and stable step response) then let the shaft run and adjust the speed loop, if you have one.
Gunnar Englund
www.gke.org
--------------------------------------
Half full - Half empty? I don't mind. It's what in it that counts.
RE: Current control of DC motor using PI controller
The answer is simple: MAYBE
V=IR+N*Kb <- google how dc motor works.....
-V=volts
-I=current
-R=resistance
-N=speed
-Kb=volts/speed
If you lock the motor shaft so it cannot turn, then you will have V=IR and you will see what the max current will be into that motor at 19v; if you have little load, most of the 19v will instead go into the N*Kb term instead and the current will be very low due to IR.
Googling, you will see I=T/Kt where I=current, T=torque output, and Kt=torque/amp.
www.KilroyWasHere<dot>com
RE: Current control of DC motor using PI controller
I did as you suggested and found the current in stand still condition to be around 180mA. I also adjusted the proportional and integral gain such that I have 100% duty cycle at this condition.
Now, when I give a reference less than 180mA and stop it, the dc motor current tracks it. For example, if I give a reference of 50mA and stop it, the motor current, stays around 50mA and does not shoot to 180mA. I tried this for different reference values and observed the same response.
I hope this is PI control of a DC motor current!
RE: Current control of DC motor using PI controller
It sure is.
Gunnar Englund
www.gke.org
--------------------------------------
Half full - Half empty? I don't mind. It's what in it that counts.
RE: Current control of DC motor using PI controller
I deeply appreciate it!
RE: Current control of DC motor using PI controller
RE: Current control of DC motor using PI controller
This signal goes to the top switch. I invert the first PWM and give it to the lower switch.
The current sensor is in series with the motor and gives actual current value to the micro-controller.
I hope you wanted this info!