| Contents | Index |
op_new=setxu(op_point,x,u)
As an alternative to the setxu function, set states and inputs of operating points with the Simulink Control Design GUI.
op_new=setxu(op_point,x,u) sets the states and inputs in the operating point, op_point, with the values in x and u. A new operating point containing these values, op_new, is returned. The variable x can be a vector or a structure with the same format as those returned from a Simulink simulation. The variable u can be a vector. Both x and u can be extracted from another operating point object with the getxu function.
Open the Simulink model F14 by typing f14 at the command line. Select Simulation > Configuration Parameters > Data Import/Export. In the Save to workspace pane, select Final states. In the Save options pane, select Structure from Format. This selection saves the final states of the model to the workspace after a simulation.
Start the simulation. After it has run, a new variable, xFinal, should be in the workspace. This variable is a structure with two properties, time and signals.
Create an operating point object for F14 by typing:
op_point=operpoint('f14')
All states are initially set to 0. Set the states in this object to be the values in xFinal. Set the input to be 9.
newop=setxu(op_point,xFinal,9)
The new operating point is displayed as follows:
Operating Point for the Model f14.
(Time-Varying Components Evaluated at time t=0)
States:
----------
(1.) f14/Actuator Model
x: -0.032
(2.) f14/Aircraft Dynamics Model/Transfer Fcn.1
x: 0.56
(3.) f14/Aircraft Dynamics Model/Transfer Fcn.2
x: 678
(4.) f14/Controller/Alpha-sensor Low-pass Filter
x: 0.392
(5.) f14/Controller/Pitch Rate Lead Filter
x: 0.133
(6.) f14/Controller/Proportional plus integral compensator
x: 0.166
(7.) f14/Controller/Stick Prefilter
x: 0.1
(8.) f14/Dryden Wind Gust Models/Q-gust model
x: 0.114
(9.) f14/Dryden Wind Gust Models/W-gust model
x: 0.46
x: -2.05
Inputs:
-----------
(1.) f14/u
u: 9
getxu | initopspec | operpoint | operspec

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 |