Code belt position and speed identification method and system
By constructing a standard coding model and a multi-level filtering fault-tolerant mechanism for continuous sampling frame matching, the adaptability and stability issues of the code band detection system are solved, and real-time, continuous, and high-precision measurement of code band position and speed is achieved.
Patent Information
- Application Number
- CN202610155201.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-04
- Publication Date
- 2026-05-08
AI Technical Summary
Existing code tape detection systems lack adaptability, have poor stability and weak anti-interference capabilities in complex environments, and are difficult to meet the requirements for high-precision and high-stability measurement.
A standard coding model adapted to the current recognition program is constructed. The signal of light intensity change of the code band is collected by photoelectric sensor. After preprocessing, continuous sampling frame matching with multi-level filtering fault tolerance mechanism is adopted. Combined with the velocity calculation method, the position and velocity are measured in real time, continuously and with high precision.
It improves the universal adaptability to different code tape models, effectively resists interference from complex environments, avoids matching failures or incorrect positioning, and achieves high-precision and stable measurement of moving targets.
Smart Images

Figure CN121994302A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of industrial measurement technology, and in particular relates to a method and system for identifying the position and speed of a code strip. Background Technology
[0002] In fields such as industrial automation, rail transportation, elevator control, logistics and precision positioning, it is often necessary to measure the current position and speed of moving targets in real time, continuously and accurately. To achieve this measurement objective, existing technologies commonly employ displacement measurement devices such as encoders, magnetic scales, optical grating scales, or code strips. Among these, code strip measurement schemes are widely used due to their advantages such as simple structure, unrestricted stroke, and low cost.
[0003] Existing code tape detection systems typically use photoelectric sensors to identify the light transmission or reflection characteristics of the code tape surface and combine this with preset encoding rules to calculate the target position information. In some scenarios, high-speed sampling and multi-sensor combinations are also used to achieve continuous scanning. However, existing technologies have significant drawbacks. On the one hand, they are highly dependent on the code tape model, lacking flexibility in adaptation and universal compatibility. On the other hand, they are prone to signal jitter and misjudgment in complex environments such as high-speed motion, vibration, and changes in lighting. Furthermore, the code tape matching process relies on a strict one-to-one correspondence. If there is dirt, obstruction, or sampling deviation in a local code tape, it may lead to matching failure or incorrect positioning, making it difficult to meet the requirements for high-precision and high-stability measurement. Summary of the Invention
[0004] The purpose of this invention is to provide a method and system for identifying the position and speed of a code tape, so as to solve the problems of insufficient adaptability, poor stability in complex environments, and weak anti-interference ability of existing code tape detection systems.
[0005] To achieve the above objectives, in a first aspect of the present invention, a method for identifying the position and speed of a code strip is provided, comprising the following steps: Build and store a standard encoding model adapted to the current recognition program; The code band is continuously scanned and sampled according to a preset sampling period to collect the light intensity change signal that characterizes the physical structure of the code band, and the light intensity change signal is converted into a discrete one-dimensional time-series photoelectric signal. The one-dimensional time-series photoelectric signal is preprocessed; A continuous sampling frame matching method with a multi-level filtering fault tolerance mechanism is adopted to compare the preprocessed one-dimensional time-series photoelectric signal with the standard coding model to determine the absolute and precise positions of the current scan segment in the code band. The moving speed of the target is calculated based on the displacement change and sampling period of the matching results of consecutive sampled frames.
[0006] Furthermore, in the code band position and speed recognition method, the step of constructing the standard coding model includes: obtaining the physical structure parameters of the target code band, performing adaptive translation on the physical structure parameters, converting them into a data coding format that the program can recognize, and generating a standard coding model that is adapted to the current recognition program.
[0007] Furthermore, in the aforementioned code band position and speed identification method, the method for obtaining the physical structure parameters of the target code band includes: slowly scanning and acquiring the target code band through a photoelectric sensing unit, or directly reading the design drawings of the target code band.
[0008] Furthermore, in the aforementioned code band position and speed identification method, the physical structure parameters include the hole or non-hole distribution pattern of the code band and the physical pitch.
[0009] Furthermore, in the code band position and speed recognition method, the one-dimensional time-series photoelectric signal is collected by the receiving end of the photoelectric sensing unit. The spatial distribution of the one-dimensional time-series photoelectric signal corresponds to the physical structure of the code band in the current scanning segment, and the time dimension is associated with the motion state of the moving target.
[0010] Furthermore, in the aforementioned code band position and speed recognition method, the preprocessing includes at least one of noise filtering, light intensity normalization processing, or edge enhancement processing.
[0011] Furthermore, in the aforementioned code band position and speed identification method, the multi-level filtering fault-tolerant mechanism, while ensuring the uniqueness of the matching, allows for a preset range of local errors between the preprocessed one-dimensional time-series photoelectric signal and the standard coding model. The local errors include signal deviations caused by at least one of code band contamination, sampling deviation, illumination fluctuation, or mechanical jitter.
[0012] Furthermore, in the aforementioned code strip position and speed recognition method, after calculating the running speed of the moving target, the method further includes a step of correcting the speed result, including: A multi-frame smoothing algorithm is used to perform mean filtering on the sampled frame velocity data of a consecutive preset number of frames; A fitting prediction model is established based on the velocity change trend of historical continuous sampling frames, and the current velocity value is corrected.
[0013] In a second aspect of the invention, a code band position and speed identification system is also provided, comprising: The model building and storage unit is used to build and store a standard encoding model that is adapted to the current recognition program. The signal acquisition unit is used to continuously scan and sample the code band according to a preset period, acquire the light intensity change signal that characterizes the physical structure of the code band, and convert the light intensity change signal into a discrete one-dimensional time-series photoelectric signal. A signal preprocessing unit is used to preprocess the one-dimensional time-series photoelectric signal; The positioning unit is used to compare the preprocessed one-dimensional time-series photoelectric signal with the standard coding model using a continuous sampling frame matching method with a multi-level filtering fault tolerance mechanism, in order to determine the absolute and precise position of the current scan segment in the code band. And a velocity measurement unit, used to calculate the running speed of the moving target based on the displacement change and sampling period of the continuous sampling frame matching results.
[0014] Furthermore, the code tape position and speed identification system also includes a speed correction unit, which is used to correct the running speed calculated by the speed measuring unit. The model building storage unit is also used to obtain the physical structure parameters of the target code band through slow scanning acquisition or drawing reading, and to perform adaptive translation and format conversion on the physical structure parameters to generate a standard coding model.
[0015] Compared with the prior art, the present invention has at least the following technical effects: This invention improves the universal adaptability to different code band models by constructing a standard coding model adapted to the current recognition program, thereby reducing dependence on specific code band models. Simultaneously, it employs a continuous sampling frame matching method with a multi-level filtering fault-tolerance mechanism, which not only effectively resists signal jitter and misjudgment problems caused by complex environments such as high-speed motion, vibration, and changes in lighting, but also avoids matching failures or incorrect positioning due to local code band contamination, occlusion, or sampling deviations. Combined with pre-processed photoelectric signal comparison and velocity calculation based on displacement change and sampling period, it can achieve real-time, continuous, and high-precision measurement of the absolute position, precise position, and running speed of moving targets, meeting the requirements for measurement accuracy and stability in fields such as industrial automation. Attached Figure Description
[0016] Figure 1 This is a flowchart of a method for identifying the code band position and speed in one embodiment of the present invention; Figure 2 This is a schematic diagram illustrating the photoelectric scanning working principle for identifying code band position and speed in one embodiment of the present invention; Figure 3 This is a schematic diagram of the physical structure distribution of a general-purpose code band in one embodiment of the present invention. Detailed Implementation
[0017] The following will describe in more detail a method and system for identifying code band position and speed according to the present invention, with reference to the accompanying diagrams, which illustrate preferred embodiments of the invention. It should be understood that those skilled in the art can modify the invention described herein while still achieving its advantageous effects. Therefore, the following description should be understood as being of general knowledge to those skilled in the art and is not intended to limit the invention.
[0018] For clarity, not all features of the actual embodiments are described. In the following description, well-known functions and structures are not detailed in detail, as they would obscure the invention with unnecessary detail. It should be understood that in the development of any actual embodiment, numerous implementation details must be made to achieve the developer's specific objectives, such as changes from one embodiment to another according to limitations related to the system or business. Furthermore, it should be understood that such development work may be complex and time-consuming, but is merely routine work for those skilled in the art.
[0019] The invention is described more specifically by way of example in the following paragraphs with reference to the accompanying drawings. The advantages and features of the invention will become clearer from the following description. It should be noted that the drawings are in a very simplified form and use non-precise proportions, and are only used to facilitate and clarify the illustration of the embodiments of the invention.
[0020] Based on the teachings of this specification, those skilled in the art can form new technical solutions through cross-combination of different implementation methods without creating technical contradictions. Such variations should all be considered to fall within the protection scope of this invention.
[0021] Example 1 In industrial production and equipment control scenarios, real-time monitoring of the position and velocity of moving targets is a core requirement for ensuring stable equipment operation and improving control accuracy. Existing technologies, such as code-based measurement schemes, are widely used due to their simple structure and low cost. However, they suffer from drawbacks such as poor adaptability, weak anti-interference capabilities, poor matching robustness, and limited accuracy in position and velocity calculation, making it difficult to meet the precise measurement needs under complex operating conditions.
[0022] In view of this, this embodiment proposes a method for identifying code band position and speed, which solves the problems of existing technologies through a standard coding model and optimized sampling and matching strategies. Figure 1 As shown, the steps of this method for identifying the position and speed of the code band are as follows: Step S1: Construct and store a standard encoding model adapted to the current recognition program; Step S2: Perform continuous beam scanning sampling on the code band according to the preset sampling period, collect the light intensity change signal that characterizes the physical structure of the code band, and convert the light intensity change signal into a discrete one-dimensional time-series photoelectric signal; Step S3: Preprocess the one-dimensional time-series photoelectric signal; Step S4: Using a continuous sampling frame matching method with a multi-level filtering fault tolerance mechanism, the preprocessed one-dimensional time-series photoelectric signal is compared with the standard coding model to determine the absolute and precise positions of the current scan segment in the code band; Step S5: Calculate the running speed of the moving target based on the displacement change and sampling period of the matching results of continuous sampling frames.
[0023] It should be noted that this embodiment uses a general-purpose photoelectric sensor reader as the detection device (hereinafter referred to as "sensor reader"). Figure 2 The sensor read head integrates a photoelectric emitting unit and a photoelectric receiving unit. The photoelectric emitting unit is used to emit a stable photoelectric beam into the code tape, and the photoelectric receiving unit uses a high-speed photoelectric sensing component to collect the light intensity signal formed by the transmission of the code tape.
[0024] For step S1, the steps of constructing the standard coding model include: obtaining the physical structure parameters of the target code band, performing adaptive translation on the physical structure parameters, converting them into a data coding format that the program can recognize, and generating a standard coding model that is adapted to the current recognition program.
[0025] In this embodiment, the target code tape is an industrial general-purpose code tape, including any one of incremental code tape, absolute code tape, and hybrid code tape. The physical structural parameters of the target code tape include the perforation or non-perforation distribution pattern (e.g., a cycle of 30-100mm, the specific number and arrangement of perforations and non-perforations can be flexibly determined according to the actual code tape model) and the physical pitch (i.e., the distance between the centers of adjacent feature holes, ranging from 5-20mm). Figure 3 For the Figure 2 A schematic diagram of the physical structure distribution of the code bands obtained by scanning.
[0026] Furthermore, there are two possible methods for obtaining the physical structure parameters of the target codeband: Method 1: Slow scanning and acquisition of the target code band via a photoelectric sensing unit. Specifically, the sensor read head is fixed to a dedicated calibration fixture. The fixture controls the sensor read head to move at a constant speed of 0.05-0.2 m / s along the entire code band. During this process, the sensor's transmitting unit continuously emits a stable photoelectric beam, and the receiving unit synchronously acquires the light intensity change signal throughout the entire path. Subsequently, the physical structure parameters of the code band are extracted using a signal analysis algorithm.
[0027] Method 2: Directly read the design drawings of the target code tape. It supports common formats such as CAD and PDF, accurately extracting the physical pitch and hole distribution from the drawings to ensure the completeness and accuracy of the obtained physical structural parameters.
[0028] Furthermore, after acquiring the physical structure parameters of the code strip, the system performs adaptive translation on these parameters. Specifically, it converts the aperture distribution pattern of the code strip into standardized binary code, where light-transmitting apertures are marked as "1" and light-blocking areas are marked as "0". Simultaneously, the physical pitch parameters are converted into numerical data in a unified format, ultimately generating a standard encoding model that the program can directly recognize. In this embodiment, the generated standard encoding model is stored in JSON format, enabling rapid retrieval of model parameters during subsequent high-speed matching, ensuring the real-time performance of the entire recognition system.
[0029] In summary, step S1 achieves decoupling between the sensor and the code tape through the adaptation and translation mechanism of the standard coding model, supports unified recognition of code tapes of multiple models and specifications, and can adapt to different application scenarios without changing the sensor.
[0030] For step S2, in practical applications, the sensor reader head needs to be installed on the linkage mechanism of the moving target (such as a device guide rail) first, so that the sensor reader head can move synchronously with the moving target, ensuring the continuity and accuracy of scanning sampling. After installation, the photoelectric emitting unit emits a stable beam of light perpendicular to the direction of movement onto the code tape surface, and the photoelectric receiving unit arranged coaxially with it collects the light intensity change signal after the code tape is transmitted in real time. The light-transmitting area will form a high light intensity signal, and the light-blocking area will correspond to a low light intensity signal. This difference in light intensity directly reflects the physical structure distribution of the code tape.
[0031] In this embodiment, the sampling period needs to be set according to the actual measurement accuracy requirements and can be flexibly adjusted within the range of 0.1ms-10ms. The system will continuously sample the light intensity signal output by the receiving unit according to the set sampling period. At the same time, the system accurately obtains the motion direction (forward or reverse) of the moving target through the direction detection module, and combined with the scanning beat synchronized with the sampling period, further maps the temporally continuous light intensity sampling signal into spatial sampling points. Each sampling point uniquely corresponds to a fixed physical position on the code band surface, and the continuous sampling points will naturally form a discretized data sequence along the motion direction, ultimately forming a one-dimensional temporal photoelectric signal.
[0032] Furthermore, the spatial distribution of the one-dimensional temporal photoelectric signal corresponds to the physical structure of the code band in the current scanning segment, and the time dimension is related to the motion state of the moving target.
[0033] Specifically, in the spatial dimension, the amplitude of the signal sampling point is a standard voltage signal of 0-5V. Its level directly corresponds to the physical structure of the code band at the current scanning position. High amplitude signals correspond to the light transmission characteristics of the code band, while low amplitude signals correspond to the light blocking characteristics, achieving a precise mapping between the physical structure of the code band and the electrical signal. In the temporal dimension, the continuous change pattern of the signal is strongly correlated with the motion state of the moving target. Specifically, the faster the target moves, the higher the frequency of signal amplitude change per unit time.
[0034] For step S3, the preprocessing includes at least one of noise filtering, light intensity normalization, or edge enhancement.
[0035] Specifically, noise filtering is performed to address common problems in industrial environments such as electromagnetic interference and mechanical vibration. For example, median filtering or Gaussian filtering algorithms are used, where the filtering window size can be dynamically adjusted according to the signal noise intensity, ranging from 3 to 7. This algorithm filters out random noise in the signal, making the curve of the one-dimensional time-series photoelectric signal smoother and preventing noise from masking the physical characteristics of the code band.
[0036] To address the fluctuations in light intensity signal amplitude caused by changes in illumination (such as differences between indoor and outdoor lighting and attenuation of equipment light sources), a maximum-minimum normalization algorithm is employed to uniformly map the original amplitude of all sampling points to a standard range of 0-1. This normalization operation eliminates the impact of illumination changes on signal amplitude, ensuring that the same physical feature exhibits consistent signal characteristics under different lighting conditions, thus improving the stability of subsequent matching.
[0037] To further enhance the recognizability of the boundary between the light-transmitting and light-blocking areas of the code band, edge enhancement processing can also be performed. In this embodiment, a gradient operator or Sobel operator is used to perform edge detection on the normalized signal. By enhancing the signal abrupt change characteristics of the boundary region, the boundary between the perforated and non-perforated areas of the code band becomes clearer, thereby improving the accuracy of feature recognition in the subsequent matching process and avoiding matching deviations caused by blurred boundaries.
[0038] After the preprocessing operation in step S3, the one-dimensional time-series optoelectronic signal can retain the core physical structure characteristics of the code band to the greatest extent, filter out the influence of various adverse factors, and provide high-quality and high-reliability data support for the multi-level filtering and fault-tolerant matching in the subsequent step S4.
[0039] For step S4, the system first performs frame segmentation on the preprocessed one-dimensional time-series photoelectric signal. In this embodiment, a continuous sampling frame sequence is constructed according to the rule of 50-200 sampling points per frame (the frame length can be dynamically adjusted according to the period of the code band). Each sampling frame corresponds to a local segment of the code band.
[0040] During the matching process, the system calls the standard coding model stored in step S1 and uses a multi-level filtering and fault-tolerance mechanism to perform step-by-step matching on consecutive sampled frames. First, a coarse matching stage is performed. Using a fast correlation algorithm, the 0-1 encoded sequence of each frame (derived from a threshold based on normalized amplitude) is compared with the periodic sequence of the standard coding model, filtering out candidate regions with a matching degree of no less than 75%, thus quickly narrowing the matching range and significantly improving overall matching efficiency. Then, the system enters the second-level fine matching stage, using dynamic time warping (DTW) or template matching algorithms to perform refined comparisons on the candidate regions. Simultaneously, a fault-tolerance mechanism is enabled, allowing for local errors within a preset range (the error threshold can be flexibly set according to the allowable error range of the codeband itself, typically 2-5 sampling points) while ensuring the uniqueness of the matching result. These local errors can effectively cover common signal deviation problems in practical application scenarios, such as local codeband contamination (e.g., dust obstruction, slight wear), sampling deviations (e.g., signal offset caused by installation gaps), light fluctuations, and mechanical jitter. Finally, the matching results of consecutive frames are smoothed through multiple levels using Kalman filtering or sliding window filtering algorithms to eliminate instantaneous misjudgments and ensure the stability of the matching results.
[0041] After matching is completed, the system will further determine the absolute and precise positions of the target. The absolute position is determined based on the fine matching results. By comparing, the starting coordinates of the codeband segment corresponding to the current sampling frame within the entire codeband are determined. For example, if the nth frame matches the 1200mm-1300mm region of the standard coding model, then the starting point of the absolute position of this segment is 1200mm. The precise position requires interpolation calculations on the sampling points within the current frame (supporting linear interpolation or cubic spline interpolation). The coordinates are further refined by combining the signal characteristics of the matching region, ultimately obtaining the precise coordinates corresponding to the current sensor readhead (e.g., 1203.42mm).
[0042] For step S5, in the initial velocity calculation stage, the system extracts the precise position data corresponding to two adjacent frames based on the matching results of continuously sampled frames, calculates the position difference Δs between the two frames, and then combines it with the preset sampling period T to calculate the instantaneous velocity using the velocity formula v=Δs / T. For example, if the precise position of the nth frame is 1203.42mm and the precise position of the (n+1)th frame is 1207.42mm, then the position difference Δs is 4mm. When the sampling period T is set to 1ms (i.e., 0.001s), the initial instantaneous velocity v=4mm / 0.001s=4000mm / s, which is equivalent to 4m / s.
[0043] To further improve the stability and accuracy of velocity measurement, a two-step correction of the initial velocity is required. The first step is multi-frame smoothing, employing a sliding window mean filtering algorithm. Initial velocity data from the most recent 3-10 frames (e.g., 4.0 m / s, 4.1 m / s, 3.9 m / s, 4.0 m / s) are selected, and the average of these data is calculated (in the example, the average is (4.0 + 4.1 + 3.9 + 4.0) / 4 = 4.0 m / s), effectively filtering out errors caused by instantaneous velocity fluctuations. The second step is fitting prediction correction. Based on smoothed velocity data from the previous 10-20 frames, a linear regression or exponential fitting prediction model is established to analyze the velocity change trend of the moving target (e.g., uniform speed, uniform acceleration, or uniform deceleration). If the initial velocity of the current frame deviates from this trend (e.g., the model predicts a uniform speed of 4.0 m / s, while the current initial velocity is 4.3 m / s), the model is used to correct the velocity value, ensuring consistency in the velocity results.
[0044] Finally, the corrected speed data will be output to the industrial control system in real time. The data update cycle is consistent with the sampling cycle, which can fully meet the needs of various industrial equipment for real-time control of motion speed and ensure the accurate execution of control commands.
[0045] Furthermore, the theoretical maximum supported speed of the system is calculated using the formula Vmax = Error × FrameData, where Error is the maximum positional error allowed by the matching algorithm, with its upper limit limited by the minimum resolution unit of the code band, and FrameData is the system's real-time processing frame rate. Simply put, the larger the maximum allowed positional error and the higher the real-time processing frame rate, the faster the maximum measurement speed supported by the system. In this embodiment, when Error is 5 and FrameData is 1000 frames / second, the theoretical maximum supported speed can reach 5000mm / s (i.e., 5m / s), and this speed can be further improved by adjusting the sampling data scale, optimizing the algorithm, or increasing the processor's computing power, which is sufficient to meet the measurement needs of high-speed moving targets.
[0046] In summary, this embodiment improves the universal adaptability to different code band models by constructing a standard coding model adapted to the current recognition program, thereby reducing dependence on specific code band models. Simultaneously, the continuous sampling frame matching method with a multi-level filtering fault-tolerance mechanism not only effectively resists signal jitter and misjudgment problems caused by complex environments such as high-speed motion, vibration, and changes in lighting, but also avoids matching failures or incorrect positioning caused by local code band contamination, occlusion, or sampling deviations. Combined with pre-processed photoelectric signal comparison and velocity calculation based on displacement change and sampling period, it can achieve real-time, continuous, and high-precision measurement of the absolute position, precise position, and running speed of moving targets, meeting the requirements for measurement accuracy and stability in fields such as industrial automation.
[0047] Example 2 This embodiment provides a code strip position and velocity recognition system, applicable to various scenarios requiring real-time measurement of moving targets, such as industrial automation, logistics transportation, and precision positioning. Through the collaborative work of various functional units, it achieves high-precision and highly robust position and velocity recognition. The system includes a model building and storage unit, a signal acquisition unit, a signal preprocessing unit, a positioning unit, and a velocity measurement unit.
[0048] The model building and storage unit is used to build and store a standard coding model adapted to the current recognition program. It can obtain the physical structure parameters of the target code band in two ways: first, by controlling the photoelectric sensing component to slowly scan the target code band, collecting and extracting core parameters such as aperture / non-aperture distribution patterns and physical pitch; second, by directly reading the design drawings of the target code band to obtain complete structural parameters and allowable error ranges. After obtaining the parameters, this unit performs adaptive translation and format conversion, transforming the physical structure information into a standardized data format recognizable by the program, generating a standard coding model adapted to the current recognition program, and storing the model in a high-speed storage module to provide fast access support for subsequent matching processes.
[0049] The signal acquisition unit is used to continuously scan and sample the code band according to a preset period, acquiring light intensity variation signals that characterize the physical structure of the code band, and converting the light intensity variation signals into discrete one-dimensional time-series photoelectric signals. The signal acquisition unit uses a general-purpose photoelectric sensor read head as the detection device, including a photoelectric transmitting module and a photoelectric receiving module. During operation, the transmitting module emits a stable light beam onto the code band surface at a preset period, and the receiving module acquires the light intensity variation signals after the code band is transmitted in real time. This signal directly characterizes the physical structural features of the code band. Simultaneously, the signal acquisition unit combines the motion direction of the moving target and the scanning rhythm to map the continuous light intensity variation signals into spatial sampling points, converting them into discrete one-dimensional time-series photoelectric signals.
[0050] The signal preprocessing unit is used to preprocess the one-dimensional time-series photoelectric signal. It optimizes the signal to address interference factors such as noise and light intensity fluctuations. Common operations include noise filtering, light intensity normalization, and edge enhancement. These processes effectively improve the signal's feature recognition and eliminate the impact of environmental interference and equipment errors on subsequent matching results.
[0051] The positioning unit employs a continuous sampling frame matching method with a multi-level filtering and fault-tolerant mechanism. It calls the standard encoding model stored in the model construction storage unit and compares it step by step with the preprocessed one-dimensional time-series photoelectric signal. During the matching process, while ensuring the uniqueness of the match, a certain range of local errors (such as signal deviations caused by code band contamination, sampling deviations, etc.) are allowed. Through coarse matching to quickly narrow down the range, fine matching to accurately locate the position, and multi-level filtering to smooth the results, the absolute position of the current scan segment in the entire code band is finally accurately determined, and the precise position is obtained through interpolation calculation.
[0052] Based on the continuous sampling frame matching results output by the positioning unit, the speed measurement unit extracts the displacement change between adjacent frames, and combines it with the preset sampling period of the signal acquisition unit to calculate the running speed of the moving target in real time using the speed calculation formula.
[0053] Furthermore, the system also includes a speed correction unit, which optimizes the initial speed obtained by the speed measurement unit. It uses a multi-frame smoothing algorithm to perform mean filtering on the speed data of a continuous preset number of frames, and at the same time establishes a fitting prediction model based on historical speed change trends to correct the current speed value, effectively filtering out instantaneous fluctuations and improving the stability and accuracy of speed measurement.
[0054] The above are merely preferred embodiments of the present invention and do not constitute any limitation on the present invention. Any equivalent substitutions or modifications made by those skilled in the art to the technical solutions and content disclosed in the present invention without departing from the scope of the present invention shall be deemed to have remained within the protection scope of the present invention.
Claims
1. A method for identifying the position and speed of a code strip, characterized in that, Includes the following steps: Build and store a standard encoding model adapted to the current recognition program; The codeband is continuously scanned and sampled according to a preset sampling period to collect the light intensity change signal that characterizes the physical structure of the codeband, and the light intensity change signal is converted into a discrete one-dimensional time-series photoelectric signal. The one-dimensional time-series photoelectric signal is preprocessed; A continuous sampling frame matching method with a multi-level filtering fault tolerance mechanism is adopted to compare the preprocessed one-dimensional time-series photoelectric signal with the standard coding model to determine the absolute and precise positions of the current scan segment in the code band. The running speed of the moving target is calculated based on the displacement change and sampling period of the matching results of consecutive sampling frames.
2. The method for identifying the code strip position and speed according to claim 1, characterized in that, The steps for constructing the standard coding model include: obtaining the physical structure parameters of the target code band, performing adaptive translation on the physical structure parameters, converting them into a data coding format that the program can recognize, and generating a standard coding model that is adapted to the current recognition program.
3. The method for identifying the position and speed of the code strip according to claim 2, characterized in that, The methods for obtaining the physical structure parameters of the target code band include: slowly scanning and acquiring the target code band through a photoelectric sensing unit, or directly reading the design drawings of the target code band.
4. The method for identifying the position and speed of the code strip according to claim 2, characterized in that, The physical structural parameters include the hole or non-hole distribution pattern of the code band and the physical pitch.
5. The method for identifying the position and speed of the code strip according to claim 1, characterized in that, The one-dimensional time-series photoelectric signal is acquired by the receiving end of the photoelectric sensing unit. The spatial distribution of the one-dimensional time-series photoelectric signal corresponds to the physical structure of the code band of the current scanning segment, and the time dimension is related to the motion state of the moving target.
6. The method for identifying the position and speed of the code strip according to claim 1, characterized in that, The preprocessing includes at least one of noise filtering, light intensity normalization, or edge enhancement.
7. The method for identifying the position and speed of the code strip according to claim 1, characterized in that, The multi-level filtering fault-tolerance mechanism, while ensuring the uniqueness of the matching, allows for local errors within a preset range between the preprocessed one-dimensional time-series photoelectric signal and the standard coding model. The local errors include signal deviations caused by at least one of code band contamination, sampling deviation, illumination fluctuation, or mechanical jitter.
8. The method for identifying the position and speed of the code strip according to claim 1, characterized in that, After calculating the running speed of the moving target, the method further includes a step of correcting the speed result, including: A multi-frame smoothing algorithm is used to perform mean filtering on the sampled frame velocity data of a consecutive preset number of frames; A fitting prediction model is established based on the velocity change trend of historical continuous sampling frames, and the current velocity value is corrected.
9. A system for identifying the position and speed of a code strip, characterized in that, include: The model building and storage unit is used to build and store a standard encoding model that is adapted to the current recognition program. The signal acquisition unit is used to continuously scan and sample the code band according to a preset period, acquire the light intensity change signal that characterizes the physical structure of the code band, and convert the light intensity change signal into a discrete one-dimensional time-series photoelectric signal. A signal preprocessing unit is used to preprocess the one-dimensional time-series photoelectric signal; The positioning unit is used to compare the preprocessed one-dimensional time-series photoelectric signal with the standard coding model using a continuous sampling frame matching method with a multi-level filtering fault tolerance mechanism to determine the absolute and precise position of the current scan segment in the code band. And a velocity measurement unit, used to calculate the running speed of the moving target based on the displacement change and sampling period of the continuous sampling frame matching results.
10. The code tape position and speed identification system according to claim 9, characterized in that, It also includes a speed correction unit, used to correct the running speed calculated by the speed measuring unit; The model building storage unit is also used to obtain the physical structure parameters of the target code band through slow scanning acquisition or drawing reading, and to perform adaptive translation and format conversion on the physical structure parameters to generate a standard coding model.