×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

DC motor speed control with PID.

DC motor speed control with PID.

DC motor speed control with PID.

(OP)
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.

RE: DC motor speed control with PID.

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.

RE: DC motor speed control with PID.

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 http://matthieu.benoit.free.fr/moteur2.htm
for the description of the hardware/ software and Microchip AN references.
A+
With regards,
MB.

RE: DC motor speed control with PID.

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources