{ "cells": [ { "cell_type": "markdown", "id": "61b74748-b617-41a4-970c-296198f50c5d", "metadata": {}, "source": [ "# Introduction to control theory. \n", "\n", "## TP5. State Observers. LQ.\n", "## Study load\n", "\n", "Course grade breakdown:\n", "\n", " Labs - 40%\n", " \n", " Final project presentation 30%\n", "\n", " Final test 30%\n", " \n", "File name for lab submission: yourname_labnumber.ipynb (example: elenavanneaux_TP4.ipynb) \n", "\n", "The completed notebooks should be sent to your tutor (elena.vanneaux@ensta.fr or adnan.saood@ensta.fr) before the beginning of the next session. Please add [APM_4AUT2_TA] to the topic of e-mail.\n", "\n", "## Prerequisites for practice\n", "### Math\n", "During the course, we will cover the following areas of mathematics:\n", " \n", " 1. Linear Algebra\n", "\n", " 2. Calculus\n", "\n", " 3. Differential equations\n", "\n", " 4. Dynamics (Mechanics and Physics)\n", "\n", "### Python programming\n", "In the labs we will use a Python programming language and the following libraries:\n", "\n", " 1. NumPy https://numpy.org/doc/stable/\n", "\n", " 2. SciPy https://docs.scipy.org/doc/scipy/\n", "\n", " 3. Matplotlib https://matplotlib.org/stable/tutorials/index\n", "\n", " 4. SymPy https://docs.sympy.org/latest/tutorials/intro-tutorial/intro.html\n", "\n", " 5. Control System Library https://python-control.readthedocs.io/en/0.10.1/intro.html\n", "\n", "### Jupyter Notebook Markdown Cells Documentation\n", "\n", "Please check on Markdown cells documentation, to provide a fancy look for your notebooks!\n", "\n", "https://jupyter-notebook.readthedocs.io/en/stable/examples/Notebook/Working%20With%20Markdown%20Cells.html" ] }, { "cell_type": "markdown", "id": "89331a9f-f1bf-4cb6-946b-2e9e36c29f8d", "metadata": {}, "source": [ "\n", "\n", "\n", "## TODO\n", "\n", "Last time you have designed a full-state feedback controller $u=-Kx, $ which stabilize the system in steady state\n", "$x = (0,0,0,0).$\n", "\n", "0. If you haven't done this - do it today! And don't hesitate to ask questions if it is unclear.\n", "\n", "This time let us assume that we only measure the position and the angular velocity, while their derivatives are not availabe. I.e. $y_{output} = (y, \\theta)' = Cx,$ where \n", "$$C = \\begin{pmatrix} 1 & 0 & 0 &0 \\\\ 0 & 0 & 1 &0 \\end{pmatrix}$$\n", "\n", "1. Is pair of matrices (A,C) observable? Why is it important? \n", "\n", "2. For an atonomus system\n", "$$\n", "\\dot x = Ax, \\ y = Cx\n", "$$\n", "\n", "design an observer $$\\dot{\\hat{x}} = (A - LC)\\hat{x} + Ly,$$ such that the estimation of the state $\\hat{x}$ converges to real state $x$. To do that we need to find a matrice $L$ such that the matrice $A-LC$ is Hurwits (i.e. all it eiginevalues have negative real part). \n", "\n", "Remark: to place arbitary eigenvalues $\\lambda_1,\\ldots \\lambda_n$ in matrice (A - LC) with matrice L, it is the same as to place $\\lambda_1,\\ldots \\lambda_n$ in matrice $(A^T - C^TL^T)$ with matrice $L^T$. \n", "\n", "Plot a real trajectory $x$ strarting from the point $x_0 = (2,0,1,0)$ and its estimation $\\hat{x}$ strating from the point $\\hat{x}_0 = (3,-1,2,0.5)$ to show convergence.\n", "\n", "3. Design an optimal estimator (LQE) and optimal estimated state feedback controller (LQR) which stabilize the system in (0,0,0,0).\n", "\n", "Remark: See slide \"observer and controller\" in the lecture." ] }, { "cell_type": "code", "execution_count": null, "id": "15a8285e-6234-4310-aec6-c5561f982f1b", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "id": "3a5e25b5-f3ea-458d-991d-df0c65863bc3", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.5" } }, "nbformat": 4, "nbformat_minor": 5 }