Skip to main content
Real-Time Simulation and Testing for Academia search search close

Model-Based Design is transforming the way engineers and scientists work by moving design tasks from the lab and field to the desktop. This webinar takes you one step further and shows how to close the gap between desktop simulation and controlling actual hardware.  

Real-time simulation and testing is required for controlling highly dynamic systems where deterministic behavior is vital for them to work and also for safety. Researchers and scientists accelerate the designing process of novel control strategies, verify and validate existing embedded controllers or expand real-world systems with emulated digital twins. Professors use the same workflows and concepts to provide a hands-on learning experience for their students. 

Specific topics that will be covered include:

  • Workflow Demo: Field-oriented controller (FOC) prototyping and testing of a permanent-magnet synchronous motor (PMSM)
  • Testimonials from both researchers and teachers how they successfully applied real-time simulation and testing in their work.
  • Overview on key concepts of rapid control prototyping (RCP) and hardware-in-the-loop (HIL)
  • Introductions to the Simulink Real-Time™ workflow of parametrizing models, executing them on Speedgoat real-time target computers and seamlessly instrumenting and monitoring them from within visualize Simulink  

Video Transcript
 

Hi all and thanks for joining this webinar!
My name is Janosch and I’m responsible for Academia at Speedgoat.Today, I will show you, how you can expedite your reasearch projects and provide a hands-on teaching experience for your students.
Let’s start with an example how real-time simulation and testing is used by a reasearch team at the technical university of Munich.
The team is developing fully autonomous, all-electric racecars with breathtaking performance.
A Speedgoat Mobile machine is used as the vehicle electronic control unit, or ECU for short, doing Sensor Fusion, highly performant motion control and monitoring of the vehicle components.
The cars are powered by four electric motors, requiring precise control to tame the combined force of over 500 horse powers.
In such projects, the test time on the racetrack is extremely limited and verification of algorithms is key for success.
They decided to model a complete digital twin of the vehicle that runs in real-time on a second Speedgoat target machine.
The data exchange between the two machines uses the same CAN interface as on the real car.
This means the ECU doesn’t see any difference between the real vehicle and the digital twin.
Furthermore, the team created a virtual representation of the racetrack from sensor data.
Co-Simulation of Simulink Real-Time with the Unreal Engine for visualization enabled fully virtual testing of the complete software stack for sensor fusion and motion control in real-time.
With this hardware in the loop setup the team was able to evaluate design iterations quickly, and test edge cases, emergency procedures and hardware failures in a safe environment.
When they finally took the car to the race track for in-vehicle testing, they could focus on fine-tuning and verification.
With this setup based on model-based design workflows and real-time simulation and testing, the team was able to win multiple competitions, like the human + machine challenge in Berlin. 
The fully autonomous racecar already achieves lap times on the level of an amateur human driver.
By the way, you can access the complete Simulink software stack by TU Munich in the form of a reference example on speedgoat.com, as well as a whitepaper on Sensor Fusion and Motion control for autonomous racing cars.
We just saw a first example of how researchers can accelerate their research. In today’s Webinar I will further dive into this topic. Two more topics I want to share with you are:
Showing you how professors can use industry proven workflows to provide a hands-on learning experience for their students and how real-time simulation and testing is used around the globe in different areas of research. 
To start with, let’s assume you have this model of a motor-controller and the motor itself and have successfully simulated and optimized it in your desktop simulation. Now, you want to use the same Simulink model to test the real motor with your controller and your embedded controller with a modelled version of the motor with real-time simulation.
I’ll show you how you can easily achieve this – let’s start the journey.
For easier navigation, I have clustered the key topics into three groups.
First, you learn the concept of Real-Time Simulation and Testing, the involved environment, the workflows and the hardware.
Second, you learn how real-time simulation is used in research around the globe for different fields of research. These will be highlighted with orange color.
Third, you learn how professors use model-based design and real-time simulation and testing to provide a hands-on learning experience for their students.
So let‘s start with the concept of Real-Time Simulation and Testing. And therefore, let‘s first look into the question „Why Real-Time Simulation and Testing?“.
Let’s say you want to test and implement novel controls systems?
For example, for electric powertrains, aerospace controls systems or automated processes in general.
We all seek to understand how to do it faster and better.
In particular, these questions arise:
How do you swiftly iterate over control designs?
How do you test controls algorithms?
You should be focused on the design and testing of controllers for complex system dynamics.
You should not be constrained by the infrastructure to do that. 
So, let’s look at how you can benefit from model-based system engineering and from early design up until field deployment.
This timeline shows you how controls development and testing benefit from a holistic approach.
Model-based design together with real-time simulation and testing is a key enabler. You can go from early designs through all the iterations and test cases via flexible and powerful prototypes.
It is not only about rapid controller prototyping, or Hardware-in-the-loop testing. Today's systems are way more diverse.
Often use cases are by-passing, Fault Insertion or virtual commissioning to name only a few.
Let’s quickly pause in our journey and look at the environment necessary to go from desktop simulation to real-time simulation for our motor control example. So, what are the key questions here?
First, how can existing models be used for real-time simulation and second, how can I interact with my model that runs in real-time.
The goal is to simplify your workflow. letting you design and test better controllers faster.
You can innovate and you are not constrained by embedded testing environments or with hassles of integrating solutions.
Benefit from a plug-and-play real-time solution that shields you from interoperability issues.
Experience the unity of simulation and testing with real-time target hardware, all directly from MATLAB and Simulink. If you have a campus wide license at your university, you already have access to all software and tools you need.
The seamlessly integrated solution is composed of two main components.
The first one, is Simulink Real-Time, the solution for real-time test and simulation from within MATLAB and Simulink.
It comes with several host capabilities that allow you to easily create, control and monitor your real-time applications, and serves as your real-time operating system.
The second component is powerful and scalable Speedgoat real-time target computer equipped with I/O.
The real-time application created from your Simulink model runs on it together with the Simulink real-time operating system.
Allow me to illustrate the workflow of going from desktop to real-time simulation and testing, right from your Simulink, with an illustrative example.
Let’s take an example, similar to the case shown at the beginning with Roborace – a novel cruise control function for the next generation full-electric vehicle.
Part of the research project has been designing, specifying, and sizing new software and hardware components based on a full vehicle simulation. The vehicle model is comprised of both Simulink components for the vehicle controls, as well multidomain physical Simscape components for high fidelity simulation of the vehicle plant including battery, electric motor, and thermal cooling systems. 

Regarding the cruise control function, for instance, you may have been using this model to rapidly tune controller performance and assess the design.

In a next step, you want to validate and verify the new cruise controller functions for execution on embedded controllers. To do so, you can remain in the exact same MATLAB and Simulink environment.

Let’s go through the few steps to enable real-time execution:

You start configuring a target machine in Simulink Real-Time. Under the hood, code generation is optimized for Simulink Real-Time engine and a fixed step solver is set. Both settings ensure that your model is running in deterministic manner on Speedgoat hardware.

You can rapidly connect to your Speedgoat target computer
And click the Run on Target Button
This will automatically build a real-time application from your model, deploy and run it on the Speedgoat target machine. The Simulink instrumentation and logging capabilities remain available for you to experiment in real-time.

You can see here that I am using system variants to manage different interfaces for the cruise control. This is a good practice in case you like to keep a single model for different development stages and easily switch back and forth between offline and real-time simulation.

Implementing the controller interfaces is also very simple: You can for instance implement communication through CAN protocol with simple drag and drop of blocks or by directly calling in I/O functionality from within the Simulink canvas.

There are five learning we can draw from this example:
You don’t have to leave Simulink.
No need to familiarize yourself with extra tools.
Just connect to hardware with a few clicks and experiment in real-time.
Switching back and forth is seamless.
and configuring I/O, namely the connections to your hardware, is quite smooth.

Time for the next step in our journey of bringing our motor controls example to live – first let’s have a look at rapid-controls prototyping.

You have seen this timeline earlier. And I’ve shown that model-based design and real-time simulation are enabling you to go from left to right, at a rather fast pace. Let’s see.

Your workflows may deviate slightly, but I am pretty sure that you’d agree on the following three main motivations for real-time based controller prototyping.

Test early to prove that your algorithms work in real-world dynamics.
You may find better trade-offs and tweak performance.

You have already seen the unified workflow combined with flexible and powerful hardware.
This unique combination allows you to worry less when testing!

Ultimately, you can be more innovative, expose design flaws earlier and prove concepts for publications.

Let’s bring in some hardware to demonstrate the workflow. When developing controllers for electric motors, it is vital to test early and often throughout the entire workflow.

You can reduce risks while prototyping and expose design flaws as early as possible.

As mentioned, first let’s focus on the earlier stages where you are prototyping the motor controls, and later in the part about HIL, we’ll look into hardware-in-the-loop testing of motor controls, too.

For rapid control prototyping, directly connect your real time application to your electric motor drive with flexible PWM and other digital outputs.

You can read back position, speed, voltage/current signals and even temperatures with ready-available I/O interfaces.

Let’s first look into how you transition your desktop model to real-time. Later, we will look into how you can use advanced features such as control-parameter auto tuner.

Lets have a look at this video.

Assume you already have a desktop simulation with a field oriented controller and a permanent magnet synchronous machine model. 

The controller model has a state machine controlling the system, a velocity and a current controller. Inside the current controller you see the Clarke and park transformation and its inverse.

In the middle there are the two PI controllers.

You can now use your existing controller and test it with a real motor. 

To interface the motor, Speedgoat driver blocks are used such as the setup block for the IO397 where you can directly access the pin mapping allowing you to connect your device under test. Another example shown here is the digital output blocks.

As we already learned, you can connect to the target machine either using Simulink Real-Time Explorer [Pause] or directly connecting a preconfigured target. [Pause] As already shown earlier, by the click of a button, the model is built, deployed and runs on the target. 

Once the model runs, I can switch from automated test-cases to manual input and control the motor manually. This integrated dashboard elements for example allow to turn the motor on and off and control the velocity with real-time data visualization.

Let me now share a customer success stories with you.

HuMoTech, one of our customers has developed a lightweight and programmable ankle-foot prosthetic called ‘Caplex’.

HuMoTech is a startup from Carnegie Mellon University. The way the prosthetic works is as follows:

The lightweight programmable prosthetic foot attaches to the user’s prescribed socket and is connected to the actuators and the control system. The system mimics what it feels like to wear assistive devices.

As the user walks the controller can emulate different foot characteristics, before building costly prototypes.

They use MATLAB & Simulink with Speedgoat hardware to develop the system.

The joint and lean support workflows by both MathWorks and Speedgoat enabled them to evolve from academic research to a successful start-up.

Our customers are free to explore and experiment in an environment that most are already familiar with, and they can see everything that is going on under the hood

says Josh Caputo their CEO. 

You already know this slide from earlier when I talked about prototyping controls.

Now let’s talk about hardware-in-the-loop 

I’m going back to this timeline I have shown you earlier

To focus on the next step, learning how you can reuse the same real-time simulation hardware to also test your embedded controllers with hardware-in-the-loop simulation.

Frontloading verification and validation tasks commonly are the main motivation for HIL testing.

It may be that the hardware prototype is not available, or you gradually integrate components.

You want to resolve design flaws and test edge cases in a safe environment. 

What do you need for HIL Testing? –

Certainly, a platform that runs your plant in a deterministic manner while being connected to sensor and actuators,

That allows for plug & play interfacing and test automation.

Ultimately, this will help you deliver embedded software faster and with lower risks.

Lets get back to our example for motor control, assuming you want to now test the motor controller safely with HIL simulation.

You can use motor and inverter models from Simscape Electrical or Motor Control Blockset to simulate your electric drive on CPUs or on FPGAs depending on your required closed loop sample times and model fidelity. For this you extend your plant model with I/O blocks to interface with the device under test.

As you can see here, the HIL system captures inputs coming from the controller, simulates the dynamic of the motor and emulates sensors. The microcontroller can be tested as if it was integrated with the physical electric drive. Once again, you can very easily interact with the application and visualize and log results

Let’s have a look at another example, this time from Lehigh University.

In collaboration with Servotest, the Natural Hazards Engineering Research Infrastructure Experimental Facility at Lehigh University has developed a MATLAB and Simulink based algorithm and deployed it to Speedgoat hardware to perform real-time hybrid simulations of tall buildings excited by wind or seismic forces.

In their Algorithms the whole structural systems are divided into physical and numerical substructures.

Over the last ten years, they have continuously developed this algorithms and implemented them into the program HybridFEM-MH, facilitating nonlinear structural Finite Element Analysis in the Simulink environment. 

How does this look like?

The Lehigh real-time cyber-physical structural systems laboratory has been built with servo-hydraulic actuators…
Allowing for breakthroughs in the field of real-time hybrid simulation.

With direct sensor feedback and command outputs to physical components.

Solutions from Speedgoat have been pivotal towards the success of complex real-time hybrid simulations at the NHERI Lehigh Eperimental Facillity

says Thomas Marullo

Let’s pause here and wrap up what I just discussed.

Real-Time Simulation allows to accelerate your research.

The hardware is not limited to a single workflow.

Easily compare your simulation results to your desktop simulation results.

Tune parameters in real-time from within Simulink.
And changing your setup, namely the connections to your hardware, is smooth.

You have now seen how MathWorks and Speedgoat work together to provide a seamlessly integrated real-time simulation and testing solution for you. We also saw some examples from universities and how they use it. You might now wonder, where in the Industry is it used and how?
Important indstudries are Aerospace or Automotive 

Large industries with many sub-segmentations are Electrification  and Automation & Controls.
Medical becomes more and more important due to advancements in robot driven surgery.

The use cases are manifold, for aerospace this can be 

Flight Controller and Autoflight Systems design, FADEC and Engine Controllers, Bypassing, VTOL Flight Dynamics Modeling or UAV Modeling and Testing or Trajectory Controller in Satellites to only name a few.

For automotive frequently used real-time simulation usecases are:
Powertrain, Chassis and Vehicle Dynamics, Automated Driving and Advanced Driver Assistance Systems, Infotainment and Multimedia Systems, Cabin, Body and Comfort systems, Full vehicle simulation or hardware in the loop simulation for battery management systems.

