Simulink Control Design™ - MathWorks

(Tuis.) #1

zeta1.Minimum = 0; zeta1.Maximum = 1; % 0 <= zeta1 <= 1
zeta2.Minimum = 0; zeta2.Maximum = 1; % 0 <= zeta2 <= 1
N = tf([1 2zeta1wn wn^2],[1 2zeta2wn wn^2]); % tunable notch filter


Then associate this parametric notch model with the "Notch" block in the Simulink model.
Because the control system is tuned in the continuous time, you can use a continuous-
time parameterization of the notch filter even though the "Notch" block itself is discrete.


setBlockParam(ST0,'Notch',N);


Next use looptune to jointly tune the "Gain", "Leadlag", and "Notch" blocks with a 50
rad/s target crossover frequency. To eliminate residual oscillations from the plant
resonance, specify a target loop shape with a -40 dB/decade roll-off past 50 rad/s.


% Specify target loop shape with a few frequency points
Freqs = [5 50 500];
Gains = [10 1 0.01];
TLS = TuningGoal.LoopShape('Notch',frd(Gains,Freqs));


Measurement = 'Measured Position'; % controller input
Control = 'Notch'; % controller output
ST2 = looptune(ST0,Control,Measurement,TLS);


Final: Peak gain = 1.05, Iterations = 54


The final gain is close to 1, indicating that all requirements are met. Compare the closed-
loop step response with the previous designs.


T2 = getIOTransfer(ST2,'Reference','Measured Position');
clf
step(T0,T1,T2,1.5), grid
legend('Original','Lead/lag','Lead/lag + notch')


Tuning of a Digital Motion Control System
Free download pdf