**By Peter Nachtwey, President, Delta Computer Systems, Inc. Battle Ground, Wash. **

Simulation and modeling can save you time and money in hydraulic system designs.

Motion systems rely more and more on closed-loop control to achieve greater influence over production processes. However, the old rules of thumb for designing fluid power systems don’t always apply to systems with closed-loop control. Mathematical modeling and simulation of fluid power motion systems are getting better as new tools are developed, and you can improve your chances of meeting your design goals if you take advantage of these new tools.

Mathematical modeling and virtual prototyping let you visualize and predict what your design concepts will do before you invest in building physical prototypes. In fact, it’s possible using today’s technologies to develop, test out, and optimize a motion system at your desk, before the machine is constructed. This lets you make the optimum decisions on components. For example, you can size hydraulic cylinders and valves, while saving time with quicker turns on design iterations and saving money with quick turns and no wasted construction effort, and ensuring safer operation by minimizing physical risk that could result from un-proven motion control programs running on real hardware.

Modeling and simulation are beneficial for machines with a small number of motion axes. For complex multi-axis machines with many moving parts, hardware simulation can be invaluable. Mistakes found after the machine is built are often expensive and difficult to fix, and can impact system startup dates. Designers start out by making a model of the system and can try out different “what-if” scenarios, and see the impact of nonstandard conditions.

**Modeling to obtain optimal component values**

The selection of component values doesn’t need to be perfect—a motion controller running a closed-loop control algorithm can compensate for suboptimal choices—but the efficiency of the system will be impacted if the component values are far from optimal. One key factor is the natural frequency of the system. Components should be selected such that the system is capable of responding much faster (typically at least four times as fast) as it will be called upon in real life operation.

You should start by understanding the steady-state performance of the motion system (for example, how the system responds to the motion controller during periods when the velocity is constant). The VCCM equation for calculating the actuator speed is based on this concept. This provides only the first clue to system response because the load can’t instantly accelerate to speed and one can’t necessarily assume that there will be enough force to accelerate the system to the desired speed in the length of the cylinder.

A detailed model of the system must take into account the cylinder or motor, valve, accumulator, pump, and the connecting piping. The information for the dynamics of these components is written as a system of first-order differential equations that express the rate of change of a parameter as a function of that parameter and others. The simulations start with the formula for acceleration or angular acceleration depending on whether the actuator is a cylinder or a motor. The acceleration is then integrated over time to provide the velocity and position as a function of time. The equations for the cylinder and motor acceleration are:

for the cylinder and

for the motor

Where:

* dv/dt* is the rate of change in velocity with respect to time which is the same as acceleration

* dω/dt* is the rate of change in angular velocity with respect to time which is the same as the angular acceleration

* F_{l}* and

*are the force or torque loads. They are shown as constants but they can be variables or functions that change as a function of time or opposition.*

**T**_{l}* P_{a}* and

*are the pressures on either side of the piston or motor*

**P**_{b}* A_{a}* and

*are the areas on either side of the piston*

**A**_{b}** D** is the displacement of the hydraulic motor per revolution

* m* is the mass of the load

* J* is the rotational inertia

The two main unknowns are the pressures. From this point on, the differences between the hydraulic cylinder and hydraulic motor simulation are small, if any.

For example, we can calculate the rate of change in pressure in the cap or ‘A’ side of the cylinder as follows:

Where:

* β* is the bulk modulus of oil, a constant describing the compressibility of the oil

** Q_{.a}** is the flow of oil into or out of the cap side of the cylinder

* Area_{.a}* is the surface area of the piston on the “A” side of the cylinder

* Velocity* is the velocity of the piston

* MinVol_{.a} *is the minimum volume of the cylinder on the “A” side of the piston

* Position* is the position of the piston

* P_{s}* is the supply pressure

* P_{a}* is the pressure on the cap side of the cylinder

* P_{b}* is the pressure on the rod side of the cylinder

**P _{t}** is the tank pressure

And the equation for flow into or out of the cap side of the cylinder is:

Note that the spool position, all the pressures, actuator position and velocity are changing at every instant. There is a differential equation for the position, velocity, acceleration, each of the four pressures, the accumulator, and the pump. If more than one axis is powered from the same pump and accumulator, the equations for the additional axes should also be added to the system of differential equations. Methods such as Runge-Kutta (RK4) can be used to calculate how the parameters will vary in the future.

To use the model to simulate the system operation over time, all the individual differential equations need to be solved in parallel and at time intervals of about 100 to 125 microseconds. Fine time intervals allow for more accurate predictions of the future state of the parameters. This simulation technique allows you to see how the motion of axis 1 affects the motion of axis 2 because of the drop in supply pressure. These simulations are math intensive and can be handled by today’s powerful computers leading to results that can be quite good if the model for the individual components is accurate.

**An example**

As an example, Figures 3 and 4 show a simulation of a hydraulic motor controlled with a PID controller with a ramp generator. Figure 3 shows the angular position and velocity as a function of time. Since the actual position and velocity line lie on top of the target position and velocity lines, the system is designed and tuned well. This simulation required eight linear and non-linear differential equations to be solved simultaneously.

Figure 4 shows what is happening inside the simulated cylinder. The flows and pressures are graphed. None of the pressures are getting close to the supply pressure or atmospheric pressure so the motion should be OK. The pump flow increases as the supply pressure drops. This reflects the pumps reaction to the pressure drop. The accumulator in the system keeps the pressure from changing too much or too quickly for the pump to respond to. The other flows are what are expected.

The simulation allows you to change components and quickly see the effect the change has on system control. This allows you to optimize the component selection and at the same time gain insight into what the weak parts of the system may be.

**Developing the model**

How do you get the information to use in constructing system models? The more common approach is to create the model from the information available for the different parts in the system and how they are put together. This usually requires having good specifications for most if not all the components. This information is often hard to obtain because manufacturers don’t usually supply all the information necessary.

For example, it’s unlikely that even the manufacturer of a pump will be able to say how its pumps change flow as a function of pressure at the millisecond level. This can have a big impact on how much the supply pressure drops when the actuator accelerates quickly to a high speed. The best you can do is make conservative estimates and compensate by increasing the size of the accumulator or adding more accumulators. However, if the hardware cost of playing safe is looked upon as being too expensive, you have to weigh this expense against the time it takes to test the pump and build a better model.

Some of the larger mobile equipment manufacturers test the parts they’re considering buying in order to get more detailed information than what is available in published specifications. It would not be surprising to learn that these customers know more about a vendor’s valve, for example, than the vendor does.

Fortunately, some system models can be simple to construct. Often a simple second order model with a gain, natural frequency, and damping factor is enough. This is often the case for control engineers. However, hydraulic designers usually need much more.

Another way to get a model is to do system identification. This involves exciting the real system (or a simulated one) with a step change in the control signal to the valve and recording how the system responds to the control input. The model constants are modified using trial and error until the model’s response mimics the actual system’s response. There are functions and mathematical techniques like the Levenberg-Marquardt algorithm that can quickly find the best values for the model in order to minimize the error between the model and the actual system. System identification can be a practical and useful part of the design process when one needs to narrow down the operating characteristics of a part, as in the case of the pump. Again, this takes time and resources that may not be available.

**Motion controllers with built-in support**

Motion controller manufacturers can make the system identification process easier for designers by providing tools that excite the system and monitor the results. This can be done on real hardware or on a model of the system hardware constructed before the real hardware is built.

To give the operators of the hydraulic system an idea of how it will perform before it’s constructed, some motion controller manufacturers provide operational simulators of their controllers. Designers can write their control programs and test them and their operator interfaces early in the project cycle and in parallel with hydraulic and mechanical system design.

**Caveats**

Modeling and simulation can be very helpful, but practical experience says don’t depend completely on these tools to guarantee that a design will work. There are too many factors that aren’t modeled which can have an effect on how the real system will work. Even small factors like bends in the pipes can have an effect on system performance. Models are more reliable at proving when a system won’t work than the opposite.

Still, it’s much better to do system modeling and simulation than not to do it. The benefits of development time savings, incremental increases in system efficiency and improved safety during the initial design cycle can be significant. To maximize these benefits, you should look for motion controllers that are well supported with simulation capability.

Discuss this on The Engineering Exchange:

**Delta Computer Systems, Inc.**

www.deltamotion.com

Filed Under: Hydraulic equipment + components, Software • simulation, FLUID POWER, Motion control • motor controls

## Tell Us What You Think!