Control systems, pid, and high-order transfer functions

Hello,

Thanks a lot for all the support!

I was able to implement all the loops. The position loop has order 12 (outer most loop), and everything is working nice and quick.

I created my feedback loops from the doc of pid_2dof. Since it allows only a first order low pass filter, I created my own Cr and Cy

s=tf("s")
IMU_DGYRO_CUTOFF=30
wd=IMU_DGYRO_CUTOFF*2*pi	# Hz to rad/s
faa=wd^2/(s+wd)^2
k=1; kp=k*0.2; ki=k*0.2; kd=k*0.003; kf=k*0.0;

P_drone=ss(tf([7901.2],[1, 44.44, 493.827, 0]))
Cr=ss(kp+ki/s+kf)
Cy=ss(minreal(kp+ki/s+kd*s*faa))
Gin=minreal(feedback(P_drone, Cy)*Cr)

101 question: I have to express my filters into rad/s to obtain the correct step response, right?

In that case I think forming Gin/s and then calling feedback is the best approach.

Yes, I used this approach.

And thanks for the link to the performance considerations, it lists subtleties that are well explained and shown through examples.

1 Like