In setting up the PID with the Talon SRX I was wondering if it is possible or if anyone has experience setting up both position and velocity control. Now I know to do this the best way, you would use state space + LQR but is it possible to leverage the built in PID controller to do the following.
Position PID -> Outputs Velocity Commands -> Velocity PID
I’m using C# with the Hero board and I notice that you can set the Talon either in position or velocity mode and I don’t see a good way of doing the above without changing the PID implementation.
If the integral of the desired V(t) equals the desired X(t), as it would with a motion profile, you could use a PID controller’s output on the RIO as the command to the PIDF in the SRX.
Hey Ether thanks for the response. I’m using a Hero board not a RIO. I’m not sure if integrating V(t) would allow me to get the fine position control I need if the noise isn’t zero mean gaussian on V(t).
If the Hero supports sending commands to and receiving data from the SRX via CAN bus, like the RIO does, then the same principle would apply.
I’m not sure if integrating V(t) would allow me to get the fine position control I need if the noise isn’t zero mean gaussian on V(t).
You’ve got that backwards. If you generate a motion profile it will give you V(t) and X(t)… and X(t) will be the time integral of V(t). You then use V(t) and X(t) as inputs to a PID on the Hero. The output of that PID is the command you send to the SRX built-in PID. Something like this.
You can’t simultaneously satisfy V(t) and X(t) if X(t) is not the time integral of V(t).