MATLAB Central Discussions - Join the conversation!
Contenu principal

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.

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.

Jiro Doke
Jiro Doke
Dernière activité le 30 Nov 2020

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/

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.

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')

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.

https://twitter.com/RebeccaEE/status/1237561015350386690

Div Tiwari
Div Tiwari
Dernière activité le 21 Août 2020

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.

I wanted to briefly share my experience in transitioning from a hands-on lab course to a virtual lab in MATLAB. Here at UMass Amherst, Mechanical & Industrial Engineering, we have a required undergraduate lab sequence, one during junior year and another during senior year. I teach the 2nd course, MIE 402, with a focus on measurements, data acquisition, system dynamics, and control.
The main idea behind our labs, in addition to the all too important hands-on experience, is to provide the students with a platform where they can validate and understand limitations of theoretical models from experimental data.
While the hands-on aspect was lost, we were able to create virtual experiments that consisted on Simulink models saved as protected files. In our protected models, students were able to assign input variables, decide on simulation parameters (e.g., integration parameters), and have certain outputs saved to the workspace. The key for making this a challenging lab was twofold: (1) Students were not told about the level of modelling detail inside the protected file (e.g., were dry friction or electrical inductance included?) and (2) each student was assigned a different set of model parameters based on their student ID (via a predefined table inside the protected file). The 2nd point was especially impactful as students felt as if they are working on their own experiment.
We developed virtual labs for a tuned mass damper and a DC motor experiments. Feedback from the students showed that they missed the hands-on experience but really liked being able to interact, as many times as needed, with the virtual lab at their time frame of choice, and have the ability to interact with us (grad assistant and myself) then re-run the experiment to test new ideas.
Some future developments that could significantly enhance the educational impact of such virtual labs would be the addition of real-time animation and increased level of modelling (e.g., data acquisition effects, electromagnetics, etc.’). At UMass we presently do not have access to the entire suite of MATLAB tools, something that prevented us from including these ideas in our virtual labs.
This would have not been possible without Andy Bartlett (tremendous Simulink help) and Div Tiwari (quickly getting us access to required tools).
Go to top of page