Skip to content

mmghorbani/KNTU-Optimal-Control-Course-2023

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KNTU Optimal Control Course 2023

About

This repository contains simulations and visualizations from assignments and projects in the 2023 Optimal Control Course at K. N. Toosi University of Technology, supervised by Dr. Hamid Khaloozadeh (Professor of Systems and Control Engineering). All algorithms are implemented in the MATLAB R2023a environment. The inverted pendulum (cart-pole) system serves as a benchmark for evaluating various optimal control strategies.

Quick Access

Directory Topic Access
DT-LQR Discrete-Time Linear Quadratic Regulator (LQR) GitHub
CT-LQR Continuous-Time Linear Quadratic Regulator (LQR) GitHub
DT-LQT Discrete-Time Linear Quadratic Tracker (LQT) GitHub
CT-LQT Continuous-Time Linear Quadratic Tracker (LQT) GitHub
CT-LQG Continuous-Time Linear Quadratic Gaussian (LQG) GitHub

Benchmark System

Characteristics

The inverted pendulum is an inherently unstable system with highly nonlinear dynamics. This system belongs to the class of under-actuated mechanical systems with fewer control inputs than the degrees of freedom. This renders the control task more challenging, making the inverted pendulum system a classical benchmark for designing, testing, evaluating, and comparing different classical and contemporary control techniques. Being an inherently unstable system, the inverted pendulum is among the most difficult systems and is one of the most important classical problems. The control of an inverted pendulum has been a research interest in control engineering. Due to its importance, a dynamic system is chosen to analyze its dynamic model and propose a control law.

Control Objective

This case study aims to stabilize the inverted pendulum such that the position of the cart on the track is controlled quickly and accurately, so that the pendulum is always erected in its inverted position during such movements. Realistically, this simple mechanical system is representative of a class of attitude control problems whose goal is to maintain the desired vertically oriented position at all times.

Diagram of Model

Mathematical Model

Nonlinear System Equations

$$ \ddot{x} = \frac{u + ml(\sin \theta) \dot{\theta}^2 - mg \cos \theta \sin \theta}{M + m - m \cos^2 \theta} $$

$$ \ddot{\theta} = \frac{u \cos \theta - (M + m)g \sin \theta + ml(\cos \theta \sin \theta) \dot{\theta}^2}{ml \cos^2 \theta - (M + m)l} $$

Linearized State-Space Model

$$ \dot{x}(t) = \begin{bmatrix} 0 & 1 & 0 & 0 \\ \frac{(M+m)g}{Ml} & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ -\frac{mg}{M} & 0 & 0 & 0 \end{bmatrix} x(t) + \begin{bmatrix} 0 \\ -\frac{1}{Ml} \\ 0 \\ \frac{1}{M} \end{bmatrix} u(t) $$

$$ y(t) = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 \end{bmatrix} x(t) $$

References

  • Lewis, Frank L., Draguna Vrabie, and Vassilis L. Syrmos. Optimal control. John Wiley & Sons, 2012.
  • Prasad, Lal Bahadur, Barjeev Tyagi, and Hari Om Gupta. Optimal control of nonlinear inverted pendulum system using PID controller and LQR: performance analysis without and with disturbance input. International Journal of Automation and Computing 11 (2014): 661-670.

Contact

For any questions or additional information regarding the Optimal Control Course 2023, please do not hesitate to contact me at mm.ghorbani@email.kntu.ac.ir.

About

Assignments and projects from the 2023 Optimal Control course at K. N. Toosi University of Technology.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages