{ "cells": [ { "cell_type": "markdown", "id": "45dee56e", "metadata": {}, "source": [ "# Controller with Live Plotting" ] }, { "cell_type": "code", "execution_count": null, "id": "9ab99ff2-911e-427e-8d11-4667c803318c", "metadata": { "tags": [] }, "outputs": [], "source": [ "import numpy as np\n", "\n", "from aeroshield import AeroShield\n", "\n", "from pid_example import PIDController\n", "\n", "# set matplotlib to use separate plotting window\n", "%matplotlib" ] }, { "cell_type": "code", "execution_count": null, "id": "99f14ae8-72eb-4268-ba33-9ce90825da72", "metadata": { "tags": [] }, "outputs": [], "source": [ "# RUNNING THIS MIGHT KILL THE KERNEL (WHICH YOU CAN JUST RESTART, BUT STILL)\n", "\n", "controller = PIDController(AeroShield())\n", "hist = controller.run(200, 2000, 20*np.ones(2000), live_plot=True)\n" ] }, { "cell_type": "code", "execution_count": null, "id": "f1aaaaca-8c43-429c-897c-a39160e46275", "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.10.13" } }, "nbformat": 4, "nbformat_minor": 5 }