Chapter8.3: Root Locus Method for Control System Calibration

This series of blogs mainly describes the application of Matlab software in automatic control. If you have no theoretical basis for automatic control, please learn the series of blog posts on automatic control first. This series of blogs will not explain the theoretical knowledge of automatic control in detail.
Links related to the theoretical basis of automatic control: https://blog.csdn.net/qq_39032096/category_10287468.html?spm=1001.2014.3001.5482
Blog reference books: "MATLAB/Simulink and Control System Simulation".



3. Root locus method for control system calibration

3.1 Overview
  • The root locus method is a graphical method, which describes the change of the closed-loop pole position when a certain parameter of the system changes from zero to infinity;
  • Change the root locus of the original system by introducing an appropriate correction device to obtain the desired system performance;
  • The introduction of a correction device is to add zero-pole points in the system, and change the shape of the root locus through the change of zero-pole points;
  • The basis of correction with the root locus method is to change the shape of the root locus by adding zero and pole points in the system open-loop transfer function, so that the system root locus is at ssThe s -plane passes through the desired closed-loop pole;
  • The characteristic of the root locus method correction is that the closed-loop system has a pair of dominant closed-loop poles, and the zero and additional poles will affect the response characteristics;
  • Applying the root locus for correction is essentially changing the root locus by using a correction device, thereby disposing a pair of dominant closed-loop poles to the desired position;
  • Adding poles in the open-loop transfer function can move the root locus to the right, thereby reducing the relative stability of the system and increasing the system adjustment time;
  • Adding a zero point in the open-loop transfer function can make the root locus move to the left, thereby improving the relative stability of the system and reducing the system adjustment time;
  • When the system performance index is represented by the maximum overshoot, rise time, adjustment time, damping ratio, and the desired closed-loop damping ratio, closed-loop pole undamped frequency, etc., it is more convenient to use the root locus method for correction;
  • The conditions for using the root locus method to determine the series correction parameters are:
    • It has been determined to adopt the cascade correction scheme;
    • Given time-domain indices: σ p , ts , ess ( ∞ ) \sigma_p, t_s, e_{ss}(\infty)pptsess()
3.2 Lead correction based on root locus method

The steps of designing the lead correction device with the root locus method:

  • Assume first that the control performance of the system is determined by a pair of closed-loop conjugate poles sd s_d closest to the imaginary axissdleading;

  • Applying the second-order system parameter ζ \zetaζω n \omega_nohnThe relationship with the time domain index, according to the given σ p \sigma_pppand ts t_stsdetermine the position of the dominant pole of the closed loop;

  • Draw the root locus of the original system. If the root locus cannot pass through the desired closed-loop dominant pole, it means that only adjusting the gain cannot meet the given requirements, and a correction device needs to be added; if the root locus of the original system is located on the right side of the expected pole, advance correction should be added device;

  • Calculate the leading phase angle that the leading correction device should provide;

  • Calculate the pole-zero position of the correction device as follows:
    φ c = ± ( 2 k + 1 ) π − ∠ G 0 ( sd ) \varphi_c=±(2k+1)\pi-\angle{G_0(s_d)}Phic=± ( 2 k+1 ) pG0(sd)

  • The corrected system gain is determined by the amplitude condition;

  • Check the performance index of the system. If the system cannot meet the required index, adjust the zero-pole position appropriately; if a large static error coefficient is required, other schemes should be adopted;

3.3 Lag correction based on root locus method

Steps to design hysteresis correction device by root locus method:

  • Plot the root locus of the uncorrected system;
  • Determine the desired closed-loop dominant pole according to the required transient response index, and calculate the open-loop gain corresponding to the dominant pole according to the amplitude condition of the root locus;
  • Calculate the error coefficient value that should be increased according to the requirements of the steady-state error in the given performance index;
  • Determine the correction device β \beta by the value of the error coefficient that should be increasedβ value, usuallyβ \betaThe value of β does not exceed10 1010
  • To determine the pole-zero point of the hysteresis correction device, the principle is to make the pole-zero point close to the origin of the coordinates, and the distance between the two is β \betaβ times;
  • Draw the root locus of the corrected system and find the desired dominant pole;
  • From the desired closed-loop pole, according to the amplitude condition, properly adjust the gain of the amplifier;
  • Check and correct the performance indicators of the system. If the requirements are not met, adjust the zero-pole position of the calibration device appropriately;
3.4 Lead-lag correction based on root locus method

Steps to design a lead-lag correction device using the root locus method:

  • According to the required performance index, determine the desired dominant pole sd s_dsdLocation;

  • To get the closed-loop pole at the desired location, calculate the lead phase angle that should be produced by the lead part of the lead-lag correction:
    φ c = ± ( 2 k + 1 ) π − ∠ G 0 ( sd ) \varphi_c=±(2k+1) \pi-\angle{G_0(s_d)}Phic=± ( 2 k+1 ) pG0(sd)

  • The transfer function of the lead-lag correction device is:
    φ c = ± ( 2 k + 1 ) π − ∠ G 0 ( sd ), G c ( s ) = K c ( s + 1 T 1 s + β T 1 ) ( s + 1 T 2 s + 1 T 2 β ) \varphi_c=±(2k+1)\pi-\angle{G_0(s_d)}, G_c(s)=K_c\left(\frac{s+\displaystyle\frac{ 1}{T_1}}{s+\displaystyle\frac{\beta}{T_1}}\right)\left(\frac{s+\displaystyle\frac{1}{T_2}}{s+\displaystyle\frac{1} {T_2\beta}}\right)Phic=± ( 2 k+1 ) pG0(sd)Gc(s)=Kc s+T1bs+T11 s+T2b1s+T21

  • T 2 T_2 of the lag part in the lead-lag correctionT2选择要足够大,即:
    ∣ s d + 1 T 2 s d + 1 T 2 β ∣ = 1 , ∣ s d + 1 T 1 s d + β T 1 ∣ ∣ K 1 G 0 ( s d ) ∣ = 1 , ∠ ( s d + 1 T 1 ) − ∠ ( s d + β T 1 ) = φ \begin{vmatrix} \displaystyle\frac{s_d+\displaystyle\frac{1}{T_2}}{s_d+\displaystyle\frac{1}{T_2\beta}} \end{vmatrix}=1,\begin{vmatrix} \displaystyle\frac{s_d+\displaystyle\frac{1}{T_1}}{s_d+\displaystyle\frac{\beta}{T_1}} \end{vmatrix}\begin{vmatrix}K_1G_0(s_d)\end{vmatrix}=1,\angle\left(s_d+\displaystyle\frac{1}{T_1}\right)-\angle\left(s_d+\displaystyle\frac{\beta}{T_1}\right)=\varphi sd+T2b1sd+T21 =1 sd+T1bsd+T11 K1G0(sd) =1(sd+T11)(sd+T1b)=Phi

  • Using the obtained β \betaβ value, selectT 2 T_2T2,使:
    ∣ s d + 1 T 2 s d + 1 T 2 β ∣ ≈ 1 , 0 ° < ∠ ( s d + 1 T 2 s d + 1 T 2 β ) < 3 ° \begin{vmatrix} \displaystyle\frac{s_d+\displaystyle\frac{1}{T_2}}{s_d+\displaystyle\frac{1}{T_2\beta}} \end{vmatrix}≈1,0°<\angle\left(\frac{s_d+\displaystyle\frac{1}{T_2}}{s_d+\displaystyle\frac{1}{T_2\beta}}\right)<3° sd+T2b1sd+T21 1< sd+T2b1sd+T21 <

  • Check performance indicators.

3.5 Application of MATLAB/SIMULINK in root locus correction
3.5.1 Practice 1: Advance Correction

Experimental requirements: The open-loop transfer function of the known control system is: G ( s ) = 2.3 s ( 1 + 0.2 s ) ( 1 + 0.15 s ) G(s)=\displaystyle\frac{2.3}{s(1+0.2 s)(1+0.15s)}G(s)=s(1+0.2s)(1+0.15s)2.3, design the advanced correction link so that the static velocity error coefficient of the system after correction K v ≤ 4.6 K_v ≤ 4.6Kv4.6 , the closed-loop dominant pole satisfies the damping ratioζ = 0.2 \zeta=0.2g=0.2 , natural oscillation angular frequencyω n = 12.0 rad / s \omega_n=12.0{\rm rad/s}ohn=12.0 rad/s , draw the unit step response curve, unit impulse response curve and root locus of the system before and after correction.

untie:

S T E P 1 {\rm STEP1} STEP1】: Calculating the sub-function program design of the serial lead correction link parameters.

% get_param子函数,文件名:get_param.m
function Gc=get_param(G,s1,kc)
numG=G.num{
    
    1};denG=G.den{
    
    1};
ngv=polyval(numG,s1);dgv=polyval(denG,s1);
g=ngv/dgv;
theta_G=angle(g);theta_s=angle(s1);
MG=abs(g);Ms=abs(s1);

Tz=(sin(theta_s)-kc*MG*sin(theta_G-theta_s))/(kc*MG*Ms*sin(theta_G));
Tp=-(kc*MG*sin(theta_s)+sin(theta_G+theta_s))/(Ms*sin(theta_G));

