Normalized passivity control for hardware-in-the-loop with contact

Mechanical contact occurs in many engineering applications. Contact dynamics can lead to unwanted dynamic phenomena in mechanical systems. Hence, it would be desirable to investigate the influence of contact dynamics on a dynamical system already in the development stage. An appropriate method is Hardware-in-the-loop (HiL) on mechanical level. However, the coupling procedure in HiL is prone to stability problems and previous studies revealed that HiL tests of systems with contact are even more challenging, as the system dynamics change rapidly when contact occurs. Passivity-based control schemes, well-known from teleoperation, have recently been used to stabilize HiL simulations of systems with continuous dynamics. Here, we investigate the applicability of Normalized Passivity Control to HiL tests of a one-dimensional mass-spring-damper system experiencing contact. Experimental results reveal that this kind of passivity control keeps the test stable and also improves the test fidelity. This research is an important first step in using passivity control for stable and safe hybrid simulation of complex systems with contact using HiL approaches.


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 numeri- cally 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 force 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 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 Fig. 1 Coupling of the numerical and experimental part through the transfer system in HiL. The FTS is assumed to have ideal transfer behavior 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.

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ż and the measured force F m (input power P in = F m ·ż) and the output port that connects the experimental part to the transfer system by generating the achieved velocityż and the measured force F m (output power P out = F m ·ż ) 2 .

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 α. This artificial damping can either be applied with impedance causality (augmentation of the input force) or  [4]. The passivity controller (PC, in black) augments the measured force F m by F d 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 α, [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 α 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.

Normalized passivity control
Because of the several advantages stated in Sect. 2.1 (immediate detection of instability, smooth changes of α), 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 and P tot = F m ·ż + F int ·ż. The tilde operator· 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 α 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]. 3 Its influence on the HiL test will be investigated in Sect. 4.

Experimental system
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 ·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 To measure the quality of the HiL test, the real achieved interface displacement z N needs to be compared to a reference solution z r N . The reference solution is retrieved from a pure numerical simulation of the assembled system. 4 The fidelity of the HiL test is measured by taking the relative root-mean-square (RMS) error, i.e.

RMS(z r N −z N )
RMS(z N ) . 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 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 ( T = 1 ms). A six-axis FTS from SCHUNK GmbH & Co. KG is used to measure the forces.
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 kg/s), stable (K d = 150 kg/s) or in the transition zone (K d = 100 kg/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 kg/s, 4000 kg/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 = 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

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 r N , some values z N are shown during one bump representative for all measurements in Fig. 5. There, the reference solution z r N (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 kg/s is not sufficient to dampen the instability in the system 5 and large oscillations are present. The curves for G P = 1800 kg/s and G P = 3600 kg/s do not differ much, as both manage to dissipate error power, i.e. the amplitude of the oscillations is reduced.
To consider the differences more quantitatively, the resulting accumulated error energy after one bump (i.e. after 4 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 = (P out − P in ) · 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 kg/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] kg/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 kg/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 kg/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 kg/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 kg/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.
Hence, the relative RMS error between the reference simulation z r N and the achieved displacement z N was calculated during one bump, see Fig. 7. The error is smallest for the dynamical system that is stable without PC (green, dashdotted 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 ≈ 2800 kg/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 ≈ 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 F d ·ż · 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/ż. 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) 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 The relative RMS error between the reference solution z r N and the solution z N from HiL

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.

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