1 Introduction

Testing of components is a crucial step in the development and validation process of products. Components that come into contact during use are particularly critical parts. For example, contact occurs in testing of prosthetic feet or in the dynamics between pantographs and the overhead catenary. Mathematically speaking, contact is a discontinuity in the system equations (mass, damping and stiffness matrices), which causes i.a. excitation of higher modes in the system. As numerical modeling of contact dynamics is cumbersome and hard to validate, the critical contact scenario must be tested experimentally. However, if the systems that undergo contact are too large to be tested experimentally or are not available, as they are still in the development process, pure experimental testing is not feasible. Hardware-in-the-loop (HiL) is a method that overcomes this problem. In HiL, components of large dynamical systems can be tested with realistic boundary dynamics, as the surrounding structure is simulated numerically in a co-simulation. HiL can be classified depending on the information that is exchanged over the interface between the numerical simulation and the experimental part: While HiL on signal level is used to test e.g. control units, HiL on mechanical level is used to test mechanical systems by exchanging force and displacement/velocity signals (see e.g. [1]). In this paper, HiL on mechanical level is applied, which will be referred to as HiL in the rest of this work. Note that this technique is also often referred to as Real-Time Hybrid Simulation/Substructuring. The structure of HiL is shown in Fig. 1. The parts of the dynamical system that are very large, mainly linear and easy to model form the numerical part (in blue). The experimental part (in green) comprises the components that are difficult to model due to nonlinearities, discontinuities and/or unknown damping and stiffness characteristics. Both parts are coupled in real-time by exchanging forceFootnote 1 and displacement information via a transfer system. The transfer system (in orange) is composed of an actuator, a force-torque sensor (FTS) and a digital signal processor, see e.g. [2]. The real achieved displacement \(z^\prime \) does not correspond to the commanded displacement z due to time delay in communication and the dynamics inherent to the actuator. This means that compatibility and equilibrium between the numerical and experimental part are not fulfilled and thus additional dynamics are incorporated in the coupled loop. This deteriorates the fidelity of the HiL simulation, namely how well the test replicates the true dynamic behavior of the dynamical system. These parasitic dynamics can even make the coupled loop unstable, as the time delay can act like negative damping on the coupled loop [2]. Note that the transfer behavior of the FTS can often be assumed ideal. Despite significant progress in control engineering, there are still many applications where instability occurs. In [3], studies of a HiL system with mechanical contact revealed that the HiL test becomes unstable when contact occurs, as the dynamic properties of the investigated system change rapidly at the moment of contact.

Normalized Passivity Control (NPC), proposed by [4], has recently been applied to HiL. They show that it is able to stabilize HiL systems with continuous dynamics. In the present contribution, the applicability of NPC to HiL tests of dynamical systems with discontinuous dynamics, more specifically, a system where contact occurs, is experimentally tested. Besides, its influence on the fidelity of the HiL test is investigated. An overview about passivity control, related work and NPC is given in the following section. In Sect. 3, the experimental setup and the parameters are given. Sect. 4 shows and analyzes the experimental results. Finally, Sect. 5 summarizes the presented results.

Fig. 1
figure 1

Coupling of the numerical and experimental part through the transfer system in HiL. The FTS is assumed to have ideal transfer behavior

2 Passivity control

Passivity control has its origin in teleoperation systems, where haptic devices that are in remote environments are controlled by a user, such as e.g. undersea or in space [5]. There, the coupled loop comprises the user, its input device, a communication channel, the slave robot and the unknown remote environment. Due to i.a. time-varying communication delays and uncertain parameters of the remote environment, the control loop is prone to instability [6]. Passivity-based control has proven successful in these applications and many different passivity control schemes have been proposed, see e.g. [5, 7,8,9,10,11,12]. The underlying principle of these schemes is passivity, which is a sufficient criterion for stability. A system is said to be passive if the rate of change of energy inside the system is smaller than, or equal to, the power that is supplied to the system. Otherwise, the system is active, meaning that the system itself generates energy. Assembling passive systems yields a passive network. Hence, if there is one system in the network that can become active, it is sufficient to guarantee passivity of this single system in order to have a passive network.

