66 f <<
dot(vB) == ( -kS*xB + kS*xW + F ) / mB;
67 f <<
dot(vW) == ( kS*xB - (kT+kS)*xW + kT*R - F ) / mW;
91 const double t_end = 1.0;
93 OCP ocp( t_start, t_end, 20 );
132 exit( EXIT_FAILURE );
134 exit( EXIT_FAILURE );
145 window.
addSubplot( sampledProcessOutput(0),
"Body Position [m]" );
146 window.
addSubplot( sampledProcessOutput(1),
"Wheel Position [m]" );
147 window.
addSubplot( sampledProcessOutput(2),
"Body Velocity [m/s]" );
148 window.
addSubplot( sampledProcessOutput(3),
"Wheel Velocity [m/s]" );
149 window.
addSubplot( feedbackControl(1),
"Damping Force [N]" );
150 window.
addSubplot( feedbackControl(0),
"Road Excitation [m]" );
USING_NAMESPACE_ACADO int main()
Calculates the control inputs of the Process based on the Process outputs.
Allows to setup and evaluate a general function based on SymbolicExpressions.
Allows to setup and evaluate output functions based on SymbolicExpressions.
virtual returnValue plot(PlotFrequency _frequency=PLOT_IN_ANY_CASE)
Stores a DifferentialEquation together with an OutputFcn.
#define USING_NAMESPACE_ACADO
Provides a time grid consisting of vector-valued optimization variables at each grid point...
returnValue getFeedbackControl(Curve &_feedbackControl) const
User-interface to formulate and solve model predictive control problems.
returnValue subjectTo(const DifferentialEquation &differentialEquation_)
returnValue addSubplot(PlotWindowSubplot &_subplot)
returnValue getSampledProcessOutput(VariablesGrid &_sampledProcessOutput)
returnValue set(OptionsName name, int value)
returnValue minimizeLSQ(const DMatrix &S, const Function &h, const DVector &r)
returnValue init(const DVector &x0_, const DVector &p_=emptyConstVector)
Data class for defining optimal control problems.
Allows to define a static reference trajectory that the ControlLaw aims to track. ...
Expression dot(const Expression &arg)
void setAll(const T &_value)
Allows to run closed-loop simulations of dynamic systems.
Simulates the process to be controlled based on a dynamic model.
Provides an interface to Gnuplot for plotting algorithmic outputs.
Allows to setup and evaluate differential equations (ODEs and DAEs) based on SymbolicExpressions.