主要内容

Simulink模型的稳定边缘金宝app

This example illustrates how to compute classical and disk-based gain and phase margins of a control loop modeled in Simulink®. To compute stability margins, linearize the model to extract the open-loop responses at one or more operating points of interest. Then, useAllmargin或者分别计算基于经典或基于磁盘的稳定性边距。

MIMO Control Loop

对于此示例,请使用Simulink模型金宝appairframemarginEx.slx。This model is based on the exampleTrim and Linearize an Airframe(Simulink Control Design)

open_system('airframemarginEx.slx')

该系统是两个通道反馈循环。该工厂是单输入的两个输出子系统机身型号,并且控制器是一个两输入的单输出系统,其输入是正常的加速度az和音高率q,谁的输出是鳍偏转信号。

循环传输功能

要计算此反馈系统的增益边缘和相位边缘,请线性化模型以在工厂输出和输入处获得开环传输功能。您可以使用循环转移类型的线性化分析点进行。有关线性化分析点的更多信息,请参见Specify Portion of Model to Linearize(Simulink Control Design)

创建一个移圈th分析点e plant input, which is the first output port of theq Control子系统。

ioInput = linio(“ AirFrameMarginex/Q控制”,1,'looptransfer');

同样,为植物产出创建分析点。因为有两个输出,请将这些分析点指定为线性化I/O对象的向量。

ioOutput(1)= linio('airframemarginEx/Airframe Model',1,'looptransfer');ioOutput(2)= linio('airframemarginEx/Airframe Model',2,'looptransfer');

线性化模型以获得开环传输函数。对于此示例,请使用模型中指定的操作点。工厂输入的环转移为SISO,而输出的环转移为2 by-2。

li =线性化('airframemarginEx',ioInput);%sisoLO= linearize('airframemarginEx',ioOutput);% MIMO

古典收益和相位边缘

要计算经典增益边缘和相位边缘,请使用Allmargin。For an open-loop transfer function,Allmarginassumes a negative-feedback loop.

线性化command is the actual linearized open-loop response of the model at the analysis point. Thus, for an open-loop responseL,closed-loop response of the entire model is a positive feedback loop.

因此,使用-l制作Allmargin用积极的反馈计算稳定边缘。计算工厂输入处的经典增益和相位边缘。

si = allmargin(-li)
Si = struct with fields: GainMargin: [0.1633 17.6538] GMFrequency: [1.5747 47.5230] PhaseMargin: 44.4551 PMFrequency: 5.3929 DelayMargin: 14.3871 DMFrequency: 5.3929 Stable: 1

结构Sicontains information about classical stability margins. For instance,Li.GMFrequencygives the two frequencies at which the phase of the open-loop response crosses –180°.Li.GainMargingives the gain margin at each of those frequencies. The gain margin is the amount by which the loop gain can vary at that frequency while preserving closed-loop stability.

Compute the stability margins at the plant output.

so = allmargin(-lo);

因为有两个输出通道,Allmargin返回一个包含每个通道的结构的数组。每个条目都包含该通道计算的边距,其他反馈通道已关闭。索引结构Soto obtain the stability margins for each channel. For instance, examine the margins with respect to gain variations or phase variations at theqoutput of the plant, which is the second output.

So(2)
ans = struct with fields: GainMargin: [0.3456 17.4288] GMFrequency: [3.4361 49.8461] PhaseMargin: [-78.2449 52.6040] PMFrequency: [1.5685 6.5428] DelayMargin: [313.5216 14.0324] DMFrequency: [1.5685 6.5428] Stable: 1

基于磁盘的增益和相位边距

