{"id":21478405,"url":"https://github.com/mathworks-teaching-resources/virtual-controls-laboratory","last_synced_at":"2025-04-07T05:10:51.802Z","repository":{"id":65782033,"uuid":"412076409","full_name":"MathWorks-Teaching-Resources/Virtual-Controls-Laboratory","owner":"MathWorks-Teaching-Resources","description":"Virtual labs and mechanisms for studying controls.","archived":false,"fork":false,"pushed_at":"2024-10-30T02:37:29.000Z","size":49310,"stargazers_count":73,"open_issues_count":0,"forks_count":18,"subscribers_count":10,"default_branch":"release","last_synced_at":"2025-03-30T22:11:08.166Z","etag":null,"topics":["control-systems-engineering","controls","courseware","cwm","electrical-engineering","matlab","mechanical-engineering","simulink","virtual-lab"],"latest_commit_sha":null,"homepage":"","language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MathWorks-Teaching-Resources.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-30T13:28:50.000Z","updated_at":"2025-03-20T11:17:05.000Z","dependencies_parsed_at":"2024-08-29T18:59:56.313Z","dependency_job_id":"76a6975a-d93c-471d-9ba2-d641b0550bfd","html_url":"https://github.com/MathWorks-Teaching-Resources/Virtual-Controls-Laboratory","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MathWorks-Teaching-Resources%2FVirtual-Controls-Laboratory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MathWorks-Teaching-Resources%2FVirtual-Controls-Laboratory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MathWorks-Teaching-Resources%2FVirtual-Controls-Laboratory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MathWorks-Teaching-Resources%2FVirtual-Controls-Laboratory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MathWorks-Teaching-Resources","download_url":"https://codeload.github.com/MathWorks-Teaching-Resources/Virtual-Controls-Laboratory/tar.gz/refs/heads/release","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247595335,"owners_count":20963943,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["control-systems-engineering","controls","courseware","cwm","electrical-engineering","matlab","mechanical-engineering","simulink","virtual-lab"],"created_at":"2024-11-23T11:18:09.652Z","updated_at":"2025-04-07T05:10:51.765Z","avatar_url":"https://github.com/MathWorks-Teaching-Resources.png","language":"MATLAB","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# \u003cspan style=\"color:rgb(213,80,0)\"\u003eVirtual Controls Laboratory\u003c/span\u003e\n\n\n[![View on File Exchange](https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg)](https://www.mathworks.com/matlabcentral/fileexchange/100064-virtual-hardware-and-labs-for-controls) or [![Open in MATLAB Online](https://www.mathworks.com/images/responsive/global/open-in-matlab-online.svg)](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Virtual-Controls-Laboratory\u0026project=VirtualControlsLaboratory.prj\u0026file=README.mlx)\n\n[![MATLAB Versions Tested](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2FMathWorks-Teaching-Resources%2FVirtual-Controls-Laboratory%2Frelease%2FImages%2FTestedWith.json)](https://MathWorks-Teaching-Resources.github.io/Virtual-Controls-Laboratory)\n\n**Curriculum Module**\n\n_Created with R2024b. Compatible with R2024b and later releases._\n\n# Information\n\nThis curriculum module contains interactive [MATLAB® live scripts](https://www.mathworks.com/products/matlab/live-editor.html) and [Simulink](https://www.mathworks.com/products/simulink.html) models that teaches common concepts used in controls courses.\n\n\n## Background\n\nYou can use these live scripts as demonstrations in lectures, class activities, or interactive assignments outside class. These virtual labs 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.\n\n\nThe instructions inside the live scripts will guide you through the exercises and activities. Get started with each live script by running it one section at a time. To stop running the script or a section midway (for example, when an animation is in progress), use the \u003cimg src=\"Images/EndIcon.png\" width=\"19\" alt=\"EndIcon.png\"\u003e Stop button in the **RUN** section of the **Live Editor** tab in the MATLAB Toolstrip.\n\n## Contact Us\n\nSolutions are available upon instructor request. Contact the [MathWorks teaching resources team](mailto:onlineteaching@mathworks.com) if you would like to request solutions, provide feedback, or if you have a question.\n\n\n## Prerequisites\n\nThis module assumes basic knowledge of algebra, differential equations and control system theory. There is minimal MATLAB knowledge required for these scripts and app, but you could use [MATLAB Onramp](https://matlabacademy.mathworks.com/details/matlab-onramp/gettingstarted), [Simulink Onramp](https://matlabacademy.mathworks.com/details/simulink-onramp/simulink) and [Control Design Onramp with Simulink](https://matlabacademy.mathworks.com/details/control-design-onramp-with-simulink/controls) as resources to acquire familiarity with MATLAB syntax, live scripts, and Simulink models and controls.\n\n\n## Getting Started\n### Accessing the Module\n### **On MATLAB Online:**\n\nUse the [\u003cimg src=\"Images/OpenInMO.png\" width=\"136\" alt=\"OpenInMO.png\"\u003e](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Virtual-Controls-Laboratory\u0026project=VirtualControlsLaboratory.prj) link to download the module. You will be prompted to log in or create a MathWorks account. The project will be loaded, and you will see an app with several navigation options to get you started.\n\n### **On Desktop:**\n\nDownload or clone this repository. Open MATLAB, navigate to the folder containing these scripts and double\\-click on [VirtualControlsLaboratory.prj](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Virtual-Controls-Laboratory\u0026project=VirtualControlsLaboratory.prj). It will add the appropriate files to your MATLAB path and open an app that asks you where you would like to start. \n\n\nEnsure you have all the required products (listed below) installed. If you need to include a product, add it using the Add\\-On Explorer. To install an add\\-on, go to the **Home** tab and select  \u003cimg src=\"Images/AddOnsIcon.png\" width=\"16\" alt=\"AddOnsIcon.png\"\u003e **Add-Ons** \u003e **Get Add-Ons**. \n\n\n## Products\n\n *MATLAB* is used throughout. Tools from *Simulink*, *Control System Toolbox™, Simscape™, Simscape Multibody™, and Simscape Driveline™* are used frequently as well.\n\n\n# Scripts\n\n *If you are viewing this in a version of MATLAB prior to R2023b, you can view the learning outcomes for each script* [*here*](https://www.mathworks.com/matlabcentral/fileexchange/100064-virtual-hardware-and-labs-for-controls)\n\n## [**CruiseControl.mlx**](./Scripts/CruiseControl.mlx)\n|      |      |      |\n| :-- | :-- | :-- |\n|  | **In this script, students will...** \u003cbr\u003e  | **Academic disciplines** \u003cbr\u003e   |\n| \u003cimg src=\"Images/image_3.png\" width=\"231\" alt=\"image_3.png\"\u003e \u003cbr\u003e  | • Compare and contrast open\\-loop and feedback control. \u003cbr\u003e • Implement a simple open\\-loop controller in Simulink. \u003cbr\u003e • Analyze the performance of an open\\-loop controller. \u003cbr\u003e • Implement a proportional controller in Simulink. \u003cbr\u003e • Analyze the performance of a proportional controller. \u003cbr\u003e  | • Mechanical Engineering \u003cbr\u003e • Electrical Engineering \u003cbr\u003e • Mathematics \u003cbr\u003e   |\n|      |      |       |\n\n## [**VehicleModel.mlx**](./Scripts/VehicleModel.mlx)\n|      |      |      |\n| :-- | :-- | :-- |\n|  | **In this script, students will...** \u003cbr\u003e  | **Academic disciplines** \u003cbr\u003e   |\n| \u003cimg src=\"Images/image_4.png\" width=\"231\" alt=\"image_4.png\"\u003e \u003cbr\u003e  | • Derive the transfer function of a first order system. \u003cbr\u003e • Compare the transfer function and virtual vehicle responses. \u003cbr\u003e • Identify the model parameters for the virtual vehicle. \u003cbr\u003e  | • Mechanical Engineering \u003cbr\u003e • Electrical Engineering \u003cbr\u003e • Mathematics \u003cbr\u003e   |\n|      |      |       |\n\n## [**PositionControl.mlx**](./Scripts/PositionControl.mlx)\n|      |      |      |\n| :-- | :-- | :-- |\n|  | **In this script, students will...** \u003cbr\u003e  | **Academic disciplines** \u003cbr\u003e   |\n| \u003cimg src=\"Images/image_5.png\" width=\"231\" alt=\"image_5.png\"\u003e \u003cbr\u003e  | • Implement a PID controller. \u003cbr\u003e • Identify rise time, settling time, overshoot, and peak time. \u003cbr\u003e • Explain how changes to PID parameters affect the time\\-domain response. \u003cbr\u003e  | • Mechanical Engineering \u003cbr\u003e • Electrical Engineering \u003cbr\u003e • Mathematics \u003cbr\u003e   |\n|      |      |       |\n\n## [**PositionAnalysis.mlx**](./Scripts/PositionAnalysis.mlx)\n|      |      |      |\n| :-- | :-- | :-- |\n|  | **In this script, students will...** \u003cbr\u003e  | **Academic disciplines** \u003cbr\u003e   |\n| \u003cimg src=\"Images/image_6.png\" width=\"231\" alt=\"image_6.png\"\u003e \u003cbr\u003e  | • Construct a closed\\-loop transfer function. \u003cbr\u003e • Plot the step response of a closed\\-loop transfer function. \u003cbr\u003e • Identify the poles of a closed\\-loop transfer function. \u003cbr\u003e • Assess the stability of a closed\\-loop transfer function. \u003cbr\u003e  | • Mechanical Engineering \u003cbr\u003e • Electrical Engineering \u003cbr\u003e • Mathematics \u003cbr\u003e   |\n|      |      |       |\n\n\n# Virtual Labs\n\nVirtual labs is the idea of taking hardware and converting it into a realistic computer simulation. This allows the user to expand their intuition and test beyond the capabilities of the hardware. Below is a set of virtual mechanisms available in this module to explore:\n\n|      |      |      |\n| :-- | :-- | :-- |\n| [**CruiseControl.slx**](./Models/CruiseControl.slx) \u003cbr\u003e  | [**DCMotorControl.slx**](./Models/DCMotorControl.slx) \u003cbr\u003e  | [**InvertedPendulum.slx**](./Models/InvertedPendulum.slx) \u003cbr\u003e   |\n| \u003cimg src=\"Images/image_7.gif\" width=\"171\" alt=\"image_7.gif\"\u003e \u003cbr\u003e  | \u003cimg src=\"Images/image_8.gif\" width=\"171\" alt=\"image_8.gif\"\u003e \u003cbr\u003e  | \u003cimg src=\"Images/image_9.gif\" width=\"171\" alt=\"image_9.gif\"\u003e \u003cbr\u003e   |\n| [**RotaryPendulum.slx**](./Models/RotaryPendulum.slx) \u003cbr\u003e  | [**BallAndBeam.slx**](./Models/BallAndBeam.slx) \u003cbr\u003e  | [**BallAndPlate.slx**](./Models/BallAndPlate.slx) \u003cbr\u003e   |\n| \u003cimg src=\"Images/image_10.gif\" width=\"171\" alt=\"image_10.gif\"\u003e \u003cbr\u003e  | \u003cimg src=\"Images/image_11.gif\" width=\"171\" alt=\"image_11.gif\"\u003e \u003cbr\u003e  | \u003cimg src=\"Images/image_12.gif\" width=\"171\" alt=\"image_12.gif\"\u003e \u003cbr\u003e   |\n|      |      |       |\n\n# License\n\nThe license for this module is available in the [LICENSE.md](https://github.com/MathWorks-Teaching-Resources/Virtual-Controls-Laboratory/blob/release/LICENSE.md).\n\n\n# Related Courseware Modules\n## [Fourier Analysis](https://www.mathworks.com/matlabcentral/fileexchange/106725-fourier-analysis?s_tid=srchtitle)\n|      |      |\n| :-- | :-- |\n| \u003cimg src=\"Images/image_13.jpeg\" width=\"171\" alt=\"image_13.jpeg\"\u003e \u003cbr\u003e  | **Available on:** \u003cbr\u003e [\u003cimg src=\"Images/OpenInFX.png\" width=\"91\" alt=\"OpenInFX.png\"\u003e](https://www.mathworks.com/matlabcentral/fileexchange/106725-fourier-analysis?s_tid=srchtitle)  \u003cbr\u003e [\u003cimg src=\"Images/OpenInMO.png\" width=\"136\" alt=\"OpenInMO.png\"\u003e](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Fourier-Analysis\u0026project=FourierAnalysis.prj)  \u003cbr\u003e [GitHub](https://github.com/MathWorks-Teaching-Resources/Fourier-Analysis)  \u003cbr\u003e   |\n|      |       |\n\n## [Transfer Function Analysis of Dynamic Systems](https://www.mathworks.com/matlabcentral/fileexchange/94635-transfer-function-analysis-of-dynamic-systems?s_tid=srchtitle)\n|      |      |\n| :-- | :-- |\n| \u003cimg src=\"Images/image_16.png\" width=\"171\" alt=\"image_16.png\"\u003e \u003cbr\u003e  | **Available on:** \u003cbr\u003e [\u003cimg src=\"Images/OpenInFX.png\" width=\"91\" alt=\"OpenInFX.png\"\u003e](https://www.mathworks.com/matlabcentral/fileexchange/94635-transfer-function-analysis-of-dynamic-systems?s_tid=srchtitle)  \u003cbr\u003e [\u003cimg src=\"Images/OpenInMO.png\" width=\"136\" alt=\"OpenInMO.png\"\u003e](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Transfer-Function-Analysis-of-Dynamic-Systems\u0026project=TransferFunctions.prj)  \u003cbr\u003e [GitHub](https://github.com/MathWorks-Teaching-Resources/Transfer-Function-Analysis-of-Dynamic-Systems) \u003cbr\u003e   |\n|      |       |\n\n\nFeel free to explore our other [modular courseware content](https://www.mathworks.com/matlabcentral/fileexchange/?q=tag%3A%22courseware+module%22\u0026sort=downloads_desc_30d).\n\n\n# Educator Resources\n-  [Educator Page](https://www.mathworks.com/academia/educators.html) \n\n# Contribute \n\nLooking for more? Find an issue? Have a suggestion? Please contact the [MathWorks teaching resources team](mailto:%20onlineteaching@mathworks.com). If you want to contribute directly to this project, you can find information about how to do so in the [CONTRIBUTING.md](https://github.com/MathWorks-Teaching-Resources/Virtual-Controls-Laboratory/blob/release/CONTRIBUTING.md) page on GitHub.\n\n\n *©* Copyright 2023 The MathWorks™, Inc\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathworks-teaching-resources%2Fvirtual-controls-laboratory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathworks-teaching-resources%2Fvirtual-controls-laboratory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathworks-teaching-resources%2Fvirtual-controls-laboratory/lists"}