Main Content

优化LTI系统以满足频域要求

This example shows how to use frequency-domain design requirements to optimize the response of an LTI system in theControl System Designer应用程序。

与Control System Toolbox™软件一起使用时,您可以放置金宝app®设计优化™设计要求或对图中的限制Control System Designer(Control System Toolbox)应用程序。You can include design requirements for response optimization in the frequency-domain and time-domain.

You can specify frequency-domain design requirements to optimize response signals for any model that you design in theControl System Designerapp, such as:

  • 使用控制系统工具箱命令创建的命令行LTI模型

  • 金宝app使用使用线性化的Simulink模型Simulink Control Design™software

Design Requirements

在此示例中,您使用Simulink模型的线性化版本,金宝appSrotut1

You use optimization methods to design a compensator so that the closed-loop system meets the following design specifications when you excite the system with a unit step input:

  • Maximum 30-second settling time

  • Maximum 10% overshoot

  • 最大10秒上升时间

  • 执行器信号的限制±0.7

Create an LTI Plant Model

在里面Srotut1model, the plant model is composed of a gain, a limited integrator, a transfer function, and a transport delay block.

设计线性化的开环传输功能的补偿器Srotut1模型。线性化Srotut1植物模型由增益,无限积分器,传输函数以及传输延迟的铺面近似组成。

创建一个n open-loop transfer function based on the linearizedSrotut1model, enter the following commands.

w0 = 1; zeta = 1; Kint = 0.5; Tdelay = 1; [delayNum,delayDen] = pade(Tdelay,1); integrator = tf(Kint,[1 0]); transfer_fcn = tf(w0^2,[1 2*w0*zeta w0^2]); delay_block = tf(delayNum,delayDen); open_loopTF = integrator*transfer_fcn*delay_block;

如果植物模​​型是一系列模型(Control System Toolbox),控制器仅针对名义模型而设计。您还可以分析阵列中其余模型的控制设计。有关更多信息,请参阅Multimodel Control Design(Control System Toolbox)

小费

您可以使用金宝appSimulink Control Design软件。

打开控制系统设计器应用程序

This example uses a root locus diagram to design the response of the open-loop transfer function,open_looptf。创建一个Control System Designer带有root locus图的应用程序会话用于开环传输功能,请使用以下命令:

ControlSystemDesigner('rlocus',open_looptf)

Control System Designerapp opens, and aRoot Locus Editoris displayed. The app lets you design controllers for single-input, single-output (SISO) systems in MATLAB®and Simulink. For more information, see the古典控制设计(Control System Toolbox)category.

这app also displays the step response plot of the system. The plot shows the response of the closed-loop system fromr(input to the prefilter,F) toy(output of the plant model,G).

To choose the architecture for the control system you are designing, in the app clickEdit Architecture。This example uses the default architecture. In this system, the plant model,G,是开环函数open_looptf。这prefilter,F和传感器,H,设置为1和补偿器,C,是使用响应优化方法设计的补偿器。

Open Optimization Based Tuning Method

有几种可能的方法来设计一个SISO system; this example uses an automated approach that uses response optimization methods.

创建一个response optimization task, in theTuning Methods下拉列表,选择Optimization Based Tuning

这Response Optimization window has four tabs. Except for the first tab, each tab corresponds to a step in the response optimization process:

  • Overview— Schematic diagram of the response optimization process.

  • Compensators— Select and configure the compensator elements that you want to tune. See选择可调补偿器元素

  • Design requirements— Select the design requirements that you want the system to meet after tuning the compensator elements. SeeAdd Design Requirements

  • Optimization— Configure optimization options, and view the progress of the response optimization. SeeOptimize the System Response

笔记

当优化应用程序中的响应时,您不能为参数或补偿器元素添加不确定性。

选择可调补偿器元素

You can tune compensator elements or parameters within compensators in your system to meet the design requirements you specify.

To specify the compensator elements to tune:

  1. 在响应优化窗口中,选择Compensatorstab.

  2. 在里面Compensatorstab, select the check boxes in theOptimizecolumn that correspond to the compensator elements to tune.

    In this example, selectGain在补偿器中C

Add Design Requirements

您可以同时使用频域和时间域的设计要求来调整控制系统中的参数。

This example uses the design specifications described inDesign Requirements。Create design requirements to meet these specifications:

After you add the design requirements, you can select a subset of requirements for controller design, as described in选择在响应优化期间使用的设计要求。在里面Design requirementstab of the Response Optimization window, you can create design requirements and select the requirements you want to use for optimization.

Settling Time Design Requirement

第一个设计要求是安装时间为30秒或更短。该规范可以在根座图上表示,作为对开环系统杆的真实部分的约束。