磁盘边缘比经典的增益和相位边缘提供了更强的稳定性保证。基于磁盘的边距分析模型的增益和相位变化是开环系统响应的复杂不确定性。磁盘边缘是与闭环稳定性兼容的最小不确定性。(有关磁盘边距的一般信息,请参阅Stability Analysis Using Disk Margins

要计算基于磁盘的边距,请使用。LikeAllmargin,命令假设一个负反馈系统。因此,使用-lito compute the disk-based margins at the plant input.

DMi = diskmargin(-Li)
DMI =带有字段的结构:AgainMargin:[0.4419 2.2628] Phasemargin:[-42.3153 42.3153] diskmargin:0.7740下bound:0.7740上限:0.7740上限:0.7740频率:4.2515 worstperterbation:4.2515 worstperturbation:[1x11 ss ss ss ss ss ss sss]

dmi.gainmargin告诉您,工厂输入的开环增益可能会因大约0.44至2.26的任何因素而异,而不会损失闭环稳定性。基于磁盘的边距在所有频率下都考虑了变化。

For a MIMO loop transfer function such as the responseLO在植物产量下,基于磁盘的稳定性边缘有两种类型。这loop-at-a-time margins是每个通道中的稳定边缘,另一个环路关闭。这multiloop marginsare the margins for independent variations in gain (or phase) in both channels simultaneously.computes both.

[DMO,MMO] = diskmargin(-lo);

这loop-at-a-time margins are returned as a structure arrayDMO每个通道都有一个条目。例如,检查边缘的增益变化或相位变化q植物的输出az循环关闭,并与经典边距进行比较So(2)多于。

DMO(2)
ANS =带有字段的结构:AgainMargin:[0.3771 2.6521] Phasemargin:[-48.6811 48.6811] diskmargin:0.9047下侧:0.9047上孔:0.9047频率:0.9047频率:4.4982 worstperterbation worstperterbation:[2x2 ss sss sss sss ss]]

Multiloop边缘,MMo,通过考虑所有反馈通道中增益(或阶段)的同时变化来考虑循环交互。这通常给出了MultiLoop控制系统最现实的稳定保证金估计。

MMo
MMo = struct with fields: GainMargin: [0.6238 1.6030] PhaseMargin: [-26.0867 26.0867] DiskMargin: 0.4633 LowerBound: 0.4633 UpperBound: 0.4643 Frequency: 3.6830 WorstPerturbation: [2x2 ss]

mmo.gainmargin表明两个输出通道中的增益可能会因大约0.62和1.60的因素而不影响闭环稳定性而独立不同。MMo.PhaseMargin表明在每个通道中的独立相变的稳定性都可以保留到±26°。采用盘plotto examine the multiloop margins graphically.

diskmarginplot(-lo)

This shows the disk-based gain and phase margins as a function of frequency. TheMMo返回的值对应于频率跨频率最弱的磁盘边缘。

多个操作点的利润

When you use线性化,您可以提供多个操作点来生成系统的线性化数组。Allmargin可以在线性模型阵列上操作以在多个操作点返回边距。例如,以三个模拟快照时间线性化机身系统。

snap = [0;2;5];lisnap =线性化('airframemarginEx',ioInput,Snap); LoSnap = linearize('airframemarginEx',ioOutput,Snap);

LiSnap是SISO线性模型的3乘阵列,一种用于在每个快照时间获得的植物输入处的环转移。相似地,losnap是一个2输入的2输出线性模型的3 x-1阵列,该模型代表每个快照时间在工厂输出处的循环传输。在三个快照时间计算植物输入处的经典增益和相位边缘。

sisnap = allmargin(-lisnap);

Each entry in the structure arraySiSnap包含相应快照时间的经典保证金信息。例如,检查第二个条目的经典边距t= 2 s。

sisnap(2)
ans = struct with fields: GainMargin: [0.0171 18.2441] GMFrequency: [0.0502 51.4351] PhaseMargin: 93.1041 PMFrequency: 2.8474 DelayMargin: 57.0691 DMFrequency: 2.8474 Stable: 1

计算植物输出处的磁盘边缘。

[DMoSnap,MMoSnap] = diskmargin(-LoSnap);

Because there are two feedback channels and three snapshot times, the structure array containing the loop-at-a-time disk margins has dimensions 2-by-3. The first dimension is for the feedback channels, and the second is for the snapshot times. In other words,DMOSnap(j,k)包含频道的边距jat the snapshot timek。例如,在第三个快照时间检查第二个反馈通道中的磁盘边距,t= 5 s.

DMOSNAP(2,3)
ANS =带有字段的结构:AgainMargin:[0.1345 7.4338] Phasemargin:[-74.6771 74.6771] diskmargin:1.5257下bound:1.5257上空:1.5257上空:1.5257频率:24.1993 WorstPerterBation:[2x2 ss ss sss sss sss sss sss sss]]

每个快照时间只有一组多列边距mmosnap是一个3 x-1结构阵列。

As before, you can also plot the multiloop margins. There are now three curves, one for each snapshot time. Click on a curve to identify which snapshot time it corresponds to.

diskmarginplot(-losnap)

See Also

|||(Simulink Control Design)

相关话题