Optimization of Parameters of Pseudo-Dynamic

0 downloads 0 Views 234KB Size Report
“Proceedings of the 7th International Fluid Power Conference (7th IFK) Aachen 2010". Optimization of ... Real-Time Simulation of Fluid Power Circuits. Rafael Åman ..... /Ped07/. Pedersen, H. Automated Hydraulic System Design and Power ... RÃ¥de, L., Westergren, B. Mathematics Handbook for Science and. Engineering ...
This paper is reprinted from “Proceedings of the 7th International Fluid Power Conference (7th IFK) Aachen 2010"

Optimization of Parameters of Pseudo-Dynamic Solver for Real-Time Simulation of Fluid Power Circuits Rafael Åman Laboratory of Intelligent Machines, Lappeenranta University of Technology, Finland

Heikki Handroos Laboratory of Intelligent Machines, Lappeenranta University of Technology, Finland

ABSTRACT The system stiffness approaches infinity as the fluid volume approaches zero causing numerical problems. If fixed step explicit ODE-algorithms are used the stability would easily be lost when integrating pressures in small volumes. The pseudo-dynamic solving method is based on the basic assumption that if the volume in the system to be described is small enough, the pressure can be expressed by a static pressure created in a separate cascade loop by numerical integration. The method is freely applicable regardless of used integration routine. The nominal frequency (time constant) created by the small volume, is not significant in comparison with the dynamics of the whole system. The hydraulic capacitance V/Be of the parts of the circuit whose pressures are solved by pseudo-dynamic method should be at least ten times smaller than that of those parts whose pressures are integrated. Solver parameters: convergence criteria, integrator time step and pseudo-volume are optimized. This paper describes the algorithm in general level and presents simulation examples. Results obtained are compared.

NOMENCLATURE Be

The effective bulk modulus of the system

Pa

p1, p2, p3

Pressure in volume

Pa

Q1 , Q2

Volume flow over the orifice

m3/s

V1 , V 2 , V

Volume

m3

Tol _ p 2

Pseudo-loop convergence criteria

Pa/s

1

INTRODUCTION

The integration of pressures in small fluid volumes causes numerical problems in fluid power circuit simulation. Ordinary differential equations (ODE) arising from equations of pressure build-up in a node are generally stiff. Stiffness in differential equations means that that there is a difference of orders of magnitude between time constants in the system. This system behaviour cause stability problems in the numerical integration and special numerical methods suitable for stiff systems must be employed /Hai96/.

The system stiffness approaches infinity as the fluid volume approaches zero. If fixed step explicit ODE-algorithms are used the stability would easily be lost when integrating pressures in small volumes. Poor stability cause numerical problems and difficulties due to the demand for solving problem in real-time. Krus has developed the modified Heunmethod that utilizes the partial derivatives of flows with respect to pressures /Kru86/. This method has been quite successful in solving pressures in small volumes, but it still requires very small integration time steps when the volumes are very small. Ellman postulated an iterative algorithm for pressures in volumes that can be approximated zero volumes to be used in conjunction with modified Heun-method /Ell92/. This can also be called as steady-state solving method. The drawback in this method is that it also requires a small integration time step and is applicable only with modified Heun-method.

Åman and Handroos have proposed a pseudo-dynamic solver to solve the problem caused by small fluid volumes /Åma08/ /Åma09/. Instead of integrating the pressure in small volume this method solves the pressure as a static pressure at each time step by using pseudo-dynamic solver which is based on the basic assumption that if the volume in the system to be described is small enough, the pressure can be expressed by a static pressure /Ell92/. The method has two key ideas. Firstly, the nominal frequency (time constant), which is created by the small volume, is not significant in comparison with the dynamics of the whole system. Secondly, instead of integrating the equations for pressure gradients in such volumes, their pressures are solved as static pressures

by using pseudo-dynamic solver. The solver integrates the pressures in a separate integration loop while the volumes have pseudo-values providing smooth and fast solution. The following rule can be followed when using the pseudo-dynamic approach. The hydraulic capacitance V/Be of the parts of the circuit whose pressures are solved by pseudo-dynamic method should be at least ten times smaller than that of those parts whose pressures are integrated. The superiority of pseudo-dynamic method comes from the fact that the method is freely applicable regardless of used integration routine.

To make the pseudo-dynamic solver to work on its best behaviour it requires optimization of solver parameters. Parameters to be optimized are the stopping criteria of static solution acquisition, the integrator time step and the size of pseudo-volume. As stopping criteria the first derivative of pressure can be used.

The present paper describes the algorithm in general level and how it applies to a circuit model composing of two orifices and two fluid volumes. Parameters of pseudo-dynamic solver are optimized. Results obtained are compared.

2

NUMERICAL INTEGRATION IN SOLVING ODES

Explicit formulas are most suited for solving non-stiff systems, implicit formulas become more efficient when solving stiff systems of ODEs /Esq08/. The main advantage of explicit single-step codes is their easy programming implementation. Explicit RungeKutta formulas with an embedded error estimator and variable step-size are still used in the simulation of fluid power applications. However, for real-time applications the fixed step-size formulas are more suitable.

The main disadvantage of single-step methods is, in general, that they require more computational time than multi-step methods of comparable accuracy. However this disadvantage can be questioned when integrating fluid power circuits. The stiffness of its ODEs and discontinuities present in fluid power circuits may weak the computational performance of the multi-step methods. /Esq05/

A fluid power circuit may contain fluid volumes of different orders of magnitude. The dynamic response of such system involves widely different time scales. The part of the response associated with very short time constants is often of little significance in the overall response, since it is a very quickly damped transient. Conventional explicit integration methods such as Runge-Kutta schemes become numerically unstable unless a very small time increment is used, which leads to excessively long computational times. In addition, the numerical stiffness of a given system may change during a simulation, for example, a fluid volume in valve control chamber may become very small as a valve closes In some cases even algorithms specially designed for stiff systems require excessively small time steps to avoid numerical oscillation. For integration of very stiff circuits, the L-stable method is recommended /Pic93/. Pseudo-dynamic solver in comparison with explicit and implicit codes is very good alternative while its programming can easily be implemented and it is suitable for solving stiff systems. And most of all, the method is freely applicable regardless of used integration routine.

3

PSEUDO-DYNAMIC SOLUTION OF STATICS OF FLUID POWER CIRCUITS

The idea behind this algorithm is to consider each pressure node as finite volume. By doing so, each node represents a volume in which pressure builds up or decreases dependent on the total flow of the node, i.e. the sum of flows to and from the node. There can be several independent pipe lines bringing volume flow to and from the node. The pressure build up in each node may be described by the conventional continuity equation, Eq. (1) /Mer67/.

p where

B V

e

Q

B e:

The oil bulk modulus [Pa].

V:

The considered volume of each node [m3].

Q:

The flow into and out of the node [m3/s].

(1)

The flow is described using Eq. (2).

Q Qin Qout V where

V:

(2)

Externally supplied flow into and out of the volume

The flows in and out of the volume can be described using Eq. (3).

Q

f ( p)

(3)

These three equations, Eq. (1), (2) and (3), make up the system formulation, which requires an integration routine to update the pressures. For this a standard explicit fixed step 4th order Runge-Kutta implementation is used, where the time steps in the solver are set sufficiently low to the account for the pseudo-dynamic in the system. This, however, also means, as oppose to the static solver, that no update algorithm is used, as the pressures are directly updated by the integration routine. For the static solver the update law also had a filtering effect. I.e. larger, artificial volumes work as filter in pseudo-dynamic model, that is, they reduce pressure pikes. For the pseudo-dynamic solver this effect is instead replaced with pressure build up in the nodes. /Ped07/. In the conventional continuity equation of Merritt, Eq. (1), the variation of studied volume (e.g. hydraulic cylinder) is taken into account in Eg. (2) /Mer67/. The main idea of pseudo-dynamic solving method is that no changes happen in the dynamics of system simulated while static state is being solved.

4

SOLUTION OF PRESSURES IN SMALL VOLUMES IN DYNAMIC SIMULATION

The key idea in the proposed method is to find static solutions for the pressures in small volumes at each integration step while the pressures in larger volumes as well as the other differential equations are integrated normally in the actual integration loop. In other words, there is a cascade, inner integration loop (pseudo-dynamic solver) running inside the actual ODE-solver to produce static solutions for pressures in small volumes. The general idea is represented in Figure 1.

Figure 1: Illustration of pseudo-dynamic solver Figure 1 shows the principle of encoding the pseudo-dynamic solver. Simulation is started by defining initial parameters. Initial parameters are substituted into differential and algebraic equations. Integration in main loop at time t = 0 +

t is carried out

according to initial parameters. Integrated values are updated into differential and algebraic equations in pseudo-loop and pseudo-loop is started. Note that every parameter moved to and every computational action carried out in pseudo-loop are related to small volumes, i.e. pseudo-loop concerns only for stiffness problem. Integration in pseudo-loop is carried out until the defined stopping (convergence) criterion is reached. Note that the main loop is paused during the pseudo-loop run and this loop has independent time space ta. After pseudo-loop is executed the integrated value from pseudo-loop is returned to main loop. Returned variables are substituted into differential and algebraic equations as new initial parameters. Results are stored and handled in post-processing after main loop integration time, t, has run out.

5

NUMERICAL EXAMPLE: SIMPLE FLUID POWER CIRCUIT

The study was started by formulating a model of simple fluid power circuit composing of two volumes and two orifices in MATLAB M-File. This code is used as reference to pseudo-dynamic model. Studied fluid power circuit is illustrated in Figure 2.

Figure 2: A simple fluid power circuit wit two volumes and two orifices Figure 2 represents a fluid source with pre-determined initial conditions and parameters, two sharp-edged orifices of round cross-section and a separate tank for fluid recovery. The pipeline between two orifices has very small volume in comparison with the fluid source. The pressure in this volume, V2, is considered to be evenly distributed as in fluid source.

In initial state (t=0+ t) defined volume V1 is full and volume V2 is empty and initial pressures, p1, p2 and p3, reign. The fluid starts to flow through orifice 1 into the volume V2 which starts to fill up. At the same time, fluid flows further to fluid recovery line through orifice 2 as the pressure p2 rises. Tank pressure can be considered as p3=0 since the fluid flows freely to the tank. The effective bulk modulus, Be, is defined for the differential equation of pressure drop (Eq. 1). In pseudo-dynamic model the volume, V2, is enlarged to artificial volume, V. Used parameter values are presented in Table 1. Three different parameters for time step lenght is used. H is for reference model, S for main loop in pseudo-dynamic solver and T for pseudo-loop. Be = 1.5e9 Pa V1 = 1e-2 m

d1 = 3e-3 m

3

Cd = 0.6

p1= 100e5 Pa 3

d2 = 3e-3 m

= 900 kg/ m

V2 = 1e-5 m 3

H = 1e-5 s

S = 2e-4 s

p 3= 0 Pa

V = Vpseudo = varied [m 3]

T = ta = varied [s]

t = 0.5 s

ta = varies [s]

Table 1: Parameter values used in system simulation

p 2= 0 Pa

The value for pressure p1 is solved directly by integrating the Equation 1. For solving p2 initial conditions and previously integrated value for p1 are passed on to the pseudo-loop and substituted to the differential and algebraic equations. In pseudo-loop for the first time step ta=0+ ta the pressure p2 is solved by numerical integration and this value is substituted to the equations in the beginning of the pseudo-loop for the next time step ta=ta

ta. This procedure is carried out until the static solution of pressure p2 is reached.

As a criterion for returning back to main loop the first derivative of pressure p2 is used. Main loop is paused during the pseudo-loop run. Volume flows through orifices (Q1, Q2) are solved from the pressure drop by Equation 3. In simulations of pseudo-dynamic model three different pairs of comparison have been used. Pairs are formulated so that one three parameters studied has been kept constant while two other parameters are varied. Pairs of comparison are named as follows:

Pair 1:

Time step T and volume V pseudo – convergence criteria Tol _ p 2 constant

Pair 2:

Volume Vpseudo and convergence criteria Tol _ p 2 – Time step T constant

Pair 3:

Time step T and convergence criteria Tol _ p 2 – volume Vpseudo constant

These pairs are implemented by adding to main program inner cascade loops which enable several consecutive simulation runs using varied values for pseudo-volume Vpseudo, for time step length of pseudo-loop T and for convergence criteria Tol _ p 2

5.1

Reference model

As a reference model normal orifice model encoded as explained in Section 3 is used for solving pressures in both volumes. Used initial values are represented in Table 1. This method is commonly acknowledged and can be stated as the most accurate one when time step length is set sufficiently short. In this case H = 1e-5 s has been longest possible time step length to keep the response of pressure p2 stable. The drawback for use of this conventional method is the computational speed. In this case computational time for simulation of 0.5 s was 32.9 s.

Figure 3 compares pressure response of p2 using reference model with conventional integration method and pseudo-dynamic solution. The conventional reference model show smoother behaviour and better stability, while pseudo-dynamic response show a little noise when approaching to zero pressure.

Figure 3: Responses of pressure p2, Vpseudo = 5e-4 m3 and Tpseudo = 7e-4 s In all simulation runs step-function is involved. Its influence on results has been minimized by setting threshold pressure as low as reference model still stood stable (threshold pressure 0.25 bar). Without use of step-function simulation runs failed.

5.2

Post-processing

The post-processing manages the results of simulation runs. Separate simulation runs are driven with various values for pseudo-volume Vpseudo and for time step length of pseudo-loop T. All of attained pressure responses are compared with the reference response. Because of the dissimilar lengths of compared vectors interpolation is done to get vectors comparable.

For example, compared pair nr. 1 in section 6.1 is driven using 11 different values for time step length and 11 different values for pseudo-volume. Together these form 11 multiplied by 11 different pressure vectors. From the point of view of the accuracy, the

response of conventional reference model simulated using very short time step is taken as a reference because it is commonly acknowledged in literature.

The difference between compared discrete pairs is integrated numerically by using the midpoint rule /Råd04/. By means of this integration the area that describes error departed from reference graph is attained. After every discrete pair is compared and integrated the sum of attained values is stored into the separate array. Absolute value of difference is used to avoid possible negative areas which would deduct the total area. The array is filled by results of different pairs and is then plotted. The maximum difference between compared vectors is treated similarly. It is assumed that the maximum difference gives information about the influence of the tested variables: the smaller the difference, the closer the vector is to the reference vector. Finally, elapsed CPU times per solved responses are collected into an array and plotted.

6

RESULTS

In following sub-sections the results of three different pairs of comparison are collected. The studied pressure response is of pressure p2 which reign in small volume presented in Figure 2. If thumb rule is mentioned it means that using those values the calculation happens in real-time and sufficient accuracy is attained. The parameter set to be constant is selected according to data collected during this research.

6.1

Pair 1

In this pair the following varied parameters are used Vpseudo = 5e-4 ... 15e-4 with interval of 1e-4 m3. Thump rule: < 1e-3 m3 Tpseudo = 5e-4 ... 15e-4 with interval of 1e-4 s. Thump rule: < 1e-3 s

Tol _ p 2 = 500 Pa/s constant Maximum difference between responses of p2 is illustrated in Figure 4. It is then noted that pseudo-volume and time step length must be varied in relation so that both accuracy and calculation speed remain acceptable. I.e. disproportion between these

parameters causes error to attained response and increases the amount of needed iteration rounds which leads to longer CPU time needed.

Figure 4: Maximum difference between

Figure 5: Elapsed CPU-time per solved

responses of p2

response of p2

6.2

Pair 2

In this pair the following varied parameters are used Vpseudo = 1e-3 ... 2e-3 m3 with interval of 1e-4 m3. Tpseudo = 1e-3 s constant

Tol _ p 2 = 100 ... 1000 Pa/s with interval of 100 Pa/s. Thump rule. Elapsed CPU-time per solved response of p2 is illustrated in Figure 5. It is then noted that the influence of convergence criterion on the attained results is not that effective than pseudo-volume has. In fact, it is possible to vary convergence criterion by decade without drastic changes in results. The use first derivative of pressure as convergence criterion is a little bit challenging while its value alternates several decades during the simulation run. On the other side it is easily available in pseudo-loop i.e. it is updated in every time step without any ancillary calculations.

6.3

Pair 3

In this pair the following varied parameters are used Vpseudo = 1e-3 m3.constant Tpseudo = 5e-4 ... 11e-4 s with interval of 1e-4 s

Tol _ p2 = 100 ... 5000 Pa/s with interval of 100 Pa/s. Thump rule: 1000 Pa/s Integrated absolute error of responses of p2 is illustrated in Figure 6. It is then noted that the influence of convergence criterion on the attained results is not that effective in comparison with the time step length of pseudo-loop which is almost linear. In fact, it is possible to vary convergence criterion by decade without drastic changes in results.

Figure 6: Integrated absolute error of responses of p2

CONCLUSION The pseudo-dynamic method is applied to simple fluid power circuit composing of two volumes and two orifices using explicit 4th order Runge-Kutta integration routine. The solver parameters are optimized. Results obtained are compared to response attained using conventional method for numerical integration. It is shown that the major influence on the accuracy and calculation speed has pseudo-volume and pseudo-loop time step length while influence of the convergence criterion of pseudo-loop iteration is almost negligible in comparison.

REFERENCES /Ell92/

Ellman, A. Proposals for Utilizing Theoretical and Experimental Methods in Modelling Two-Way Cartridge Valve Circuits, Acta Polytechnica Scandinavica, Mechanical Engineering series, Nr. 101, 1992

/Esq05/

Esque, S., Ellman, A. An Efficient Numerical Method for Solving the Dynamics of Complex Fluid Systems, Bath Workshop on Power Transmission and Motion Control, Bath, United Kingdom, 2005

/Esq08/

Esque, S. A New Approach for Numerical Simulations of Fluid Power Circuits Using Rosenbrock Methods, PhD Theses, Tampere University of Technology, Nr. 763, 2008

/Hai96/

Hairer, E., Wanner, G. Solving Ordinary differential Equations II: Stiff and Differential-Algebraic Problems, Ed. Springer-Verlag (Mathematical Computational Series: 14), 2nd rev. ed., 1996

/Kru86/

Krus, P. The Simulation of Fluid Power Systems with Complex Load Dynamics, Int. J. Modelling & Simulation, Vol. 6, Nr. 2, pp. 52-57, 1986

/Mer67/

Merritt, H. Hydraulic Control Systems, John Wiley, New Jersey, 1967

/Ped07/

Pedersen, H. Automated Hydraulic System Design and Power Management in Mobile Applications, PhD Theses, Aalborg University, 2007 (publication title edited 2015)

/Pic93/

Piché, R., Ellman, A. Numerical Integration of Fluid Power Circuit Models Using Two-Stage Semi-implicit Runge-Kutta Methods, Mathematics Report, Tampere University of Technology, Nr. 64, 1993

/Råd04/

Råde, L., Westergren, B. Mathematics Handbook for Science and Engineering, Studentlitteratur, Sweden, 2004

/Åma08/

Åman, R., Handroos, H. Pseudo-Dynamic Solution of Pressures in Small Volumes in Fluid Power Circuit Simulation, 5th FPNI PhD Symposium, Cracow, Poland, 2008

/Åma09/

Åman, R., Handroos, H. Comparison of Numerical Effectiveness of Three Methods for Modelling 2-Way Flow Control Valves, 7th Int. Conference on Fluid Power Transmission and Control, Hangzhou, China, 2009

Suggest Documents