Abstract
This first chapter provides an introduction to the hardware-in-the-loop (HIL) approach and Typhoon HIL, in particular, including a brief overview of its history, achievements, and vision. Real-time simulation challenges are introduced. Throughout the chapter, key technological aspects and functionalities behind the Typhoon HIL toolchain are discussed, highlighting how this seamlessly integrated solution enables the creation of high-fidelity models for hardware-in-the-loop-based real-time simulations and performs automated tests for dynamic and complex systems that go from single high switching frequency power electronics converters to larger microgrid systems.
Access provided by Autonomous University of Puebla. Download chapter PDF
Similar content being viewed by others
Keywords
- Control validation
- Hardware-in-the-loop
- High-fidelity
- Model-based testing
- Real-time simulation
- Typhoon HIL
1.1 Introduction
Power-electronics-based technologies are in continuous and accelerated development, leading to a significant cost reduction and increased reliability in different components and devices in the past decades. Motivated by the need to digitize, decarbonize, and decentralize electric energy systems, these advancements enabled global transformations in the energy and electrical power industries. For instance, modern power systems have evolved from a centralized generation framework with unidirectional power flow to dynamic and complex smart grids, characterized by a high penetration of distributed, intermittent renewable energy sources, energy storage systems, smart relays, and the possibility of consumers also acting as producers (e.g., prosumers). Paradigm shifts are also present in other power electronics applications, such as the growing market share of electric vehicles in the automotive industry; the burgeoning interest in more electric and environmentally friendly shipboard and airplane power systems in the marine and aerospace industries; and the advancement in high-efficiency and low-cost electric motors, electric drives, and powertrains (Liserre et al. 2010; Osório et al. 2021; Chemali et al. 2016; Rommel 2019; Xu et al. 2021).
As a common point in these applications, one can look to the presence of highly dynamical switching converters that, besides its own complexity, include additional features such as intricate digital control, protection capabilities, and advanced communication systems. As a consequence, a major engineering challenge has been to be able to design, implement, and validate, in a timely manner, high-quality and economically viable solutions that comply with multiple development and operational requirements, such as electric vehicle integration standards and grid codes (Osório 2020; Knezović et al. 2017).
In this direction, as the intricacy of controlling power electronics, microgrids, and power systems rise, the ability to reduce development time and costs is a key trait. It is not efficient to wait until advanced stages of a project to carry out tests or to wait for prototypes to be built in order to manually verify the integration of different hardware and software, as well as to assess the performance of the overall system. If this strategy is adopted, it can significantly prolong development time and cost, in addition to limiting testing flexibility due to hardware constraints and safety precautions (Dinavahi et al. 2001; Vekić et al. 2012; Khan et al. 2017).
To overcome that, and to increase the efficiency of engineering processes, hardware-in-the-loop (HIL) simulations have been increasingly used by industry and academia. In this testing framework, the device under test can be directly connected to a real-time simulation, enabling efficient closed-loop, model-based automated testing. HIL proved to be reliable and comprehensive in accelerating the development cycle by allowing testing to start early in the development process, all while improving flexibility, coverage, and security in the verification and validation process. As a testament to that, HIL tools have been used by the automotive and aerospace industries for decades, and have proven effective for testing and pre-commissioning of microgrids, shipboard power systems, validation of energy storage systems, motor drives, and other applications (Genic et al. 2017; Salcedo et al. 2019; Jonke et al. 2016; Zelic et al. 2020; Abdelrahman et al. 2018; Amin et al. 2019; Badini and Verma 2019).
Since its foundation in 2008, Typhoon HIL has supported industry and academia by providing high-fidelity hardware-in-the-loop real-time emulators for electrical systems, with continuous development driven by extensive user feedback. By means of vertically integrated test solutions, Typhoon HIL enables model-based development, test-driven design and the development of digital twin models to assess the technical feasibility of complex systems from the early stages of development all the way to pre-certification, including verification and validation of controls, protection, the communication layer, system integration, and interoperability testing. Some Typhoon HIL devices and features of the toolchain are illustrated in Fig. 1.1.
For a better understanding of how Typhoon HIL toolchain has been recognized as a powerful solution for real-time hardware-in-the-loop simulation in different applications, throughout this chapter, technical details about the technology, methodology, and functionalities are presented. It is also worth mentioning that several tutorials, videos, and knowledge-based articles are available online, detailing the features presented in this chapter (Typhoon HIL 2023, 2023a, b).
1.2 Model-Based System Engineering and HIL Testing
For a long time, control system testing was done manually, relying on small-scale or large full-scale power hardware. In traditional development and validation cycles, such as those following the V-model, these tests would often occur only in the verification and commissioning stage after a physical prototype has been developed. In order to meet cost, time, and quality requirements, model-based systems engineering (MBSE) has emerged as a powerful methodology. In this framework, physical systems and prototypes can be replaced by virtual models, which enable the execution of exhaustive simulations in a safe and flexible environment, saving time, and reducing costs from the specification to the commissioning and maintenance phase. A graphical representation of how MBSE can be applied to support different steps of the development cycle is shown in Fig. 1.2.
Depending on the specifications, level of abstraction, application, and device under test, different testing setups can be considered, as illustrated in Fig. 1.3. These approaches include model-in-the-loop (MIL), software-in-the-loop (SIL), controller hardware-in-the-loop (C-HIL), and power hardware-in-the-loop (P-HIL).
In the MIL and SIL approaches, both control and power stages (i.e., controller and plant) are simulated in a virtual environment (V-HIL), generally not requiring real-time execution. In the MIL approach, the controller is modeled together with the power layer, while in the SIL approach, the actual control software is considered in the simulation.
Testing setups that feature a mix of physical systems and virtual models are collectively referred to as hardware-in-the-loop (HIL). This means that some physical part of the system is connected to the real-time simulation, which could be part of the power hardware (P-HIL) or part of the controller hardware (C-HIL).
In the P-HIL approach, the focus is on testing power hardware. Therefore, power amplifiers can be used to link the real-time simulator to the actual power hardware device under test via analog input/output signals or communication protocols. For instance, current and voltage references can be sent from the real-time simulation to the amplifier using analog outputs, while the feedback signals of the device under test are sensed by the power amplifier, and then sent to the simulation using the real-time simulator analog inputs. As a drawback, although testing software in the presence of actual power provides very accurate results, it usually involves higher cost, lower flexibility, and the need for additional safety precautions.
On the other hand, the C-HIL approach stands out as an effective solution for testing controllers, combining high fidelity, reduced cost, high testing flexibility, and a safe environment. That is possible thanks to the advancements in computing technologies, such as discussed in Sect. 1.4, which enable the development of real-time simulation devices capable of emulating a device’s power stage (physical layer) with high precision, even considering demanding high switching power electronics applications.
With the C-HIL approach, the actual controller under test can be directly connected to the modeled plant in real-time simulations, allowing for closed-loop evaluation even before a prototype of the plant is available, as illustrated in Fig. 1.4. This allows for verification and validation of control hardware, software, and firmware in a realistic environment, which provides more flexibility and security than fully physical prototypes, as well as higher fidelity when compared to fully simulated environments. C-HIL also enables engineering teams to automate test cases and to perform several evaluations effortlessly, allowing discovery of performance and integration issues as soon as they arise, iteratively improving the performance of the system being developed. In a similar manner, once experimental prototypes or the actual plant are running, digital twins can be built and the C-HIL approach can be used to validate controller continuous improvements; software lifecycle maintenance; quality assurance processes; and to perform tests that can be hard to replicate, dangerous, or potentially destructive to lab equipment.
The Typhoon HIL toolchain supports all aforementioned testing scenarios, with a targeted focus on the C-HIL approach.
1.3 About Typhoon HIL
Typhoon HIL Inc. was founded in 2008 as a startup, thanks in part to the investment provided by Ray Stata, Founder of Analog Devices. Typhoon HIL today is a multinational corporation that is the current technology leader in the rapidly growing field of ultra-high-fidelity controller Hardware-in-the-Loop (C-HIL) technology. The company mission is to “Engineer and promote environmentally sustainable power technologies that scale,” with the aim of laying the groundwork for building a sustainable future.
Typhoon HIL serves its customers with custom solutions comprised of fully vertically integrated software and hardware for model-based testing and development of power electronics, e-mobility, microgrids, and distribution networks. Typhoon HIL solutions aim to support its users through the entire span of their product’s lifecycle, starting from design and development, throughout validation and verification stages driven by automated testing, all the way to integration and maintenance. Engineering services provided by the company help in technology adoption, system bring-up, and scaling, to speed up project progress and success. Since its establishment, the company successfully brought to market a number of HIL products, installing over 1000 HIL systems worldwide in both industry and academia.
The company’s primary R&D center in Serbia features a multidisciplinary team of experts in the fields of power electronics, signal electronics, real-time and application-specific software, computer architectures, electricity distribution, protection and control, industrial power system management, integration of distributed energy sources, and communication protocols. As a result, the Typhoon HIL environment has competences to cover multiple applications in fields such as microgrids, drives, e-mobility, battery energy storage systems, marine power systems, and so on (see Fig. 1.5 for illustration).
In addition to the corporate headquarters in Boston, MA and the main R&D center in Serbia, the company has offices in Switzerland, Brazil, Canada, France, and soon Germany. The company also works together with over 20 value-added resellers, distributors, and engineering centers worldwide which facilitate both development and production, as well as successful communication to serve the global market.
1.4 Typhoon HIL Technology
When performing HIL testing, it is imperative that the simulation runs in real time; the elapsed time when running the digital model of a physical system must match exactly with the real-world time, also known as the wall-clock time. In this context, Typhoon HIL devices are high-performance computers designed and built for real-time simulation of power-electronics-based systems. This makes a HIL device an important tool for several applications where the behavior of a device should be tested before prototyping, including model-based control development, test-driven design, pre-commissioning, virtual system integration, and interoperability testing of modern power-electronics-enabled technologies. Simulations run on these devices have also proven useful when acting as a high-fidelity replica, or “digital twin,” of a power electronic device or power system, such as for replicating faults encountered by a real device in customer support applications or by creating a sandbox environment for SCADA operator control training in microgrids. But what are the challenges in performing real-time simulations?
Real-Time Simulation Challenges
Real-time simulation of power-electronics-based systems (e.g., microgrids, EV drivetrains, shipboard power systems) is challenging since these applications comprise switching converters that operate at ever-increasing frequencies, especially considering the advancements on the semiconductor devices. Therefore, to be able to simulate switching effects with high accuracy, very short simulation time steps are required, as well as high-resolution sampling of the switch gate drive signals (GDS), advanced processing capability, and ultralow latency. As a consequence, power electronics applications comprise complex and highly dynamic systems that are highly demanding to simulate in real time with high fidelity (Osório et al. 2021; Majstorovic et al. 2011; Pallo et al. 2017).
Real-time simulation devices run in discrete time and typically employ linear solvers with fixed time steps. To encompass the switching dynamics in efficient simulations, a piece-wise linear approach can be used. In this context, power converters can be modeled based on ideal switches, and for every switch permutation, a time-invariant linear state space model, called mode, is defined. A single mode is applied over each simulation time step, and the simulation dynamically changes among modes throughout execution. As an advantage, modeling switches as ideal do not introduce non-physical behavior, as may be the case in simulation approaches where the switches are replaced with simplified equivalents. Moreover, it is possible to pre-compute the system matrices and to store them in the solver memory, during compilation. On the other hand, since theoretically each and every semiconductor can be either conducting or open, the number of modes increases exponentially with the number of switches, thus increasing exponentially the memory capacity required (Osório et al. 2021; Majstorovic et al. 2011).
Another important challenge for real-time simulation of power electronics applications is related to the effective time resolution of the digital inputs used to drive the converters, which are usually pulse-width-modulated (PWM) signals. When an actual controller hardware is being used to generate the GDS, its clock (and therefore the time instant where its outputs are updated) is not synchronized with the simulation clock. In this context, if the sampling period of the PWM signals is equal to the simulation time step, the transitions between on and off states can only be detected at the subsequent sampling, as illustrated in Fig. 1.6. This inaccuracy in identifying the exact instant at which the transitions occur may lead to significant sampling errors, causing imprecise duty cycle detection and, therefore, inaccurate simulation results. When offline simulations are performed, this drawback can be mitigated by using variable step solvers or by reducing the simulation time step as much as necessary to make the sampling errors become negligible. However, this happens at the price of longer execution times, which is not a viable solution for real-time simulations where the model response calculation must be finished within the predefined simulation step (Lian and Lehn 2005).
The challenges described so far focused primarily on the real-time simulation of power converters, where time constants in the order of nanoseconds are required in order to precisely reproduce switching effects and obtain accurate simulation results. On the other hand, when testing, for instance, the secondary or tertiary control layers of power systems such as microgrids, models tend to be large and simulation run times may reach days or weeks, with time constants in the order of minutes or hours. In this sense, it is possible to see that different applications present different requirements, such as high time resolution and long-term stability, which may demand different modeling approaches and processor capabilities, posing a significant challenge. A chart illustrating the wide range of time scales of interest within a microgrid application is illustrated in Fig. 1.7.
In addition to that, as mentioned before, real-time simulations are essential when real elements are present in the loop. As a consequence, the hardware-in-the-loop simulation devices must be robust and present suitable interfaces, allowing easy access to multiple inputs, outputs, and connection with a wide range of possible devices under test, including supporting the specific communication protocols those devices may use. At the same time, real-time simulations and the hardware-in-the-loop testing framework aim to reduce time and costs in the development cycle, and thus must not overwhelm engineers with additional concerns. Therefore, it is important to provide a solution that, although technically advanced, is user-friendly and easy to get used to. In this context, the HIL solution should suit different application-specific systems with easily deployable preset configurations, while still providing flexibility for more experienced HIL users to develop bespoke solutions for custom applications.
Challenges for real-time simulation solutions include the following:
-
Achieving very short simulation time steps and low latency to represent highly dynamic power electronics systems with accuracy.
-
Reducing memory capacity requirements.
-
Improving the effective PWM time resolution.
-
Coping with large models and different application-specific requirements.
-
Hardware with suitable interfaces and support for industry standard communication protocols.
-
User friendliness, flexibility, and easy to get used to.
Typhoon HIL Testing Solutions
Aiming to overcome the challenges mentioned in this section, Typhoon HIL provides a vertically integrated solution, comprising of real-time simulator hardware and a dedicated software toolchain (Typhoon HIL Control Center). The technology stack is seamlessly integrated from Typhoon HIL’s application-specific processors and robust numerical solver all the way to the model building interface, supervisory system, and testing automation solution, in a single easy-to-use and affordable toolchain.
In the next subsections, the Typhoon HIL real-time simulator hardware and software technology is presented, as well as how they address the challenges described here.
1.4.1 Typhoon HIL Real-Time Simulation Platform
Typhoon HIL simulators are hardware platforms specialized for high-fidelity real-time HIL simulations of power-electronics-based systems, which are enabled by a state-of-the-art processor design seamlessly integrated with a fully embedded compiler. As mentioned before, proper real-time simulation of power-electronics-based systems requires high-speed, low-latency, scalable, and flexible computation technologies. Typhoon HIL devices achieve that by using a programmable, application-specific, hybrid architecture that combines CPU (central processing unit) and FPGA (field programmable gate array) technologies, seamlessly integrated with the software toolchain.
The current line-up includes two generations of devices. The third-generation devices (HIL402, HIL602+, and HIL604) support simulation steps down to 500 ns, while oversampling digital inputs with 6.5 ns resolution. These devices have proved themselves in numerous industrial applications, even in some cases with switching frequencies exceeding 100 kHz. To further improve simulation fidelity for high switching frequency applications, such as high-speed drives and DC-DC resonant converters, fourth-generation devices (HIL404 and HIL606) support even lower simulation steps, down to 200 ns, with digital input sampling resolution of 3.5 ns. More details about the current device line-up, including the number of processing cores, model capacity, time resolution, number of analog and digital inputs/outputs (IOs), and connectivity support with industry standard protocols can be seen in Fig. 1.8. In addition, it is worth noting that thanks to the modular design, multiple device units can be stacked together and paralleled, behaving as a single larger simulator.
All Typhoon HIL devices share a common multi-processor architecture, which contains a proprietary multi-core FPGA solver, system CPUs, and user CPUs, as illustrated in Fig. 1.9. A summary of their functions is given as follows:
-
Typhoon FPGA Solver: The multi-core FPGA solver is used to simulate the electrical layer of the model, optimized for time-exact simulation.
-
System CPUs: General-purpose processors indirectly controlled by the user, typically used to simulate low dynamics phenomena of certain electrical domain components or to handle communication protocol stacks.
-
User CPUs: General-purpose processors that are under direct user control, responsible for the simulation of model components that don’t belong to the electrical domain, such as mechanical, thermal, and signal processing components. User CPUs can also be used for the development of controller algorithms within the model, using MIL and SIL approaches or rapid control prototyping.
The HIL606 device is illustrated in Fig. 1.10, where (a) illustrates the front view, highlighting the analog and digital IOs, and (b) illustrates the back view, highlighting the expanded connectivity options, which increases flexibility for multiple protocols.
1.4.1.1 Multi-Core FPGA
As mentioned in the previous section, real-time emulation imposes a rigid time limitation for the calculation of model responses which is not present in offline simulations. Therefore, to achieve very short simulation time steps, computation of complex models has to be parallelized.
In this context, the Typhoon HIL multi-core FPGA solver is the key technology that enables high-fidelity real-time emulation of power-electronics-based systems. The FPGA is optimized for time-exact simulation, and thanks to its paralleled architecture and low latency connection between the processing elements, it is capable of reducing the memory requirements and of running complex models with time steps down to 200 ns, as shown in Fig. 1.8. Moreover, its processing blocks are tightly integrated with the input/output (IO) stage, ensuring very low and fully predictable loopback latency, which allows seamless interfacing with external controllers.
The main FPGA solver computation elements are depicted within the red box in Fig. 1.9. Their descriptions are given below:
-
Standard Processing Core (SPC): Responsible for the simulation of electrical circuits consisting of linear passive elements (both constant and time-varying), converter blocks (built with ideal switches), and contactors based on ideal or non-ideal switches. Dedicated communication lines interconnect the different SPC blocks, allowing variable exchange with a single simulation step delay.
-
Signal Generator: Built-in, runtime tunable block responsible for generating independent voltage and current sources, as well as other arbitrary waveforms synchronously and at the full simulation rate. Linear interpolation is applied if the waveform sample rate is lower than the simulation rate.
-
Look-Up Table (LUT): Block used to simulate nonlinear elements such as PV panels, batteries, nonlinear passive components, and saturable transformers.
-
Machine Solver: Each unit can emulate a single electrical machine model including its electromagnetic part, mechanical part, and speed measurement devices such as encoder and resolver.
-
PWM Modulator: It consists of a multi-channel triangular PWM modulator that can be used both internally, to drive converter models built in the model, and externally, using the digital outputs. The modulator runs on the FPGA internal clock with a built-in dead time generator.
Notice that the resources available on the Typhoon HIL FPGA solver enable it to support various elements used in different electrical applications. This architecture is scalable and is used on all Typhoon HIL devices. Nevertheless, every device has a number of different configurations, which differ in number and size of the computational elements available. The user can choose the configuration in order to optimize FPGA resources for the specific application under test. For instance, time-varying elements are not supported for all configurations, while the number of signal generators or machine solvers depends on the device configuration.
The FPGA solver also provides the means for emulating switch turn-on and turn-off delays in addition to real-time calculation of semiconductor losses, enabling detailed power converter modeling even with converter blocks that consist of ideal switches.
In addition, oversampling methods are available to meet the rigorous accuracy requirements for real-time simulation of high switching frequency applications. By enabling oversampling in Typhoon HIL simulations, it is possible to reach sampling periods down to 3.5 ns (fourth-generation devices) for all digital inputs, significantly improving the PWM resolution for higher switching frequencies. One of these methods is called Global GDS Oversampling, and it is enabled by default when you create a new model in the Schematic Editor. As illustrated in Fig. 1.11, this method is based on high-resolution PWM sampling (i.e., digital inputs are sampled several times within one simulation step), event time stamping, and error compensation. The oversampling methods used in Typhoon HIL devices and how enhancements on sampling resolution improve real-time simulation accuracy are discussed in more details in Osório et al. (2021).
As mentioned before, another challenge is to be able to simulate with high accuracy a wide range of applications, going from unit models of power converters to larger power systems with a significant level of details. Converters are modeled using a piece-wise linear model, where the number of linear state space systems grows exponentially with the number of switches, thus exponentially increasing the memory required. The Typhoon HIL solution addresses this challenge using the parallel computing enabled by the multi-core FPGA solver. To illustrate that, consider a simulation which contains \(n+m = 12\) switches, as illustrated in Fig. 1.12.
With 12 switches, one converter has \(2^{12}\) possible permutations, meaning that 4096 state space matrix representations would have to be stored in memory. On the other hand, by using paralleling computing and dividing the circuit equally in two SPCs (\(n=m=6\)), each core would have \(2^{6}\) possible permutations, leading to 64 state space matrix representations per core, and therefore 128 in total, which represents a significant reduction in memory capacity requirements. Moreover, given that the time needed to simulate the model is a function of the size and density of state space matrix, splitting the model in different cores also allows for achieving faster simulation rates. It is worth mentioning that circuit partitioning can be done both between SPCs of a single HIL device and between multiple HIL devices. Moreover, enabling parallel computing of complex power electronics or power system models is done in a very easy and straightforward way, by using dedicated components in the Schematic Editor of the Typhoon HIL Control Center tool that will be detailed later.
1.4.1.2 Embedded Compiler
The Typhoon HIL compiler is fully embedded, allowing compilation of high-fidelity models optimized for real-time execution without third-party tools and without requiring expertise in low-level programming. The compilation is fully automated and accessible through one click, converting the graphical representations built in the Typhoon HIL Schematic Editor to sets of instructions for both FPGA and CPU processors.
Throughout the compilation process, the Typhoon HIL compiler provides a detailed report, which warns about defects and possible instabilities in the circuit. It also shows how the model is distributed in the HIL devices, its processing cores, what are the resources being utilized, time utilization within the simulation step, and also sub-optimal model characteristics, providing guidance for further model optimization. An excerpt of a compiler log is shown in Fig. 1.13. In this example, it is possible to verify that the model was divided into three subcircuits, as well as the partial list of components in each SPC and the hardware utilization analysis.
1.4.1.3 Hardware Interface and Accessories
Real-time simulation platforms must be flexible to enable hardware-in-the-loop simulations for various applications, which require suitable interfaces between the simulator and the large variety of possible devices under test. For that purpose, Typhoon HIL real-time simulators comprise several digital and analog inputs and outputs, as illustrated in Fig. 1.10a. Moreover, a number of dedicated interface systems are offered, which can be chosen according to key factors such as the number of signals and the signal conditioning requirements (based on the voltage and current levels of the device under test). The IO voltage levels and sample rates on Typhoon HIL devices can be easily found in the documentation (Typhoon HIL 2023e, f).
As the simplest interface possible, wires can be used to directly interface the real-time simulator with external controllers. For that purpose, Typhoon HIL offers a HIL Breakout Board, which simplifies the wiring between the control hardware and the HIL system, as shown in Fig. 1.14a. Nevertheless, note that this kind of interface requires matching of the voltage levels of the devices. As an alternative, dedicated interface boards can be used, where printed circuit boards are responsible for the signal conditioning, comprising connectors that are compatible with both the real-time simulator and the device under test. As an example, Typhoon HIL offers off-the-shelf plug-and-play interface boards for Texas Instruments controllers and Launchpads, as illustrated in Fig. 1.14b.
Multiple conditioning systems packaged in a dedicated enclosure, called HIL Connect, are also offered, as illustrated in Fig. 1.15a. This approach provides great flexibility once it supports all major types of connectors, allowing the user to connect the device under test to the emulator with the exact same cables that would be used in the real system. HIL Connect systems can be customized according to particular requirements and specifications.
In addition to these, a selection of pre-packaged third-party device controllers with standardized, reproducible interfaces are also available. Known as HIL Compatible interfaces, these solutions are C-HIL ready, and can be connected to real-time simulators using only a set of standard cables, as illustrated in Fig. 1.15.
1.4.2 Typhoon HIL Control Center
Typhoon HIL Control Center is a fully integrated toolchain that enables users to build models, parametrize components, run HIL-based real-time simulations, and perform automated tests. This means any user can access the full potential of the developed hardware technology in an easy and straightforward way, without requiring experience in low-level programming. In addition, by means of a Virtual HIL device, the toolchain can also be used to verify real-time ready models even without controller hardware and before having an actual HIL device available, further facilitating the test-driven development process.
The initial window of the software can be seen in Fig. 1.16. The main resources include the modeling tool, the real-time graphical interface, and test development tools, as described in the following sections. If you are interested to raise your skill and knowledge of the Typhoon HIL toolchain, a HIL Fundamentals course is available on the HIL Academy platform which provides a detailed explanation and interactive demonstration of the tools described here (Typhoon HIL 2023b).
Schematic Editor
Schematic Editor is a software environment where real-time ready models are built and compiled using a user-friendly and intuitive interface, as illustrated in Fig. 1.17. The models can be developed from scratch, by dragging and dropping any number of the hundreds of pre-built components easily accessible using the Library Explorer tool shown in the left side of Fig. 1.17. The library includes pre-packaged converters, transformers, renewable sources, electrical machines, passive components, and others, which are optimized for fast compilation and real-time executions, in addition to being easily parametrized for different domain-specific applications.
As an example, Fig. 1.18 shows a three-phase inverter component, which is part of the converters library. This component can be used in conjunction with passive and other components to build tailor-made models for custom applications. Notice that instead of having to use individual switches and diodes, converters like this one are available as pre-packaged components optimized for real-time execution, with a specialized runtime logic that allows for reducing the number of modes, thereby reducing memory capacity requirements.
Figure 1.18 also shows the general properties of the three-phase inverter component when the internal modulator control type is selected, highlighting the ease of configuring different parameters. In this case, the controller can be modeled within Schematic Editor using signal processing components, providing the control signals (InA, InB, and InC) for the converter. If a HIL device is available, the modulation is done with high resolution by the dedicated PWM modulator unit in the FPGA. Alternatively, if an external controller is available and it is properly interfaced with the HIL device, the converter can be directly controlled by HIL digital inputs. Additional tabs on the properties window also allow enabling the emulation of turn-on and turn-off switching delays (Timing tab) as well as semiconductor losses (Losses tab).
As mentioned in the challenges section, it is also important to provide a solution that suits users with different levels of expertise and different application-specific systems with easily parameterizable models. With that in mind, besides the default libraries, Typhoon HIL provides domain-specific toolboxes with component-level building blocks optimized for different model depths and requirements, making the task of building complex models even easier. One example of this is the Microgrid Toolbox, which contains distributed energy resources such as diesel generators, PV power plants, wind power plants, and energy storage systems that can be built using different component types. The choice of which type of component to use when building a model depends on the device under test, the purpose of the simulations, the testing requirements, and also on the hardware resources that the user has available, as described below:
-
Switching components: Recommended for system-level testing of real converter controllers that require detailed power electronics models and accuracy in emulating the switching behavior in order to interface the PWM outputs. These components include pre-implemented control subsystems that can be freely modified by the user, as well as extensive control gains parametrization.
-
Average components: Behavioral twins of the switching component models in terms of parametrization and dynamics, but consumes significantly less computation resources, making them the better choice for situations where the switching dynamics can be neglected and a PWM interface is not needed.
-
Generic components: Based on average models, recommended for microgrid applications and energy management systems, where the simulations focus on testing top-level controllers responsible for steady-state regulation of voltage and frequency as well as load/energy management. Dedicated communication user interfaces are available for communication testing and troubleshooting interoperability issues. These components also include useful built-in functionalities such as voltage and frequency droop, ramping, low-voltage ridethrough (LVRT), and voltage and current protection, as well as self-tuning and grid support features.
Another toolbox of note is Typhoon HIL’s Communication Toolbox, which incorporates many standard protocols from various industry and research applications. Most modern engineering system employs some sort of critical, digital communication protocol. Testing these communication protocols is important to verify the proper functioning of the device under test in an integrated system, including interoperability and pre-certification testing, communication fault testing, and cybersecurity testing, among others.
Applications that require communication testing extend to several industry fields, such as automation, energy generation transmission and distribution, automotive, aerospace, and marine. In academic research, communication protocols are also used to implement co-simulation interfaces and integrate different laboratory equipment. Table 1.1 shows the protocols available in Typhoon HIL Control Center, organized by the application where they are most commonly used in HIL tests. To understand and choose which protocol is suitable for an application, different requirements must be considered. Common requirements include flexibility, criticality, determinism, number of devices, standards, robustness, data types, security level, remote or local access, speed, and hardware setup.
Typhoon HIL Control Center also includes several examples for various applications, which can be used as starting point to build different models. The examples library is organized by application area and includes descriptions of the models often coupled with application notes, which makes it easy to navigate. Figure 1.19 shows the schematic of the terrestrial microgrid example using generic components, available in the Examples Explorer.
HIL SCADA
Once the model is compiled, it can be loaded to HIL SCADA, a real-time graphical user interface that enables operating, controlling, and monitoring of the simulation. The time elapsed while the model is being simulated is called simulation runtime and for real-time simulations this will exactly match the wall-clock time.
During simulation, HIL SCADA can be used to modify simulation inputs such as signal generator variables and power plant inputs, as well as to observe signals in real time or capture them for further analysis. That can be done by easily dragging and dropping action and monitoring widgets available in the widgets library. Custom libraries can also be created, according to the user’s needs. In addition, Typhoon HIL API (application programming interface) functions and Python code can be used to achieve more flexibility when programming widgets. Users don’t need to be experts in Python to do that; an API Wizard is accessible, providing all control variables from the model settings, in addition to capture commands and other features.
It is important to mention that models can be loaded to HIL SCADA even if a real-time simulator device is not connected. This can be done using Virtual HIL (V-HIL), which is a software module within the Typhoon HIL toolchain capable of emulating Typhoon HIL four-series and six-series devices on a personal computer. On the other hand, given the software-based nature of Virtual HIL, there is no external IO support and the models don’t run in real time, with runtime varying according to the model complexity.
The SCADA panel illustrated in Fig. 1.20 is built for the model shown in Fig. 1.19 and is accessible from the same Example Explorer model. It is worth noting the presence of different widgets, configured to display the most relevant information about the microgrid. Users can also access and control every DER by accessing its respective interface sub-panels.
Typhoon Test IDE
Testing is a crucial aspect in the development of new power electronics devices, microgrid controllers, distribution management systems, and other applications. At the same time, due to an increasing number of required tests and ever-changing standards, manually testing all necessary conditions is often unfeasible. Therefore, using HIL and test automation together means it is possible to increase test coverage as well as to continuously improve the development cycle and the final product.
To address that, the Typhoon Test IDE (integrated development environment) is a testing tool specialized for power electronics and power systems, allowing for the creation and running of automatic tests for different applications with interactive automatic reports. This is possible since Typhoon HIL software is Python based, and the tests can be done using the Typhoon HIL API, which is a set of Python functions that allows the user to control the simulation environment, parametrize components, load, run, and interact with the models. The TyphoonTest IDE automation tool runs using pytest, providing automatic report generation with Allure. An example of an automatically generated report is shown in Fig. 1.21, considering the test of an electric vehicle drivetrain. In this report, the user can easily verify which conditions are passed or not in the tests, in addition to checking more detailed information.
Using HIL with test automation can bring benefits for several applications. For instance, in industry, test automation can be used in the development cycle, including a very large number of tests, operating conditions, and parameters; in device pre-certification, by running certification-like tests as part of the development process; and in the commissioning process. In Academia, use cases include testing of new methodologies for a wider range of conditions; benchmarking different methodologies, by using the same test procedure and metrics to compare them; and automatically generating results, which allow for quick updates to reports and papers, if needed. For laboratories and certification bodies, automatized pre-certification tests can improve certification turnaround.
Additional Tools
As shown in Fig. 1.16, Typhoon HIL Control Center also includes the following additional tools:
-
Waveform Generator: It is used to generate current \(\times \) voltage and power \(\times \) voltage curves for photovoltaic generation, as well as custom waveforms that can be later imported to the simulation.
-
Signal Analyzer: It is used to visualize and analyze data exported from Typhoon HIL simulations or dynamically import data from HIL SCADA.
-
Firmware Manager: It is used to configure the firmware of the HIL device, as well as to change between different device configurations.
-
Test and Calibration: It is used to calibrate the HIL device using the HIL Calibration Card.
-
LUT Extraction Tool: It is used to automatically convert images from datasheet charts and graphs into useful data file formats.
1.5 C-HIL Setup Example
An example of a C-HIL testing setup is illustrated in Fig. 1.22, encompassing a Typhoon HIL402 real-time simulator, a HIL TI Launchpad Interface, and a Texas Instruments Launchpad LAUNCHXL-F28379D.
To build a testing setup such as this one and to be able to execute C-HIL real-time simulations, it is first necessary to build an appropriate model of the power stage using Schematic Editor. In this model, the user must identify all interface points between the controller and the power stage model, including inputs, outputs, and all necessary voltage and current measurements. When building the schematic, an easy way to keep track of all relevant signals is to create a table with their names, description, and voltage levels.
To demonstrate this, Fig. 1.23 shows the power stage model of a synchronous buck converter, built for real-time simulation. Table 1.2 lists the inputs and outputs of the model, as well as the voltage range specified in the controller.
Configuration of the digital inputs is set directly in the IGBT leg properties, as shown in Fig. 1.24a, and should be done considering the proper mapping of the controller digital outputs to the HIL digital inputs through the interface. The configuration of the analog outputs can be done using the Output Settings component, as shown in Fig. 1.24b, taking into account the appropriate signal mapping.
In the output settings, the Scaling and Offset parameters must be defined from the values obtained in simulation in order to ensure proper conditioning of the signals from the real-time simulator (HIL analog outputs) to the controller (digital signal processor inputs). These values can be calculated as follows:
where \(K_{\text {int}}\) is the gain of the interface board; \(V_{\text {ctrl}}^{\text {zero}}\) is the voltage in the controller inputs that represents 0 V in the physical system; \(V_{\text {ctrl}}^{\text {max}}\) is the maximum rated voltage at the controller inputs; and \(V_{\text {ph}}^{\text {max}}\) is the physical values represented by \(V_{\text {ctrl}}^{\text {max}}\).
Once the controller is properly connected to the real-time simulator and the model is built, validated, and fully parametrized, then the C-HIL simulation is ready to run.
It is worth mentioning that the real-time ready model shown in Fig. 1.23 can be validated offline in a preliminary stage without the controller, and the results can be compared with offline simulations or mathematically calculated responses. The offline simulation can be performed using the Virtual HIL (V-HIL) environment which, as mentioned in Sect. 1.4.2, enables simulation of real-time ready models without a HIL device.
1.6 Conclusions
This introduction highlights some of the key challenges to performing real-time simulation testing, and how the specific hardware and software solutions in the Typhoon HIL real-time simulation platform work to overcome them. An example of a simple C-HIL testing setup featuring a real controller is shown to demonstrate how such a testing environment can be easily built and parameterized.
HIL testing plays a growing and increasingly critical role in the development and improvement of new power electronics and power systems technologies. Controller hardware-in-the-loop (C-HIL) testing solutions, such as those provided by Typhoon HIL, stand out as effective solutions for testing, validating, and troubleshooting real controllers in a safe, realistic environment.
In the following chapters, real examples of HIL testing solutions using the Typhoon HIL toolchain are presented in detail.
References
Abdelrahman AS, Algarny KS, Youssef MZ (2018) A novel platform for powertrain modeling of electric cars with experimental validation using real-time hardware in the loop (HIL): a case study of GM second generation chevrolet volt. IEEE Trans Power Electron 33(11):9762. https://doi.org/10.1109/TPEL.2018.2793818
Amin M, Abdel Aziz GA (2019) A hardware-in-the-loop realization of a robust discrete-time current control of pma-synrm for aerospace vehicle applications. IEEE J Emerg Select Top Power Electron 7(2):936. https://doi.org/10.1109/JESTPE.2018.2890592
Badini SS, Verma V (2019) A novel mras based speed sensorless vector controlled pmsm drive. In: 2019 54th international universities power engineering conference (UPEC), pp 1–6. https://doi.org/10.1109/UPEC.2019.8893607
Celanovic NF (2017) Typhoon HIL blog – digitalization of microgrids and electrical distrubution networks. www.info.typhoon-hil.com/blog/microgrid-digitalization
Chemali E, Preindl M, Malysz P, Emadi A (2016) Electrochemical and electrostatic energy storage and management systems for electric drive vehicles: state-of-the-art review and future trends. IEEE J Emerg Select Top Power Electron 4(3):1117. https://doi.org/10.1109/JESTPE.2016.2566583
Dinavahi V, Reza Iravani M, Bonert R (2001) Real-time digital simulation of power electronic apparatus interfaced with digital controllers. IEEE Trans Power Delivery 16(4):775. https://doi.org/10.1109/61.956769
Genic A, Gartner P, Almeida M, Zuber D (2017) Hardware in the loop testing of shipboard power system’s management, control and protection. In: 2017 IEEE vehicle power and propulsion conference (VPPC), pp 1–6. https://doi.org/10.1109/VPPC.2017.8331026
Jonke P, Stöckl J, Miletic Z, Bründlinger R, Seitl C, Andrén F, Lauss G, Strasser T (2016) Integrated rapid prototyping of distributed energy resources in a real-time validation environment. In: 2016 IEEE 25th international symposium on industrial electronics (ISIE), pp 714–719. https://doi.org/10.1109/ISIE.2016.7744977
Khan A, Jarraya F, Gastli A, Ben-Brahim L, Hamila R, Rajashekara K (2017) Dual active full bridge implementation on Typhoon HIL for G2V and V2G applications. In: 2017 IEEE vehicle power and propulsion conference (VPPC), pp 1–6. https://doi.org/10.1109/VPPC.2017.8331023
Knezović K, Martinenas S, Andersen PB, Zecchino A, Marinelli M (2017) Enhancing the role of electric vehicles in the power grid: field validation of multiple ancillary services. IEEE Trans Transp Electrific 3(1):201. https://doi.org/10.1109/TTE.2016.2616864
Lian K, Lehn P (2005) Real-time simulation of voltage source converters based on time average method. IEEE Trans Power Syst 20(1):110. https://doi.org/10.1109/TPWRS.2004.831254
Liserre M, Sauter T, Hung JY (2010) Future energy systems: integrating renewable energy sources into the smart power grid through industrial electronics. IEEE Indust Electron Mag 4(1):18. https://doi.org/10.1109/MIE.2010.935861
Majstorovic D, Celanovic I, Teslic ND, Celanovic N, Katic VA (2011) Ultralow-latency hardware-in-the-loop platform for rapid validation of power electronics designs. IEEE Trans Indust Electron 58(10):4708. https://doi.org/10.1109/TIE.2011.2112318
Osório CRS, Miletic M, Zelic J, Majstorovic D, Gagrica O (2021) Advancements on real-time simulation for high switching frequency power electronics applications (invited paper). In: 2021 21st international symposium on power electronics (EE), pp 1–6. https://doi.org/10.1109/Ee53374.2021.9628306
Osório CRD, Koch GG, Pinheiro H, Oliveira RCLF, Montagner VF (2020) Robust current control of grid-tied inverters affected by LCL filter soft-saturation. IEEE Trans Indust Electron 67(8):6550. https://doi.org/10.1109/TIE.2019.2938474
Pallo N, Foulkes T, Modeer T, Fonkwe E, Gartner P, Pilawa-Podgurski RC (2017) Hardware-in-the-loop co-design testbed for flying capacitor multilevel converters. In: 2017 IEEE power and energy conference at Illinois (PECI), pp 1–8. https://doi.org/10.1109/PECI.2017.7935758
Rommel C (2019) HIL TESTED – powerful performance, functionality, and quality from model-based testing. Published by VDC Research. https://info.typhoon-hil.com/lp-white-paper-vdc-research-hil-tested
Salcedo R, Corbett E, Smith C, Limpaecher E, Rekha R, Nowocin J, Lauss G, Fonkwe E, Almeida M, Gartner P, Manson S, Nayak B, Celanovic I, Dufour C, Faruque M, Schoder K, Brandl R, Kotsampopoulos P, Ha TH, Davoudi A, Dehkordi A, Strunz K (2019) Banshee distribution network benchmark and prototyping platform for hardware-in-the-loop integration of microgrid and device controllers. J Eng 2019:5365
Typhoon HIL. (2023) Online documentation. www.typhoon-hil.com/documentation
Typhoon HIL. (2023a) Youtube channel. www.youtube.com/c/TyphoonHIL-com/featured
Typhoon HIL. (2023b) HIL fundamentals course. https://hil.academy/courses/hil-fundamentals/
Typhoon HIL. (2023c)Documentation – GDS oversampling. www.typhoon-hil.com/documentation/typhoon-hil-software-manual/concepts/gds_oversampling.html
Typhoon HIL. (2023e) Documentation – IO voltage levels. https://www.typhoon-hil.com/documentation/typhoon-hil-hardware-manual/hil4-6_series_user_guide/References/hil4-6_IO_voltage_levels.html
Typhoon HIL. (2023f) Documentation – IO timing. https://www.typhoon-hil.com/documentation/typhoon-hil-hardware-manual/hil4-6_series_user_guide/References/hil4-6_IO_timing.html
Vekić MS, Grabić SU, Majstorović DP, Čelanović IL, Čelanović NL, Katić VA (2012) Ultralow latency HIL platform for rapid development of complex power electronics systems. IEEE Trans Power Electron 27(11):4436. https://doi.org/10.1109/TPEL.2012.2190097
Xu L, Guerrero JM, Lashab A, Wei B, Bazmohammadi N, Vasquez J, Abusorrah AM (2021) A review of DC shipboard microgrids part i: power architectures, energy storage and power converters. IEEE Trans Power Electron 1. https://doi.org/10.1109/TPEL.2021.3128417
Zelic J, Novakovic L, Klindo I, Gruosso G (2020) Hardware in the loop framework for analysis of impact of electrical vehicle charging devices on distribution network. In: 2020 IEEE vehicle power and propulsion conference (VPPC), pp 1–5. https://doi.org/10.1109/VPPC49601.2020.9330863
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2023 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.
About this chapter
Cite this chapter
Osório, C.R.D., Genic, A., Costa, S. (2023). Introduction to Typhoon HIL: Technology, Functionalities, and Applications. In: Tripathi, S.M., Gonzalez-Longatt, F.M. (eds) Real-Time Simulation and Hardware-in-the-Loop Testing Using Typhoon HIL. Transactions on Computer Systems and Networks. Springer, Singapore. https://doi.org/10.1007/978-981-99-0224-8_1
Download citation
DOI: https://doi.org/10.1007/978-981-99-0224-8_1
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-99-0223-1
Online ISBN: 978-981-99-0224-8
eBook Packages: Computer ScienceComputer Science (R0)