Implements a feedforward law to be used within a Controller. More...
#include <feedforward_law.hpp>
Protected Attributes | |
uint | nx |
Curve | uRef |
Protected Attributes inherited from ControlLaw | |
DVector | p |
DVector | u |
Protected Attributes inherited from SimulationBlock | |
BlockName | name |
RealClock | realClock |
double | samplingTime |
Protected Attributes inherited from UserInteraction | |
BlockStatus | status |
Protected Attributes inherited from Options | |
std::vector< OptionsList > | lists |
Protected Attributes inherited from Logging | |
std::vector< LogRecord > | logCollection |
int | logIdx |
Protected Attributes inherited from Plotting | |
PlotCollection | plotCollection |
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.
Definition at line 55 of file feedforward_law.hpp.
BEGIN_NAMESPACE_ACADO FeedforwardLaw::FeedforwardLaw | ( | ) |
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.
[in] | _nx | Number of differential states. |
[in] | _u | Predefined control signal. |
[in] | _samplingTime | Sampling time. |
Definition at line 60 of file feedforward_law.cpp.
FeedforwardLaw::FeedforwardLaw | ( | const FeedforwardLaw & | rhs | ) |
Copy constructor (deep copy).
@param[in] rhs Right-hand side object.
Definition at line 71 of file feedforward_law.cpp.
|
virtual |
Destructor.
Definition at line 78 of file feedforward_law.cpp.
|
virtual |
Clone constructor (deep copy).
\return Pointer to deep copy of base class type
Implements ControlLaw.
Definition at line 95 of file feedforward_law.cpp.
|
virtual |
Returns number of parameters.
Reimplemented from ControlLaw.
Definition at line 166 of file feedforward_law.cpp.
|
virtual |
Returns number of controls.
Reimplemented from ControlLaw.
Definition at line 160 of file feedforward_law.cpp.
|
virtual |
Returns number of (estimated) disturbances.
Reimplemented from ControlLaw.
Definition at line 172 of file feedforward_law.cpp.
|
virtual |
Returns number of (estimated) differential states.
Reimplemented from ControlLaw.
Definition at line 148 of file feedforward_law.cpp.
|
virtual |
Returns number of (estimated) algebraic states.
Reimplemented from ControlLaw.
Definition at line 154 of file feedforward_law.cpp.
|
virtual |
Returns number of process outputs.
Reimplemented from ControlLaw.
Definition at line 178 of file feedforward_law.cpp.
|
virtual |
Initializes the feedforward law with given start values and performs a number of consistency checks.
[in] | _startTime | Start time. |
[in] | _x | Initial value for differential states. |
[in] | _p | Initial value for parameters. |
[in] | _yRef | Initial value for reference trajectory. |
Implements ControlLaw.
Definition at line 101 of file feedforward_law.cpp.
|
virtual |
Returns whether the control law is based on dynamic optimization or a static one.
Implements ControlLaw.
Definition at line 184 of file feedforward_law.cpp.
|
virtual |
Returns whether the control law is a static one or based on dynamic optimization.
Implements ControlLaw.
Definition at line 190 of file feedforward_law.cpp.
FeedforwardLaw & FeedforwardLaw::operator= | ( | const FeedforwardLaw & | rhs | ) |
Assignment operator (deep copy).
@param[in] rhs Right-hand side object.
Definition at line 83 of file feedforward_law.cpp.
|
virtual |
Performs next step of the feedforward law based on given inputs.
@param[in] currentTime Current time. @param[in] _x Most recent value for differential states. @param[in] _p Most recent value for parameters. @param[in] _yRef Current piece of reference trajectory.
Implements ControlLaw.
Definition at line 119 of file feedforward_law.cpp.
|
protected |
Number of differential states.
Definition at line 202 of file feedforward_law.hpp.
|
protected |
Predefined control signal.
Definition at line 203 of file feedforward_law.hpp.