- Notifications
You must be signed in to change notification settings - Fork441
Description
stability_margins doesn't find gain=1 crossover frequency correctly for DT systems, but it seems to mostly do so for CT systems. I think the probelm may be in howmargins.poly_z_mag1_crossing
is finding roots, but there were a few steps in that function I couldn't follow, e.g. why H(z)*H(1/z)=1 implies |H(z)| = 1.
Example:
importcontrolasctomegan=2*np.pizeta=0.2plant=1.1*ct.tf(omegan**2, [1,2*zeta*omegan,omegan**2])Ts=.05plantdisc=ct.c2d(plant,Ts,'zoh')#_ = ct.bode_plot(plant, margins=True) # gives correct gain=1 crossover freq_=ct.bode_plot(plantdisc,margins=True)# no gain=1/no phase margin given
As an example of what it should look like, here is Matlab:
omegan=2*pi;zeta=0.2;plant=1.1*tf(omegan^2, [1,2*zeta*omegan,omegan^2])Ts=.05;plantdisc= c2d(plant,Ts,'zoh')margin(plantdisc)
Metadata
Metadata
Assignees
Labels
No labels