Products & Services Solutions Academia Support User Community Company

Learn more about Simulink Control Design   

addoutputspec - Add output specification to operating point specification

Syntax

opnew=addoutputspec(op,'block',portnumber)

Graphical Interface

As an alternative to the addoutputspec function, add output specifications with the Simulink Control Design GUI. See Constraining Outputs.

Description

opnew=addoutputspec(op,'block',portnumber) adds an output specification for a Simulink model to an existing operating point specification, op, created with operspec. The signal being constrained by the output specification is indicated by the name of the block, 'block', and the port number, portnumber, that it originates from.

You can edit the output specification within the new operating point specification object, opnew, to include the actual constraints or specifications for the signal. Use the new operating point specification object with the function findop to find operating points for the model.

This function automatically compiles the Simulink model, given in the property Model of op, to find the block's output portwidth.

Example

Create an operating point specification for the model magball.

op=operspec('magball')

This specification returns the object op. Note that there are no outports in this model and no outputs in the object op.

 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

To add an output specification to the signal between the Controller block and the Magnetic Ball Plant block, use the function addoutputspec.

newop=addoutputspec(op,'magball/Controller',1)

This function adds the output specification is added to the operating point specification object.

 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: 
-----------
(1.) magball/Controller
      spec:  none

Edit the output specification to constrain this signal to be 14.

newop.Outputs(1).Known=1, newop.Outputs(1).y=14

The final output specification is displayed.

 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: 
-----------
(1.) magball/Controller
      spec:  y = 14           

See Also

findop, operspec, operpoint

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

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