Main Content

具有不确定性的Simulink模型金宝app的线性化

This example shows how to compute uncertain linearizations using Robust Control Toolbox™ and Simulink® Control Design™. There are two convenient workflows offered depending on how Simulink is used. The resulting uncertain linearizations are in the form of the uncertain state space (USS) data structure in the Robust Control Toolbox, which can be used by the analysis functions in Robust Control Toolbox.

Introduction

Simulink中的图形用户界面是建模和模拟控制系统的自然环境。金宝app使用Simulink控制设计中的线性化功能和可靠的控制工具箱中的不确定性元素,您金宝app可以在模型中指定特定块的不确定性,然后提取不确定的线性化模型。

在此示例中,在存在不确定性的情况下检查了PID控制器的性能。有两种方法可用于计算不确定系统的线性化。在Simulink工作时,每种方法都旨在满足不同的需求。金宝app这些方法在以下各节中进行了总结。

方法1:使用不确定状态空间块

This first approach is most applicable when you are already using Uncertain State Space blocks as part of your control system design process in Simulink. As shown in the exampleSimulink中的鲁棒性分析金宝app,鲁棒控制工具箱中的不确定状态空间块使您可以在simulink模型中指定不确定性。金宝app

In the following example, both the plant and sensor dynamics are uncertain. The uncertainty on the plant dynamics includes:

  • Real poleunc_polewhose location varies between -10 and -4

  • Unmodeled dynamicsinput_unc(25% relative uncertainty at low frequency rising to 100% uncertainty at 130 rad/s).

unc_pole= ureal('unc_pole',,,,-5,'Range',[-10 -4]);植物= ss(unc_pole,5,1,0);wt =压力(0.25,130,2.5);input_unc = ultidyn('input_unc',,,,[1 1]);

这uncertain sensor dynamics are defined to be

sensor_pole = ureal('sensor_pole',-20,'Range',,,,[-30 -10]); sensor = tf(1,[1/(-sensor_pole) 1]);

rct_ulinearize_uss模型使用不确定的状态空间块(以蓝色突出显示)来建模这种不确定性:

mdl ='rct_ulinearize_uss';open_system('rct_ulinearize_uss'

该Simu金宝applink模型准备好计算不确定的线性化。线性模型在参考块处有一个输入rct_ulinearize_uss/Referenceand an output of the plantrct_ulinearize_uss/不确定的植物。这些线性化输入和输出点是使用Simulink控制设计指定的。金宝app使用以下命令找到线性化点:

io = getlinio(mdl);

使用命令计算不确定的线性化ulinearize。This command returns an uncertain state space (USS) object that depends on the uncertain variablesinput_unc,,,,Sensor_pole,,,,andunc_pole

sys_ulinearize =无线化(MDL,IO)
sys_ulinearize = Uncertain continuous-time state-space model with 1 outputs, 1 inputs, 5 states. The model uncertainty consists of the following blocks: input_unc: Uncertain 1x1 LTI, peak gain = 1, 1 occurrences sensor_pole: Uncertain real, nominal = -20, range = [-30,-10], 1 occurrences unc_pole: Uncertain real, nominal = -5, range = [-10,-4], 1 occurrences Type "sys_ulinearize.NominalValue" to see the nominal value, "get(sys_ulinearize)" to see all properties, and "sys_ulinearize.Uncertainty" to interact with the uncertain elements.

这是第一种方法。关闭Simulink金宝app模型:

bdclose(mdl)

Approach #2: Using Built-in Simulink Blocks

第二种方法使用Simulink控制设计用户界面进行块线性化金宝app规范,以指定线性化的不确定性。Simulink控制设计中的块线性化规范功能允许任何Simulink块被增益,LTI对象或可靠的控金宝app制工具箱不确定变量替换。当使用不使用不确定状态空间块的模型时,这种方法最适合。这种方法的主要优点是,不确定性的规范不会影响模拟等模拟中的任何其他操作。金宝app

A modified version of the original model using only built-in Simulink blocks is shown below.

mdl ='rct_ulinearize_builtin';Open_System(MDL);

通过右键单击rct_ulinearize_builtin/Plant块并选择菜单项线性分析 - >指定线性化,您可以指定该块应线性化的值。如果您输入表达式植物*(1+wt*input_unc)在下面显示的对话框中,“植物”块将线性化与相应的不确定状态空间模型(USS对象)。

同样,您可以分配不确定的模型sensoras linearization for the blockrct_ulinearize_builtin/Sensor Gain

You can now linearizerct_ulinearize_builtinusing the Simulink Control Design commandlinearize

io = getlinio(mdl); sys_linearize = linearize(mdl,io)
sys_linearize =不确定的连续时间空间模型,具有1个输出,1个输入,5个状态。模型不确定性由以下块组成:input_unc:不确定1x1 LTI,峰值增益= 1,1出现Sensor_pole:不确定的真实,名称= -20,range = [-30,-10],1个出现unc_pole:不确定真实,象征性,名义= -5,range = [-10,-4],1个出现类型“ sys_linearize.nominalValue”以查看名义值,“ get(sys_linearize)”以查看所有属性,并与“ sys_linearize.unclinety.uncneytity”一起互动,以与不确定元素。

这resulting model is an uncertain state-space (USS) model equivalent to the uncertain linearization computed using the first approach.

Leveraging the Uncertain Linearization Result

Both linearization approaches produce an uncertain state-space (USS) object which can be analyzed with standard Robust Control Toolbox commands. In this example, this USS model is used to find the worst-case gain of the linearized closed-loop response.

[maxg,worstun] = wcgain(sys_linearize);

这resulting worst-case values for the uncertain variables can then be used to compare against the nominal response. This comparison indicates that the PID performance is not robust to the plant and sensor uncertainty.

sys_worst = usubs(sys_linearize,worstun);step(sys_linearize.nominalvalue,sys_worst)传奇(“名义”,,,,'最坏的情况下');

这是一个例子。关闭Simulink金宝app模型:

BDCLOSE(MDL);

也可以看看

Blocks

功能

Related Topics