You can linearize a subsystem using the SIM Linearize VI. By default, this VI includes all subsystem states, inputs, and outputs in the linear time-invariant (LTI) model. You can exclude inputs and outputs from the LTI model using the SIM Query Subsystem VI and the SIM Set Parameter Value VI. You also use these VIs to change the value of an input or state.
First, wire a path or reference to a subsystem to the Path input of the SIM Query Subsystem VI. This VI returns the States, Inputs, and Outputs of the subsystem. Second, wire the States, Inputs, or Outputs parameter to the Parameters In input of the SIM Set Parameter Value VI. You must use one SIM Set Parameter Value VI for each parameter on which you want to operate. Use the this VI to change the LTI model in the following ways:
|Note The default Parameter Type of each state, input, and output is Variable.|
Finally, wire the modified States, Inputs, or Outputs parameter to the appropriate input of the SIM Linearize VI. You also must wire a path or reference to the subsystem to this VI. The resulting State-Space Model includes all the subsystem states and any inputs and outputs you set to Variable. The State-Space Model does not include any inputs and outputs you set to Static.
For example, consider a subsystem that is a nonlinear model of a car, car.vi. If you want to approximate the behavior of this model when the engine speed of the car is 50 miles per hour, linearize the model using a value of 50 mph for the engine speed parameter. Also consider any parameters you want exclude from the LTI model. For example, you generally do not need to account for gravitational acceleration in an LTI model because gravitational acceleration is a constant. The following block diagram linearizes a car model using these specifications.
The example in the previous block diagram executes the following steps:
|Note You can specify the subsystem to linearize using a Path or Reference to the subsystem. Using a path to a subsystem causes the subsystem to load into memory every time a VI accesses the subsystem. Using a reference to a subsystem ensures that the subsystem loads into memory only once.|