The Shop > Electronics & IC Programing
PIV Servo Control
(1/1)
sparky961:
No, I really didn't mean "PID", I meant "PIV" - proportional, integral, velocity. This seems like the algorithm that has the most promise in the motion controller project I'm working on. However, I don't understand how to go from the diagrams I've found into code. Maybe it's a long shot, but I know there are a lot of smart people that lurk here.
I have already implemented PID controlled position, and separately PID controlled velocity. But getting them to work together is more of a challenge then I imagined. Right now, I can either command the motor to a specific position (at maximum velocity) or have the motor turn continuously at a controlled velocity. What I want is to move to the specified position, AT the specified velocity.
Diagrams attached in hopes that someone can give me a simplified pseudo-code example, or point me to some good information about this on the web. There's lots of PID info, but much less PIV.
Thanks. I'll keep plugging away at it in the meantime.
-Sparky
MrSleepy:
This page may be of use
http://support.motioneng.com/downloads-notes/tuning/servo_algos.htm
It shows how they have the PIV velocity loop running inside the PID Positional loop.
Microchip have some examples of servo control using PID and linear velocity
http://ww1.microchip.com/downloads/en/AppNotes/00532c.pdf
http://ww1.microchip.com/downloads/en/AppNotes/00532.zip
I also have some Hitex Infineon c166 code for servos ,which IIRC is a fully coded example ...
HTH Rob
Navigation
[0] Message Index
Go to full version