findconstr - Find constraints on given response

Syntax

constraints=findconstr(proj,'blockname')

Description

constraints=findconstr(proj,'blockname') returns a constraint object for the Signal Constraint block, blockname, within the response optimization project, proj. This object contains all the data defining the desired response, including the positions of the constraint bound segments as well as the reference signals. The constraints are used in a response optimization project to define the region in which the response signal must lie.

Modify the constraint object properties UpperBoundX, UpperBoundY, LowerBoundX, and LowerBoundY to specify new constraint bound segments on the signals. These properties define the x and y values for the beginning and ending points of each constraint segment.

Modify the constraint object properties ReferenceX and ReferenceY to specify a new reference signal to track. These properties contain the vectors of x and y data defining the reference signal.

Example

Open the model srotut1 by typing

srotut1

Create a response optimization project.

proj=newsro('srotut1','Kint');

Find the constraints object for this project.

constraint=findconstr(proj,'srotut1/Signal Constraint')

This returns

        ConstrEnable: 'on'
          isFeasible: 1
          CostEnable: 'off'
              Enable: 'on'
                Name: 'Signal Constraint'
          SignalSize: [1 1]
         LowerBoundX: [3x2 double]
         LowerBoundY: [3x2 double]
    LowerBoundWeight: [3x1 double]
         UpperBoundX: [2x2 double]
         UpperBoundY: [2x2 double]
    UpperBoundWeight: [2x1 double]
          ReferenceX: []
          ReferenceY: []
     ReferenceWeight: []

Signal Constraint.

Change the positioning of the constraint bounds by editing the upper and lower bound matrices.

constraint.UpperBoundY=[1.1 1.1;1.01 1.01];
constraint.LowerBoundY=[0 0;0.9 0.9;0.99 0.99];
constraint.UpperBoundX=[0 30;30 50];
constraint.LowerBoundX=[0 15;15 30;30 50];

These bounds define the constraints given in the following figure.

Include a reference signal with the following commands:

constraint.ReferenceX=linspace(0,50,1000);
constraint.ReferenceY=1-exp(-linspace(0,50,1000));

This defines the reference signal shown in the following figure.

See Also

getsro, newsro, optimize

  


 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS