CSSM – Continuous state space model of a linear system
Block SymbolLicensing group: ADVANCED
Function Description
The CSSM block (Continuous State Space Model) simulates behavior of a linear system
where is the state vector, is the initial value of the state vector, is the input vector, is the output vector. The matrix is the system dynamics matrix, is the input matrix, is the output matrix and is the direct transmission (feedthrough) matrix.
All matrices are specified in the same format as in Matlab, i.e. the whole matrix is placed in brackets, elements are entered by rows, elements of a row are separated by spaces (blanks), rows are separated by semicolons. The vector is a column, therefore the elements are separated by semicolons (each element is in a separate row).
The simulated system is first converted to the discrete (discretized) state space model
where is the simulation step, is the execution period of the block in seconds. The period is not entered in the block, it is determined automatically as a period of the task (TASK, QTASK nebo IOTASK) containing the block.
If the input is changed only in the moments of sampling and between two consecutive sampling instants is constant, i.e. for , then the matrices and are determined by
Computation of discrete matrices and is based on a method described in [5], which uses Padé approximations of matrix exponential and its integral and scaling technique.
During the real-time simulation, single simulation step of the above discrete state space model is computed in each execution time instant.
Inputs
R1 | Reset signal. When , the state vector x is set to its initial value x0. The simulation continues on the falling edge of R1 (onoff). | Bool |
HLD | Simulation output holds its value if HLD=on. | Bool |
u1..u16 | Simulated system inputs. First simulation inputs are used where is the number of columns of the matrix Bc. | Double (F64) |
Outputs
iE | Block error code | Error |
|
|
|
y1..y16 | Simulated system outputs. First simulation outputs are used where is the number of rows of the matrix Cc. | Double (F64) |
Parameters
UD | Matrix Dc usage flag. If UD=offthen the Dc matrix is not used for simulation (simulation behaves as if the Dc matrix is zero). | Bool |
is | Order of the Padé approximation of the matrix exponential for the computation of the discretized system matrices. 0 4 2 | Long (I32) |
eps | Required accuracy of the Padé approximation. 0.0 1.0 1e-15 | Double (F64) |
Ac | Matrix () of the continuous linear system dynamics. | Double (F64) |
Bc | Input matrix () of the continuous linear system. | Double (F64) |
Cc | Output matrix () of the continuous linear system. | Double (F64) |
Dc | Direct transmission (feedthrough) matrix () of the continuous linear system. The matrix is used only if the parameter UD=on. If UD=off, the dimensions of the Dc matrix are not checked. | Double (F64) |
x0 | Initial value of the state vector (of dimension ) of the continuous linear system. | Double (F64) |
[Previous] [Back to top] [Up] [Next]
2023 © REX Controls s.r.o., www.rexygen.com