As already mentioned, electrification has many subsegments and for each subsegment, there exist many different use cases. I want to highlight the following two subsegments where model based design with MathWorks and Speedgoat is frequently used.
First power electronics with use cases such as motor control design, converter und inverter controls, power HIL or battery cell and battery pack simulation. Second, power systems for microgrids or transmission and distribution as well as part of electric vehicles on the road, in the air and at sea.
Real-Time Simulation and Testing is crucial and well known in industrial automation.
Used for many years already in process technology and automated manufacturing, different applications for motion control equipment or use cases such as tunnel automation or ship automation. 
The last industry to highlight here is real-time simulation and testing for medical devices. 
With huge advancements in medical research over the last decade, real-time simulation is now vital for development and research of robot assisted surgery, active rehabilitation, robotic prosthetics and wearable medical devices or even hearing aids.
After this outlook into various industry use-cases, lets return to our journey and have a deeper look into academic research.

I covered so far the basic concepts and workflows of real-time simulation. Now lets have a look on how this is applied in research by giving you some examples and insights.
First lets have a look how Timothy, a PhD student at Gent University, is using real-time simulation and testing for his research.

Hello, dear audience, I'm Timothy Vervaet and I’m working as a PhD student at the Coastal Engineering Research group of Ghent University in Belgium.

I work on experimental modeling of wave energy converter farms.A wave energy converter WEC is a device which aims to convert energy from ocean waves into electricity to harvest a considerable amount of energy. It is interesting to put multiple devices together in farms and as such interaction effects, positive or negative will occur. The project has given the acronym WEC Farm and the first web form.WEC Farm wave Energy converter has been tested for the first time in the Wave Basin of Alborgh University in April 2021. 

On the movie we can see the hardware under test being the
wave energy converter of a buoy operating in heave.So the motion is restricted tothe vertical direction only.The power takeoff of the device consists of a rack and pinion system in combination with the Beckhoff permanent magnet synchronous motor and a Beckhoff drive motor drive which requires EtherCAT communication. This EtherCAT Communication is established with the.Speedgoat  performance,real time target machine in combination with the target screen as can be seen here.
And the Simulink control model is built on a development PC.

There we can greatly benefit from the available Simulink real time EtherCAT communication blocks which allow to directly read motor parameters from the Beckhoff drive by EtherCAT communication and sends motor torque commands.

From the Speedgoat's target machine to the Beckhoff drive.

The wave energy converter will react depending on the chosen control strategy with the incoming wave conditions which are generated with the wave maker and or tests.

We plan to extend the current setup of one device to five wave energy converters and test this setup at the brand new coastal and ocean basin in Belgium in Austin and 2022. we can see the extension will be to three motor drives powering five Beckhoff motors. And as such, we will, have real time control of iris of up to five devices. 
And we will investigate different array layouts and control strategies and also test advanced controls such as model predictive control so the final aim of the WEC farm project will be to go for the scientific gap of experimental data necessary for the validation of recently developed numerical models.

Thank you.

Thank you Timothy for this very interesting insight into your project.

After the example we just saw, let’s go a bit deeper into how Simulink and real-time simulation can accelerate your research. This is already familiar from the rapid control prototyping example. Let’s see how you can go one step further in your research project using various toolboxes and tools from MathWorks.
As an example, you can use the FOC auto-tuner feature to optimize speed and current control loops.

In that short video, this feature adds some disturbance on the RPM signal of the spinning motor. Thereby the P and I gains of the controller are optimized based on the desired system response. As you can see, the response of the motor is much faster after tuning but doesn’t overshoot either.

How a similar concept can be used in a research lab, is shown by Dr. Ding, associated professor at Fudan University.

This is Doctor Chenyang Ding. I'm an associate professor at Fudan University.

I'm going to explain how to identify and control a precision stage using Speedgoat target machine.

The photo on the right shows the precision stage under study.

The stage consists of base frame, a mover, mechanical guidance permanent magnet, linear motor, and optical encoder. 

The mechanical guidance allows the mover to translate along a single direction and limits the red 5 degrees.of Freedom.

The linear motor provides accurate force to drive the stage backward and forward.

The optical encoder provides real time displacement measurement.

We have two research questions, how to derive an accurate model of the stage and how to improve performance of the stage by control design.

We use a Performance real time targeting machine to execute the control algorithm we designed.

Two IO cards IO318 and IO133 are integrated.

IO 318 is programmed to acquire AquadB signal from the incremental optical encoder.

It is used for displacement feedback and IO133 has eight channels with 16 bit DAC used to send control signals to the power amplifier which directly drives the linear motor.

The control diagram is shown on the top right of the slide.

During closed loop identification, the reference signal will be made zero. We inject excitation signal to
the system and input, and we measure displacement signal at the output. We estimate frequency response function or FRF of the closed loop system and coherence using signal processing toolbox.

And then we calculate the FRF for the plant based on the closed loop FRF and the feedback controller, knowing that it's controller is weak and only used for identification purposes.

The plant FRF is used to design controller, aiming to achieve high performance by loop shaping in frequency domain.

The two plots on the left shows the BODE plot of the open loop system. The bandwidth is defined as the frequency where the magnitude crossover the DoDB line 

The video on the right shows the stage commanded to move between two positions repeatedly. Interesting variables in a closed loop system can be traced and plotted in real time.

For example, position error and control signal etc.
These signals can also be saved in workspace from MATLAB for further offline analysis.

The reason we chose Speedgoat target machine is that we could program our control algorithm in Simulink and compile the program and automatically download it to Speedgoat target machine.
It is efficient and convenient. It also avoids programming mistakes.

Thanks Dr. Ding for these insights into your research setup. 

Let's go back for a moment to our setup which is part of our journey today, our motor, our real-time system and inverter. We learned how to use real-time simulation and how it can accelerate your research.
Now let’s have a look at Speedgoat‘s products and services offerings to understand better what a real-time system is comprised of.

Each system is configured to your individual requirements 
Changing requirements is not a problem, as you can reconfigure I/O modules. You can choose from a vast range of I/O connectivity options and exchange them at a later date.
All real-time target machines are expressly designed to work with Simulink and Simulink Real-Time,
Not only for the current and supported releases, we at Speedgoat also make the promise to support future releases.
Our hardware quality, our long-term warranty and maintenance services ensure long-term operability of your real time-testing hardware. 
Delivery of each real-time system includes the real-time target machine, I/O modules configured to your needs, together with accessories such as terminal boards and cables, and the Speedgoat I/O Blockset to connect and configure the interfaces to your hardware.

No matter whether you are prototyping control strategies or testing controllers against your digital twins, seamless connectivity shouldn't be a hurdle for you.
Therefore, we are supporting key protocols from all industries.
More than 200 I/O modules are available and ensure that your workflows remain un-interrupted.
I will give you a few seconds to spot the communication protocols that matter to you.

Let’s look at connectivity also from another angle, independent of just protocols. 
I/O also means access to sensors and actuators.
PWM signal generation and capture such as for motor controls is an example that requires high frequencies and ultra-low latency.
Also think about several real-time target machines sharing computational load and operating synchronously.

For universities, independent if you use the system for research or teaching, we offer a discount on all our hardware. Furthermore, a dedicated Education product line is available, mainly for class-room and teaching laboratories.

Offerings include the small, yet powerful unit real time-target machine with on-board capabilities such as EtherCAT master or UDP communication

Or the baseline real-time target machine.

It is important to know, that the workflows remain the same an all our platforms, allowing you to use dedicated systems for your task or even combine them.

Different modules allow to expand the systems with additional protocols and interfaces such as analog in- and outputs.

Variety of pre-configured functionalities such as PWM generation and capture, SPI or I2C communication or quadrutare decoding and encoding.

CAN

Or even using the FPGA and the HDL Coder workflow to run parts of your Simulink model on the FPGA itself.

To conclude this section, let’s have another look at an example, this time from a research team at RWTH Aachen.

They used real-time simulation and testing for a project for an actively controlled weft braking system for air-jet weaving machines.

The research project lasted for three years and had different partners.

Air-jet weaving machines have the largest speed among all weaving machines and are widely used in order to produce fabrics with high quality.

A common configuration of an air-jet weaving machine is shown in this figure. A yarn package and an accumulator store weft thread and serve it to the weft insertion process. During a machine cycle, the weft thread is inserted into the reed. The weft insertion process is divided into an acceleration phase and a braking phase. At the beginning of the acceleration phase, a main nozzle generates a high-velocity airflow which inserts a weft thread to the reed channel. Thereafter, the relay nozzles are activated consecutively in order to ensure a forward motion of the weft towards the end of the reed channel. During braking, the weft thread is decelerated by a yarn brake   in order that its movement is stopped at an appropriate time and in consequence on a defined position. After the weft thread reaches the stretch nozzle located at the end of the reed channel , it is elongated. The inserted weft thread is then cut  between the main nozzle and the beginning of the reed. Finally, the weft thread is pushed into the fabric, which completes the weft insertion process.
During braking, an inappropriate braking strategy may cause several problems. If the weft thread is braked too early for example, the weft tip does not reach the stretch nozzle. If a weft thread is braked abruptly, the weft tip may move backwards, resulting in defects in the fabric.

Therefore, it is relevant to control the weft movement during braking based on its behavior. The high machine speed of more than 600 revolutions per minute poses a large challenge to real-time closed-loop control. That means, the measurement, online assessment and the control should be accomplished within a very short cycle time.

With the defined sampling time of 1 ms, the diagram of the closed-loop control is shown in this figure.
Two high speed cameras are applied to record the movement of the weft tip during braking. The recorded frame is then sent to the Speedgoat via the frame grabber module, IO811. The weft tip’s position reflects the weft behavior in this machine cycle and is chosen as measured value. With image processing toolbox in Matlab/Simulink, the frame is processed to get the position of the weft tip in each machine cycle. 

The video shows the recorded threads during braking, with a slower playing speed. The task of the image processing is to detect the weft tip’s position in the horizontal direction, despite the background with vertical threads.

The measured position of the weft tip serves as the input signal for the controller. In order to avoid backwards movements of weft threads during braking, constraints on the weft’s velocity should be considered in the control strategy. Therefore, a model predictive controller is applied. Based on the model knowledge, the model predictive controller is able to optimize the actuating value at each time instance, ensuring a stable movement of the weft thread during braking without backwards movements.

The IO104 is used for communication with the weaving machine and the actuator. A synchronization signal from the machine can be received and an actuating signal can be sent to the yarn brake in each control cycle. 

After this impressive example, let‘s get back to our overview. I covered so far the basic concepts and workflows of real-time simulation and how it can be used to accelerate research. Now let’s have a look on how this is applied for a hands-on learning experience for student.

Professor Michael Ruderman uses model-based design in his control theory classes. To provide a hands-on learning experience, he created a teaching lab.

Based on a Baseline real-time target machine, controllers for a hydraulic loader crane can be tested in real-time.

Students create a rapid prototyping design of the control systems and test it with real industrial equipment without exchanging or adapting interface components.

The Speedgoat plattforms helped bridging the control theory and practice when teaching the students.

It allowed focusing on the methods and algorithms and forgetting about the tediousness of software and hardware interacing.

says Professor Michael Ruderman. 

Last stop of our journey before we conclude this webinar. Let me share how we at Speedgoat support you, introducing real-time simulation and testing into your lecture.

I already showed you the EDU product line, it is easy to expand these systems further to be used as part of your lecture.

Out of many examples, let me share two important ones, first we have different demo kits available

One example is the already shown electric motor control kit, used in this webinar.

Or a device under test kit that is also used by MathWorks in its Simulink Real-Time Trainings.

And as a third example the hardware-in-the loop kit, that also was shown in this webinar already. 

We also provide a variety of reference examples to get you quickly started with your curicullum such as the one used for the EMCK just shown

Or the one from the example at the beginning of the webinar, where we supported a team a technical university of munich with their effort for a full electric and autonomous racing car.
The third and last example here is to show you how real-time simulation and testing can be used for HIL testing in power electronics.

We are almost at the end of this webinar, so let’s circle back to the key takeaways from the beginning.

We had a look on how researchers use model-based design and real-time simulation and testing to accelerate their research.
We learned how students can have a hands-on learning experience and. we saw different examples on how real-time simulation and testing is used globaly in academia. Speaking of using real-time simulation and testing for research, we saw the example of how researchers used various setups to be successful in developing an autonomous racing car. At the end of this webinar, let’s together have a look on how students from RWTH Aachen shape the future.

It is the world’s toughest solar race 3022 km across Australia.
The world solar challenge crosses Australia from Darwin in the north to Adelaide in the south.
Extreme conditions challenge humans and machines.
Since 2017, a team from Aachen is competing in this challenge. The team Sonnenwagen Aachen is formed by students from RWTH Aachen and the university of applied sciences Aachen, with the goal to show how innovation can move the boundaries of technology – driven by solar only.
Just recently the students showed the world their latest model. So, for the last time today, let’s have a look on how real-time simulation and testing has been used in the development of this car.

As mentioned, the goal of the students is to build and develop solar powered highly efficient race cars.

But what does efficient mean in this context? 

Their race car can reach and hold a speed of 90 km/h with only on 1 kW, leveraging 4 m2 of solar panels.

To achieve this, the students developed their own powertrain components, battery, auxiliary electronics and chassis.

The challenge, in which they compete against 21 teams, is usually held in Australia.
To make it to the first place, one has to optimize the car and its driver assistance systems.
 
The race takes place over 5 days, the cars are driven on regular roads and the team has to take the weather into account as well.

Therefore, the team used more than 5 million GNSS data points and a detailed Multiphysics-vehicle-model and more than twenty thousand lines of code to develop an optimized velocity-profile for the whole race. 

Now the question was, how to bring that information into the car and allow for continues real-time updates during the race.

For this, the team came up with a remote cruise control.

During the race it is used to continuously calculate the most recent data and live transfer the ideal velocity profile to the car to achieve intelligent velocity control.

The result is high resolution position estimation on the racetrack and 15% saved energy compared to an average driver in difficult racing scenarios.

The team used the model-based design approach for developing the RCC and implementing it on the on-board embedded controller. So, detailed MATLAB and Simulink models were ready to be used and with the help of real-time simulation and testing hardware, the team implemented their own test environment. 

They modeled the track, vehicle and electric components and emulated telemetry data and GNSS readings, allowing easy testing and improving their embedded controller and different controller designs.

