DUECA/DUSIME
Loading...
Searching...
No Matches
dueca::LimitedLinearSystem Class Reference

A specialization of LinearSystem that implements limits on the system state. More...

#include <LimitedLinearSystem.hxx>

Inheritance diagram for dueca::LimitedLinearSystem:
Collaboration diagram for dueca::LimitedLinearSystem:

Public Member Functions

 LimitedLinearSystem ()
 Default constructor.
 
 LimitedLinearSystem (const Vector &num, const Vector &den, double dt)
 This constructs a SISO system, on the basis of continuous time transfer function.
 
 LimitedLinearSystem (const LimitedLinearSystem &)
 Copy constructor.
 
 LimitedLinearSystem (const Matrix &A, const Matrix &B, const Matrix &C, const Matrix &D, double dt)
 This constructs a system, on the basis of a continuous time state space system.
 
virtual ~LimitedLinearSystem ()
 Destructor.
 
LimitedLinearSystemoperator= (const LimitedLinearSystem &o)
 Assignment of one system to another.
 
void setSaturationLimits (const Vector &lower, const Vector &upper)
 Set the saturation limits for the states.
 
bool isSaturated () const
 Returns true if one or more of the states are saturated.
 
void acceptState (const Vector &x_new)
 Accept a new state.
 
void reset ()
 Reset state, output, and saturation.
 
virtual const Vector & step (const Vector &u)
 Calculate a single time step, return the output vector.
 
virtual const Vector & step (double u)
 Calculate a single time step, return the output vector.
 
- Public Member Functions inherited from dueca::LinearSystem
 LinearSystem ()
 Default constructor.
 
 LinearSystem (const Vector &num, const Vector &den, double dt)
 This constructs a SISO system, on the basis of continuous time transfer function.
 
 LinearSystem (const LinearSystem &)
 Copy constructor.
 
 LinearSystem (const Matrix &A, const Matrix &B, const Matrix &C, const Matrix &D, double dt)
 This constructs a system, on the basis of a continuous time state space system.
 
 LinearSystem (const Matrix &phi, const Matrix &psi, const Matrix &C, const Matrix &D)
 This constructs a system, on the basis of a discrete time state space system.
 
virtual ~LinearSystem ()
 Destructor.
 
LinearSystemoperator= (const LinearSystem &o)
 Assignment of one system to another.
 
void createFromNumDen (const Vector &num, const Vector &den, double dt)
 Create a system from numerator, denominator input.
 
void createFromABCD (const Matrix &A, const Matrix &B, const Matrix &C, const Matrix &D, double dt)
 Create from matrices.
 
void createFromPhiPsiCD (const Matrix &phi, const Matrix &psi, const Matrix &C, const Matrix &D)
 Create from matrices, discrete.
 
const Vector & getY () const
 Obtain the output vector.
 
const Vector & getX () const
 Obtain the state vector.
 
Vector & getX ()
 Obtain the state vector for modification.
 
const Matrix & getPhi () const
 Additional output, transition.
 
const Matrix & getPsi () const
 Input matrix discrete system.
 
const Matrix & getC () const
 Output matrix.
 
const Matrix & getD () const
 Feedthrough matrix.
 

Protected Attributes

Vector ul
 Upper limit.
 
Vector ll
 Lower limit.
 
bool saturation
 Keep track of saturation.
 
- Protected Attributes inherited from dueca::LinearSystem
unsigned n
 Order of the system.
 
unsigned m
 Number of outputs.
 
Matrix Phi
 Transition matrix.
 
Matrix Psi
 Input matrix.
 
Matrix C
 Output matrix.
 
Matrix D
 Feedthrough matrix.
 
Vector x
 The state vector.
 
Vector y
 The output vector.
 

Detailed Description

A specialization of LinearSystem that implements limits on the system state.

Constructor & Destructor Documentation

◆ LimitedLinearSystem() [1/2]

dueca::LimitedLinearSystem::LimitedLinearSystem ( const Vector & num,
const Vector & den,
double dt )

This constructs a SISO system, on the basis of continuous time transfer function.

Parameters
numNumerator of the transfer function. Elements are arranged as num[0]*s^0 + num[1]*s^1 etc.
denDenominator.
dtSize, in seconds, of the discrete time step.

◆ LimitedLinearSystem() [2/2]

dueca::LimitedLinearSystem::LimitedLinearSystem ( const Matrix & A,
const Matrix & B,
const Matrix & C,
const Matrix & D,
double dt )

This constructs a system, on the basis of a continuous time state space system.

Parameters
AA matrix
BB matrix
CC matrix
DD matrix
dtSize, in seconds, of the discrete time step.

Member Function Documentation

◆ acceptState()

void dueca::LimitedLinearSystem::acceptState ( const Vector & x_new)
virtual

Accept a new state.

Parameters
x_newVector with the new state.

Reimplemented from dueca::LinearSystem.

◆ reset()

void dueca::LimitedLinearSystem::reset ( )
virtual

Reset state, output, and saturation.

Reimplemented from dueca::LinearSystem.

◆ step() [1/2]

virtual const Vector & dueca::LimitedLinearSystem::step ( const Vector & u)
virtual

Calculate a single time step, return the output vector.

Parameters
uInput vector.

Reimplemented from dueca::LinearSystem.

Reimplemented in dueca::Integrator.

◆ step() [2/2]

virtual const Vector & dueca::LimitedLinearSystem::step ( double u)
virtual

Calculate a single time step, return the output vector.

Parameters
uInput variable. Only valid for SI systems.

Reimplemented from dueca::LinearSystem.

Reimplemented in dueca::Integrator.


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