Main Content

调整多旋转控制系统

This example shows how to jointly tune the inner and outer loops of a cascade architecture with theSystune命令。

级联的PID循环

级联控制通常用于通过快速干扰拒绝来实现平滑的跟踪。最简单的级联体系结构涉及两个控制循环(内部和外部),如下图所示。内部环通常比外循环快,在传播到外环之前拒绝干扰。(金宝appMATLAB®在线不支持金宝appSimulink®。)

open_system('rct_cascade'

植物模型和带宽要求

In this example, the inner loop plantG2

$$ g_2(s)= \ frac {3} {s+2} $$

and the outer loop plantG1

$$ g_1(s)= \ frac {10} {(s+1)^3} $$

g2 = zpk([],-2,3);g1 = zpk([],[ -  1 -1 -1],10);

我们在内部循环中使用PI控制器,外圈中使用PID控制器。外环必须具有至少0.2 rad/s的带宽,并且内环带宽应大10倍以进行足够的干扰排斥。

用Systune调整PID控制器

当在Simulink中对控制系统进行建模时,请使用金宝appSltunerinterface in Simulink Control Design™ to set up the tuning task. List the tunable blocks, mark the signalsrandD2作为感兴趣的输入,并标记信号Y1andY2作为测量开环传输的位置,并指定循环形状。

英石0 = slTuner('rct_cascade',,,,{'C1',,,,'C2'}); addPoint(ST0,{'r',,,,'d2',,,,'y1',,,,'y2'})

您可以查询当前值C1andC2在Simuli金宝appnk模型中使用展示。The control system is unstable for these initial values as confirmed by simulating the Simulink model.

展示(ST0)
块1:rct_cascade/c1 = 1 kp + ki * --- kp = 0.1,ki = 0.1名称:C1连续时间PI控制器以并行形式。----------------------------------- Block 2: rct_cascade/C2 = 1 Kp + Ki * ---s具有kp = 0.1,ki = 0.1名称:C2连续时间PI控制器并行形式。

Next use "LoopShape" requirements to specify the desired bandwidths for the inner and outer loops. Use$0.2/s$as the target loop shape for the outer loop to enforce integral action with a gain crossover frequency at 0.2 rad/s:

%外循环带宽= 0.2s = tf(');req1 = tuninggoal.loopshape('y1',,,,0.2/s);% loop transfer measured at y1req1.name ='Outer Loop';

Use$ 2/s $for the inner loop to make it ten times faster (higher bandwidth) than the outer loop. To constrain the inner loop transfer, make sure to open the outer loop by specifyingY1作为循环开口:

%内循环带宽= 2req2 = tuninggoal.loopshape('y2',2/s);在y2下测得的循环转移%Req2.Openings ='y1';%在y1处打开外循环的%Req2.Name ='Inner Loop';

You can now tune the PID gains inC1andC2Systune

ST = Systune(ST0,[REQ1,REQ2]);
Final: Soft = 0.859, Hard = -Inf, Iterations = 67

Use展示查看调谐的PID增益。

展示(ST)
块1:rct_cascade/c1 = 1 s kp + ki * --- + kd * -------- s tf * s + 1 with kp = 0.0521,ki = 0.0186,kd = 0.0475,tf = 0.00659:C1以并联形式连续时间PIDF控制器。----------------------------------- Block 2: rct_cascade/C2 = 1 Kp + Ki * ---s具有KP = 0.721,Ki = 1.23名称:C2连续时间PI控制器并行形式。

验证设计

The final value is less than 1 which means thatSystune成功满足了两个循环形状要求。通过检查调谐控制系统来确认这一点英石ViewGoal

ViewGoal([Req1,Req2],ST)

Note that the inner and outer loops have the desired gain crossover frequencies. To further validate the design, plot the tuned responses to a step command r and step disturbance d2:

响应步骤命令的%H = getIOTransfer(ST,'r',,,,'y1');clf, step(H,30), title(“ step命令”

对步骤干扰的响应%H = getIOTransfer(ST,'d2',,,,'y1');step(H,30), title(“扰动步”

一旦对线性分析结果感到满意,请使用写blockvalueto write the tuned PID gains back to the Simulink blocks. You can then conduct a more thorough validation in Simulink.

WriteBlockValue(ST)

Equivalent Workflow in MATLAB

If you do not have a Simulink model of the control system, you can perform the same steps using LTI models of the plant and Control Design blocks to model the tunable elements.

图1:级联体系结构

First create parametric models of the tunable PI and PID controllers.

C1= tunablePID('C1',,,,'pid');c2 = tunablepid('C2',,,,'pi');

然后使用“分析点”块来标记循环打开位置Y1andY2

LS1 =分析点('y1');LS2 = AnalysisPoint('y2');

最后,创建一个闭环模型T0通过关闭每个反馈循环的整体控制系统。结果是根据可调元素的广义状态空间模型C1andC2

InnerCL = feedback(LS2*G2*C2,1); T0 = feedback(G1*InnerCL*C1,LS1); T0.InputName ='r';t0.outputname ='y1';

You can now tune the PID gains inC1andC2Systune

t = systune(t0,[req1,req2]);
Final: Soft = 0.86, Hard = -Inf, Iterations = 136

和以前一样getiotransferto compute and plot the tuned responses to a step command r and step disturbance entering at the locationY2

响应步骤命令的%h = getiotransfer(t,'r',,,,'y1');clf, step(H,30), title(“ step命令”

对步骤干扰的响应%h = getiotransfer(t,'y2',,,,'y1');step(H,30), title(“扰动步”

You can also plot the open-loop gains for the inner and outer loops to validate the bandwidth requirements. Note the -1 sign to compute the negative-feedback open-loop transfer:

L1 = getLoopTransfer(T,'y1',-1);% crossover should be at .2L2 = getLoopTransfer(T,'y2',,,,-1,'y1');百分比分频器应为2bodemag(l2,l1,{1e-2,1e2}),网格传奇('Inner Loop',,,,'Outer Loop'

也可以看看

|

Related Topics