CN108375391B - Sine and cosine signal processing method and system - Google Patents

Sine and cosine signal processing method and system Download PDF

Info

Publication number
CN108375391B
CN108375391B CN201810481244.4A CN201810481244A CN108375391B CN 108375391 B CN108375391 B CN 108375391B CN 201810481244 A CN201810481244 A CN 201810481244A CN 108375391 B CN108375391 B CN 108375391B
Authority
CN
China
Prior art keywords
quadrant
analog quantity
sine
signal
cosine
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
CN201810481244.4A
Other languages
Chinese (zh)
Other versions
CN108375391A (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.)
Suzhou Inovance Technology Co Ltd
Original Assignee
Suzhou Inovance Technology Co Ltd
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 Suzhou Inovance Technology Co Ltd filed Critical Suzhou Inovance Technology Co Ltd
Publication of CN108375391A publication Critical patent/CN108375391A/en
Application granted granted Critical
Publication of CN108375391B publication Critical patent/CN108375391B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Transmission And Conversion Of Sensor Element Output (AREA)

Abstract

The invention provides a sine and cosine signal processing method and a system, wherein the method comprises the following steps: converting the received sine and cosine signals into orthogonal square wave signals, and counting the orthogonal square wave signals by using a quadruple frequency mode to obtain a count value; sampling the count value and the received sine and cosine signals in a preset sampling period, and calculating an analog quantity quadrant and a subdivision position according to the sampled sine and cosine signals; and when the quadrant corresponding to the count value of the same sampling point is inconsistent with the analog quantity quadrant, correcting the count value by using the analog quantity quadrant. According to the invention, the count value of the orthogonal square wave signal is corrected according to the analog quantity quadrant of the original sine and cosine signal, so that when the method is applied to an encoder, the joint dislocation of the output position of the encoder can be avoided, and the accuracy of the position signal output by the encoder is improved.

Description

Sine and cosine signal processing method and system
Technical Field
The present invention relates to the field of encoders, and more particularly, to a method and a system for processing sine and cosine signals.
Background
With the rapid development of industrial technologies, the fields of motor control, manipulators, elevators and the like have more and more demands on high-precision encoders. Among many high-precision encoder schemes, the scheme of subdividing sine and cosine signals generated by using a cursor code track is widely applied due to simple principle, high resolution, easy software implementation and simple manufacturing process.
The existing vernier subdivision solution scheme generally has two paths of original signals, namely one path of sine signal and one path of cosine signal, a signal processing circuit processes the two paths of original signals into two paths of orthogonal square wave signals through a comparator, the two paths of orthogonal square wave signals are connected to a counting port of a counter of a microprocessor to obtain a counting value which is 4 times of the number of cycles of the original sine and cosine signals, meanwhile, the original signals (namely the sine signal and the cosine signal) are sampled through an Analog-to-Digital Converter (ADC) to obtain a subdivision position value within 1/4 cycles, and the counting value and the subdivision position value are combined to obtain a single-turn position of an encoder.
Since the QEP (Quadrature Encoder Pulse) count value is counted once every 1/4 sine wave positions by the Quadrature square wave signal, there are two problems at 1/4 sine wave cycle positions, which can cause the QEP count value and the analog (original signal) signal subdivision value to be linked up and dislocated:
(1) the comparator adopted in the signal processing circuit has a hysteresis effect, so that the phase of the orthogonal square wave signal output by the comparator lags behind the original signal;
(2) when the microprocessor samples and processes signals, because most embedded processors execute instructions one by one, the QEP count value obtained by the microprocessor and the subdivided position obtained by sampling in 1/4 periods have a sequential order, if the external code wheel rotates at a high speed, the position where the QEP count value and the subdivided position value obtained by sampling just pass through 1/4 periods is possible, and therefore errors are caused.
In addition, at the quadrant junction of the sine signal and the cosine signal, if the original signal sampling value of the ADC has noise interference, the calculation may also be biased.
Disclosure of Invention
The invention aims to solve the technical problem of providing a sine and cosine signal processing method and system aiming at the problem of connection dislocation of subdivision values in the vernier subdivision solution scheme.
The technical solution for solving the above technical problems is to provide a method for processing sine and cosine signals, which is characterized by comprising the following steps:
converting the received sine and cosine signals into orthogonal square wave signals, and counting the orthogonal square wave signals by using a quadruple frequency mode to obtain a count value;
sampling the count value and the received sine and cosine signals in a preset sampling period, and calculating an analog quantity quadrant and a subdivision position according to the sampled sine and cosine signals;
and when the quadrant corresponding to the count value of the same sampling point is inconsistent with the analog quantity quadrant, correcting the count value by using the analog quantity quadrant.
In the sine and cosine signal processing method of the present invention, the method is applied to encoder output position correction, and the method further comprises: and synthesizing the corrected count value and the subdivision position of the same sampling point, and outputting the result as a position signal.
In the sine and cosine signal processing method of the present invention, sampling the received sine and cosine signal and calculating an analog quantity quadrant according to the sampled sine and cosine signal comprises:
respectively sampling the analog quantity of a sine signal and the analog quantity of a cosine signal in the sine signal and the cosine signal, determining that the analog quantity quadrant corresponds to a first quadrant when the analog quantity of the sine signal and the analog quantity of the cosine signal are both positive, determining that the analog quantity quadrant corresponds to a second quadrant when the analog quantity of the sine signal is positive and the analog quantity of the cosine signal is negative, determining that the analog quantity quadrant corresponds to a third quadrant when the analog quantity of the sine signal is negative and the analog quantity of the cosine signal is positive, and determining that the analog quantity quadrant corresponds to a fourth quadrant when the analog quantity of the sine signal and the analog quantity of the cosine signal are both negative.
In the sine and cosine signal processing method of the present invention, the method includes:
and comparing the last two bits of the counting value with the analog quantity quadrant to determine whether the quadrant corresponding to the counting value is consistent with the analog quantity quadrant.
In the sine and cosine signal processing method of the present invention, the method includes:
and when the quadrant corresponding to the counting value of the same sampling point is consistent with the analog quantity quadrant, synthesizing the counting value and the subdivision position of the same sampling point to be used as a position signal for outputting.
In the sine and cosine signal processing method of the present invention, the method includes:
when the difference between the quadrant corresponding to the counting value at the same sampling point and the analog quantity quadrant is more than one quadrant, and the quadrant difference between the analog quantity quadrant and the corresponding counting value of a plurality of preset extreme position sampling points behind the sampling point is more than one quadrant, outputting an alarm signal;
and the extreme position sampling points are sampling points of the middle points of quarter periods of the corresponding sine and cosine signals.
In the sine and cosine signal processing method of the present invention, the method is applied to encoder output position correction, and the method further comprises: and after the encoder is initially powered on, giving an initial value to the counting value according to the level state of the orthogonal square wave signal.
The invention also provides a sine and cosine signal processing system, which comprises a storage device and a processing device, wherein codes for the processing device to run are stored in the storage device so as to execute the method.
The invention also provides a sine and cosine signal processing system, which comprises a comparator, a counting unit and a sampling unit, wherein the comparator is used for converting the received sine and cosine signal into an orthogonal square wave signal, the counting unit is used for counting the orthogonal square wave signal in a quadruple frequency mode to obtain a counting value, the sampling unit is used for sampling the counting value of the counting unit and the received sine and cosine signal in a preset sampling period, and a subdivision position is obtained; the system further comprises a quadrant calculation unit and a correction unit, wherein:
the quadrant calculation unit is used for calculating the analog quantity quadrant of each sampling point according to the sampled received sine and cosine signals;
and the correction unit is used for correcting the count value by using the analog quantity quadrant when the quadrant corresponding to the count value of the same sampling point is inconsistent with the analog quantity quadrant.
In the sine and cosine signal processing system of the present invention, the correction unit synthesizes the corrected count value with the subdivided positions of the same sampling point and outputs the synthesized value as a position signal.
In the sine and cosine signal processing system of the present invention, the quadrant calculating unit samples the analog quantity of the sine signal and the analog quantity of the cosine signal in the sine and cosine signal respectively, and determines that the analog quantity quadrant corresponds to the first quadrant when the analog quantity of the sine signal and the analog quantity of the cosine signal are both positive, determines that the analog quantity quadrant corresponds to the second quadrant when the analog quantity of the sine signal is positive and the analog quantity of the cosine signal is negative, determines that the analog quantity quadrant corresponds to the third quadrant when the analog quantity of the sine signal is negative and the analog quantity of the cosine signal is positive, and determines that the analog quantity quadrant corresponds to the fourth quadrant when the analog quantity of the sine signal and the analog quantity of the cosine signal are both negative.
In the sine and cosine signal processing system of the present invention, the correction unit determines whether the quadrant corresponding to the count value is consistent with the analog quantity quadrant by comparing the last two bits of the count value with the analog quantity quadrant.
In the sine and cosine signal processing system of the present invention, the correction unit synthesizes the count value and the subdivided position of the same sampling point as a position signal output when the quadrant corresponding to the count value of the same sampling point is consistent with the analog quantity quadrant.
In the sine and cosine signal processing system of the present invention, the system includes an alarm unit, which is used for outputting an alarm signal when the difference between the quadrant corresponding to the counting value at the same sampling point and the analog quantity quadrant is more than one quadrant, and the quadrant difference between the analog quantity quadrant and the corresponding counting value of a plurality of preset extreme position sampling points behind the sampling point is more than one quadrant, wherein the extreme position sampling points are the sampling points corresponding to the middle point of a quarter period of the original sine and cosine signal.
In the sine and cosine signal processing system of the present invention, the comparator, the counting unit, the sampling unit, the quadrant calculating unit and the correcting unit are integrated into the encoder, and the counting unit gives an initial value to the counting value according to the level state of the quadrature square wave signal after the encoder is initially powered on.
The sine and cosine signal processing method and the system can be applied to an encoder and avoid the joint dislocation of the output position of the encoder by correcting the count value of the orthogonal square wave signal through the analog quantity quadrant of the original sine and cosine signal. The invention can reduce the requirement of the encoder on the sine and cosine signal processing circuit and reduce the requirement on the running speed of the processor by correcting the count value.
Drawings
FIG. 1 is a schematic flow chart diagram illustrating a sine and cosine signal processing method according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating a relationship between sine and cosine signals and orthogonal square signals;
FIG. 3 is a diagram of a sine and cosine signal processing system according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Fig. 1 is a schematic flow chart of a sine and cosine signal processing method according to an embodiment of the present invention, which can be applied to an encoder and integrated into a signal processing circuit of the encoder, and the signal processing circuit can generate a rotor position according to a sine and cosine signal generated by the encoder. The sine and cosine signal processing method in the embodiment comprises the following steps:
step S11: receives a sine-cosine signal (which may be generated by an encoder during rotation, for example) and converts the received sine-cosine signal into an orthogonal square wave signal.
Specifically, as shown in fig. 2, this step may be implemented by a comparator that outputs a high level when the input analog signal is greater than zero and outputs a low level when the input analog signal is less than zero.
Step S12: the orthogonal square wave signal is counted using a quadruple frequency method to obtain a count value.
This step can be implemented by a counter of the microprocessor: the orthogonal square wave signal generated in step S11 is connected to a count port of a counter of the microprocessor, and the counter outputs a count value four times the number of cycles of the original sine and cosine signal (i.e., the sine and cosine signal received in step S11). In particular, the counter counts once per rising edge of the square wave signal.
Step S13: and sampling the count value of the counter and the sampled original sine and cosine signals by using a preset sampling period (the preset sampling period is far shorter than the counting period of the counter), and calculating according to the sampled sine and cosine signals (namely the amplitude of the sine and cosine signals at the sampling point, wherein the amplitude can be a negative number) to obtain the analog quantity quadrant and the subdivision position.
Specifically, in this step, the analog quantity of the sine signal and the analog quantity of the cosine signal in the original sine and cosine signals may be respectively sampled by the analog-to-digital converter, and the analog quantity quadrant corresponding to the first quadrant is determined when both the analog quantity of the sine signal and the analog quantity of the cosine signal are positive, the analog quantity quadrant corresponding to the second quadrant is determined when both the analog quantity of the sine signal and the analog quantity of the cosine signal are positive, the analog quantity quadrant corresponding to the third quadrant is determined when both the analog quantity of the sine signal and the analog quantity of the cosine signal are negative, and the analog quantity quadrant corresponding to the fourth quadrant is determined when both the analog quantity of the sine signal and the analog quantity of the cosine signal are negative.
In particular, in this step, the determined analog quantity quadrant needs to be digitized and output. For example, when the analog quantity quadrant corresponds to the first quadrant, the output analog quantity quadrant is 00; when the analog quantity quadrant corresponds to the second quadrant, outputting the analog quantity quadrant as 01; when the analog quantity quadrant corresponds to the third quadrant, outputting the analog quantity quadrant to be 10; and when the analog quantity quadrant corresponds to the fourth quadrant, the output analog quantity quadrant is 11.
The analog quantity of sine signals and the analog quantity of cosine signals obtained by sampling of the analog-to-digital converter are subjected to division operation, arc tangent operation and other operations to obtain corresponding subdivision positions.
Step S14: judging whether the quadrant corresponding to the count value obtained in the step S12 is consistent with the analog quantity quadrant (i.e., the value of the same sampling point) obtained in the step S13, if the quadrant corresponding to the count value is inconsistent with the analog quantity quadrant, executing the step S16; otherwise, step S15 is executed.
In this step, the last two bits of the count value are specifically compared with the analog quantity quadrant (i.e., the digitized analog quantity quadrant), so as to determine whether the quadrant corresponding to the count value is consistent with the analog quantity quadrant.
Step S15: the count value obtained in step S12 is directly concatenated with the subdivided position obtained in step S13, and the concatenated value is output as a position signal, and then a step S11 is performed for the next position signal processing.
Step S16: the count value obtained in step S12 is corrected using the analog quantity quadrant (for example, when the analog quantity quadrant leads the corresponding count value by one quadrant, the count value is incremented by 1; when the analog quantity quadrant lags the corresponding count value by one quadrant, the count value is decremented by 1), and the corrected count value is concatenated with the divided position obtained in step S13 and the concatenated value is output as a position signal, and then the range step S11 performs the next position signal processing.
In the sine and cosine signal processing method, the count value of the quadruple frequency orthogonal square wave signal is corrected through the analog quantity quadrant of the original sine and cosine signal, so that when the method is applied to an encoder, the joint dislocation of the count value and a subdivision position can be avoided, and the accuracy of the output position of the encoder is improved. And the invention can reduce the requirement on the sine and cosine signal processing circuit and the requirement on the running speed of the processor by correcting the count value.
Because the rotating speed of the motor is relatively constant and the lag time of the comparator is limited, the difference of the counting value and the original sine and cosine signal is more than one quadrant only under the abnormal condition. Correspondingly, the method can also comprise an alarm step, namely, when the difference between the quadrant corresponding to the counting value at the same sampling point and the analog quantity quadrant is more than one quadrant, and the quadrant difference between the analog quantity quadrant and the corresponding counting value of a plurality of preset (the specific number can be set according to the motor rotating speed, the precision requirement and the like) limit position sampling points behind the sampling point is more than one quadrant, an alarm signal is output, and the limit position sampling points are sampling points corresponding to the middle point of a quarter period of the original sine and cosine signal. Specifically, the period of the quadrature square wave signal after the quadruple frequency is one fourth of the period of the sine-cosine curve, a rising edge is arranged at the position of the one fourth of the period of the sine-cosine curve, namely the counting value is added by 1, and the midpoint of the one fourth of the period of the sine-cosine curve is far away from the rising edge of the quadrature square wave signal after the quadruple frequency, so that the influence of the interference signal on the point is most obvious, and whether the interference exists or not can be more conveniently and accurately judged by arranging the sampling point at the extreme position at the position.
When the above method is applied to an encoder, it may further include: after the encoder is initially powered on, an initial value is given to the counting value according to the level state of the orthogonal square wave signal (at this time, the difference between the analog quantity quadrant obtained by calculation according to the original sine and cosine curve and the quadrant corresponding to the quadrupled orthogonal square wave signal does not exceed one quadrant).
The invention also provides a sine and cosine signal processing system, which comprises a storage device and a processing device, wherein codes for the processing device to run are stored in the storage device so as to execute the method.
As shown in fig. 3, the present invention also provides a sine and cosine signal processing system, which can be integrated into a signal processing circuit in an encoder, and the signal processing circuit is used for processing the sine and cosine signal generated by the encoder and generating a position signal. The sine and cosine signal processing system of the present embodiment includes a comparator 31, a counting unit 32, a sampling unit 33, a quadrant calculating unit 34 and a correcting unit 35, wherein the counting unit 32, the sampling unit 33, the quadrant calculating unit 34 and the correcting unit 35 can be integrated into a microprocessor and implemented by combining with a program running on the microprocessor.
The comparator 31 is used to convert a received sine-cosine signal (which may be generated by an encoder during rotation, for example) into a quadrature square-wave signal, as shown in fig. 2, which outputs a high level when the analog signal is greater than zero and outputs a low level when the input analog signal is less than zero.
The counting unit 32 is configured to count the orthogonal square wave signals in a quadruple frequency manner to obtain a count value. The input of the counting unit 32 is connected to the output of the comparator 31. In particular, when the sine and cosine signal processing system is integrated into an encoder, the counting unit 32 may assign an initial value to the counting value according to the level state of the quadrature square wave signal after the encoder is initially powered on.
The sampling unit 33 samples the count value of the counting unit and the received sine and cosine signal (i.e., the original sine and cosine signal) at a fixed sampling period, and calculates the subdivision positions according to the sampled sine and cosine signal (i.e., the amplitude of the sine and cosine signal at the sampling point, which may be a negative number). Specifically, the sampling unit 33 may obtain the analog quantity of the sine signal and the analog quantity of the cosine signal by a sampling manner, and obtain the corresponding subdivision positions by division, arc tangent, and other operations.
The quadrant calculating unit 34 is configured to calculate an analog quantity quadrant of each sampling point according to the sine and cosine signals obtained by sampling. Specifically, the quadrant calculation unit 34 may obtain the analog quantity quadrant from positive and negative values of the analog quantity of the sine signal and positive and negative values of the analog quantity of the cosine signal in the sine and cosine signals. For example, the analog quantity quadrant corresponding to the first quadrant is determined when the analog quantity of the sine signal and the analog quantity of the cosine signal are both positive, the analog quantity quadrant corresponding to the second quadrant is determined when the analog quantity of the sine signal is positive and the analog quantity of the cosine signal is negative, the analog quantity quadrant corresponding to the third quadrant is determined when the analog quantity of the sine signal is negative and the analog quantity of the cosine signal is positive, and the analog quantity quadrant corresponding to the fourth quadrant is determined when the analog quantity of the sine signal and the analog quantity of the cosine signal are both negative. Specifically, when the analog quantity quadrant corresponds to the first quadrant, the quadrant calculation unit 34 outputs the analog quantity quadrant as 00; when the analog quantity quadrant corresponds to the second quadrant, the quadrant calculation unit 34 outputs the analog quantity quadrant as 01; when the analog quantity quadrant corresponds to the third quadrant, the quadrant calculating unit 34 outputs the analog quantity quadrant as 10; when the analog quantity quadrant corresponds to the fourth quadrant, the quadrant calculation unit 34 outputs the analog quantity quadrant as 11.
The correcting unit 35 is configured to correct the count value using the analog quantity quadrant when the quadrant corresponding to the count value at the same sampling point does not coincide with the analog quantity quadrant, and synthesize the corrected count value and the subdivided position at the same sampling point to output as a position signal. Specifically, the correction unit 35 may determine whether the quadrant corresponding to the count value coincides with the analog quadrant by comparing the last two bits of the count value with the analog quadrant.
Of course, when the quadrant corresponding to the count value of the same sampling point coincides with the analog quadrant, the uncorrected count value and the subdivided position of the same sampling point may be synthesized (concatenated) by the correction unit 35 or a separate output unit and output as a position signal.
The sine and cosine signal processing system can also comprise an alarm unit, wherein the alarm unit is used for outputting an alarm signal when the difference between a quadrant corresponding to the counting value at the same sampling point and an analog quantity quadrant is more than one quadrant, and the quadrant difference between the analog quantity quadrant of a plurality of preset extreme position sampling points behind the sampling point and the corresponding counting value is more than one quadrant, wherein the extreme position sampling points are sampling points corresponding to the middle point of a quarter period of the original sine and cosine signal. Through the alarm unit, the abnormal condition that the difference of the counting value is more than one quadrant compared with the original sine and cosine signal can be prompted.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (15)

1. A sine and cosine signal processing method is characterized by comprising the following steps:
converting the received sine and cosine signals into orthogonal square wave signals, and counting the orthogonal square wave signals by using a quadruple frequency mode to obtain a count value;
sampling the count value and the received sine and cosine signals in a preset sampling period, and calculating an analog quantity quadrant and a subdivision position according to the sampled sine and cosine signals;
when the quadrant corresponding to the counting value of the same sampling point is inconsistent with the analog quantity quadrant, correcting the counting value by using the analog quantity quadrant;
the correcting the count value using the analog quantity quadrant comprises: when the analog quantity quadrant leads the corresponding counting value by one quadrant, adding 1 to the counting value; when the analog quadrant lags behind the corresponding count value by one quadrant, the count value is decremented by 1.
2. The sine-cosine signal processing method of claim 1, wherein the method is applied to encoder output position correction, and the method further comprises: and synthesizing the corrected count value and the subdivision position of the same sampling point, and outputting the result as a position signal.
3. The sine-cosine signal processing method of claim 1, wherein sampling the received sine-cosine signal and calculating an analog quantity quadrant from the sampled sine-cosine signal comprises:
respectively sampling the analog quantity of a sine signal and the analog quantity of a cosine signal in the sine signal and the cosine signal, determining that the analog quantity quadrant corresponds to a first quadrant when the analog quantity of the sine signal and the analog quantity of the cosine signal are both positive, determining that the analog quantity quadrant corresponds to a second quadrant when the analog quantity of the sine signal is positive and the analog quantity of the cosine signal is negative, determining that the analog quantity quadrant corresponds to a third quadrant when the analog quantity of the sine signal is negative and the analog quantity of the cosine signal is positive, and determining that the analog quantity quadrant corresponds to a fourth quadrant when the analog quantity of the sine signal and the analog quantity of the cosine signal are both negative.
4. The sine-cosine signal processing method according to claim 1, comprising:
and comparing the last two bits of the counting value with the analog quantity quadrant to determine whether the quadrant corresponding to the counting value is consistent with the analog quantity quadrant.
5. The sine-cosine signal processing method according to claim 1, comprising:
and when the quadrant corresponding to the counting value of the same sampling point is consistent with the analog quantity quadrant, synthesizing the counting value and the subdivision position of the same sampling point to be used as a position signal for outputting.
6. The sine-cosine signal processing method according to claim 1, comprising:
when the difference between the quadrant corresponding to the counting value at the same sampling point and the analog quantity quadrant is more than one quadrant, and the quadrant difference between the analog quantity quadrant and the corresponding counting value of a plurality of preset extreme position sampling points behind the sampling point is more than one quadrant, outputting an alarm signal;
and the extreme position sampling points are sampling points of the middle points of quarter periods of the corresponding sine and cosine signals.
7. The sine-cosine signal processing method of claim 1, wherein the method is applied to encoder output position correction, and the method further comprises: and after the encoder is initially powered on, giving an initial value to the counting value according to the level state of the orthogonal square wave signal.
8. A sine-cosine signal processing system comprising storage means and processing means, said storage means having stored therein code for execution by said processing means to perform the method of any of claims 1-6.
9. A sine and cosine signal processing system comprises a comparator, a counting unit and a sampling unit, wherein a received sine and cosine signal is converted into an orthogonal square wave signal through the comparator, the orthogonal square wave signal is counted in a quadruple frequency mode through the counting unit to obtain a counting value, the counting value of the counting unit and the received sine and cosine signal are sampled in a preset sampling period through the sampling unit, and a subdivision position is obtained; characterized in that the system further comprises a quadrant calculation unit and a correction unit, wherein:
the quadrant calculation unit is used for calculating the analog quantity quadrant of each sampling point according to the sampled received sine and cosine signals;
the correction unit is configured to correct the count value using the analog quantity quadrant when a quadrant corresponding to the count value at the same sampling point is inconsistent with the analog quantity quadrant, where correcting the count value using the analog quantity quadrant includes: when the analog quantity quadrant leads the corresponding counting value by one quadrant, adding 1 to the counting value; when the analog quadrant lags behind the corresponding count value by one quadrant, the count value is decremented by 1.
10. The sine-cosine signal processing system of claim 9, wherein said correction unit synthesizes the corrected count value with the subdivided positions of the same sampling point to output as a position signal.
11. The sine-cosine signal processing system of claim 9, wherein the quadrant calculating unit samples the analog quantity of the sine signal and the analog quantity of the cosine signal in the sine-cosine signal, respectively, and determines that the analog quantity quadrant corresponds to a first quadrant when the analog quantities of the sine signal and the cosine signal are both positive, determines that the analog quantity quadrant corresponds to a second quadrant when the analog quantity of the sine signal is positive and the analog quantity of the cosine signal is negative, determines that the analog quantity quadrant corresponds to a third quadrant when the analog quantity of the sine signal is negative and the analog quantity of the cosine signal is positive, and determines that the analog quantity quadrant corresponds to a fourth quadrant when the analog quantities of the sine signal and the analog quantity of the cosine signal are both negative.
12. The sine-cosine signal processing system of claim 9, wherein the correction unit determines whether the quadrant corresponding to the count value coincides with the analog quantity quadrant by comparing the last two bits of the count value with the analog quantity quadrant.
13. The sine-cosine signal processing system of claim 9, wherein the correction unit uses the count value and the subdivision position of the same sampling point to synthesize as a position signal output when the quadrant corresponding to the count value of the same sampling point coincides with the analog quantity quadrant.
14. The sine and cosine signal processing system of claim 9, comprising an alarm unit for outputting an alarm signal when a quadrant corresponding to the count value at the same sampling point differs from the analog quantity quadrant by more than one quadrant, and an image limit difference between the analog quantity quadrant and the corresponding count value of a preset plurality of extreme position sampling points after the sampling point is more than one quadrant, wherein the extreme position sampling points are sampling points corresponding to a middle point of a quarter period of an original sine and cosine signal.
15. The sine-cosine signal processing system of claim 9, wherein the comparator, the counting unit, the sampling unit, the quadrant calculating unit and the correcting unit are integrated into an encoder, and the counting unit initializes the counting value according to a level state of the quadrature square wave signal after the encoder is initially powered on.
CN201810481244.4A 2018-05-04 2018-05-18 Sine and cosine signal processing method and system Active CN108375391B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810422202 2018-05-04
CN2018104222023 2018-05-04

Publications (2)

Publication Number Publication Date
CN108375391A CN108375391A (en) 2018-08-07
CN108375391B true CN108375391B (en) 2020-02-28

Family

ID=63033502

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810481244.4A Active CN108375391B (en) 2018-05-04 2018-05-18 Sine and cosine signal processing method and system

Country Status (1)

Country Link
CN (1) CN108375391B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110296722B (en) * 2019-06-28 2021-12-07 上海可驷自动化科技有限公司 Encoding method of magnetic encoder and magnetic encoder
JP2021092493A (en) * 2019-12-12 2021-06-17 日本電産サンキョー株式会社 Encoder
CN113406453B (en) * 2021-06-30 2023-06-23 平顶山学院 PRPD/PRPS map data processing method and detection device based on MCU
CN113916267A (en) * 2021-09-13 2022-01-11 浙江西子富沃德电机有限公司 Sine and cosine signal processing method, device and system and sine and cosine encoder
CN114608627B (en) * 2022-03-14 2022-12-20 浙江大学 High-precision wide-range phase measurement system based on over-quadrant detection

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003121135A (en) * 2001-10-10 2003-04-23 Futaba Corp Reader for linear scale
CN100535604C (en) * 2006-10-17 2009-09-02 财团法人工业技术研究院 Electronic fine-grained segmentation device and its method
CN102270961B (en) * 2011-07-20 2013-06-05 深圳市海浦蒙特科技有限公司 Signal subdividing method and subdividing device for sine-cosine encoder, and motor control device
CN106197484B (en) * 2016-06-30 2018-09-11 中工科安科技有限公司 A kind of sine and cosine encoder high-precision signal processing system
CN106595724B (en) * 2016-12-02 2019-07-30 中国科学院自动化研究所 A kind of incremental encoder frequency dividing circuit

Also Published As

Publication number Publication date
CN108375391A (en) 2018-08-07

Similar Documents

Publication Publication Date Title
CN108375391B (en) Sine and cosine signal processing method and system
US20100250184A1 (en) Rotation angle detection apparatus
JP5173962B2 (en) Resolver / digital conversion apparatus and resolver / digital conversion method
WO2016139849A1 (en) Resolver device
KR20070054735A (en) Encoder signal processor and processing method
CN107860404B (en) Rotary encoder and absolute angle position detection method for rotary encoder
US5625310A (en) Signal processing apparatus and displacement detecting apparatus using the same
CN101140170A (en) Correction circuit for encoder signal
JP5249158B2 (en) Encoder offset correction method
Park et al. A linear compensation method for improving the accuracy of an absolute multipolar magnetic encoder
US10921767B2 (en) Encoder system
CN116182924A (en) Phase compensation method, device and magnetic encoder
JP2010043981A (en) Angle position detector and rotational speed detector of rotor
CN112434254B (en) Method, system, device, processor and storage medium for implementing incremental pulse count value correction processing for sine and cosine encoder
JP2003121135A (en) Reader for linear scale
CN111089610B (en) Signal processing method and device of encoder and related components
JP5190644B2 (en) Encoder error correction method
US9065475B2 (en) Sin-Cos sensor arrangement, integrated circuit and method therefor
US9134143B2 (en) Absolute position detector with abnormality detection function
US10797624B2 (en) Rotation angle correction device and motor control system
JP4224677B2 (en) Optical encoder position detection method
CN114204855A (en) FPGA-based rotary transformer decoding and error compensation system and method
JP3365913B2 (en) Position detection device
CN113632370B (en) Control device for motor
JPH11325972A (en) Method for improving accuracy of encoder device and high-accuracy encoder device

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