# Servo-hydraulic motion control: choose PLC or motion controller?

Some closed-loop motion control applications obviously require a motion controller, but some people can also implement closed-loop control by using PLC. Of course, the choice of control method is often difficult to determine.

Some closed-loop motion control applications obviously require a motion controller, but some people can also implement closed-loop control by using PLC. Of course, the choice of control method is often difficult to determine.

When you can use PLC control, why do you need to spend money to buy a dedicated electro-hydraulic motion controller? The answer is simple. Generally speaking, the factors to be considered include the number of use, difficulty in implementation, available time, production efficiency, precision requirements, and economy. The decision to make is often very vague. Based on past experience, I know which types of applications can use PLC and which ones are not.

For most control system designers, cost is the first idea. The easiest way is to buy a PLC with analog input and output for the control of various axes, and it can also have some digital I/O, and then you can program. Usually start from the simplest proportional control, even PID control block is not needed. This is the practice of most hydraulic servo control currently on the market. People receive a lot of hydraulic training, but it is limited to this.

The feedback of the analog quantity must be converted and scaled into position units. However, I am very surprised that in some PLC forums, many people are asking how to convert an analog quantity into millimeters or inches. If the programming engineer is asking, obviously he can’t make up anything. After scaling the input value, the simple method is to subtract the actual position from the command position, multiply the difference by the proportional gain, and use this value as the analog output to the valve. It’s that simple!

1. The simulation shows what happens when the command position suddenly changes 100mm. The control output is saturated at 100%, and the actuator suddenly accelerates. The actual position is slowly approaching the target value of 100mm.

PLC settings for analog control

One challenge of PLC control occurs when the command and actual position of the hydraulic cylinder differ greatly, because the signal output to the valve may be very large at this time. The result is that the hydraulic cylinder moves to the command position at full speed. What happens when the position is commanded depends on the gain and load. Sometimes the hydraulic cylinder will decelerate smoothly to the command position, but if the load is large, it will also produce overshoot with damped oscillation.

There are multiple solutions to this problem. A simple way is to limit the output value to a value below 100%. A better solution is to prepare a target generator so that the target value can be increased in the direction of the command position. Next, instead of comparing the commanded position with the actual position, the actual position is compared with the next target position. The target position starts at the current position, increases at the desired rate and reaches the command position. For long-stroke movement, vibration and shock during initial movement can be avoided. This solution is relatively easy to implement.

For example, if two hydraulic cylinders follow the same target position, it is relatively easy to synchronize their positions. If the loads on the two cylinders are exactly the same, the tracking error of the target value should also be the same, so their actual positions will also be very close. So, what is the tracking error for a system with only proportional control?

Tracking error formula:

Ef = v/(K? Kp)

Here:

Ef-tracking error, mm,

v – speed, mm/s,

K-open loop gain, (mm/s)/%

Kp-proportional gain, %/mm.

2. The curve is the same as the conceived scheme in Figure 1, except that the command position is changed only by 10mm. Note that they took the same amount of time. This is because the time constant of motion control is 5 times. 5 times the time constant is 0.358s. This means that it takes 0.358s for a 1mm movement to reach 1% of the target value.

Units are important and need to be consistent. The percentage represents the percentage of the control output. The percentage of the control output can be ±10 V, ±20 mA, or other percentages, as long as the units are consistent. When using PLC, the tracking error is usually not that important. The hydraulic cylinder only needs to be able to approach the command position roughly. The above equation is suitable for applications that have a limited tracking error. The user can decide the action speed to meet the application requirements.

The VCCM formula is needed to calculate the open loop gain, which calculates the maximum steady-state speed when the output is controlled at 100%. This formula has been discussed many times in related forums. (Extended reading: VCCM-If the flow calculation is no longer Q=A*V?)

The calculation of proportional gain is slightly more complicated. You can try to use trial and error to determine a value that seems to work. If the gain is too low, the response of the hydraulic cylinder will be very slow. If the gain is too high, the actuator may oscillate. However, the optimal gain can be calculated:

