50 pWeights(1) = -1000.0;
52 pWeights(3) = -1000.0;
60 pid.setProportionalWeights( pWeights );
61 pid.setDerivativeWeights( dWeights );
63 pid.setControlLowerLimit( 0,-200.0 );
64 pid.setControlUpperLimit( 0, 200.0 );
91 controller.
init( 0.0,y );
92 controller.
step( 0.0,y );
97 u.
print(
"Feedback control" );
Calculates the control inputs of the Process based on the Process outputs.
#define USING_NAMESPACE_ACADO
virtual returnValue step(double currentTime, const DVector &_y, const VariablesGrid &_yRef=emptyConstVariablesGrid)
virtual returnValue init(double startTime=0.0, const DVector &_x0=emptyConstVector, const DVector &_p=emptyConstVector, const VariablesGrid &_yRef=emptyConstVariablesGrid)
virtual returnValue print(std::ostream &stream=std::cout, const std::string &name=DEFAULT_LABEL, const std::string &startString=DEFAULT_START_STRING, const std::string &endString=DEFAULT_END_STRING, uint width=DEFAULT_WIDTH, uint precision=DEFAULT_PRECISION, const std::string &colSeparator=DEFAULT_COL_SEPARATOR, const std::string &rowSeparator=DEFAULT_ROW_SEPARATOR) const
Derived & setZero(Index size)
Allows to define a static reference trajectory that the ControlLaw aims to track. ...
returnValue getU(DVector &_u) const
Implements a PID control law to be used within a Controller.