In HiL simulations, the structure of the problem is similar to teleoperation systems: The assembled system is composed of the numerical part, the transfer system and the experimental part. They correspond to the user, the input device with communication channel and slave robot, and respectively the haptic device and the uncertain environment it interacts with. Furthermore, force feedback and time delay are included in both HiL and teleoperation and can lead to unstable coupling. In general, if one disregards the energy put into the system by external forces, the numerical and the experimental part are passive systems, as they consist of mechanical elements (mass, spring, damper) that cannot generate energy. However, the transfer system (actuated) can generate energy and thus become active. It has two ports, where power is exchanged: the input port that connects the numerical part to the transfer system by exchanging the desired velocity \(\dot{z}\) and the measured force \(F_m \) (input power \(P_in =F_m \cdot \dot{z}\)) and the output port that connects the experimental part to the transfer system by generating the achieved velocity \(\dot{z^\prime }\) and the measured force \(F_m \) (output power \(P_out =F_m \cdot \dot{z^\prime }\))Footnote 2.

2.1 Related work

The application of Passivity-based control schemes to HiL has been rare, despite the advantage that it does not need a system identification or assumption about linearity and is able to maintain test stability [4]. Krenn et al. [13] were, to the authors’ knowledge, the first who applied PC to HiL. They applied the so-called time domain passivity control (TDPC), which was proposed by Hannaford et al. [8] for one-port systems and then extended to bilateral controllers by Ryu et al. in [11, 12]. In the TDPC, there are two components: the passivity observer (PO) and the passivity controller (PC). The PO observes the input and output port of the possibly active system (transfer system) and compares the input and output energy/power. If the output energy/power is larger than the input energy/power, the PC is activated and dampens the additionally added energy/power by an adaptive artificial damping \(\alpha \). This artificial damping can either be applied with impedance causality (augmentation of the input force) or admittance causality (augmentation of the velocity demand). In the rest of this paper, impedance causality will be explained and used. While [13] and [14] considered the energy error to calculate the damping value \(\alpha \), [4] used the power error to set the damping and called the scheme Normalized Passivity Control (NPC). [15] reported that using the power error has the advantages that changes in \(\alpha \) are smoother and that there is no integration necessary to retrieve the energy error from the power error. One of the latest publications in this field is [16], where also TDPC (consideration of the energy error) is applied. There, the PO monitors only the port between the numerical part and the transfer system and regards the combination of the transfer system and the experimental part as one subsystem. Since the former explained PO monitors both ports of the transfer system, it is able to measure exactly the amount of energy that is added to the dynamical system (numerical and experimental part) by the transfer system, whereas the PO by [16] only detects an energy increase in the numerical part. In preliminary studies, it was investigated that the two-port implementation detects instability earlier than the one-port implementation, wherefore it is expected to be more accurate.

2.2 Normalized passivity control

Fig. 2
figure 2

Structure of NPC in HiL following [4]. The passivity controller (PC, in black) augments the measured force \(F_m \) by \(F_d \)

Because of the several advantages stated in Sect. 2.1 (immediate detection of instability, smooth changes of \(\alpha \)), Normalized Passivity Control (NPC) will be used in this work, which is based on TDPC. The scheme of NPC is visualized in Fig. 2, where the HiL structure from Fig. 1 is augmented by the PC. The PC introduces an adaptive damping force \(F_d \) (impedance causality) if the transfer system is active i.e., \(F_int = F_m + F_d \) is sent to the numerical part. The force augmentation \(F_d \) is calculated by \(F_d (t_k) = \alpha (t_k) \cdot \dot{z}(t_k)\) at time \(t_k\), where

$$\begin{aligned} \alpha (t_k)&= G_P \cdot \frac{\tilde{P}_error (t_{k-1})}{|\tilde{P}_tot (t_{k-1})|} , \end{aligned}$$
(1)
$$\begin{aligned} \text {with} \quad P_error&= F_m \cdot {{\dot{z}}^\prime } - F_int \cdot \dot{z} \end{aligned}$$
(2)
$$\begin{aligned} \text {and} \quad P_tot&= F_m \cdot {{\dot{z}}^\prime } + F_int \cdot {\dot{z}} . \end{aligned}$$
(3)

