|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Precise Motor Control
Hello,
This year my team is spinning a CIM motor to move a throwing arm and I will have to keep the CIM going at a specific speed. I was wondering how the control values -1 <-> 1 (fed to a Jaguar) compare to the CIM's RPM? Is there a more efficient to go about controlling the motor? Thank you! |
|
#2
|
|||
|
|||
|
Re: Precise Motor Control
You could figure out how a power value compares to an RPM through trial and error, but I would not recommend it at all.
Instead, if you have an encoder or a potentiometer around, you can use a PID control loop. There are numerous paper on CD of the code and use. The loop will use the present and past velocities of the arm (this is why you need a sensor) in comparison to the target velocity in order to compute an updated motor value. The motor value will get updated many times a second, helping your arm reach target velocity quite quickly ("quickly" depends on what motors, gearing, and mechanical arm you have). Good control loops represent programming on a higher level and can simplify quite a bit of work for your drivers, so they can focus on driving. If you have any more questions, feel free to PM me. Last edited by Aaron.Graeve : 09-01-2014 at 22:37. Reason: Grammar |
|
#3
|
||||
|
||||
|
Re: Precise Motor Control
The most efficient way of controlling a motor's RPM precisely is to have some sort of sensor control it (such as an encoder) and using a control system monitor the power sent to the Jaguar. The most common types used for robotics are PID and Bang-Bang, which have been documented well around chiefdelphi.
|
|
#4
|
||||
|
||||
|
Re: Precise Motor Control
Quote:
http://www.chiefdelphi.com/forums/sh...d.php?t=105965 |
|
#5
|
||||
|
||||
|
Re: Precise Motor Control
Would TBH be more viable than PID for an application with a continuously changing setpoint (such as regulating drive wheel speed)?
|
|
#6
|
||||
|
||||
|
Re: Precise Motor Control
Quote:
I suspect TBH would not work as well as PID for the application you described. You might not be able to set the TBH gain high enough to get the response you want without causing instability. Any teams out there who have used TBH successfully for drivetrain wheel speed control? Last edited by Ether : 10-01-2014 at 13:45. |
|
#7
|
|||
|
|||
|
Re: Precise Motor Control
Think of the values as a percentage of the voltage of the battery, being sent to the motor. How you get around that depends on what language you use to code.
|
|
#8
|
|||
|
|||
|
Re: Precise Motor Control
The only issue with that is, depending on the specific speed controller, the value to power graph is not linear, is different for each type of speed controller, and can be different between two controllers of the same model.
|
|
#9
|
|||
|
|||
|
Re: Precise Motor Control
Thanks! I'll look into using an encoder!
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|