|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools |
Rating:
|
Display Modes |
|
#14
|
|||
|
|||
|
Re: Jaguar Speed Control Only Reaches 50% of Setpoint
I'm getting lazy, so I'm going to switch to the laplace domain in this following explanation. If you or anyone has trouble following, I'll clarify by request. After a while working with differential equations, I get tired of typing d/dt... (Without going into the details, you can pretty much replace s with d/dt, and 1/s with an integral)
Quote:
Code:
num_motors = 4 m = 150 / 2.20462262 r = 0.0508 R = 12.0 / 133.0 / num_motors / 0.85 + 0.024 + .003 Kt = 0.0182326082 Km = (12.0 - R * 2.7) / (5310.0 / 60.0 * 2.0 * math.pi) G = 40.0 / 12.0 * 48.0 / 15.0 * 22.0 / 15.0 Code:
V = Km * G / r * s * x + R * r / (Kt * G) * s^2 * x The transfer function from ref to s * x (ie, if you ask for a velocity, what do you actually get) is then Code:
s * x / ref = Kp/(Km * G / r + Kp + R * r / (Kt * G) * s) Code:
Kp / (Km * G / r + Kp) Code:
x / ref = Kp/(s Km * G / r + Kp + R * r / (Kt * G) * s^2) Quote:
Quote:
I'm going to take the position that if someone is using just a P controller to try to get the robot to drive at a velocity, they are doing it wrong. They should first start with the I term, and leave the rest of them 0. Would you every try just using the D term in a PID loop when trying to go to position? You'd say that the person was doing it wrong if they did that. Lets show this. Let V = (ref - s * x) * 1/s * Ki, ie a simple I controller. This gives Code:
sx / ref = Ki / (Ki + Km * G / r * s + R * r / Kt * G * s^2) If you pattern match, this I controller for velocity control has the same form as the P controller when doing position control. This says that the I term in the Jaguar's velocity loop acts like the P term in the Jaguar's position loop. A similar analysis will show that the P term in the Jaguar's velocity loop acts like the D term in the Jaguar's position loop. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|