CN106840245A - A kind of encoder quality determining method and device - Google Patents

A kind of encoder quality determining method and device Download PDF

Info

Publication number
CN106840245A
CN106840245A CN201710203036.3A CN201710203036A CN106840245A CN 106840245 A CN106840245 A CN 106840245A CN 201710203036 A CN201710203036 A CN 201710203036A CN 106840245 A CN106840245 A CN 106840245A
Authority
CN
China
Prior art keywords
output signal
frequency
encoder
testing result
formula
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.)
Granted
Application number
CN201710203036.3A
Other languages
Chinese (zh)
Other versions
CN106840245B (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.)
Shenzhen Yihua Computer Co Ltd
Shenzhen Yihua Time Technology Co Ltd
Shenzhen Yihua Financial Intelligent Research Institute
Original Assignee
Shenzhen Yihua Computer Co Ltd
Shenzhen Yihua Time Technology Co Ltd
Shenzhen Yihua Financial Intelligent Research Institute
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 Shenzhen Yihua Computer Co Ltd, Shenzhen Yihua Time Technology Co Ltd, Shenzhen Yihua Financial Intelligent Research Institute filed Critical Shenzhen Yihua Computer Co Ltd
Priority to CN201710203036.3A priority Critical patent/CN106840245B/en
Publication of CN106840245A publication Critical patent/CN106840245A/en
Application granted granted Critical
Publication of CN106840245B publication Critical patent/CN106840245B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D18/00Testing or calibrating apparatus or arrangements provided for in groups G01D1/00 - G01D15/00

Abstract

The invention belongs to encoder technical field of quality detection, a kind of method and device of encoder quality testing is disclosed, methods described includes:Obtain output signal when encoder works, and output signal when being worked based on the encoder for getting, detect whether the A phases frequency of the output signal and the two-phase relation of B phase frequencies, frequency range, frequency fluctuation and cyclic swing meet default relation or condition, the first testing result, the second testing result, the 3rd testing result and the 4th testing result are determined respectively, determine that the encoder is off quality or abnormal when any one testing result is not to meet.The fourfold correlation parameter of output signal is detected respectively when the present invention is by working encoder, and comprehensive four testing results are as the foundation for judging encoder quality such that it is able to effectively improve accuracy in detection.

Description

A kind of encoder quality determining method and device
Technical field
The invention belongs to encoder technical field of quality detection, more particularly to a kind of encoder quality determining method and dress Put.
Background technology
Encoder (i.e. Encoder) is the sensing that angle, the information of length are digitized output in the way of encoding Device, can be converted into the electric signal that can read, process by physical quantitys such as mechanical displacements.For example:Currency checking module in currency examination device is adopted Position travel distance of the bank note in currency examination device with encoder, and data acquisition to the related sensor of paper money recognition is carried For the function of line synchronising signal, it may be said that be the important component in cash inspecting machine.
Therefore, the height of encoder quality directly influences the quality of the product for applying encoder.But prior art In, easy detection is typically just carried out to the output signal of encoder using oscillograph, then export by manual observation encoder Signal waveform is simply judged that testing result is not accurate enough, and exist detection efficiency difference the drawbacks of.
The content of the invention
In view of this, a kind of encoder quality determining method and device are the embodiment of the invention provides, is used to improve to compiling The accuracy of detection of code device quality testing.
The first aspect of the embodiment of the present invention provides a kind of encoder quality determining method, and methods described includes:
Obtain the output signal when encoder works.
Output signal when being worked based on the encoder for getting, detects the A phases frequency and B phases of the output signal Whether frequency meets default two-phase relation, to determine the first testing result.
Output signal when being worked based on the encoder for getting, detects whether the frequency of the output signal meets Default frequency range, to determine the second testing result.
Output signal when being worked based on the encoder for getting, calculates once described every default time interval The frequency of output signal, based on the every m frequency of the output signal, detects whether the frequency fluctuation of the output signal meets Default frequency fluctuation scope, to determine the 3rd testing result, wherein, the m is the natural number more than 1.
Output signal when being worked based on the encoder for getting, calculates each pulse week of the output signal Phase;Based on the every n pulse cycle of the output signal, detect whether the cyclic swing of the output signal meets default Cyclic swing scope, to determine the 4th testing result, wherein, the n is the natural number more than 1.
If first testing result, second testing result, the 3rd testing result and the 4th detection knot Any one of fruit testing result then judges that the encoder is off quality or abnormal not meet.
The second aspect of the embodiment of the present invention provides a kind of encoder quality detection device, and described device includes:
Signal acquisition module, for obtaining the output signal when encoder works.
First detection module, the output letter when encoder for being got based on the signal acquisition module is worked Number, detect whether the A phases frequency and B phases frequency of the output signal meet default two-phase relation, to determine the first detection knot Really.
Second detection module, the output letter when encoder for being got based on the signal acquisition module is worked Number, detect whether the frequency of the output signal meets default frequency range, to determine the second testing result.
3rd detection module, the output letter when encoder for being got based on the signal acquisition module is worked Number, the frequency of the output signal is calculated once every default time interval, based on the every m frequency of the output signal, Detect whether the frequency fluctuation of the output signal meets default frequency fluctuation scope, to determine the 3rd testing result, wherein, The m is the natural number more than 1.
4th detection module, the output letter when encoder for being got based on the signal acquisition module is worked Number, calculate each pulse cycle of the output signal;Based on the every n pulse cycle of the output signal, institute is detected Whether the cyclic swing for stating output signal meets default cyclic swing scope, to determine the 4th testing result, wherein, the n It is the natural number more than 1.
As a result output module, for based on the first detection module, the second detection module, the 3rd detection module and the 4th The testing result of detection module judges that the encoder is off quality or abnormal, specially:If first testing result, institute Any one of the second testing result, the 3rd testing result and the 4th testing result testing result is stated not meet, Then judge that the encoder is off quality or abnormal.
Therefore, output signal when being worked by obtaining the encoder in technical solution of the present invention, and based on obtaining The output signal when encoder got works, detects the A phases frequency of the output signal and the two-phase of B phase frequencies respectively Whether relation, frequency range, frequency fluctuation and cyclic swing meet default corresponding conditionses, and the first detection knot is determined respectively Really, the second testing result, the 3rd testing result and the 4th testing result, institute is determined when any one testing result is not to meet State encoder off quality or abnormal.Compared with existing quality testing mode, technical solution of the present invention is by encoder The fourfold correlation parameter of output signal is detected respectively during work, and comprehensive four testing results are as judging encoder matter The foundation of amount such that it is able to effectively improve accuracy in detection.
Brief description of the drawings
Technical scheme in order to illustrate more clearly the embodiments of the present invention, below will be to embodiment or description of the prior art Needed for the accompanying drawing to be used be briefly described, it should be apparent that, drawings in the following description are only more of the invention Embodiment, for those of ordinary skill in the art, without having to pay creative labor, can also be according to these Accompanying drawing obtains other accompanying drawings.
Fig. 1 is that encoder quality determining method provided in an embodiment of the present invention realizes flow chart;
Fig. 2 is the structured flowchart of encoder quality detection device provided in an embodiment of the present invention;
Fig. 3 is the part-structure frame of the related fpga chip of encoder quality detection device provided in an embodiment of the present invention Figure.
Specific embodiment
In below describing, in order to illustrate rather than in order to limit, it is proposed that the such as tool of particular system structure, technology etc Body details, thoroughly to understand the embodiment of the present invention.However, it will be clear to one skilled in the art that specific without these The present invention can also be realized in the other embodiments of details.In other situations, omit to well-known system, device, electricity Road and the detailed description of method, in case unnecessary details hinders description of the invention.
In order to illustrate technical solutions according to the invention, illustrated below by specific embodiment combination accompanying drawing.
What Fig. 1 showed encoder quality determining method provided in an embodiment of the present invention realizes flow, and details are as follows, a kind of Encoder quality determining method, the above method is comprised the following steps:
Step S101, obtains output signal when encoder works.
In embodiments of the present invention, above-mentioned encoder can be driven to enter when needing to carry out quality testing to encoder Working condition, performs step S101, that is, before step S101, be may also include in the embodiment of the present invention afterwards:Drive above-mentioned Encoder enters working condition.Or, it is also possible in the course of work of above-mentioned encoder, the execution of triggering step S101, this Place is not construed as limiting.
Step S102, output signal when being worked based on the above-mentioned encoder for getting detects the A phases of above-mentioned output signal Whether frequency and B phases frequency meet default two-phase relation, to determine the first testing result.
In the embodiment of the present invention, output signal when above-mentioned encoder works indicates the speed of encoder rotation, above-mentioned A The phase of phase frequency and B phase frequencies indicates the rotation direction of encoder.Therefore, it can the A phase frequencies according to above-mentioned output signal The uniformity and phase difference of rate and B phase frequencies, are used as judging the foundation of encoder quality.
Specifically, output signal when being worked based on the above-mentioned encoder for getting, detects the A phase frequencies of above-mentioned output signal Whether rate and B phases frequency meet default two-phase relation, if detecting, the A phases frequency and B phase frequencies of above-mentioned output signal meet pre- If two-phase relation, it is determined that the first testing result to meet, if detecting the A phases frequency and B phases frequency of above-mentioned output signal not Meet default two-phase relation, it is determined that the first testing result is not meet.
Flow, optionally, step are realized based on encoder quality determining method provided in an embodiment of the present invention shown in Fig. 1 S102 is specially:Output signal when being worked based on the above-mentioned encoder that gets, detect above-mentioned output signal A phases frequency and Whether B phases frequency is equal and phase difference is 90 degree;If the A phases frequency and B phase frequencies of above-mentioned output signal are equal and phase difference is 90 degree, it is determined that above-mentioned first testing result is to meet;If the A phases frequency and B phase frequencies of above-mentioned output signal be unequal or phase Potential difference is not 90 degree, it is determined that above-mentioned first testing result is not meet.
Step S103, output signal when being worked based on the above-mentioned encoder for getting detects the frequency of above-mentioned output signal Whether rate meets default frequency range, to determine the second testing result.
Specifically, output signal when being worked based on the above-mentioned encoder for getting, calculates the frequency of above-mentioned output signal Whether value, judges said frequencies value in default frequency range, if said frequencies value is in default frequency range, it is determined that Second testing result is to meet, if said frequencies value is not in default frequency range, it is determined that the second testing result is not to be inconsistent Close.
It should be noted that above-mentioned default frequency range, is that for being carried out to frequency range according to the actual requirements is pre- If due to the difference of encoder applies scene, the requirement to encoder quality is also just different, herein to default frequency range not It is construed as limiting.
Flow, optionally, step are realized based on encoder quality determining method provided in an embodiment of the present invention shown in Fig. 1 S103 is specially:Output signal when being worked based on the above-mentioned encoder for getting, whether the frequency of the above-mentioned output signal of detection Coincidence formula one, if the frequency for detecting above-mentioned output signal meets above-mentioned formula one, it is determined that above-mentioned second testing result is Meet, if the frequency for detecting above-mentioned output signal does not meet above-mentioned formula one, it is determined that above-mentioned second testing result is not to be inconsistent Close.
Wherein, above-mentioned formula one is:flow(1-δ1)<f<fup(1+δ1)。
In above-mentioned formula one, f represents the frequency of above-mentioned output signal, fupRepresent the theoretical work frequency of above-mentioned encoder Higher limit, flowRepresent the lower limit of the theoretical work frequency of above-mentioned encoder;δ1For it is default be not less than 0 it is first relative Error threshold.
It should be noted that above-mentioned δ1Value is smaller, represents that default frequency range is smaller, and examination criteria is higher, to compiling Code device quality requirement is higher.Work as δ1For 0 when, represent that default frequency range is the theoretical work frequency more than above-mentioned encoder Lower limit, and the theoretical work frequency less than encoder higher limit.
Step S104, output signal when being worked based on the above-mentioned encoder for getting, every default time interval meter The frequency of above-mentioned output signal is calculated once, based on the every m frequency of above-mentioned output signal, the frequency wave of above-mentioned output signal is detected It is dynamic whether to meet default frequency fluctuation scope, to determine the 3rd testing result, wherein, above-mentioned m is the natural number more than 1.
Specifically, output signal when being worked based on the above-mentioned encoder for getting, is calculated every default time interval Once the frequency of above-mentioned output signal, based on the every m frequency of above-mentioned output signal, detects the frequency fluctuation of above-mentioned output signal Whether default frequency fluctuation scope is met, if the frequency fluctuation of above-mentioned output signal meets default frequency fluctuation scope, The 3rd testing result is determined to meet, if the frequency fluctuation of above-mentioned output signal does not meet default frequency fluctuation scope, that is, is surpassed Default frequency fluctuation scope is gone out, it is determined that the 3rd testing result is not meet.
It should be noted that above-mentioned default frequency fluctuation scope is also for carrying out according to the actual requirements preset, by In the difference of encoder applies scene, the requirement to encoder quality is also just different, therefore to the frequency of encoder output Fluctuation range requirement is also just different, and default frequency fluctuation scope is not construed as limiting herein.
It should be noted that default time interval is smaller, the frequency for calculating identified output signal is more accurate, then frequency The testing result of rate fluctuation is more accurate;Meanwhile, in the case where default time interval is constant, the value of m is bigger, then frequency wave Dynamic testing result is also more accurate.
Flow, optionally, step are realized based on encoder quality determining method provided in an embodiment of the present invention shown in Fig. 1 S104 is specially:Output signal when being worked based on the above-mentioned encoder for getting, detects the frequency fluctuation of above-mentioned output signal Whether coincidence formula two, if the frequency fluctuation for detecting above-mentioned output signal meets above-mentioned formula two, it is determined that it is above-mentioned 3rd inspection Result is surveyed to meet, if the frequency fluctuation for detecting above-mentioned output signal does not meet above-mentioned formula two, it is determined that above-mentioned 3rd inspection Result is surveyed not meet.
Wherein, above-mentioned formula two is:(fmax-fmin)/fave2
In above-mentioned formula two, fmaxRepresent the maximum in the m frequency of above-mentioned output signal, fminRepresent that m is individual above-mentioned Minimum value in the frequency of output signal, faveRepresent the m average value of the frequency of above-mentioned output signal;δ2For default not small In 0 the second relative error threshold value.
It should be noted that above-mentioned δ2Value is smaller, represents that default frequency fluctuation scope is smaller, and examination criteria is higher, It is higher to encoder quality requirement.Work as δ1For 0 when, represent that the frequency of m above-mentioned output signals is equal, examination criteria highest.
Step S105, output signal when being worked based on the above-mentioned encoder for getting calculates the every of above-mentioned output signal The individual pulse cycle;Based on the every n pulse cycle of above-mentioned output signal, whether the cyclic swing of the above-mentioned output signal of detection Meet default cyclic swing scope, to determine the 4th testing result, wherein, above-mentioned n is the natural number more than 1.
Specifically, output signal when being worked based on the above-mentioned encoder for getting, calculates each of above-mentioned output signal The pulse cycle;Based on the every n pulse cycle of above-mentioned output signal, detect whether the cyclic swing of above-mentioned output signal accords with Default cyclic swing scope is closed, if the cyclic swing of above-mentioned output signal meets default cyclic swing scope, it is determined that the Four testing results are to meet, if the cyclic swing of above-mentioned output signal does not meet default cyclic swing scope, it is determined that the 4th Testing result is not meet.
It should be noted that above-mentioned default cyclic swing scope is also for carrying out according to the actual requirements preset, by In the difference of encoder applies scene, the requirement to encoder quality is also just different, therefore to the cycle of encoder output Fluctuation range requirement is also just different, and default cyclic swing scope is not construed as limiting herein.
It should be noted that the value of n is bigger, then the testing result to cyclic swing is also more accurate.
Flow, optionally, step are realized based on encoder quality determining method provided in an embodiment of the present invention shown in Fig. 1 S105 is specially:Output signal when being worked based on the above-mentioned encoder for getting, detects the cyclic swing of above-mentioned output signal Whether coincidence formula three, if the cyclic swing for detecting above-mentioned output signal meets above-mentioned formula three, it is determined that it is above-mentioned 4th inspection Result is surveyed to meet, if the cyclic swing for detecting above-mentioned output signal does not meet above-mentioned formula three, it is determined that above-mentioned 4th inspection Result is surveyed not meet.
Wherein, above-mentioned formula three is:(Tmax-Tmin)/Tave3
In above-mentioned formula three, TmaxRepresent the maximum in n above-mentioned pulse cycle, TminRepresent n above-mentioned simple venation The minimum value rushed in the cycle, TaveRepresent the n average value in above-mentioned pulse cycle;δ3For it is default be not less than 0 third phase pair Error threshold.
It should be noted that above-mentioned δ3Value is smaller, represents that default frequency fluctuation scope is smaller, and examination criteria is higher, It is higher to encoder quality requirement.Work as δ1For 0 when, represent that the pulse cycle of n above-mentioned output signals is equal, examination criteria Highest.
Step S106, if above-mentioned first testing result, above-mentioned second testing result, above-mentioned 3rd testing result and above-mentioned Any one of four testing results testing result then judges that above-mentioned encoder is off quality or abnormal not meet.
Optionally, in S106, can also include:If above-mentioned first testing result, above-mentioned second testing result, above-mentioned Four testing results such as three testing results and above-mentioned 4th testing result are and meet, then judge above-mentioned encoder it is up-to-standard or Normally.
In the embodiment of the present invention, when encoder is in running order, can obtain should in default fixed working time section The output signal of encoder, the output signal based on the encoder obtained in the default fixed working time section performs above-mentioned steps S102-S106;Or, it is also possible to fixed working time section is not set, and in coder processes working condition, when obtaining random Between in section the encoder output signal, the output signal execution step based on the encoder got in random time section S102-S106;Or, it is also possible to by user is by control button (such as startup/pause button) driving or suspends the encoder Work, and the output signal of the encoder is obtained when the encoder works, step S102- is performed based on the output signal for obtaining S106, is not construed as limiting herein.
It should be understood that the size of the sequence number of each step is not meant to the priority of execution sequence, each process in above-described embodiment Execution sequence should determine that the implementation process without tackling the embodiment of the present invention constitutes any limit with its function and internal logic It is fixed.
From the foregoing, it will be observed that in embodiments of the present invention, output signal when being worked by obtaining above-mentioned encoder, and based on obtaining Output signal when the above-mentioned encoder got works, detects the A phases frequency of above-mentioned output signal and the two-phase of B phase frequencies respectively Whether relation, frequency range, frequency fluctuation and cyclic swing meet default condition, and the first testing result, are determined respectively Two testing results, the 3rd testing result and the 4th testing result, above-mentioned volume is determined when any one testing result is not to meet Code device is off quality or abnormal.Therefore, the fourfold correlation ginseng of output signal when the embodiment of the present invention is by working encoder Number is detected respectively, and comprehensive four testing results are as the foundation for judging encoder quality such that it is able to effectively improved Accuracy in detection.
Also, the embodiment of the present invention gives the pairwise correlation of the A phases frequency and B phase frequencies for determining above-mentioned output signal Whether system, frequency range, frequency fluctuation and cyclic swing meet the foundation and formula of default condition, and can be according to tune Relative error threshold parameter in whole default condition flexibly sets examination criteria, can be applied to what different quality detection was required Detection scene, with certain practicality.
Corresponding to the above-mentioned encoder quality determining method of foregoing embodiments, Fig. 2 shows provided in an embodiment of the present invention The structured flowchart of encoder quality detection device, for convenience of description, illustrate only the part related to the embodiment of the present invention.
Reference picture 2, the encoder quality detection device 2 includes:Signal acquisition module 21, for obtaining above-mentioned encoder work Output signal when making;First detection module 22, for the above-mentioned encoder work got based on above-mentioned signal acquisition module When output signal, detect whether the A phases frequency and B phases frequency of above-mentioned output signal meet default two-phase relation, to determine First testing result;Second detection module 23, when the above-mentioned encoder for being got based on above-mentioned signal acquisition module is worked Output signal, detect whether the frequency of above-mentioned output signal meets default frequency range, to determine the second testing result;The Three detection modules 24, output signal when the above-mentioned encoder for being got based on above-mentioned signal acquisition module is worked, every Default time interval calculates once the frequency of above-mentioned output signal, based on the every m frequency of above-mentioned output signal, detects above-mentioned Whether the frequency fluctuation of output signal meets default frequency fluctuation scope, to determine the 3rd testing result, wherein, above-mentioned m is Natural number more than 1;4th detection module 25, when the above-mentioned encoder for being got based on above-mentioned signal acquisition module is worked Output signal, calculate each pulse cycle of above-mentioned output signal;Based on the every n pulse week of above-mentioned output signal Phase, detect whether the cyclic swing of above-mentioned output signal meets default cyclic swing scope, to determine the 4th testing result, its In, above-mentioned n is the natural number more than 1;As a result output module 26, for judging that above-mentioned encoder is off quality or abnormal, have Body is:If in above-mentioned first testing result, above-mentioned second testing result, above-mentioned 3rd testing result and above-mentioned 4th testing result Any one testing result not meet, then judge that above-mentioned encoder is off quality or abnormal.
Optionally, the above results output module can be also used for judging that above-mentioned encoder is up-to-standard or normal, specially: If above-mentioned first testing result, above-mentioned second testing result, above-mentioned 3rd testing result and above-mentioned 4th testing result etc. four Testing result is and meets, then judge that above-mentioned encoder is up-to-standard or normal.
Optionally, in embodiments of the present invention, as a result the direct result output of output module can enter in the following manner Row realization, for example:Realized by red green LED light, under above-mentioned encoder quality detection device idle condition, red green indicator lamp Extinguish, if it is determined that above-mentioned encoder is up-to-standard, then green light Chang Liang, is indicated, with green light flicker after the completion of detection if sentencing Fixed above-mentioned encoder is off quality, then red light Chang Liang, is indicated after the completion of detection with blinking red lamp, and the present embodiment can be straight That sees is presented to user by testing result.
Optionally, above-mentioned first detection module specifically for:Based on the above-mentioned coding that above-mentioned signal acquisition module gets Output signal when device works, detects whether the A phases frequency and B phases frequency of above-mentioned output signal are equal and phase difference is 90 degree; If detect above-mentioned output signal A phases frequency and B phase frequencies be equal and phase difference is 90 degree, it is determined that above-mentioned first testing result To meet;If detect above-mentioned output signal A phases frequency and B phase frequencies be unequal or phase difference is not 90 degree, it is determined that it is above-mentioned First testing result is not meet.
Optionally, above-mentioned second detection module specifically for:Based on the above-mentioned coding that above-mentioned signal acquisition module gets Output signal when device works, detect above-mentioned output signal frequency whether coincidence formula one;If detecting above-mentioned output signal Frequency meet above-mentioned formula one, it is determined that above-mentioned second testing result is to meet;If detecting the frequency of above-mentioned output signal Above-mentioned formula one is not met, it is determined that above-mentioned second testing result is not meet.
Wherein, above-mentioned formula one is:flow(1-δ1)<f<fup(1+δ1);In above-mentioned formula one, f represents above-mentioned output letter Number frequency, fupRepresent the higher limit of the theoretical work frequency of above-mentioned encoder, flowRepresent the theoretical work of above-mentioned encoder frequently The lower limit of rate;δ1For it is default be not less than 0 the first relative error threshold value.
Optionally, above-mentioned 3rd detection module specifically for:Based on the above-mentioned coding that above-mentioned signal acquisition module gets Output signal when device works, detect above-mentioned output signal frequency fluctuation whether coincidence formula two;If detecting above-mentioned output The frequency fluctuation of signal meets above-mentioned formula two, it is determined that above-mentioned 3rd testing result is to meet;If detecting above-mentioned output letter Number frequency fluctuation do not meet above-mentioned formula two, it is determined that above-mentioned 3rd testing result is not to meet.
Wherein, above-mentioned formula two is:(fmax-fmin)/fave2;In above-mentioned formula two, fmaxRepresent m above-mentioned output Maximum in the frequency of signal, fminRepresent the minimum value in the m frequency of above-mentioned output signal, faveRepresent that m is individual above-mentioned defeated Go out the average value of the frequency of signal;δ2For it is default be not less than 0 the second relative error threshold value.
Optionally, above-mentioned 4th detection module specifically for:Based on the above-mentioned coding that above-mentioned signal acquisition module gets Output signal when device works, detect above-mentioned output signal cyclic swing whether coincidence formula three;If detecting above-mentioned output The cyclic swing of signal meets above-mentioned formula three, it is determined that above-mentioned 4th testing result is to meet;If detecting above-mentioned output letter Number cyclic swing do not meet above-mentioned formula three, it is determined that above-mentioned 4th testing result is not to meet.
Wherein, above-mentioned formula three is:(Tmax-Tmin)/Tave3;In above-mentioned formula three, TmaxRepresent n above-mentioned simple venation The maximum rushed in the cycle, TminRepresent the minimum value in n above-mentioned pulse cycle, TaveRepresent n above-mentioned pulse cycle Average value;δ3It is default 0 third phase of being not less than to error threshold.
From the foregoing, it will be observed that in embodiments of the present invention, output signal when being worked by obtaining above-mentioned encoder, and based on obtaining Output signal when the above-mentioned encoder got works, detects the A phases frequency of above-mentioned output signal and the two-phase of B phase frequencies respectively Whether relation, frequency range, frequency fluctuation and cyclic swing meet default condition, and the first testing result, are determined respectively Two testing results, the 3rd testing result and the 4th testing result, above-mentioned volume is determined when any one testing result is not to meet Code device is off quality or abnormal.Four contents of output signal are carried out respectively when the embodiment of the present invention is by working encoder Detection, and comprehensive four testing results are as the foundation for judging encoder quality, so as to improve accuracy in detection.
Also, the embodiment of the present invention gives the pairwise correlation of the A phases frequency and B phase frequencies for determining above-mentioned output signal Whether system, frequency range, frequency fluctuation and cyclic swing meet multiple concrete foundations and formula of default condition, Neng Gougen Examination criteria is flexibly set according to the relative error threshold parameter adjusted in default condition, different quality testings are applied to Scape, with certain practicality.
In embodiments of the present invention, above-mentioned signal acquisition module, first detection module, the second detection module, the 3rd detection Module, the 4th detection module and result output module realized based on fpga chip, FPGA (Field- Programmable Gate Array) it is field programmable gate array, it is at PAL (Programmable Logic Array) Programmable logic array, GAL (Generic Array Logic) GAL, CPLD (Complex Programmable Logic Device, CPLD) etc. the semi-custom circuit that further develops on the basis of programming device, It is a kind of programming device.FPGA realizes combinational logic using small-sized look-up table (16 × 1RAM), and each look-up table is connected to One input of d type flip flop, trigger drives other logic circuits or driving I/O again, and (Input/output inputs are defeated Go out), thus constituting i.e. achievable combination logic function can realize the basic logic unit module of sequential logic function again, these Intermodule interconnects or is connected to I/O modules using metal connecting line.The logic of FPGA is by internally static storage cell Come what is realized, storage value in memory is determined between the logic function and each module of logic unit loading programming data Or the connecting mode between module and I/O, and the function achieved by FPGA is finally determined, FPGA allows unlimited number of programming.
Fig. 3 is the part-structure frame of the related fpga chip of encoder quality detection device provided in an embodiment of the present invention Figure, fpga chip 3 includes:When programmable input/output module (i.e. I/O modules) 31, programmable logic functions module 32, numeral Clock management module 33, memory 34, arithmetic operator module 35 and programmable intraconnection resource 36.
Wherein, input/output module 31, i.e. I/O modules are may be programmed, for completing between internal logic and external terminal Interface, is centered around programmable logic functions block array surrounding;Programmable logic functions module 32 is for realizing user function Elementary cell, multiple programmable logic functions modules 32 generally rule line up an array structure, be distributed in whole chip;Often Individual programmable logic functions module is made up of look-up table (LUT) and register (Register), and look-up table completes pure combination Logic function;Digital dock management module 33 possesses frequency dividing/frequency multiplication, digital delay, clock lock isochronon management function;Storage Device 34 be used to store between the logic function and each module of each logic unit or module and I/O intermodules connecting mode;Calculate Number computing module 35 includes high-speed hardware multiplier, adder and multiplier etc., for completing arithmetic operator function;Also have inside FPGA rich Rich programmable intraconnection resource 36, for connecting all units in FPGA inside or module, by corresponding storage in storage The program of the setting in device 33 is come between the logic function and each module that determine each logic unit or module and I/O intermodules Connecting mode, and then realize the concrete function of fpga chip.
In embodiments of the present invention, the fpga chip that code device signal quality detection device includes has following functions:
Obtain output signal when encoder works.
Output signal when being worked based on the above-mentioned encoder for getting, detects the A phases frequency and B phases of above-mentioned output signal Whether frequency meets default two-phase relation, to determine the first testing result.
Output signal when being worked based on the above-mentioned encoder for getting, detects whether the frequency of above-mentioned output signal meets Default frequency range, to determine the second testing result.
Output signal when being worked based on the above-mentioned encoder for getting, calculates once above-mentioned every default time interval The frequency of output signal, based on the every m frequency of above-mentioned output signal, detects whether the frequency fluctuation of above-mentioned output signal meets Default frequency fluctuation scope, to determine the 3rd testing result, wherein, above-mentioned m is the natural number more than 1.
Output signal when being worked based on the above-mentioned encoder for getting, calculates each pulse week of above-mentioned output signal Phase;Based on the every n pulse cycle of above-mentioned output signal, detect whether the cyclic swing of above-mentioned output signal meets default Cyclic swing scope, to determine the 4th testing result, wherein, above-mentioned n is the natural number more than 1.
If above-mentioned first testing result, above-mentioned second testing result, above-mentioned 3rd testing result and above-mentioned 4th detection knot Any one of fruit testing result then judges that above-mentioned encoder is off quality or abnormal not meet.
From the foregoing, it will be observed that in embodiments of the present invention, output signal when being worked by obtaining above-mentioned encoder, and based on obtaining Output signal when the above-mentioned encoder got works, detects the A phases frequency of above-mentioned output signal and the two-phase of B phase frequencies respectively Whether relation, frequency range, frequency fluctuation and cyclic swing meet default condition, and the first testing result, are determined respectively Two testing results, the 3rd testing result and the 4th testing result, above-mentioned volume is determined when any one testing result is not to meet Code device is off quality or abnormal.The fourfold correlation parameter difference of output signal when the embodiment of the present invention is by working encoder Detected, and comprehensive four testing results are as the foundation for judging encoder quality, it is possible to increase accuracy in detection.And And, the embodiment of the present invention realizes automatic detection and judgement by using fpga chip, can lift detection efficiency.
It is apparent to those skilled in the art that, for convenience of description and succinctly, only with above-mentioned each work( Energy unit, the division of module are carried out for example, in practical application, as needed can distribute by different above-mentioned functions Functional unit, module are completed, will the internal structure of said apparatus be divided into different functional unit or modules, more than completion The all or part of function of description.Each functional unit, module in embodiment can be integrated in a processing unit, also may be used Being that unit is individually physically present, it is also possible to which two or more units are integrated in a unit, above-mentioned integrated Unit can both be realized in the form of hardware, it would however also be possible to employ the form of SFU software functional unit is realized.In addition, each function list Unit, the specific name of module are also only to facilitate mutually differentiation, is not limited to the protection domain of the application.Said system The specific work process of middle unit, module, may be referred to the corresponding process in preceding method embodiment, will not be repeated here.
In the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, without detailed description or note in certain embodiment The part of load, may refer to the associated description of other embodiments.
Those of ordinary skill in the art are it is to be appreciated that the list of each example described with reference to the embodiments described herein Unit and algorithm steps, can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually Performed with hardware or software mode, depending on the application-specific and design constraint of technical scheme.Professional and technical personnel Described function, but this realization can be realized it is not considered that exceeding using distinct methods to each specific application The scope of the present invention.
In embodiment provided by the present invention, it should be understood that disclosed apparatus and method, can be by other Mode is realized.For example, system embodiment described above is only schematical, for example, the division of above-mentioned module or unit, It is only a kind of division of logic function, there can be other dividing mode when actually realizing, such as multiple units or component can be with With reference to or be desirably integrated into another system, or some features can be ignored, or not perform.It is another, it is shown or discussed Coupling each other or direct-coupling or communication connection can be by some interfaces, the INDIRECT COUPLING of device or unit or Communication connection, can be electrical, mechanical or other forms.
The above-mentioned unit that is illustrated as separating component can be or may not be it is physically separate, it is aobvious as unit The part for showing can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple On NE.Some or all of unit therein can be according to the actual needs selected to realize the mesh of this embodiment scheme 's.
In addition, during each functional unit in each embodiment of the invention can be integrated in a processing unit, it is also possible to It is that unit is individually physically present, it is also possible to which two or more units are integrated in a unit.Above-mentioned integrated list Unit can both be realized in the form of hardware, it would however also be possible to employ the form of SFU software functional unit is realized.
If above-mentioned integrated unit is to realize in the form of SFU software functional unit and as independent production marketing or use When, can store in a computer read/write memory medium.Based on such understanding, the technical scheme of the embodiment of the present invention The part for substantially being contributed to prior art in other words or all or part of the technical scheme can be with software products Form embody, the computer software product is stored in a storage medium, including some instructions are used to so that one Computer equipment (can be personal computer, server, or network equipment etc.) or processor (processor) perform this hair The all or part of step of bright embodiment each embodiment above method.And foregoing storage medium includes:USB flash disk, mobile hard disk, Read-only storage (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic Dish or CD etc. are various can be with the medium of store program codes.
Above above-described embodiment is merely illustrative of the technical solution of the present invention, rather than its limitations;Although with reference to foregoing reality Example is applied to be described in detail the present invention, it will be understood by those within the art that:It still can be to foregoing each Technical scheme described in embodiment is modified, or carries out equivalent to which part technical characteristic;And these are changed Or replace, do not make the spirit and scope of the essence disengaging various embodiments of the present invention technical scheme of appropriate technical solution, all should It is included within protection scope of the present invention.

Claims (10)

1. a kind of encoder quality determining method, it is characterised in that the described method comprises the following steps:
Obtain output signal when encoder works;
Output signal when being worked based on the encoder for getting, detects the A phases frequency and B phase frequencies of the output signal Whether default two-phase relation is met, to determine the first testing result;
Output signal when being worked based on the encoder for getting, detects whether the frequency of the output signal meets default Frequency range, to determine the second testing result;
Output signal when being worked based on the encoder for getting, the once output is calculated every default time interval The frequency of signal, based on the every m frequency of the output signal, detects whether the frequency fluctuation of the output signal meets default Frequency fluctuation scope, to determine the 3rd testing result, wherein, the m is the natural number more than 1;
Output signal when being worked based on the encoder for getting, calculates each pulse cycle of the output signal; Based on the every n pulse cycle of the output signal, detect whether the cyclic swing of the output signal meets default week Phase fluctuation range, to determine the 4th testing result, wherein, the n is the natural number more than 1;
If in first testing result, second testing result, the 3rd testing result and the 4th testing result Any one testing result not meet, then judge that the encoder is off quality or abnormal.
2. encoder quality determining method according to claim 1, it is characterised in that described based on the volume for getting Output signal when code device works, detects whether the A phases frequency and B phases frequency of the output signal meet default pairwise correlation System, to determine the first testing result, specially:
Output signal when being worked based on the encoder for getting, detects the A phases frequency and B phase frequencies of the output signal Whether equal and phase difference is 90 degree;
If detect the output signal A phases frequency and B phase frequencies be equal and phase difference is 90 degree, it is determined that described first detects Result is to meet;
If detect the output signal A phases frequency and B phase frequencies be unequal or phase difference is not 90 degree, it is determined that described first Testing result is not meet.
3. encoder quality determining method according to claim 1, it is characterised in that described based on the volume for getting Output signal when code device works, detects whether the frequency of the output signal meets default frequency range, to determine second Testing result, including:
Output signal when being worked based on the encoder that gets, detect the output signal frequency whether coincidence formula One;
If the frequency for detecting the output signal meets the formula one, it is determined that second testing result is to meet;
If the frequency for detecting the output signal does not meet the formula one, it is determined that second testing result is not to be inconsistent Close;
Wherein, the formula one is:flow(1-δ1)<f<fup(1+δ1);
In the formula one, f represents the frequency of the output signal, fupRepresent the encoder theoretical work frequency it is upper Limit value, flowRepresent the lower limit of the theoretical work frequency of the encoder;δ1For it is default be not less than 0 the first relative error Threshold value.
4. encoder quality determining method according to claim 1, it is characterised in that described based on the volume for getting Output signal when code device works, calculates once the frequency of the output signal, based on every m institute every default time interval The frequency of output signal is stated, detects whether the frequency fluctuation of the output signal meets default frequency fluctuation scope, to determine 3rd testing result, wherein, the m is the natural number more than 1;Including:
The output signal during work based on the encoder for getting, whether the frequency fluctuation of the detection output signal Coincidence formula two;
If the frequency fluctuation for detecting the output signal meets the formula two, it is determined that the 3rd testing result is symbol Close;
If the frequency fluctuation for detecting the output signal does not meet the formula two, it is determined that the 3rd testing result is not for Meet;
Wherein, the formula two is:(fmax-fmin)/fave2
In the formula two, fmaxRepresent the maximum in the m frequency of the output signal, fminRepresent the m output Minimum value in the frequency of signal, faveRepresent the m average value of the frequency of the output signal;δ2It is not less than 0 for default Second relative error threshold value.
5. encoder quality determining method according to claim 1, it is characterised in that described based on the volume for getting Output signal when code device works, calculates each pulse cycle of the output signal;Based on the individual output signals of every n In the pulse cycle, detect whether the cyclic swing of the output signal meets default cyclic swing scope, to determine the 4th inspection Result is surveyed, wherein, the n is the natural number more than 1;Including:
Output signal when being worked based on the encoder for getting, detects whether the cyclic swing of the output signal meets Formula three;
If the cyclic swing for detecting the output signal meets the formula three, it is determined that the 4th testing result is symbol Close;
If the cyclic swing for detecting the output signal does not meet the formula three, it is determined that the 4th testing result is not for Meet;
Wherein, the formula three is:(Tmax-Tmin)/Tave3
In the formula three, TmaxRepresent the maximum in the n pulse cycle, TminRepresent the n pulse week Interim minimum value, TaveRepresent the n average value in the pulse cycle;δ3It is default 0 third phase of being not less than to error Threshold value.
6. a kind of encoder quality detection device, it is characterised in that including:
Signal acquisition module, for obtaining output signal when encoder works;
First detection module, the output signal when encoder for being got based on the signal acquisition module is worked, Detect whether the A phases frequency and B phases frequency of the output signal meet default two-phase relation, to determine the first testing result;
Second detection module, the output signal when encoder for being got based on the signal acquisition module is worked, Detect whether the frequency of the output signal meets default frequency range, to determine the second testing result;
3rd detection module, the output signal when encoder for being got based on the signal acquisition module is worked, The frequency of the output signal is calculated once every default time interval, based on the every m frequency of the output signal, detection Whether the frequency fluctuation of the output signal meets default frequency fluctuation scope, to determine the 3rd testing result, wherein, it is described M is the natural number more than 1;
4th detection module, the output signal when encoder for being got based on the signal acquisition module is worked, Calculate each pulse cycle of the output signal;Based on the every n pulse cycle of the output signal, detect described defeated Whether the cyclic swing for going out signal meets default cyclic swing scope, to determine the 4th testing result, wherein, the n is big In 1 natural number;
As a result output module, for based on the first detection module, the second detection module, the 3rd detection module and the 4th detection The testing result of module judges that the encoder is off quality or abnormal, specially:If first testing result, described Any one of two testing results, the 3rd testing result and the 4th testing result testing result is then sentenced not meet The fixed encoder is off quality or abnormal.
7. encoder quality detection device according to claim 6, it is characterised in that the first detection module is specifically used In:
Output signal when being worked based on the encoder for getting, detects the A phases frequency and B phase frequencies of the output signal Whether equal and phase difference is 90 degree;
If detect the output signal A phases frequency and B phase frequencies be equal and phase difference is 90 degree, it is determined that described first detects Result is to meet;
If detect the output signal A phases frequency and B phase frequencies be unequal or phase difference is not 90 degree, it is determined that described first Testing result is not meet.
8. encoder quality detection device according to claim 6, it is characterised in that second detection module is specifically used In:
Output signal when being worked based on the encoder that gets, detect the output signal frequency whether coincidence formula One;
If the frequency for detecting the output signal meets the formula one, it is determined that second testing result is to meet;
If the frequency for detecting the output signal does not meet the formula one, it is determined that second testing result is not to be inconsistent Close;
Wherein, the formula one is:flow(1-δ1)<f<fup(1+δ1);
In the formula one, f represents the frequency of the output signal, fupRepresent the encoder theoretical work frequency it is upper Limit value, flowRepresent the lower limit of the theoretical work frequency of the encoder;δ1For it is default be not less than 0 the first relative error Threshold value.
9. encoder quality detection device according to claim 6, it is characterised in that the 3rd detection module is specifically used In:
Output signal when being worked based on the encoder for getting, detects whether the frequency fluctuation of the output signal meets Formula two;
If the frequency fluctuation for detecting the output signal meets the formula two, it is determined that the 3rd testing result is symbol Close;
If the frequency fluctuation for detecting the output signal does not meet the formula two, it is determined that the 3rd testing result is not for Meet;
Wherein, the formula two is:(fmax-fmin)/fave2
In the formula two, fmaxRepresent the maximum in the m frequency of the output signal, fminRepresent the m output Minimum value in the frequency of signal, faveRepresent the m average value of the frequency of the output signal;δ2It is not less than 0 for default Second relative error threshold value.
10. encoder quality detection device according to claim 6, it is characterised in that the 4th detection module is specific For:
Output signal when being worked based on the encoder for getting, detects whether the cyclic swing of the output signal meets Formula three;
If the cyclic swing for detecting the output signal meets the formula three, it is determined that the 4th testing result is symbol Close;
If the cyclic swing for detecting the output signal does not meet the formula three, it is determined that the 4th testing result is not for Meet;
Wherein, the formula three is:(Tmax-Tmin)/Tave3
In the formula three, TmaxRepresent the maximum in the n pulse cycle, TminRepresent the n pulse week Interim minimum value, TaveRepresent the n average value in the pulse cycle;δ3It is default 0 third phase of being not less than to error Threshold value.
CN201710203036.3A 2017-03-30 2017-03-30 A kind of encoder quality determining method and device Active CN106840245B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710203036.3A CN106840245B (en) 2017-03-30 2017-03-30 A kind of encoder quality determining method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710203036.3A CN106840245B (en) 2017-03-30 2017-03-30 A kind of encoder quality determining method and device

Publications (2)

Publication Number Publication Date
CN106840245A true CN106840245A (en) 2017-06-13
CN106840245B CN106840245B (en) 2019-07-26

Family

ID=59141634

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710203036.3A Active CN106840245B (en) 2017-03-30 2017-03-30 A kind of encoder quality determining method and device

Country Status (1)

Country Link
CN (1) CN106840245B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109883465A (en) * 2017-12-06 2019-06-14 上海三菱电梯有限公司 Encoder detection method
CN109879128A (en) * 2017-12-06 2019-06-14 上海三菱电梯有限公司 Elevator Fault Diagnosis method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102411326A (en) * 2011-09-16 2012-04-11 苏州新长光热能科技有限公司 Encoder watchdog alarm system
EP2581712A2 (en) * 2011-10-14 2013-04-17 Canon Kabushiki Kaisha Encoder and apparatus with the same
CN103308078A (en) * 2012-03-15 2013-09-18 欧姆龙株式会社 Rotary encoder and method of detecting abnormality of rotary encoder
US20150323345A1 (en) * 2014-05-12 2015-11-12 Avago Technologies General Ip (Singapore) Pte. Ltd. Encoder System With Error Detection And Signal Conditioning Circuits
CN106248125A (en) * 2016-08-30 2016-12-21 浙江西子富沃德电机有限公司 A kind of sine and cosine photoelectric encoder of band signal quality self-assessment brake

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102411326A (en) * 2011-09-16 2012-04-11 苏州新长光热能科技有限公司 Encoder watchdog alarm system
EP2581712A2 (en) * 2011-10-14 2013-04-17 Canon Kabushiki Kaisha Encoder and apparatus with the same
CN103308078A (en) * 2012-03-15 2013-09-18 欧姆龙株式会社 Rotary encoder and method of detecting abnormality of rotary encoder
US20150323345A1 (en) * 2014-05-12 2015-11-12 Avago Technologies General Ip (Singapore) Pte. Ltd. Encoder System With Error Detection And Signal Conditioning Circuits
CN106248125A (en) * 2016-08-30 2016-12-21 浙江西子富沃德电机有限公司 A kind of sine and cosine photoelectric encoder of band signal quality self-assessment brake

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109883465A (en) * 2017-12-06 2019-06-14 上海三菱电梯有限公司 Encoder detection method
CN109879128A (en) * 2017-12-06 2019-06-14 上海三菱电梯有限公司 Elevator Fault Diagnosis method
CN109883465B (en) * 2017-12-06 2021-10-01 上海三菱电梯有限公司 Encoder detection method

Also Published As

Publication number Publication date
CN106840245B (en) 2019-07-26

Similar Documents

Publication Publication Date Title
CN101685135B (en) Test device and test method for testing circuit board
CN107076571B (en) For initializing the method, equipment and system of meter reading device
CN110141219A (en) Myocardial infarction automatic testing method based on lead fusion deep neural network
US8397185B1 (en) Graphical user aid for technology migration and associated methods
CN104111468B (en) A kind of system and method realizing meeting judgement
CN205229440U (en) A detecting system for detecting partial discharge detector
CN103368569B (en) Semiconductor integrated circuit
CN106840245A (en) A kind of encoder quality determining method and device
CN110324026A (en) A kind of clock frequency detection method of chip interior clock source
CN108875519A (en) Method for checking object, device and system and storage medium
CN107909569A (en) One kind flower screen detection method, flower screen detection device and electronic equipment
CN107170147A (en) Modification method and device, the electronic equipment and storage medium of photoelectric sensor
CN109615171A (en) Characteristic threshold value determines that method and device, problem objects determine method and device
CN105954557B (en) A kind of oscillograph and method improving waveform capture rate
CN108052960A (en) Method, model training method and the terminal of identification terminal grip state
CN105629154B (en) A kind of method and device for realizing chip top-layer metal covering circuit test
CN109753157A (en) The gestural control method and device of display screen
CN109870172A (en) Step counting detection method, device, equipment and storage medium
CN109142867A (en) Based on harmonic detecting method, the equipment for improving sliding window discrete Fourier transform
CN107481282A (en) volume measuring method, device and user terminal
CN108845517A (en) Anticoincidence circuit and pulse signal detection circuit
CN102944778A (en) Portable detecting device for low-frequency oscillation of electric system
CN103176013A (en) Oscilloscope capable of defining measuring range by user and achieving method thereof
CN105892988A (en) Operation circuit based on FPGA (Field Programmable Gate Array), oscilloscope and measuring instrument
CN106897504A (en) The method to form parameterized units is developed to IP modules

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
GR01 Patent grant
GR01 Patent grant