Skip to Main Content Skip to Search
Product Documentation

initopspec - Initialize operating point specification values

Syntax

opnew=initopspec(opspec,oppoint)
opnew=initopspec(opspec,x,u)
opnew=initopspec(opspec,xstruct,u)

Alternatives

As an alternative to the initopspec function, initialize operating point specification values in the Create Operating Points pane in the Operating Points node within the Simulink Control Design GUI. See Steady-State Operating Points (Trimming) from Specifications.

Description

opnew=initopspec(opspec,oppoint) initializes the operating point specification object, opspec, with the values contained in the operating point object, oppoint. The function returns a new operating point specification object, opnew. Create opspec with the function operspec. Create oppoint with the function operpoint or findop.

opnew=initopspec(opspec,x,u) initializes the operating point specification object, opspec, with the values contained in the state vector, x, and the input vector, u. The function returns a new operating point specification object, opnew. Create opspec with the function operspec. You can use the function getxu to create x and u with the correct ordering.

opnew=initopspec(opspec,xstruct,u) initializes the operating point specification object, opspec, with the values contained in the state structure, xstruct, and the input vector, u. The function returns a new operating point specification object, opnew. Create opspec with the function operspec. You can use the function getstatestruct or getxu to create xstruct and the function getxu to create u with the correct ordering. Alternatively, you can save xstruct to the MATLAB workspace after a simulation of the model. See the Simulink documentation for more information on these structures.

Examples

Create an operating point using findop by simulating the magball model and extracting the operating point after 20 time units.

oppoint=findop('magball',20)

This syntax returns the following operating point:

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

States: 
----------
(1.) magball/Controller/PID Controller/Filter
      x: 2.33e-007    
(2.) magball/Controller/PID Controller/Integrator
      x: 14           
(3.) magball/Magnetic Ball Plant/Current
      x: 7            
(4.) magball/Magnetic Ball Plant/dhdt
      x: 3.6e-008     
(5.) magball/Magnetic Ball Plant/height
      x: 0.05         
 
Inputs: None 
----------

Use these operating point values as initial values in an operating point specification object.

opspec=operspec('magball');
newopspec=initopspec(opspec,oppoint)

The new operating point specification object 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:     2.33e-007
(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:      3.6e-008
(5.) magball/Magnetic Ball Plant/height
      spec:  dx = 0,  initial guess:          0.05
 
Inputs: None 
----------
 
Outputs: None 
----------

You can now use this object to find operating points by optimization.

See Also

findop | getstatestruct | getxu | operpoint | operspec

  


Free Control Systems Interactive Kit

Learn more about resources for designing, testing, and implementing control systems.

Get free kit

Trials Available

Try the latest control systems products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS