Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Current control of DC motor using PI controller

Status
Not open for further replies.

Umit45

Junior Member level 1
Junior Member level 1
Joined
Sep 14, 2014
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
165
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
 

Why do you want to control the current of a motor? To control its speed? Usually PWM is used as a speed control because it always has high torque.

If you limit the current to the motor then the motor will slow down. The motor will have very low torque so if the load increases a little then the motor will slow down more.
The mass of the motor is its load when it starts running due to inertia. Then the motor uses much higher current to start running and if you limit the current then the motor might not start running.

If you do not limit the current to a motor then it will use only as much current as it needs. It will start with lots of power. Its torque will be high so if the load increases a little then the motor speed does not drop much because it uses more current to have higher power. If the load reduces a little then the motor speed does not increase much because it uses less current to have less power.
 

You can't force the load to take more than the maximum it can take. That's a fundamental law of our universe; nothing can be more than its maximum, otherwise it's not its maximum. This is true in both electronics and semantics, despite the fact that athletes are always giving "110%".

If you've got a 100% duty cycle, and the load draws 15mA, how can you make it draw more than 100%?

You most certainly can make a controller for any range of loads you want. You just need to have the required resolution and precision in your control loop.
 

Audioguru and barry, thanks for your replies!

I understood the point that current taken by the motor is dependent on the load and it increases when we increase the load.
The problem was that I was not understanding if there was any PI control action when I increased my loads (causing current more than 15mA).
To overcome this I found the current (180mA) for the stalling condition (when the motor is not allowed to move), and adjusted the proportional gain (Kp) and Integral gain (Ki) to get 100% duty cycle.
Now if I set the reference current to be 50mA and stall it, the current stays around 50mA and does not shoot to 180mA.
I tried this for different references below 180mA and found the motor current to follow the reference.
I hope this means that I have PI control of the current of the motor.
Thanks again,
I appreciate your help!
 

I'm afraid I don't understand what you're trying to do here, and I don't think you do, either. Why do you want 100% duty cycle? And the PI gains determine the response of the system, not the dutycycle

As audioguru asked, why do you want to control motor current? Are you, rather, trying to LIMIT motor current? If you've got a variable load, and you try and maintain constant current, you're going to have a motor that speeds up and slows down. Is that really what you want?
 

A stalled motor is stopped and is simply a piece of resistance wire. If it is designed to run well with 12V and its stalled current is 180mA then its resistance is 12V/180mA= 66.7 ohms.
If you limit the current to 50mA then you are also limiting its stalled voltage to 50mA x 66.7 ohms= 3.33V then it might not begin running unless it has no friction and no load.
 

When you use an H bridge with PWM to open circuit, the FET driver ESR impedance increases as duty cycle,d, decreases, thus average ESR.avg=ESR/d.

If you had a linear supply the ESR would be constant. The dampening factor , in controlling a linear motor like in a Bass speaker, depends on the load/source impedance ratio being >> 10:1 with 100:1 giving stiffer control of speed changes.

Unfortunately monitoring current only measures the force applied to inertial load and friction but not speed. If you want speed control then you must sense motor speed.

- one way is sensing commutation frequency of load current of motor while filtering out PWM which is much higher Frequency.
- the better way is to use a tach or hall sensor on shaft.

Without speed feedback you can only control the acceleration not precise speed unless load profile is constant & repeatable. Speed , drag friction and inertia all affect avg. current.

To optimize control of acceleration and speed you need to compute the energy dissipation or V*It to prevent damage to either motor or driver in more sophisticated way from unforeseen conditions.

This would allow stall current but only for a limited time in an analog sliding scale.

The loop gain for Ki has another integral because V is the integral of Acceleration,,which you are controlling with current.
 

There are some technical applications of motor current control, it can be used to set (approximately) constant torque. And it's often used as underlying current limiting controller. But no idea what the OP wants to achieve with current control.
 

Current control of a motor is to control torque, usually as inner loop of cascaded servo control loops, where the outer loops should be speed and then position.

If the control referenced to let say 20mA and the no load current of the motor is only 15mA then the controller will be saturated at no load, just continue and keep the that saturated state. Anytime there is enough load on the motor the controller can go out from it's saturation state and achieve the referenced point.
 

I think CncHobby's reply clears my query. My final aim is to speed and position control but I was suggested to start with current.
Initially at no load, the max current was 15mA and I was able to control the current below this value by reducing the duty cycle. But if I increased the reference beyond 15mA at no load, the current would never rise and reach the reference value, so I was a bit concerned if the PI controller was working properly.
After reading all the replies I realized that max current drawn by the motor is load dependent and that I cannot force the motor to take more current.
My stalling current is 180mA, if now I set a reference of 50mA and stall the motor the current stays around the reference and does not increase to 180mA, so I hope my control action is working properly.
"Why do you want 100% duty cycle? And the PI gains determine the response of the system, not the dutycycle"
I want 100% duty cycle for max error so that the systems responds quickly to any change in reference. I was using the equation
duty = Kp*error + Ki*(integral error)
As the error increases the Kp and Ki values must be such the system responds quickly to the change in reference. Is there anything wrong with this assumption?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top