Skip to main content
Log in
Čeština ‎(cs)‎ English ‎(en)‎
Documentation
Čeština ‎(cs)‎ English ‎(en)‎

Optimal and Robust Control

BE3M35ORR + B3M35ORR + BE3M35ORC
  1. Home
  2. Courses
  3. BE3M35ORR, B3M35ORR, BE3M35ORC - B232
  4. 11 March - 17 March
  5. Homework problem assignment #4
This course is part of an already archived semester and is therefore read-only.

Homework problem assignment #4

Completion requirements

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

\(\begin{align*}
 \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

\( a(t)=\frac{10}{\cos\theta(t)}\)

resulting in \(\ddot z(t)=0\) and the simplified dynamics

\(\begin{align*}
\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)\):

\(\begin{align*}
 |\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.

  • hw4_cvutID.m hw4_cvutID.m
    12 January 2024, 11:53 PM
◄ Julia files for the lecture
M-files for the exercises ►
ORR
Optimal and Robust Control
B232 B232 - Summer 23/24
B162 - Summer 16/17 B172 - Summer 17/18 B182 - Summer 18/19 B192 - Summer 19/20 B202 - Summer 20/21 B212 - Summer 21/22 B222 - Summer 22/23 B242 - Summer 24/25

Grades Teachers Participants
 Contact us  Reset user tour on this page
© 2025 Center for Knowledge Management
Useful links
Faculty website Calendar Study department FELSight Moodle API
Navigation
Log in
CTU logo