Gc=tf([Tz,1],[Tp,1]);

S T E P 2 {\rm STEP2} STEP2 ]: Solve the transfer function of the system correction link, the closed-loop transfer function after correction and the response curves.

% 实例Chapter8.3.5.1
clc;clear;

% 建立校正前控制系统开环传递函数
num=2.3;den=conv([1,0],conv([0.2,1],[0.15,1]));
G=tf(num,den);

% 校正后系统的性能要求
zeta=0.2;wn=12.0;
[num,den]=ord2(wn,zeta);
s=roots(den);
s1=s(1);kc=2;
Gc=get_param(G,s1,kc);

GGc=G*Gc*kc;                    % 校正后系统开环传递函数
G_bf_close=feedback(G,1);       % 校正前系统闭环传递函数
G_af_close=feedback(GGc,1);     % 校正后系统闭环传递函数

% 绘制单位阶跃响应
figure(1);
step(G_af_close,'b',3.5);hold on;
step(G_bf_close,'r',3.5);grid;
legend('校正后闭环系统阶跃响应','校正前闭环系统阶跃响应');
set(findobj(get(gca,'Children'),'LineWidth',0.5),'LineWidth',1.5);
title('校正前后系统阶跃响应','FontSize',15);

% 绘制单位脉冲响应
figure(2);
impulse(G_af_close,'b',3.5);hold on;
impulse(G_bf_close,'r',3.5);grid;
legend('校正后闭环系统脉冲响应','校正前闭环系统脉冲响应');
set(findobj(get(gca,'Children'),'LineWidth',0.5),'LineWidth',1.5);
title('校正前后系统脉冲响应','FontSize',15);

% 绘制校正前后系统根轨迹图
figure(3);
rlocus(G,GGc);grid;
legend('校正前系统根轨迹图','校正后系统根轨迹图');
set(findobj(get(gca,'Children'),'LineWidth',0.5),'LineWidth',1.5);
title('校正前后系统根轨迹','FontSize',15);

% 超前校正环节传递函数和校正后系统闭环传递函数
Gc,G_af_close
% 校正环节传递函数
Gc = 
  1.016 s + 1
  ------------
  0.0404 s + 1

% 校正后系统闭环传递函数
G_af_close = 
                       4.672 s + 4.6
  -------------------------------------------------------
  0.001212 s^4 + 0.04414 s^3 + 0.3904 s^2 + 5.672 s + 4.6

S T E P 3 {\rm STEP3} STEP3】: Unit step response curve before and after system calibration.

1

S T E P 4 {\rm STEP4} STEP4】: Unit impulse response curve before and after system calibration.

2

S T E P 5 {\rm STEP5} STEP5】: Root locus before and after system calibration.

3

S T E P 6 {\rm STEP6} STEP6 ]: Performance analysis.

  • The transfer function of the serial lead correction link is: G c ( s ) = 1.016 s + 1 0.0404 s + 1 G_c(s)=\displaystyle\frac{1.016s+1}{0.0404s+1}Gc(s)=0.0404s+11.016 s+1
  • According to the unit step response curve, the system overshoot before correction: σ = 17.3 % \sigma=17.3\%p=17.3% , rise time:tr = 0.58 s t_r=0.58{\rm s}tr=0.58 s , adjustment time:ts = 2.92 s t_s=2.92{\rm s}ts=2.92s _
  • According to the unit step response curve, the system overshoot after correction: σ = 31.7 % \sigma=31.7\%p=31.7% , rise time:tr = 0.123 s t_r=0.123{\rm s}tr=0.123 s , adjustment time:ts = 2.3 s t_s=2.3{\rm s}ts=2.3s _
  • Therefore, after the system is corrected in series, the system performance is improved;
  • From the root locus diagram, the root locus of the system moves to the left after correction, which improves the relative stability of the system and shortens the system adjustment time;
3.5.2 Practice 2: Lag Correction

Experimental requirements: The open-loop transfer function of the known system is: G ( s ) = 4 s ( s + 2.5 ) G(s)=\displaystyle\frac{4}{s(s+2.5)}G(s)=s(s+2.5)4, design the series lag correction link so that the static velocity error coefficient of the system after correction: K v ≤ 6 K_v ≤ 6Kv6 , the closed-loop dominant pole satisfies the damping ratio:ζ = 0.407 \zeta=0.407g=0.407 , draw the system unit step response curve, unit impulse response and root locus before and after correction.

untie:

S T E P 1 {\rm STEP1} STEP1 ]: Calculating the sub-function program design of the parameters of the series lag correction link.

