|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#6
|
||||
|
||||
|
Re: Drivetrain PID tuning
Quote:
1.We do a quick system id on the yaw axis a. Apply a moderate amplitude yaw step (usually 1/2 max input on whatever yaw command input you have) b. Model the angular rate output with the equation rate = input*k*(1 - exp(-t/tau)) 2. design a controller using the following architecture; error = (yaw_cmd - yaw_rate) motor_cmd = PID(error, Kp, Ki, Kd) where: Kp = gain/K*tau Ki = gain/K Kd = 0 gain = 5 to 10 (arbitrary, desired bandwith in rad/sec); 3. Vary gain to get the command response you want. We start at 10, and if it's too sluggish bump it up, if it oscillates or limit cycles (bounces back and forth due to backlash) we back it off. Sorry for the terse explanation, but that's pretty much it. We do all our own code, so the PI controller is just written into the yaw service function. Sorry I don't have the code right now, but I can find it. Cheers, Steve. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|