This allowed the team to rapidly improve, test and verify the vehicle controller and the remote cruise control without the need to go on an actual racetrack.

With this impressive example on how students are shaping the future, I want to conclude this webinar 

Thanks for staying with us until the end of this webinar.
If you found certain contents appealing, please check out our webpage speedgoat.com.

Hi all and thanks for joining this webinar!
My name is Janosch and I’m responsible for Academia at Speedgoat.
Today, I will show you, how you can expedite your reasearch projects and provide a hands-on teaching experience for your students.
Let’s start with an example how real-time simulation and testing is used by a reasearch team at the technical university of Munich.
The team is developing fully autonomous, all-electric racecars with breathtaking performance.
A Speedgoat Mobile machine is used as the vehicle electronic control unit, or ECU for short, doing Sensor Fusion, highly performant motion control and monitoring of the vehicle components.
The cars are powered by four electric motors, requiring precise control to tame the combined force of over 500 horse powers.
In such projects, the test time on the racetrack is extremely limited and verification of algorithms is key for success.
They decided to model a complete digital twin of the vehicle that runs in real-time on a second Speedgoat target machine.
The data exchange between the two machines uses the same CAN interface as on the real car.
This means the ECU doesn’t see any difference between the real vehicle and the digital twin.
Furthermore, the team created a virtual representation of the racetrack from sensor data.
Co-Simulation of Simulink Real-Time with the Unreal Engine for visualization enabled fully virtual testing of the complete software stack for sensor fusion and motion control in real-time.
With this hardware in the loop setup the team was able to evaluate design iterations quickly, and test edge cases, emergency procedures and hardware failures in a safe environment.
When they finally took the car to the race track for in-vehicle testing, they could focus on fine-tuning and verification.
With this setup based on model-based design workflows and real-time simulation and testing, the team was able to win multiple competitions, like the human + machine challenge in Berlin. 
The fully autonomous racecar already achieves lap times on the level of an amateur human driver.
By the way, you can access the complete Simulink software stack by TU Munich in the form of a reference example on speedgoat.com, as well as a whitepaper on Sensor Fusion and Motion control for autonomous racing cars.
We just saw a first example of how researchers can accelerate their research. In today’s Webinar I will further dive into this topic. Two more topics I want to share with you are:
Showing you how professors can use industry proven workflows to provide a hands-on learning experience for their students and how real-time simulation and testing is used around the globe in different areas of research. 
To start with, let’s assume you have this model of a motor-controller and the motor itself and have successfully simulated and optimized it in your desktop simulation. Now, you want to use the same Simulink model to test the real motor with your controller and your embedded controller with a modelled version of the motor with real-time simulation.
I’ll show you how you can easily achieve this – let’s start the journey.
For easier navigation, I have clustered the key topics into three groups.
First, you learn the concept of Real-Time Simulation and Testing, the involved environment, the workflows and the hardware.
Second, you learn how real-time simulation is used in research around the globe for different fields of research. These will be highlighted with orange color.
Third, you learn how professors use model-based design and real-time simulation and testing to provide a hands-on learning experience for their students.
So let‘s start with the concept of Real-Time Simulation and Testing. And therefore, let‘s first look into the question „Why Real-Time Simulation and Testing?“.
Let’s say you want to test and implement novel controls systems?
For example, for electric powertrains, aerospace controls systems or automated processes in general.
We all seek to understand how to do it faster and better.
In particular, these questions arise:
How do you swiftly iterate over control designs?
How do you test controls algorithms?
You should be focused on the design and testing of controllers for complex system dynamics.
You should not be constrained by the infrastructure to do that. 
So, let’s look at how you can benefit from model-based system engineering and from early design up until field deployment.
This timeline shows you how controls development and testing benefit from a holistic approach.
Model-based design together with real-time simulation and testing is a key enabler. You can go from early designs through all the iterations and test cases via flexible and powerful prototypes.
It is not only about rapid controller prototyping, or Hardware-in-the-loop testing. Today's systems are way more diverse.
Often use cases are by-passing, Fault Insertion or virtual commissioning to name only a few.
Let’s quickly pause in our journey and look at the environment necessary to go from desktop simulation to real-time simulation for our motor control example. So, what are the key questions here?
First, how can existing models be used for real-time simulation and second, how can I interact with my model that runs in real-time.
The goal is to simplify your workflow. letting you design and test better controllers faster.
You can innovate and you are not constrained by embedded testing environments or with hassles of integrating solutions.
Benefit from a plug-and-play real-time solution that shields you from interoperability issues.
Experience the unity of simulation and testing with real-time target hardware, all directly from MATLAB and Simulink. If you have a campus wide license at your university, you already have access to all software and tools you need.
The seamlessly integrated solution is composed of two main components.
The first one, is Simulink Real-Time, the solution for real-time test and simulation from within MATLAB and Simulink.
It comes with several host capabilities that allow you to easily create, control and monitor your real-time applications, and serves as your real-time operating system.
The second component is powerful and scalable Speedgoat real-time target computer equipped with I/O.
The real-time application created from your Simulink model runs on it together with the Simulink real-time operating system.
Allow me to illustrate the workflow of going from desktop to real-time simulation and testing, right from your Simulink, with an illustrative example.
Let’s take an example, similar to the case shown at the beginning with Roborace – a novel cruise control function for the next generation full-electric vehicle.
Part of the research project has been designing, specifying, and sizing new software and hardware components based on a full vehicle simulation. The vehicle model is comprised of both Simulink components for the vehicle controls, as well multidomain physical Simscape components for high fidelity simulation of the vehicle plant including battery, electric motor, and thermal cooling systems. 

Regarding the cruise control function, for instance, you may have been using this model to rapidly tune controller performance and assess the design.

In a next step, you want to validate and verify the new cruise controller functions for execution on embedded controllers. To do so, you can remain in the exact same MATLAB and Simulink environment.

Let’s go through the few steps to enable real-time execution:

You start configuring a target machine in Simulink Real-Time. Under the hood, code generation is optimized for Simulink Real-Time engine and a fixed step solver is set. Both settings ensure that your model is running in deterministic manner on Speedgoat hardware.

You can rapidly connect to your Speedgoat target computer
And click the Run on Target Button
This will automatically build a real-time application from your model, deploy and run it on the Speedgoat target machine. The Simulink instrumentation and logging capabilities remain available for you to experiment in real-time.

You can see here that I am using system variants to manage different interfaces for the cruise control. This is a good practice in case you like to keep a single model for different development stages and easily switch back and forth between offline and real-time simulation.

Implementing the controller interfaces is also very simple: You can for instance implement communication through CAN protocol with simple drag and drop of blocks or by directly calling in I/O functionality from within the Simulink canvas.

There are five learning we can draw from this example:
You don’t have to leave Simulink.
No need to familiarize yourself with extra tools.
Just connect to hardware with a few clicks and experiment in real-time.
Switching back and forth is seamless.
and configuring I/O, namely the connections to your hardware, is quite smooth.

Time for the next step in our journey of bringing our motor controls example to live – first let’s have a look at rapid-controls prototyping.

You have seen this timeline earlier. And I’ve shown that model-based design and real-time simulation are enabling you to go from left to right, at a rather fast pace. Let’s see.

Your workflows may deviate slightly, but I am pretty sure that you’d agree on the following three main motivations for real-time based controller prototyping.

Test early to prove that your algorithms work in real-world dynamics.
You may find better trade-offs and tweak performance.

You have already seen the unified workflow combined with flexible and powerful hardware.
This unique combination allows you to worry less when testing!

Ultimately, you can be more innovative, expose design flaws earlier and prove concepts for publications.

Let’s bring in some hardware to demonstrate the workflow. When developing controllers for electric motors, it is vital to test early and often throughout the entire workflow.

You can reduce risks while prototyping and expose design flaws as early as possible.

As mentioned, first let’s focus on the earlier stages where you are prototyping the motor controls, and later in the part about HIL, we’ll look into hardware-in-the-loop testing of motor controls, too.

For rapid control prototyping, directly connect your real time application to your electric motor drive with flexible PWM and other digital outputs.

You can read back position, speed, voltage/current signals and even temperatures with ready-available I/O interfaces.

Let’s first look into how you transition your desktop model to real-time. Later, we will look into how you can use advanced features such as control-parameter auto tuner.

Lets have a look at this video.

Assume you already have a desktop simulation with a field oriented controller and a permanent magnet synchronous machine model. 

The controller model has a state machine controlling the system, a velocity and a current controller. Inside the current controller you see the Clarke and park transformation and its inverse.

In the middle there are the two PI controllers.

You can now use your existing controller and test it with a real motor. 

To interface the motor, Speedgoat driver blocks are used such as the setup block for the IO397 where you can directly access the pin mapping allowing you to connect your device under test. Another example shown here is the digital output blocks.

As we already learned, you can connect to the target machine either using Simulink Real-Time Explorer [Pause] or directly connecting a preconfigured target. [Pause] As already shown earlier, by the click of a button, the model is built, deployed and runs on the target. 

Once the model runs, I can switch from automated test-cases to manual input and control the motor manually. This integrated dashboard elements for example allow to turn the motor on and off and control the velocity with real-time data visualization.

Let me now share a customer success stories with you.

HuMoTech, one of our customers has developed a lightweight and programmable ankle-foot prosthetic called ‘Caplex’.

HuMoTech is a startup from Carnegie Mellon University. The way the prosthetic works is as follows:

The lightweight programmable prosthetic foot attaches to the user’s prescribed socket and is connected to the actuators and the control system. The system mimics what it feels like to wear assistive devices.

As the user walks the controller can emulate different foot characteristics, before building costly prototypes.

They use MATLAB & Simulink with Speedgoat hardware to develop the system.

The joint and lean support workflows by both MathWorks and Speedgoat enabled them to evolve from academic research to a successful start-up.

Our customers are free to explore and experiment in an environment that most are already familiar with, and they can see everything that is going on under the hood

says Josh Caputo their CEO. 

You already know this slide from earlier when I talked about prototyping controls.

Now let’s talk about hardware-in-the-loop 

I’m going back to this timeline I have shown you earlier

To focus on the next step, learning how you can reuse the same real-time simulation hardware to also test your embedded controllers with hardware-in-the-loop simulation.

Frontloading verification and validation tasks commonly are the main motivation for HIL testing.

It may be that the hardware prototype is not available, or you gradually integrate components.

You want to resolve design flaws and test edge cases in a safe environment. 

What do you need for HIL Testing? –

Certainly, a platform that runs your plant in a deterministic manner while being connected to sensor and actuators,

That allows for plug & play interfacing and test automation.

Ultimately, this will help you deliver embedded software faster and with lower risks.

Lets get back to our example for motor control, assuming you want to now test the motor controller safely with HIL simulation.

You can use motor and inverter models from Simscape Electrical or Motor Control Blockset to simulate your electric drive on CPUs or on FPGAs depending on your required closed loop sample times and model fidelity. For this you extend your plant model with I/O blocks to interface with the device under test.

As you can see here, the HIL system captures inputs coming from the controller, simulates the dynamic of the motor and emulates sensors. The microcontroller can be tested as if it was integrated with the physical electric drive. Once again, you can very easily interact with the application and visualize and log results

Let’s have a look at another example, this time from Lehigh University.

In collaboration with Servotest, the Natural Hazards Engineering Research Infrastructure Experimental Facility at Lehigh University has developed a MATLAB and Simulink based algorithm and deployed it to Speedgoat hardware to perform real-time hybrid simulations of tall buildings excited by wind or seismic forces.

In their Algorithms the whole structural systems are divided into physical and numerical substructures.

Over the last ten years, they have continuously developed this algorithms and implemented them into the program HybridFEM-MH, facilitating nonlinear structural Finite Element Analysis in the Simulink environment. 

How does this look like?

The Lehigh real-time cyber-physical structural systems laboratory has been built with servo-hydraulic actuators…
Allowing for breakthroughs in the field of real-time hybrid simulation.

With direct sensor feedback and command outputs to physical components.

Solutions from Speedgoat have been pivotal towards the success of complex real-time hybrid simulations at the NHERI Lehigh Eperimental Facillity

says Thomas Marullo

Let’s pause here and wrap up what I just discussed.

Real-Time Simulation allows to accelerate your research.

The hardware is not limited to a single workflow.

Easily compare your simulation results to your desktop simulation results.

Tune parameters in real-time from within Simulink.
And changing your setup, namely the connections to your hardware, is smooth.

You have now seen how MathWorks and Speedgoat work together to provide a seamlessly integrated real-time simulation and testing solution for you. We also saw some examples from universities and how they use it. You might now wonder, where in the Industry is it used and how?
Important indstudries are Aerospace or Automotive 

Large industries with many sub-segmentations are Electrification  and Automation & Controls.
Medical becomes more and more important due to advancements in robot driven surgery.

The use cases are manifold, for aerospace this can be 

Flight Controller and Autoflight Systems design, FADEC and Engine Controllers, Bypassing, VTOL Flight Dynamics Modeling or UAV Modeling and Testing or Trajectory Controller in Satellites to only name a few.

For automotive frequently used real-time simulation usecases are:
Powertrain, Chassis and Vehicle Dynamics, Automated Driving and Advanced Driver Assistance Systems, Infotainment and Multimedia Systems, Cabin, Body and Comfort systems, Full vehicle simulation or hardware in the loop simulation for battery management systems.

As already mentioned, electrification has many subsegments and for each subsegment, there exist many different use cases. I want to highlight the following two subsegments where model based design with MathWorks and Speedgoat is frequently used.
First power electronics with use cases such as motor control design, converter und inverter controls, power HIL or battery cell and battery pack simulation. Second, power systems for microgrids or transmission and distribution as well as part of electric vehicles on the road, in the air and at sea.
Real-Time Simulation and Testing is crucial and well known in industrial automation.
Used for many years already in process technology and automated manufacturing, different applications for motion control equipment or use cases such as tunnel automation or ship automation. 
The last industry to highlight here is real-time simulation and testing for medical devices. 
With huge advancements in medical research over the last decade, real-time simulation is now vital for development and research of robot assisted surgery, active rehabilitation, robotic prosthetics and wearable medical devices or even hearing aids.
After this outlook into various industry use-cases, lets return to our journey and have a deeper look into academic research.

