An automated methodology to select functional co-simulation configurations
Abstract
The development of machinery often requires system-level analysis, in which non-mechanical subsystems, such as hydraulics, need to be considered. Co-simulation allows analysts to divide a problem into subsystems and use tailored software solutions to deal individually with their respective dynamics. On the other hand, these subsystems must be coupled at particular instants in time, called communication points, through the exchange of coupling variables. Between communication points, each subsystem solver carries out the integration of its states without interacting with its environment. This may cause the integration to become unstable, especially when non-iterative co-simulation is used. The co-simulation configuration, i.e., the parameters and simulation options selected by the analyst, such as the way to handle the coupling variables or the choice of subsystem solvers, is often a critical factor regarding co-simulation stability. In practice it is difficult to anticipate which selection is the most appropriate for a particular problem, especially if some inputs come from external sources, such as human operators, and cannot be determined beforehand. We put forward a methodology to automatically determine a stable and computationally efficient configuration for Jacobi-scheme co-simulation. The method uses energy residuals to gain insight into co-simulation stability. The relation between energy residual and communication step-size is exploited to monitor co-simulation accuracy during a series of tests in which the external inputs are replaced with predetermined input functions. The method was tested with hydraulically actuated mechanical examples. Results indicate that the proposed method can be used to find stable and accurate configurations for co-simulation applications.
Keywords
Co-simulation Multiphysics Multibody system dynamics Hydraulic dynamics1 Introduction
The use of multibody-based simulation tools has enabled engineers to iteratively design, validate, and re-design new products with reduced prototyping costs. This approach has also been extended to real-time environments [23]. Growing product complexity and the increasing importance of system-level simulation have resulted in renewed research interest in the efficient and accurate coupling of dynamical system solver tools.
A straightforward way to couple the simulation of multiple dynamical systems is the strongly coupled or monolithic approach [22, 27, 29] that yields a single set of equations to be integrated. The benefits of simple and accurate coupling, however, are often overshadowed in practical applications by the loss of modularity. For this reason, co-simulation approaches [2, 3, 15, 35] are used in a large number of multidisciplinary simulations. In co-simulation setups the application under study is divided into several subsystems and a different numerical solver is assigned to each of them. This makes it possible to select simulation tools that specifically fit the nature of each subsystem and allows one to tune their parameters independently. The information exchanged between solver tools is limited to a reduced set of input and output quantities, i.e., coupling variables, and takes place at discrete instants in time. In the macro-step between these communication points the integration of each subsystem proceeds independently, without knowledge of the internals of other system components. This is an attractive feature when coupling solvers and models from different vendors in industrial applications, as the implementation details of each software tool remain unknown to other system components, and so intellectual property is protected.
Following a co-simulation approach, however, poses multiple challenges regarding the stability of the numerical integration and the accuracy of the results. Coupling errors inherently occur as a consequence of discrete-time information exchange and, for that reason, accuracy and stability cannot always be guaranteed. Iterative approaches have been proposed to alleviate this problem [20, 32], but in some cases, such as demanding real-time environments, this may not be a feasible option and, thus, non-iterative schemes need to be used. Moreover, some simulation packages and models do not permit to retake an integration step once it has been completed, which prevents the use of iterative co-simulation schemes if such tools are to be used. When computational efficiency is an issue, the execution of the numerical integration of the subsystems should take place in parallel, following the well-known Jacobi scheme. This means that in each macro-step \([t_{0}, t_{0}+H]\) all the subsystems should perform their numerical integration only with the input variables available at \(t_{0}\), without knowledge of the results delivered by other subsystems at time \(t_{0}+H\).
The use of non-iterative schemes demands additional effort to guarantee the accuracy and stability of the results. This often requires some numerical treatment of the coupling variables. In some cases, a simple polynomial extrapolation of the input values of a subsystem may increase the accuracy of the results and allow the use of larger communication step-sizes. However, as shown in [18], an optimal solution valid for any system at all times cannot be found, in general.
The topic of enhancing the stability of non-iterative co-simulation schemes in a systematic way has been addressed several times in the literature. It is possible to deal with this issue from different points of view. Extrapolation of the coupling variables can be used to make the integration process more stable [9], especially in multi-rate co-simulation environments [14]. As noted in [18], the selection of the extrapolation method often has a critical and strongly case-dependent impact on the accuracy and robustness of the co-simulation process. The performance of extrapolation methods for co-simulation has often been assessed using linear test problems [1, 10]; it is not straightforward, however, to generalize the conclusions obtained with linear systems to more complex applications of industrial interest, whose behavior is frequently highly nonlinear. The methodology introduced in [4] represents a practical way to choose an extrapolation method when simulating complex systems: the degree of the extrapolation polynomial is selected online during the numerical integration process, as a function of the previously known system behavior and a prediction of its immediate evolution. System energy can also be used as a relevant source of information about the stability and accuracy of a co-simulation process [16]. Maintaining the energy balance at the co-simulation interface is the basis for the nearly energy-preserving coupling element introduced in [7]. In [28], in turn, the concepts of power bond and energy residual were used to adaptively select the communication step-size in non-iterative co-simulation schemes. The online selection of macro step-size was also addressed in [6], using frequency-domain analysis instead of energy residuals. Moreover, if one or more of the components of the co-simulation environment are mechanical systems, and some information is available about their internal configuration, other methods can be used as well to achieve a more stable integration procedure. These include using the partial derivatives of the subsystem states with respect to the coupling variables to model more accurately the behavior of mechanical constraints [21, 31] and building reduced-order interface models of the mechanical subsystems to provide more accurate estimations of their evolution between communication points [25].
Despite recent developments and the wide variety of available coupling techniques, polynomial extrapolation is likely to remain a relevant method in the information exchange in co-simulation setups due to its generality and simple implementation. Polynomial extrapolation can be used even when information about the internals of the subsystems is completely unavailable, and lends itself well to multi-rate co-simulation setups and subsystems with nonmatching time-grids. On the other hand, selecting an adequate extrapolation method for a particular co-simulation task is still a challenging and time-consuming endeavor in many cases. Relevant settings in the co-simulation environment, such as the integrator method used in the subsystems, may not be tunable, because their implementation can be hidden from third-party software. Even if they are, their selection is often conducted by trial and error, with little or no information about their effect on the overall accuracy of the simulation. Either way, it is difficult to predict from a theoretical standpoint which extrapolation methods would suit best the co-simulation problem at hand. This is even more challenging if some of the simulation inputs come from external sources, which is the case in Human/Hardware-in-the-Loop (HiL) and System-in-the-Loop (SiTL) applications, where the co-simulation environment interacts with physical components or human operators. Such inputs cannot be anticipated in many cases, and they have a critical effect on simulation stability. For this reason, an automated methodology to select a functional co-simulation configuration, based on a set of pre-determined tests, can represent a valuable tool to co-simulation analysts [5].
In this paper we put forward a methodology to determine a stable and efficient configuration for non-iterative Jacobi scheme co-simulation setups, especially aimed at multiphysics problems in the context of simulation of machinery. The models used in this field often receive inputs that are difficult to predict and feature frequent discontinuities in their dynamics, e.g., the above-mentioned HiL/SiTL simulators and test benches. The subsystems in such applications are commonly solved using relatively simple integration formulas and constant step-sizes, in order to keep the elapsed time in computations short and predictable. A major concern when using these setups is preventing the numerical integration from becoming unstable during execution [33]. Because co-simulation can be used to deal with a very wide range of applications, these conditions may differ from the ones encountered in other co-simulation environments, where it is possible to theoretically determine acceptable error bounds for a given problem, or to modify the integration step-size to match the changing system dynamics [30]. In some cases, the introduction of errors at the coupling interface will give rise to latency instead of instability, which requires a different treatment [34].
The method described in this paper relies on the evaluation of energy residuals at the co-simulation interface, which are used as indicators of the stability of the numerical integration. Subsystem inputs are replaced during the initialization phase with a series of standard test functions and the communication step-size \(H\) is gradually increased until the stability limit is reached. Determining a priori an optimal set of integration parameters and configuration settings for each particular co-simulation application is not feasible in most cases [18], partly because the actual inputs of the numerical simulation are often unknown and the system behavior is highly dependent on these. However, the proposed method provides information to determine a stable co-simulation configuration in a simple manner with little additional effort for the user. The viability of the algorithm was verified in the co-simulation of benchmark problems composed of mechanical and hydraulic subsystems.
2 Methods
This section introduces the co-simulation methodology used in this research and the error estimation via conservation laws, and its application in non-iterative co-simulation. For the sake of clarity the coupling of only two subsystems is considered in this section, although the presented methods could be applied, as it is shown with a case-example, to co-simulation environments with more than two co-simulation units.
2.1 Co-simulation setup
A non-iterative, parallelizable Jacobi-scheme co-simulation approach was selected for the purposes of this work. This scheme is often found in applications that require computational effort to be kept to a minimum, such as real-time environments like heavy machinery simulators, and HiL and SiTL platforms. A generic co-simulation manager tool, intended to couple several subsystems in multi-rate co-simulation applications, was implemented to test the methods described in this paper. The scope of this research is limited to subsystems with fixed integration step-sizes and matching communication time grids, although with multi-rate integration. The proposed method, however, could also be used with variable-step integrators.
2.2 Power bonds
Multiple error estimation methods have been applied to co-simulation setups [15]. In practice, however, the available options are limited by the application requirements, such as no rollback and fixed step-sizes in real-time cases. A possible solution for this problem was recently introduced by Sadjina et al. in [28], where a conservation law based approach was proposed for a non-iterative adaptive step-size control and error estimation. The method is based on the concept of power bonds and it allows one to monitor the spurious energy created or lost in the signal extrapolation at the co-simulation interface, and requires only little domain knowledge about the co-simulation units. As the underlying theory of power bonds, and bond graphs in general, has been extensively presented in the literature [8, 24], only the topics relevant to this work are presented here.
As inputs \(u \) are only known at the communication points, subsystems that use shorter internal time steps \(h < H \) need to extrapolate their inputs until the next update instant. In the case shown in Fig. 2, subsystem 1 needs extrapolated inputs \(u_{k_{1}} \) at every internal micro time step. If only the input value \(u \) is known, but not its derivatives, Lagrange polynomials or least squares fitting can be used to carry out this extrapolation. If the input derivatives \(\dot{u}\), \(\ddot{u}\), …, etc. are also available, the inputs can also be integrated over the communication time step. Both input extrapolation and integration can be carried out either by subsystem 1 or by the co-simulation manager; in the latter case, the subsystem needs to establish a communication with the manager every time that it takes a new internal time step.
2.3 Energy residuals
2.4 Co-simulation configuration search
The above presented concept of energy residual [28] allows us now to monitor the co-simulation accuracy. The energy residual is, however, only a scalar value that is not normalized, thus, it may be difficult to interpret on its own. While it is obvious that a relatively low amount of spurious energy with respect to the total transmitted energy accumulated or dissipated at the coupling process indicates stable and accurate co-simulation, the exact point at which the co-simulation accuracy degrades to insufficient or the stability is lost is much less clear. In addition, the residual energy is dependent on the extrapolation method used in the information exchange, which further complicates the accuracy estimation. For this reason, in [28] the energy residual was utilized to develop a scalar error indicator, which requires tuning for each power bond, and an adaptive step-size control for non-iterative co-simulation. Here, a different direction is taken to methodologically evaluate the co-simulation accuracy under different configurations, based on the energy residual.
The definition of co-simulation accuracy, however, also needs to be discussed in this context. The energy residuals do measure the accuracy of the simulation, but only at the co-simulation interface. Assuming that the internal integrators of the subsystems do not introduce any additional errors, the energy residuals directly define the system-level energy error. However, in practice this will not be the case, since the subsystem integrators will introduce their own error into the system-level solution. In this work, it is assumed that the internal integrators are accurate enough for the purposes of the analyst, and therefore the accuracy depends only on the co-simulation configuration. Since the scope of the work is in the area of HiL/SiTL simulators, it is assumed that numerically stable solutions also have sufficient accuracy.
In this work, the observed relation between the communication step-size and the accumulated energy residual over all the macro time steps is taken as an indicator of a stable and accurate co-simulation; it is assumed that the co-simulation is stable and accurate as long as the relation between the accumulated energy residual and communication step-size is approximately linear. This criterion allows us to methodologically evaluate the accuracy of co-simulation under different configurations in a simple manner, with modifications to the co-simulation scheme only implemented in the co-simulation manager. As the number of possible configurations can be too large to experiment manually, an automated procedure, which is described in Sect. 2.4.1, is used to parse through the possible set of configurations. The produced information can be used by an analyst to find a suitable compromise between accuracy and efficiency for the case under study.
However, for practical reasons it would be useful or even required, e.g., when the external inputs \(\mathbf{w} \) are not known, to perform the evaluation in advance without performing the full simulation for each possible configuration. For this reason, and to provide an example of use-case for the method, an application for the methodology is put forward to find a suitable configuration for a co-simulation case in which the external inputs are not know. In practice, the automated procedure uses a set of pre-defined tests for the external inputs \(\mathbf{w} \) when they are unknown.
2.4.1 Automated accuracy evaluation
Admittedly, the assumption of \(h = H \) in the slow subsystem leads to internal integration errors being scaled with \(H \). While the use of smaller internal step-sizes would better decouple the errors that occur in the co-simulation interface and in the subsystem integrators, in practical co-simulation environments this would decrease the overall efficiency of the simulation, as the higher number of integration steps of slow subsystems would increase the total computational load of the problem. As the proposed test methodology aims to reproduce actual operating conditions, the assumption \(h = H\) in the slow subsystem can be justified. Note that the procedure itself is valid for any value of \(h \) inside the subsystems.
In the first step, an initial communication step size \(H_{\text{ini}} \) and an increment \(H_{\text{inc}} \) are selected for the system. The initial communication step size should be selected small enough for a stable solution to be found, i.e., for the energy residual to be in the linear region. It may take more than one attempt to find suitable \(H_{\text{ini}} \) and \(H_{\text{inc}} \) for the system, if no knowledge about the system behavior is available. Secondly, a configuration for the co-simulation is selected and applied. In this paper, this includes the selection of extrapolation methods and options that are available for the co-simulation manager and the integrator methods used in the subsystems; other configuration environments can have different tunable options as part of their configuration space. The selection of the test input \(\mathbf{w} \) for the system takes place at this point as well. In the third step, a simulation is run with the given configuration. Upon completion, if the simulation had been run for the first time with the current configuration, i.e., \(H = H_{ \text{ini}} \), the communication step-size is incremented and the simulation is run again. If the second simulation run succeeds, the linear relation between communication step-size and energy residual is checked. If the latest simulation is still in the linear region, the communication step-size is incremented, \(H = H + H_{\mathrm{inc}}\) and the simulation is run again. If not, or if the simulation failed, the configuration and the largest successful communication step-size are saved, a new configuration set is selected and the process starts again. Finally, after the configuration set space is exhausted, the obtained results are parsed for the user.
2.4.2 External input tests
To assess the system behavior under different inputs, four typical functions, namely step, ramp, impulse, and sinusoidal are used.
3 Examples
Two case examples were implemented to evaluate the proposed method. A 2-D model of a single-actuator crane was used first to test the method in single-input co-simulation scenarios. A second actuator was later added to this model to evaluate cases with multiple inputs. In this section, both examples are presented together with the hydraulics model used in this research. The different co-simulation configurations tested are subsequently described.
3.1 Multibody models and algorithms
The mechanical systems used as test problems were modeled as multibody systems composed of rigid links, using a set of generalized coordinates \(\mathbf{q}\) subjected to a set of kinematic constraints \({\boldsymbol{\varPhi }}= \mathbf{0}\).
3.1.1 Single-actuator model
Mechanical parameters of the single-actuated model
Parameter | Symbol | Value |
---|---|---|
Length of link 1 | L | 1.0 m |
Length of link 2 | \(L_{\text{h}}\) | 0.5 m |
Mass of link 1 | m | 200 kg |
Point mass at Q | \(m_{\text{p}}\) | 250 kg |
Point mass at R | \(m_{\text{h}}\) | 100 kg |
Coordinates of fixed point B | \(( x_{ \mathsf{ B } },y_{ \mathsf{ B } } ) \) | \(( \sqrt{3}/2, 0 ) \) m |
Initial angle, link 1 | \(( \theta _{1} ) _{0}\) | π/6 rad |
Initial angle, link 2 | \(( \theta _{2} ) _{0}\) | 3π/2 rad |
Gravity | g | −9.81 m/s^{2} |
3.1.2 Two-actuator model
3.1.3 Multibody system dynamics algorithms
3.2 Hydraulic model
Parameters of the example circuit
Parameter | Symbol | Value |
---|---|---|
Length of the piston | l | 0.3 m |
Initial piston-side length | \(l_{1_{0}}\) | 0.05 m |
Initial rod-side length | \(l_{2_{0}}\) | 0.25 m |
End damper length | \(l_{d}\) | 0.008 m |
End damper spring coefficient | \(k_{d}\) | 1 × 10^{7} N/m |
End damper damping coefficient | \(c_{d}\) | 5 × 10^{3} Ns/m |
Initial actuator length | \(s_{0}\) | 0.5 m |
Fluid density | ρ | 850 kg/m^{3} |
Oil bulk modulus | \(B_{o}\) | 1500 MPa |
Cylinder bulk modulus | \(B_{c}\) | 31 500 MPa |
Hose bulk modulus | \(B_{h}\) | 150 MPa |
Volume of hose 1 | \(V_{h1}\) | 3.14 × 10^{−5} m^{3} |
Volume of hose 2 | \(V_{h2}\) | 7.85 × 10^{−5} m^{3} |
Volume of hose 3 | \(V_{h3}\) | 7.85 × 10^{−7} m^{3} |
Diameter of piston | \(d_{1}\) | 80 mm |
Diameter of piston rod | \(d_{2}\) | 35 mm |
Tank pressure | \(p_{T}\) | 0.1 MPa |
Pump pressure | \(p_{P}\) | 7.6 MPa |
Cylinder efficiency | η | 0.88 |
Throttle discharge coefficient | \(C_{d}\) | 0.8 |
Semi-empirical coefficient | \(C_{v}\) | \(1.069\times 10^{-8}~\mbox{m}^{3}/\mbox{s} \mbox{V} \sqrt{\mbox{Pa}}\) |
−45^{∘} phase shift frequency | \(f_{-45}\) | 35 Hz |
3.2.1 Valve models
3.2.2 Cylinder force
3.3 Co-simulation configuration
The implemented co-simulation manager is used to couple the above described models by means of a Jacobi-scheme, and also to compute the energy residuals at the interface. The available variables for the information exchange are, in the current implementation, the cylinder length, rate, and acceleration, \(s \), \(\dot{s} \), and \(\ddot{s} \), from the mechanical subsystem, and the actuator force \(F \) from the hydraulics. In addition, the co-simulation manager is responsible for evaluating the extrapolated values of these values, thus allowing use of Eq. (8) in the process of energy residual computation.
Parameter space
Option | Mech. | Hyd |
---|---|---|
Extrapolation | m = 0 | Orders 0–4 |
Integration of exchanged variables | – | s and ṡ |
Integrator | I3AL/I1AL | TR/FWE |
Step-size | \(h_{\text{m}} = H \) | \(h_{\text{h}} = 0.1~\mbox{ms} < H \) |
The dynamics of the multibody systems was solved using the I1AL and I3AL augmented Lagrangian algorithms described in Sect. 3.1.3, in combination with the trapezoidal rule (TR) integration formula, the integrated variables being, correspondingly, either the accelerations \(\ddot{\mathbf{q}} \) or positions \(\mathbf{q} \). The hydraulics equations were integrated using either the trapezoidal rule or the forward Euler (FWE) formula, and the integrated variables, in turn, were the pressures \(\dot{p}_{1} \), \(\dot{p}_{2} \), and \(\dot{p}_{3} \) from Equations (20)–(22). However, it must be noted that in this study the step-size for the integration of the hydraulics was kept constant and set to 0.1 ms, which was small enough to keep the integration stable with both integrators. Accordingly, changing the hydraulics integration formula had little impact on the co-simulation performance.
3.4 Configuration of the test functions
As the external input of the described hydraulic circuit takes values from −10 V to 10 V, 0 V being the initial position, configuration of the inputs is a rather straightforward process. The step and ramp functions defined in Sect. 2.4.2 can be directly used. As the coupled system can be expected to be quite slow, the width of the impulse is set to 0.4 s to give time for the system to react.
Regarding the sinusoidal input, its amplitude in this case can be set according to minimum and maximum values of the input voltage. Frequencies, in turn, are, in this case, set according to the time constant of the valve. Thus, 35 Hz and 70 Hz, i.e., the frequency at \(-45^{\circ}\) phase shift and its second order, correspondingly, are used, as well as 17.5 Hz.
4 Results
The validity of the co-simulation accuracy and stability criteria discussed in Sect. 2.4 was confirmed comparing the results delivered by a series of simulations, in which some configurations complied with the criteria and others were outside the region assumed to be stable in Fig. 3. In addition, the use of test functions for the external inputs was evaluated. The single actuator model, which contains one external input, was first used for both cases, and, secondly, the double actuator model with multiple external inputs was examined. A user-generated joystick input was introduced in each case as reference signal \(U_{\text{ref}} \) to the directional valve in order to evaluate the criteria and the use of the test functions. Results are compared, when applicable, to a reference solution obtained with a monolithic scheme.
4.1 Single actuator model
Figures 9 and 10 support the statement that an approximately linear relation, demonstrated in Sect. 2 with Fig. 3, between the energy residual accumulation and the communication step-size indicates an accurate and stable co-simulation.
Results of the pre-defined test for the single-actuator model
Test function | Extrapolation | \(\int _{m}\) | \(\int _{h}\) | \(H_{0.2\,\mbox{ms}} \) |
---|---|---|---|---|
Step | m = 2 | I1AL | Euler | 4.0 ms |
Ramp | m = 2 | I1AL | Euler | 5.0 ms |
Impulse | m = 2 | I1AL | Euler | 3.6 ms |
Sinusoidal 17.5 Hz | m = 2 | I1AL | Euler | 2.6 ms |
Sinusoidal 35 Hz | m = 3 | I1AL | Euler | 2.8 ms |
Sinusoidal 70 Hz | m = 2 | I1AL | Euler | 4.4 ms |
Regarding the obtained communication step-sizes and extrapolation methods, a comparison to the behavior depicted in Figs. 3 and 9 suggests that a stable and accurate configuration can be found with the method, given that the most pessimistic result of those shown in the table, i.e., the configuration with the smallest \(H\), is taken as a final solution. In more detail, the table shows for the ramp and 70 Hz sinusoidal input test communication step-sizes of 5.0 ms and 4.4 ms, correspondingly, with \(m = 2 \). Figure 3, in turn, demonstrates unstable behavior at these communication step-sizes. A possible explanation for this result is that while the user-defined input hit the end-dampers of the cylinder, and thus created a demanding operation point for the simulation, these points were not reached during the short pre-defined tests. Alternatively, it is also possible that these tests, i.e., ramp and 70 Hz sinusoidal inputs, are not demanding enough for the step-size limits to be found.
Table 4 also shows that the step-size \(H\) and the extrapolation method selected by the configuration algorithm differ depending on the input signal used. This result agrees with [18], where it was shown that even for a simple model no all-encompassing optimal co-simulation method can be found, whereas here it is shown that even for exactly the same model a single optimal solution may not exist.
4.2 Double actuator model
Co-simulation options delivered by the configuration algorithm for each test case for the double-actuator model
Test function | Extrapolation | \(\int _{m} \) | \(\int _{h}\) | \(H_{0.2\,\text{ms}}\) |
---|---|---|---|---|
Step | I2 | I1AL | Euler | 1.6 ms |
Ramp | m = 3 | I1AL | Euler | 2.0 ms |
Impulse | I2 | I1AL | Euler | 1.6 ms |
Sinusoidal 17.5 Hz | I2 | I1AL | Euler | 1.8 ms |
Sinusoidal 35 Hz | m = 2 | I1AL | Euler | 1.8 ms |
Sinusoidal 70 Hz | m = 3 | I1AL | Euler | 1.8 ms |
5 Discussion
The proposed configuration method discussed in this paper intends to provide a stable initial configuration for a Jacobi-scheme co-simulation in which some external inputs are unknown beforehand. Discontinuities in system dynamics need to be addressed, as they are often detrimental to system stability. In the demonstrated examples, the hydraulic circuit contains multiple potential sources of discontinuities, the end dampers being the most obvious as they represent a contact model. Should the spring and damping coefficients not be properly tuned, an otherwise stable simulation might fail, since the maximum communication step-size in this region might be significantly shorter than in other operation points. In addition to the end dampers, the valve model may become numerically problematic if the linearization of the volume flows is neglected, or if the valve dynamics given in Eq. (28) are not included.
The need for careful modeling of the potentially discontinuous operating points holds true also in the context of the proposed algorithm, since, as is the case with the demonstrated examples, these discontinuities may not be encountered when using test functions as inputs. In these cases the algorithm might fail to provide a useful configuration, if a smooth solution cannot be obtained. This, however, is not a fault of the algorithm itself, but a consequence of the fixed communication step-size and the blind evaluation of states in Jacobi-scheme co-simulation.
In addition to the modeling aspects, attention must be paid to the internal solvers of the subsystems. Regarding this, an interesting observation about the integrators can be made from Tables 4 and 5, as the integrators chosen by the algorithm were the same in all cases. The hydraulic system is numerically stiff, and therefore a small internal integration step-size is required for the forward Euler formula to provide correct simulation results. In this work, it was assumed that the step-size used for the hydraulics was small enough to guarantee that the integration proceeded in an accurate and stable way.
6 Conclusions
In this paper a method for the automatic configuration of Jacobi-scheme co-simulation setups in which some inputs are provided by external sources has been put forward. The method is based on the relation between energy residuals of a stable simulation and the communication step-size at the co-simulation interface; this relation is here exploited to monitor co-simulation accuracy and stability. During the initialization phase of the co-simulation setup, the proposed method replaces the external inputs with standard test functions. A battery of short tests is run during this initialization stage to determine a combination of co-simulation parameters, such as extrapolation method, subsystem integrators, and communication step-size, that can be used to conduct the actual simulation of the system. The energy residual is employed as an indicator to achieve an efficient and stable set of parameters.
The initialization method was tested in the simulation of two mechanical systems with hydraulic actuation. The results indicate that the approximately linear region in the relation between communication step-size and energy residual is the region in which a stable and accurate solution can be found. Thus, the algorithm put forward in this paper seems to be able to provide a stable initial configuration for co-simulation environments in an automated fashion. The use of standardized test functions as a replacement for unknown external system inputs during the initialization phase enables the selection of a set of co-simulation parameters, such as the communication step-size and extrapolation method, to keep the numerical integration stable in an efficient way. As it is the case with co-simulation in general, carefully constructed subsystem models are required for reliable results to be obtained.
Notes
Acknowledgements
Open access funding provided by LUT University. The second author acknowledges the support of the Ministry of Economy of Spain through the Ramón y Cajal research program, contract no. RYC-2016-20222. This work has been partially financed by the Spanish Ministry of Economy and Competitiveness (MINECO) and EU-ERDF funds under the project ‘Técnicas de co-simulación en tiempo real para bancos de ensayo en automoción’ (TRA2017-86488-R).
Conflict of Interest
The authors declare that they have no conflict of interest.
References
- 1.Andersson, C.: Methods and tools for co-simulation of dynamic systems with the Functional Mock-up Interface. Ph.D. thesis, Lund University (2016) Google Scholar
- 2.Antunes, P., Magalhães, H., Ambrósio, J., Pombo, J., Costa, J.: A co-simulation approach to the wheel–rail contact with flexible railway track. Multibody Syst. Dyn. (2018). https://doi.org/10.1007/s11044-018-09646-0 CrossRefGoogle Scholar
- 3.Arnold, M., Burgermeister, B., Führer, C., Hippmann, G., Rill, G.: Numerical methods in vehicle system dynamics: state of the art and current developments. Veh. Syst. Dyn. 49(7), 1159–1207 (2011). https://doi.org/10.1080/00423114.2011.582953 CrossRefGoogle Scholar
- 4.Ben Khaled-El Feki, A., Duval, L., Faure, C., Simon, D., Gaid, M.B.: CHOPtrey: contextual online polynomial extrapolation for enhanced multi-core co-simulation of complex systems. Simulation 93(3) 185–200 (2017). https://doi.org/10.1177/0037549716684026 CrossRefGoogle Scholar
- 5.Benedikt, M., Holzinger, F.R.: Automated configuration for non-iterative co-simulation. In: 2016 17th International Conference on Thermal, Mechanical and Multi-Physics Simulation and Experiments in Microelectronics and Microsystems (EuroSimE), pp. 1–7 (2016). https://doi.org/10.1109/EuroSimE.2016.7463355 CrossRefGoogle Scholar
- 6.Benedikt, M., Watzenig, D., Hofer, A.: Modelling and analysis of the non-iterative coupling process for co-simulation. Math. Comput. Model. Dyn. Syst. 19(5), 451–470 (2013). https://doi.org/10.1080/13873954.2013.784340 MathSciNetCrossRefzbMATHGoogle Scholar
- 7.Benedikt, M., Watzenig, D., Zehetner, J., Hofer, A.: A nearly energy-preserving coupling element for holistic weak-coupled system co-simulations. In: NAFEMS World Congress 2013, Salzburg, Austria (2013) Google Scholar
- 8.Breedveld, P.: Port-Based Modelling of Multidomain Physical Systems in Terms of Bond Graphs pp. 141–190. Springer, Vienna (2009). https://doi.org/10.1007/978-3-211-89548-1_4 CrossRefzbMATHGoogle Scholar
- 9.Burger, M., Steidel, S.: Local extrapolation and linear-implicit stabilization in a parallel coupling scheme. In: IUTAM Symposium on Solver-Coupling and Co-Simulation, pp. 43–56. Springer, Berlin (2019). https://doi.org/10.1007/978-3-030-14883-6_3 CrossRefGoogle Scholar
- 10.Busch, M.: Continuous approximation techniques for co-simulation methods: analysis of numerical stability and local error. J. Appl. Math. Mech./Z. Angew. Math. Mech. 96(9), 1061–1081 (2016). https://doi.org/10.1002/zamm.201500196 MathSciNetCrossRefGoogle Scholar
- 11.Cuadrado, J., Cardenal, J., Bayo, E.: Modeling and simulation methods for efficient real-time simulation of multibody dynamics. Multibody Syst. Dyn. 1(3), 259–280 (1997). https://doi.org/10.1023/A:1009754006096 MathSciNetCrossRefzbMATHGoogle Scholar
- 12.Cuadrado, J., Cardenal, J., Morer, P., Bayo, E.: Intelligent simulation of multibody dynamics: space–state and descriptor methods in sequential and parallel computing environments. Multibody Syst. Dyn. 4(1), 55–73 (2000). https://doi.org/10.1023/A:1009824327480 CrossRefzbMATHGoogle Scholar
- 13.Dopico, D., González, F., Cuadrado, J., Kövecses, J.: Determination of holonomic and nonholonomic constraint reactions in an index-3 augmented Lagrangian formulation with velocity and acceleration projections. J. Comput. Nonlinear Dyn. 9(4), 041006 (2014). https://doi.org/10.1115/1.4027671 CrossRefGoogle Scholar
- 14.Gear, C.W., Wells, D.R.: Multirate linear multistep methods. BIT Numer. Math. 24(4), 484–502 (1984). https://doi.org/10.1007/BF01934907 MathSciNetCrossRefzbMATHGoogle Scholar
- 15.Gomes, C., Thule, C., Broman, D., Larsen, P.G., Vangheluwe, H.: Co-simulation: a survey. ACM Comput. Surv. 51(3) 49:1–49:33 (2018). https://doi.org/10.1145/3179993 CrossRefGoogle Scholar
- 16.González, F., Arbatani, S., Mohtat, A., Kövecses, J.: Energy-leak monitoring and correction to enhance stability in the co-simulation of mechanical systems. Mech. Mach. Theory 131, 172–188 (2019). https://doi.org/10.1016/j.mechmachtheory.2018.09.007 CrossRefGoogle Scholar
- 17.González, F., Dopico, D., Pastorino, R., Cuadrado, J.: Behaviour of augmented Lagrangian and Hamiltonian methods for multibody dynamics in the proximity of singular configurations. Nonlinear Dyn. 85(3), 1491–1508 (2016). https://doi.org/10.1007/s11071-016-2774-5 MathSciNetCrossRefGoogle Scholar
- 18.González, F., Naya, M.A., Luaces, A., González, M.: On the effect of multi-rate co-simulation techniques in the efficiency and accuracy of multibody system dynamics. Multibody Syst. Dyn. 25(4), 461–483 (2011). https://doi.org/10.1007/s11044-010-9234-7 CrossRefzbMATHGoogle Scholar
- 19.Handroos, H.M., Vilenius, M.J.: Flexible semi-empirical models for hydraulic flow control valves. J. Mech. Transm. Autom. Des. 113(3), 232–238 (1991). https://doi.org/10.1115/1.2912774 CrossRefGoogle Scholar
- 20.Kübler, R., Schiehlen, W.: Modular simulation in multibody system dynamics. Multibody Syst. Dyn. 4(2), 107–127 (2000). https://doi.org/10.1023/A:1009810318420 CrossRefzbMATHGoogle Scholar
- 21.Meyer, T., Li, P., Lu, D., Schweizer, B.: Implicit co-simulation method for constraint coupling with improved stability behavior. Multibody Syst. Dyn. 44(2), 135–161 (2018). https://doi.org/10.1007/s11044-018-9632-9 MathSciNetCrossRefzbMATHGoogle Scholar
- 22.Naya, M.A., Cuadrado, J., Dopico, D., Lugris, U.: An efficient unified method for the combined simulation of multibody and hydraulic dynamics: comparison with simplified and co-integration approaches. Arch. Mech. Eng. 58(2), 223–243 (2011). https://doi.org/10.2478/v10180-011-0016-4 CrossRefGoogle Scholar
- 23.Nokka, J., Laurila, L., Pyrhönen, J.: Virtual simulation-based underground loader hybridization study—comparative fuel consumption and productivity analysis. Int. Rev. Model. Simul. (IREMOS) 10, 222 (2017). https://doi.org/10.15866/iremos.v10i4.12130 CrossRefGoogle Scholar
- 24.Paynter, H.: Analysis and Design of Engineering Systems; Class Notes for MIT Course (1961) Google Scholar
- 25.Peiret, A., González, F., Kövecses, J., Teichmann, M.: Multibody system dynamics interface modelling for stable multirate co-simulation of multiphysics systems. Mech. Mach. Theory 127, 52–72 (2018). https://doi.org/10.1016/j.mechmachtheory.2018.04.016 CrossRefGoogle Scholar
- 26.Rahikainen, J., Kiani, M., Sopanen, J., Jalali, P., Mikkola, A.: Computationally efficient approach for simulation of multibody and hydraulic dynamics. Mech. Mach. Theory 130, 435–446 (2018). https://doi.org/10.1016/j.mechmachtheory.2018.08.023 CrossRefGoogle Scholar
- 27.Rahikainen, J., Mikkola, A., Sopanen, J., Gerstmayr, J.: Combined semi-recursive formulation and lumped fluid method for monolithic simulation of multibody and hydraulic dynamics. Multibody Syst. Dyn. 44(3), 293–311 (2018). https://doi.org/10.1007/s11044-018-9631-x MathSciNetCrossRefzbMATHGoogle Scholar
- 28.Sadjina, S., Kyllingstad, L.T., Skjong, S., Pedersen, E.: Energy conservation and power bonds in co-simulations: non-iterative adaptive step size control and error estimation. Eng. Comput. 33(3), 607–620 (2017). https://doi.org/10.1007/s00366-016-0492-8 CrossRefGoogle Scholar
- 29.Samin, J.C., Brüls, O., Collard, J.F., Sass, L., Fisette, P.: Multiphysics modeling and optimization of mechatronic multibody systems. Multibody Syst. Dyn. 18(3), 345–373 (2007). https://doi.org/10.1007/s11044-007-9076-0 CrossRefzbMATHGoogle Scholar
- 30.Schierz, T., Arnold, M., Clauss, C.: Co-simulation with communication step size control in an FMI compatible master algorithm. In: Proceedings of the 9th International MODELICA Conference, Munich, Germany (2012). https://doi.org/10.3384/ecp12076205 CrossRefGoogle Scholar
- 31.Schweizer, B., Li, P., Lu, D.: Explicit and implicit cosimulation methods: stability and convergence analysis for different solver coupling approaches. J. Comput. Nonlinear Dyn. 10(5), 051007 (2015). https://doi.org/10.1115/1.4028503 CrossRefGoogle Scholar
- 32.Schweizer, B., Li, P., Lu, D.: Implicit co-simulation methods: stability and convergence analysis for solver coupling approaches with algebraic constraints. J. Appl. Math. Mech./Z. Angew. Math. Mech. 96(8), 986–1012 (2016). https://doi.org/10.1002/zamm.201400087 MathSciNetCrossRefGoogle Scholar
- 33.Skjong, S., Pedersen, E.: On the numerical stability in dynamical distributed simulations. Math. Comput. Simul. 163, 183–203 (2019). https://doi.org/10.1016/j.matcom.2019.02.018 MathSciNetCrossRefGoogle Scholar
- 34.Stettinger, G., Benedikt, M., Tranninger, M., Horn, M., Zehetner, J.: Recursive FIR-filter design for fault-tolerant real-time co-simulation. In: 2017 25th Mediterranean Conference on Control and Automation (MED), Valletta, Malta (2017). https://doi.org/10.1109/MED.2017.7984160 CrossRefGoogle Scholar
- 35.Vaculín, O., Krüger, W.R., Valášek, M.: Overview of coupling of multibody and control engineering tools. Veh. Syst. Dyn. 41(5), 415–429 (2004). https://doi.org/10.1080/00423110412331300363 CrossRefGoogle Scholar
- 36.Watton, J.: Fluid Power Systems: Modeling, Simulation, Analog and Microcomputer Control. Prentice Hall, New York (1989) Google Scholar
Copyright information
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.