Public Member Functions | Protected Attributes

Implements a feedforward law to be used within a Controller. More...

#include <feedforward_law.hpp>

Inheritance diagram for FeedforwardLaw:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ControlLawclone () const
 FeedforwardLaw ()
 FeedforwardLaw (const uint _nx, const Curve &_u, double _samplingTime=DEFAULT_SAMPLING_TIME)
 FeedforwardLaw (const FeedforwardLaw &rhs)
virtual uint getNP () const
virtual uint getNU () const
virtual uint getNW () const
virtual uint getNX () const
virtual uint getNXA () const
virtual uint getNY () const
virtual returnValue init (double startTime=0.0, const DVector &x0_=emptyConstVector, const DVector &p_=emptyConstVector, const VariablesGrid &_yRef=emptyConstVariablesGrid)
virtual BooleanType isDynamic () const
virtual BooleanType isStatic () const
FeedforwardLawoperator= (const FeedforwardLaw &rhs)
virtual returnValue step (double currentTime, const DVector &_x, const DVector &_p=emptyConstVector, const VariablesGrid &_yRef=emptyConstVariablesGrid)
virtual ~FeedforwardLaw ()

Protected Attributes

uint nx
Curve uRef

Detailed Description

Implements a feedforward law to be used within a Controller.

The class FeedforwardLaw allows to implement a predefined feedforward law to be evaluated at the sampling instants.

Author:
Joris Gillis, Hans Joachim Ferreau, Boris Houska

Definition at line 55 of file feedforward_law.hpp.


Constructor & Destructor Documentation

Default constructor.

The objective of this class is to be able to use precomputed controls to run a simulation. If the precomputed controls are given as a Curve mycontrols, use: FeedforwardLaw( numberofstates, mycontrols[,sampleTime])

Definition at line 54 of file feedforward_law.cpp.

FeedforwardLaw::FeedforwardLaw ( const uint  _nx,
const Curve _u,
double  _samplingTime = DEFAULT_SAMPLING_TIME 
)

Constructor which takes the predefined control signals as curve together with the sampling time.

Parameters:
[in]_nxNumber of differential states.
[in]_uPredefined control signal.
[in]_samplingTimeSampling time.

Definition at line 60 of file feedforward_law.cpp.

Copy constructor (deep copy).

Parameters:
[in]rhsRight-hand side object.

Definition at line 71 of file feedforward_law.cpp.

Destructor.

Definition at line 78 of file feedforward_law.cpp.


Member Function Documentation

ControlLaw * FeedforwardLaw::clone ( ) const [virtual]

Clone constructor (deep copy).

Returns:
Pointer to deep copy of base class type

Implements ControlLaw.

Definition at line 95 of file feedforward_law.cpp.

uint FeedforwardLaw::getNP ( ) const [virtual]

Returns number of parameters.

Returns:
Number of parameters

Reimplemented from ControlLaw.

Definition at line 166 of file feedforward_law.cpp.

uint FeedforwardLaw::getNU ( ) const [virtual]

Returns number of controls.

Returns:
Number of controls

Reimplemented from ControlLaw.

Definition at line 160 of file feedforward_law.cpp.

uint FeedforwardLaw::getNW ( ) const [virtual]

Returns number of (estimated) disturbances.

Returns:
Number of (estimated) disturbances

Reimplemented from ControlLaw.

Definition at line 172 of file feedforward_law.cpp.

uint FeedforwardLaw::getNX ( ) const [virtual]

Returns number of (estimated) differential states.

Returns:
Number of (estimated) differential states

Reimplemented from ControlLaw.

Definition at line 148 of file feedforward_law.cpp.

uint FeedforwardLaw::getNXA ( ) const [virtual]

Returns number of (estimated) algebraic states.

Returns:
Number of (estimated) algebraic states

Reimplemented from ControlLaw.

Definition at line 154 of file feedforward_law.cpp.

uint FeedforwardLaw::getNY ( ) const [virtual]

Returns number of process outputs.

Returns:
Number of process outputs

Reimplemented from ControlLaw.

Definition at line 178 of file feedforward_law.cpp.

returnValue FeedforwardLaw::init ( double  startTime = 0.0,
const DVector x0_ = emptyConstVector,
const DVector p_ = emptyConstVector,
const VariablesGrid _yRef = emptyConstVariablesGrid 
) [virtual]

Initializes the feedforward law with given start values and performs a number of consistency checks.

Parameters:
[in]_startTimeStart time.
[in]_xInitial value for differential states.
[in]_pInitial value for parameters.
[in]_yRefInitial value for reference trajectory.
Returns:
SUCCESSFUL_RETURN

Implements ControlLaw.

Definition at line 101 of file feedforward_law.cpp.

Returns whether the control law is based on dynamic optimization or a static one.

Returns:
BT_TRUE iff control law is based on dynamic optimization,
BT_FALSE otherwise

Implements ControlLaw.

Definition at line 184 of file feedforward_law.cpp.

Returns whether the control law is a static one or based on dynamic optimization.

Returns:
BT_TRUE iff control law is a static one,
BT_FALSE otherwise

Implements ControlLaw.

Definition at line 190 of file feedforward_law.cpp.

FeedforwardLaw & FeedforwardLaw::operator= ( const FeedforwardLaw rhs)

Assignment operator (deep copy).

Parameters:
[in]rhsRight-hand side object.

Definition at line 83 of file feedforward_law.cpp.

returnValue FeedforwardLaw::step ( double  currentTime,
const DVector _x,
const DVector _p = emptyConstVector,
const VariablesGrid _yRef = emptyConstVariablesGrid 
) [virtual]

Performs next step of the feedforward law based on given inputs.

Parameters:
[in]currentTimeCurrent time.
[in]_xMost recent value for differential states.
[in]_pMost recent value for parameters.
[in]_yRefCurrent piece of reference trajectory.
Returns:
SUCCESSFUL_RETURN,
RET_BLOCK_NOT_READY,
RET_VECTOR_DIMENSION_MISMATCH,
RET_CONTROLLAW_STEP_FAILED

Implements ControlLaw.

Definition at line 119 of file feedforward_law.cpp.


Member Data Documentation

uint FeedforwardLaw::nx [protected]

Number of differential states.

Definition at line 202 of file feedforward_law.hpp.

Predefined control signal.

Definition at line 203 of file feedforward_law.hpp.


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


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Sat Jun 8 2019 19:40:24