% get_param_02子函数,文件:get_param_02.m
function [Gc,kc]=get_param_02(G,zeta,wc,Tz)
G=tf(G);[r,k]=rlocus(G);
za=zeta/sqrt(1-zeta^2);

ri=r(1,find(imag(r(1,:))>0));
ra=imag(ri)./real(ri);
kc=spline(ra,k(find(imag(r(1,:))>0)),1/za);

syms x;syms ng;syms dg;
ng=poly2sym(G.num{
    
    1});dg=poly2sym(G.den{
    
    1});
ess=limit(ng*kc/dg*x);
beta=round(100/sym2poly(ess)/wc);Tp=Tz/beta;
Gc=tf([1,Tz],[1,Tp]);

S T E P 2 {\rm STEP2} STEP2 ]: Solve the transfer function of the system correction link, the closed-loop transfer function after correction and the response curves.

% 实例Chapter8.3.5.2
clc;clear;

% 建立校正前控制系统开环传递函数
num=4;den=conv([1,0],[1,2.5]);
G=tf(num,den);

% 校正后系统的性能要求
zeta=0.407;wc=6;Tz=0.1;
[Gc,Kc]=get_param_02(G,zeta,wc,Tz);

GGc=G*Gc*Kc;                    % 校正后系统开环传递函数
G_bf_close=feedback(G,1);       % 校正前系统闭环传递函数
G_af_close=feedback(GGc,1);     % 校正后系统闭环传递函数

% 绘制单位阶跃响应
figure(1);
step(G_af_close,'b');hold on;
step(G_bf_close,'r');grid;axis([0 15 0 1.4]);
legend('校正后闭环系统阶跃响应','校正前闭环系统阶跃响应');
set(findobj(get(gca,'Children'),'LineWidth',0.5),'LineWidth',1.5);
title('校正前后系统阶跃响应','FontSize',15);

% 绘制单位脉冲响应
figure(2);
impulse(G_af_close,'b');hold on;
impulse(G_bf_close,'r');grid;
legend('校正后闭环系统脉冲响应','校正前闭环系统脉冲响应');
set(findobj(get(gca,'Children'),'LineWidth',0.5),'LineWidth',1.5);
title('校正前后系统脉冲响应','FontSize',15);

% 绘制校正前后系统根轨迹图
figure(3);
rlocus(G,GGc);grid;
legend('校正前系统根轨迹图','校正后系统根轨迹图');
set(findobj(get(gca,'Children'),'LineWidth',0.5),'LineWidth',1.5);
title('校正前后系统根轨迹','FontSize',15);

% 超前校正环节传递函数和校正后系统闭环传递函数
Gc,Kc,G_af_close
% 滞后校正环节传递函数
Gc = 
   s + 0.1
  ---------
  s + 0.025

% 系统增益
Kc =
    2.3581

% 校正后系统闭环传递函数
G_af_close = 
           9.433 s + 0.9433
  ----------------------------------
  s^3 + 2.525 s^2 + 9.495 s + 0.9433

S T E P 3 {\rm STEP3} STEP3】: Unit step response curve before and after system calibration.

4

S T E P 4 {\rm STEP4} STEP4】: Unit impulse response curve before and after system calibration.

5

S T E P 5 {\rm STEP5} STEP5】: Root locus before and after system calibration.

6

S T E P 6 {\rm STEP6} STEP6 ]: Performance analysis.

  • The transfer function of the series lag correction link is: G c ( s ) = s + 0.1 s + 0.025 G_c(s)=\displaystyle\frac{s+0.1}{s+0.025}Gc(s)=s+0.025s+0.1
  • According to the unit step response curve, the system overshoot before correction: σ = 8.08 % \sigma=8.08\%p=8.08% , rise time:tr = 0.961 s t_r=0.961{\rm s}tr=0.961 s , adjustment time:ts = 2.99 s t_s=2.99{\rm s}ts=2.99s _
  • According to the unit step response curve, the system overshoot after correction: σ = 27.4 % \sigma=27.4\%p=27.4% , rise time:tr = 0.478 s t_r=0.478{\rm s}tr=0.478 s , adjustment time:ts = 2.3 s t_s=2.3{\rm s}ts=2.3s _
  • Therefore, after the system is corrected by series lag, the system performance is improved;
3.5.3 Combat 3: Lead-lag correction link

