Résultats pour
Attention all Controls Professors, Teaching Assistants, and Students!
The Virtual Hardware and Labs for Controls by Brian Hong is an absolute must-have from the MATLAB Central File Exchange. With the help of Simscape for physical modelling and simulation of mechatronic systems,
- students can use the interactive experiments to teach themselves some of the concepts of control theory in a learn by doing approach.
- professors and TA’s can use this to replace or augment actual lab work.
With tightening budgets and/or in person class restrictions this can help you transfer these vital skills to the students in a fun manner. Here is an overview of the available modules:
https://www.mathworks.com/matlabcentral/fileexchange/100064-virtual-hardware-and-labs-for-controls
If you have any questions feel free to leave a comment below and I’ll get back to you.
Virtual Hardware and Labs for Controls
Virtual labs and mechanisms for studying controls.
Prof. Ayse Tekes shares her story on teaching labs remotely with Simscape:
Virtual Versions of Lab Equipment Recreate a Hands-On Experience
Kennesaw State University recreates a hands-on experience for students during the COVID-19 pandemic.
One of the objectives of lab-based instruction can be to develop students’ familiarity with hardware equipment. When students could no longer come to their lab in person, educators at HTW Dresden developed a MATLAB app using App Designer to replicate the controls on lab equipment such as a signal generator and oscilloscope. Read this article to learn more about how Dr. Henker and Dr. Kelber virtualized their electrical engineering labs.
If you use Simulink or Simscape models for your virtual labs, you can create an interactive display of controls and displays within your model diagram using blocks from the Dashboard library. To do so, connect block parameters to control blocks (knobs, buttons, and switches) and signals to displays blocks (scopes and gauges).
New customizable Knob, Vertical Slider, and Horizontal Slider blocks introduced in R2021a let you choose your own background image, foreground image, handle or slider image, and scale appearance. By combining these with custom gauge blocks, you can create intuitive and photo-realistic dashboards for interacting with your models, such as in the image below.
View examples of controlling simulations with interactive displays, or read some more Tips for Moving your Lab-based Classes Online.
MATLAB, Simulink, and their support for a variety of low-cost hardware has allowed many students to continue benefit from project-based learning, even from their own homes. Popular choices include the Arduino Engineering Kit and Raspberry Pi.
If you use or are considering using Raspberry Pi for your class, your students could benefit from using the Raspberry Pi Resource Monitor App. This app, introduced in MATLAB R2020b, will allow them to graphically configure target boards, deploy Simulink models and MATLAB functions, manage peripheral devices and interfaces, and perform common troubleshooting steps. Such an approach can simplify many of the technical challenges faced by educators who adopt a ‘Hardware at Home’ approach for their lab-based classes.
Click here to learn more about Raspberry Pi support from MATLAB and Simulink.
You may also want to learn more about Virtual Labs and Projects with MATLAB and Simulink, or read some Tips for Moving your Lab-based Classes Online.
MATLAB EXPO 2021 was held earlier this week. This global online event featured presentations and hands-on workshops covering topics from AI, to Application Deployment, and from Algorithm Development, to Teaching with MATLAB and Simulink. Dr. Magnus Egerstedt, Steve W. Chaddick School Chair and Professor of Electrical and Computer Engineering at Georgia Institute of Technology, spoke about Robotarium - a remotely accessible swarm robotics lab that remains freely accessible to anyone.
Robotarium allows users from all over the world to upload control code written in MATLAB and run experiments. Creating a swarm robotics lab is resource intensive, so such a remote access solution can be a great alternative. Watch Prof. Egerstedt introduce Robotarium.
You may also want to learn more about Virtual Labs and Projects with MATLAB and Simulink, or read some Tips for Moving your Lab-based Classes Online. If you are in China, Japan, or Korea, click here to register for dedicated EXPO events this summer.
Many educators use Simulink for their virtual labs. Starting in R2021a, you can add comments to blocks in a Simulink model. If you use Simulink in your class, you can use this to prompt questions to your students or to provide them feedback. Students working in groups can collaborate directly in the Simulink Editor, such as by suggesting alternative designs.
Click here to learn how to view, add, and reply to comments on blocks.
You may also want to learn more about Virtual Labs and Projects with MATLAB and Simulink, or read some Tips for Moving your Lab-based Classes Online.
Here's an example of virtualizing a lab course.
Virtualizing Electrical Engineering Teaching Labs
HTW Dresden digitized labs to support online learning. For “Signals and Systems,” instructors created digital replicas of hardware in MATLAB for students to complete experiments interactively at home.
I just highlighted an app on File Exchange for emulating an experiment. Great idea for doing lab classes with software. What I like about this app is that it incorporates statistical variance and measurement noise that comes from physical experiments.
Read more about it here:
https://blogs.mathworks.com/pick/2020/11/20/emulating-a-physical-experiment-of-measuring-mms/

Emulating a physical experiment of measuring M&M’s
Jiro's Pick this week is M&M statistics by Lisa R. Thompson.A common challenge I hear from educators is how to conduct courses that involve experiments or some sort of hardware interactions during this pandemic. If students are not able to be present in the classroom where the instruments are then you may need to become creative in how you teach.
One great thing about IoT projects is they are connected to the internet, and that creates an opportunity to collaborate at a distance. Here are resources to help you teach classes that involve remote learning.

- Record and visualize your experiment's data in ThingSpeak channels. For example, this public soil monitor channel shows measurements from a sensor connected to a plant. You can see the ThingSpeak example pages for help getting your experiment connected.

- If you don’t have your own equipment see one of our 1,000,000 existing channels. Check out over 200,000 public channels at ThingSpeak.com.
- Use the fitvirus program to fit COVID-19 data. You can download the fitvirus code on File Exchange. You can get your own data or download statistics from a public ThingSpeak channel with COVID-19 data. For other COVID-19 related resources see COVID-19 Research and Development with MATLAB and Simulink

Figure 1: Fitvirus sample results.
When you can’t make it into the lab, use ThingSpeak to monitor and control your lab equipment for experiments and for teaching.
- When you use ThingSpeak channel values to control your hardware modes, students can run experiments from home, and even collaborate with others to control devices and collect data for analysis.

Figure 2: Sample ThingSpeak lab model.
- Build a simulation model to deploy on hardware and control it remotely. Watch this video to see how you can do both simulation and deployment in the same Simulink model. You can also download the models used in the video.
- Use ThingSpeak to analyze your data. Use the provided code templates (like this one for removing outliers from wind speed data) or custom MATLAB code to filter and analyze your data and schedule it to run at regular intervals.
regularFlag = isregular(data,'Time')
- Use ThingSpeak to Visualize your data. Consider a geographic plot to show location data with your measurements, or build your customized channel view.

Here's an thread on comparing various types of instructional labs (on-campus, virtual, remote, kits). Each type has pros/cons and things that you need to consider.
In this article, we discuss how educators can adopt simulation, alternative hardware, and other teaching resources to transition lab-based classes to distance learning: https://medium.com/mathworks/tips-for-moving-your-lab-based-classes-online-1cb53e90ee00.
Do you teach a lab-based class? Please share your thoughts, questions, experience, and feedback on these ideas here. I also welcome you to invite your colleagues to join the discussion here.