Skip to main content

Developing and Testing Next Generation Control Systems

Overview

This recorded webinar presents real-time simulation and testing solutions to accelerate the development of novel control algorithms. We will showcase why it is vital for testing and development that both controller and digital twin exhibit deterministic real-time behavior.

By focusing on various testing workflow examples, including control prototyping, integration testing with digital twins, restbus simulation, bypassing and calibration, and virtual commissioning, we take industry-specific approaches into account to back them up with customer success stories. 

Highlights

Specific topics that will be covered include: 

  • The importance of deterministic real-time behavior of both controller and digital twin for testing and development
  • Essential industry-specific testing workflow examples for automotive, aerospace, industrial automation and machinery, and more
  • Product highlights such as the rugged, modular, and powerful real-time simulation and testing hardware 
  • A vast range of I/O connectivity and communication protocol support you can benefit from
  • Seamless configuration and programming of FPGA I/O modules 
  • Controlling and monitoring real-time applications using the Simulink platform and test automation workflows

Success Stories

 

Video Transcript
 

Hi all and thanks for joining this webinar! My name is Christoph and today we are going to talk about how real-time simulation and testing are essential when you are developing and testing next generation controls systems.

Let’s get started with a historical example.

What we’ve just heard was Neil Armstrong reporting a program alarm during Apollo 11 Mission. Actually, this happened three times just minutes before landing

The situation was handled professionally by the probably brightest minds at that time, but just imagine the potential impact of a computer bug in that stage.

Interestingly, the 1202 program alarm has to do with real-time execution.

The main controller runs into an overload condition due to some extra computations.

Buzz Aldrin kept the rendezvous radar activated for later docking to the command module.

However, this radar inserted faulty reference data into the guidance computer.

These extra computations were sufficient to let the guidance computer crash.

Deterministic real-time behavior

of both controller and plant allows for breathtaking system dynamics,

and is key for developing complex controls.

Today’s megatrends such as electrification and autonomy also challenge the players in the field.

Let’s look at two examples how Speedgoat hardware together with model-based design in MATLAB and Simulink was part of solutions overcoming those real-time and determinism challenges.

First, Leonardo DRS is using FPGAs for HIL testing of their shipboard Power electronics systems.

Thereby they save costs, time and lab space and shorten design iterations from days to hours

Second, a brave team of researchers at TU Munich has leveraged the RoboRace platform to develop an autonomous racecar with breathtaking performance.

The team is leveraging visuals sensors such as cameras and lidars for their motion controls concept.

Let’s say our joint task is to develop, 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.

So, let’s look at how you can benefit from model-based system engineering and from early design up until field deployment.

We’ll use this timeline throughout the presentation to show 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.

So, we’ll touch base on use cases such as by-passing, virtual commissioning or restbus simulation

The real-time simulation and testing platform by Speedgoat and MathWorks simplifies your workflow and let‘s 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.

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 suppose you are working on a novel cruise control function for the next generation full-electric vehicle.

You and your team have 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 have may been using this model to rapidly tune controller performance and assess design.

In a next step, you may want to validate and verify the new cruise controller functions for execution on embedded controllers. With Speedgoat and MathWorks unified platform, this is certainly possible, and 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 the Simulink Real-Time App. 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 then rapidly connect to our Speedgoat target computer and click the Run on Target Button

This will automatically build a real-time application from your model, download, and run it on the Speedgoat target computer. The Simulink instrumentation and logging capabilities remain available for you to experiment in real-time.

To test the new embedded controllers, you need it to be able to interface with your brand-new embedded controller through real-time capable I/O and specific protocols.

You can see here that I am using system variants to manage different interfaces for the cruise control.

Implementing the controller interfaces is also very simple: With the Speedgoat I/O Blockset Simulink integration, 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 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.

In summary and most simplistically, when you work in Simulink, there is literally no detour to get to your real-time application. It is practically the same.

You parametrize your real-time application in Simulink and also deploy it from there.

So, Simulink isn’t only your deployment environment,

it is also your hub for all kinds of testing and including logging, instrumenting, or configuring your hardware to run.

Simulink and Speedgoat development has been happening hand-in-hand for more than 10 years.

Hardware and software are expressly designed for one another

So, you won’t experience any version lag.

I have asked Jay Abraham, Group Manager for real-time and Verification products from MathWorks to share for us the MathWorks view on this collaboration.

Thanks Christoph, thanks for bringing this up! Happy to share the MathWorks on how we work closely with Speedgoat to provide our mutual customers with a fully integrated and best-in class real-time simulation and test solution. To enable this fully integrated software and hardware platform, MathWorks and Speedgoat engineering teams collaborate very closely. For every release, we check that the products work out of the box with Speedgoat hardware. Furthermore, we ensure that the workflow leverages the power of Model-Based Design. For example, being able to reuse tests from desktop simulation, directly on the real-time target hardware.  We also coordinate with support each other’s teams to make sure that the customer experience is seamless, and you can be ensured that our technical sales teams will support you throughout the evaluation and purchase process.

Thank You, Jay, for sharing this with us!

Up to now, we have covered the motivation for real-time simulation and testing,

and why Speedgoat and Simulink-Realtime form a great solution.

Now, let’s look deeper into the key enablers to support your workflows!

For easier navigation, we have clustered our key enablers into three groups.

#1 First, you benefit from a unified platform that enables you end-to-end development and testing of controls. The integrated workflows from MATLAB and Simulink allow you worry-free experimentation leveraging the instrument and logging capabilities, and also to use test automation for your verification and certification tasks.

#2 Second, enablers that are more but certainly not exclusively targeted for controller development and controls prototyping. These will be highlighted with orange color.

#3 Third, hardware-in-the-loop testing. Our integrated and scalable HIL solutions enable you to run simulation of your digital twins in full-deterministic manner.

So let‘s start with the universal enablers.

Speedgoat offers a wide range of real-time target computers.

Benefit from the greatest power and flexibility with the Performance machine. It ships with the latest Intel CPU generations and allows up to 50 I/O modules. The chassis is tailored for desktop as well as lab use. Depending on your compute tasks and the number of both sensor and actuators,

The Performance machines are designed also for rack-mounting.

The Mobile, Baseline and Unit machines are ruggedized, hence allowing being used in prototypes or moving vehicles of any kind. Yet, they are powerful and allow for modular I/O expansion.

The Mobile is a compute powerhouse leveraging Intel’s latest mobile CPUs and it can host up to 14 I/O modules.

The Baseline is an excellent trade-off between compact form factor, power and flexibility. It is ideal for applications requiring a small set of diverse I/O. Over 100 I/O modules are available and up to 7 can be installed via the miniPCIe, PMC and XMC interfaces.

Unit machines are great for controller prototyping of size and weight constrained projects such as robots and devices for interaction with humans.

Independent of the standard configurations, our aim is to satisfy your needs. So, ‘Yes’ customizing is totally an option!

No matter whether you are prototyping control strategies or testing controllers against your digital twins, seamless connectivity shouldn't be a hurdle for you.

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.

A key enabler for your seamless development workflow is the stress-free IO configuration.

I/O and hardware of any kind is represented by Simulink blocks.

Placing them in your model and configuring them is as straightforward as it can be.

Developing advanced controls requires mastering huge amounts of data.

This may be vision data from real or virtual sources, audio data or control signals of any kind.

FPGAs can help handling these data-rich signals with low latency while keeping desired sample rates.

FPGAs seamlessly integrate into your system and handle all kinds of data types and support a variety of protocols.

Speedgoat offers two types of FPGAs: Configurable ones and Simulink-programmable ones

Configurable FPGAs allow you to use high frequency I/O and lots of protocols without FPGA programming knowledge. [Breathe]

There are many code modules represented by Simulink driver blocks.

And you can configure your FGPA on the fly and directly from Simulink.  Speedgoat provides different configuration files so that you can get the best performance out of the IO module for dedicated applications.

FPGAs can also be used to schedule execution of subsystems, the entire real-time application, and as said before individual I/O modules, or even to synchronize multiple target computers.

Configurable FPGAs allow you to use high frequency I/O and lots of protocols without FPGA programming knowledge.

There are many code modules represented by Simulink driver blocks.

And you can configure your FGPA on the fly and directly from Simulink. Speedgoat provides different configuration files so that you can get the best performance out of the IO module for dedicated applications.

FPGAs can also be used to schedule execution of subsystems, the entire real-time application, and as said before individual I/O modules, or even to synchronize multiple target computers.

Programmable FPGAs allow you to outsource both, parts of your algorithm and signal I/O to the FPGA using the HDL Coder workflow from within Simulink.

Speedgoat provides you with ready-to-program I/O and protocol driver blocks. So, it doesn’t necessarily become more complicated,

because you can leverage and start rapidly using hardware proven example models.

Ultimately, you have more flexibility for your advanced use-cases.

Several FPGA IO modules allow using both workflows

So, it’s possible to start simple with the configurable workflow and evolve to the programmable one as you go.

Regardless of the workflow, Speedgoat FPGAs work like any other I/O module and can be reconfigured.

Allow me to share a concrete example about FPGA-enabled data acquisition, namely a success story by our customer TAE Technologies.

TAE Technologies focusses on clean fusion energy. Their fusion reactor named Norman handles hot plasma of around 30 Million degrees Celsius. A challenge is keeping the plasma well-centered in the reactor which requires state of the art feedback control techniques.

Controls require magnetic field data from about 400 sensors to be logged and stored at 2.5 MHZ. 4 data acquisition and 2 compute systems that communicate using fiber optical, multi-gigabit transceivers and Aurora, allowing for super-fast and deterministic data transfer while meeting best in class IO latency

To develop controls, TAE relies on Speedgoat programmable FPGA IO modules, HDL coder from MathWorks and of course Simulink.

For complex tasks or distributed systems, multiple devices need to synchronize computing tasks.

Correct timing is crucial to ensure that several processes can interact deterministically.

Let’s look at a simple example with two sensors at different locations and they send results to a central node. Each system runs on its own clock, these clocks will drift over time. So, measurements will arrive at the central node at arbitrary times, and there will be idle cycles before the data can be processed.

We might even lose data because the machines run out of sync.

In this scenario, we waste precious time, computational resources, and accuracy.

All these issues can be solved by synchronizing the execution of individual nodes.

We can trigger the sensor readings to happen simultaneously, or simply use a common reference clock for timestamping.

We can send an interrupt signal to trigger processing as soon as new data is available.

These options eliminate idle time and ensure that each data packet is processed.

Synchronization should be used whenever possible to achieve deterministic results and maximize performance.

This example has illustrated how the synchronization improves performance

and allows to combine data from different sources.

Synchronization can also be used to distribute a large workload across multiple systems.

This requires precise task scheduling using a shared reference clock. On top of that, low latency communication between the nodes can be implemented, using, for example, shared memory I/O modules.

When choosing a solution for timing and synchronization, you need to consider the distance between the individual system components. The requirements on timing accuracy, and what types of interfaces are available or preferred.

Speedgoat offers support for common timing protocols like PTP or IRIG for local devices and connections to third-party devices.

For long distance synchronization, a GNSS receiver can be used to receive a globally available, highly accurate clock signal from satellites.

Many Speedgoat I/O modules are equipped with clock and trigger pins for synchronization.

Additionally, specialized modules are available to add ultra-low latency communication.

Earlier in this webinar, we have seen the seamless integration with Simulink. Let‘s now emphasize on how flexible and powerful working environments can be interfaced.

For instance, you can use custom MATLAB apps, or create stand-alone apps for non-Simulink users.

MATLAB scripts allow you unlimited interaction options with your real-time application.

Scripted interaction via external programming languages like Python or C/C++ allows you to instrument and inspect your real-time applications.

So, let’s look at these options a little more in detail

The SLRT Explorer app allows you to centralize all real-time testing tasks in one single place.

You can manage multiple Speedgoat target computers and their configurations.

For fast, ECU-like boot behavior, you can select real-time applications to run upon startup

The signals tab shows you all signals available for monitoring and you can stream them directly into Simulink, let‘s say to the Simulation Data Inspector

You can also identify parameters and tune them in real time while the experiment is running. Quickly trace them back to the Simulink model in case you need to understand their functional context.

Perhaps, you would like to open-up access to your real-time application for non-Simulink users or perform demonstrations using customized apps.

You can easily pack and share apps with other users.

App Designer enables you to design and create custom-built apps. You can quickly lay out your own app by dragging and dropping standard components and quickly program their behavior.

Automated execution through scripting is key for real-time testing. MATLAB offers you great features that make coding and personalization very easy.

It allows performing tasks repeatedly and thereby automate testing workflows.

Live Editor lets you create scripts that combine code, output, and add interactive controls allowing you to experiment and work with your application.

If you prefer using third-party environments to work with your real-time applications. This is possible using the feature-rich MATLAB API.

For instance, in this example here, we show a set of Python tasks that automate the process of building, downloading, and running a real-time application on target, and the generation of an analog signal and its amplitude modulation

Speedgoat and Simulink Real-Time comply to several industry standards.

We also see that our customers are using Speedgoat hardware in ecosystems comprised of multiple software tools.

Allow me to share a few examples.

Agco Fendt are using drivetrain and engine models from within LMS AMESim together with Simulink Real-Time and Speedgoat hardware systems. This enabled them to implement a HIL test bench based on a tractor model designed in Simulink®.

IAV have set up a framework test automation for testing their programmable logic controllers using INCA Flow that gets integrated via XCP and OPC UA.

Binder uses Dymola from Dassault Systèmes to model an environment chamber in an endeavor to implement a model predictive approach for control dev development.

Speaking of ‘model predictive control’, we ourselves have been using with embotech’s forces pro solver that interfaces with Simulink’s Model Predictive Control Toolbox™ to set up a real-time lane keeping assistant.

So, allow me to summarize here some of the key value adds.

Run real-time applications right from Simulink

Instrument applications using apps for easy and - if needed Simulink-independent - access to signals and parameters.

Automate testing via scripted execution. No matter whether from MATLAB, auxiliary coding languages or dedicated toolboxes such as Simulink Test.

Run your digital twins on desktop or in real-time to ensure real-world like scenarios.

So, we have covered the universal enablers.

Now coming to the second part of the enablers related to controls prototyping.

As said, let’s now focus a bit more on the early stages namely controller 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, but at a rather fast pace, allowing to be even more competitive. Let’s see.

Your workflows may deviate slightly, but we are 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 shorten time to market.

But we know, you rarely design controllers independently and from scratch. Typically, you take into account already existing infrastructure.

A good example for controller prototyping are electric motors. When developing controllers for electric motors, it is vital to test early and often throughout the entire workflow.

You can cut back development costs by exposing design flaws as early as possible.

In this part of the webinar, we will focus on the earlier stages where you focus on 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.

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.

Allow me to share some customer success stories now.

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

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.

HuMoTech uses MATLAB & Simulink with Speedgoat hardware to develop the system.

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

#2 “[…] 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.

Let’s conclude this section with another success story, one by Continental.

At the MathWorks Automotive Conference 2020, they presented one of their control design workflows.

Andreas Top the presenter states that “Engineers can quickly move from SIL to HIL using a Speedgoat system with programmable FPGA technology. This solution provides fast development of new control strategies and fast calibration. An additional bonus is more flexibility regarding hardware choice.”

You might want to develop specific components of an already existing embedded controller?

Or perhaps you are in the middle of a test and integration campaign, and you need to rapidly modify parts of the embedded design, while avoiding the lengthy embedded software iteration processes.

In such scenarios, you can utilize Speedgoat for bypassing rapid prototyping. Let’s check this variant in more detail:

Unlike in fullpass prototyping, where you would virtualize your full controller, and a Speedgoat target would act as a prototype controller

with bypassing you run specific parts of the software on target hardware, for instance

a modified design that you created in Simulink.

Deterministic real-time behavior between both, bypassed and embedded components, is achieved by establishing

a bypass service with hooks and data links.

This enables, the embedded controller to send input data to the bypassed unit, through a DAQ (data acquisition) link, and results are sent the other way through a signal injection link.

In early design stages, Bypassing allows you to rapidly prototype and test new function designs, without being limited embedded hardware.

So, you can implement development stages with higher confidence and guarantee that your design choices will fit the embedded environment.

During integration, Bypassing allows you to rapidly introduce and test late design changes while minimizing the effort of software revisions. In summary, bypassing helps de-risking and speeding-up development stages.

Our automotive customers apply this concept for in-vehicle ECU bypassing,

using XCP over CAN or UDP, as an efficient way to develop new control functions and optimize existing controller strategies.

Industrial Automation users, for instance, our customer HOMAG applies bypass techniques using EtherCAT protocol to rapidly improve controls of a heating unit for their CNC.

In aerospace, updates to flight controllers can be tested with no risk for safety.

Well, let‘s also chat about using a real-time target machine as embedded controller for your prototypes and smaller series.

You may ask ‘Why?’ – and that’s totally fair.

So, first, you get the closest connection possible to Simulink to implement controller changes.

Second, you have less or no constraints on your compute resources. Especially when you are trying different controls concepts.

Third, a RTTM ensures deterministic real-time behavior of your controller which desktop environment can hardly provide.

Overall, it is not only for great for testing and verification and validation, but also leads to reduced costs and risks, and shorter time-to-market.

For example, we have a customer that uses real-time targets for robotic support systems such as depicted on the screen, but it’s also suitable for many other applications.

We have covered the enablers for controls prototyping.
Now, we’ll have a look at hardware in the loop testing with digital twins.

Testing control algorithms can be time-consuming, expensive, and potentially unsafe if you decide to test against the real system. To remain competitive and deliver high-quality controller software, you may apply Hardware-in-the-Loop testing – or HIL testing in short.

HIL testing lets you verify your controller designs without having the complete system hardware available. Instead, you rely on a real-time plant simulator that acts as a digital twin of the real system or just parts of it. Safely test edge cases, integrate new hardware upon availability, and make controller design changes when they are still cost-effective to implement.

Frontloading verification and validation tasks commonly is 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 deterministic manner while being connected to sensor and actuators,

And that would allow for plug & play interfacing and test automation.

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

Simulating the rest of the bus or simply restbus simulation is a very common HIL testing workflow, too,

It essentially means that system bus connections or nodes,

are simulated also on the target machine to facilitate verification and validation of the controller under test.

This task is seamless with Speedgoat hardware and Simulink.

Virtual commissioning is also a common HIL testing task.

The digital twin of the plant runs on a SG RTTM, and I/O modules emulate all connections to the plant.

This workflow is especially suited for large scale plants, such as tunnels, processing machinery or power distribution systems such as grids, ships or large-scale generators.

where testing can become time consuming and resource intensive. Or it is just not efficient to train operators on the actual plant.

Virtual commissioning allows for thorough testing of plants in a virtualized environment.

Testing and virtual commissioning of programmable logic controller - PLCs in short - is reproducible, adaptable and can be automated.

The digital twin of the plant runs on a SG RTTM, and its I/O modules emulate all connections to plant.

You can interact with the real-time application directly from Simulink, for the purpose of error injection, test execution and signal monitoring.

Speaking of plant models and digital twins. Let’s revisit MathWorks plant modeling capabilities which all are compatible with Simulink Real-Time and Speedgoat hardware.
I will cover that very high-level to keep this webinar focused. To address modeling details, I suggest getting in touch with us or your fellow MathWorks peers.

Simulink as leading integration platform allows you to model any level of fidelity.

Simulink and its toolboxes tailored for specific applications provide a rich set of features that can be used right out-of-the library

Simscape offers great capabilities for physical modeling, and particularly SSC Electrical is a great library for your electrification modeling efforts because there are specific workflows optimized to enable deployment on Speedgoat FPGAs.

Both Simulink and Simscape leverage FMU integration to connect to a wide range of other tools. There are 100+ connections partners of which provide simulation tools.

And last but certainly not least, MathWorks offers full-featured reference application in the documentation and on FileExchange.

Allow me to mention a few more highlights about 3D modelling capabilities, that included phot realistic and 3D visualizations also nicely supported by our real-time testing workflows.

Simscape Multibody together with the ready-made vehicle templates can be used as full-fletched vehicle modeling platform

Integration with 3D rendering tools such as Unreal Engine 4 allows for testing of all kinds of vision algorithms.

Sensor models allow for safe testing of autonomy-enabling controllers

In summary, these are great tools for your controller development and real-time testing.

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

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

Later in your development process, you want to test your motor controller safely with HIL simulation.

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

Extend your plant model with I/O blocks to interface with the device under test.

As you can see here, the HIL system capture 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. You can very easily interact with the application and visualize and log results

Speedgoat offers fully customized rack systems for your demanding HIL simulation.

We’ll make sure you have easy access to all signals via break-out panels.

We’ll integrate power supplies, actuators, inverters and any kind of power electronics,

as well as project-specific PCBs for signal routing and conditioning.

We’ll collaborate with you closely throughout the project.

We‘ll make sure that project specific signals are conditioned such as for level conversion, galvanic or loop powered isolation.

Every rack system undergoes complete testing according to your specifications for example using your test models or following a full-scale Factory Acceptance Test procedure.

We strive to provide a plug-and-play solution when connecting with your ECU in automotive, FADEC in aerospace, PLC in industrial automation.

Same as controller prototyping, HIL testing requires powerful I/O modules.

For example, emulators for battery cells, modules for fault insertion or resistors.

Our customer Proterra headquartered in South Carolina, USA, a world leader in the design of zero-emission vehicles is a nice example.

They developed a HIL test bench to test their advanced on-route charging system, that can charge specially designed lithium titanate batteries in as little as 5 minutes.

With that testing system they can run all the major vehicle components, the vehicle’s extensive CAN protocol networks, and all the digital and analog I/O, including temperature, pressure and speed.

We live in a world that is dependent on electricity and that dependency is growing more and more.

Electric motors nowadays consume about half of all electricity produced!

So, the ongoing megatrend of electrification transforms the way power systems are designed and analyzed on a systems level.

Typical applications of power systems are: Microgrids, Electric Vehicles, Full Electric ships, More Electrical Aircrafts

For electrifying systems, you can accelerate testing of controls for with HIL simulations.

You can easily model electrical plants using Simulink and Simscape

You can reuse electrical models from desktop simulation for real-time testing

You can extend your plant model with Speedgoat ready-to-use I/O driver blocks

Monitoring real-time signals is flawless, and so is performing multidomain and multi-rate simulation in real-time.

Our Power HIL solutions offer you some great value ads for real-time simulation.

Run your systems at different levels of fidelity depending on what matters.

Bigger time steps to oversee the system level,

or higher resolution to optimize details of the system component controls.

I/O modules and connectors are available to tackle shortest round-trip times while keeping ultra-low latency.

A typical setup  for Power HIL could look like that.

It is comprised of a power amplifier in between

a device under test like the 3-phase power part of a solar plant

and the HIL simulator.

Amplifier and Speedgoat real-time target machine are connected through a high-bandwidth fiber optic connection.

To conclude on HIL simulation of digital twins, allow me to share another customer success story.

On of our aerospace customers, Gulfstream Aerospace Corporation, out of Georgia in the United States uses HIL simulation to certify controllers.

By using a Speedgoat system, they simulate two interconnected engines, and test them against the full authority digital engine controller, or “FADEC” in short.

