% % Armando A. Rodriguez % Copyright 1998 % % % EEE480: Feedback SYstems % EXAM #2: Problems 1-5 % Spring 1998 % % %******************************************************************************* % % % Problem #1: ROOT LOCUS - Asymptotes, Imaginary crossovers, Stability Robustness Margins % % L(s) = 6 [(s+1/3)/s] [1/(s-4)] [500/(s+500)]^2 % % bp1 = roots([3 -2 -4]) % determine low frequency breakpoints % % This yields breakpoints at % s = -1.5352 = -1/3 - r % and % s = 0.8685 = -1/3 + r % % where r = sqrt(13)/3 is the radius of the low frequency % circle (approximately a circle) with center at s = -1/3 which passes through % s = jwp1 = j2/sqrt(3). % bp2 = roots([3 2000 250000]) % determine high frequency breakpoint % % This yields breakpoints at % s = -500 k = 0 % and % s = -166.6667 k = 12.3457 % % The latter (s, k) pair corresponds to the breakpoint of interest on % the negative real axis of the root locus (k > 0). % % s =-500 % Breakpoint k = -(s^3 +1000*s^2 + 250000*s)/1500000 % Find corresponding value of k s =-166.6667 % Breakpoint k = -(s^3 +1000*s^2 + 250000*s)/1500000 % Find corresponding value of k % % Form Open Loop Transfer Function % numerator = 6 (500)(500) (s + 1/3) % denominator = s (s - 4)(s + 500)(s + 500) num = 6*(500)*(500)*[1 1/3] % form open loop numerator polynomial zeros = roots(num) % determine finite open loop zeros den = conv([1 -4 0], [1 1000 250000]) % form open loop characterisitc polynomial poles = roots(den) % determine open loop poles sys = tf(num,den); % form open loop system L = num/den k = [0:0.1:200]; % form a k vector for plotting root locus rlocus(sys, k) % plot root locus rlocfind(sys) % Used to find k value and closed loop poles from a root locus plot pause clf % CLG is a pseudonym for CLF, provided for upward compatibility % from MATLAB 3.5. % CLF deletes all children of the current figure with visible handles. % % Closed Loop Poles For Design # 1 % clchar1 = den + [ 0 0 0 num] % Form nominal closed loop characteristic equation clpoles1 = roots(clchar1) % Determine nominal closed loop poles % % The nominal closed loop poles for this design are as follows: % % s = -1.02 + j 1 % s = -1.02 - j 1 % s = -442.03 % s = -551.93 % %******************************************************************************* % % % Problem #2: Frequency Response - Gain crossover, Phase crossovers, Stability Robustness Margins % w = logspace(-2,4,200); bode(sys,w) xlabel('w (rad/sec)') title('Open Loop Frequency Response: Problem #2') [dgm,pm,wp1,wg] = margin(sys) % determine downward gain margin, % phase margin, % low frequency phase crossover frequency, and % unity gain crossover frequency % The margin command yields a % downward gain margin: dgm = 0.6676 % phase margin: pm = 43.0536 degrees % low frequency phase crossover: wp1 = 1.1648 rad/sec % gain crossover frequency: wg = 4.4936 rad/sec % %******************************************************************************* % % % Problem #3: Routh Table % % Low frequency approximation: s^2 + (6k - 4) s + 2k % Use to determine k1 = downward gain margin and wp1 % % The associated Routh Table is given by: % % s^2: 1 2k % s^1: 6k-4 0 % s^0: 2k Setting 6k-4 = 0 yields % Downward gain margin = k1 = 2/3 % % This value of k yields a row of zeros. % The auxiliary polynomial can be formed from the % previous s^2 row. This yields % % s^2 + 4/3 = 0 % or % wp1 = 2/(sqrt(3) rad/sec % % High frequency approximation: s^3 + 1000 s^2 + 25 10^4 s + 15 10^5 k % Use to determine k2 = upward gain margin and wp2 % % The associated Routh Table is given by: % % s^3: 1 (25)10^4 % s^2: 1000 (15)10^5 k % s^1: A A = ((25) 10^7 - (15) 10^5 k)/1000 % s^0: (15)10^5 k % Setting A = 0 yields % Upward gain margin = k2 = 500/3 = 167 % % This value of k yields a row of zeros. % The auxiliary polynomial can be formed from the % previous s^2 row. This yields % % 1000s^2 + 15 10^5 k2 = 0 % or % wp2 = 500 rad/sec. % % %******************************************************************************* % % % Problem #4: Design, Second Order Systems, Time COnstants, Peak to Overshoot, Root Loci, % Imaginary Crossovers, Bode Plots, Gain and Phase Crossovers, % Stability Robustness Margins % % The structure of K_1 and K_2 are selected as follows: % % K_1 = k/s K_2 = [(s+a)/a]. % % Given this, the open loop transfer function becomes: % % L(s) = [k/s] [(s+a)/a] [4/(s-4)] [500/(s+500)]^2 % % The integrator guarantees zero steady state error to step commands and steady % state rejection of step disturbances. This follows by the internal model principle. % The s+a will allow us to stabilize the closed loop system. The [500/(s+500)]^2 % represents high frequency dynamics which we must worry about. % % The nominal design is based on the low frequency approximation for L: % % L(s) = [k/s] [(s+a)/a] [4/(s-4)] % % Given this, the settling time specification tells us that % % Real part part of closed loop loop pole = -2 % % the peaking time specification tells us that the % % Imaginary part part of closed loop loop pole = -2 % % Given the above, the dominant closed loop poles are given by % % s = -2 +/- j 2 % % Given this, it follows that we want k and a to satisfy the following relationship: % % Phi_cl = s(s-4) + 4 (k/a)(s+a) = s^2 + (k/a - 4)s + 4k = s^2 + 4s + 8 % % From this, one obtains 2 equations in the 2 unknowns k and a. % Solution of these equations yields % % k = 2 and a = 1 % % yielding an open loop transfer function: % % L(s) = [8(s+1)/s] [1/(s-4)] [500/(s+500)]^2 % % % Form Open Loop Transfer Function % numerator = 8 (500)(500) (s + 1) % denominator = s (s - 4)(s + 500)(s + 500) num = 8*(500)*(500)*[1 1] % form open loop numerator polynomial zeros = roots(num) % determine finite open loop zeros den = conv([1 -4 0], [1 1000 250000]) % form open loop characterisitc polynomial poles = roots(den) % determine open loop poles sys = tf(num,den); % form open loop system L = num/den k = [0:0.1:200]; % form a k vector for plotting root locus rlocus(sys, k) % plot root locus rlocfind(sys) % Used to find k value and closed loop poles from a root locus plot pause clf % CLG is a pseudonym for CLF, provided for upward compatibility % from MATLAB 3.5. % CLF deletes all children of the current figure with visible handles. % % Frequency Response - Gain crossover, Phase crossovers, Stability Robustness Margins % w = logspace(-2,4,200); bode(sys,w) xlabel('w (rad/sec)') title('Open Loop Frequency Response: Problem #4') [dgm,pm,wp1,wg] = margin(sys) % determine downward gain margin, % phase margin, % low frequency phase crossover frequency, and % unity gain crossover frequency % % The margin command yields a % downward gain margin: dgm = 0.5020 % phase margin: pm = 50.6072 degrees % low frequency phase crossover: wp1 = 2.0203 rad/sec % gain crossover frequency: wg = 7.0195 rad/sec % % Closed Loop Poles For Design # 2 % clchar2 = den + [ 0 0 0 num] % Form nominal closed loop characteristic equation clpoles2 = roots(clchar2) % Determine nominal closed loop poles % % The nominal closed loop poles for this design are as follows: % % s = -2.05 + j 2.02 % s = -2.05 - j 2.02 % s = -432.38 % s = -559.52 % %******************************************************************************* % % % Problem #5: Compare the Designs in Problems 1 and 4 % % % Both have: % K_1 = k/s % K_2 = (s+a)/a % % L(s) = [k/s] [(s+a)/a] [4/(s-4)] [500/(s+500)]^2 % % % DESIGN #1 (SLOW) DESIGN #2 (FAST) % % k = 0.5 k = 2 % a = 1/3 a = 1 % k1 = 2/3 k2 = 1/2 % Downward gain margin = k_1 Downward gain margin = k_1 % wp1 = 2/3 wp1 = 2 % k2 = 167 k2 = 125 % Upward gain margin = k2 Upward gain margin = k2 % wp2 = 500 wp2 = 500 % Dominant CLPs = -1+/-j1 Dominant CLPs = -2+/-j2 % zeta = 0.7071 zeta = 0.7071 % Overshoot to step command = 5 percent Overshoot to step command = 5 percent % wn = sqrt(2) wn = 2 sqrt(2) % tau =1 tau = 0.5 % settling time = 5 tau = 5 seconds settling time = 5 tau = 2.5 seconds % wd = 1 wd = 2 % tp = pi/wd = pi seconds tp = pi/wd = pi seconds % wg = 4.5 rad/sec wg = 7 rad/sec % PM = 43 degrees PM = 51 degrees % % Actual CLP's: Actual CLP's: % % s = -1.02 + j 1.00 s = -2.05 + j 2.02 % s = -1.02 - j 1.00 s = -2.05 - j 2.02 % s = -442.03 s = -432.38 % s = -551.93 s = -559.52 % % % %******************************************************************************* %