Přejít k hlavnímu obsahu
Přihlásit se
Čeština ‎(cs)‎ English ‎(en)‎
Dokumentace
Čeština ‎(cs)‎ English ‎(en)‎

Optimal and Robust Control

B3M35ORR + BE3M35ORR + BE3M35ORC
  1. Titulní stránka
  2. Kurzy
  3. BE3M35ORR, B3M35ORR, BE3M35ORC - B212
  4. 21. března - 27. března
  5. Homework problem assignment #6
Tento kurz je součástí již archivovaného semestru, a proto je dostupný pouze pro čtení.

Homework problem assignment #6

Požadavky na absolvování
Termín: pondělí, 28. března 2022, 22.33

Find the optimal trajectory (both states and controls) minimizing the following cost function

\(
\int_0^{5} u^2(t) dt
\)

and getting the pendulum modelled by

\(
\begin{array}{rl}
\dot{x}_1(t) &= x_2(t), \\
\dot{x}_2(t) &= -a_1 \sin (x_1(t)) - a_2 x_2(t) + a_3 u(t) ,
\end{array}
\)

from \(x_1(0)=0, x_2(0)=0\) to \(x_1(5)=\pi, x_2(5)=0\). Parameters of the model are \(a_1 = 9.81\), \(a_2 = 0.1\) and \(a_3 = 1\).

This problem is an instance of an Optimal Control Problem with a fixed final state and on a finite time horizon. As such, its solution leads to a Two-Point Boundary Value Problem (TP-BVP) and thus it can be solved in Matlab by the function bvp4c. You should proceed as follows:

  1. Formulate the Hamiltonian.
  2. Calculate the first-order necessary conditions—this way, you get the state and costate differential equations and the stationarity equation.
  3. Express \(u(t)\) from the stationarity equation and substitute it to the state and costate differential equations.
  4. Use bvp4c() to solve the TP-BVP—the problem given by the state and costate differential equations together with the boundary conditions for the state at the beginning and end of the control horizon. You can check the correctness of your solution by comparing it with the trajectory used in this week's lab exercise problem. They should match each other. If the trajectories differ, you either derived the TP-BVP incorrectly, or you initialized the bvp4c() solver so that it got stuck in a local minimum. 

Implement your solution as a function with the header of the following form:

function [ t_star, x_star, u_star ] = hw6_cvutID()

where cvutID is your KOS username, t_star is the time vector of the trajectory, x_star is the state trajectory and u_star is the control trajectory. You are free to choose the sampling of the time interval [0, 5]; in other words, time samples in t_star can be arbitrarily spaced.

You can submit only one m-file. If you need more functions, you can use nested functions (for details, see this).

◄ M-files for the lecture
Solution of Homework problem assignment #6 ►
ORR
Optimal and Robust Control
B212 B212 - Letní 21/22
B162 - Letní 16/17 B172 - Letní 17/18 B182 - Letní 18/19 B192 - Letní 19/20 B202 - Letní 20/21 B222 - Letní 22/23 B232 - Letní 23/24 B242 - Letní 24/25

Známky Vyučující Účastníci
 Kontaktujte nás  Spustit znovu Průvodce uživatele
© 2025 Centrum znalostního managementu
Užitečné odkazy
Web fakulty Harmonogram Studijní oddělení FELSight Moodle API
Navigace
Přihlásit se
CTU logo