Main Content

Passive Control of Water Tank Level

In this example, you learn how to use控制系统调谐器应用程序设计用于模拟Simulink®的非线性植物的控制器。金宝app您完成以下任务:

  • Configure the model and app for compensator tuning

  • 使用基于消极的设计调整一阶补偿器

  • 模拟闭环非线性响应。

Simulink Model of the Control System

watertank_comp_design模型,如下图所示,建模了一个反馈回路,用于调节水箱中的水位。控制器块包含要调整的一阶补偿器。

mdl ='cst_watertank_comp_design'; open_system(mdl)

水箱子系统对水坦克动力学进行了建模。水从顶部以与泵的电压V的比例成正比进入水箱。水通过储罐底座的开口离开,其速度与水箱中水高的平方根成正比。水流量中平方根的存在使植物非线性。

水流的非线性模型是

$$ a \ dot {x}〜= 〜bu -a \ sqrt {x} $$

$$ y〜 = 〜x $$

在哪里

  • $ x = h $表示水箱中的水高

  • $u$表示施加到泵的电压

  • $ a $表示坦克的横截面区域

  • $ a $and$ b $are constants related to the flow rate into and out of the tank

该系统是被动的,具有存储功能$ v(x)= \ frac {a} {2b} x^2 $since

$$ \ dot {v}(x) -  uy〜 = 〜- \ frac {a} {b} x \ sqrt {x}〜\ leq 〜0 $$

基于消极的控制

根据消极定理,两个严格的被动系统的负面反馈互连$H_1$and$H_2$总是稳定。

由于水箱系统是被动的,因此要求控制器严格被动以确保闭环稳定性,即使植物模型不准确。

Compensator Tuning Using Control System Tuner

您可以使用控制系统调谐器应用程序调整控制器块。

步骤1:打开控制系统调谐器应用程序。在Simuli金宝appnk模型窗口中应用tab, in the应用画廊,单击控制系统调谐器

步骤2:从选择块按钮调整tab

步骤3:选择控制器块,然后单击“确定”。现在,此块出现在调谐块列表中。

步骤4:指定调整目标。在这里,有两个主要目标:

  1. 跟踪步骤变化水位

  2. 使控制器被动

Click theNew Goal下拉列表,首先添加Passivity目标。

Configure this goal to apply to the Controller block only. This is done by setting the input signal to be the "Desired Water Level", the output signal to be the output of the Controller block, and the loop opening to be at the Controller block output. Also specify minimum passivity indices of 0.01 at the inputs and outputs to enforce strict passivity.

接下来,添加一个Reference Trackinggoal from theNew Goal下拉列表。在1秒的响应时间内配置此目标。

Finally, click on the管理目标按钮关闭调整标签并将被动目标标记为严格的调整约束。

步骤5:您准备好调整控制器块。单击“调音”按钮。您可以通过选择并排查看调整结果Left/Rightin the看法标签。

您可以通过生成一个复制此调整过程的MATLAB脚本来进一步分析这些结果。

闭环模拟

You can view the Bode plot of the tuned controller. Click on theNew Plot按钮关闭控制系统标签。Select新bode从下拉列表中。

控制器响应可以指定如下。

Click on the阴谋button. The bode plot is shown in the following figure.

您还可以使用调谐控制器模拟闭环非线性响应。首先,通过单击更新控制器块更新块in the控制系统标签。

In the Simulink model, double click the Scope block to open the Scope window, then simulate the model.

调谐控制系统的非线性响应出现在范围窗口中。该模拟表明跟踪性能是令人满意的。

也可以看看

Related Topics