Although it looks like we have completed to go through the key enablers

I‘ll show you - for just a few minutes - that some enablers are truly tackling your complete workflows, for example when it is about Power Electronics Control Design.

Let’s conclude with a topic where a continuous end-to-end development process is required.

Designing controllers for Power Electronics components can hardly be successfully when testing without the plant.

Now let’s go through a use case for power electronics controls outlining WHY it is key to consider controller prototyping and HIL testing together - and not as silo-like processes.

The journey typically starts by defining requirements and simulating both plant and controller in a desktop environment.

Then once an initial control design is ready, our customers move into controller prototyping on a real-time target computer.

Before connecting to your hardware prototype and potentially damaging it,

you would employ HIL testing using another real-time target machine mimicking the I/O of your prototype running the same plant models that you are designing in the desktop.

For your workflow, there is no impact because Simulink is your central development platforms. So, you have no constraints for your design iterations.

Before connecting your precious hardware to the embedded controller there are two testing tasks that you would want to conduct.

The first one being,

HIL testing with the code running on the embedded target.

The second one is another controller prototyping step involving a real-time target connected to the hardware prototype to for example fine-tune the controller

At the end of this agile and safety-oriented workflow hardware and embedded controller can be put into service.

So. Let’s talk about a few success stories from our customers to conclude this section focusing on electrification.

Supergrid Institute in France develops technologies for future electricity transmission networks for transporting gigawatts of energy over distances of up to several thousand kilometers - named Supergrids.

The Institute has developed a new high voltage, high power DC-DC power converter enabling efficient DC transmission in supergrids.

Special about this converter is the high-switching frequency of 20kHz using silicon carbide transistors, which poses some challenges on the control system.

In summary, a prototype was created within one year from scratch using MBD.

It is compact, can handle powers of 100kW at 1kV voltage and has an efficiency of 98%.

For testing and tuning the controller, a Speedgoat Performance machine served as flexible and powerful control unit.

The controller code was generated HDL Coder and deployed using Simulink Real-Time.

Let’s stay in the power electronics domain and look at another example.

Simulating plant models at sample times below 1ms,

like for this grid tied inverter can become challenging to be executed on CPUs.

You can run your Simulink and Simscape Electrical models on programmable FPGAs and reach desired simulation time steps and PWM switching frequencies.

I’ll explain the process in a simple video.

First you convert a Simscape power electronic models to switched linear models using the Simscape to HDL workflow advisor.

Then, you can generate HDL code and implement a bitstream on a programmable FPGA

This enables you to test your switching algorithm and compute the efficiency of your power converter.

Once implemented on the FPGA, you can observe switching dynamics on a picoscope or directly in Simulink.

To conclude on the topic of Power Electronics Control Design.

Allow me to mention Speedgoat’s solution for a Battery Management System. It enables modeling and testing batteries down to cell level for up to 192cells, including fault insertion and temperature simulation at cell level.

Simulink and Simscape provide a wide range of battery models

So now we have covered

the key enablers for real-time simulation and testing,

We’ve also discussed why you need to be doing it.

Let’s now summarize before going into the Q+A session.

Allow me to summarize the entire webinar now.

Your assessment may be a little different and may be much more detailed than the points that I’ll bring up.

I hope we can all agree on these three major takeaways

You can be faster! The integrated solution and the modularity of both hardware and software enable you, instead of restricting you.

Your designs are safer! A number of capabilities allows you to front-load testing and detect design flaws early when they are still easy to fix.

A key to both speed and safety is automation. You can seamlessly address your V/V tasks. You start verifying your controller against models, then you verify with parts of your hardware and final implementation will be within reach a lot more easily.

Thanks for staying until the end of this info-packed video! We hope you got some valuable insights, and for more information and learning content I invite you to check out our webpage speedgoat.com.

 

The Author

Dr. Christoph Hahn

Dr. Christoph Hahn
Head of Technical Marketing


Related Content


Learn how we can help you with 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 industry automation
and machinery experts about
your application requirements.

        Email us