{ "cells": [ { "cell_type": "markdown", "id": "b545d08a", "metadata": {}, "source": [ "### PID Controller\n", "\n", "A control system aims to keep the pendulum balanced using feedback.\n", "\n", "Main Elements\n", "\n", "- **Plant**: The physical system to be controlled (e.g., pendulum)\n", "- **Controller**: Algorithm producing control signals\n", "- **Sensor**: Measures the system state\n", "- **Actuator**: Applies control input (motor)\n", "- **Feedback**: Uses sensor data to adjust behavior\n", "\n", "Feedback Control\n", "\n", "Continuously reduces error by adjusting inputs based on outputs.\n", "\n", "- **Bang-bang**: All-or-nothing control; fast but unstable.\n", "- **PID**: Combines:\n", " \n", " $$ \n", " u(t) = K_p e(t) + K_i \\int e(t) \\, dt + K_d \\frac{de(t)}{dt}\n", " $$ \n", "\n", "- **LQR**: Uses optimal gains to minimize cost function:\n", "- \n", " $$ \n", " u = -Kx\n", " $$ \n", "\n", " where $x$ is the system state and $K$ is the gain matrix." ] } ], "metadata": { "language_info": { "name": "python" } }, "nbformat": 4, "nbformat_minor": 5 }