An open API service indexing awesome lists of open source software.

https://github.com/dhanushgit03/dc-motor-speed-control-simulation

Simulink-based closed-loop DC motor speed control system using a PID controller, with motor parameter initialization via MATLAB scripts and performance analysis through scopes.
https://github.com/dhanushgit03/dc-motor-speed-control-simulation

control-systems dc-motor matlab matlab-project motor-simulation pid pid-controller simulink

Last synced: 6 months ago
JSON representation

Simulink-based closed-loop DC motor speed control system using a PID controller, with motor parameter initialization via MATLAB scripts and performance analysis through scopes.

Awesome Lists containing this project

README

          

# DC Motor Speed Control Simulation ๐Ÿš€

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.

---

## ๐Ÿง  Project Objectives

- 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.

---

## ๐Ÿ› ๏ธ Files Included

| 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.

---

## ๐Ÿงช Technologies Used

- **MATLAB** (for scripting and parameter definition)
- **Simulink** (for block diagram-based modeling)
- **Control System Toolbox**
- **PID Controller Tuning**

---

## โš™๏ธ How to Run

1. Clone the repository:
```bash
git clone https://github.com/DhanushGit03/DCMotorSpeedControlSimulation.git
2. Open the `.prj` file in MATLAB by navigating to the cloned folder using the `Open Folder` option.


Model Properties

3. Now right-click on the `Simulink model` and select `Model Properties`.
4. Navigate to the `Call Backs` tab, then paste the saved file contents from `Machine_Parameters.m` into the appropriate callback section (such as `InitFcn`).
5. Click `Apply` and then `OK`.
6. Click the `Run` button in Simulink to start the simulation.