optimize lti system to meet frequency-凯发k8网页登录

main content

optimize lti system to meet frequency-domain requirements

this example shows how to use frequency-domain design requirements to optimize the response of an lti system in the control system designer app.

when used with control system toolbox™ software, you can place simulink® design optimization™ design requirements or constraints on plots in the (control system toolbox) app. 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 the control system designer app, such as:

  • command-line lti models created with the control system toolbox commands

  • simulink models that have been linearized using simulink control design™ software

design requirements

in this example, you use a linearized version of a simulink model.

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

  • maximum 10-second rise time

  • limit of ±0.7 on the actuator signal

create an lti plant model

in the simulink model, the plant model is composed of a gain, a limited integrator, a transfer function, and a transport delay block.

design the compensator for the open-loop transfer function of the linearized model. the linearized plant model is composed of the gain, an unlimited integrator, the transfer function, and a padé approximation to the transport delay.

to create an open-loop transfer function based on the linearized model, 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;

if the plant model is (control system toolbox), the controller is designed for a nominal model only. you can also analyze the control design for the remaining models in the array. for more information, see multimodel control design (control system toolbox).

tip

you can directly linearize the simulink model using simulink control design software.

open the control system designer app

this example uses a root locus diagram to design the response of the open-loop transfer function, open_looptf. to create a control system designer app session with a root locus plot for the open-loop transfer function, use the following command:

controlsystemdesigner('rlocus',open_looptf)

the control system designer app opens, and a root locus editor is 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.

the app also displays the step response plot of the system. the plot shows the response of the closed-loop system from r (input to the prefilter, f) to y (output of the plant model, g).

to choose the architecture for the control system you are designing, in the app click edit architecture. this example uses the default architecture. in this system, the plant model, g, is the open-loop transfer function open_looptf. the prefilter, f, and the sensor, h, are set to 1, and the compensator, c, is the compensator that is designed using response optimization methods.

open optimization based tuning method

there are several possible methods for designing a siso system; this example uses an automated approach that uses response optimization methods.

to create a response optimization task, in the tuning methods drop-down list, select optimization based tuning.

the 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 select tunable compensator elements.

  • design requirements — select the design requirements that you want the system to meet after tuning the compensator elements. see add design requirements.

  • optimization — configure optimization options, and view the progress of the response optimization. see optimize the system response.

note

when optimizing responses in the app, you cannot add uncertainty to parameters or compensator elements.

select tunable compensator elements

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. in the response optimization window, select the compensators tab.

  2. in the compensators tab, select the check boxes in the optimize column that correspond to the compensator elements to tune.

    in this example, select gain in the compensator c.

add design requirements

you can use both frequency-domain and time-domain design requirements to tune parameters in a control system.

this example uses the design specifications described in design 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 select the design requirements to use during response optimization. in the design requirements tab of the response optimization window, you can create design requirements and select the requirements you want to use for optimization.

settling time design requirement

the first design requirement is to have a settling time of 30 seconds or less. this specification can be represented on a root locus diagram as a constraint on the real parts of the poles of the open-loop system.

to add the settling time design requirement:

  1. in the design requirements tab, click 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. in the design requirement type drop-down list, select settling time.

    2. in the requirement for response drop-down list, select looptransfer_c.

    3. specify settling time as 30 seconds.

    4. click ok.

    the settling time design requirement is listed in the design requirements tab of the response optimization window.

    in the app, the design requirement appears on the root locus plot as a vertical line.

overshoot design requirement

the second design requirement is to have a percentage overshoot of 10% or less. this requirement is related to the damping ratio on a root locus diagram. in addition to adding a design requirement with the add new design requirement button, you can also right-click directly on the plots to add the requirement.

to add this design requirement:

  1. in the control system designer app, right-click within the white space of the root-locus diagram. select design requirements > new to open the new design requirement dialog box.

  2. in the design requirement type drop-down list, select percent overshoot.

  3. specify percent overshoot as 10.

  4. click ok.

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

rise time design requirement

the 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. in the app, in the tuning methods drop-down list, select bode editor.

  2. in the select response to plot dialog box, specify select response to edit as looptransfer_c, and click plot.

    a bode plot is displayed in a bode editor.

  3. right-click within the white space of the open-loop bode plot, and select design requirements > new, to open the new design requirement dialog box.

  4. specify the design requirement to represent the rise time, and add it to the new bode plot.

    1. in the design requirement type drop-down list, select lower gain limit.

    2. specify the frequency range as 1e-2 to 0.17.

    3. specify the magnitude range as 0 to 0.

    4. click ok.

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

actuator limit design requirement

the fourth design requirement is to limit the actuator signal to within ±0.7.

to add this design requirement:

  1. in the response optimization window, in the design requirements, click add 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. in the design requirement type drop-down list, select step response upper amplitude limit.

    2. in the requirement for response drop-down list, select iotransfer_r2u.

    3. specify the time range as 0 to 10.

    4. specify the amplitude range as 0.7 to 0.7.

    5. click ok. a second step response plot for the closed-loop response from r to u is generated in the app. the plot contains a horizontal line representing the upper limit on the actuator signal.

    6. to extend this limit for all times (to t = ∞), right-click in the yellow shaded area, and select extend to inf.

to add the corresponding design requirement for the lower limit on the actuator signal:

  1. in the response optimization window, in the design requirements, click add 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. in the design requirement type drop-down list, select step response lower amplitude limit.

    2. in the requirement for response drop-down list, select iotransfer_r2u.

    3. specify the time range as 0 to 10.

    4. specify the amplitude range as -0.7 to -0.7.

    5. click ok. the step response plot now contains a second horizontal line representing the lower limit on the actuator signal.

    6. to extend this limit for all times (to t = ∞), right-click in the yellow shaded area of the design requirement, and select extend to inf.

select the design requirements to use during response optimization

the table in the design requirements tab 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

after you select the compensator elements to tune and add design requirements, you can optimize the system response.

to optimize the response of the system, in the optimization tab of the response optimization window, click start optimization.

the optimization tab displays the progress of the optimization.

the 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

after designing a compensator, you can export it to the matlab workspace and create a model of the full closed-loop system. to export the tuned compensator:

  1. in the app, select export.

  2. in the export model dialog box, select c, the compensator you designed, and click export.

at the command line, enter the following command to create the closed-loop system, cl, from the open-loop transfer function, open_looptf, and the compensator, c:

cl = feedback(c*open_looptf,1)

the 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.

to create a step response plot of the closed-loop system, enter the following command.

step(cl);

related topics

    网站地图