Optimal and Robust Control
BE3M35ORR + B3M35ORR + BE3M35ORCHomework problem assignment #4
Use the LQ-optimal control methodology to design a discrete-time state-feedback regulator for a given LTI system
Design a discrete-time state-feedback regulator that performs fast "sideways" motion of a small indoor quadrotor (four-rotor drone). Namely, the controller should bring a quadrotor from one horizontal position to another. A 2D model is in the figure below
and the corresponding motion equations are
\ddot y(t) &= -a(t)\sin \theta(t)\\
\ddot z(t) & = a(t)\cos \theta(t) - g\\
\ddot \theta(t) &= \alpha(t)
\end{align*}\)
where \(a(t)\) and \(\alpha(t)\) represent the control inputs to the system, namely the linear and rotational acceleration. This assumes that the innermost control loops are already implemented and closed.
The gravitational acceleration \(g\) is approximated by \(10\,m/s^2\). The position variables \(y(t)\) and \(z(t)\) have units of [m], \(\theta\) is given in [rad], and the inputs \(a(t)\) and \(\alpha(t)\) are in \([m/s^2 ]\) and \([rad/s^2 ]\), respectively. Only concentrating on the horizontal control, the input \(a(t)\) is set to
resulting in \(\ddot z(t)=0\) and the simplified dynamics
\ddot y(t)&=-10 \tan \theta (t),\\
\ddot \theta(t) &= \alpha(t).
\end{align*}\)
The concrete control goal is to bring the quadrotor from the initial state \(y(0)=1,\,\dot y(0)=\theta(0)=\dot \theta(0)=0\) to the final state \(y(T) = \dot y(T)=\theta(T)=\dot \theta(T)=0\).
In adition, there are constraints on the input \(\alpha(t)\) and on the state variable \(\theta(t)\):
|\alpha(t)| &\leq 100,\\
|\theta(t)| &\leq \frac{\pi}{6}.
\end{align*}\)
The sampling rate is 100 Hz.
Your tasks are
- Using a linearized model, design an LQ-optimal state-feedback controller(s) that brings the system to the vicinity of the zero state (\(|x_i(t)|\leq 0.01\) for \(i=1,2,3,4\)) as fast as possible while respecting the constraints.
- Check the results with a nonlinear simulation model.
- Optionally you can compare with yet another control design methodology that you have already mastered.
- Who can do the fastest system response?
Download the attached file 'hw4_cvutID.m' where a majority of the code solving this homework assignment has already been implemented. It only remains to define the linear dynamics of the system, discretize it and design a DLQR controller. When designing the DLQR, tune the values of the weight matrices Q and R until you get a satisfactory reposnse. Before uploading your solution to Moodle, do not forget to rename the file (and the name of the main function in it) according to your CVUT ID (KOS username). Please do not change the parameters of the simulation (i.e. T0 and Tf) or vectors x, u, and t. Your solution will be evaluated based on these vectors.
- 15. ledna 2023, 22.41