clc
clear all
syms s;
format short
wn1 = 1; k1 = [0 0 5]; zeta1 = [1.5, 0.7, 0.3];
G1 = tf(k1, [1 2*zeta1(1)*wn1 wn1^2]);
G2 = tf(k1, [1 2*zeta1(2)*wn1 wn1^2]);
G3 = tf(k1, [1 2*zeta1(3)*wn1 wn1^2]);
wn2 = 10; k2 = [0 0 5]; zeta2 = [1.5, 0.7, 0.3];
G4 = tf(k2, [1 2*zeta2(1)*wn2 wn2^2]);
G5 = tf(k2, [1 2*zeta2(2)*wn2 wn2^2]);
G6 = tf(k2, [1 2*zeta2(3)*wn2 wn2^2]);
lw = 3;
ax1 = subplot(2,1,1);
hold on
[a,b] = step(G1);
plot(b, squeeze(a), 'LineWidth', lw, 'Color', 'r');
[a1,b1] = step(G2);
plot(b1, squeeze(a1), 'LineWidth', lw, 'Color', 'g');
[a2,b2] = step(G3);
plot(b2, squeeze(a2), 'LineWidth', lw, 'Color', 'b');
hold off
grid on
ax2 = subplot(2,1,2);
hold on
[a3,b3] = step(G4);
plot(b3, squeeze(a3), 'LineWidth', lw, 'Color', 'r');
[a4,b4] = step(G5);
plot(b4, squeeze(a4), 'LineWidth', lw, 'Color', 'g');
[a5,b5] = step(G6);
plot(b5, squeeze(a5), 'LineWidth', lw, 'Color', 'b');
hold off
grid on