RIT VEXU Core API
Loading...
Searching...
No Matches
LinearSystem< STATES, INPUTS, OUTPUTS > Class Template Reference

#include <linear_system.h>

Public Member Functions

 LinearSystem (const MatrixA &A, const MatrixB &B, const MatrixC &C, const MatrixD &D)
 
MatrixA A ()
 
MatrixB B ()
 
const std::tuple< std::tuple< MatrixA, MatrixB > > & discAB (const double &dt)
 
MatrixC C ()
 
MatrixD D ()
 
VectorX compute_X (const VectorX &x, const VectorU &u, double dt)
 
VectorY compute_Y (const VectorX &x, const VectorU &u)
 

Detailed Description

template<int STATES, int INPUTS, int OUTPUTS>
class LinearSystem< STATES, INPUTS, OUTPUTS >

This class represents a state-space model of a linear system.

It contains the following continuous matrices: A, System matrix B, Input matrix C, Output matrix D, Feedthrough matrix

Constructor & Destructor Documentation

◆ LinearSystem()

template<int STATES, int INPUTS, int OUTPUTS>
LinearSystem< STATES, INPUTS, OUTPUTS >::LinearSystem ( const MatrixA & A,
const MatrixB & B,
const MatrixC & C,
const MatrixD & D )
inline

Constructs a discrete linear system with the given continuous matrices.

Parameters
AThe continuous system matrix
BThe continuous input matrix
CThe output matrix
DThe feedthrough matrix

Member Function Documentation

◆ A()

template<int STATES, int INPUTS, int OUTPUTS>
MatrixA LinearSystem< STATES, INPUTS, OUTPUTS >::A ( )
inline

Returns the continuous system matrix A.

◆ B()

template<int STATES, int INPUTS, int OUTPUTS>
MatrixB LinearSystem< STATES, INPUTS, OUTPUTS >::B ( )
inline

Returns the continuous input matrix B.

◆ C()

template<int STATES, int INPUTS, int OUTPUTS>
MatrixC LinearSystem< STATES, INPUTS, OUTPUTS >::C ( )
inline

Returns the output matrix C.

◆ compute_X()

template<int STATES, int INPUTS, int OUTPUTS>
VectorX LinearSystem< STATES, INPUTS, OUTPUTS >::compute_X ( const VectorX & x,
const VectorU & u,
double dt )
inline

Computes the new state vector given the previous state vector, an input vector, and the timestep in seconds.

Parameters
xThe current state vector.
uThe input vector.
dtThe timestep in seconds.
Returns
The new state vector.

◆ compute_Y()

template<int STATES, int INPUTS, int OUTPUTS>
VectorY LinearSystem< STATES, INPUTS, OUTPUTS >::compute_Y ( const VectorX & x,
const VectorU & u )
inline

Computes the output vector given a state and an input.

Parameters
xThe state vector.
uThe input vector.
Returns
The output vector.

◆ D()

template<int STATES, int INPUTS, int OUTPUTS>
MatrixD LinearSystem< STATES, INPUTS, OUTPUTS >::D ( )
inline

Returns the feedthrough matrix D.

◆ discAB()

template<int STATES, int INPUTS, int OUTPUTS>
const std::tuple< std::tuple< MatrixA, MatrixB > > & LinearSystem< STATES, INPUTS, OUTPUTS >::discAB ( const double & dt)
inline

Returns a tuple of A and B after being discretized.


The documentation for this class was generated from the following file: