Design and Optimization of a Novel Hydro Cylinder Displacement Sensor

: In recent years, the coal mine intelligent development process has constantly advanced, putting forward higher requirements for monitoring mining equipment data. Sensor technology suitable for the special underground environment has also been developing. Hydraulic support is a key piece of equipment in fully mechanized coal mining. Monitoring the hydraulic support position and attitude has been an important part of coal mine intelligent development. In the present paper, a new oil cylinder displacement sensor was proposed. The oil cylinder translational motion was transformed into the magnet rotary motion via the motion conversion mechanism. The magnet angle was calculated by utilizing the single-chip microcomputer, and the oil cylinder expansion and contraction were calculated via the filtering algorithm. Results showed that the sensor accuracy could reach 0.5 mm.


Introduction
The existing cylinder travel sensor can be divided into the built-in cylinder and the external cylinder travel sensors.
Much research exists considering the external type displacement sensor. According to the principle, the external displacement sensor can be divided into the optical sensor [1][2][3], hall sensor [4,5], and eddy current sensor [6][7][8]. Optic displacement sensors have the advantages of high accuracy and fine resolution, but they are expensive and sensitive to dust and vibration [9]. A hall sensor is relatively less expensive, and it is not as sensitive to dust and oil pollution as an optic sensor, so the hall sensor has been applied thoroughly in the scene with low precision requirements [5,10,11]. Furthermore, the eddy sensor is a non-contact 2 linearization measuring tool that can accurately measure the static and dynamic relative displacement changes between the measured body and the probe end face [7]. However, the coal mine environment is complex and involves many kinds of equipment. These external sensors are easily damaged when utilized underground [12,13].
The current market share of the oil cylinder travel sensor in the underground coal mine, subject to service conditions, is the displacement sensor [14][15][16], which utilizes the magnetostrictive principle to generate a strain pulse signal through the intersection of two different magnetic fields to accurately measure their positions.
It adopts the non-contact measurement method because the measuring magnetic ring and the sensor have no direct contact, friction, or wear, thereby permitting on the ground long service life, strong environmental adaptability, high reliability, and good safety, which are convenient for the system automation work. However, the complicated downhole environment means that the hydraulic support cannot keep parallel with the moving axis of the sensor in the moving process, and the production process of domestic manufacturers is limited, resulting in the low reliability of the magnetostrictive sensor in the actual use process, as well as the service life not be guaranteed.
In the present paper, a new displacement sensor was proposed to measure the oil cylinder telescopic stroke. The proposed sensor can be fixed with one end of the cylinder, and the rope end is fixed with the cylinder pushrod. The linear motion of the cylinder can be converted into the rotation motion of the output end of the sensor via the sensor motion transformation structure. The cylinder displacement can be calculated by detecting the rotating magnetic field signal at the sensor output. Also, an adaptive Kalman filter algorithm based on particle swarm optimization was proposed to improve the sensor precision.
The present paper was organized as follows: in Section 2, the measurement principle was presented, including the mechanical structure and the data acquisition circuit of the proposed sensor; in Section 3, the method of displacement calculation was introduced and an adaptive Kalman filtering was proposed to improve sensor accuracy; in Section 4, the sensor and the algorithm performances were tested via real experiments. Finally, Section 5 concluded with the findings of the present paper. Figure 2 shows a schematic illustration of the proposed displacement sensor. As shown, the motion conversion part was comprised of three fixed pulleys, a rotating wheel, a shaft, a bevel gear, and a worm. When the hydro cylinder was extending and contracting, it pulled the string to move along a straight line, and one end of the string was fixed with the hydro cylinder piston. The string movement was converted into rotation via the fixed pulley block and rotating wheel, and it was output via the shaft. The signal conversion part was comprised of the bevel gear, worm, NdFeB magnet, and signal processer. The bevel gear and worm connected with the magnet to drive the magnet to rotate and produce a rotating magnetic field, which was detected by the signal processer and transferred into a voltage signal for the hydro cylinder control system.

Method of Absolute Displacement Calculation Base on CORDIC
The Coordinate Rotation Digital Computer (CORDIC) algorithm was the coordinate digital rotation algorithm, which was an angle calculation method. The CORDIC algorithm included three rotating coordinate systems: circular, linear, and hyperbolic. Under each coordinate system, two working modes existed: rotation and vector. The CORDIC method core was to decompose into n decreasing rotation angles and add them.  Figure 6 shows that if [x(i),y(i)] rotated the angle θi counterclockwise to obtain [xp(i+1),yp(i+1)], suppose: where l was the vector module length and φ was the vector rotation angle value.
The relationship between the vector coordinates before and after rotation was: The formula of [x(i+1),y(i+1)] could be obtained by adding a gain of after each rotation: After multiple iterations utilizing the CORDIC algorithm, the initial vector The CORDIC algorithm was applied to the magnet rotation angle calculation, the initial vector V0 was rotated a preset number of times, the angle value of each rotation process was calculated, and the current angle value of the magnet could be obtained via superposition.
The vector z was introduced to record the rotated angle value, and si was utilized as the rotation direction parameter. After m rotations, if ym was greater than zero, it meant that the vector Vm was above the x-axis, and sm was marked as -1, which meant that m+1 rotations were needed to follow the clockwise direction and angle; on the contrary, if ym was less than zero, meaning that the vector Vm was below the x-axis, and sm was marked as 1, which meant that m+1 rotations needed to be counterclockwise,   Figure 2 shows that the two rotating magnetic fields were connected to the rotating wheel output shaft through a bevel gear and a worm gear. The bevel gear transmission ratio was 1:1, and the transmission ratio of the worm gear was 10:1.
The CORDIC algorithm could be utilized to obtain the rotation angle of the two output shafts, and the displacement could be calculated via the following formula: where d was the rope length calculated via the sensor， was the magnet rotation angle attached to the bevel gear， was the rotation angle of the magnet fixed to the worm gear，r was the rotating wheel radius, and 0 was the initial state of the sensor.

Adaptive Kalman Filtering Based on Particle Swarm Optimization
Due to the presence of other interferences such as white noise, the position directly calculated via CORDIC was not accurate. An adaptive Kalman filter method was proposed to filter the calculation results.
A Kalman filter consisted of a prediction module and an error correction module.
For a linear discrete system, the state space equation could be described as [18]: (12) where Ak was the state transfer matrix, Bk was the input matrix, Ck was the observe matrix, uk was the measurement noise sequence, and xk+1 was the real-time system state estimate.
For the displacement sensor system, assuming that the change value of the displacement with time has the first and second reciprocal, which each repre-   Based on the above analysis, the Kalman filter was started from the initialization step [19]: 10 00 () E = xx (15) (16) Then the prediction process was conducted: (18) The following step was the error correction process: x v x (20) ,1( The position of the sensor could be estimated via the above method. However, these ideal assumptions could not be satisfied due to various reasons. By following the principle of the current optimal particle, the particle i X would change its speed and position via the following formula [20]: where t was the number of iterations, c1 and c2 each represented the local accelerated constant and global accelerated constant, and r1 and r2 random numbers evenly distributed between 0 and 1.

11
Exploration meant that the particles leave the original optimization trajectory to a greater extent and entered a new direction to search; exploitation meant that particles continue the original optimization trajectory to a greater extent for detailed search. To better control the exploration and exploitation capabilities of the algorithm, an inertial weight w was introduced [21]: where max T was the maximum number of iterations, ini w was the initial inertia weight, and end w was the inertia weight in the maximum number of iterations. Utilizing linearly decreasing weight could expend the search space so that the global and local search capabilities of the algorithm could be adjusted for different search problems.
According to the above principles, when the displacement sensor works, the rotating magnetic field was obtained via the displacement detected module and transferred into the displacement of the object via the CORDIC algorithm.
With the proposed adaptive Kalman filtering algorithm, the displacement and speed were updated in real-time and the measurement noise was filtered.

Initialization of iwPSO
The size of swam, the dimension of the problem: S N The local and global accelerated constant: C1 C2 The number of iterations: G The minimum and maximum inertia weight: W The boundary of particle swarm: (LBx,UBx) (LBv,UBv) Discrete state equations of displacement sensor The fitness function

Displacement(k)
Output Velocity(k)  Figure 9 shows the schematic diagram of the test bench. It consisted of four parts:

Experiments Configuration
1. The sensor and the linear module. The linear module consisted of a motor (Panasonic A6 AC servo motor), a photoelectric encoder (23 bit), a motor driver. The sensor was fixed on 13 one end of the linear module, and the pull rope was fixed on the sliding platform of the linear module.
2. The power source (CHROMA 6205L, 60V-6A) and voltmeter (KEYSIGHT, 34465A). The power source supplies power for the sensor, the data transmission, and the linear module.
3. The data transmission module. The data transmission module generated the signal to control the motor and acquire the sensor data and transmit it to the data processer.
4. The signal and data processing tool, MATLAB R2019b unit in a host computer.

Conclusions
The

Conflicts of Interest:
The authors declare no conflict of interest.