65 f <<
dot(vB) == ( -kS*xB + kS*xW + F ) / mB;
66 f <<
dot(vW) == ( kS*xB - (kT+kS)*xW + kT*R - F ) / mW;
101 const double tStart = 0.0;
102 const double tEnd = 1.0;
104 OCP ocp( tStart, tEnd, 20 );
135 exit( EXIT_FAILURE );
137 exit( EXIT_FAILURE );
149 window.
addSubplot( diffStates(0),
"Body Position [m]" );
150 window.
addSubplot( diffStates(1),
"Wheel Position [m]" );
151 window.
addSubplot( diffStates(2),
"Body Velocity [m/s]" );
152 window.
addSubplot( diffStates(3),
"Wheel Velocity [m/s]" );
153 window.
addSubplot( feedbackControl,
"Damping Force [N]" );
154 window.
addSubplot( disturbance,
"Road Excitation [m]" );
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)
returnValue getProcessDifferentialStates(VariablesGrid &_diffStates)
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 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)
Derived & setZero(Index size)
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)
returnValue read(std::istream &stream)
returnValue setProcessDisturbance(const Curve &_processDisturbance)
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.