A method for calculating the absolute stroke of a piston rod based on the Manhattan distance algorithm
By combining simulation software and the Manhattan distance algorithm with a magnetic sensor, the problem of detection anomalies caused by changes in the piston rod structure was solved, achieving high-precision measurement of the absolute position of the piston rod and miniaturization of the device.
Patent Information
- Application Number
- CN202210146621.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-17
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2042-02-17
AI Technical Summary
In existing technologies, changes in the structural design of the piston rod can lead to abnormal data during the testing process, making it impossible to accurately measure the absolute position of the piston rod.
The simulation software generates a magnetic signal analog array matrix, which is then combined with the measured magnetic signal array of the piston rod measured by the CPMS-III absolute sensor. The Manhattan distance algorithm is then used to compare the results and determine the absolute stroke of the piston rod.
It improves detection precision and accuracy, reduces the size of the detection device, and enables more accurate piston rod position measurement.
Smart Images

Figure CN114547878B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of stroke detection technology, and in particular to a method for calculating the absolute stroke of a piston rod based on the Manhattan distance algorithm. Background Technology
[0002] Electro-hydraulic position servo systems are a widely used and fundamental type of hydraulic control system; using hydraulic cylinders as actuators is a common form of electro-hydraulic position servo system. In a servo control system, the system's control accuracy largely depends on the accuracy of the detection device, which represents the upper limit of the system's control accuracy. Therefore, the hydraulic cylinder stroke detection device becomes a key component of electro-hydraulic position servo systems using hydraulic cylinders as actuators. The accuracy, resolution, reliability, and response bandwidth of the hydraulic cylinder stroke detection device are crucial indicators affecting the tracking accuracy and speed of the electro-hydraulic position servo system.
[0003] The method proposed by Lü Weidong et al. for detecting the absolute displacement of a ceramic piston rod uses the pitch value of the thread groove with the smallest pitch in the piston rod as the reference value. The pitch values of other thread grooves are set within twice the reference value. From the starting point of each thread groove to the interval where the thread grooves overlap again, a linear array sensor, stationary relative to the piston rod, detects at least one set of thread ring spacing values from the current absolute stroke of the piston rod. The thread ring spacing value is the spacing between adjacent thread rings in that set, thus uniquely determining the absolute position of the linear array sensor on the ceramic piston rod. The problem with this method is that changes in the piston rod's structural design can lead to abnormal data during the detection process, making it impossible to accurately measure the absolute position of the piston rod. Summary of the Invention
[0004] The technical problem to be solved by this invention is: to accurately measure the absolute position of the piston rod.
[0005] The technical solution adopted in this invention is: a method for calculating the absolute stroke of a piston rod based on the Manhattan distance algorithm, comprising the following steps:
[0006] S1. Obtain the magnetic signal simulation array matrix at each position on the piston rod using simulation software;
[0007] Furthermore, simulation software includes: COMSOL Multiphysic and MATLAB.
[0008] S2. Measure the magnetic signal at a certain position on the piston rod using a magnetic sensor;
[0009] Furthermore, the magnetic sensor is a CPMS-III absolute sensor, which has the capability to acquire electromagnetic signals from 64 probes.
[0010] S3. The absolute stroke of the piston rod is obtained by comparing the measured array of magnetic signals at each position with the arrays in the simulated array matrix through an algorithm.
[0011] Furthermore, the algorithm is the Manhattan distance algorithm;
[0012] Furthermore, step S3 includes the following steps:
[0013] S31. Suppose that the simulation software obtains the simulation array matrix of each position on the piston rod as: [Y1[y 11 ,y 1j ..y 1m ]、…Y i [y i1 ,y ij ..y im ]、…Y n [y n1 ,y nj ..y nm ]], where 1≤i≤n, 1≤j≤m;
[0014] S32. Suppose the measured array of magnetic signals at a certain position on the piston rod obtained by the magnetic sensor is: X i [x i1 ,x ij …x im ];
[0015] S33. Using the Manhattan distance algorithm, subtract each array in the simulated array matrix at a certain location from the measured array at that location and take the minimum value F. i F i =min{|X i -Y1|、…|X i -Y i |…、|X i -Y n |};Let F i =min{|X i -Y1|、…|X i -Y i |…、|X i -Y n |}=min{[|x i1 -y 11 |+…|x ij -y 1j |…+|x im -y 1m |]、…[|x i1 -y i1 |+…|x ij -y ij |…+|x im -y 1m |]、…、[|xi1 -y n1 |+…|x ij -y nj |…+|x im -y nm If |]}, then the index position of the Y array matrix corresponding to the minimum value is the position of the piston rod in the hydraulic cylinder.
[0016] The beneficial effects of this invention are:
[0017] This invention utilizes simulation software and magnetic sensors combined with the Manhattan distance algorithm to greatly improve detection accuracy and precision. Compared with the magnetic sensors used in existing technologies, it reduces the size of the detection device and makes installation more convenient. Attached Figure Description
[0018] Figure 1 This is a flowchart of the method for calculating the absolute stroke of a piston rod based on the Manhattan distance algorithm of the present invention;
[0019] Figure 2 This is a schematic diagram of the detection device of the present invention. Detailed Implementation
[0020] The present invention will be further described below with reference to the accompanying drawings and embodiments. The drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.
[0021] like Figure 2 As shown, the current absolute stroke detection system consists of a detection device and a host computer. The detection device includes a magnetic sensor and an AD converter, which are used to convert the annular magnetic signal of the hydraulic cylinder piston rod into a digital signal. The host computer contains a coding program used to calculate and compare the digital signal fed back by the AD converter with the signal simulated by the simulation software.
[0022] like Figure 1 As shown, a method for calculating the absolute stroke of a piston rod based on the Manhattan distance algorithm includes the following steps:
[0023] S1. Obtain the magnetic signal simulation array matrix at each position on the piston rod using simulation software;
[0024] For example, simulation software obtains a simulated array matrix [Y1, Y2, Y3] for three positions on the piston rod, where,
[0025] Y1=[2545,2567,2591,2616,2641,2667,2695,2723,2752,2782,2814,284 6,2880,2914,2949,2986,3023,3061,3101,3141,3181,3222,3264,3306};
[0026] Y2=[3592,3629,3665,3698,3730,3758,3785,3808,3827,3844,3857,386 7,3872,3875,3873,3868,3859,3847,3831,3812,3790,3765,3738,3708];
[0027] Y3=[3452,3412,3371,3330,3289,3248,3208,3167,3127,3088,3049,301 1,2973,2938,2902,2867,2833,2800,2769,2738,2707,2678,2650,2622];
[0028] S2. Measure the magnetic signal at a certain position on the piston rod using a magnetic sensor;
[0029] For example, the actual measured array is:
[0030] X i =[2112,1896,1551,1116,667,,876,,1888,2739,3214,3338,2548,2404,1983,1875,1310,1257,1778,2326,2081,1667,1741,2402,2659,2038];
[0031] S3. The measured array of magnetic signals at each position is compared with the simulated array using an algorithm to obtain the absolute stroke of the piston rod.
[0032] Minimum value F i =min{|X i -Y1|、|X i -Y2|、|X i -Y3|}=min{23869、43432、25455}=23869; then the index position 0 of the Y array matrix corresponding to the minimum value is the position of the piston rod in the hydraulic cylinder.
[0033] Based on the above-described preferred embodiments of the present invention, and through the foregoing description, those skilled in the art can make various changes and modifications without departing from the inventive concept. The technical scope of this invention is not limited to the contents of the specification, but must be determined according to the scope of the claims.
Claims
1. A method for calculating the absolute stroke of a piston rod based on the Manhattan distance algorithm, characterized in that, Includes the following steps: S1. Obtain the magnetic signal simulation array matrix at each position on the piston rod using simulation software; S2. Measure the magnetic signal at a certain position on the piston rod using a magnetic sensor; S3. The measured magnetic signal arrays at each position are compared with the arrays in the analog array matrix using an algorithm to obtain the absolute stroke of the piston rod; Includes the following steps: S31. Suppose that the simulation software obtains the simulation array matrix of each position on the piston rod as: [Y1[y 11 ,y 1j ..y 1m ]、 … Y i [y i1 ,y ij ..y im ]、 … Y n [y n1 ,y nj ..y nm ]], where 1≤i≤n, 1≤j≤m; S32. Suppose the measured array of magnetic signals at a certain position on the piston rod obtained by the magnetic sensor is: X i [x i1 ,x ij …x im ]; S33. Using the Manhattan distance algorithm, subtract each array in the simulated array matrix at a certain location from the measured array at that location and take the minimum value F. i F i =min{ | X i -Y1|、 … | X i -Y i |…、 | X i -Y n If |}, then the index position of the Y array matrix corresponding to the minimum value is the position of the piston rod in the hydraulic cylinder.
2. The method for calculating the absolute stroke of a piston rod based on the Manhattan distance algorithm according to claim 1, characterized in that, The simulation software includes COMSOL Multiphysic and MATLAB.
3. The method for calculating the absolute stroke of a piston rod based on the Manhattan distance algorithm according to claim 1, characterized in that, The magnetic sensor is a CPMS-III absolute sensor.
4. The method for calculating the absolute stroke of a piston rod based on the Manhattan distance algorithm according to claim 1, characterized in that, The algorithm described is the Manhattan distance algorithm.