operspec - Create operating point specifications for Simulink model

Syntax

op_spec = operspec('sys')

Graphical Alternative

As an alternative to the operspec function, create operating point specifications in the Operating Points node of the Simulink Control Design GUI. See Creating Operating Points from Specifications in the Simulink Control Design getting started documentation.

Description

op_spec = operspec('sys') returns an operating point specification object, op, for a Simulink model, sys. Edit the default operating point specifications directly or use get and set. Use the operating point specifications object with the function findop to find operating points based on the specifications. Use these operating points with the function linearize to create linearized models.

The operating point specification object properties are:

Use the set function to edit the properties of this object before running findop.

Model

Model is the name of the Simulink model with which this operating point specification object is associated.

States

States describes the operating point specifications for states in the Simulink model. The States property is a vector of state objects that each contain specifications for particular states. There is one state specification object per block that has a state in the model. The States object has the following properties:

Block

Block with which the states are associated.

x

Vector containing values of states in the block. Set the corresponding value of Known to 1 for values that are known operating point values. Set the corresponding value of Known to 0 for values that are initial guesses for the operating point values. The default value of x is the initial condition value for the state.

Nx

Number of states in the block. This property is read-only.

Ts

Vector containing the sample time and offset for the state.

SampleType

Set this value to CSTATE, for a continuous state, or DSTATE, for a discrete state.

inReferencedModel

Set this value to 1, when the state is inside a referenced model, or 0, when it is not

Known

Vector of values set to 1, for states whose operating points are known exactly, and set to 0, for states whose operating points are not known exactly. Set the operating point values in the x property.

SteadyState

Vector of values set to 1, for states whose operating points should be at equilibrium, and set to 0 for states whose operating points are not at equilibrium. The default value is 1.

Min

Vector containing the minimum values of the corresponding state's operating point.

Max

Vector containing the maximum values of the corresponding state's operating point.

Description

Text string describing the block.

Inputs

Inputs is a vector of input specification objects that contains specifications for the input levels at the operating point. There is one input specification object per root-level inport block in the Simulink model. The Inputs object has the following properties:

Block

The inport block with which the input vector is associated.

PortWidth

Width of the corresponding inport.

u

Vector containing values of inputs. Set the corresponding value of Known to 1, for values that are known operating point values. Set the corresponding value of Known to 0, for values that are initial guesses for the operating point values.

Known

Vector of values set to 1, for inputs whose operating points are known exactly, and set to 0, for inputs whose operating points are not known exactly. Set the operating point values in the u property.

Min

Vector containing the minimum values of the corresponding input's operating point.

Max

Vector containing the maximum values of the corresponding input's operating point.

Description

Text string describing the input.

Time

Time specifies the time at which any time-varying functions in the model are evaluated.

Outputs

Outputs is a vector of output specification objects that contains the specifications for the output levels at the operating point. There is one output specification object per root-level outport block in the Simulink model. To constrain additional outputs, use the addoutputspec function to add an another output specification to the operating point specification object. The Outputs object has the following properties:

Block

Outport block with which the output vector is associated.

PortWidth

Width of the corresponding outport.

PortNumber

Port number with which the output is associated.

y

Vector containing values of outputs. Set the corresponding value of Known to 1, for values that are known operating point values. Set the corresponding value of Known to 0 for values that are initial guesses for the operating point values.

Known

Vector of values set to 1, for outputs whose operating points are known exactly, and set to 0, for outputs whose operating points are not known exactly. Set the operating point values in the y property.

Min

Vector containing the minimum values of the corresponding output's operating point.

Max

Vector containing the maximum values of the corresponding output's operating point.

Description

Text string describing the output.

Example

To create an operating point specification object for the Simulink model magball, type:

op_spec = operspec('magball')

which returns the following:

 Operating Specificaton for the Model magball.
(Time-Varying Components Evaluated at time t=0)

States: 
----------
(1.) magball/Controller/Controller
      spec:  dx = 0,  initial guess:             0
      spec:  dx = 0,  initial guess:             0
(2.) magball/Magnetic Ball Plant/Current
      spec:  dx = 0,  initial guess:             7
(3.) magball/Magnetic Ball Plant/dhdt
      spec:  dx = 0,  initial guess:             0
(4.) magball/Magnetic Ball Plant/height
      spec:  dx = 0,  initial guess:          0.05
 
Inputs: None
 
Outputs: None

The following is displayed:

In this example, there are four blocks that contain states in the model and four entries in the States object. The first entry contains two states. By default, MATLAB software sets the SteadyState property to 1 and the upper and lower bounds on the operating points to Inf and -Inf respectively. MATLAB also displays the Inputs and Outputs, although there are not any in this model. To view the properties of op in more detail, use the get function.

See Also

addoutputspec, findop, get, operspec, linearize, set , update

  


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