Teaching Vibrations and Control Labs Online Using Simscape and MATLAB Apps
From the series: Online Teaching with MATLAB and Simulink
Ayse Tekes, Kennesaw State University
See Dr. Ayse Tekes from Kennesaw State University demonstrate the virtual labs developed with Simulink® and Simscape™ to let students simulate and visualize modeling and control of dynamical systems for mechanical vibrations.
Published: 15 Aug 2021
Hello. This is Ayse Tekes from Kennesaw State University. In this presentation, I will show you the fundamentals and demonstrations of the MATLAB apps we developed specifically for undergraduate-level mechanical vibrations, system dynamics and control theory, and vibrations and control laboratories.
Considering the three-course delivery methods in STEM education, being face-to-face, fully online or hybrid, and laboratories, unfortunately, the vast majority of the engineering students struggle to acquire a deep understanding of upper-level engineering courses due to the nature of the highly mathematical concepts. And they also struggle to fully comprehend the fundamentals.
Traditional engineering courses are taught in a deductive way. For instance, engineering faculty comes into the classroom, introduces a topic for about 25 to 35 minutes and then continues with in-class examples with just little interaction with the students, mainly in a face-to-face. And this is actually worse in a fully online or a hybrid model.
Looking from and these type of deliver methods, students eventually become passive learners. Looking from engineering faculty side, teaching engineering courses is also very challenging due to its complex nature. And with diminishing resources available to the engineering faculty, it's really difficult to enhance student learning.
Creating in-class engaging activities and implementing those into the curriculum to meet the desired learning outcomes, this requires extra, extra effort and time. However, considering for engineering faculty's expectations, for example, junior faculty's research expectations and senior faculty's service expectations, faculty might not find adequate time to create those activities and then implement those into the curriculum.
Without doubt, hands-on activities, hands-on laboratories are invaluable. But there are also several factors that make the labs difficult to meet the learning outcomes. Some of the reasons might be listed as, the favorably utilized and educational laboratory equipment, they are very expensive.
And they are bulky, which requires-- these equipment require a wide space. So you cannot accommodate many in one space. Students will have to wait for their turn.
Also, these equipment come with embedded software. So, for example, mechanical engineering students, they really don't understand a deep understanding of the signal flow. They simply click on the Record button to record and also export data.
How can we help students improve their understanding of the course material? The best way, we must be understanding their learning styles, meaning that their preferred way of learning. For deductive learners, they prefer learning the topic from their instructor by taking some notes in the classroom.
Active learners, they prefer in-class examples and more engagement. Inductive learners, they prefer looking at the data and then infer the principles behind the shown data. And many of our engineering students are visual learners. They prefer looking at the graphics, simulation results, and maybe animations, if possible.
And I believe that student learning and the rate of students' preferred learning, they are all tied to each other. It's essential to enable students to focus on the object of learning and discern its critical features. However, these features that are possible to discern often depend on instructional methods.
In traditional approaches, students are expected to sit hour after hour in the classroom, being overwhelmed with verbal presentation. And they're expected to absorb the material. When students listen to the instructor lecture, the students' role is just passive. They receive information that they cannot process any more. Students are not really engaged in these kinds of delivery methods since they are not given the opportunity to apply what they have been just introduced.
If an engineering faculty uses student-centered teaching practices so students' conceptual learning will be increased in addition to their analytical learning, such that students are introduced to topic and then with an example, they're expected to plug in the data, plug in the variables into the equation to solve the problem.
Active learning strategies gives a lot of benefits to the students. It gives them time to process the important pieces of the lecture, and now their brains will be able to work with that information. And there's so much greater chance that important stuff will be stored in their long-term memory. Students greatly benefit if the instructor modify their teaching methods based on the needs of the students' learning preferences.
Since engineering is the use of scientific principles to solve real-world problems, it's considered extremely important that the theoretical concepts are imparted to the students in a traditional classroom setting, meaning that face-to-face, hybrid, or online. They are supported by practical experiences through the hands-on experiments or virtual laboratories, if possible, in an undergraduate engineering education.
Although laboratories are essential in undergraduate education, the challenges for student learning that arose with to COVID-19 crisis, and which we're still facing right now, made it much more difficult to issue course learning outcomes that are tied to the laboratories and hands-on experiences. With the COVID-19 crisis, the Spring 2020 academic year took an unexpected turn for academics all over the world. Engineering faculty who teaches those laboratories, they had to move online and instruct from home. And they were not prepared for this.
This online course preparation takes more time and effort compared to traditionally designed face-to-face and laboratory-- and online courses. And they were also compounded considering the unprecedented situation where many faculty did not have enough time to go to their laboratories to record the data, share it with the students, and maybe even recording themselves, the recording video of themselves in their laboratories.
Even before the pandemic, there was a growing interest in visualizing all fundamental concepts that are taught in a traditional classroom to enhance student learning. If the theory can be demonstrated either using a portable prototype or through visual laboratories, students not only comprehend the fundamentals, but they also lead the theory to its application area. In addition, if I've had a discussion for critical thinking and reflection questions can be provided to the students, this kind of activity, engaging activities, will profoundly support student learning.
Although there are several online laboratories specifically designed for gateway courses, such as physics and chemistry, there is still a need for visualizing fundamental topics for upper-level engineering courses. In order to meet the need for visualizing those fundamental topics, we designed MATLAB apps specifically designed for undergraduate-level mechanical vibrations, system dynamics and control theory, and vibrations and control laboratories.
So one can ask, why MATLAB? Students have free access to MATLAB in many institutions. And an introductory-level MATLAB coding class is frequently offered to the freshmen. The program, incorporates several toolboxes, such as Simulink, Simscape, System Identification, Symbolic Control Design.
And our MATLAB apps are consisted of several submodules, which are created by using the Simscape toolbox. Another question might arise, why Simscape? MATLAB Simscape is a modeling environment analyzing both rigid and flexible systems using either the blocks provided in the library, or students can just import their CAD model to create 3D visualization of their design systems using Mechanics Explorer.
MATLAB app developed for introductory-level mechanical vibrations, control theory, and vibrations on control laboratories consists of multiple submodules so that students can use to simulate systems with different sets of parameters. They can analyze their results and simulate the response system behavior with MATLAB Simscape Mechanics Explorer. The MATLAB app can be downloaded to a local computer, and simulations can be run offline after.
If one is interested in using the MATLAB app, they need to just double click on the cover page here to have access to the submodule. Students can study one-mass, one-spring system, two-mass, two-spring system, then one-mass, two-spring combinations, then two-spring, two degree-of-freedom system with three springs, or three degree-of-freedom system with three springs.
They can also see the two degree-of-freedom mass pendulums system, and they can design a PID controller for it to control the position of a single mass or a mass with a pendulum. If one is interested in looking that GUI app, they just double click on the little arrow that opens the Simscape blocks. They can understand the inputs, the outputs, and how the blocks are connected to each other.
They have access to the Simulink modules of each submodule. They can understand which parameters are expected to the command window, so meaning the work space. They can see, for example, for the mass pendulum system, they can see which parameters are exported to the command window, again, to the work space.
They can design a PID controller. They can look at the reference data. They can change the reference trajectory. They can look at inside the system. They can add more masses to the system to create the two degrees of freedom.
They can change the reference trajectory. They can look at the outputs data. Again, they can design a PID controller. And they can also design a trajectory controller grid mass spring pendulum system.
A lot of mechanical engineers design the machinery mechanism, vibrations that are caused either by the external forces or due to the clearances in the joints are undesired, and they need to be reduced or eliminated if possible. Vibration control can be issued by a passive design or by an active controller with the addition of electronics. One cost-effective solution for a vibratory system, which is subjected to some harmonic motion, is the design of a secondary system which is comprised of a sliding mass and a spring, as shown in the sketch.
Potential learning outcomes of this activity, vibration isolator activity, which can be given as the homework, given as a project, or in-class activity, or a lab activity, can be listed as: design of a single degree-of-freedom system using MATLAB app, derive the equation of motion of the single degree-of-freedom system; updating the system response data from MATLAB app; obtain the natural frequency using the two methods, equation of motion, and also the simulated response; design an vibration oscillator for a system having base excitation; describe how the reduction on the primary mass is affected by the choice of-- by the choice of different vibration isolator mass and spring constants; and visualize the force of a single degree of freedom and two degree-of-freedom mechanical system. Again, this activity can be given to the students as an in-class activity, as a lab activity, or as a homework assignment.
Initially, students are expected to design their own primary system. They need to select mass 1, k1, and also they need to introduce some surface friction to create a realistic system. And this primary mass is subjected to some force, a harmonic force, in the form of a times sine omega t. Here, omega is the force in frequency, which is equal to the natural frequency of the system.
Once students set these parameters in the submodule, the selected submodule, and then they run the simulation, they will see that since the system is forced at its own natural frequency, the primary mass will have excessive oscillations, aggressively moving back and forth. Then students, after running the simulation, they can plot the response of the system and record the maximum output.
As the second part of this-- or as the main goal of this activity, they need to design a passive vibration isolator system consisted of a mass and the spring. So they need to select their parameters for the secondary system using the theory. So k1 over m1 from the theory from their course, they get the equation of motion, and they do the calculations, and they come up with-- they find this relation.
If they can set the equation so that k1 over m1 is equal to k2 over m2, and when the system is still subjected to-- the primary system is subjected to the same external force, they designed a secondary-- this new system selecting the correct submodule and run the simulation with the new parameters, they will see that the primary mass is now damped, significantly damped. After that, they can also plot the response of the system. And here the goal was to reduce the vibrations on the primary mass by 90%. And as seen in this example, they achieved their goal.
In order to simulate this vibration isolator activity, students, to design this for a single degree-of-freedom system, they select the corresponding submodule. They double click on it to be able to enter the parameters of the system, and then they select a zero free response because we are applying a force instead of giving it an initial displacement. So they select the first response, and then select the harmonic force, and set the parameters, magnitude, and frequency. They design the single degree-of-freedom system, they get to the equation of motion, and then they apply the input force to simulate the system.
Let's complete the vibration isolator assignment in our MATLAB app. If this is the very first time students are opening MATLAB app, the very first thing, they need to bring in ToWorkspace data. That will allow them to run the simulations with the required data.
Here they double click on the cover page and then select the module that they are interested in working on. They enter the parameters of mass 1, k1, and a damping constant. They go to the first response and click on the zero initial displacement since this system is forced. They select the first type and then enter the magnitude and also the frequency, force frequency. Then they run the simulation.
Once they run the simulation for their desired simulation time, Mechanics Explorer starts visualizing the system response. Here they see that the mass is sliding back and forth aggressively. They can go back to the MATLAB command window and pull out the response of the system because all the data is exported into the work space.
Then for the vibration isolator design, they now need to select a two degree-of-freedom system with two mass, two spring. They use the same parameters for the primary mass. But now using the theory k1 over m1 equal to k2 over m2, they need to adjust those parameters to meet the necessary equation. Here they select their secondary system parameters and then enter exactly the same initial force.
They run the simulation now with the vibration isolator design. And even by looking at the response of the system from Mechanics Explorer, they observe that the primary mass is damped more than 90%. And they can actually see this by just plugging the response of the system. If they initially recorded the-- if they recorded the initial data, they can pull out both primary mass' oscillations with and without the vibration isolator together.
Let's look at our second example, which is the mode ratios of a two degree-of-freedom system. The learning objectives specifically designed for this example are determining the two natural frequencies of a two degree-of-freedom system, visualize the mode shapes of a two degree-of-freedom system, investigate the effects of initial displacement on the free vibration of a two degree-of-freedom system, use MATLAB app to create a single degree-of-freedom and two degree-of-freedom system.
So what's the theory behind this? Consider a two degree-of-freedom system consisted of two masses and three springs that are only allowed to move along the horizontal axis. And because we're only interested in the calculation of the natural frequencies, a lumped mass matrix model can be just obtained either using laws of motion or mass matrix method. And from here, students can calculate the two natural frequencies of two degree-of-freedom system.
Just to point out, our main aim is to visualize the mode shapes of a two degree-of-freedom system and also investigate the effect of initial displacement on the free vibration of our two degree-of-freedom system. Because we have a two degree-of-freedom system, once students randomly displace the cars, they are expected to see two peaks on the power spectrum.
Using the theory, if they can set the frequency to-- I'm sorry, initial displacement ratios to mode 1 ratio, then they will only see one peak on the power spectrum. If they set it to the second mode ratio, if they can tune just the initial displacement to make it exactly the second mode ratio, they will see that once they plot the power spectrum, they will see another shift ed frequency on the power spectrum.
Now let's design a two degree-of-freedom system and look at the mode ratios of our simple two degree-of-freedom system. Assuming that students already brought in the ToWorkspace data in the work space and then double clicked on the cover page, they select the two-mass, three-spring system first, and then they double click and then set the parameters. For the simplicity, we make the system symmetrical, so mass 1, mass 2 are same, k1, k3 are also identical springs, just for the simplicity for the mode ratio calculations.
Once they design their two degree-of-freedom system with three springs, they go to the view with the first response-- or just under the free response, they click on the zero forces because this is now a free response. Mode ratio one is 1, so they displace the cart to the same position in the same direction.
Once they run the simulation, on the Mechanics Explorer, they see that the two masses, they move at the same frequency. And from here, they can plot the frequency or power spectrum. And even though the system's two degrees of freedom, they will only see one peak.
Now moving back to the second mode, which is negative 1 for this example, now they displace the car in opposite directions to the same amount, let's say 2 and negative 2. One is displaced to 2 centimeters, the other one is displaced to negative 2 centimeters. This time, the masses are moving at the same frequency and towards each other, in opposite directions.
They can double click and click on the power spectrum. There's an embedded code in the program so that it plots the power spectrum so they can actually calculate or see the natural frequencies of the system.
Once they randomly displace the cart and run the simulation from the Mechanics Explorer, they see that the cars are just moving back and forth, oscillating at their own frequency. They can go back and actually plot the power spectrum. From here, it will allow them to see the two peaks now.
Our third example is the position control of a pendulum. In this example, to better visualize the effect of a PID controller design, we have two pendulums. The one on the top is without the controller, and the one on the bottom has some PID controller. This PID controller will be designed. It can be actually designed by trial-and-error methods, by Ziegler-Nichols method, or students can just tune PID controller coefficients by just using the PID Controller Block in the Simulink.
Here, once students select the title PID pendulum and then select the submodule and double click on it, they can select the rod length, the tip load , and also the angle they want to control. From here, they can also select the disturbance. So we are trying to design a PID controller when there are some disturbances acting on the system. They can start tuning the PID controller coefficients and visualize how the system behaves.
And this system right now, the designed controller is not sufficient. So they have to keep tuning the parameters. They can change the P controller or they can add some integral constant or derivative constant and then look at the effect of the system response.
If they're not satisfied, they can either design the PID controller by just clicking on the Tune button, by tuning the PID controller coefficients, which is embedded in the PID Controller Block. Once this is all set, students can just update the block with the tuned parameters and then run the simulation with these parameters.
And look at, again, the simulation response. Here what we're doing is we are applying an impulse force. So someone is just kind of hitting the pendulum, constantly hitting the pendulum. The number of pics within a specified time also can be tuned in the simulation-- in the configuration blocks. They can also plot the angle of the pendulum.
If one is interested in looking at the Simscape model, they can change any parameter. They can change the configuration of the pendulum. They can change the way it looks. They can change the tip load shape as well.
We provided our MATLAB app to vibrations, control theory, and vibrations and control theory lab students and collected more than 100 data from those students. Students' comments about their learning from the simulation were nearly universally positive. In particular, several themes were prevalent in the comments. Students appreciated the clarity of the instructions and expectations. They found the necessity to interact with the simulation by manipulating data valuable. And students so value in visualizing the representation of the system behavior.
They commented that these videos are super helpful, what we did. We also created an introductory level a how-to use GUI app instructional videos on YouTube. And they found these YouTube videos really helpful in understanding what they are doing. And they really like the toolboxes.
And they also liked the methods. They really liked to visually see the system and all of its components. And they really enjoyed the visuals provided in the Simscape modules.
Introduction of MATLAB app to simulate the behavior of modeling and control of dynamical systems for introductory-level mechanical vibration system dynamics and controls and their associated laboratories show significant promise as a tool to enhance student learning in these courses. The program is robust in that it can be applied to multiple scenarios, from single degree-of-freedom to three degree-of-freedom systems.
This ability to use the program for multiple concepts provides a significant learning advantage, as students become familiar with the program operation and they will be able to focus more on how to reapply so we can process some behavior and vibrations in control applications.
Further, student responses to the surveys indicate that they found the learning activities designed to address the key topics of much help or very much help in understanding the theoretical concepts and also in helping them develop their engineering skills.
In summary, our MATLAB app is open source. Anyone interested in using our app can just download the MATLAB GUI application from the provided link. The MATLAB app demonstrates fundamentals that are taught in the vibrations control theory and their associated laboratories.
Faculty-- so MATLAB app can be used by the faculty who wants to visualize the topics within three to five minutes. They can also interact with the students because students can just download it. But this can be also given as a homework activity. When students go back home and need to do the homework, they can study on this own pace.
What we found really useful, what we recommend is, if a student is hesitating initially to use MATLAB app because of maybe their MATLAB skills, what we really recommend them to do is complete two-hour onramp. So they can start with just MATLAB and continue with MATLAB Simulink and finish MATLAB Simscape. This will only take two hours.
After we created the degree program and provide it to the students, we knew that some of the students might have doubts on the actual self-degree app. So how do you know the degree app provides an accurate solution?
So what we did, we designed a portable laboratory equipment by just 3D printing the main body parts. And we collected few response data from the system. And we were able to find the system parameters using system identification. Knowing system parameters of this vibratory system, such as mass, stiffness, and the damping of the system, we entered the same parameters in our GUI app and run the simulation.
As you see in the video, both the laboratory equipment and the group program provides us the same result. So in the future, we are planning to implement-- or embed one of these videos in our GUI app so students will have no doubt on the accuracy of the GUI simulation results.
Also, future work to extend this pilot effort by investigating student performance to a controlled experimental approach may be of value in demonstrating whether student perceptions of learning are supported with increased performance on homework or exam questions. Further, extension of the MATLAB app capability to address the additional key topics and important system behavior applications will be of value, as a program could be threaded through an online course. The open-source nature of the program also can be leveraged to facilitate these future research possibilities with different types of student populations.
I would like to express my sincere gratitude to European Control Conference for giving me the opportunity to present our developed MATLAB app. I would like to thank MathWorks and Melda also from MathWorks for funding this and for helping us to implement our MATLAB app to improve the curriculum. I would like to thank my undergraduate student team, design and control team from Kennesaw State University. And thank you very much for joining us today.