How to use sysid’s “position” feature

Hello! My team was looking to use sysids position feature for our turret and hood this year in an attempt to “get” the values from the tool in a much shorter time than it would take to tune a traditional pid. We were unsure of how to implement it once we had the values from sysid and don’t understand what the behavior would be in a “position subsystem” could someone explain how this should be implemented and what the constants given by sysid mean in the context of a non velocity controlled subsystem?

The feedforward is still u = K_s sgn(v) + K_v v + K_a a for a system with position and velocity states. Velocity and acceleration should come from a trapezoid profile (Combining Motion Profiling and PID Control with ProfiledPIDController — FIRST Robotics Competition documentation).

1 Like

Perfect, thanks you! How does sysids calculations differ when you select velocity vs position control?

The feedback gains change, but that’s it. K_p is proportional control on position and K_d is proportional control on velocity (the velocity setpoint is implicitly determined by how fast you change the position setpoint).

Kd is proportional on velocity? Interesting. Why do the feedback gains change? I guess I should do some digging into how those things are determined!

You still have a P controller on velocity. You just have an additional P controller on position.

The magnitude of the gains relative to each other changes based on the error tolerance you provided for each state and the control effort tolerance.

Is there a reason proportional for velocity is denoted as kd as it’s not a derivative controller? And I was referring more towards why do the gains change when you switch between a velocity and position scheme within sysid?

Because the standard PD controller’s K_d is multiplied by the derivative of the position error. I personally disagree with that formulation. The “P controllers everywhere” approach generalizes much better to other systems you’ll see in modern linear control theory.

Like I said above, the magnitude of the gains relative to each other changes based on the error tolerance you provided for each state and the control effort tolerance.

The optimal velocity P gain for a velocity system will be different than the velocity P gain for a position and velocity system (optimal in the sense that the gains minimize the sum of squares of the position error, velocity error, and control effort).

2 Likes

Oh! Duh! This just clicked, thank you!

This also just clicked for me. Thank you so much for explaining and reiterating!