This repository contains a Simulink-based simulation project to model and control the speed of a DC motor using classical control techniques such as the PID controller. This project is useful for students and enthusiasts interested in control systems, modeling, and real-time simulation with MATLAB & Simulink.
- Model a DC motor using its physical parameters.
- Design and tune a PID controller to maintain desired motor speed.
- Analyze performance (overshoot, settling time, rise time).
- Visualize system response with scopes and plots.
- Demonstrate closed-loop speed regulation under step inputs.
File/Folder | Description |
---|---|
MyModel.slx |
Main Simulink model file |
MyModel.slxc |
Simulink cache file (auto-generated, ignored going forward) |
Machine_Parameters.m |
MATLAB script defining motor parameters |
DCMotorSpeedControlSimulation.prj |
Simulink Project file |
resources/project/ |
Additional model assets or references |
Note: You can ignore .slxc
— it's an auto-generated Simulink cache file not needed for version control or manual editing.
- MATLAB (for scripting and parameter definition)
- Simulink (for block diagram-based modeling)
- Control System Toolbox
- PID Controller Tuning
- Clone the repository:
git clone https://github.com/DhanushGit03/DCMotorSpeedControlSimulation.git
- Open the
.prj
file in MATLAB by navigating to the cloned folder using theOpen Folder
option.
- Now right-click on the
Simulink model
and selectModel Properties
. - Navigate to the
Call Backs
tab, then paste the saved file contents fromMachine_Parameters.m
into the appropriate callback section (such asInitFcn
). - Click
Apply
and thenOK
. - Click the
Run
button in Simulink to start the simulation.