Creating and Modifying General State Equations

 

The following procedure teaches you how to represent a subsystem that has well defined inputs (u), internal states (x), and a set of well defined outputs (y).

Learn more about:

Also see:

To create or modify a general state equation:

  1. From the Build menu, point to System Elements, point to General State Equation, and then select either New or Modify.

  2. If you selected Modify, the Database Navigator appears. Select a system element to modify.

    The Modify or Create General State Equation dialog box appears. Both dialog boxes contain the same options.

  3. If you selected New, change the name of the general state equation element, if desired, and assign a unique ID to it. Learn about ADAMS/Solver IDs.

  4. Set up the GSE by filling in the following text boxes:

  5. Set States to the type of system to define:

    The dialog box changes depending on the type of system. See the next tables for the values to enter depending on the systems you are creating. For a sampled system, you enter both continous and discrete values.

  6. Add or change any comments about the GSE that you want to enter to help you manage and identify it. Learn about comments.

  7. Select OK.

Options for Defining Continuous and Sampled Systems

For the option:

Do the following:

X Array (Continous)

Enter the array element that defines the continuous states for the GSE. The array element must be of the X type, and it cannot be used in any other linear state equation, general state equation, or transfer function.

IC Array (Continous)

Enter the array element that specifies the initial conditions for the continuous states in the system.

When you do not specify an IC array for a GSE, all the continuous states are initialized to zero.

Static Hold

Indicate whether or not the continuous GSE states are permitted to change during static and quasi-static simulations.

Options for Discrete and Sampled Systems

For the option:

Do the following:

X Array (Discrete)

Enter the array element that is used to access the discrete states for the GSE. It must be of the X type, and it cannot be used in any other linear state equation, general state equation, or transfer function.

IC Array (Discrete)

Enter the array element that specifies the initial conditions for the discrete states in the system. The array is optional. The array element must be of the IC type.

When you do not specify an IC array for a GSE, all the discrete states are initialized to zero.

First Sample Time

Specify the simulation time at which the sampling of the discrete states is to start. All discrete states before the first sample time are defined to be at the initial condition specified. The default is zero.

Sample Function/Sample User Parameters

Specify the sampling period associated with the discrete states of a GSE. This tells ADAMS/Solver to control its step size so that the discrete states of the GSE are updated at:

last_sample_time + sample_period

In cases where an expression for the sampling period is difficult to write, you can specify it in a user-written subroutine GSE_SAMP. ADAMS/Solver will call this function at each sample time to find out the next sample period.

Select the More button to display the Function Builder and build an expression. See Function Builder and ADAMS/View Function Builder online help.