This repository is a MATLAB / Simulink learning lab for inverted-pendulum control. It explores classical and modern control methods on the cart-pole benchmark, including PID, cascade PID, pole placement, LQR, LQG, Kalman filtering, and Luenberger observer examples.
The repo is best understood as a concrete companion to robotics-control-learning-labs: the pinned control hub explains the broader control-learning direction, while this repo provides a focused inverted-pendulum application.
This repo supports the public robotics/control portfolio by showing applied control practice on a standard nonlinear benchmark. It connects to the broader research direction through state-space modeling, observer design, controller comparison, tracking/regulation metrics, and MATLAB/Simulink simulation workflows.
It should be treated as a public support artifact, not the main PhD research repository. Unpublished uncertainty-aware control work, paper-specific ablations, and private experiment notes should stay private elsewhere.
The inverted pendulum is a classic benchmark for learning feedback control because it combines instability, nonlinear dynamics, actuator effort, state estimation, and controller tuning in a compact system.
For mobile manipulation research, these control concepts remain useful because scan execution and robot motion depend on stable tracking, observers, disturbance handling, and meaningful comparisons between baseline controllers.
- MATLAB and Simulink inverted-pendulum experiments.
- PID and cascade PID baseline simulations.
- LQR state-feedback examples.
- Pole-placement and Luenberger observer examples.
- LQG / Kalman-filter style simulation workflow.
- Animated demo GIFs for selected controllers.
- Modular utilities under
src/and scenario runners undersim/.
The repository follows a control-learning workflow:
- Define or load inverted-pendulum system parameters.
- Build a state-space model for the cart-pole dynamics.
- Design a controller or observer.
- Run a simulation scenario.
- Compute basic control metrics.
- Plot or animate the response.
- Compare controller behavior and limitations.
Clone the repository and add it to the MATLAB path:
git clone https://github.com/WikiGenius/ipendulum.git
cd ipendulumIn MATLAB:
addpath(genpath(pwd))Example simulations:
sim/run_pid_simulation
sim/run_pid_cascade_simulation
sim/run_lqr_kalman_simulation
sim/run_place_luenberger_simulationThe exact requirements depend on the simulation or Live Script being used.
Example demo GIFs are stored under docs/:
Additional media includes:
docs/ipendulum_demo.gif
docs/demo_cheap_states_LQG.mp4
docs/demo_polePlacement.mp4
.github/workflows/ MATLAB-oriented workflow example
data/ system parameters and setup scripts
docs/ demo GIFs, videos, and documentation media
notebooks/ MATLAB Live Scripts for usage examples
sim/ scenario runners for PID, LQR/LQG, and observer demos
src/ reusable modeling, plotting, and metric utilities
- MATLAB R2021b or newer is recommended.
- Simulink may be required for some workflows.
- Control System Toolbox may be required for controller/observer design functions.
- This is a learning/control lab, not a production controller.
- Some workflows depend on MATLAB Live Scripts and toolbox availability.
- System parameters and demos are intended for reproducible study, not hardware deployment.
- This repo should not contain unpublished PhD algorithms, advisor notes, or private ablation studies.
- The current README documents the public-safe learning value; future work can add clearer metrics tables and more polished result plots.
- Add a short state-space derivation note.
- Add a controller comparison table.
- Add reproducible metric outputs under
results/. - Add a public-safe LQR tuning note linked to
robotics-control-learning-labs. - Clean or remove generated metadata files that are not useful to readers.
- Add a clear rights/license file if this repo is released publicly as open-source.
This repository uses standard inverted-pendulum control concepts from classical control, state-space control, optimal control, and estimation. Cite any textbook, course, MATLAB example, or library used when extending the examples.
This repository is shared for academic portfolio and demonstration purposes. Unless a separate open-source license is added, all rights are reserved by the author.

