|
| 1 | +# Virtual Controls Laboratory |
| 2 | +[](https://www.mathworks.com/matlabcentral/fileexchange/) or [](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Virtual-Controls-Laboratory&project=VirtualControlsLaboratory.prj) |
| 3 | + |
| 4 | +**Curriculum Module** |
| 5 | +_Created with R2021a. Compatible with R2021a and later releases._ |
| 6 | + |
| 7 | +## Description ## |
| 8 | +The Virtual Controls Laboratory contains virtual models of several mechanisms commonly used in controls courses. These virtual mechanisms offer opportunities to visually analyze dynamic systems, identify system parameters, design and test controllers, among others. Instructions for four introductory labs are included. These labs are designed to give an intuitive introduction to basic controls concepts, such as feedback control. Students also have the opportunity to implement and test simple controllers in Simulink®. |
| 9 | + |
| 10 | +Get started with the Virtual Controls Laboratory by downloading and unzipping the repository. Then, double-click the project .prj file inside MATLAB®. From there, you can follow the landing page instructions to get started with the labs and virtual mechanisms. |
| 11 | + |
| 12 | +## Details ## |
| 13 | + |
| 14 | +### Virtual Mechanisms ### |
| 15 | +<table> |
| 16 | +<tr> |
| 17 | + <td width=290> |
| 18 | + <b>Cruise control</b> |
| 19 | + <br><code>CruiseControl.slx</code> |
| 20 | + <img src = "./SupportingFiles/gifs/vehiclecover.png" alt="Vehicle animation" width=250> |
| 21 | + </td> |
| 22 | + <td width=290> |
| 23 | + <b>DC motor</b> |
| 24 | + <br><code>DCMotorControl.slx</code> |
| 25 | + <img src = "./SupportingFiles/gifs/dcmotor.gif" alt="DC motor animation" width=250> |
| 26 | + </td> |
| 27 | + <td width=290> |
| 28 | + <b>Inverted pendulum</b> |
| 29 | + <br><code>InvertedPendulum.slx</code> |
| 30 | + <img src = "./SupportingFiles/gifs/invertedpendulum.gif" alt="Inverted pendulum animation" width=250> |
| 31 | + </td> |
| 32 | +</tr> |
| 33 | +<tr> |
| 34 | + <td width=290> |
| 35 | + <b>Rotary pendulum</b> |
| 36 | + <br><code>RotaryPendulum.slx</code> |
| 37 | + <img src = "./SupportingFiles/gifs/rotarypendulum.gif" alt="Rotary pendulum animation" width=250> |
| 38 | + </td> |
| 39 | + <td width=290> |
| 40 | + <b>Ball and beam</b> |
| 41 | + <br><code>BallAndBeam.slx</code> |
| 42 | + <img src = "./SupportingFiles/gifs/ballbeam.gif" alt="Ball and beam animation" width=250> |
| 43 | + </td> |
| 44 | + <td width=290> |
| 45 | + <b>Ball and plate</b> |
| 46 | + <br><code>BallAndPlate.slx</code> |
| 47 | + <img src = "./SupportingFiles/gifs/ballplate.gif" alt="Ball and plate animation" width=250> |
| 48 | + </td> |
| 49 | +</tr> |
| 50 | +</table> |
| 51 | + |
| 52 | + |
| 53 | +### Labs ### |
| 54 | +**Lab 1: Cruise control `(Lab1_CruiseControl.mlx)`** |
| 55 | +A virtual lab that explores the basics of open-loop and feedback control. |
| 56 | + |
| 57 | +**Learning Goals:** |
| 58 | +- Compare and contrast open-loop and feedback control. |
| 59 | +- Implement a simple open-loop controller in Simulink. |
| 60 | +- Analyze the performance of an open-loop controller. |
| 61 | +- Implement a proportional controller in Simulink. |
| 62 | +- Analyze the performance of a proportional controller. |
| 63 | + |
| 64 | +## ## |
| 65 | +**Lab 2: Vehicle Transfer Function Model `(Lab2_VehicleModel.mlx)`** |
| 66 | +In this lab, students derive a transfer function model of a virtual vehicle. |
| 67 | + |
| 68 | +**Learning Goals:** |
| 69 | +- Derive the transfer function of a first order system. |
| 70 | +- Compare the transfer function and virtual vehicle responses. |
| 71 | +- Identify the model parameters for the virtual vehicle. |
| 72 | + |
| 73 | +## ## |
| 74 | +**Lab 3: Position Control `(Lab3_PositionControl.mlx)`** |
| 75 | +In this lab, students implement a PID controller to control the position of a virtual DC motor. |
| 76 | + |
| 77 | +**Learning Goals:** |
| 78 | +- Implement a PID controller. |
| 79 | +- Identify rise time, settling time, overshoot, and peak time. |
| 80 | +- Explain how changes to PID parameters affect the time-domain response. |
| 81 | + |
| 82 | +## ## |
| 83 | +**Lab 4: Position Control Analysis `(Lab4_PositionAnalysis.mlx)`** |
| 84 | +In this lab, students construct and analyze the closed-loop transfer function of a feedback controller. |
| 85 | + |
| 86 | +**Learning Goals:** |
| 87 | +- Construct a closed-loop transfer function. |
| 88 | +- Plot the step response of a closed-loop transfer function. |
| 89 | +- Identify the poles of a closed-loop transfer function. |
| 90 | +- Assess the stability of a closed-loop transfer function. |
| 91 | + |
| 92 | +## Suggested Prework ## |
| 93 | +[MATLAB Onramp](https://matlabacademy.mathworks.com/details/matlab-onramp/gettingstarted) – a free two-hour introductory tutorial that teaches the essentials of MATLAB. |
| 94 | +<br> |
| 95 | +[Simulink Onramp](https://matlabacademy.mathworks.com/details/simulink-onramp/simulink) – a free three-hour introductory tutorial that teaches the essentials of Simulink. |
| 96 | + |
| 97 | +## Products ## |
| 98 | +MATLAB, Simulink, Control System Toolbox™, Simscape™, Simscape Multibody™, Simscape Driveline™ |
| 99 | + |
| 100 | +## License ## |
| 101 | +The license for this module is available in the [LICENSE.md](license.md) file in this GitHub repository. |
| 102 | + |
| 103 | +## Educator Resources ## |
| 104 | +* [Featured Courseware](https://www.mathworks.com/academia/courseware/course-materials.html) |
| 105 | +* [Teach with MATLAB and Simulink](https://www.mathworks.com/academia/educators.html) |
| 106 | +* [MATLAB Grader](https://www.mathworks.com/products/matlab-grader.html) |
| 107 | + |
| 108 | +The lab solutions are available upon instructor request. If you would like to request solutions or have a question, contact the < a href= "mailto:[email protected]">MathWorks online teaching team.</ a> If you are having technical issues using MATLAB, please contact our [Technical Support Team ](https://www.mathworks.com/support/contact_us.html). |
| 109 | + |
| 110 | +# # |
| 111 | + |
| 112 | +_Copyright 2023-2024 The MathWorks, Inc._ |
0 commit comments