Current control of DC motor using PI controller

In summary, the conversation is about implementing current control for a DC motor using a PI controller. The motor is supplied with 19V and has a maximum current of 2A. The controlling is done via a microcontroller using PWM. The current is measured to be 15mA when 19V is directly connected to the motor with a small mechanical load. The question arises if the controller can take power from the source and give it to the motor if a reference current of 25mA is given. It is suggested to find the max current by stalling the motor and adjusting the proportional and integral gains. The motor current is now following the reference as long as it is set less than the max current. The conversation also discusses voltage mode control
  • #1
awaiting
24
0
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 a lot for reading!
I appreciate your help
 
Engineering news on Phys.org
  • #2
The max current will be at max load ( stall) - If you can not find a datasheet for the motor - measure the DC resistance of it, and then use that to calculate the max current using good ol' Ohm Law. Then use this current to develop the rest of the solution - there are so many sources of info on using PI - I suggest fishing around a little before posing here - since you are more aware of the details of what you want to do. ( I like SParkfun.com for example - but there is also http://www.raspberrypi.org/ )

However as I looked for a little info I did find some bad examples - so if you have a specific case / example I am sure the group here can review and advise. It seems the max current you should expect / allow though a single GPIO - as an output is 16mA.

To you basic question - the PI is a controller - to run heaver loads ( almost ALL motors should be considered a heavy load relative to a controller )- you need a Driver Circuit. This takes the output of the PI ( as a very low load) - and provides a higher power output.
 
  • #3
Thanks for the reply, Windadct!

I found the max current as you suggested by stalling the motor and then adjusted the proportional and integral gains to get 100% duty cycle.
The motor current is now following the reference as long as it is set less than the max current.
 
  • #4
The motor current for a brush motor is proportional to the torque being transmitted to the load and losses.

However, using current mode control, controlling the motor current through the motor the motor's torque can be programmed and the speed will become load dependent until the motor enters what is termed speed limit.

Speed limit occurs when the motor is rotating fast enough to produce a back EMF (generated voltage) approaching the supply voltage.

Voltage mode control is accomplished by controlling the PWM for a fixed voltage source. Then, Vmot = 19V x PWM
Thus using the PWM as the control variable is a handy means of approaching the desired speed. Over a range of loads.

Now for the fun part, current mode control controls torque which then then interacts with the mass-moment of inertia, J, of the system as well as the load peculiarities. In the world of control systems, this means you have another pole ( integral ) in your control loop and the result is a more difficult system to stabilize.

Though voltage mode controlled motors still have to deal with inertia, the associated dynamics are at a higher frequency, making the control loop simpler to close.

- Mike
 
  • #5
and enthusiasm for implementing a PI controller for current control of a DC motor. It is a common and important control strategy for DC motors, and I am happy to provide some insights.

Firstly, it is important to understand that the maximum current that can be supplied to a DC motor is limited by the motor's internal resistance and the supply voltage. In your case, with a 19V supply and a measured current of 15mA, the motor's internal resistance is approximately 1.27 kΩ (19V/0.015A). This means that at 100% duty cycle, the maximum current that can be supplied to the motor is 15mA.

However, with a PI controller, you can adjust the duty cycle to achieve a desired current setpoint. So, if you set a reference current of 25mA, the controller will adjust the duty cycle to try and achieve that setpoint. This does not mean that the motor will actually receive 25mA, as it is still limited by its internal resistance and the supply voltage. But the controller will try to achieve the setpoint as closely as possible.

In order to achieve higher currents, you would need to increase the supply voltage or decrease the motor's internal resistance. Alternatively, you could use a different type of motor with a lower internal resistance.

As for the range of loads connected to the motor, a PI controller can be designed to work with a specific range of loads. However, the controller may need to be tuned for different loads in order to achieve optimal performance. This can be done by adjusting the controller's parameters, such as the proportional and integral gains.

I hope this helps to clarify some of your questions. Good luck with your project!
 

FAQ: Current control of DC motor using PI controller

1. What is a DC motor?

A DC motor is an electrical machine that converts electrical energy into mechanical energy. It operates on the principle of electromagnetism, where a current-carrying conductor placed in a magnetic field experiences a force that causes it to rotate.

2. What is a PI controller?

A PI controller, also known as a proportional-integral controller, is a type of feedback control system used to control the output of a system. It uses both proportional and integral actions to adjust the control output based on the error between the desired and actual values.

3. How does a PI controller control the current of a DC motor?

A PI controller continuously monitors the current of a DC motor and compares it to the desired current. If there is a difference, the controller adjusts the input to the motor in order to minimize the error and maintain the desired current level.

4. What are the benefits of using a PI controller for DC motor current control?

Using a PI controller for DC motor current control allows for precise and accurate control of the motor's current, leading to better performance and efficiency. It also helps to reduce the effects of external disturbances and variations in the motor's parameters.

5. Are there any limitations of using a PI controller for DC motor current control?

One limitation of using a PI controller for DC motor current control is that it may not be suitable for highly dynamic systems as it may not respond quickly enough to changes in the motor's current. Additionally, the controller may require tuning and adjustment to ensure optimal performance.

Similar threads

Back
Top