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. 18. dubna - 24. dubna
  5. Homework problem assignment #8 - Retest
Tento kurz je součástí již archivovaného semestru, a proto je dostupný pouze pro čtení.

Homework problem assignment #8 - Retest

Požadavky na absolvování
Otevřené: pátek, 22. dubna 2022, 00.00
Termín: úterý, 10. května 2022, 23.59
Trajectory Optimization for a Pendulum

Find a trajectory (both states and controls) getting a pendulum modeled 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(T_\mathrm{f})=\pi, x_2(T_\mathrm{f})=0\) in the shortest possible time \(T_\mathrm{f}\). Parameters of the model are \(a_1 = 9.81\), \(a_2 = 0.1\) and \(a_3 = 1\) and the control \(u(t)\) is limited by \(|u(t)|<2.75\). Use direct collocation method to solve this problem. Discretize the control horizon by \(N=50\) equidistantly spaced points.

As you have realized during the seminar, the direct transcription method is very easy to implement but, unfortunately, can require a large number of discretization points to provide accurate enough trajectories. In this homework assignment, your goal essentially is to take the code from the seminar, modify the objective function and replace the direct transcription method by a direct collocation method.

There are many sources describing Direct Collocation methods. A more general introduction to these methods can be found in a paper by Hargraves and Paris [1] and a possibly more accessible (meaning easier to grasp) exposition can be found in this blog post.

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

function [ t_star, x_star, u_star, Tf_star ] = hw8_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. 

If you do not want to write the whole code from scratch, you may base your solution on the attached file. You can submit only one m-file. If you need more functions, you can use nested functions (for details, see this).

[1] C. R. Hargraves and S. W. Paris, “Direct trajectory optimization using nonlinear programming and collocation,” Journal of Guidance, Control, and Dynamics, vol. 10, no. 4, pp. 338–342, 1987.

  • hw8_cvutID.m hw8_cvutID.m
    24. ledna 2022, 01.17
◄ Homework problem assignment #7 - Retest
Learning goals ►
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