| Contents | Index |
opnew=addoutputspec(op,'block',portnumber)
As an alternative to the addoutputspec function, add output specifications with the Simulink Control Design GUI. See Steady-State Operating Point to Meet Output Specification.
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.
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 Specification for the Model magball.
(Time-Varying Components Evaluated at time t=0)
States:
----------
(1.) magball/Controller/PID Controller/Filter
spec: dx = 0, initial guess: 0
(2.) magball/Controller/PID Controller/Integrator
spec: dx = 0, initial guess: 14
(3.) magball/Magnetic Ball Plant/Current
spec: dx = 0, initial guess: 7
(4.) magball/Magnetic Ball Plant/dhdt
spec: dx = 0, initial guess: 0
(5.) 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 Specification for the Model magball.
(Time-Varying Components Evaluated at time t=0)
States:
----------
(1.) magball/Controller/PID Controller/Filter
spec: dx = 0, initial guess: 0
(2.) magball/Controller/PID Controller/Integrator
spec: dx = 0, initial guess: 14
(3.) magball/Magnetic Ball Plant/Current
spec: dx = 0, initial guess: 7
(4.) magball/Magnetic Ball Plant/dhdt
spec: dx = 0, initial guess: 0
(5.) magball/Magnetic Ball Plant/height
spec: dx = 0, initial guess: 0.05
Inputs: None
----------
Outputs:
----------
(1.) magball/Controller
spec: noneEdit 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 Specification for the Model magball.
(Time-Varying Components Evaluated at time t=0)
States:
----------
(1.) magball/Controller/PID Controller/Filter
spec: dx = 0, initial guess: 0
(2.) magball/Controller/PID Controller/Integrator
spec: dx = 0, initial guess: 14
(3.) magball/Magnetic Ball Plant/Current
spec: dx = 0, initial guess: 7
(4.) magball/Magnetic Ball Plant/dhdt
spec: dx = 0, initial guess: 0
(5.) magball/Magnetic Ball Plant/height
spec: dx = 0, initial guess: 0.05
Inputs: None
----------
Outputs:
----------
(1.) magball/Controller
spec: y = 0

Learn more about resources for designing, testing, and implementing control systems.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |