Keywords

1 Introduction

In the past virtual commissioning was successfully used to help design and validate the control software of a production plant in simulations rather than on the real machinery. The real-time simulation models are called digital twins in the context of virtual commissioning, and they typically describe production facilities on a logical and kinematic level. These simulations are performed in real-time with the control software running on the real controller or a virtual controller, so-called hardware- or software-in-the-loop simulations (HiLS/SiLS). Virtual commissioning (VC) helped to significantly reduce commissioning times and improve software quality, thus reducing cost and increasing productivity of production plants [1].

So far, the simulation on a logical and kinematic level was sufficient for many tasks, such as I/O tests and the verification of the motion direction of machine axes, etc. However, certain tasks, such as the design of feedback controllers for industrial control systems, are still performed on the real machine rather than in the virtual world.

Following the idea of software-defined manufacturing (SDM) [5], where a machine’s functionality is determined by the software running it, these tasks need to be shifted to the virtual world, where optimizations can be performed much easier and at a lower cost. This leads to better production plants with increased efficiency, minimized production cost and shorter development cycles. Therefore, the domain of virtual commissioning simulation needs to be extended to the dynamics of a production plant.

For successful integration of dynamics into virtual commissioning, the following requirements must be met:

  • (Re-)Use of the know-how about a system’s dynamics from previous engineering stages for virtual commissioning (not modeling the dynamics again).

  • Virtual commissioning can parametrize dynamics models without the assistance of dynamics experts.

  • Dynamics models can run autonomously in virtual commissioning software and do not need additional engineering software to run so that models can easily be transferred between simulation systems.

  • Production plants of a similar size to which are simulated today in virtual commissioning can be simulated, and dynamics models can be real-time capable.

In Sect. 2, the state of the art is presented to lay the foundation why hybrid digital twins are needed. In Sect. 3, the methods to increase the level of detail of virtual commissioning simulations to the dynamic level while meeting these requirements are explained. This is achieved through the concept of hybrid digital twins on a component basis using functional mock-up units (FMUs), a standardized format for simulation models which follows the functional mock-up interface. This concept is validated in the concrete use case of designing a swing-up controller for an inverted pendulum in a Hardware-in-the-Loop simulation in Sect. 4. In the final Sect. 5, the conclusion is drawn.

2 State of the Art in Virtual Commissioning Simulations with Increased Level of Detail

Many researchers found ways to introduce a higher level of detail into virtual commissioning simulations, of which some representative examples are listed here, together with their benefits and shortcomings:

Hoher [6] developed a deterministic physics engine to calculate the behavior globally in the simulation scene. This engine is best suited for calculating material flow in deterministic real-time for HiLS. In order to achieve determinism and to keep the computational effort low so that the behavior can be simulated globally, Hoher’s engine significantly abstracts collision detection and rigid body dynamics. This results in just a slight increase in level of detail, which suffices for basic material flow simulations but not, for example, feedback controller design.

Sekler [7], on the other hand, examines the vibration behavior of machine tools in detail using finite element (FE) analysis. FE models are exported from an FE software via a proprietary format and are then coupled within the virtual commissioning software to obtain the system. This approach shows great modularity. However, it is limited to a linear description of systems, and demands knowledge about dynamics from the VC engineer.

Heiland et al. [8] and Klingel et al. [9] couple the FE-simulation of a deep drawing process to a virtual commissioning tool using the standardized format for simulation models functional mock-up unit (FMU). However, their method relies on executing the FE-simulation program during VC. Further, it is not real-time capable and thus is limited to SiLS with a virtual timescale.

The research on increasing the level of detail in virtual commissioning simulations so far focuses on either global calculation of dynamics. It is thus limited in the level of detail reached by the available computational power. Alternatively, the emphasis is on reaching a high level of detail, but then only small systems can be regarded, and dynamics experts are required to set up the simulation.

3 Methods and Concept of Hybrid Digital Twins

In order to increase the level of detail of virtual commissioning simulations to the dynamic level while meeting the requirements proposed in Sect. 1, the concept of hybrid digital twins on a component-basis using the method of integrating functional mock-up units is proposed.

Digital twins are modelled on a component basis to achieve modularity and thus reusability for different applications [10]. Nowadays, the components manufacturers supply digital twins of their components next to the real ones [11]. The manufacturer’s dynamics experts already possess the know-how about the dynamics of the components, but the boundaries between disciplines prevent the implementation of digital twins for virtual commissioning. The method to model dynamic behavior and how to integrate it into component models for VC is proposed as follows:

The method used to model a production plant’s dynamics is as elastic multibody systems (EMBS) [2]. EMBS involve large rigid body movements and small elastic body movements, as typically found in production plants and machine tools. Starting from the CAD model, elastic bodies are modelled and then meshed and equipped with material properties in an FE software. A popular option is to then reduce the model’s complexity through model order reduction (MOR). Next, the flexible bodies are coupled to the rigid bodies in an EMBS software, where the nonlinear equations of motion of the whole mechanical system are calculated. The equations of motion of EMBS are written as a differential equations system of the following form:

$$\left[\begin{array}{ccc}m{\varvec{I}}& & sym.\\ m\stackrel{\sim }{{\varvec{c}}}(q)& {\varvec{J}}(q)& \\ {{\varvec{C}}}_{\mathrm{t}}(q)& {{\varvec{C}}}_{\mathrm{r}}(q)& {{\varvec{M}}}_{\mathrm{e}}\end{array}\right]\cdot \left[\begin{array}{c}{\ddot{{\varvec{q}}}}_{\mathrm{t}}\\ {\ddot{{\varvec{q}}}}_{\mathrm{r}}\\ {\ddot{{\varvec{q}}}}_{\mathrm{e}}\end{array}\right]+\left[\begin{array}{c}{{\varvec{k}}}_{\mathrm{t}}\\ {{\varvec{k}}}_{\mathrm{r}}\\ {{\varvec{k}}}_{\mathrm{e}}\end{array}\right]=\left[\begin{array}{c}{{\varvec{h}}}_{\mathrm{t}}\\ {{\varvec{h}}}_{\mathrm{r}}\\ {{\varvec{h}}}_{\mathrm{e}}\end{array}\right]$$

In those equations, the indices t, r, e stand for the equations’ translational, rotational and linear elastic pars. \({\varvec{q}}\) are the generalized coordinates, \({\varvec{k}}\) the Coriolis and centrifugal, as well as dampening and spring forces, and \({\varvec{h}}\) the generalized applied forces. The mass matrix consists of the masses of the individual bodies \(m\), the inertia matrix of rotation \({\varvec{J}}(q)\), and the elastic mass matrix \({{\varvec{M}}}_{\mathrm{e}}\). \(\stackrel{\sim }{{\varvec{c}}}(q)\) describes the variable center of gravity of the flexible bodies, and \({\varvec{C}}(q)\) are the coupling terms [12].

FMUs are well-suited as a standardized format for such differential equations and thus for exchanging dynamics models between the two disciplines. This allows the dynamics to be modelled in domain-specific tools and to be exported together with a numerical solver as an FMU. The FMU can then be used in virtual commissioning, rather than modeling the dynamics in the VC tool, following the idea of domain-driven design [13]. Thus, the know-how of dynamics experts can be used further along the development process, ensuring that the models used are valid. Another advantage is that FMUs can be designed as black-box models with limited inputs, outputs, and parameters so that VC engineers without extensive knowledge about dynamics can parametrize simulations easily and time-efficiently.

Co-simulation techniques enable the seamless integration of FMUs in combination with different simulation setups, such as SiLS and HiLS. The distribution of computational effort onto different CPU cores means that large production plants can be simulated [14].

These methods used to model an EMBS and to bring it into virtual commissioning are displayed in Fig. 1 with the indication of which steps are typically performed by dynamics experts and which by VC Engineers.

Fig. 1.
figure 1

Engineering workflow for using EMBS in virtual commissioning

However, even with this approach, the inclusion of the dynamic level results in an increase in computational cost and modeling efforts. Since this level of detail is not necessary everywhere in the simulation scene at the same time, but only locally, component models need the ability to turn on and off their dynamic behavior: When turned off, they perform like classic digital twins for VC on a logical and kinematic level, and when turned on they add the additional level of detail from the dynamics model, see Fig. 2. These digital twin components are called hybrid digital twins.

Fig. 2.
figure 2

Digital Twin of a component with hybrid level of detail

The inputs and output signals of hybrid digital twins are the same as the signals of regular component models [10, 11], for example position values or logical signals. Thus, they can be used just the same to build up the digital twin of a whole production plant or machine tool in a modular manner.

4 Validation Use Case Inverted Pendulum

The proposed method for extending the domain of virtual commissioning simulations by increasing the level of detail through the use of hybrid models is validated on the use case of an inverted pendulum (see Fig. 3). A Bosch Rexroth ctrlX industrial controller controls the pendulum of length \(l=400 \mathrm{mm}\) and mass \(m=0.4\, \mathrm{kg}\). An IndraDrive drive with position feedback controls the force \(F\) on the linear sled of mass \(m=28.8\, \mathrm{kg}\), which moves along its axis of length \(d = 880\, \mathrm{mm}\) with position \(x\). The pendulum body is attached to the sled, and its angle \(\alpha \) is measured by a rotary encoder (between the sled and the pendulum’s attachment point to the sled).

Fig. 3.
figure 3

Validation use case inverted pendulum

4.1 Modeling and Simulation Setup

The inverted pendulum was modelled following the workflow in Fig. 1. Starting from the CAD model, the pendulum body was meshed and equipped with material properties in the FE software Ansys [15]. From there, it was imported into the model order reduction software MatMorembs [16], where a modal reduction was performed, resulting in a flexible body with three degrees of freedom. Using the simulation software Neweul-M2 [17], the flexible body was then coupled to the sled, which is modelled as a rigid body. This resulted in an elastic multibody system. Next, the nonlinear equations of motion where calculated and a numerical solver was chosen.

The elastic multibody model of the inverted pendulum could then be exported as a co-simulation FMU, consisting of the nonlinear equations of motion and the numerical solver.

The FMU is imported in the VC tool ISG-virtuos where it is integrated into the pendulum model for virtual commissioning, forming a hybrid component.

With the traditional VC model of the pendulum, containing the logical and kinematic information, the motion direction of the sled could be verified, as well as the pendulum’s zero-point and the encoder’s resolution. The dynamics of the pendulum can then be switched on in order to design a feedback controller for the swing-up motion of the pendulum, resulting in a simulation setup as displayed in Fig. 4. The controller of the pendulum is running on the Bosch Rexroth ctrl X industrial controller (cycle time = 2 ms) and communicates via the EtherCAT fieldbus with the simulation system running on the TwinCAT 3 real-time operating system (cycle time = 1 ms). In the TwinCAT partition of the simulation, the drive model (Sercos state machine), the rotary encoder and the logical and kinematic part of the hybrid pendulum component are simulated. The FMU containing the pendulum’s dynamics is simulated in the Microsoft Windows partition.

The implemented controller used for the swing-up consists of an energy controller which swings up the pendulum to a certain angle and then switches to an LQR controller, as demonstrated by [18]. Using the hybrid component, the controller parameters could be tuned to achieve the desired swing-up behavior.

Fig. 4.
figure 4

Hardware-in-the-loop simulation setup with model partitioning

4.2 Simulation Results and Interpretation

In Fig. 5, the angle during the swing-up is displayed in blue, the sled’s position in red. Simulations are plotted for a controller with a high gain (full lines) and a low gain (dashed lines). Both controllers manage to successfully swing up the pendulum and stabilize it once it reaches the upper equilibrium. However, only for the controller with the high gain, the sled stays within the boundaries of the linear axis it runs on. The downside to the high gain controller is the strong reactions to the disturbances. The disturbances originate from small time deviations of the Windows simulation, since Windows is not a real-time operating system. The effect that can be observed is the relatively strong reaction of the controller to these disturbances in the form of oscillations when the pendulum is in its upper equilibrium position.

The simulation with the low gain controller shows that the pendulum reacts less strongly to the disturbances, but the sled needs a longer axis for the swing up. In a development process, the pendulum’s construction could be iterated by lengthening the axis, for example, in order to achieve a smoother behavior.

Fig. 5.
figure 5

Sled position and pendulum angle during swing-up

5 Conclusion and Outlook

Through hybrid components, the domain of virtual commissioning models can be extended to the dynamic level. Dynamic systems can be modelled in domain-specific tools and are then imported into VC component models using the standardized format FMU, enabling VC engineers to parametrize the simulation easily and time-efficiently. With the ability to selectively enable the dynamic behavior, a local increase in level of detail can be reached where needed, keeping overall computational cost low. Hybrid components thus extend the validity of VC simulations from only logic and kinematic-related engineering tasks to tasks such as the integrated system dynamics and control algorithms design.

The concept of hybrid components was validated on the model of an inverted pendulum. The pendulum was designed as a hybrid component with an optional dynamics part modelled as an elastic multibody system. This allowed the pendulum’s controller to be successfully designed in a hardware-in-the-loop simulation. The controller design would have previously been possible only once the real system is built. Further, the controller parameters could be tuned, and the simulation results can even serve as a basis for reiterating the pendulum’s construction. Reiteration can be done without much additional effort since the project is still in the development phase, and none of the pendulum’s hardware has been built yet.

Future research can be directed at improving the real-time behavior of the dynamics simulation by transferring it to a real-time operating system. Further, model-based approaches, such as the implementation of a precontrol, can be researched.