I covered so far the basic concepts and workflows of real-time simulation. Now lets have a look on how this is applied in research by giving you some examples and insights.
First lets have a look how Timothy, a PhD student at Gent University, is using real-time simulation and testing for his research.

Hello, dear audience, I'm Timothy Vervaet and I’m working as a PhD student at the Coastal Engineering Research group of Ghent University in Belgium.

I work on experimental modeling of wave energy converter farms.A wave energy converter WEC is a device which aims to convert energy from ocean waves into electricity to harvest a considerable amount of energy. It is interesting to put multiple devices together in farms and as such interaction effects, positive or negative will occur. The project has given the acronym WEC Farm and the first web form.WEC Farm wave Energy converter has been tested for the first time in the Wave Basin of Alborgh University in April 2021. 

On the movie we can see the hardware under test being the
wave energy converter of a buoy operating in heave.So the motion is restricted tothe vertical direction only.The power takeoff of the device consists of a rack and pinion system in combination with the Beckhoff permanent magnet synchronous motor and a Beckhoff drive motor drive which requires EtherCAT communication. This EtherCAT Communication is established with the.Speedgoat  performance,real time target machine in combination with the target screen as can be seen here.
And the Simulink control model is built on a development PC.

There we can greatly benefit from the available Simulink real time EtherCAT communication blocks which allow to directly read motor parameters from the Beckhoff drive by EtherCAT communication and sends motor torque commands.

From the Speedgoat's target machine to the Beckhoff drive.

The wave energy converter will react depending on the chosen control strategy with the incoming wave conditions which are generated with the wave maker and or tests.

We plan to extend the current setup of one device to five wave energy converters and test this setup at the brand new coastal and ocean basin in Belgium in Austin and 2022. we can see the extension will be to three motor drives powering five Beckhoff motors. And as such, we will, have real time control of iris of up to five devices. 
And we will investigate different array layouts and control strategies and also test advanced controls such as model predictive control so the final aim of the WEC farm project will be to go for the scientific gap of experimental data necessary for the validation of recently developed numerical models.

Thank you.

Thank you Timothy for this very interesting insight into your project.

After the example we just saw, let’s go a bit deeper into how Simulink and real-time simulation can accelerate your research. This is already familiar from the rapid control prototyping example. Let’s see how you can go one step further in your research project using various toolboxes and tools from MathWorks.
As an example, you can use the FOC auto-tuner feature to optimize speed and current control loops.

In that short video, this feature adds some disturbance on the RPM signal of the spinning motor. Thereby the P and I gains of the controller are optimized based on the desired system response. As you can see, the response of the motor is much faster after tuning but doesn’t overshoot either.

How a similar concept can be used in a research lab, is shown by Dr. Ding, associated professor at Fudan University.

This is Doctor Chenyang Ding. I'm an associate professor at Fudan University.

I'm going to explain how to identify and control a precision stage using Speedgoat target machine.

The photo on the right shows the precision stage under study.

The stage consists of base frame, a mover, mechanical guidance permanent magnet, linear motor, and optical encoder. 

The mechanical guidance allows the mover to translate along a single direction and limits the red 5 degrees.of Freedom.

The linear motor provides accurate force to drive the stage backward and forward.

The optical encoder provides real time displacement measurement.

We have two research questions, how to derive an accurate model of the stage and how to improve performance of the stage by control design.

We use a Performance real time targeting machine to execute the control algorithm we designed.

Two IO cards IO318 and IO133 are integrated.

IO 318 is programmed to acquire AquadB signal from the incremental optical encoder.

It is used for displacement feedback and IO133 has eight channels with 16 bit DAC used to send control signals to the power amplifier which directly drives the linear motor.

The control diagram is shown on the top right of the slide.

During closed loop identification, the reference signal will be made zero. We inject excitation signal to
the system and input, and we measure displacement signal at the output. We estimate frequency response function or FRF of the closed loop system and coherence using signal processing toolbox.

And then we calculate the FRF for the plant based on the closed loop FRF and the feedback controller, knowing that it's controller is weak and only used for identification purposes.

The plant FRF is used to design controller, aiming to achieve high performance by loop shaping in frequency domain.

The two plots on the left shows the BODE plot of the open loop system. The bandwidth is defined as the frequency where the magnitude crossover the DoDB line 

The video on the right shows the stage commanded to move between two positions repeatedly. Interesting variables in a closed loop system can be traced and plotted in real time.

For example, position error and control signal etc.
These signals can also be saved in workspace from MATLAB for further offline analysis.

The reason we chose Speedgoat target machine is that we could program our control algorithm in Simulink and compile the program and automatically download it to Speedgoat target machine.
It is efficient and convenient. It also avoids programming mistakes.

Thanks Dr. Ding for these insights into your research setup. 

Let's go back for a moment to our setup which is part of our journey today, our motor, our real-time system and inverter. We learned how to use real-time simulation and how it can accelerate your research.
Now let’s have a look at Speedgoat‘s products and services offerings to understand better what a real-time system is comprised of.

Each system is configured to your individual requirements 
Changing requirements is not a problem, as you can reconfigure I/O modules. You can choose from a vast range of I/O connectivity options and exchange them at a later date.
All real-time target machines are expressly designed to work with Simulink and Simulink Real-Time,
Not only for the current and supported releases, we at Speedgoat also make the promise to support future releases.
Our hardware quality, our long-term warranty and maintenance services ensure long-term operability of your real time-testing hardware. 
Delivery of each real-time system includes the real-time target machine, I/O modules configured to your needs, together with accessories such as terminal boards and cables, and the Speedgoat I/O Blockset to connect and configure the interfaces to your hardware.

No matter whether you are prototyping control strategies or testing controllers against your digital twins, seamless connectivity shouldn't be a hurdle for you.
Therefore, we are supporting key protocols from all industries.
More than 200 I/O modules are available and ensure that your workflows remain un-interrupted.
I will give you a few seconds to spot the communication protocols that matter to you.

Let’s look at connectivity also from another angle, independent of just protocols. 
I/O also means access to sensors and actuators.
PWM signal generation and capture such as for motor controls is an example that requires high frequencies and ultra-low latency.
Also think about several real-time target machines sharing computational load and operating synchronously.

For universities, independent if you use the system for research or teaching, we offer a discount on all our hardware. Furthermore, a dedicated Education product line is available, mainly for class-room and teaching laboratories.

Offerings include the small, yet powerful unit real time-target machine with on-board capabilities such as EtherCAT master or UDP communication

Or the baseline real-time target machine.

It is important to know, that the workflows remain the same an all our platforms, allowing you to use dedicated systems for your task or even combine them.

Different modules allow to expand the systems with additional protocols and interfaces such as analog in- and outputs.

Variety of pre-configured functionalities such as PWM generation and capture, SPI or I2C communication or quadrutare decoding and encoding.

CAN

Or even using the FPGA and the HDL Coder workflow to run parts of your Simulink model on the FPGA itself.

To conclude this section, let’s have another look at an example, this time from a research team at RWTH Aachen.

They used real-time simulation and testing for a project for an actively controlled weft braking system for air-jet weaving machines.

The research project lasted for three years and had different partners.

Air-jet weaving machines have the largest speed among all weaving machines and are widely used in order to produce fabrics with high quality.

