Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

DC motor speed control with PID. 1

Status
Not open for further replies.

dandrea

Industrial
Jan 7, 2003
1
Dear gentlemen,
I am working on a little robot which is designed with Maxon DC motors, controlled by a PIC16F876 microcontroller for each joint. There is already implemented a PID position controller, but I would like to implement a speed controller in order to have an acceleration and deceleration for smooth movements. There is somebody who know how it's possible to integrate a speed controller with a position controller?

Best Regards,

Dandrea G.
 
Replies continue below

Recommended for you

The loops should be nested so that the speed loop is the inner loop with the position loop wrapping around the speed loop. The loop time on a single phase dc motor should be around 16 ms or 16.67 to be precise. You may run it as slow as 100ms; but performance may degrade. The speed loop closes with speed error and pos error. In other words, the speed loop recieves an speed reference that is a result of both speed settings and position error. The speed loop then satifies by taking speed_ref input and minimizing speed error. This enables you to take position error and trapezoid velocity based on position. I hope this helps some. Remember if you are going to decel based on position, then position probably needs control of speed reference.
 
I have realized the Microchip Remote Positionner Application
Note and calculated the formulo in order to go more
smoothly when the motor is reaching its position and faster
when it is far from its position.
I have implemented it and it worked.
have a look at the page for the description of the hardware/ software and Microchip AN references.
A+
With regards,
MB.
 
Use a PI regulator instead of PID, it will improve your speed control stability, the D part of the controller is not very suitable for speed control application. If you looking for a very accurate and tight speed control your current controller response time has to be 6-8 times faster than a speed control response time. The same rule is applied between the speed and position control.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor