Relative Position and Posture Detection of Hydraulic Support Based on Particle Swarm Optimization

The position and posture of the hydraulic support seriously affect the efficiency of coal mining and the safety of coal production. However, most of the current detection technologies have poor reliability, and the detection methods are difficult to adapt to the complex environment of coal mines. To effectively monitor the hydraulic support, and thereby improve the efficiency of coal mining, we propose a new method to detect the relative position and posture of the hydraulic support. The method is based on the mathematical idea that three points can determine a plane. Firstly, we use angle sensors and displacement sensors to build the detection device, use STM32 microprocessor to collect data, and realize real-time display of the data on the PC. Then, we conduct a single point detection experiment and a plane moving experiment, and combined the particle swarm optimization (PSO) algorithm to optimize the data. Experiment results show that the relative error of the single-point detection can reach 0.53%. Thirdly, we carry out a detection experiment of three points on the plane. Experiment results show that the detection accuracy of the two planes can reach 0.2°. Finally, to test the monitoring effect of the detection device on the hydraulic support, we carry out the relative position and posture detection experiment of the canopy. The experiment results show that the device can effectively detect the posture change of the canopy when the hydraulic support are moving. The method we use is contact measurement, which has high reliability and strong stability. The research on the relative position and posture detection of hydraulic support provides a reliable method to monitor the support working status. It lays the foundation for the intelligent control of the mining working face straightness and the perception of the support posture.


I. INTRODUCTION A. BACKGROUND
The intelligentization of coal equipment and the digitization of mines are inevitable trends in the development of coal mining technology [1]. With the development of unmanned technology in the fully mechanized coal mining face, the research The associate editor coordinating the review of this manuscript and approving it for publication was Wuliang Yin . and development of intelligent mining equipment and the comprehensive advancement of intelligent mining are important directions for achieving the goal of reducing coal miners and improving efficiency. The relative position and posture detection technology of hydraulic support is one of the important technologies of intelligent mining. Hydraulic support is the key supporting equipment for fully mechanized coal mining face. The straightness of the hydraulic support group and the posture of hydraulic support are important parameters VOLUME 8, 2020 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ for mining working face. The coal mining efficiency is determined by the working performance of the hydraulic support and the automation level of mining working face straightening. Besides, the geological conditions of large inclination, thick and extra-thick coal seams are complex, supporting is difficult, and the support stability of hydraulic supports is critical [2]. The real-time posture of each hydraulic support can not only reflect the straightness of the hydraulic support group, but also reflect the status of the roof and floor of mining working face. The relative position and posture detection of hydraulic support is of great significance to the roof control [3] and load capacity analysis [4]. During coal mining, hydraulic supports are arranged side by side to support a working space for the shearer and scraper conveyor. The scraper conveyor is arranged at the front of the hydraulic support. The three-machine matching model for fully mechanized mining face is shown in Fig. 1. The middle chute of the scraper conveyor is hinged with the pushing cylinder at the bottom of the hydraulic support. The shearer is located above the scraper, and the scraper is used as the track to complete coal cutting. At present, the length of the fully mechanized coal mining face in China is generally 120m-300m. During coal mining, to achieve the overall advancement of mining working face, the pushing cylinder at the bottom of the hydraulic support pushes the scraper conveyor forward, then the pushing cylinder pulls the support itself to follow forward. Ideally, all hydraulic supports should be distributed in a straight line on mining working face after the hydraulic support moving, the position and posture of each hydraulic support are close to the same to ensure the normal operation of the scraper conveyor and the shearer. Due to the complex working environment underground, the influence of the low precision of the lifting control of the column and the large movement error during the support work, the relative tilt, torsion, and pitch would occur between the hydraulic supports. The relationship between position and posture of hydraulic support is called the relative position and posture. When the position and posture of the hydraulic support deviate from the desired state, the hydraulic support group will no longer maintain vertical distribution, which may cause the arrangement of the hydraulic support and the scraper to deviate from the ideal position. When the mining working face no longer maintains straightness, it will affect the normal operation of the shearer [5].
The hydraulic support is mainly composed of a canopy, balance jack, shield beam, connecting rod, base, pushing cylinder, and column. Because there are multiple motion actuators in hydraulic support, its position and posture will change when supporting [6]. Therefore, it is necessary to detect the relative position and posture of canopy and base separately, or use only the parameters of the hydraulic support column and balance cylinder to calculate the position and posture, then detect the relative position and posture of hydraulic support. The detection system provides a more accurate and reliable method to detect the straightness of hydraulic support. Our research provides a basis for the prevention of hydraulic support instability and collapse under complex geological conditions of large dip angle and large mining, for promoting the development of unmanned and automated mining of complex coal seams, and for the intelligent sensing of hydraulic support and integrated mining working face.
The relative position and posture detection system can provide detection data to analyze the straightness of mining working face and the instability of hydraulic support. It provides a platform for the intelligent control of hydraulic support.

B. RELATED WORKS
In long-wall mining, hydraulic support plays an important role in roof support and mining working face advancement. Since the shearer needs to use scraper conveyor as the track, to ensure the normal walking of the shearer, the speed of the roof support must be consistent with the advancing speed of mining working face, while requiring mining working face to maintain straight [7]. In the early stage, the manual correction was used to solve the bending problem of fully mechanized mining face. The manual method is: someone straightens a rope at both ends of mining working face as a reference, then manually measures the distance between each hydraulic support and the reference with a ruler to determine the bending degree. According to the bending situation, the position of support is manually adjusted to correct. The disadvantages of the above methods are low measurement efficiency, large human influence factors, and difficulty in use due to special terrain.
With the development of mining machinery automation, we have realized the automation of hydraulic support and remote control of hydraulic support. To solve the problems of manual straightening and bending of mining working face, the straightness detection of fully mechanized mining face has become an indispensable key technology [8]. There are two main methods to detect the straightness of fully mechanized coal mining face. One of them is to control the straightness of mining working face by detecting and controlling the straightness of the scraper. In 2017, Hao and Wang et al. constructed the track geometry measurement model of the scraper conveyor according to the position of the shearer. They measured the straightness of the scraper conveyor using an inertial measurement unit and an axial encoder, and tested it using a longwall mining face model [9]. Another method of straightness detection is based on the straightness detection of hydraulic support. In 2017, Wang et al. proposed a random circle detection (RCD) algorithm and fruit fly optimization algorithm (FOA) to solve the problem of inaccurate and unreliable measurement of hydraulic support [10]. This method is based on the machine vision ranging technology and has achieved good measurement results in the experiment. However, the real working environment in underground mines is harsh and dusty, so it is difficult to use machine vision. In 2019, Yang et al. proposed the use of Lidar to measure the position of hydraulic support relative to an inspection robot [11]. They deduced the calculation formula of the relative position and posture of the six-degree-of-freedom hydraulic support, and verified the feasibility through experiments. Their work provided a theoretical basis and engineering reference for the automatic measurement of the hydraulic support position. However, Lidar is also not suitable for the dusty environment underground.
The position and posture detection of the hydraulic support not only lays the foundation for the straightness control of mining working face, but also has important significance in the judgment of the support state and stability analysis of the support. In 2015, Yuan et al. analyzed the mechanism and control method of hydraulic support instability in the working face [12]. In 2016, Zhao researched the theory of complex image acquisition and processing based on visual measurement technology, and proposed the scheme and theory of visual measurement of working face [13]. In 2018, Zeng et al. [14] studied the movement trend, position and posture, mechanical response of hydraulic support canopy and shield beam under impact load, analyzed change trends under different impact conditions through simulation calculation. The results of the research can show that the detection of posture and stress of the key position has important value for the stability control of the hydraulic support.
In the prior art, the hydraulic support monitoring system can collect on-site data by sensors, transfer, and share the support data. Such detection systems mostly monitor the pressure of the cylinder, the displacement, and the posture of the hydraulic support. Its main goal is to support control and support stability analysis. In 2018, Meng et al. established the mathematical model of the bearing capacity area of the hydraulic support under various load conditions [15]. They analyzed the main factors of the hydraulic support failure and proposed the optimization method of the support structure. The research laid the theory for the analysis of the support posture and the anti-stability basis. In 2018, Meng et al. proposed a method for accurately monitoring and controlling the posture of hydraulic supports [16]. A posture controller was developed based on electromechanical-hydraulic coordination technology, and a mathematical model for posture monitoring and control was proposed. A teaching-based optimization algorithm was simulated by multi-software co-simulation to prove the effectiveness of the method. The co-simulation platform provides an important reference for the virtual monitoring technology of hydraulic supports.
In 2019, Xie et al. proposed a posture sensing method for the hydraulic support group in a virtual reality environment [17]. They installed tilt sensors on base, front or rear links, or canopy to obtain data, and determined the working state of hydraulic support by comparing the predicted data and actual data. In 2019, Zhang, and Wang et al. proposed a visual measurement method for detecting the position of hydraulic support. They installed an explosion-proof camera on the hydraulic support and collected images through a visual algorithm to obtain the position and posture of the hydraulic support [18]. In 2019, Liang et al. theoretically established the structure of the posture monitoring system of the two-column shield hydraulic support [19]. At the same time, an optical fiber grating tilt sensor and posture monitoring program for the hydraulic support were designed and proposed, and an error compensation method for tilt detection was presented. Finally, through the test of the FBG tilt sensor, the reliability of the hydraulic support monitoring system based on optical fiber sensing technology was analyzed, and the dynamic state of the hydraulic support posture during the production of the working face was realized. This research has a complete mathematical theoretical analysis, sensor signal acquisition, and online monitoring system. Good results have been achieved in the experimental stage. However, this detection method realizes the detection of a single hydraulic support posture without measuring and monitoring the relative posture between the hydraulic supports. In 2020, Ge et al. proposed and verified the virtual adjustment method of the hydraulic support posture in the advancing state [20]. This method provides reference and application for realizing the adaptive adjustment of the hydraulic support to the surrounding rock environment.
In 2020, Yang et al. proposed a new concept of multi-dimensional RSS feature fuzzy mapping and clustering for AP optimization in Wi-Fi indoor positioning [21]. Compared with the existing positioning methods, this method can achieve higher positioning accuracy through optimized APs, and can reduce the positioning overhead in the online phase. In 2020, Yang et al. proposed a deviceless human activity recognition system with a time-frequency attention mechanism, which can be deployed on commercial Wi-Fi devices to recognize human daily activities [22]. In the complex environment of coal mines, the direct contact measurement method has higher reliability. These researches on positioning technology provide a good idea for us to further improve the relative position and posture detection technology of hydraulic supports.
When solving the position and posture of the hydraulic support, we would inevitably encounter nonlinear equations. At present, there are many ways to solve and optimize nonlinear equations, and the particle swarm optimization (PSO) algorithm is a common method. In 2009, Zhan et al.
proposed an adaptive particle swarm optimization algorithm (APSO) [23]. The search efficiency of this algorithm is higher than the classical particle swarm optimization (PSO), and it can perform a global search in the entire search space with a faster convergence speed. In 2012, Martins et al. proposed a simplified version of the particle swarm optimization (PSO) algorithm [24]. The proposed algorithm can save a considerable amount of calculation and obtain considerable performance in the optimization of nonlinear functions. In this way, the position and posture of the hydraulic support can be solved more accurately and conveniently.

C. EXPERIMENTAL METHOD
Combining the structural characteristics of hydraulic support, based on the mathematical idea that three points can determine a plane, we proposed a relative position and posture detection method and established a mathematical model. We carried out an accurate mathematical expression of the relative position and posture of the hydraulic support, combined with intelligent algorithms to improve the detection accuracy, to realize the position and posture analysis of the hydraulic support. We can detect the relative position and posture of any two adjacent hydraulic supports through relative position and posture detection technology, that is, the detection of six degrees of freedom in space. We can realize the autonomous perception, adjustment, and control of the straightness of the working face from a higher dimension.
The detection system can provide detection data to analyze mining working face straightness and the instability of the support, provide a platform for the intelligent control of hydraulic support. It is the basic work of the hydraulic support intelligent perception and the support group intelligent control. The device has a wide range of applications, can be well adapted to other application scenarios of relative position and posture detection, and has a large expansion space in theoretical and practical applications.

D. ORGANIZATION OF THIS PAPER
The rest of the paper is organized as follows: In Section 2, we describe the principle of detecting the test point of the hydraulic support canopy, and verify the accuracy of the mathematical model through SIMULINK. In Section 3, we optimize the solution of the coordinates of the points to be measured on the hydraulic support canopy based on the particle swarm optimization algorithm, determine the accuracy of the detection device through experiments. In Section 4, we propose a solution method for the position and posture parameters of the hydraulic support canopy based on three-point coordinate detection. In Section 5, based on the particle swarm optimization algorithm and the support canopy posture solution method, we design the hydraulic support canopy relative posture detection experiment, and test the detection device, data calculation and display system.

II. DETECTION METHOD OF THE TEST POINT ON THE HYDRAULIC SUPPORT CANOPY A. PRINCIPLE OF SPACE SINGLE POINT COORDINATE DETECTION
The key of relative position and posture detection method is how to obtain the coordinates of point P, point A, and point B in the coordinate system o-xyz [25]. There are many methods to obtain the coordinate of the point. Still, considering the harsh working environment of the hydraulic support underground, we propose a detection method based on the combination of direction angle and vector length to obtain the point coordinates. For ease to describe, θ is defined as the declination around the x-axis. The positive or negative of this angle is defined as follows: in the plane y-o-z, the y-axis turns to the vector projection line, counterclockwise rotation is positive, clockwise rotation is negative. Define ϕ as the angle of deflection around z-axis, which is defined as the angle of view in the direction of reduction of the z-axis, within the plane x-o-y, turning from the y-axis to this vector projection line, turning counterclockwise as positive and clockwise as negative.
According to the analysis, the direction of − → OP can be uniquely determined by θ and ϕ, if the module length l of 200792 VOLUME 8, 2020 − → OP is known, the coordinate of point P can be determined by θ, ϕ, l. The methodology is as follows: Plane detection schematic is as shown in Fig. 3. To simplify the problem, we determine the unit vector − − → OP 0 of − → OP. Point P 0 is located on a circle, the circle's centroid coordinates are the radius is r = 1, the plane's outer normal vector is The method to solve this circle is as follows.
There are two vectors The equation of the circle is as follows.
where: (x 1 , y 1 , z 1 ) is the coordinate of the point on the circle, t 1 is the parameter of the circular equation, the value range of t 1 is (0, π).
The unit vector end of − → OP is located at the center of the circle coordinate 0 0 0 T ; the radius is r = 1, where the plane of the outer normal vector Similarly, there is a set of orthogonal vectors   whose endpoints are located on the circle, and the parametric equation for the circle can be derived as follows: t 2 is a parameter of the circular equation; the value range of t 2 is (0, π). Two curves in space have only one intersection point, and we can uniquely determine point P 0 in space. We define the corresponding coordinate value of (1) and (2) is equal, and we can get the equations about t 1 and t 2 . Substitute t 1 for (1) to get the coordinates of the intersection P 0 , if − → OP module length |OP| = l is given at the same time, the coordinate of point P can be expressed as follows.

B. METHOD TO OBTAIN THE THREE-POINT COORDINATES OF THE HYDRAULIC SUPPORT CANOPY TO BE MEASURED
According to the principle described above, the coordinates of any point in space can be obtained. We repeat the above method three times, give a different value of θ and ϕ each time, we can obtain the coordinates of three points and three points determine a plane. Combined with Fig. 3, the detection principle of three points on the plane is briefly described as follows: there are two relative motion planes S 0 and S 1 in space. First, the coordinate system o-xyz is established on the reference plane S 0 , three fixed points P, A, B are selected on the plane S 1 to be tested, respectively measured with the vector − → OP, − → OA, − → OB corresponding to the three variables θ, ϕ, and l, so that according to the above method to calculate the coordinates of point P, point A, point B. According to the coordinates of three points, we can determine position parameters of the motion plane S 1 in the coordinate system. We can determine the relative position of two moving objects in space.
In practice, we have designed a direction angle detection device to detect θ and ϕ. Limited by the structure of the directional angle detection device, a directional angle detection device cannot simultaneously measure three different directional vectors at the same point. It is necessary to use three sets of detection devices to measure three points at the same time, and the 3 sets of sensors cannot be arranged at point O. The actual sites in the detection devices are arranged in point o 1 , point o 2 and point o 3 . The three-point coordinates obtained by repeating the above method are not in the same coordinate system o-xyz, so a coordinate transformation VOLUME 8, 2020 formula needs to be introduced to transform the three-point coordinates to determine the plane to be measured.
We define three single-point coordinate systems as where there are position and angle correspondences between the single-point coordinate system and the reference coordinate system o-xyz. Specifically, the position of a single-point coordinate system in the reference coordinate system o-xyz is determined by the mounting position of the detection device in the reference plane, and the angular relationship with the reference coordinate system is determined by the direction of arrangement of the angle sensor. The coordinate of each point is established under the respective coordinate system with o 1 , o 2 , o 3 as the origin. It is necessary to convert the actual measured coordinates to the fixed coordinate according to the position relationship.

C. SIMULINK SIMULATION OF THE MATHEMATICAL MODEL FOR POSITION AND POSTURE DETECTION
To verify the correctness of the mathematical model, we need to simulate the model using simulation software. We used SIMULINK in MATLAB to complete the simulation. Concerning robotics-related theories, the simulation was divided into two parts, the forward and the inverse solution. The forward solution is to output the moving point coordinates through the simulation model using the length of the pulling rope and the angle of the two direction angles as input variables. The inverse solution is the trajectory of motion for a given moving point, and the length and angle of the drawstring are output from the above model. SIMULINK model of single point forward solution is shown in Fig. 4. A sinusoidal signal with an amplitude of 25 was entered for θ, and the θ fluctuated from 25 • to −25 • . Simultaneously, we input a ramp signal with The simulation result image of forward solution is shown in Fig. 5. Fig. 5 (a) shows the input signal, θ varies with a sinusoidal law and ϕ increases linearly, indicating that the input signal is accurate. Fig. 5 (b)-(e) reveals that the model plots a continuous trajectory curve in space, which is located on a sphere with a radius of l, consistent with the result that the input variable l is a constant. The z-axis coordinates of the points on the trajectory show the law of decreasing and increasing, the fluctuation is following the sinusoidal law, and the x-axis coordinates of the points are increasing from negative to positive. It can also be found that in the y-o-z projection view, the projection trajectory is closed. According to the rules of motion, after setting the length of the pulling rope to a fixed value, the point in space with a smaller distance from that point to the y-axis axis has a larger y-axis coordinate value. As there are up and down fluctuations in the z-axis, and unidirectional motion in the x-axis, when the two are superimposed, there will be two points with the same z-axis coordinate value and different distances from the y-axis. Points closer to the y-axis have larger y-axis values and conversely smaller y-axis values, resulting in a closed trajectory. After quantitative calculations and analysis, it can be verified that the mathematical model of relative position and posture detection based on directional angle detection is correct and the calculation of spatial point coordinates can be realized in principle. To further verify the accuracy of the model, the inverse solution of the single point position pose is also required.
SIMULINK model of single point inverse solution is shown in Fig. 6. The inverse model building process is similar to the positive model, but its structure is relatively simple. The primary purpose of the disposition inversion calculation is to obtain the limiting angular parameters of the sensor. First, we enter the given three-point coordinates, and then calculate the value of θ, ϕ, l through the inverse model.
The input parameters of the simulation are set as follows: keep the z-axis coordinate as 0 and the y-axis coordinate 200794 VOLUME 8, 2020  The simulation is in millimeters (mm), and its result image of the inverse solution is shown in Fig. 7. As the travel of the moving point in the x-axis gradually increases, we obtain a set of curves corresponding θ 1 to θ 8 . Since the x-axis coordinate starts at −400mm, increases and decreases along with the sinusoidal law, the θ value also shows the result of decreasing and increasing from 45 • and finally returning to 45 • . The minimum value of θ decreases as the travel of the x-axis coordinate increases with each test. In the simulation, the point returns to the point (0,400,0) in 5 seconds, the values of θ and ϕ both are 0 • . This result fully confirms the mathematical modeling rules, and the inverse calculation process is accurate.
The inverse calculations can obtain the change process of θ, ϕ, and l in any known trajectory, which is important for the later dynamic analysis of the directional angle detection device. Besides, if the inverse-solution calculation model is combined with the forward-solution calculation model, the error variable is introduced, and the result is modified. Input into the positive-solution model, and then the accuracy of the relative position and posture detection device can be analyzed.
The simulation analysis done in the paper verifies the correctness of the position and posture detection method and detection principle proposed above. It laid a theoretical foundation for us to further establish the position and posture detection device.
In this article, we can only use simulation when verifying the principle. When testing the detection device, simulation VOLUME 8, 2020 methods cannot be used, but experiments can only be performed. And the experimental results are more convincing.
In the following chapters, we will build a position and posture detection device and conduct experiments. Further, we will install the detection device on the test bench and hydraulic support for further experimental verification.

III. ACCURACY TESTING OF RELATIVE POSITION AND POSTURE DETECTION BASED ON PARTICLE SWARM OPTIMIZATION ALGORITHMS A. PSO ALGORITHM FOR THE COORDINATES OF THE POINT TO BE MEASURED
Particle swarm optimization (PSO) is a random optimization method based on swarm intelligence proposed by Poli et al. [26], Kennedy and Eberhart [27]. PSO is a random search algorithm based on group collaboration developed by simulating the foraging behavior of birds. It is a type of swarm intelligence and can be incorporated into a multi-agent optimization system. By simulating the cooperative foraging behavior of bird clusters, each optimization problem is understood as the process of bird clusters searching for food in space. Using the sharing of information by individuals in the group makes the movement of the entire group produce an evolutionary process from disorder to order, and finally obtain the optimal solution of the problem.
PSO relies on a global random search, also called a probabilistic algorithm, which can be used for non-differentiable, nonlinear and multi-peak optimization problems. When solving practical problems, the PSO algorithm regards the solution of the problem as ''particles'' in space, and moves individuals in the group toward a better area through the fitness judgment of the target. This method has a relatively good performance in solving engineering problems [28], [29]. The particle swarm optimization algorithm has simple operation and fast convergence speed, and has been widely used in the fields of function optimization and image processing.
Firstly, we initialize the particle, and then particle i continuously updates itself by tracing two ''optimal values'': one is the ''individual optimal value'' pbest that the particle can get by itself, and the other is the ''global optimal value'' gbest in the whole population, and after finding the two extreme values, the velocity and position are continuously updated through iteration to find the optimal solution.
The iterative equations are shown in (7), (8), respectively, and the equation consists of three parts. The first part is called the particle's previous inertial velocity; the second part is called the cognitive part, and the third part is called the social part. The cognitive part represents the probability that a random reinforcing behavior may occur in the future, as a result of the particle's thinking. The social component represents the probability that the behavior of one particle will be imitated by other particles, and is the result of information sharing and cooperation between particles. v k+1 x k+1 where v k id denotes the velocity of particle i in the d th dimension at the k th iteration; c 1 , c 2 are acceleration constants that regulate the distance the particle flies to the individual optimum and the particle flies to the global optimum; rand k 1 , rand k 2 is random and the value range is [0, 1]; x k id is the position of particle i in the d th dimension at the k th iteration.
The parameters of PSO include: population size PopSize, position limit Xmax, speed limit Vmax, maximum number of iterations MaxIteration, and inertia weight ω.
The population size PopSize represents the number of particles searched by the PSO algorithm. It determines the number of times the objective function needs to be evaluated in each generation. The selection of the population size requires a trade-off between accuracy, stability and running time, and sometimes the dimensionality is also considered. It is necessary to adopt a relatively compromised method when applying the PSO algorithm, and an appropriate population size is usually adopted. The position limit Xmax and the speed limit Vmax have different values for different solution goals and solution ranges. The setting of the value range is conducive to the rapid convergence of the PSO algorithm to the optimal point.
In the PSO model, we should pay attention to two factors of the algorithm, one is the influence of the randomness of the initial value on the result; the other is the convergence of the algorithm and the accuracy of the result. Inertia weight ω, acceleration parameters c 1 and c 2 are three important parameters for PSO, which have a very important impact on the algorithm. The inertial weight ω has a great influence on the exploration and development capabilities of the algorithm. It is generally believed that a larger ω is conducive to the algorithm's global search; a smaller ω is conducive to the algorithm's local development.
We assume that the following formulas hold.
Then (7) and (8) can be rewritten as the following formula.
Then the PSO formula can be expressed as follows.
v k+1 We assume that the following formula holds.
Simplify formula (11). Assuming that, ω k i , φ k 1i , φ k 2i , pbest k , gbest k are all time-invariant constants, the formula (11) is a linear time-invariant system at this time. Formula (11) is rewritten into the equation of a linear time-invariable system as follows: If y k = p − x k is established, then the formula (12) can be rewritten as follows: Suppose z k * = v k y k and A * = ω φ −ω 1 − φ are established, and formula (13) is rewritten as: The characteristic polynomial of equation (14) is as follows.
The demarcation function between stability and instability of the algorithm is ω = φ 2−1; under normal circumstances, φ is a random variable between [0, 4], which makes the particle's motion jump randomly between stable and unstable, so that the algorithm has the ability of global exploration and local development. When the value of ω is relatively large, the probability that the algorithm tends to be stable also increases. Conversely, when the value of the inertia weight is small, the probability of the algorithm becoming stable decreases, and the probability of instability increases. Due to the instability of the algorithm, it is guaranteed that the algorithm has the ability to jump out of the local extreme, so that the population of the algorithm evolves toward the global minimum.
In the standard PSO, since the weights of the global search and the local search are the same, it is easy to make the particles fall into the local optimum in the later stage of the search. In order to make better use of the global exploration capabilities and local development capabilities of particles, many scholars have put forward some improved models after research on the basis of standard PSO.
To improve the detection accuracy while fitting the reference plane using the measurement data, we define the reference coordinates of a single point using the least-squares method. The square of the linear distance between the reference coordinates and the measurement point is the smallest of the square of the single-point reference coordinate fit values satisfying the least squares, and the distance from the reference point (x, y, z) to the measurement point ( The least-squares function is: We use the particle swarm optimization algorithm to solve the minimum value of the least-squares function to obtain the optimal parameter x, y, z, which is the quasi-base coordinate value. We write a program to complete the above algorithm and single-point coordinate solution block diagram, as shown in Fig. 8.
The population parameters of the particle population algorithm in the program are set as follows: Population size PopSize: 50, 20-50 is recommended for general optimization.   Particle dimension D: the dimension of the search space, the program solves for three-dimensional space coordinates Particle range: determined by the initial value of the distribution range and decomposition of the measurement point, where the positive and negative limit values of each dimension of the measured data point are used as the boundary of the particle population.
Maximum velocity V max : the maximum distance a particle can travel in a cycle, set as the minimum of the distance between any two parallel planes in the boundary plane of the particle range. Inertial weights ω: using a linear variation approach with an initial value of 0.8 at the beginning of evolution and 0.4 at the end.
Termination condition: stop running when the maximum number of iterations is reached, set to 100 here.

B. TEST BENCH AND TESTING EQUIPMENT
The physical image of the direction angle detection device is as shown in Fig. 9. In the inside of the device, there are the straight axis and crankshaft, the two axes respectively to constrain the movement of the inner rocker, so that the rocker can only rotate around the rotation axis. When the rocker is deflected with external forces, two angle sensors arranged orthogonally detect the angle of rotation of the spindle. The direction in which the rocker is pointing in space can be calculated by measuring the above two angles. In other applications, the mechanics of the directional angle detection device are also used in two-dimensional rockers.
The mechanical structure of the directional angle detection device is an adaptation of the two-dimensional rocker application, but it differs from the two-dimensional rocker in construction in that.
(1) The end of the rocker is cylindrical and threaded. The geometric central axis of the cylindrical end should coincide with the rotation axis of the straight shaft and the crankshaft to a point, and the position of this point will not change with the movement of the device. The point where the three virtual axes intersect is the origin of the coordinate system in the corresponding mathematical model.
(2) To improve motion accuracy and reduce friction, we lubricate all rotating parts with bearings.
(3) The directional angle detection device should be used in combination with a pull-wire sensor. The directional angle detection device and the pull-wire sensor are fixed to the reference plane and the plane of motion, respectively.
By placing three detection devices simultaneously between the reference plane and the plane of motion, the three-point coordinates on the plane of motion can be detected, the relative position and posture of the two planes can be obtained. The signal acquisition system structure and interface diagram are as shown in Fig. 10. We selected the STM32 chip, designed the signal acquisition circuit and printed PCB, developed the microcontroller and acquisition system. It can signal acquisition, transmission and pose calculation. The GUI can collect the lengths and angles of points P, A, and B at the same time, and can set the number of collections to realize continuous collection and segmented collection. At the same time, it has a data retention function and can cumulatively process the data collected in segments.

C. AN EXPERIMENT WITH NINE POINTS ON A PLANE
We used a 600 × 900mm optical platform as the base, and two 450 × 450mm optical platforms were installed vertically on the base, respectively as the reference plane and the plane to be measured. The two planes were positioned through the threaded holes of the base and were arranged parallel to each other. One directional angle detection device was fixed to the reference plane, and one pull-wire displacement sensor was sequentially mounted at different points in the plane to be measured. The relative position and posture experiment bench, as shown in Fig. 11. The geometric center of the angle sensor is the position where the origin o locates, and the direction of the axes of the coordinate system o-xyz is indicated in Fig. 11. The nine datum points marked on the plane to be measured are shown in Fig. 11. The displacement sensors were installed at the nine reference points in sequence. We used a signal acquisition device to collect data from an angle sensor and a displacement sensor, calculated the coordinates of each measurement point, and analyzed the static accuracy of the sensor from the resulting data. In this experiment, we sampled each datum point in 50 sets and plotted scatterplots in the plane x-o-z and plane x-o-y projections, as shown in Fig. 12. Nine sample points were distributed in a 3 × 3 square array in a plane parallel to the plane x-o-z, and the theoretical values of the projection coordinates of the points in this plane were also marked in Fig. 12. Among them, the axes of the plane x-o-z projection scatterplot were processed to scale equal length, making the relative positions of the data points more intuitive.
The analysis shows that the 50 sets of data on the 250 mm × 250 mm plane have a high degree of overlap, and the locations of the points can be visually distinguished on an axis of about 300mm in length. At the same time, the location of the points is not strictly at the theoretical point and there are some biases. Therefore, while analyzing the minimum resolution distance, the data from this experiment should also be concerned with the positioning accuracy of the sampling points. We analyze the static accuracy of the data fluctuations of a single sample point, measure the most obvious fluctuations in the data at point 8, the point data in the x-axis direction of the maximum value is 0.81561mm, the minimum value of −0.81561mm, the difference between the two values reached 1.63106mm. For further analysis, the data at point 8 is partially magnified, plot to remove the stacking of sampled points after the scatter plot. After removing the stack, it can be observed that the point's coordinate set or overlap is distributed near the coordinate value (0, −129), with an error of only 1 mm in the z-axis coordinate from the theoretical coordinate value (0, −130). Among the 50 samples, only 3 groups data values close to 0.8mm, and only one group data value close to −0.8mm. Most of the samples are distributed within 0.5mm, which can be judged to be large errors. We can screen out gross errors through certain calculation methods during data analysis.

D. ANALYSIS OF EXPERIMENTAL RESULTS BASED ON PARTICLE SWARM ALGORITHMS
We analyzed the position and posture accuracy of the detection device based on the above experimental data. Since the point to be measured is in the same plane of the optical platform and the plane has sufficient flatness, to obtain a more accurate positioning error, we use the data of each sampling point to fit the plane to be measured. We fitted the reference plane using the least-squares method, which satisfies the condition that the square of the distance from each detection point to the reference plane is the smallest. The equation for fitting the datum plane is as follows.
Assuming that the distance from each measurement point to the datum plane is d i , d i is a function of A, B, C, D. The least-squares function is defined as f , then: The equation for the distance from the point to the plane is: The PSO algorithm is optimized to obtain the optimal values of parameters A, B, C, D, and the general equation of the reference plane is obtained by (22). Get the reference plane, by comparing the distance from the point to be measured to the reference plane, the difference between the extreme value and the very small value to get the absolute error of positioning , that is: The 50 sets of data at each sampling point are substituted into the least-squares function and optimize the coordinates of the measured point by particle swarm optimization. Calculation results of reference point coordinates by PSO are shown in Table 1.
By tracking the change of the adaptation in the particle swarm algorithm, the convergence of the algorithm can be determined [30]. PSO algorithm fitness curve is shown in Fig. 13. We can find that after about 40 iterations, each VOLUME 8, 2020  group computation converges, the particle swarm algorithm runs normally and has high computational efficiency.
It is combining the data in the table and the curves in Fig. 13, it can be observed that there is a difference in the resulting population optimum adaptation between the calculation results, which is due to experimental error and device detection error. In the specific analysis, firstly, due to the low accuracy of the processing and assembly of the relative position and posture detection device, there are errors in the detection device itself. Secondly, due to the human installation error in the experimental process, the true coordinates of the point to be measured are not exactly located at the sampling point of the experimental design, so that the results of each experiment cannot be exactly equal.
Parameters and errors of fitting planes in single-point detection experiments are shown in Table 2. After about 50 iterations, each group of calculations converges, the particle swarm algorithm runs normally, and the data results are realistic and reliable. The maximum error is 3.3114mm, the minimum error is 3.0077mm, the parity error is 3.1858mm, and the average error is 3.3855mm. If multiple sampling is used to obtain the average, the detection error is 3.3855mm, and the error obtained by the PSO algorithm is 2.8089mm.
The experimental results show that the reference coordinate value obtained by repeated sampling and particle optimization group calculation can reduce the error. The absolute error of the single-point detection is within 3 mm at a distance scale of 500 mm or more between two planes. Table 2 shows that the parameters A and C of the fitted plane are less than 1 × 10 −4 , indicating that the fitted plane has a high degree of parallelism with the reference plane, and the vertical line from each point to the fitted plane is parallel to the y-axis. At the point d min , we define the distance from the point to the reference plane as L. The relative error δ as shown in (23).
where: δ is the relative error. The relative error δ calculation results are shown in Table 2. In summary, the experiments show that the relative error δ is down to 0.53% in the fitting plane of the single point detection after using the PSO algorithm, which can meet the needs of the scenario used for the relative position and posture detection of hydraulic support.

E. MOTION DETECTION EXPERIMENTS WITH THREE POINTS
With a single point experiment, we can only obtain the relative position of a point on the plane. On this basis, to obtain the relative position and obtain a method to reduce the experimental error and improve the detection accuracy, it is necessary to carry out the detection experiment of three points in the plane, and the experimental device to detect three points in the plane is shown in Fig. 14. The optical platform was modified, two linear guide rails were installed on the original cable-type sensor mounting plane, the guide rail mount was positioned through the threaded holes in the optical plane, and the rails were arranged along the horizontal direction. The three pull-wire sensors were fixed on the same plate as the ''Plane of motion'', the plate was mounted to the linear guide through the slider, so that the plane of motion and the pull-wire sensors mounted on it could move together along the horizontal direction.
In this experiment, we fixed three angle sensors on the same datum plane. The geometric center points of the respective angle sensors were noted as O 1 , O 2 , O 3 . Based on the detection principle described above, we established a fixed coordinate system o − xyz on the reference plane and determined the coordinates of points O 1 , O 2 , O 3 in the coordinate system o-xyz. The three displacement transducers were mounted on the plane to be measured, and the cable outlets were recorded as point P, A, B, respectively. The experimental device was built on an optical platform, and an optical level VOLUME 8, 2020 meter was used to position the components before installation to ensure that the relative positions of the points were accurate.
We moved the plane along the rail sliding at an approximate uniform speed; the coordinates of the points P, A, B were collected and calculated by the signal acquisition device. As the plane remains in motion, point P, A, B in space form a three-point motion track. A total of 40 samples were taken, the data were processed through MATLAB, and real-time images of the trajectories were plotted. Experimental results of point P, A, B linear motion are shown in Fig. 15. We used the above experimental data to analyze the linearity of the panning and the retention degree of relative position of the three points. The projection of the trajectory of the initial observation points P, A, and B in the plane x-o-z, it can be found that the triangle formed by the point P, A, and B is more consistent with the triangle formed by the pull wire sensor in the moving plane. The three-point trajectory moves along the increasing direction of x-axis and is consistent with the direction of the guide rail; the points P, A, and B can maintain the original triangular shape at any position. During the obtained data, the z-axis coordinates of 1 st -3 rd sampling points in the moving plane show a small jump, which is caused by the jams and instantaneous acceleration of the slider at the limit position of the end of the guideway when starting. From then on, the motion is continuous and near constant, the data return to normal.
Since the plane of motion moves at an approximately constant speed along the x-axis direction and the sampling frequency of the signal acquisition module remains constant in the experiment, the x-axis coordinates of points P, A, and B should be linearly related to the number of acquisitions. To further determine the translation linearity of the three points, draw a scatterplot of the x-axis coordinates of three points and the number of acquisitions, and linearly fit the three sets of data. Point P, A and B x-axis coordinate scatter plot and linear fitting, as shown in Fig. 16. When the point P, A, B in the plane together with the constant speed of motion, three points' displacement should be the same, the slope of the three regression lines should be the same in theory, the actual calculation of the slope of the three lines are -3.33, -3.35, -3.33, the three are close to the same. The Pearson correlation coefficients obtained from linear regression analysis are -0.994, -0.996, and -0.992, respectively, indicating a high negative correlation between the x-axis direction and the sampling point, indicating that the moving process is continuous. The velocity is uniform enough; the relative position and posture detection device can have a high dynamic detection effect.

F. PLANE FITTING BASED ON PARTICLE SWARM OPTIMIZATION
The theoretical value of the distance from points P, A, and B to the reference plane is about 460mm, and the distance from points P, A, and B to the reference plane measured by the sensor are 459.94mm, 461.18mm, 459.93mm. The difference between the theoretical value and the actual value is within 1mm. According to the above data, it can be seen that in the plane of motion, point P, A, B have a good relative position retention degree. Although the three single-point detection devices work independently, they have more consistent accuracy and stability.
To obtain a more accurate position and posture and determine the motion accuracy, we use the least-squares to optimize the planar fitting of each set of data. Then we obtain the value of A, B, C, D to analyze. Due to the experimental errors in the moving process, to ensure the accuracy of the results and the best computational efficiency, the experimental data were divided into 4 groups based on the sampling order. Each group had 30 coordinate data, for a total of four plane fits. Plane fitting results obtained by the PSO algorithm are shown in Table 3. According to the general equation of the plane, the parameters A, B, C are a normal vector of the plane, based on the minimum angle between the normal vectors, and we give the method to evaluate the accuracy of angular measurement of posture detection devices.
First, calculate the standard unit normal vector n i of each fitted plane.
Then, fit the unit vector n 0 = (x 0 , y 0 , z 0 ) so that the sum of the angles ϕ sum is the minimum value between n 0 and each vector. The calculation formula of ϕ sum is as follows.
After solving the minimum value of the above equation based on the particle swarm algorithm and obtaining the optimum value of n 0 , compare the angle ϕ i between unit normal vector n i and n 0 one by one. Calculate the difference between the maximum value ϕ max and the minimum value ϕ min of the above angular angle as the angle measurement accuracy of the relative position and posture detection device.
Coordinate representation of normal vector and angle between normal vectors are shown in Table 4. Comparing the angle between the directional vector and n 0 , the maximum value is 0.2417 • , and it appears between n 0 and n 1 . The minimum value is 0.0314 • , and it appears between n 0 and n 3 . Based on the evaluation principle of the minimum inclusion, the accuracy of the measurement of the plane law vector angle is about 0.2 • when the plane is measured by the relative position and posture detection device. The above experimental results show that the measurement accuracy of the relative position and posture detection device can meet the needs of the application.
The position and posture detection device of the hydraulic support designed in this article can obtain position and posture data through the cooperation of a variety of sensors. In order to solve the coordinates of the point to be measured or to fit the moving plane, we use the particle swarm optimization (PSO) algorithm to process and optimize the data collected by the sensors. We compare the real value of the point to be measured in space with the calculated value optimized by the particle swarm optimization (PSO) algorithm. We can find that after the particle swarm optimization (PSO) algorithm is optimized, the gap between the calculated data and the real number is small, which is basically in line with the application of hydraulic support demand.

IV. CANOPY POSTURE SOLVING ALGORITHM BASED ON COORDINATES OF THREE POINTS A. ESTABLISHMENT OF A POSTURE COORDINATE SYSTEM FOR HYDRAULIC SUPPORT CANOPY
Based on the previous studies, we determine the reference hydraulic support and the hydraulic support to be measured. Establish the reference coordinate system, and the coordinates of points P, A, and B measured by detection device are also represented under the reference coordinate system o-xyz. The position of points P, A, B on the hydraulic support as shown in Fig. 17.
To characterize the position of the canopy of hydraulic support to be measured, we further establish the coordinate system o −uvw of the canopy motion. Schematic of the hydraulic support canopy coordinate system as shown in Fig. 18.
We define the origin of this coordinate system as being at the gravity position of the hydraulic support canopy, with u pointing to the front of canopy, v pointing to the adjacent support, and w pointing above the upper surface of the vertical canopy. We need to obtain the coordinate value of the origin o of the posture coordinate system under the reference coordinate system. We should also obtain the three directional VOLUME 8, 2020  cosines representing the direction of each axis (under the base coordinate system) u, v, w, i.e. the directional cosine matrix of the moving coordinate system under the reference coordinate system.
First, the coordinates of points P i , A i , B i in the reference coordinate system are expressed as follows.
Thus, we can determine a set of orthogonal vectors τ 1 , τ 2 in the plane S where point P i , A i , B i is located, as follows.
where λ is the orthogonal factor, making the two vectors satisfy τ 1 · τ 2 = 0. Since the relative positions of point P i , A i and B i are determined when the sensor is laid out, the value of λ can be either calculated or preset artificially. To facilitate the calculation, we set up λ = 1 2 in the experimental phase. When mounting the sensor, three points need to be satisfied to form an isosceles triangle with the point P i as the vertex.
The vector product n of τ 1 and τ 2 refer to (32), as shown at the bottom of the page.
We unitize the three vectors and define the matrix as follows.
According to the vector product calculation rules, we can determine the vector n perpendicular to the plane S, and the vector n has a determined direction. Because τ 1 , τ 2 , n perpendicular to each other, the three vectors will be unitized, that is, a set of units orthogonal base of the inner product space. The three vectors can be fully transformed by rotating them through the uniquely defined coordinates, and the vectors τ 1 , τ 2 , and n are in the same direction as u, v, and w, respectively.

B. CALCULATION OF THE DIRECTIONAL COSINE MATRIX BASED ON COORDINATE TRANSFORM
The principle of the coordinate rotation transformation is as follows. A coordinate system can be obtained by reference to the basic rotation of the coordinate system for an axis, providing that it is positive if it is rotated counterclockwise for an axis.
Multiply the matrices rotating around the x-axes, y-axes, and z-axes to obtain the rotation matrix R after the rotation of the dynamic coordinate system around the static coordinate system in space, refer to (34), as shown at the bottom of the page.
cos β cos α − cos γ sin α + cos a sin β sin γ sin α sin γ + cos γ sin β cos α sin α cos β cos α cos γ + sin α sin β sin γ − sin γ cos α + cos γ sin β sin α − sin β sin γ cos β cos γ cos β   (34) where: α, β, γ is the Euler angle, equation (34) is the Euler variation matrix [31], [32], the moving process is carried out in the following order: first, the moving coordinate system rotates the α angle around the z'-axis, then the β angle around the y -axis, finally, the γ angle around the y -axis. Thus, the cosine matrix A in the direction of the coordinate system of motion under the reference coordinate system is expressed as follows.

C. CALCULATION OF THE CENTER-OF-MASS COORDINATES OF THE CANOPY AND ANALYSIS OF THE ARRANGEMENT OF THE POINTS TO BE MEASURED
Since the hydraulic support detection system uses the support canopy as the object to be measured, calculate the support mass coordinates and monitor it in real-time, which is important to ensure the support stability. Compared with the calculation of the canopy posture, the mathematical representation of the canopy mass coordinates is relatively simple. If canopy is used as a reference object, the center of canopy mass will not change. What we need to calculate is the coordinates of the center of mass o of the hydraulic support canopy under test in the reference coordinate system o − xyz, that is, to find the vector oo .
Based on the addition of spatial inward vectors, we give the calculation of the canopy mass coordinates of the support based on a point to be measured.
Taking the coordinates of the point P i as an example, we can obtain the following formula according to the addition of the vector.
In (36), the three orthogonal vectors τ 1 , τ 2 , n need to be used as described earlier; besides, a 1 , a 2 and a 3 are the projection lengths of the vectors P i o in the three directions τ 1 , τ 2 , n respectively. Since the relative position of n to the mass center o does not change with the movement of the hydraulic support, the values of a 1 , a 2 and a 3 can be determined when arranging the hydraulic support detection device.
The mass-centric coordinates of the hydraulic support canopy and the data of motion posture depend on the installation location of detection device on the support. When it is difficult to achieve the required mounting accuracy, the data should be calculated and corrected according to the method described in the preceding paragraph. After the support position and posture data have been calculated, the data can be displayed through the interactive interface. They can also be used as input variables for the hydraulic support automatic control system for subsequent processing.

V. HYDRAULIC SUPPORT CANOPY RELATIVE POSITION AND POSTURE DETECTION EXPERIMENT A. THREE MACHINE SUPPORTING EXPERIMENT TABLE AND MOVING CONTROL OF HYDRAULIC SUPPORT
Based on the ZY81000/38/82 hydraulic support, we build a three-machine supporting experimental platform for the hydraulic support relative position and posture detection system experiment. The experimental platform scales the hydraulic support 1:5, taking into account the lateral stability of the hydraulic support, the base is appropriately widened, and the interface of the experimental platform construction and data display system is shown in Fig. 19.  Fig. 19 (a) provides a complete picture of the test equipment, which includes: hydraulic support model and its control system, relative position and posture detection device, signal acquisition module, PC, etc. The support model can realize column lifting, expansion and retraction of the balance jack, and forward and backward movement of the pushing cylinder. Due to the limitation of experimental conditions, this test bench has certain difficulties and dangers in simulating the relative pitch, roll, torsion, and other postures of the support. Therefore, the detection device is installed on the lower end of two adjacent hydraulic supports canopy to detect the relative position and posture change of the canopy when the hydraulic supports are in motion. As shown in Fig. 19(b), the hydraulic support relative position and posture data display system integrates serial communication, sensor signal processing, optimization of the coordinate particle group algorithm of the point to be measured, cosine matrix display in the direction of the canopy motion coordinate system, the mass center coordinate display, Euler angle calculation and display.
Through the hydraulic control system, we made the hydraulic support separately to carry out the vertical movement of the column and the movement of the balance cylinder. The schematic diagram of the hydraulic support moving experiment is shown in Fig. 20.
The descending movement is shown in Fig. 20(a). Each hydraulic support was in contact with the top plate at a maximum support height before the experiment began. Two adjacent hydraulic supports (x and y) were selected as the reference hydraulic support and the hydraulic support to be measured, and directional angle detection devices and pull-wire sensors were installed respectively. The experiment ends when the support canopy leaves the top plate and moves to a lower position.
The forward motion process of hydraulic support is shown in Fig. 20(b). Since the support is under pressure from the top and bottom plate in the top state, the friction generated on the canopy and base of the support will keep the support stationary and push the scraper forward if the controlled pushing cylinder is in motion. There is no change in the relative position and posture of the canopy of the hydraulic support in this process. Therefore, to detect the hydraulic support ''Pulling frame'' action under the pushing cylinder, it is necessary to lower the column, so that the gap between the top plate and the canopy. At the same time, connect the adjacent hydraulic support on both sides top, to provide horizontal force for the scraper, thus moving the hydraulic support. Under actual working conditions, the height of the canopy drop is influenced by many factors, such as the supporting state, the characteristics of the top and bottom plate, etc. The lowing height is often small and not completely uniform.

B. ANALYSIS AND RESULTS OF THE DESCENDING COLUMN DESCENDING EXPERIMENT
When the height of the hydraulic support canopy was gradually lowered from the top position, we selected 20 sampling points during the movement., We calculated the spatial coordinate change of each point to be measured one by one, as shown in Fig. 21(a), which shows the three-dimensional coordinate trajectory of points P, A and B and the projection of three points in the normal plane. With the fall of the column, we can observe that the z-axis coordinate value of the points decreasing, which is obviously in line with the law, while the z-axis coordinate value of point A and point B is closer at the starting point.
With the fall of the column, the z-axis coordinate value of point B is greater than point A, as shown by the end of the movement, point A is significantly higher than point B and the difference between the two points' z-axis coordinate value gradually increased. Since during the experiment, only the hydraulic support column was controlled to fall, and no adjustment was made to the length of the balance jack, so that the canopy will appear as a composite of two movements: a downward flush and a rotation around the articulation point of the connecting rod. Fig. 21(b) shows the projection of the three-point line in the plane x-o-y during the column drop. It is also possible to observe that the line between point A and point B no longer remains horizontal.
In Fig. 21(b), it can also be seen that the triangles drawn by the projection points are closer to the triangles formed by the points P, A, and B in space, and the triangles drawn by the groups of experiments are close to full equality. This indicates a drop in the column, allowing the canopy to produce mainly a drop and pitch motion with less torsion in the canopy. The fact that the triangles are not fully equal, the reason may be, to fluctuations in the experimental data due to the limitations of the experimental conditions; on the other hand, to the fact that there is a slight left-right twist in the support canopy during the column fall. Ignoring the torsional phenomenon, the combined experimental data, points P, A, and B fall height: 111.93mm, 110.79mm, 116.26mm, x-axis direction displacement: 12.10mm, 9.06mm, 13.50mm.
Based on the above sampling points, we plotted the threepoint coordinate curves. The three-point coordinate curve of support column descending movement experiment as shown in Fig. 22. As the column decreases, the x-axis coordinate values of the three points show a more consistent tendency to decrease continuously. It can be seen that the hydraulic support will have a small shift in the overall center of gravity. Observing the hydraulic support column can also find that the column is not supported vertically upward, it has a certain inclination in the vertical direction. Relative to the hinge point on the base, the hinge point on the canopy is more to the side of mining working face, so with the lowering of the column, the inclination will be reduced, which leads to a small movement of the canopy backward, this conclusion is in line with the experimental results.
When analyzing the changes in the y-axis coordinate value of each point, it can be found that the fluctuation of the y-axis value of the three points is within 5mm. At the 1 st -12 th sampling points, the y-axis value of point P is always greater than that of point A. With the canopy declining, since the 13 th sampling point, the y-axis value of point P is less than that of point A. This phenomenon is mainly due to the hinge gap of the support itself and the manufacturing error of the structure. It can be observed according to the test results of the hydraulic support relative position and posture.

C. ANALYSIS AND RESULTS OF THE HYDRAULIC SUPPORT FORWARD MOVING EXPERIMENT
In the experiment, we used a whole steel plate to simulate the top plate, so it was impossible to determine the height of the column drop according to the real working conditions. To reflect the difference and ensure the reliability of the experimental results, we lowered the hydraulic support canopy about 90mm, 60mm, and 40mm, respectively, and carried out 3 sets of pushing cylinder expansion experiment. We took the coordinates obtained from 20 sample points during 3 sets of experimental movements and plotted and analyzed them, and the results are shown in Fig. 23.
We set the nudge distance to 140 mm ± 20 mm. Since 3 sets of experiments were performed consecutively, data were collected during the movement of the support forward. And whenever the stent advance to the limit position, a controlled nudge cylinder reverse movement was required to return the hydraulic support to the beginning of the experiment in preparation for the next experiment. In this process, the scraper was subjected to pulling and pushing forces in opposite directions, its position changed, there was also a large gap between the hydraulic support and the articulation point of the scraper, so there were three sets of experiments in Fig. 23(d)-(f) where the trajectories of motion differ.
To better compare the results of the three sets of experiments, we further plotted the three-point coordinate change with sampling point curves, as shown in Fig. 24. The x-axis coordinates of points P, A, and B in each group of experiments were more consistent with the sampling points. They showed a positive correlation with the sampling points, obviously showing the change of the position of the canopy forward flattening. In the first and third set of experiments, x-axis numerical increments in the starting segment and the ending segment are seen to be smaller than the middle segment of the trajectory, suggesting that the support motion velocity shows a tendency to increase first and decrease later. This phenomenon is the result of a combination of floor friction and nudges cylinder tension. Besides, at the beginning of the nudge experiment, because the nudge cylinder drives the scraper to the side of the support to produce a small movement while the hydraulic support remains stationary when the nudge cylinder retracts the starting speed is low or even 0.
The y-axis coordinates of all three groups of experiments showed a trend of decreasing and then increasing, and the three points of motion are the same in all groups of experiments, and no curve crossover occurs. This phenomenon shows that when pushing the cylinder, the direction of the force on the support is not parallel to the x-axis; the phenomenon is due to the direction of the scraper is not parallel to the direction of the hydraulic support, the scraper and the hydraulic support are not one-to-one along the x-axis direction, which is in line with the actual situation. The data of z-axis direction is more obvious in the first set of experiments. This is due to the position of its gravity center cannot return to its original position after the first set of movements. Data fluctuations in the z-axis direction are significantly reduced in the second and third set of experiments, and overall the stent exhibit a better posture of panning on a flat base.

VI. CONCLUSION
To improve the current research on the position and posture detection of hydraulic supports, improve the mining efficiency of coal mines, and ensure the safe production of coal mines. This article presents a method for detecting the position and posture of hydraulic support.
(1) Based on the idea that three points can determine a plane, this article establishes and derives the position and posture detection model, and uses MATLAB to perform simulation analysis. A detection device based on the combination of the angle sensor and displacement sensor is proposed, and the detection principle of the position and posture of the hydraulic support canopy is deduced. Simulink solves the forward and reverse simulation of the model, and the detection method is verified.
(2) This article uses the optical platform and the prototype of the hydraulic support to detect the relative position and posture, and designs the single-point accuracy-test experiment and the moving plane accuracy-test experiment based on the PSO algorithm. The experiment results of the single-point accuracy test show that after the PSO algorithm is used to optimize the coordinates of the sampling points, the relative error of the detection device for single-point detection is 0.53%. The experiment results of the moving plane accuracy test show that the detection device has a high detection accuracy under the moving state, and the accuracy of the normal vector of the fitted plane is 0.2 • . It can meet the needs of hydraulic supports, and can meet the needs of applications.
(3) Based on the above theory and experiment tests, this article develops the hydraulic support relative position and posture data display system. On the three-machine supporting test bench of hydraulic support, shearer, and scraper conveyor, we used the detection device to detect the posture change of the canopy during the lifting movement of the column and the movement of the moving cylinder. The detection device realizes the data collection of the hydraulic support canopy posture, and the support posture calculated from the experiment data is relatively consistent with the support posture under theoretical analysis.
The relative position and posture detection of the hydraulic support studied in this article provides theoretical support for the hydraulic support online real-time monitoring, and lays the foundation for the hydraulic support automatic control. It is the basis for the development of hydraulic supports intelligent monitoring technology and the improvement of the existing detection and control methods. It is of great significance to realize the instability detection of hydraulic supports and the automatic prevention of falling during the mining of large inclination and high mining height coal seams.
WENBO XU was born in 1995. He received the double bachelor's degree in mechatronic engineering, electronic engineering, and automation from the Shandong University of Science and Technology, Qingdao, China, in 2017, where he is currently pursuing the M.E. degree. His research interests include the design and manufacture of mining machinery and virtual prototype simulation, relative position, and posture detection of hydraulic support. QINGLIANG ZENG received the Ph.D. degree in machine design and theory from the China University of Mining and Technology, in 2000. He is currently a Professor with the Shandong University of Science and Technology and Shandong Normal University. He has participated more than 40 projects funded by the National Sci-Tech Support Plan, National 863 Program, and Natural Science Foundation of China. He has published more than 90 articles as the principle person. His research interests include electromechanical integration, condition monitoring, and fault diagnosis, and virtual prototype.
LIQING SUN received the Ph.D. degree from the China University of Mining and Technology, Xuzhou, China, in 2019. Her research interests include fine mineral processing technology and equipment, mining machinery, and mining wastewater treatment. VOLUME 8, 2020