To add the settling time design requirement:

  1. 在里面Design requirements选项卡,单击Add new design requirement。A New Design Requirement dialog box opens.

    In this dialog box, you can specify new design requirements, and add them to a new or existing plot.

  2. Add a design requirement to the existing root locus diagram.

    1. 在里面Design requirement type下拉列表,选择Settling time

    2. 在里面响应的要求下拉列表,选择looptransfer_c

    3. 指定Settling time作为30seconds.

    4. 点击OK

    定居时间设计要求在Design Requirements响应优化窗口的选项卡。

    在应用程序中,设计需求以垂直线形式出现在根源基因座图上。

超冲设计要求

第二个设计要求是使百分比超过10%或更少。该要求与根部图图上的阻尼比有关。除了添加设计要求Add new design requirement按钮,您还可以直接在图上右键单击以添加要求。

To add this design requirement:

  1. 在里面Control System Designerapp, right-click within the white space of the root-locus diagram. SelectDesign Requirements>New打开新的设计要求对话框。

  2. 在里面Design requirement type下拉列表,选择Percent overshoot

  3. 指定Percent overshoot作为10

  4. 点击OK

在里面app, the design requirement appears on the root-locus plot as two lines radiating at an angle from the origin.

上升时间设计要求

这third design requirement is to have a rise time of 10 seconds or less. This requirement corresponds to a lower limit on a Bode Magnitude diagram.

To add this design requirement:

  1. 在里面app, in theTuning Methods下拉列表,选择Bode Editor

  2. 在里面选择编辑响应dialog box, specify选择编辑响应作为looptransfer_c,然后单击Plot

    Bode图显示在Bode Editor

  3. Right-click within the white space of the open-loop Bode plot, and selectDesign Requirements>New, to open the New Design Requirement dialog box.

  4. 指定代表国际扶轮的设计要求se time, and add it to the new Bode plot.

    1. 在里面Design requirement type下拉列表,选择Lower gain limit

    2. 指定the频率range as1e-20.17

    3. 指定theMagnituderange as00

    4. 点击OK

    这design requirement appears on the plot as a horizontal line.

执行器极限设计要求

第四个设计要求是将执行器信号限制在±0.7之内。

To add this design requirement:

  1. 在响应优化窗口中Design requirements, clickAdd new design requirement。A New Design Requirement dialog box opens.

  2. Create a time-domain design requirement to represent the upper limit on the actuator signal, and add it to a new step response plot:

    1. 在里面Design requirement type下拉列表,选择步长响应上幅度极限

    2. 在里面响应的要求下拉列表,选择IOTransfer_r2u

    3. 指定theTimerange as010

    4. 指定theAmplituderange as0。70。7

    5. 点击OK。闭环响应的第二步响应图ris generated in the app. The plot contains a horizontal line representing the upper limit on the actuator signal.

    6. 始终扩展此限制(到t=∞),在黄色阴影区域中右键单击,然后选择Extend to inf

为执行器信号的下限添加相应的设计要求:

  1. 在响应优化窗口中Design requirements, clickAdd new design requirement。A New Design Requirement dialog box opens.

  2. Create a time-domain design requirement to represent the lower limit on the actuator signal, and add it to the step response plot:

    1. 在里面Design requirement type下拉列表,选择步骤响应较低振幅极限

    2. 在里面响应的要求下拉列表,选择IOTransfer_r2u

    3. 指定theTimerange as010

    4. 指定theAmplituderange as-0.7-0.7

    5. 点击OK。这step response plot now contains a second horizontal line representing the lower limit on the actuator signal.

    6. 始终扩展此限制(到t=∞),在设计要求的黄色阴影区域中右键单击,然后选择Extend to inf

选择在响应优化期间使用的设计要求

这table in theDesign requirementstab lists all the specified design requirements. Select the design requirements you want to use in the response optimization. This example uses all the current design requirements.

Optimize the System Response

选择补偿器元素以调整并添加设计要求后,您可以优化系统响应。

To optimize the response of the system, in theOptimizationtab of the Response Optimization window, clickStart Optimization

Optimization选项卡显示优化的进度。

这status message indicates that the optimization solver found a solution that meets the design requirements within the tolerances. Verify that the design requirements are satisfied.

Create and Display the Closed-Loop System

设计补偿器后,您可以将其导出到MATLAB工作区,并创建完整闭环系统的模型。导出调用补偿器:

  1. 在里面app, selectExport

  2. 在里面Export Model dialog box, selectC,您设计的补偿器,然后单击Export

At the command line, enter the following command to create the closed-loop system,Cl,从开环传输函数中,open_looptf和补偿器,C

Cl= feedback(C*open_loopTF,1)

这following model is returned:

Cl= -0.19414 (s-2) ---------------------------------------------- (s^2 + 0.409s + 0.1136) (s^2 + 3.591s + 3.418) Continuous-time zero/pole/gain model.

创建一个step response plot of the closed-loop system, enter the following command.

step(CL);

Related Topics