Versatile PID Controller Tuner and Simulator with Motor Cont
Version 1.0.0 (1.14 KB) by
Raj
Easily tune and simulate a PID controller for a motor speed system. Supports both automatic pidtuning and manual gain entry.
This function provides a clean, easy-to-use utility for both automatically tuning and simulating a PID controller. It is ideal for students, educators, and engineers learning control systems.
The code is based on the Motor Speed Control problem, a classic example in PID design.
Key Features:
* Dual Mode Operation: Choose between Automatic Tuning (using pidtune) and Manual Tuning (specifying Kp, Ki, Kd).
* Visualization: Generates a figure showing the closed-loop Step Response and the Control Effort (Controller Output) over time.
* Performance Metrics: Automatically calculates and displays key metrics like Settling Time and Overshoot.
System Modeled (Default Plant):
The code uses a standard DC Motor Transfer Function for speed control:
$$P(s) = \frac{1}{0.01s^2 + 0.1s}$$
Getting Started:
matlab <br>% Run with automatic tuning (default) <br>pid_tuner_simulator() <br><br>% Run with manual gains (e.g., Kp=10, Ki=5, Kd=0.1) <br>pid_tuner_simulator(10, 5, 0.1) <br>
Cite As
Raj (2025). Versatile PID Controller Tuner and Simulator with Motor Cont (https://uk.mathworks.com/matlabcentral/fileexchange/182611-versatile-pid-controller-tuner-and-simulator-with-motor-cont), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2025b
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0 |
