An optimal indoor climate contributes significantly to our personal wellbeing: Heating, ventilation, and air conditioning provide the necessary comfort. This is where the global company Copeland comes in: With sustainable solutions for optimizing heating and cooling, it makes an important contribution to improved indoor air quality and energy efficiency. A virtual test environment based on dSPACE tools supports the company in ECU validation.

When it comes to the development of control units, early virtual validation is a trend that can benefit more than just the automotive industry. The great advantage of using software-in-the-loop (SIL) simulation for validation is that software development and test execution can take place directly on your own PC. As a result, software validation can begin long before the hardware and the hardware-in-the-loop (HIL) simulator are available.

SIL Goes HVAC

No matter whether it is in living space, work area, or industry: Climate-friendly solutions for heating, ventilating, and cooling rooms are in greater demand than ever before. With its innovative and sustainable heating, ventilation, and air conditioning (HVAC) solutions, Copeland is an important partner for manufacturers, installers, and building owners. The company relies on SIL when testing and validating the functionalities of its electronic control units (ECUs). The development and test environment for this is based on dSPACE tools and an environment model from Copeland. In this context, Copeland also used a special dSPACE toolset, the V-ECU SDK (SDK: Software development kit), to obtain a suitable virtual ECU (V-ECU) from the existing C code as quickly as possible.

Basic Test Setup

Copeland uses a virtual test environment based on VEOS, the dSPACE platform for PC-based simulation, to validate its climate control units. The basic test setup comprises the typical components of a closed-loop test:

  • The virtual ECU (V-ECU): The V-ECU contains the code to be tested with corresponding inputs and outputs for sensors and actuators.
  • The environment model: It simulates the values of the connected sensors while taking the actuators into account. The thermal model is provided by Copeland via the standardized Functional Mock-up Unit (FMU) format.
  • ControlDesk: The dSPACE experimentation and instrumentation software visualizes selected variable values and allows Copeland to experiment and test interactively with both the controller and the environment model.
  • AutomationDesk: With dSPACE's powerful test authoring and test automation tool, Copeland builds a library of test cases that are executed automatically at a later stage.
General test setup for the control loop of a climate control unit.

The V-ECU as a Virtual Twin

When setting up a virtual test environment for ECU validation, the creation of the system under test (SUT) is an important step. Here, it is important to integrate the ECU code to be tested into the simulation without any changes. To do this, the code must be called by the simulation environment and sensor values and control variables must be exchanged with the model. The result is a virtual twin of the control unit in the form of a V-ECU that contains the original code.

From C Code to V-ECU

The control algorithms at Copeland are developed in C and are integrated into a step function. This function fulfills three typical tasks:

  1. Reading the input data from the simulation into the code-internal variables: With V-ECUs, this is done via freely configurable virtual ports.
  2. Executing the control algorithm: The algorithm uses the input values that were just set and calculates the values for the output variables. It is this production code that represents the test object and is later used in unchanged form for the target hardware. 
  3. The calculated values are written to the output ports of the V-ECU.

The step function is the glue code, i.e., the link between the simulation environment and the production code. In Copeland's specific application, it is executed repeatedly every 100 ms. In this project, only one step function is sufficient for the V-ECU, but it is also possible to simulate more complex time behavior with several step functions.

To sum it up, these are the main tasks when virtualizing the V-ECU:

  • Definition of virtual ports for communication
  • Definition of the step function including the call cycle
  • Configuration and creation of the V-ECU container file

Copeland was able to accomplish all of these tasks independently with the help of the V-ECU SDK from dSPACE.

V-ECU Made Easy – with the V-ECU SDK

The V-ECU SDK is a toolset from dSPACE for the virtualization and generation of V-ECUs from C code. The set has been in successful use at Copeland since 2022. With the help of the SDK, Copeland was able to quickly and easily generate the appropriate V-ECU for ECU validation from the existing C code. Han Hu, Senior Software Engineer at Copeland, is very happy about the simplifications that have benefited his team and the entire validation process: "With the help of the V-ECU SDK from dSPACE, we can test our software with more flexibility without requiring hardware – at any time and any location."

With the help of the virtual development and test environment, Copeland can conveniently validate its climate control units at an early stage. Thanks to the V-ECU SDK from dSPACE, the complete SIL simulation can be built from your own integrated development environment (IDE), executed together with the environment model, and controlled via a debugger. dSPACE ControlDesk enables experimentation and testing.

Distributed Working and Easy SIL Introduction

The text-based configuration of the V-ECU SDK itself and the script-based VEOS automation allow the test setup to be easily integrated into a version control system, for example the open-source software Git.

At Copeland, the outlined structure was initially set up by just one expert, brought to the desired maturity, and then distributed via Git. This reduced the entry threshold for using SIL with VEOS as a development and test environment in the entire development team to a minimum and paved the way for the distributed working established at Copeland today.

Summary and Outlook

In the context of this project, Copeland was able to set up and successfully introduce a SIL development and test environment based on VEOS. Thanks to the dSPACE V-ECU SDK, the company was able to achieve this goal without any special SIL experience or additional engineering. In just a few steps, Copeland has gained real added value for its validation, thanks to SIL. The example also shows how versatile SIL is beyond the automotive industry and how easy it is to get started with SIL validation using VEOS and the V-ECU SDK.

Based on the SIL simulation, Copeland is developing automated tests with AutomationDesk. These tests will be used as regression tests for SIL development and will also serve as preparation for the upcoming HIL validation.

 

Courtesy of Copeland Europe GmbH
dSPACE MAGAZINE, PUBLISHED APRIL 2024

You are a dSPACE customer and want to download the V-ECU SDK?

Basic Information

  • SIL Testing
    SIL Testing

    Software-in-the loop (SIL) testing with the powerful dSPACE solution for PC- and cloud-based simulation

Product Information

  • VEOS
    VEOS

    Platform for PC-based simulation

  • ControlDesk
    ControlDesk

    ControlDesk is the experiment software for seamless ECU development. It handles all tasks and provides a single working environment.

  • AutomationDesk
    AutomationDesk

    Powerful test authoring and automation tool for HIL testing of ECUs

Drive innovation forward. Always on the pulse of technology development.

Subscribe to our expert knowledge. Learn from our successful project examples. Keep up to date on simulation and validation. Subscribe to/manage dSPACE direct and aerospace & defense now.

Enable form call

At this point, an input form from Click Dimensions is integrated. This enables us to process your newsletter subscription. The form is currently hidden due to your privacy settings for our website.

External input form

By activating the input form, you consent to personal data being transmitted to Click Dimensions within the EU, in the USA, Canada or Australia. More on this in our privacy policy.