Displacement accumulative error reduction method and system based on motor speed parameter fitting
By using the method based on motor speed parameter fitting, the entire pixel displacement and sub-pixel displacement of a linear motor are calculated, the movable speed curve is formed, and the cumulative error problem in the traditional method is solved, and the measurement accuracy and robustness are improved.
Patent Information
- Application Number
- CN202510085574.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-20
- Publication Date
- 2025-04-11
AI Technical Summary
Under the requirements of high-frequency response or long-stroke displacement of linear motors, traditional methods are prone to cumulative errors in displacement measurement, and the existing algorithms are highly complex and time-consuming, so there is still room for improvement in measurement accuracy and robustness.
The displacement accumulation error reduction method based on motor speed parameter fitting is adopted. By acquiring the target signal in the stripe image, the entire pixel displacement and subpixel displacement are calculated to form a rotor velocity curve, and the cumulative error is reduced through smoothing processing.
It improves the measurement accuracy and robustness of image displacements in adjacent frames, reduces error accumulation during the measurement process, realizes accurate tracking measurement of the rotor position, and reduces calculation complexity and time-consuming.
Smart Images

Figure CN119813878A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of linear motors and provides a method and system for eliminating displacement cumulative errors based on motor speed parameter fitting. Background Art
[0002] Permanent magnet synchronous linear motor (PMSLM) has no mechanical transmission link and simple structure. It is widely used in automated production lines, semiconductor processing and high-precision CNC machine tools. High-precision CNC machine tools have higher performance requirements for linear motor displacement feedback systems, such as high frequency response, high precision, high anti-interference, etc. Therefore, it is of great significance to study a real-time, high-precision and strong robust PMSLM position measurement method.
[0003] At present, magnetic grating sensors, grating sensors and laser interferometers are often used for linear motor position detection. However, magnetic grating sensors are easily disturbed and affected by demagnetization of external magnetic fields, and have high maintenance costs; the measurement cost of grating sensors will increase significantly with the increase of stroke and accuracy; laser interferometers are expensive, require frequent calibration to ensure measurement accuracy, and are complex to operate, making them unsuitable for non-professionals. The digital image measurement method based on machine vision has the advantages of non-contact, low installation requirements, high accuracy, and measurement cost independent of stroke. It has irreplaceable advantages in the detection of moving targets and has become one of the important ways to measure the position of linear motor rotors.
[0004] In order to obtain the real-time position of the linear motor mover, the traditional method is to directly superimpose the displacement of adjacent frame images. However, due to the error in the measurement of adjacent frame displacement, this will inevitably produce cumulative errors. Therefore, under the requirements of high-frequency response or long-stroke displacement of linear motors, it is necessary not only to pay attention to the measurement accuracy of adjacent frame displacements, but also to pay attention to the cumulative error reduction of position measurement. The cumulative error is mainly affected by the number of superpositions, the systematic error of the adjacent frame displacement algorithm, and the random error under the influence of noise.
[0005] The cumulative error reduction algorithm based on the smoothing Kalman filter method previously proposed by Zhu et al. first uses an improved one-dimensional gradient algorithm to detect the displacement of adjacent frames, and then uses the forward and directional smoothing Kalman filter algorithms to perform optimal data autoregression processing on the detected adjacent frame displacements in turn to reduce the error fluctuation range of the measurement value, thereby reducing the error accumulation in long-stroke measurement. However, this method requires two Kalman filter smoothings, which are cumbersome, complex, and time-consuming, and there is still room for improvement in the measurement accuracy and robustness of this method; therefore, the present invention proposes a displacement cumulative error reduction method based on motor speed parameter fitting. Summary of the invention
[0006] The object of the present invention is to provide a method and system for reducing displacement cumulative error based on motor speed parameter fitting, aiming to solve the above-mentioned multiple defects or one of the defects caused by the prior art.
[0007] The first aspect of the present invention is achieved by providing a displacement cumulative error reduction method based on motor speed parameter fitting, the method comprising the following steps:
[0008] Based on the built linear motor image position measurement system, the target signal in the fringe image is obtained;
[0009] Selecting a reference signal at the time of acquiring the target signal, performing similarity calculation on the reference signal and the target signal according to a mean square error correlation algorithm to obtain an integer pixel displacement;
[0010] Extract overlapping areas according to the integer pixel displacement to form two new measurement signals; perform discrete Fourier transform on the two new measurement signals to obtain normalized cross-power spectrum matrices of the two new measurement signals;
[0011] Solving the phase angle of the measurement signal according to the normalized cross power spectrum matrix so as to obtain the sub-pixel displacement through the phase difference;
[0012] Adding the integer pixel displacement and the sub-pixel displacement to obtain a mover velocity curve;
[0013] The mover speed curve is smoothed to reduce the accumulated error.
[0014] A second aspect of the present invention is to provide a displacement cumulative error reduction system based on motor speed parameter fitting, the system comprising:
[0015] A signal acquisition module is used to acquire the target signal in the fringe image based on the constructed linear motor image position measurement system;
[0016] A signal similarity analysis module is used to select a reference signal at the time when the target signal is acquired, and perform similarity calculation on the reference signal and the target signal according to a mean square error correlation algorithm to obtain an integer pixel displacement;
[0017] A normalization processing module is used to extract overlapping areas according to the integer pixel displacement to form two new measurement signals; discrete Fourier transform is performed on the two new measurement signals to obtain normalized cross-power spectrum matrices of the two new measurement signals;
[0018] A phase difference analysis module, used for solving the phase angle of the measurement signal according to the normalized cross power spectrum matrix, so as to obtain the sub-pixel displacement through the phase difference;
[0019] The post-processing module is used to add the whole pixel displacement and the sub-pixel displacement to obtain a mover velocity curve; and to smooth the mover velocity curve to reduce the accumulated error.
[0020] The present invention provides a displacement accumulation error reduction method based on motor speed parameter fitting. The method calculates the similarity of a reference signal and a target signal according to a mean square error correlation algorithm to obtain an integer pixel displacement; extracts overlapping areas according to the integer pixel displacement to form two new measurement signals, performs discrete Fourier transform, and obtains a normalized mutual power spectrum matrix of the two new measurement signals; so as to obtain a sub-pixel displacement through a phase difference; adds the integer pixel displacement and the sub-pixel displacement to obtain a mover velocity curve; realizes accurate and rapid extraction of the mover velocity curve, improves the measurement accuracy and robustness of the displacement of adjacent frame images, and reduces time consumption. Then, through the time-speed fitting method, the fluctuation range of the mover velocity is reduced, and the error accumulation problem in the measurement process is solved as much as possible; and a new data smoothing processing method is introduced to meet the requirements for accurate tracking and measurement of the mover position under different working conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 A schematic diagram of a displacement cumulative error reduction method based on motor speed parameter fitting provided by an embodiment of the present invention;
[0022] Figure 2 The results of different algorithms in the embodiments of the present invention are compared, where (a) is a speed curve comparison, (b) is a cumulative error comparison, and (c) is a cumulative error analysis;
[0023] Figure 3 The robustness results of the embodiments of the present invention are analyzed, wherein (a) is a comparison of the cumulative errors of the method under different illuminations, (b) is a comparison of the cumulative errors of different algorithms under weak illumination, and (c) is an analysis of the cumulative errors of different algorithms under weak illumination;
[0024] Figure 4 This is an example of the dynamic Bayesian network iteration process in an embodiment of the present invention;
[0025] Figure 5 A schematic diagram of a time-speed simulation principle provided by an embodiment of the present invention;
[0026] Figure 6 The linear motor image position measurement model in the embodiment of the present invention;
[0027] Figure 7 A flow chart of a method for reducing displacement cumulative error based on motor speed parameter fitting provided by an embodiment of the present invention;
[0028] Figure 8A structural block diagram of a displacement cumulative error reduction system based on motor speed parameter fitting provided by an embodiment of the present invention;
[0029] Fig. 9 An internal structure block diagram of a computer device provided by an embodiment of the present invention;
[0030] In the figure: 10 - mover; 11 - line scanning camera; 12 - fringe image; 13 - guide rail. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0032] Figure 1 A schematic diagram of a displacement cumulative error reduction method based on motor speed parameter fitting provided by an embodiment of the present invention, Figure 7 A flow chart of a displacement cumulative error reduction method based on motor speed parameter fitting provided by an embodiment of the present invention; the method may specifically include the following steps S101 to S106;
[0033] S101, based on the built linear motor image position measurement system, obtaining a target signal in the fringe image;
[0034] Among them, the linear motor image position measurement system can refer to Figure 6 The structure shown in the figure; the stator of the permanent magnet synchronous linear motor is installed on an operating table, and the mover 10 matched with the stator is installed on the guide rail 13 at the top of the stator, and can be driven by the magnetic induction of the coil winding on the stator to perform linear motion on the guide rail 13; the camera used for fringe image acquisition is a line scanning camera 11; the line scanning camera is selected to replace the traditional array camera to meet the real-time requirements of the linear motor under high-frequency position feedback. The line scanning camera 11 is installed on the mover 10, and the fringe image 12 is set on the operating table along the length direction of the guide rail 13, and the line scanning camera 11 can be vertically focused on the fringe image 12 to collect the image, so as to obtain the target signal in the fringe image 12.
[0035] In fact, the type and grayscale distribution of the fringe image 12 will affect the accuracy and robustness of the displacement measurement of the mover. Therefore, in order to effectively weaken the influence of the longitudinal jitter on the measurement result from the image source and suppress the influence of the scanning deviation of the line scanning camera on the measurement accuracy, a non-periodic sinusoidal fringe image with obvious characteristics is selected as the target image.
[0036] Therefore, in one example of this embodiment, the method further includes:
[0037] Generate a fringe image based on the linear motor image position measurement system you need to build; the linear motor image position measurement system can refer to Figure 6 ;
[0038] Calibrate the calibration coefficient of the camera in the linear motor image position measurement system, where the calibration coefficient is the actual distance corresponding to one pixel in the image taken by the camera at a set magnification;
[0039] The generation formula of the fringe image is as follows:
[0040]
[0041] Where ω is the fringe period; is the initial phase; b(x,y) and a(x,y) are the fringe amplitude and background light intensity respectively, (x,y) is the coordinate coefficient of the two-axis coordinate system;
[0042] The calibration coefficient is recorded as σ, and the calculation formula is:
[0043] σ=(∑x k ) / Nd (2);
[0044] Among them, x k is the displacement detected between adjacent frames, N is the number of image signals, and d is the actual preset displacement.
[0045] S102, selecting a reference signal at the time of acquiring the target signal, and performing similarity calculation on the reference signal and the target signal according to a mean square error correlation algorithm to obtain an integer pixel displacement;
[0046] In this embodiment, the target signal of the fringe image at the position corresponding to the motion of the mover can be collected in real time by a line scanning camera, that is, the target signal is set to f2(x), the reference signal is set to f1(x), and f2(x) is the target signal after f1(x) is horizontally moved by Δx;
[0047] f2(x)=f1(x-Δx), (x=0, 1,..., N-1) (3);
[0048] Perform spatial domain low-pass filtering preprocessing on the two signals;
[0049] Select two templates G on the left and right of f1(x), and the size of template G is 1×m pixels;
[0050]
[0051] Select template G1 and template G2 of the reference signal, and slide them point by point across the target image represented by the target signal; during the sliding process, calculate the similarity between template G and a certain area in f2(x); the displacement offset between template G (including template G1 and template G2) and the area can be obtained.
[0052] In this step, the similarity between the template G and a certain area in f2(x) is calculated, and the mean square error correlation algorithm can be used; the square of the difference between the grayscale values of each pixel in the signal is summed and averaged to measure the similarity between the two image signals.
[0053] Afterwards, spatial domain registration is performed based on the minimum cross-correlation value generated during similarity calculation to determine the position of the area matching the minimum cross-correlation value, thereby obtaining the integer pixel displacement;
[0054] In this embodiment, when calculating the cross-correlation value between the template G and a certain area of the current signal, the formula of the mean square error correlation algorithm is as follows:
[0055]
[0056] Where D(i) is the cross-correlation value between the template G and the target signal in region s. By finding the minimum D(i min ), the position of the matching area can be determined, and then the integer pixel displacement Δx can be obtained through formula (6).
[0057] S103, extracting overlapping areas according to the integer pixel displacement to form two new measurement signals; performing discrete Fourier transform on the two new measurement signals to obtain normalized cross-power spectrum matrices of the two new measurement signals;
[0058] S104, solving the phase angle of the measurement signal according to the normalized cross power spectrum matrix, so as to obtain the sub-pixel displacement through the phase difference;
[0059] S105, adding the integer pixel displacement and the sub-pixel displacement to obtain a mover velocity curve;
[0060] S106: Smoothing the mover speed curve to reduce accumulated errors.
[0061] In step S103, the overlapping area is extracted according to the integer pixel displacement to form two new measurement signals; the two new measurement signals are subjected to discrete Fourier transform to obtain the normalized cross power spectrum matrix of the two new measurement signals, which specifically includes:
[0062] According to the spatial domain registration result, the target signal f2(x) is moved by an integer pixel displacement Δx in the opposite direction of the registration result. The reference signal and the new target signal are represented by h(x) and k(x), respectively.
[0063] Perform Fourier transform on h(x) and k(x) and calculate the normalized cross-power spectrum of h(x) and k(x):
[0064]
[0065] Where H(u) and K(u) represent the Fourier transform of h(x) and k(x), Q(u) is the normalized cross-power spectrum matrix; m represents the pixel size of the image and also represents the number of data points in equation (9).
[0066] Then, the matrix phase angle θ(u) is obtained by the angle(·) function, and the following relationship is established:
[0067]
[0068] dx = -k1(m / 2π) (9);
[0069] Among them, θ(u) represents the phase difference between two frames of image signals, R is a row vector; k is the slope of the phase difference curve, and c is the horizontal coordinate.
[0070] In this embodiment, for the motion of the linear motor, ideally, the motion of the motor can be regarded as a rigid body translation, and the phase difference between the two frames of signal can be regarded as a straight line. Substituting the slope k of the straight line into equation (8), the sub-pixel displacement dx between the two frames of image can be obtained.
[0071] In this embodiment, when acquiring the target signal, since the position feedback of the motor mover is sampled at equal intervals, the displacement values of adjacent frames can be indirectly represented by the mover speed. Therefore, the slope extraction accuracy and speed of the phase difference curve will directly affect the extraction accuracy and real-time performance of the mover speed curve.
[0072] In this embodiment, in order to accurately and quickly extract the motor speed parameters, in the step of solving the phase angle of the measurement signal according to the normalized cross power spectrum matrix so as to obtain the sub-pixel displacement through the phase difference, the method further includes:
[0073] The slope parameters of the phase difference curve are estimated by the DBNRSC algorithm.
[0074] Among them, the DBNRSC algorithm, namely: dynamic Bayesian network random sampling consistency algorithm. It is based on the random sampling consistency (RANSAC) algorithm, by modeling with probability, using dynamic Bayesian network (DBN) to iteratively update the probability of data points, and use them to sample data points with higher inlier probabilities as much as possible, so as to accurately estimate the slope. In this way, it not only improves the accuracy of traditional RANSAC, but also improves the computational efficiency.
[0075] In the DBNRSC algorithm, x is defined as a data point, the maximum number of iterations is k, and the sampling point set is s. k ∈Q, where Q{x1,…,x n} is a set of data points; is x n In- and out-point classification at iteration k. Represents the kth pair of data points x n The best guess for the internal and external point classification is performed, and a dynamic Bayesian network (DBN) is introduced to iteratively update the scores.
[0076] Starting from a variable, at each iteration k, all the data points obtained in the previous iteration have internal and external guesses X{X k ,X n}, and all data points inside and outside the evidence C{C k ,C n}.
[0077] For this dynamic Bayesian network (or model), there are the following restrictions:
[0078]
[0079] For a certain iteration k, the inlier / inlier point probabilities and classifications of different data points are independent of each other. At each iteration k, according to x n Previous probabilities and previous inliers and inliers classification (only needed to constrain the next probability estimate) are updated The specific iteration process can be referred to Figure 4 .
[0080] exist Figure 4 In each iteration k, the evidence of the internal and external points is Only depends on the set of sampling points s k , which depends on the probability of the data point updated after the previous iteration
[0081] The result of these conditional independence constraints is that there is an independent DBN for each data point, and each DBN has its own weight. Then, for the iterative process, the DBN for each data point is defined as Figure 4 shown.
[0082] Based on the DBN derived above, in order to solve the unbounded problem that the dynamic Bayesian network (or model) grows exponentially with the number of iterations, the first-order Markov hypothesis is introduced, and the relevant constraints are:
[0083]
[0084] but,
[0085]
[0086] By applying the probability chain rule, the joint probability at iteration k is written as:
[0087]
[0088] in,
[0089]
[0090] Afterwards, for all data points, Represents the probability of a data point being inside:
[0091]
[0092] Where α is the normalization factor, and
[0093]
[0094] and can take two values, either an inlier or an outlier; this means that φ(.) is a two-dimensional tuple;
[0095] Select This is the case of an interior point.
[0096] In addition, for all j, The sum of has two terms; for k ≥ 1, and This means that at each iteration, the φ(.) calculated at the previous iteration can be used, with no additional computational cost when increasing the number of iterations.
[0097] In this embodiment, the DBNRSC algorithm is configured as follows:
[0098] Update the probability of this iteration based on the inlier and inlier point classification and inlier point probability obtained after the previous iteration;
[0099] In fact, in this step, the data points of the first iteration can also be randomly sampled at the beginning of the iteration;
[0100] Specifically, the formula for updating probability is as shown in Table 1 below;
[0101] Table 1 is the dynamic Bayesian network iteration probability formula
[0102]
[0103] in, As shown in Table 2 and Table 3, the function γ(ε k ) gives higher probability to the classification made by the model with high inlier probability, and vice versa.
[0104]
[0105] Table 2 Conditional probability table
[0106]
[0107] Table 3 Conditional probability table
[0108]
[0109] Among them, Inliner represents the inner point, Outliner represents the outer point;
[0110] Then, according to the probability of a single data point being an inlier, a weight is assigned to it to construct a random pool of discrete distributions of data points;
[0111] Among them, the weight ρ = p·n·100, this linear weight function equally converts the probabilities of all points to the desired sampling range, giving greater weights to points with higher probabilities, and vice versa.
[0112] Randomly select N points from the random pool to generate a set of sampling points and fit a straight line;
[0113] All data points are tested using the fitted straight line; data points within the set allowable error range are called inliers, and new inliers and inliers classification is obtained based on this; where N is the number of inliers obtained in the previous iteration;
[0114] Repeat the above steps, record the regression parameters of the fitted straight line in each iteration and regard them as the slope;
[0115] The iteration stopping criterion is set according to the slope change of two adjacent iterations: when the slope change of the fitting line is less than the set threshold ε, the iteration is stopped.
[0116] In this embodiment, ε=10-3 ·2π·m; the essence of this convergence criterion is that the absolute displacement difference between two consecutive iterations is less than 10 -3 Pixels. At this time, the data points sampled from the random pool are as likely to be internal points as possible.
[0117] In this embodiment, in the step of smoothing the mover velocity curve to reduce the cumulative error, the Holt exponential smoothing method (also known as the double exponential smoothing method) is used for smoothing; the Holt exponential smoothing method is simple to calculate and has few parameters. By considering trends and quickly responding to data changes, it can effectively process time series with changing trends. Therefore, this embodiment smoothes the detected mover velocity to reduce its fluctuation range, thereby reducing the cumulative error and ultimately achieving accurate measurement of the mover position.
[0118] Because in the motor rotor position measurement, the rotor speed fluctuates around the true value and the speed curve is continuous, the displacement cumulative error can be reduced based on time-speed fitting. Figure 5 , the detected mover speed is smoothed to reduce its fluctuation range, thereby reducing the cumulative error and ultimately achieving accurate measurement of the mover position.
[0119] In the Holt exponential smoothing method, when the smoothing result of the previous moment is known, the measured value can be smoothed according to the result and the measured value of this moment:
[0120] E(k)=αp(k)+(1-α)E(k-1) (20);
[0121] Among them, E(k) is the Holt smoothing result at this moment, p(k) is the detection value at this moment, and α is the exponential smoothing coefficient:
[0122] α=e -λ(k-1) (twenty one);
[0123] The exponential smoothing coefficient is calculated based on the above exponential function, where λ controls the speed of weight decay. According to formula (21), the weight α will gradually decrease in time sequence, and the change of this coefficient further reduces the error fluctuation range.
[0124] However, the above Holt exponential smoothing method is only applicable to the case of uniform change. To this end, in one embodiment, a trend smoothing value is introduced to expand its scope of application, and the trend smoothing value is represented by the regression parameter of the data model:
[0125]
[0126] Therefore, the Holt smoothing result E(k) at this moment is:
[0127] E(k)=αp(k)+(1-α)h(k-1) (23);
[0128] h(k-1)=E(k-1)+ξ (24);
[0129] Among them, h(k-1) is the sum of the smoothing result of the previous state and the trend smoothing value ξ.
[0130] As mentioned above, the sub-pixel displacement measurement based on the dynamic Bayesian network improves the measurement accuracy and robustness of the displacement of adjacent frame images, reduces the time consumption, and realizes the accurate and fast extraction of the mover velocity curve; then, through time-velocity fitting, the fluctuation range of the mover velocity is reduced, which well solves the error accumulation problem in the measurement process; further, the Holt exponential smoothing method is introduced to replace the traditional polynomial fitting algorithm, so that it can meet the requirements of accurate tracking and measurement of the mover position under different working conditions.
[0131] like Figure 8 As shown, in another embodiment, a displacement accumulation error reduction system based on motor speed parameter fitting is used in the method, and the system includes:
[0132] The signal acquisition module 100 is used to acquire the target signal in the fringe image based on the constructed linear motor image position measurement system;
[0133] The signal similarity analysis module 200 is used to select a reference signal at the time when the target signal is acquired, and perform similarity calculation on the reference signal and the target signal according to a mean square error correlation algorithm to obtain an integer pixel displacement;
[0134] The normalization processing module 300 is used to extract the overlapping area according to the integer pixel displacement to form two new measurement signals; perform discrete Fourier transform on the two new measurement signals to obtain the normalized cross-power spectrum matrix of the two new measurement signals;
[0135] A phase difference analysis module 400, used to solve the phase angle of the measurement signal according to the normalized cross power spectrum matrix, so as to obtain the sub-pixel displacement through the phase difference;
[0136] The post-processing module 500 is used to add the integer pixel displacement and the sub-pixel displacement to obtain a mover velocity curve; and to smooth the mover velocity curve to reduce the accumulated error.
[0137] The present invention provides a displacement cumulative error reduction method based on motor speed parameter fitting, and based on this method provides a displacement cumulative error reduction system based on motor speed parameter fitting; the method firstly accurately and quickly calculates the motor displacement at adjacent moments, and then suppresses the error fluctuation range through a time-speed fitting method to eliminate the cumulative measurement error under long stroke or high-frequency feedback; based on the step of reducing the speed fluctuation range through time-speed fitting, and introducing an extended Holt smoothing method, the time-speed fitting can still achieve an ideal fitting accuracy under different motor operating conditions, thereby achieving a better cumulative measurement error reduction effect.
[0138] like Figure 2 , Figure 3 As shown, several conventional algorithms are selected, such as: net recommendation value algorithm (ISONPS in the figure), singular value decomposition (SVD in the figure), JSP sorting algorithm (JSP in the figure), K-means clustering (SKLM in the figure), etc., and compared with the present embodiment (DBN-HES in the figure); compared with these algorithms, the present embodiment has higher measurement accuracy and stronger robustness. It has been verified by experiments that when the motor moves at a uniform speed of 0.4m / s and the sampling frequency of the line scan camera is 1000Hz, the cumulative measurement error of 300 adjacent frame images is processed by this method, and the maximum cumulative error is 0.0139mm. Under the condition of 3600Lux illumination, the maximum cumulative error is 0.0157mm; this method realizes the accurate and rapid extraction of the mover velocity curve, and then reduces the fluctuation range of the mover velocity through time-speed fitting, and introduces the Holt exponential smoothing method to realize the accurate tracking and measurement requirements of the mover position under different working conditions.
[0139] like Fig. 9 As shown, in one embodiment, a computer device is provided, the computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the following steps when executing the computer program:
[0140] S101, based on the built linear motor image position measurement system, obtaining a target signal in the fringe image;
[0141] S102, selecting a reference signal at the time of acquiring the target signal, and performing similarity calculation on the reference signal and the target signal according to a mean square error correlation algorithm to obtain an integer pixel displacement;
[0142] S103, extracting overlapping areas according to the integer pixel displacement to form two new measurement signals; performing discrete Fourier transform on the two new measurement signals to obtain normalized cross-power spectrum matrices of the two new measurement signals;
[0143] S104, solving the phase angle of the measurement signal according to the normalized cross power spectrum matrix, so as to obtain the sub-pixel displacement through the phase difference;
[0144] S105, adding the integer pixel displacement and the sub-pixel displacement to obtain a mover velocity curve;
[0145] S106: Smoothing the mover speed curve to reduce accumulated errors.
[0146] The computer device may be an independent physical server or terminal, or a server cluster composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud servers, cloud databases, cloud storage, and CDN.
[0147] The terminal may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal and the computer device may be connected via a network, and the present invention does not limit this.
[0148] It should be understood that, although each step in the flow chart of each embodiment of the present invention is shown in sequence according to the indication of the arrow, these steps are not necessarily performed in sequence according to the order indicated by the arrow. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.
[0149] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0150] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0151] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
[0152] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A displacement cumulative error reduction method based on motor speed parameter fitting, characterized in that: The method comprises the following steps: Based on the built linear motor image position measurement system, the target signal in the fringe image is obtained; Selecting a reference signal at the time of acquiring the target signal, performing similarity calculation on the reference signal and the target signal according to a mean square error correlation algorithm to obtain an integer pixel displacement; Extract overlapping areas according to the integer pixel displacement to form two new measurement signals; perform discrete Fourier transform on the two new measurement signals to obtain normalized cross-power spectrum matrices of the two new measurement signals; Solving the phase angle of the measurement signal according to the normalized cross power spectrum matrix so as to obtain the sub-pixel displacement through the phase difference; Adding the integer pixel displacement and the sub-pixel displacement to obtain a mover velocity curve; The mover speed curve is smoothed to reduce the accumulated error.
2. The displacement cumulative error reduction method based on motor speed parameter fitting according to claim 1 is characterized in that: The method further comprises: Generate fringe images according to the linear motor image position measurement system to be built; Calibrate the calibration coefficient of the camera in the linear motor image position measurement system, where the calibration coefficient is the actual distance corresponding to one pixel in the image taken by the camera at a set magnification; The generation formula of the fringe image is as follows: Where ω is the fringe period; is the initial phase; b(x,y) and a(x,y) are the fringe amplitude and background light intensity respectively, (x,y) is the coordinate coefficient of the two-axis coordinate system; The calibration coefficient is recorded as σ, and the calculation formula is: σ=(∑x k ) / Nd; Among them, x k is the displacement detected between adjacent frames, N is the number of image signals, and d is the actual preset displacement.
3. The displacement cumulative error reduction method based on motor speed parameter fitting according to claim 2 is characterized in that: The step of selecting a reference signal at the time of acquiring the target signal, and performing similarity calculation on the reference signal and the target signal according to a mean square error correlation algorithm to obtain an integer pixel displacement specifically includes: The reference signal is set to f1(x), and f2(x) is the target signal after f1(x) is horizontally shifted by Δx; f2(x)=f1(x-Δx), (x=0, 1,..., N-1); Select two templates G on the left and right of f1(x), and the size of template G is 1×m pixels; Select template G1 and template G2 of the reference signal, and slide them point by point across the target image represented by the target signal; during the sliding process, calculate the similarity between template G and a certain area in f2(x); According to the minimum cross-correlation value generated during similarity calculation, spatial domain registration is performed to determine the position of the area matching the minimum cross-correlation value, and then the integer pixel displacement is obtained.
4. The displacement cumulative error reduction method based on motor speed parameter fitting according to claim 3 is characterized in that: The steps of extracting overlapping areas according to integer pixel displacement to form two new measurement signals; and performing discrete Fourier transform on the two new measurement signals to obtain normalized cross-power spectrum matrices of the two new measurement signals specifically include: According to the spatial domain registration result, the target signal f2(x) is moved by an integer pixel displacement Δx in the opposite direction of the registration result. The reference signal and the new target signal are represented by h(x) and k(x), respectively. Perform Fourier transform on h(x) and k(x) and calculate the normalized cross-power spectrum of h(x) and k(x): Where H(u) and K(u) represent the Fourier transform of h(x) and k(x), and Q(u) is the normalized cross-power spectrum matrix.
5. The displacement cumulative error reduction method based on motor speed parameter fitting according to claim 1 is characterized in that: In the step of solving the phase angle of the measurement signal according to the normalized cross power spectrum matrix so as to obtain the sub-pixel displacement through the phase difference, the method further includes: The slope parameters of the phase difference curve are estimated by the DBNRSC algorithm.
6. The displacement cumulative error reduction method based on motor speed parameter fitting according to claim 5 is characterized in that: The DBNRSC algorithm is configured as follows: Randomly sample the data points of the first iteration; or, update the probability of this iteration based on the inlier and inlier classification and inlier probability obtained after the previous iteration; According to the probability of a single data point being an inlier, a weight is assigned to it to construct a random pool of discrete distribution of data points; Randomly select N points from the random pool to generate a set of sampling points and fit a straight line; All data points are tested using the fitted straight line; data points within the set allowable error range are called inliers, and new inliers and inliers classification is obtained based on this; where N is the number of inliers obtained in the previous iteration; Repeat the above steps, record the regression parameters of the fitted straight line in each iteration and regard them as the slope; The iteration stop criterion is set according to the slope change of two adjacent iterations: the slope change of the fitting line is less than the set threshold ε , stop the iteration.
7. The displacement cumulative error reduction method based on motor speed parameter fitting according to claim 1 is characterized in that: In the step of smoothing the mover speed curve to reduce the accumulated error, the Holt exponential smoothing method is used for smoothing.
8. A displacement cumulative error reduction system based on motor speed parameter fitting, used in the method according to any one of claims 1 to 7, characterized in that: The system comprises: A signal acquisition module is used to acquire the target signal in the fringe image based on the constructed linear motor image position measurement system; A signal similarity analysis module is used to select a reference signal at the time when the target signal is acquired, and perform similarity calculation on the reference signal and the target signal according to a mean square error correlation algorithm to obtain an integer pixel displacement; A normalization processing module is used to extract overlapping areas according to the integer pixel displacement to form two new measurement signals; discrete Fourier transform is performed on the two new measurement signals to obtain normalized cross-power spectrum matrices of the two new measurement signals; A phase difference analysis module, used for solving the phase angle of the measurement signal according to the normalized cross power spectrum matrix, so as to obtain the sub-pixel displacement through the phase difference; The post-processing module is used to add the whole pixel displacement and the sub-pixel displacement to obtain a mover velocity curve; and to smooth the mover velocity curve to reduce the accumulated error.