The tilde operator \(\tilde{\cdot }\) denotes that the signals are low-pass filtered, which smoothens the output \(F_d \) of the PC. Recommendations about the choice of the low-pass filter are given in  [4]. \(P_error \) and \(P_tot \) are both evaluated at time \(t_{k-1}\). In TDPC, the artificial damping \(\alpha \) is calculated such that it exactly dampens the erroneously added amount of energy/power error. Here, in contrast, the damping scaling value \(G_P \) must be tuned by hand to achieve stability of the coupling. Its choice is a trade-off, since high values of \(G_P \) lead to stability, but also relatively high damping forces \(F_d \) that falsify the investigated dynamics [4].Footnote 3 Its influence on the HiL test will be investigated in Sect. 4.

3 Experimental system

Fig. 3
figure 3

The analyzed system: the numerical (blue) and experimental part (green). (Color figure online)

The dynamical system that is analyzed here using HiL and NPC is a coupled mass-spring-damper system as visualized in Fig. 3. Gravity is acting in negative z-direction. The upper mass \(m_N \) is connected to the upper wall by a spring with stiffness \(K_p \) and a damper with damping constant \(K_d \). The wall performs a sine trajectory with frequency \(f_d \) such that the lower mass \(m_E \) comes into contact intermittently. At the beginning of the experiment, the lower mass is at position \(z_E =h_0\) above the ground and the spring \(k_E \) (resting length \(l_0\)) is only loaded by \(m_E \cdot g\) due to gravity. The damping of this dynamical system can be varied for different experiments by changing the value \(K_d \). Since the stability margin of a HiL test depends on the damping in the investigated system, it can be changed by varying the parameter \(K_d \). In a HiL test, one needs to define the so-called Quantity of Interest (QoI), which is the outcome of the test and could be any physical quantity in the dynamical system. The interface displacement \(z_N \) is chosen as the QoI. To measure the quality of the HiL test, the real achieved interface displacement \(z_N ^\prime \) needs to be compared to a reference solution \(z_N ^r \). The reference solution is retrieved from a pure numerical simulation of the assembled system.Footnote 4 The fidelity of the HiL test is measured by taking the relative root-mean-square (RMS) error, i.e. \(\frac{\mathrm {RMS}(z_N ^r - z_N ^\prime )}{\mathrm {RMS}(z_N ^\prime )}\). If the error is small, the test is said to possess high fidelity.

The used actuator is an in-house built Stewart platform (Fig. 4), driven by six electric motors. It is controlled with a P-PI-PI-cascade for position (P controller), velocity (PI controller), and current (PI controller). Additionally, a velocity feedforward is used to achieve better tracking performance of the actuator i.e., make \(z_N ^\prime \) follow \(z_N \) better. The implementation is done in MATLAB/Simulink (version R2016b, MathWorks) and the digital signal processor is a dSpace MicroLabBox dS1202. The sample time is set to 1 kHz (\(\Delta T= 1~\hbox {ms}\)). A six-axis FTS from SCHUNK GmbH & Co. KG is used to measure the forces.

Fig. 4
figure 4

Picture of the used experimental setup

The parameters listed in Table 1 were used to conduct the experiments. They are chosen based on experience and have no special application in mind. Depending on the damping value \(K_d \), the HiL system is unstable (\(K_d = 50~\hbox {kg}/\hbox {s}\)), stable (\(K_d = 150~\hbox {kg}/\hbox {s}\)) or in the transition zone (\(K_d = 100~\hbox {kg}/\hbox {s}\)). Note that unstable does not refer to unstable dynamics of the investigated dynamic system but instability that occurs in HiL due to time delay of the transfer system. The damping scaling value \(G_P \) of the NPC (1) was varied between \((0~\hbox {kg}/\hbox {s},4000~\hbox {kg}/\hbox {s})\) by steps of 200 to investigate its influence. The low-pass filter acting on the signals \(P_error \) and \(P_tot \) had a transfer behavior of \(G_LP = \frac{1}{0.01s+1}\). The influence of the time constant is investigated in [4] and can be summarized as follows: A small time constant leads to high responsiveness of the damping rate, but relatively high forces in a short time. A large time constant smoothens the damper rate and the effect of previous history of the motion is more prominent (resembles energy-based PC). For this application, the time constant was chosen such that the damping force is smoothed but still possesses high responsiveness.

Table 1 Parameters used for the experiments

4 Experimental results

In this study, the applicability of NPC to HiL with contact dynamics and the influence of NPC on the fidelity of the tests depending on the damping scaling parameter \(G_P \) is investigated. To visualize the behavior of the unstable HiL system with PC compared to the reference solution \(z_N ^r \), some values \(z_N ^\prime \) are shown during one bump representative for all measurements in Fig. 5. There, the reference solution \(z_N ^r\) (in black, solid thick line) and measurements from HiL tests with different values of \(G_P \) are shown. The values of \(G_P \) that are shown in the figure were arbitrarily chosen. As one can see from Fig. 5, the damping value \(G_P = 600~\hbox {kg}/\hbox {s}\) is not sufficient to dampen the instability in the systemFootnote 5 and large oscillations are present. The curves for \(G_P = 1800~\hbox {kg}/\hbox {s}\) and \(G_P =3600~\hbox {kg}/\hbox {s}\) do not differ much, as both manage to dissipate error power, i.e. the amplitude of the oscillations is reduced.

Fig. 5
figure 5

The reference \(z_N ^r \) and HiL solutions are shown for different \(G_P \) with \(K_d = 50~\hbox {kg}/\hbox {s}\)

To consider the differences more quantitatively, the resulting accumulated error energy after one bump (i.e. after \(4~\hbox {s}\)) was investigated, which can be seen in Fig. 6. The error energy is the sum of the error power \(P_error \), namely \(E_error = \sum \left( P_out -P_in \right) \cdot \Delta T\) over all \(n_t=4000\) time steps. It can be observed that the accumulated error energy approaches zero for higher values of \(G_P \), meaning that the erroneous energy introduced into the coupled HiL system decreases. For high values of \(G_P \), here \(G_P = 3000~\hbox {kg}/\hbox {s}\) and higher, the error energy even reached small negative values. This shows that if \(G_P \) is chosen too high, the energy dampened by the PC is excessive and it introduces slight positive damping. This implies that the damping scaling value must be tuned appropriately such that it manages to dissipate the erroneously added power \(P_error \), but does not add too much artificial damping.

Furthermore, the different behavior of the dynamical system with \(K_d =[50,100,150]~\hbox {kg}/\hbox {s}\) can be observed in Fig. 6. A HiL test becomes unstable if the amount of added energy (\(E_error \)) is larger than the amount of dissipated energy (considering the introduced energy by external forces \(F_ext \)), i.e. the total system energy increases. Here, the low damping value of \(K_d =50~\hbox {kg}/\hbox {s}\) is not sufficient to dampen the erroneously introduced error energy and becomes unstable, which can be seen in blue (solid line) in Fig. 6. If no PC is used, \(G_P =0~\hbox {kg}/\hbox {s}\), the error energy becomes large and positive, which appears in case of long active phases (\(P_error >0\)). With increasing damping scaling value, the active phases can be reduced and \(E_error \) decreased. However, the influence of the PC on the dynamical system with \(K_d = 150~\hbox {kg}/\hbox {s}\) (in green, dash-dotted line) is small, since this system manages to dissipate the added energy with its inherent damper and the transfer system is (mostly) passive. From the figure it can be concluded that in this HiL system, a scaling value larger than \(G_P = 1000~\hbox {kg}/\hbox {s}\) ensures passivity for all presented dynamical systems. However, the question remains what the optimum value of \(G_P \) is and whether the introduced positive damping of the PC deteriorates the fidelity of the HiL test.

Fig. 6
figure 6

The accumulated energy error after one bump for different damping ratios: \(K_d = 50~\hbox {kg}/\hbox {s}\) (blue, solid line), \(K_d = 100~\hbox {kg}/\hbox {s}\) (orange, dashed line) and \(K_d = 150~\hbox {kg}/\hbox {s}\) (green, dash-dotted line). (Color figure online)