Kp = 2? Ζ? ωn? (9? 8? Ζ2)/(27? K)

Here:

Kp-proportional gain, expressed as a percentage of the ratio of the relative value mm of the input deviation signal change to the relative value of the output signal change,

ζ-damping coefficient (assumed to be 0.3333 when unknown),

K-open loop gain

You may not be able to find the source of the derivation of the proportional gain formula in the textbook. However, hydraulic system design engineers actually know how to control the optimal proportional gain because they must determine the damping coefficient, natural frequency, and open loop gain. Generally, the natural frequency is calculated based on the bulk elastic modulus of the oil, the area of ​​the hydraulic cylinder, the amount of oil compression, and the mass. Because the tracking error depends on the open loop gain and proportional gain, the hydraulic designer must control the tracking error.

3. The simulation shows the benefits of adding a simple target generator. It should be noted that the control output is not saturated, and the actual position movement is smoother. The speed reaches the desired value of 250mm/s (100mm/0.4s). The acceleration is much smaller. The speed ratio is very different from the first and third simulations.

Other thoughts on proportional control

If the control system has been set up and started a short-stroke movement, it seems normal to work. Attempting to exercise a little longer distance, the two exercises consume almost the same amount of time. The reason is that as the error decreases, the control output also decreases, so the speed will be greatly reduced. For the actual position, if the reduced error is less than 1% of the original error, it will consume 5 times the time constant.

The time constant is the time it takes for the control object to reduce 63% of its errors. Therefore, if the error rises rapidly by 10mm and the time constant is 1s, the error will drop to 3.68mm after 1s. After 2s, the error will drop to 1.35mm. After 5 times the time constant (5s), the error will be reduced to 0.067mm-less than 1% of the original error of 10mm. The time constant determines how much time the control system will take to respond to system disturbances.

The question now is, for a hydraulic cylinder that only uses proportional gain, how to calculate its time constant? The company is not difficult:

τ is the optimal time constant.

τ = 3/(2? ζ? ωn)

If the damping is 0.33333 and the natural frequency is 10Hz, the time constant is:

τ = 3/(2? 0.333? 2? π? 10) = 0.072 s.

Because it consumes 5 times the time constant to reduce the error to 1%, the movement process will take 0.358s.

It should be noted again that the optimal time constant is completely determined by the mechanical (hydraulic) designer. If the time of 5 times the time constant is too long, hydraulic system designers need to consider increasing the natural frequency, or increasing the damping by increasing friction. Increase friction wastes energy. Increasing the natural frequency requires increasing the cylinder diameter of the hydraulic cylinder, and will also increase the valve diameter, accumulator volume, pump capacity and increased component cost.

It seems much easier to adopt a simple proportional control hydraulic system with PLC, but PLC programmers do not control many important parameters. This constraint is not a problem of the programmer’s ability, but a hydraulic and mechanical design. Unfortunately, the PLC programmer is usually the last person to come into contact with the hydraulic system. He is hoped that “mechanical and hydraulic problems can be solved by electrical and software.” However, this fact does not always happen. The characteristic behavior of the system has been qualitative in the design and manufacturing stages.

The performance of the equipment can be improved by using a sophisticated hydraulic servo control system. The initial cost will be high, but its performance is also improved. The equipment has also become easier to maintain, and the frequency of maintenance required is not high.

The following are three simulations of simple motions using only proportional control. They are based on standard linearized motion simulation modules for servo hydraulic cylinders and loads.

H(s) = (K? Ω2n)/[s ? (s2 + 2 ? ζ ? ωn ? s + ω2n)]

K,- open loop gain, assuming a control output of 10 (mm/s)/%,

s, – Laplacian, is a frequency, radians/s,

ζ-damping coefficient, assumed to be 0.33333, dimensionless,

ωn-natural frequency, radians/s. The natural frequency in the example is 10 Hz.

These simulations pose some questions for you, such as: How to improve response time? These questions will be answered in subsequent discussions.

The Links:   LTM170E8-L02 SKIIP82AHB15T1 AUO LCD