I draw a hydraulic circuit and I want to control the position of the hydraulic cylinder to move the load and i must use a PID controller with a proportional directional control valve.
Is there a model of the plant (i.e., the hydraulic cylinder) or do you want to control the process via some model-free approaches?
In the case of a model-free scheme, you can utilize some empirical PID tunning techniques (e.g., Ziegler–Nichols method) to obtain your PID gains. If your plant is open-loop stable with a large phase margin, a PI might be sufficient.
You can try to model the input-output dynamics of a cylinder as a second-order transfer fuction. wn/(s2 +2cw+wn2). There is a mathematical formula for calculating the natural frequency ( wn)of your hydraulic cylinder. Then get a PID to control that transfer function.
It is also possible to do this empirically by measuring input-output data of the cylinder you wish to control and then use the system identification toolbox to identify the system (cylinder's) parameter. You can then tune your PID to control the system that you generated.