Hence, the relative RMS error between the reference simulation \(z_N ^r \) and the achieved displacement \(z_N ^\prime \) was calculated during one bump, see Fig. 7. The error is smallest for the dynamical system that is stable without PC (green, dash-dotted line) and largest for the least damped system (blue, solid line). The error decreases for the appropriate choice of damping value \(G_P \) for the unstable system, i.e. NPC does not only improve the stability but also the fidelity of unstable HiL tests. For the stable system, there is not much interference of the NPC because the transfer system is mostly passive and therefore does not influence the test fidelity. When \(G_P \) is increased well beyond the value needed for the HiL to be stable, it can furthermore be observed a slight increase of the error for all dynamical systems. This corresponds to Fig. 6, where small negative energy error values (excessive damping) can be observed that change the investigated dynamics. For an optimum value of \(G_P \) (here \(G_P \approx 2800~\hbox {kg}/\hbox {s}\)) unstable systems remain stable and reach their minimum achievable reference error. So, in order to select the appropriate damping scaling value \(G_P \) for a novel HiL system, it is recommended to start with a high value that might introduce excessive damping but guarantees stable testing. Then, this value should successively be reduced until the accumulated error energy \(E_error \approx 0\). At this damping scaling value, the test is stable and the additional damping force that influences the investigated system dynamics is as small as possible. We want to stress at this point that the optimum value of \(G_P \) might differ slightly for each experiment, depending on the noise in the whole system.

In addition to the error energy, also the artificially damped energy \(\sum F_d \cdot \dot{z} \cdot \Delta T\) (sum over all \(n_t = 4000\) time steps) can be plotted. For the sake of clarity, this is not shown here. This value states how much energy is dissipated by the PC and the optimum damping scaling parameter \(G_P \) is where its value has its minimum. In general, this corresponds with the damping scaling parameter where the error energy is zero.

Apart from the measurements shown here, further measurements were taken with worse actuator tracking performance (no velocity feedforward), i.e. slower execution of the desired displacement command z/\(\dot{z}\). This means that the time delay of the transfer system was larger in order to stabilize the system and therefore, the phases where it generated energy (\(P_error >0\))Footnote 6 were longer. These measurements showed that the magnitude of the damping force \(F_d \) was larger and therefore its influence on the investigated dynamics larger (fidelity decreased). Therefore, to achieve high fidelity tests, it is inevitable to choose the best available actuator control (e.g. using a delay compensation scheme).

Fig. 7
figure 7

The relative RMS error between the reference solution \(z_N ^r \) and the solution \(z_N ^\prime \) from HiL

5 Conclusion

This paper investigates the applicability of Normalized Passivity Control (NPC) to HiL tests, where contact dynamics are involved. The results show that NPC proves successful and it manages to stabilize unstable HiL tests. The appropriate choice of the damping scaling value \(G_P \) is particularly critical and is investigated in this paper:

  • There is an optimum value for the damping scaling value \(G_P \) to achieve stable tests with high fidelity: Its value needs to be high enough to dissipated energy that was erroneously added by the transfer system. However, if it is chosen too high, the passivity controller introduces excessive damping that distorts the investigated system dynamics and thus decreases fidelity.

  • When the optimum damping scaling value is found, the error energy, which is the energy introduced by the transfer system, is approximately zero. Furthermore, the energy dissipated by the passivity controller has its minimum.

  • In case an unstable system is investigated without passivity control, the test fidelity is the highest when the optimum damping scaling value is used. For stable tests, the influence of the damping scaling value is negligible since the transfer system is barely active and therefore the passivity controller does not interfere.

This research suggests using NPC for stable and safe hybrid simulation of complex systems with contact. The approach could be applied to and tested for engineering applications with contact e.g., docking of satellites or testing of prosthetic feet. Future work will focus on control schemes to further improve HiL fidelity.

6 Article Highlights

  • this work proves the successful applicability of Normalized Passivity Control to stabilize HiL for contact problems

  • the stabilization of unstable HiL tests improves the fidelity of the test outcome

  • this implies that Normalized Passivity Control is valuable to perform stable HiL tests of complex dynamical systems