LSE

The LSE (Linear State Equation) statement defines the following linear system:
of first-order, explicit differential equations and algebraic equations in classical state-space form. The state variables, x, the inputs, u, and the outputs, y, are specified by ARRAY statements. Use MATRIX statements to define the coefficient matrices A, B, C, and D.

Format

Arguments

 
A=id
Designates the MATRIX statement in the dataset that defines the state transition matrix for the linear system. You must have a MATRIX statement with this identifier in the dataset; it must be a square matrix (same number of rows and columns); and it must have the same number of columns as the number of rows in the X array.
B=id
Designates the MATRIX statement in the dataset that defines the control matrix for the linear system. The B argument is optional. When it appears on the LSE statement, you must also include the U argument. A MATRIX statement with the identifier id must be in the dataset; it must have the same number of rows as the A matrix and the same number of columns as the number of elements in the U array.
C=id
Designates the MATRIX statement in the dataset that defines the output matrix for the linear system. The C argument is optional. When it appears on the LSE statement, you must also include the Y argument. A MATRIX statement with the identifier id must be in the dataset; it must have the same number of rows as the A matrix and the same number of rows as the number of elements in the Y array.
D=id
Designates the MATRIX statement in your dataset that defines the feed forward matrix for the linear system. When the D argument is used, you must also include both Y and U arguments in the LSE definition. A MATRIX statement with this identifier must be in the dataset; it must have the same number of rows as the number of elements in the Y array and the same number of columns as the number of elements in the U array.
IC=id
Designates the ARRAY statement in the dataset that defines the column matrix of initial conditions for the linear system. The IC argument is optional. When it appears on the LSE statement, you must have an ARRAY statement with the identifier id in the dataset; and it must have the same number of elements as the X array (equal to the number of rows in the A matrix). When no IC array is specified for an LSE, all states are initialized to zero.
STATIC_HOLD
Indicates that the LSE states are not permitted to change during static and quasi-static analyses.
U=id
Designates the ARRAY statement in the dataset that defines the input (or control) array for the linear system. The U argument is optional. When it is used on the LSE statement, there must be an ARRAY statement with the identifier id in the dataset; and it must be of the U type. One or both of the B or D argument must appear along with the U argument in the LSE statement. The corresponding MATRIX statements must have the same number of columns as there are elements in the U array.
X=id
Designates the ARRAY statement in the dataset that defines the state array for the linear system. You must have an ARRAY statement with this identifier in the dataset; it must be of the X type; and it may not be used in any other LSE, GSE, or TFSISO statement.
Y=id
Designates the ARRAY statement in your dataset that defines the column matrix of output variables for the linear system. The Y argument is optional. When it is used on the LSE statement, an ARRAY statement with the identifier id must be in the dataset; it must be of the Y type, and it may not be used in any other LSE, GSE or TFSISO statement. One or both of the C or D arguments must appear along with the Y argument on the LSE statement. The corresponding MATRIX statements must have the same number of rows as there are elements in the Y array.

Extended Definition

The LSE (Linear State Equation) statement is used, along with associated ARRAY and MATRIX statements, to define a system of constant coefficient, explicit, differential and algebraic equations in state-space form. The system of equations describes a model for a linear, time-invariant dynamic system. The LSE, ARRAY, and MATRIX statements provide the means for importing controllers developed manually or with other software packages. It can also be used, however, to define an arbitrary set of coupled, constant-coefficient differential and algebraic linear equations in the form
where at least the A matrix must be nonzero.
The LSE statement follows standard control systems terminology, where x is the state array, y is the output array, u is the input array, and the initial conditions are defined for x(t=0). In the Adams Solver dataset, each of these arrays is defined using an ARRAY statement. Similarly, A is the state matrix, B is the control matrix, C is the output matrix, and D is the feedforward matrix. Each of these matrices is defined using a MATRIX statement.
All MATRIX and ARRAY sizes must be conformable as required by the above equation. ARRAY statements with zero-length and zero-sized matrices should not be defined; Adams Solver (FORTRAN) correctly formulates the system equations based on the ARRAY and MATRIX statements included in the dataset.
 
Caution:  
The LSE statement provides a very general capability for defining a linear element. The Adams solvers, however, have been developed and refined for sparse systems of equations that arise from the modeling of mechanical systems. With the LSE statement, you can create very dense sets of equations. If these equations form a large portion of your completed model, Adams Solver (FORTRAN) may perform more slowly than expected.
 
Note that, if the algebraic equations defined by the LSE statement have no solution or multiple solutions (this is possible because of the general nature of the input ARRAY), Adams Solver (FORTRAN) most likely fails to converge or possibly converge to an unexpected answer. To avoid this possibility, you should not reference the X (state) or Y (output) ARRAY statements in the VARIABLE statements listed in the U (input) array.
 
During a static analysis, Adams Solver (FORTRAN) finds equilibrium values for user-defined differential variables (DIFFs, GSEs, LSEs, and TFSISOs), as well as for the displacement and force variables. This changes the initial conditions for a subsequent analysis. If STATIC_HOLD is not specified, during a static analysis, Adams Solver (FORTRAN) sets the time derivatives of the user-defined variables to zero, and uses the user-supplied initial-condition values only as an initial guess for the static solution. Generally, the final equilibrium values are not the same as the initial condition values. Adams Solver (FORTRAN) then uses the equilibrium values of the user-defined variables as the initial values for any subsequent analysis, just as with the equilibrium displacement and force values.
 
However, if STATIC_HOLD is specified, the user-specified initial conditions are retained as the static equilibrium values. Thus, the final equilibrium values are the same as the user-specified initial conditions. Note that this does not guarantee that the time derivatives of the user-defined variable are zero after static analysis.

Examples

LSE/10, X=10, A=10, U=11, B=11, IC=12
ARRAY/10, X
ARRAY/11, U, VARIABLE=11
ARRAY/12, IC, NUMBER=0.0,0.0
MATRIX/10, FULL=RORDER, ROW=2, COL=2,
, VALUE=0.0,1.0,-986.96,-6.2832
MATRIX/11, FULL=RORDER, ROW=2, COL=1, VALUE=0.0,1.0
VARIABLE/11, FUNCTION=5.0*SIN(PI*TIME**2)
These statements define the following set of linear state equations.
ARRAY/10 is the state array (x).
ARRAY/11 is the input array (u).
ARRAY/12 is the initial condition array. The input is defined by VARIABLE/11.
MATRIX/10 is the state matrix (A).
MATRIX/11 is the control matrix (B). This LSE has no output, so there is no output array (y), output matrix (C), or feedforward matrix (D) specified.

Applications

The LSE statement may be most useful for adding feedback control systems to an Adams Solver (FORTRAN) model. The A, B, C and D matrices can be derived manually or imported directly from a control system design program such as MATRIXx or MATLAB. Normally, the mechanical portion of the model includes some kind of actuator that depends on one or more of the LSE statement outputs or states.
LSE statements can also be conveniently used in many cases to replace systems of coupled DIFF and VARIABLE statements (for nonlinear equations, the GSE statement should be used). Examples of possible dynamical system uses include unsteady aerodynamics and electrodynamics.
You can use the current values of LSE states and outputs in both function expressions and user-written subroutines using the associated ARRAY facilities (see the ARYVAL function and the subroutines SYSARY and SYSFNC). That is, instead of Adams Solver (FORTRAN) functions and FORTRAN callable subroutines dedicated expressly to the LSE statement, the system states and outputs are accessed by offset referencing through the appropriate ARRAY routines. This allows for consistent access to system states and outputs for all three system modeling elements, the LSE, GSE, and TFSISO statements.
See other Generic systems modeling available.