主要内容

在单循环控制器设计上执行时间和频率要求

This example shows how to use Simulink® Design Optimization™ to tune a compensator in a Simulink model. You will add performance requirements to further refine and optimize an initial compensator design performed with Simulink® Control Design™ (seeSingle Loop Feedback/Prefilter Compensator Design(Simulink Control Design))。

Using Simulink Design Optimization software you can graphically specify design and performance requirements for your system by positioning bounds on response plots such as Bode, Nichols, Pole/Zero, Step, or Impulse. Then, using optimization-based methods you can automatically tune compensator elements to satisfy the design requirements. Compensator elements that are tunable via optimization-based tuning include gains, poles, and zeros.

此示例需要Simulink®ControlD金宝appesign™。

打开模型

Open the model using the command below, and double click on the orange block to launch the控制系统设计师应用程序。

open_system('speedctrl_demo')

Design Overview

此示例设计一个单个反馈循环,用于发动机的速度控制。使用Simulink控制设计创建了初步的PI控制器设计(请参阅金宝appSingle Loop Feedback/Prefilter Compensator Design(Simulink Control Design)) and is used as a starting point to further refine the design using response optimization. This example will tune the controller to satisfy the following time-domain and frequency-domain performance specifications:

要求1.较低的幅度限制为-0.1的步骤响应输出和3秒的上升时间达到设定点值的95%。

要求2.对单位步长响应的最大超冲压为1%Speed Referenceto速度输出.

要求3.在1E-4至1 rad/sec的频率范围内,最小环路增益为10dB,以确保在此频率范围内进行良好的输出干扰排斥和参考跟踪。

要求4.在10到1e4 rad/sec的频率范围内,最大环路增益为-10dB,以确保足够的高频噪声排斥,并与低频要求一起确保循环带宽在1到10 rad/sec之间。

启动Simulink金宝app设计优化

Both time- and frequency-domain response optimization are integrated into the Control System Designer app. In theControl System标签,在调整方法drop-down list, select基于优化的调整.

配置优化

这first step in configuring an optimization is to select the compensator elements to tune. For this example select the获得Real Zeroof the PID controller; the reference filter is not tuned.

添加设计要求

这next step is to create the design requirements that the optimization should satisfy. Design requirements are visualized on system response plots. You can add response plots by using the图形调整或者新情节在“控制系统设计器”应用程序中下拉列表。这从控制系统设计师开始(控制系统工具箱)示例显示了如何使用控制系统设计器。

这re are two ways to add requirements; you can add them using theAdd new design requirementbutton on the设计要求tab in theResponse Optimizationwindow or by right clicking on a response plot and selecting设计要求 - >新.

To add要求1to limit the lower amplitude of the output resulting from a step input,

1.右键单击较低的步骤响应图,然后选择设计要求 - >新.

2.Specify the lower limit as -0.1 over the time range 0 to 5 seconds.

如下图所示,这会在步骤响应图上创建较低的振幅限制。

为了将上升时间要求添加到步骤响应中,您可以以图形方式操纵步骤响应图上的较低振幅要求。

1.右键单击较低的幅度限制要求,然后选择Split将一个细分市场分成两部分。

2.右键单击要求的第二部分,然后选择扩展到inf将其扩展到无穷大。

3.右键单击第二部分的要求,选择Edit,并将值设置为代表3秒钟的95%上升时间。

Alternatively you can left click the second segment of the requirement and drag it into position.

Next add要求2for maximum overshoot to the step response plot. The time-domain constraints on the step response plot are shown in the next figure.

这plot shows the lower amplitude limit of -0.1, maximum overshoot and 95% of the unit step response value of 1.01 and 0.95 respectively.

To add要求3为了最小循环增益,

1.ClickAdd new design requirement在里面设计要求tab of theResponse Optimizationwindow.

2.在频率范围1E-4至1 rad/sec的频率范围内指定开放环的Bode幅度下限为10dB。

This creates the minimum loop gain constraint on the Bode magnitude plot as shown in the next figure.

Add要求4for the maximum loop gain to the Bode magnitude plot to satisfy the overall design specifications. The Bode magnitude plot shows the minimum and maximum loop gain over the specified frequency range.

Select the design requirements for optimization from the设计要求标签。After you have selected the requirements, the设计要求table appears as shown next:

Running an Optimization

After defining the design requirements and selecting the compensator elements to tune, the optimization is ready to run. Select the优化选项卡并单击开始优化button. During optimization the response plots update and numerical progress data is displayed in the优化标签。

检查和验证最终设计

您可以通过查看优化的响应(如下所示)来检查优化设计如何满足指定的设计要求。

To verify the compensator design on the full non-linear Simulink model, return to the控制系统设计师然后单击更新simul金宝appink块参数按钮将补偿器写回Simulink模型。金宝app现在,您可以使用新设计的补偿器模拟Simulink金宝app模型。

bdclose('speedctrl_demo')

Related Examples

More About