Closed Loop Hydraulic Actuatormodelforrealtimesimulationwith PIDPart 2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 29

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/364385038

Closed Loop Hydraulic Actuator model for real time simulation with PID Part 2
+ PID Auto tuning + PID manual Tuning

Preprint · October 2022

CITATIONS READS
0 63

1 author:

Kamlesh Chaudhari
Lineomatic
30 PUBLICATIONS   9 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Grouping and ungrouping Application View project

Pick and Place Application View project

All content following this page was uploaded by Kamlesh Chaudhari on 20 October 2022.

The user has requested enhancement of the downloaded file.


Closed Loop Hydraulic Actuator model for real time simulation with PID Part
2 + PID Auto tuning + PID manual Tuning

Before going to discuss above model first we will understand basic function of PID

 For example, think about your heating system in your home. We want the room to be at
25°C. So, we give our system 25°C as the setpoint or input, and the system tries to regulate
the process variable or output to have a value as close to 25°C as possible.
1. Proportional control
It is really very simple in operation what happens in the controller box. The PV is
subtracted from the SP to create the Error. The error is simply multiplied by one, two or all
the calculated P, I and D actions (depending which ones are turned on). Then the resulting
“error xx control actions” are added together and sent to the controller output.
These 3 modes are used in different combinations:

P – Sometimes used

PI – Most often used

PID – Sometimes used

PD – rare but can be useful for controlling servo motors.

2. Integral control

The integral of a signal is the sum of all the instantaneous values that the signal has been,
from whenever you started counting until you stop counting.

So, if you are to plot your signal on a trend and your signal is sampled every second, and
let’s say you are measuring temperature. If you were to superimpose the integral of the
signal over the first 5 seconds – it would look like this:

The green line is your temperature, the red circles are where your control system has
sampled the temperature and the blue area is the integral of the temperature signal. It is the
sum of the 5 temperature values over the time period that you are interested in. In
numerical terms it is the sum of the areas of each of the blue rectangles:

(13 x 1)+(14 x 1)+(13 x 1)+(12 x 1)+(11 x 1) = 63 °C s

The curious units (degrees Celsius x seconds) are because we have to multiply a
temperature by a time – but the units aren’t important.

The integral turns out to be the area under the curve. When we have real world systems,
we actually get an approximation to the area under the curve, which as you can see from
the diagram gets better, the faster we sample.
In Integral Only mode, the controller simply multiplies the integral of the error
(accumulation of error or area under the error curve) by the Integral Gain (Ki) to get the
controller output.

3. Derivative control

Derivative is just a mathematical term meaning rate-of-change.

In Derivative Only mode, the controller simply multiplies the rate of change of the error at
that instance (slope of the error curve) by the Derivative Gain (Kd) to get the controller
output.

A tricky thing about PID controllers is that to tune Kp, Ki and Kd to suitable values to have a
good controller. The other thing is to use correct components of P, I and D according to
your application or system.

Why derivative is important

But let’s say the process in your case is a tank of liquid product that you’re trying to heat. If
the process variable (temperature) goes above the setpoint, the product may be ruined or
catch on fire. So, how do you get the process variable to move, but not overshoot the
setpoint excessively? One answer is introducing a derivative factor.
Derivative acts as a brake or dampener on the control effort. The more the controller tries to
change the value, the more it counteracts the effort. In our example, the variable rises in
response to the setpoint change, but not as violently. As it approaches the setpoint, it settles
in nicely with a minimum of overshoot. It doesn’t move as quickly as the PI-only effort, but
without the oscillations, the right amount of derivative action can stabilize the process
variable at the setpoint sooner
The proportional term looks at where my value is currently. Integral looks at where I’ve been
over time, and the derivative tries to predict where I’m going. Derivative tries to work
opposite of where proportional and integral are trying to drive the process. P and I are trying
to drive one way, and D is trying to counteract that. Derivative has its largest effect when the
process is changing rapidly in one direction. The P and I terms are saying, ‘Keep going.’ The
derivative catches it and says, ‘You’re going too fast. You need to slow down.’”

“If you have a system like a really slow temperature loop, users tend to put a lot of
derivatives in there because they don’t like the overshoot,” 
 Large derivative action tends to destabilize a loop because it doesn’t allow it to change. The
rule of thumb is that if your derivative time is greater than the reset time of your controller
Ultimately, the use of derivative action can be beneficial, but it has to be used in the right
situations and in the right amounts.

PID Auto tuning Function


Auto tuning value is always not correct but yes you will get the idea in which direction you
have to go to get best result

EXAMPLE 1
See the value is sudden change for 0 to 1
In black colour is PID default parameter and red colour is PID tune parameter

Result shows us do not use KP because otherwise system become unstable


Use integral time to get result
If I increase KP value

See the result


Auto tuning function is also important we if in system this function is not available then you can get
your desired result by manual tuning
PID Manual tuning Function
This is a group of commands we are going to PID. Below is PID Default Parameter

Below value is PID default value


Now see the result

So depend on load it not perform result as you need

Now I am going to change the manual.


I set KP value is 10 and see the result

all above query or question we are going to solve using this model

Closed Loop Hydraulic Actuator model for real time simulation


The Actuator consists of a proportional 4-way directional valve driving a double-acting
hydraulic cylinder. The cylinder drives a load consisting of a mass, viscous and Coulomb
friction, constant force, and a spring. The actuator is powered by a variable-displacement,
pressure-compensated pump, driven by a constant velocity motor. Pipelines between the
valve, cylinder, pump, and the tank are simulated with the hydraulic Pipeline blocks
Abstract variants of the Hydraulic cylinder and of the valve and pump unit are also included
in the model. The model can be configured to use these abstract variants, which neglect
effects such as compressibility and use simpler equations that are numerically more
efficient. The model can also be configured for simulation with a fixed-step solver, as would
be used in hardware-in-the-loop testing.

Input
See in the below graphs input is continuously changing
The input command goes to SUM. the output of sum goes to PID

Pid output is goes to proportional valve


Proportional valve output is going to valve unit
Valve to cylinder
When KP=1, TI=1 , KD=0 then see the result

See the above result blue line is command and yellow line is Measured value

Now we are going to change some process parameters and see what will happen
I changed some parameter Like pipe internal diameter from 0.02 to 0.08, friction from 64 to 200

Pipe length form 2 m to 6m and Pipe wall type from rigid wall to flexible wall

Now see the result


The system is overshoot and unstable if auto tune facility is not available then see in the trace you
will get idea because of friction is increase and pipe diameter is change so at every set point system
is overshoot

As we discussed above Why derivative is important If you haven't read it carefully, read it
again.

Process is running
See the result

One more thing to reduce the overshoot you can increase then KD blindly

For example
If I increase KD 2 to 10 then what will happened

Its trying to reduce overshoot square box but see the different between SP and actual value by
arrow

But if you want to improve result then increase filter coefficient value from 200 to 500

And see the result


Second example

Now we changed double acting hydraulic cylinder parameter in same PID value

Change is piston are from 0.004 to 0.02 and piston stroke is from 0.1 to 1 now see the result
See there is no overshoot, but command and measured value is different in some case if you
change the PID value and do not get result then keep in mind because of mechanical
parameter is drastically changed so every time PID cannot compensate it in this case you
have to resize your mechanical system

Now see I changed only one mechanical parameter

Piston is from 0.02 to 0.01.

With the same of PID Parameter


See the result

Conclusion

Hope you understand PID and its function. because after this we are going to
discuss various applications using PID. If you have any questions then drop me
a message in the comment box.

Tension control system using PID


View publication stats

You might also like