Experimental requirements: The open-loop transfer function of the known system is: G ( s ) = 8 s ( s + 0.4 ) G(s)=\displaystyle\frac{8}{s(s+0.4)}G(s)=s(s+0.4)8, design the lead-lag correction link so that the static velocity error coefficient of the system after correction: K v ≤ 5 K_v ≤ 5Kv5 , the closed-loop dominant pole satisfies the damping ratio:ζ = 0.2 \zeta=0.2g=0.2 and the natural angular frequency of oscillation:ω n = 5 rad / s \omega_n=5{\rm rad/s}ohn=5 rad/s , the phase margin is:50° 50°50° , draw the unit step response curve, unit impulse response curve and root locus of the system before and after correction.

untie:

S T E P 1 {\rm STEP1} STEP1 ]: main function.

% 实例Chapter8.3.5.3
clc;clear;

% 建立控制系统模型
z=[];p=[0,-0.4];k=8;
Gz=zpk(z,p,k);G=tf(Gz);
zeta=0.2;wn=5;
kc=1;Tz=0.1;dPm=50+5;
ng=G.num{
    
    1};            % 把G.num中的第一个元胞赋给ng.
[num,den]=ord2(wn,zeta);
s=roots(den);
s1=s(1);

Gc1=get_param(G,s1,kc);
G1=G*Gc1*kc;

[Gc2,Kc2]=get_param_02(G,zeta,wn,Tz);
GGc=G1*Gc2*Kc2;                 % 校正后系统开环传递函数
G_bf_close=feedback(G,1);       % 校正前系统闭环传递函数
G_af_close=feedback(GGc,1);     % 校正后系统闭环传递函数

% 绘制单位阶跃响应
figure(1);
step(G_af_close,'b');hold on;
step(G_bf_close,'r');grid;
legend('校正后闭环系统阶跃响应','校正前闭环系统阶跃响应');
set(findobj(get(gca,'Children'),'LineWidth',0.5),'LineWidth',1.5);
title('校正前后系统阶跃响应','FontSize',15);

% 绘制单位脉冲响应
figure(2);
impulse(G_af_close,'b');hold on;
impulse(G_bf_close,'r');grid;
legend('校正后闭环系统脉冲响应','校正前闭环系统脉冲响应');
set(findobj(get(gca,'Children'),'LineWidth',0.5),'LineWidth',1.5);
title('校正前后系统脉冲响应','FontSize',15);

% 绘制校正前后系统根轨迹图
figure(3);
rlocus(G,GGc);grid;
legend('校正前系统根轨迹图','校正后系统根轨迹图');
set(findobj(get(gca,'Children'),'LineWidth',0.5),'LineWidth',1.5);
title('校正前后系统根轨迹','FontSize',15);

% 超前校正环节传递函数和校正后系统闭环传递函数
Gc1,Gc2,G_af_close

S T E P 2 {\rm STEP2} STEP2 ]: Lead link transfer function, lag link transfer function and corrected closed-loop transfer function.

% 超前校正环节传递函数
Gc1 = 
  1.358 s + 1
  -----------
  0.425 s + 1

% 滞后校正环节传递函数
Gc2 = 
   s + 0.1
  ----------
  s + 0.0125

% 校正后系统闭环传递函数
G_af_close = 
              1.358 s^2 + 1.136 s + 0.1
  -------------------------------------------------
  0.425 s^4 + 1.175 s^3 + 1.773 s^2 + 1.141 s + 0.1

S T E P 3 {\rm STEP3} STEP3】: Unit step response curve.

7

S T E P 4 {\rm STEP4} STEP4】: Unit impulse response curve.

8

S T E P 5 {\rm STEP5} STEP5】: System root locus curve.

9

S T E P 6 {\rm STEP6} STEP6 ]: System performance analysis.

  • The transfer function of the serial lead-lag correction link is: G c ( s ) = 0.125 × s + 0.1 s + 0.0125 × 1.358 s + 1 0.425 s + 1 G_c(s)=0.125\times\displaystyle\frac{s+0.1}{ s+0.0125}\times\displaystyle\frac{1.358s+1}{0.425s+1}Gc(s)=0.125×s+0.0125s+0.1×0.425s+11.358 s+1
  • According to the unit step response curve, the system overshoot before correction: σ = 79.9 % \sigma=79.9\%p=79.9% , rise time:tr = 0.384 s t_r=0.384{\rm s}tr=0.384 s , adjustment time:ts = 19.1 s t_s=19.1{\rm s}ts=19.1 s
  • According to the unit step response curve, the system overshoot after correction: σ = 28.9 % \sigma=28.9\%p=28.9% , rise time:tr = 0.907 s t_r=0.907{\rm s}tr=0.907 s , adjustment time:ts = 4.19 s t_s=4.19{\rm s}ts=4.19s
  • Therefore, after the system is corrected by series lead lag, the system performance is improved;

Guess you like

Origin blog.csdn.net/qq_39032096/article/details/129784482