[go: up one dir, main page]

CN113469039B - High-speed direction identification method for grating ruler coding signals - Google Patents

High-speed direction identification method for grating ruler coding signals Download PDF

Info

Publication number
CN113469039B
CN113469039B CN202110738533.XA CN202110738533A CN113469039B CN 113469039 B CN113469039 B CN 113469039B CN 202110738533 A CN202110738533 A CN 202110738533A CN 113469039 B CN113469039 B CN 113469039B
Authority
CN
China
Prior art keywords
data
result
displacement
reverse
buffer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110738533.XA
Other languages
Chinese (zh)
Other versions
CN113469039A (en
Inventor
李�杰
禹诚
杜云福
周远成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN202110738533.XA priority Critical patent/CN113469039B/en
Publication of CN113469039A publication Critical patent/CN113469039A/en
Application granted granted Critical
Publication of CN113469039B publication Critical patent/CN113469039B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2218/00Aspects of pattern recognition specially adapted for signal processing
    • G06F2218/08Feature extraction
    • G06F2218/10Feature extraction by analysing the shape of a waveform, e.g. extracting parameters relating to peaks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Optical Transform (AREA)
  • Indicating Or Recording The Presence, Absence, Or Direction Of Movement (AREA)

Abstract

The invention discloses a high-speed direction identification method of a grating ruler coding signal, which comprises the following steps: (1) a, B buffering two phase signals; (2) a, B analyzing the two phase signals; (3) collecting A, B a signal data set; (4) extracting features; (5) creating a local solution; (6) constructing a decision tree; (7) pruning a decision tree; (8) merging decision trees; (9) and (6) processing the result. The method for identifying the high-speed direction of the photoelectric signal judges the cache data through a decision tree algorithm, obtains the judgment results of forward displacement and reverse displacement, can judge the direction result and can judge the effectiveness of the data, and quickly calculates the result through the method and a parallel decision tree method.

Description

High-speed direction identification method for grating ruler coding signals
Technical Field
The invention relates to the technical field of signal identification methods, in particular to a high-speed direction identification method for a grating ruler coding signal.
Background
An optical device consisting of a large number of parallel slits of equal width and equal spacing is called a grating. The common grating is made by etching a large number of parallel notches on a glass sheet, the notches are opaque parts, and the smooth part between the two notches can transmit light, which is equivalent to a slit. The refined grating has thousands or even tens of thousands of nicks engraved within 1cm of width. Such a grating utilizing diffraction of transmitted light is called a transmission grating, and also a grating utilizing diffraction of reflected light between two scores, such as a grating in which a plurality of parallel scores are engraved on a surface coated with a metal layer and a smooth metal surface between two scores can reflect light, is called a reflection grating. The grating is a common displacement sensor, and the currently used single-chip microcomputer encoder interface cannot stably process high-speed grating signals.
Disclosure of Invention
The present invention provides a method for identifying a high-speed direction of a coded signal of a grating ruler, so as to solve the problems proposed in the background art.
In order to achieve the purpose, the invention provides the following technical scheme: a high-speed direction identification method of a grating ruler coding signal comprises the following steps:
(1) a, B buffering two phase signals;
(2) analyzing A, B the two phase signals;
(3) collecting A, B a signal data set;
(4) extracting features;
(5) creating a local solution;
(6) constructing a decision tree;
(7) pruning a decision tree;
(8) merging decision trees;
(9) and (4) processing the result,
the method comprises the following specific steps:
the method comprises the following steps of carrying out cache preprocessing on a grating signal, carrying out further algorithm processing on processed data, wherein an algorithm output result is a direction, and direction results have three conditions, namely a forward condition, a reverse condition and an error condition;
and outputting 1 if the local solution conditions of forward displacement of the data set meet, otherwise outputting 0, outputting 1 if the local solution conditions of reverse displacement meet the same conditions, logically or respectively performing exclusive OR on the forward and reverse displacement local solutions to obtain a data validity result, and logically or using the reverse displacement or forward result as a direction judgment result. And when the data valid result is 1, the logical OR of the reverse result represents reverse displacement, otherwise, the logical OR of the forward result represents forward displacement, and similarly, when the data valid result is 1, the logical OR of the forward result represents forward displacement, otherwise, the logical OR of the forward result represents reverse displacement.
Further, in the step (1), the data of the buffer 1 is moved to the buffer 2, and then the data of the phase a is loaded into the buffer 1, and the data of the phase B is moved to the buffer 4, and then the data of the phase B is loaded into the buffer 3, in the same way as the data of the phase a.
Compared with the prior art, the invention has the beneficial effects that: the high-speed direction identification method of the photoelectric signal judges the cache data through a decision tree algorithm, obtains the judgment results of forward displacement and reverse displacement, can judge the direction result and can judge the effectiveness of the data, and quickly calculates the result by utilizing a parallel decision tree method through the method.
Drawings
FIG. 1 is a diagram of the steps performed by the method of the present invention;
FIG. 2 is a branch decision diagram of a forward and reverse shift local solution of the present invention;
FIG. 3 is a process diagram of the forward and reverse algorithm of the present invention;
FIG. 4 is a forward and reverse algorithm pruning merge graph of the present invention;
FIG. 5 is a process diagram of the forward algorithm of the present invention;
FIG. 6 is a diagram of the reverse algorithm process of the present invention;
FIG. 7 is a forward and reverse algorithm merge diagram of the present invention.
Detailed Description
In order to make the technical means, the creation characteristics, the achievement purposes and the effects of the invention easy to understand, the invention is further described with the specific embodiments.
The technical solutions in the embodiments of the present invention will be described clearly and completely below, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1-7, the present invention provides a method for identifying a high-speed direction of a coded signal of a grating ruler, comprising the following steps:
(1) caching A, B two phase signals, moving the data of buffer 1 to buffer 2, then loading the A phase data into buffer 1, and moving the data of buffer 3 to buffer 4, then loading the B phase data into buffer 3, wherein the B phase data has the same caching method as the A phase data;
(2) analyzing A, B the two phase signals;
(3) collecting A, B a signal data set;
(4) extracting features;
(5) creating a local solution;
(6) constructing a decision tree;
(7) pruning a decision tree;
(8) merging decision trees;
(9) and (4) processing the result,
the method comprises the following specific steps:
the data in the buffers 1, 2, 3 and 4 only have logic '0' and '1', and the data sets formed in the buffers are shown in the following tables:
serial number Cache 1 Cache 2 Cache 3 Buffer 4 Results
0 0 0 0 0 Invalidation
1 0 0 0 1 Reverse displacement
2 0 0 1 0 Positive displacement of
3 0 0 1 1 Invalidation
4 0 1 0 0 Positive displacement of
5 0 1 0 1 Invalidation
6 0 1 1 0 Invalidation
7 0 1 1 1 Reverse displacement
8 1 0 0 0 Displacement in the reverse direction
9 1 0 0 1 Invalidation
10 1 0 1 0 Invalidation
11 1 0 1 1 Positive displacement of
12 1 1 0 0 Invalidation
13 1 1 0 1 Positive displacement of
14 1 1 1 0 Reverse displacement
15 1 1 1 1 Invalidation
The data set has eight invalid results, four forward displacement data and four reverse displacement data, local solution is needed to be carried out on the data, the data are divided into a forward displacement local solution and a reverse displacement local solution, and only two results, namely a forward local solution and an error result, exist in the forward displacement local solution; in the reverse-shifted local solution, there are only two results, reverse local solution and error. In both local solutions, errors are used as data validity bases for the local solutions. Reference is made to figures 5 and 6.
The method comprises the following steps of carrying out cache preprocessing on signals of a grating, carrying out further algorithm processing on processed data, wherein the output result of the algorithm is direction, the direction result has three conditions, namely forward, reverse and error, and because the node part of the local solution algorithm can be shared, two local solutions can be integrated according to the branch boundary algorithm to form a node array diagram as shown in the attached figure 7;
and outputting 1 if the local solution conditions of forward displacement of the data set meet, otherwise outputting 0, outputting 1 if the local solution conditions of reverse displacement meet the same conditions, logically or respectively performing exclusive OR on the forward and reverse displacement local solutions to obtain a data validity result, and logically or using the reverse displacement or forward result as a direction judgment result. And when the data valid result is 1, the logical OR of the reverse result represents reverse displacement, otherwise, the logical OR of the forward result represents forward displacement, and similarly, when the data valid result is 1, the logical OR of the forward result represents forward displacement, otherwise, the logical OR of the forward result represents reverse displacement.
The specific steps of (4) feature extraction, (5) local solution creation, (6) decision tree construction, (7) decision tree pruning and (8) decision tree merging are as follows:
(1) data extraction process
The waveform of two-phase signals of the encoder A, B is measured, and data is read once by data jump, wherein the high level is 1, and the low level is 0. The data values are filled into a table, and as shown in a tabular form, the signal change represents A, B signal positive displacement, when the signal change is changed by 1 → 1 → 0 → 0 → 1 → 1 → 1 → 0 → 0, and the signal change of phase a is changed by 0 → 1 → 1 → 0 → 0 → 0.
Figure GDA0003536895490000051
(2) The signal before the signal change can be called an old signal, the signal after the signal change can be called a new signal, and the following data sets can be obtained according to the waveform change:
Figure GDA0003536895490000052
Figure GDA0003536895490000053
(3) the algorithm is divided into a forward displacement local solution and a reverse displacement local solution, and a decision branch of the forward displacement is listed, as shown in figure 2.
(4) Referring to fig. 3, a decision tree for forward and reverse shift local solutions is shown.
(5) Referring to fig. 4, a decision tree is pruned and integrated.
(6) Referring to FIG. 7, the decision tree can process data in parallel and combine results to make the result single.
In addition, when A is not 0, namely a segment of signal is randomly intercepted or a signal is started from 1, the result is the same after the algorithm is processed.
The foregoing is merely an example of the present invention and common general knowledge of known specific structures and features of the embodiments is not described herein in any greater detail. It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein.

Claims (2)

1. A high-speed direction identification method of a grating ruler coding signal comprises the following steps:
(1) a, B buffering two phase signals;
(2) analyzing A, B the two phase signals;
(3) collecting A, B a signal data set;
(4) extracting features;
(5) creating a local solution;
(6) constructing a decision tree;
(7) pruning a decision tree;
(8) merging decision trees;
(9) result processing, characterized by: the method comprises the following specific steps:
the method comprises the following steps of carrying out cache preprocessing on a grating signal, carrying out further algorithm processing on processed data, wherein an algorithm output result is a direction, and direction results have three conditions, namely a forward condition, a reverse condition and an error condition;
outputting 1 if the local solution conditions of forward displacement of the data set meet, otherwise outputting 0, outputting 1 if the local solution conditions of reverse displacement meet the same conditions, outputting 1 if the local solution conditions of forward displacement and reverse displacement meet the same conditions, respectively logically or respectively carrying out exclusive OR on the forward and reverse displacement local solutions to obtain a data validity result, and logically or using the reverse displacement result or the forward result as a direction judgment result; and when the data valid result is 1, the logical OR of the reverse result represents reverse displacement, otherwise, the logical OR of the forward result represents forward displacement, and similarly, when the data valid result is 1, the logical OR of the forward result represents forward displacement, otherwise, the logical OR of the forward result represents reverse displacement.
2. The method for identifying the high-speed direction of the coded signal of the grating ruler according to claim 1, wherein the method comprises the following steps: in the step (1), the data of the buffer 1 is moved to the buffer 2, then the data of the phase A is loaded into the buffer 1, and the data of the phase B is the same as the data of the phase A in the buffer method, the data of the buffer 3 is moved to the buffer 4, and then the data of the phase B is loaded into the buffer 3.
CN202110738533.XA 2021-06-30 2021-06-30 High-speed direction identification method for grating ruler coding signals Active CN113469039B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110738533.XA CN113469039B (en) 2021-06-30 2021-06-30 High-speed direction identification method for grating ruler coding signals

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110738533.XA CN113469039B (en) 2021-06-30 2021-06-30 High-speed direction identification method for grating ruler coding signals

Publications (2)

Publication Number Publication Date
CN113469039A CN113469039A (en) 2021-10-01
CN113469039B true CN113469039B (en) 2022-07-05

Family

ID=77876738

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110738533.XA Active CN113469039B (en) 2021-06-30 2021-06-30 High-speed direction identification method for grating ruler coding signals

Country Status (1)

Country Link
CN (1) CN113469039B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8502137B2 (en) * 2007-09-10 2013-08-06 Cedars-Sinai Medical Center Mass spectrometry systems
CN109040764A (en) * 2018-09-03 2018-12-18 重庆邮电大学 Fast coding algorithm in a kind of HEVC screen content frame based on decision tree
CN110260795A (en) * 2019-05-31 2019-09-20 广东工业大学 A kind of absolute displacement detection method based on increment absolute grating ruler
CN110441259A (en) * 2019-07-24 2019-11-12 暨南大学 A kind of flap optical fiber grating refractive index sensor and its method for sensing
WO2021085918A1 (en) * 2019-10-31 2021-05-06 Asone Co., Ltd. Electronic display board system with modified ethernet network for a plurality of display units
CN112840688A (en) * 2018-10-12 2021-05-25 电装国际美国公司 Passive Entry/Passive Start System Using I and Q Data to Detect Extended-Range Repeater Attacks

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8502137B2 (en) * 2007-09-10 2013-08-06 Cedars-Sinai Medical Center Mass spectrometry systems
CN109040764A (en) * 2018-09-03 2018-12-18 重庆邮电大学 Fast coding algorithm in a kind of HEVC screen content frame based on decision tree
CN112840688A (en) * 2018-10-12 2021-05-25 电装国际美国公司 Passive Entry/Passive Start System Using I and Q Data to Detect Extended-Range Repeater Attacks
CN110260795A (en) * 2019-05-31 2019-09-20 广东工业大学 A kind of absolute displacement detection method based on increment absolute grating ruler
CN110441259A (en) * 2019-07-24 2019-11-12 暨南大学 A kind of flap optical fiber grating refractive index sensor and its method for sensing
WO2021085918A1 (en) * 2019-10-31 2021-05-06 Asone Co., Ltd. Electronic display board system with modified ethernet network for a plurality of display units

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Real-Time Direction Judgment System of Sub-Nanometer Scale Grating Ruler;Simin Li 等;《IEEE Access》;20210531;第9卷;全文 *
基于主动网络的分布式管理模型;王斌 等;《计算机系统应用》;20091231(第8期);全文 *

Also Published As

Publication number Publication date
CN113469039A (en) 2021-10-01

Similar Documents

Publication Publication Date Title
Hauser et al. The effect of ordered characters on phylogenetic reconstruction
CN111861933B (en) Method and device for point cloud denoising based on space division
US8190591B2 (en) Bit string searching apparatus, searching method, and program
CN110728689A (en) Existing railway center line extraction method based on point cloud data
CN110659645B (en) Character recognition method for digital instrument
CN103559689B (en) A kind of point cloud noise spot removal method
CN102063424A (en) Method for Chinese word segmentation
CN113469039B (en) High-speed direction identification method for grating ruler coding signals
CN117235647B (en) Mineral resource investigation business HSE data management method based on edge calculation
CN110428438B (en) Single-tree modeling method and device and storage medium
CN109861746B (en) OTDR curve data analysis method based on wavelet transformation dynamic noise reduction
CN112101351B (en) Text line rotation correction method and device based on projection
CN106682292B (en) A leaf-root structure optimization method based on dimensionality reduction simulated annealing algorithm
CN101251845A (en) Method for performing multi-pattern string match using improved Wu-Manber algorithm
CN111079893B (en) Acquisition method and device for generator network for interference fringe pattern filtering
Elsner et al. Complexity and predictability of hourly precipitation
CN110647647B (en) Closed graph similarity searching method based on time sequence complexity difference
CN104143214A (en) Electronic map polygon triangulation method and device
CN115830587A (en) A fast automatic recognition method for structural planes based on high-precision point cloud data
CN111611975B (en) Partition method of ocean wave components based on two-dimensional ocean wave spectrum
CN101114341A (en) Preprocess method for engineering drawing vectorization recognition system
CN103793886A (en) Image median filtering method based on incomplete rapid sorting algorithm
CN112130166A (en) AGV positioning method and device based on reflector network
Hatton et al. Integration of sapflow velocity in elliptical stems
CN108304467A (en) For matched method between text

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB03 Change of inventor or designer information

Inventor after: Li Jie

Inventor after: Yu Cheng

Inventor after: Du Yunfu

Inventor after: Zhou Yuancheng

Inventor before: Li Jie

Inventor before: Yu Cheng

Inventor before: Du Yunfu

Inventor before: Zhou Yuancheng

CB03 Change of inventor or designer information
GR01 Patent grant
GR01 Patent grant