% % A.A. Rodriguez % Feedback Control Systems % Copyright (c) 1998 % % % This macro examines the dependence of the unit step response of the standard second order system % % H(s) = w_n^2 / ( s^2 + 2 zeta w_n s + w_n^2 ) % % on the damping factor zeta. % % The steady state output is given by the dc gain of the system transfer function: % % yss = H(0) = 1 % % % Four important cases arise. % % Case 1: UNDAMPED, zeta = 0. % For zeta = 0, the system poles are distinct, purely imaginary, and the system is said to be undamped. % In such a case, the system's step response has a sinusoidal component of amplitude 1 oscillating about % the steady state value of 1. % % Case 2: UNDERDAMPED, 0 < zeta < 1. % For 0 < zeta < 1, the system poles are distinct, complex, lie in the left half plane, and the system is % said to be overdamped. In such a case, the system's step response contains a decaying exponential sinusoid % which approaches the steady state value of 1. % For small zeta, the oscillations are significant. As zeta is increased, the amount of oscillation decreases - % since increasing zeta introduces more damping into the system. % % Case 3: CRITICALLY DAMPED. % For zeta = 1, the system poles are real, repeated (both at s = -w_n), and the system is said to be critically damped. % For this zeta, oscillations are no longer visible in the system's step response. % % Case 4: OVERDAMPED. % For zeta > 1, the system poles are real, distinct, and the system is said to be overdamped. % In such a case, the step response converges exponentially to the steady state value of 1. % As zeta is increased above unity, one pole (slow pole with larger time constant) moves toward the right, % the other pole (fast pole with smaller time constant) moves toward the left. % % % Dependence of Step Response on Damping Factor: w_n is fized % clf wn=1; % Pick nominal undamped natural frequency num = [wn^2]; % Form numerator of H t = [0:0.1:10]; % Create time vector % % CASE 1: UNDAMPED SYSTEM % zeta = 0; den = [1 2*zeta*wn wn^2]; % Form denominator of H sys = tf(num,den); % Create continuous time system H yo = step(sys,t); % Form step responses % % CASE 2: UNDERDAMPED SYSTEM % zeta = 0.1; den = [1 2*zeta*wn wn^2]; % Form denominator of H sys = tf(num,den); % Create continuous time system H y1 = step(sys,t); % Form step responses zeta = 0.2; den = [1 2*zeta*wn wn^2]; % Form denominator of H sys = tf(num,den); % Create continuous time system H y2 = step(sys,t); % Form step responses zeta = 0.3; den = [1 2*zeta*wn wn^2]; % Form denominator of H sys = tf(num,den); % Create continuous time system H y3 = step(sys,t); % Form step responses zeta = 0.4; den = [1 2*zeta*wn wn^2]; % Form denominator of H sys = tf(num,den); % Create continuous time system H y4 = step(sys,t); % Form step responses zeta = 0.5; den = [1 2*zeta*wn wn^2]; % Form denominator of H sys = tf(num,den); % Create continuous time system H y5 = step(sys,t); % Form step responses zeta = 0.6; den = [1 2*zeta*wn wn^2]; % Form denominator of H sys = tf(num,den); % Create continuous time system H y6 = step(sys,t); % Form step responses zeta = 0.7; den = [1 2*zeta*wn wn^2]; % Form denominator of H sys = tf(num,den); % Create continuous time system H y7 = step(sys,t); % Form step responses zeta = 0.8; den = [1 2*zeta*wn wn^2]; % Form denominator of H sys = tf(num,den); % Create continuous time system H y8 = step(sys,t); % Form step responses zeta = 0.9; den = [1 2*zeta*wn wn^2]; % Form denominator of H sys = tf(num,den); % Create continuous time system H y9 = step(sys,t); % Form step responses % % CASE 3: CRITICALLY DAMPED SYSTEM % zeta = 1; den = [1 2*zeta*wn wn^2]; % Form denominator of H sys = tf(num,den); % Create continuous time system H y10 = step(sys,t); % Form step responses % % CASE 4: OVERDAMPED SYSTEM % zeta = 1.1; den = [1 2*zeta*wn wn^2]; % Form denominator of H sys = tf(num,den); % Create continuous time system H y11 = step(sys,t); % Form step responses zeta = 1.2; den = [1 2*zeta*wn wn^2]; % Form denominator of H sys = tf(num,den); % Create continuous time system H y12 = step(sys,t); % Form step responses zeta = 1.3; den = [1 2*zeta*wn wn^2]; % Form denominator of H sys = tf(num,den); % Create continuous time system H y13 = step(sys,t); zeta = 1.4; den = [1 2*zeta*wn wn^2]; % Form denominator of H sys = tf(num,den); % Create continuous time system H y14 = step(sys,t); zeta = 1.6; den = [1 2*zeta*wn wn^2]; % Form denominator of H sys = tf(num,den); % Create continuous time system H y16 = step(sys,t); plot(t,yo, t,y2, t,y4,t, y6, t,y8, t,y10, '--', t,y12, t, y14, t, y16) % plot responses grid % activate grid on plot title('Dependence of Step Response on Damping Factor \zeta (\omega_n = 1)') ylabel('s(t)') xlabel('time (seconds)') gtext('Dashed Plot: Critically Damped') gtext('Above Dashed Plot: Under Damped') gtext('Below Dashed Plot: Over Damped') gtext('\zeta varies between 0 and 1.6 in increments of 0.2') pause return % %***************************************************************************************************** % % % Dependence of Step Response on Damping Factor: w_n is fized % % % The above shows that the step response is oscillatory for zeta in the open interval [0, 1). % More specifically, elementary calculus may be used to show that the maximum overshoot M_p % depends on the damping factor zeta as follows: % % M_p = exp( - pi zeta / sqrt(1 - zeta^2 ) ) % % This shows that % M_p = 1 when the system is undamped (zeta = 0); % M_p = 0 when the system is critically damped (zeta = 1). % % As zeta is reduced from 1 to 0, the maximum overshoot M_p varies from 0 to 1, respectively. % This relationship is now plotted by the following code segment: % zeta = [eps:.1:1]; % Create vector of zeta values mp = exp( - pi.*zeta ./ (1 - zeta.^2 ).^0.5 ) % .* denotes element-wise array multiplication % ./ denotes element-wise array division % .^ denotes element-wise array exponentiation plot(zeta, mp) % Plot relationship between mp and zeta grid % Activate grid on plot title('Dependence of Overshoot M_p on Damping Factor \zeta') ylabel('Maximum Overshoot: M_p') xlabel('Damping Factor: \zeta') gtext('As \zeta increases the maximum overshoot M_p decreases')