A common configuration of an air-jet weaving machine is shown in this figure. A yarn package and an accumulator store weft thread and serve it to the weft insertion process. During a machine cycle, the weft thread is inserted into the reed. The weft insertion process is divided into an acceleration phase and a braking phase. At the beginning of the acceleration phase, a main nozzle generates a high-velocity airflow which inserts a weft thread to the reed channel. Thereafter, the relay nozzles are activated consecutively in order to ensure a forward motion of the weft towards the end of the reed channel. During braking, the weft thread is decelerated by a yarn brake   in order that its movement is stopped at an appropriate time and in consequence on a defined position. After the weft thread reaches the stretch nozzle located at the end of the reed channel , it is elongated. The inserted weft thread is then cut  between the main nozzle and the beginning of the reed. Finally, the weft thread is pushed into the fabric, which completes the weft insertion process.
During braking, an inappropriate braking strategy may cause several problems. If the weft thread is braked too early for example, the weft tip does not reach the stretch nozzle. If a weft thread is braked abruptly, the weft tip may move backwards, resulting in defects in the fabric.

Therefore, it is relevant to control the weft movement during braking based on its behavior. The high machine speed of more than 600 revolutions per minute poses a large challenge to real-time closed-loop control. That means, the measurement, online assessment and the control should be accomplished within a very short cycle time.

With the defined sampling time of 1 ms, the diagram of the closed-loop control is shown in this figure.
Two high speed cameras are applied to record the movement of the weft tip during braking. The recorded frame is then sent to the Speedgoat via the frame grabber module, IO811. The weft tip’s position reflects the weft behavior in this machine cycle and is chosen as measured value. With image processing toolbox in Matlab/Simulink, the frame is processed to get the position of the weft tip in each machine cycle. 

The video shows the recorded threads during braking, with a slower playing speed. The task of the image processing is to detect the weft tip’s position in the horizontal direction, despite the background with vertical threads.

The measured position of the weft tip serves as the input signal for the controller. In order to avoid backwards movements of weft threads during braking, constraints on the weft’s velocity should be considered in the control strategy. Therefore, a model predictive controller is applied. Based on the model knowledge, the model predictive controller is able to optimize the actuating value at each time instance, ensuring a stable movement of the weft thread during braking without backwards movements.

The IO104 is used for communication with the weaving machine and the actuator. A synchronization signal from the machine can be received and an actuating signal can be sent to the yarn brake in each control cycle. 

After this impressive example, let‘s get back to our overview. I covered so far the basic concepts and workflows of real-time simulation and how it can be used to accelerate research. Now let’s have a look on how this is applied for a hands-on learning experience for student.

Professor Michael Ruderman uses model-based design in his control theory classes. To provide a hands-on learning experience, he created a teaching lab.

Based on a Baseline real-time target machine, controllers for a hydraulic loader crane can be tested in real-time.

Students create a rapid prototyping design of the control systems and test it with real industrial equipment without exchanging or adapting interface components.

The Speedgoat plattforms helped bridging the control theory and practice when teaching the students.

It allowed focusing on the methods and algorithms and forgetting about the tediousness of software and hardware interacing.

says Professor Michael Ruderman. 

Last stop of our journey before we conclude this webinar. Let me share how we at Speedgoat support you, introducing real-time simulation and testing into your lecture.

I already showed you the EDU product line, it is easy to expand these systems further to be used as part of your lecture.

Out of many examples, let me share two important ones, first we have different demo kits available

One example is the already shown electric motor control kit, used in this webinar.

Or a device under test kit that is also used by MathWorks in its Simulink Real-Time Trainings.

And as a third example the hardware-in-the loop kit, that also was shown in this webinar already. 

We also provide a variety of reference examples to get you quickly started with your curicullum such as the one used for the EMCK just shown

Or the one from the example at the beginning of the webinar, where we supported a team a technical university of munich with their effort for a full electric and autonomous racing car.
The third and last example here is to show you how real-time simulation and testing can be used for HIL testing in power electronics.

We are almost at the end of this webinar, so let’s circle back to the key takeaways from the beginning.

We had a look on how researchers use model-based design and real-time simulation and testing to accelerate their research.
We learned how students can have a hands-on learning experience and. we saw different examples on how real-time simulation and testing is used globaly in academia. Speaking of using real-time simulation and testing for research, we saw the example of how researchers used various setups to be successful in developing an autonomous racing car. At the end of this webinar, let’s together have a look on how students from RWTH Aachen shape the future.

It is the world’s toughest solar race 3022 km across Australia.
The world solar challenge crosses Australia from Darwin in the north to Adelaide in the south.
Extreme conditions challenge humans and machines.
Since 2017, a team from Aachen is competing in this challenge. The team Sonnenwagen Aachen is formed by students from RWTH Aachen and the university of applied sciences Aachen, with the goal to show how innovation can move the boundaries of technology – driven by solar only.
Just recently the students showed the world their latest model. So, for the last time today, let’s have a look on how real-time simulation and testing has been used in the development of this car.

As mentioned, the goal of the students is to build and develop solar powered highly efficient race cars.

But what does efficient mean in this context? 

Their race car can reach and hold a speed of 90 km/h with only on 1 kW, leveraging 4 m2 of solar panels.

To achieve this, the students developed their own powertrain components, battery, auxiliary electronics and chassis.

The challenge, in which they compete against 21 teams, is usually held in Australia.
To make it to the first place, one has to optimize the car and its driver assistance systems.
 
The race takes place over 5 days, the cars are driven on regular roads and the team has to take the weather into account as well.

Therefore, the team used more than 5 million GNSS data points and a detailed Multiphysics-vehicle-model and more than twenty thousand lines of code to develop an optimized velocity-profile for the whole race. 

Now the question was, how to bring that information into the car and allow for continues real-time updates during the race.

For this, the team came up with a remote cruise control.

During the race it is used to continuously calculate the most recent data and live transfer the ideal velocity profile to the car to achieve intelligent velocity control.

The result is high resolution position estimation on the racetrack and 15% saved energy compared to an average driver in difficult racing scenarios.

The team used the model-based design approach for developing the RCC and implementing it on the on-board embedded controller. So, detailed MATLAB and Simulink models were ready to be used and with the help of real-time simulation and testing hardware, the team implemented their own test environment. 

They modeled the track, vehicle and electric components and emulated telemetry data and GNSS readings, allowing easy testing and improving their embedded controller and different controller designs.

This allowed the team to rapidly improve, test and verify the vehicle controller and the remote cruise control without the need to go on an actual racetrack.

With this impressive example on how students are shaping the future, I want to conclude this webinar 

Thanks for staying with us until the end of this webinar.
If you found certain contents appealing, please check out our webpage speedgoat.com.

 

The Author

Janosch Marquart

Janosch Marquart
Technical Sales Engineer / Academia


Related content


Let us help you to find the right solution for your project

 

Request a Configuration Proposal

Get a proposal for a real-time target
machine configured to your needs.

Request a proposal

Request a Free Workflow Demo

Curious how to accelerate control design
innovation with a modular controller hardware setup?

Request a free demo

Have Questions?

Talk to our experts about your project
and application requirements.

Contact us
Follow Speedgoat LinkedIn