A EQEP module and a motor position and speed measurement system and method

By designing the EQEP module, using orthogonal coding and position counting technology, the problem of motor position and speed measurement accuracy and performance of smart equipment is solved, and high-precision measurement and advanced control strategies are realized.

CN115143906BActive Publication Date: 2025-05-09SUZHOU YIYI ELECTRONIC TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210755264.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-29
Publication Date
2025-05-09
Estimated Expiration
2042-06-29

AI Technical Summary

Technical Problem

The prior art is difficult to meet the high accuracy and high performance requirements of smart devices such as sweeping robots for motor position and speed measurement.

Method used

An EQEP module is designed, including an orthogonal coding unit, a position counting control unit, a time base unit, an orthogonal capture unit and a watchdog. The orthogonal input signal generated by the rotation of the motor is obtained through an optical encoder, the encoded signal is determined, and the motor speed measurement and position count are performed.

Benefits of technology

It realizes high-precision measurement of the motor position and speed of smart devices, meeting the high standard requirements for accuracy, performance and advanced control strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115143906B_ABST
    Figure CN115143906B_ABST
Patent Text Reader

Abstract

The present invention relates to an EQEP module and a system and method for measuring the position and speed of a motor. In the module, the orthogonal encoding unit determines the encoding signal according to the orthogonal input signal with a phase shift of 90°, the index signal and the strobe input generated by the motor rotation acquired by the optical encoder; the orthogonal capture unit measures the motor speed according to the orthogonal clock generated by the rising / falling edges of the two input clocks when the motor speed is less than the minimum speed threshold; the time base unit calculates the speed according to the periodic interruption generated by the system clock; the position counting control unit is used to receive the encoding signal, and determine the running direction, count, position of the motor and generate interrupt information according to the encoding signal. The present invention can improve the accuracy of the position and speed measurement of intelligent devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of motor control, and in particular to an EQEP module and a system and method for measuring the position and speed of a motor. Background Art

[0002] Modern intelligent IoT devices are developing rapidly, among which electric servo systems play an irreplaceable role in the entire industry. For example, intelligent devices such as sweeping robots and 3D printing that have high requirements for motion trajectory control and position control require a large number of electric servo systems. However, how to meet the high standards for accuracy, performance and advanced control strategies is still a task that needs to be solved urgently. Summary of the invention

[0003] The object of the present invention is to provide an EQEP module and a system and method for measuring the position and speed of a motor, which can improve the accuracy of measuring the position and speed of an intelligent device.

[0004] To achieve the above object, the present invention provides the following solutions:

[0005] An EQEP module comprises: an orthogonal encoding unit, a position counting control unit, a time base unit, an orthogonal capture unit and a watchdog;

[0006] The orthogonal encoding unit is used to determine the encoding signal according to the orthogonal input signals EQEPA and EQEPB with a phase shift of 90° generated by the motor rotation obtained by the optical encoder, the index signal EQEPI and the selection input EQEPS; the encoding signal includes: the orthogonal clock QCLK generated by the rising / falling edges of the two input clocks of the orthogonal input signal, the signal QDIR for selecting the counting mode, the absolute starting position QI of the orthogonal pulse signal, the number of times the motor reaches the defined position QS, the interrupt information PHE, and the signal PCS OUT for feeding back to the external position counting direction and number;

[0007] The orthogonal capture unit is used to measure the motor speed according to the orthogonal clock QCLK generated by the rising / falling edges of the two input clocks when the motor speed is less than the minimum speed threshold;

[0008] The time base unit is connected to the position counting control unit and the system clock; the time base unit is used to calculate the speed according to the periodic interruption generated by the system clock;

[0009] The watchdog is connected to the position counting control unit; the watchdog is used for stall detection;

[0010] The position counting control unit is connected to the orthogonal encoding unit; the position counting control unit is used to receive the encoding signal, and determine the running direction, count, position of the motor and generate interrupt information according to the encoding signal.

[0011] Optionally, the position counting control unit includes: a position counter and a position counting register.

[0012] A motor position and speed measurement system, the measurement system comprising: an EQEP module and an optical encoder connected via a programmable input module; the measurement system comprising:

[0013] The position measurement module is used for when the EQEP module works in the position event, reset position counting mode, when the index signal QEPI is moving in the forward direction, the position counter inside the position counting control unit is reset to 0; when the index signal QEPI is moving in the reverse direction, the position counter is reset to the value in the position counting register inside the position counting control unit; and the mechanical angle of the rotor is determined according to the position counting value of the position counter and the resolution line number of the optical encoder;

[0014] The motor speed measurement module is used to measure the speed using the M method when the motor speed is greater than the maximum speed threshold; when the motor speed is less than the minimum speed threshold, the T method is used to measure the speed; when the motor speed is greater than or equal to the minimum speed threshold and less than or equal to the maximum speed threshold, the M / T combined method is used to measure the speed.

[0015] Optionally, the position measurement module specifically includes:

[0016] Position measurement unit for using the formula Determine the rotor mechanical angle;

[0017] Where, θ is the rotor mechanical angle, QPOSCNT is the position count value of the position counter, X is the resolution line number of the optical encoder, θ ex is the angle offset.

[0018] Optionally, the motor speed measurement module specifically includes:

[0019] The first measurement unit of the motor speed is used to use the formula Determine the motor speed;

[0020] The second motor speed measurement unit is used to use the formula Determine the motor speed;

[0021] The third motor speed measurement unit is used to measure the motor speed using the formula S c =axS t +bxS m Determine the motor speed;

[0022] Among them, S m is the motor speed when the motor speed is greater than the maximum speed threshold, S t is the motor speed when the motor speed is less than the minimum speed threshold, S c is the motor speed when the motor speed is greater than or equal to the minimum speed threshold and less than or equal to the maximum speed threshold, Q P is the value in the position count register, F s is the speed measurement frequency, D P is the inverse of the position pulse frequency division number, C s is the system clock, Q c is the value in the position count register QCPRDLAT, a and b are weight coefficients, S H and S L They are the maximum speed threshold and the minimum speed threshold respectively.

[0023] A method for measuring the position and speed of a motor, used to implement a system for measuring the position and speed of a motor, the method comprising:

[0024] When the EQEP module works in the position event, reset position counting mode, when the index signal QEPI is moving in the positive direction, the position counter inside the position counting control unit is reset to 0;

[0025] When the index signal QEPI is in reverse motion, the position counter is reset to the value in the position count register inside the position count control unit;

[0026] Determine the mechanical angle of the rotor based on the position count value of the position counter and the resolution line number of the optical encoder;

[0027] When the motor speed is greater than the maximum speed threshold, the M method is used to measure the speed;

[0028] When the motor speed is less than the minimum speed threshold, the T method is used to measure the speed;

[0029] When the motor speed is greater than or equal to the minimum speed threshold and less than or equal to the maximum speed threshold, the M / T combination method is used to measure the speed.

[0030] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0031] The present invention provides an EQEP module and a system and method for measuring the position and speed of a motor. The EQEP module includes: an orthogonal encoding unit, a position counting control unit, a time base unit, an orthogonal capture unit and a watchdog; the orthogonal encoding unit determines the encoding signal based on the orthogonal input signal with a phase shift of 90°, the index signal and the selection input generated by the motor rotation obtained by the optical encoder; when the motor speed is less than the minimum speed threshold, the orthogonal capture unit measures the motor speed based on the orthogonal clock generated by the rising / falling edges of the two input clocks; the time base unit calculates the speed based on the periodic interruption generated by the system clock; the position counting control unit is used to receive the encoding signal, and determine the running direction, count, position of the motor and generate interrupt information based on the encoding signal. The EQEP module cooperates with the optical encoder to provide real-time feedback and infer the high-precision position and speed of intelligent devices such as sweeping robots equipped with motors. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0033] Figure 1 This is a schematic diagram of the structure of an EQEP module provided by the present invention. DETAILED DESCRIPTION

[0034] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0035] The object of the present invention is to provide an EQEP module and a system and method for measuring the position and speed of a motor, which can improve the accuracy of measuring the position and speed of an intelligent device.

[0036] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0037] Figure 1 A schematic diagram of the structure of an EQEP module provided by the present invention is shown in FIG. Figure 1 As shown, an EQEP module provided by the present invention includes: an orthogonal encoding unit, a position counting control unit, a time base unit, an orthogonal capture unit and a watchdog.

[0038] The orthogonal encoding unit is used to determine the encoding signal based on the orthogonal input signals EQEPA and EQEPB with a phase shift of 90° generated by the motor rotation obtained by the optical encoder, the index signal EQEPI and the selection input EQEPS; the encoding signal includes: the orthogonal clock QCLK generated by the rising / falling edges of the two input clocks of the orthogonal input signal, the signal QDIR for selecting the counting mode, the absolute starting position QI of the orthogonal pulse signal, the number of times the motor reaches the defined position QS, the interrupt information PHE, and the signal PCS OUT for feeding back to the outside the position counting direction and number.

[0039] The quadrature capture unit is used to measure the motor speed according to the quadrature clock QCLK generated by the rising / falling edges of two input clocks when the motor speed is less than the minimum speed threshold.

[0040] The time base unit is connected to the position counting control unit and the system clock; the time base unit is used to perform speed calculation according to the periodic interruption generated by the system clock.

[0041] The watchdog is connected to the position counting control unit; the watchdog is used for stall detection.

[0042] The position counting control unit is connected to the orthogonal encoding unit; the position counting control unit is used to receive the encoding signal, and determine the running direction, count, position of the motor and generate interrupt information according to the encoding signal.

[0043] like Figure 1 As shown, an EQEP module provided by the present invention is connected to a photoelectric encoder through a programmable input module; through the programmable input module, orthogonal input signals EQEPA and EQEPB with a phase shift of 90° generated by the rotation of the motor obtained by the optical encoder, the index signal EQEPI, and the selection input EQEPS determine that the encoding signal corresponding to the generated EQEQAIN, EQEPB IN, EQEPI IN, EQEPS IN, EQEPI OUT, EQEPS OUT, EQEPA, and the enable signals EQEQA OE and EQEPS OE corresponding to EQEPS are input into the EQEP module.

[0044] The position counting control unit includes: a position counter and a position counting register.

[0045] When the EQEP unit selects the orthogonal counting mode, the device provides the counting clock QCLK for the position counter by detecting the edges of the EQEPA and EQEPB signals, where the clock frequency generated by the EQEP logic is 4 times the input clock frequency. The orthogonal encoding unit determines the sequence of the two input signals and gives the counting direction QDIR to determine whether the position counting control unit increases or decreases the count. Therefore, when the motor rotor connected to the optical encoder rotates to any position on the circular plane, there will be a specific position count value corresponding to it, and the motor position state can be obtained by calculation.

[0046] The present invention also provides a motor position and speed measurement system, the measurement system comprising: an EQEP module and an optical encoder connected via a programmable input module; the measurement system comprising:

[0047] The position measurement module is used for when the EQEP module works in the position event, reset position counting mode, when the index signal QEPI is moving in the forward direction, the position counter inside the position counting control unit is reset to 0; when the index signal QEPI is moving in the reverse direction, the position counter is reset to the value in the position counting register inside the position counting control unit; and the mechanical angle of the rotor is determined according to the position counting value of the position counter and the resolution line number of the optical encoder;

[0048] The motor speed measurement module is used to measure the speed using the M method when the motor speed is greater than the maximum speed threshold; when the motor speed is less than the minimum speed threshold, the T method is used to measure the speed; when the motor speed is greater than or equal to the minimum speed threshold and less than or equal to the maximum speed threshold, the M / T combined method is used to measure the speed.

[0049] When the motor speed is greater than the maximum speed threshold, the time unit inside the time base unit is used as the time base;

[0050] When the motor speed is less than the minimum speed threshold, the orthogonal capture unit is used to perform edge detection, that is, to measure the timer period between a specific number of position count pulses to measure the time between two position events.

[0051] When the motor speed is greater than or equal to the minimum speed threshold and less than or equal to the maximum speed threshold, the machine is in a smooth conversion process from low speed to high speed.

[0052] When the resolution line number of the optical encoder is X, the value in the position count register is 4X-1. When the motor rotor rotates 360° in a circle, the count value in the position count unit changes linearly from 0 to 4X-1. Therefore, the position count value QPOSCNT proportional to the rotor position can be directly obtained from the position count register. The mechanical angle of the rotor can be calculated as:

[0053]

[0054] According to the actual situation, the mechanical angle may change due to different motor rotor installation processes or different reference coordinate system selections, so an angle offset θ is introduced into the above formula. ex After making an angle correction, a new formula for calculating the rotor mechanical angle is obtained.

[0055] The position measurement unit is used to use the formula Determine the rotor mechanical angle;

[0056] Where, θ is the rotor mechanical angle, QPOSCNT is the position count value of the position counter, X is the resolution line number of the optical encoder, θ ex is the angle offset.

[0057] The motor speed measurement module specifically includes:

[0058] The first measurement unit of the motor speed is used to use the formula Determine the motor speed;

[0059] The second motor speed measurement unit is used to use the formula Determine the motor speed;

[0060] The third motor speed measurement unit is used to measure the motor speed using the formula S c =axS t +bxS m Determine the motor speed;

[0061] Among them, S m is the motor speed when the motor speed is greater than the maximum speed threshold, S t is the motor speed when the motor speed is less than the minimum speed threshold, S c is the motor speed when the motor speed is greater than or equal to the minimum speed threshold and less than or equal to the maximum speed threshold, Q P is the value in the position count register, F s is the speed measurement frequency, D P is the inverse of the position pulse frequency division number, C s is the system clock, Q c is the value in the position count register QCPRDLAT, a and b are weight coefficients, S H and S L They are the maximum speed threshold and the minimum speed threshold respectively.

[0062] A motor position and speed measurement method provided by the present invention is used to implement a motor position and speed measurement system, and the measurement method includes:

[0063] S101, when the EQEP module works in the position event, reset position counting mode, when the index signal QEPI is moving in the positive direction, the position counter inside the position counting control unit is reset to 0;

[0064] S102, when the index signal QEPI is in reverse motion, the position counter is reset to the value in the position count register inside the position count control unit;

[0065] S103, determining the mechanical angle of the rotor according to the position count value of the position counter and the resolution line number of the optical encoder;

[0066] S104, when the motor speed is greater than the maximum speed threshold, the speed is measured using the M method;

[0067] S105, when the motor speed is less than the minimum speed threshold, the speed is measured using the T method;

[0068] S106: When the motor speed is greater than or equal to the minimum speed threshold and less than or equal to the maximum speed threshold, the speed is measured using the M / T combination method.

[0069] The present invention cooperates with the designed EQEP module and the optical encoder. The output EQEPA, EQEPB, EQEPI and EQEPS signals generated by the optical encoder are processed by the programmable input module and enter the EQEP module. The module can be integrated into the corresponding DSP chip. The algorithm can provide real-time feedback and infer the high-precision position and speed of intelligent devices such as sweeping robots equipped with motors, thereby meeting the high standards of accuracy, performance and advanced control strategies.

[0070] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0071] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. An EQEP module, characterized in that: include: Orthogonal encoding unit, position counting control unit, time base unit, orthogonal capture unit and watchdog; The orthogonal encoding unit is used to determine the encoding signal according to the orthogonal input signals EQEPA and EQEPB with a phase shift of 90° generated by the motor rotation obtained by the optical encoder, the index signal EQEPI and the selection input EQEPS; The encoding signal includes: the orthogonal clock QCLK generated by the rising / falling edges of the two input clocks of the orthogonal input signal, the signal QDIR for selecting the counting mode, the absolute starting position QI of the orthogonal pulse signal, the number of times the motor reaches the defined position QS, the interrupt information PHE, and the signal PCS OUT for feeding back to the external position counting direction and number; The orthogonal capture unit is used to measure the motor speed according to the orthogonal clock QCLK generated by the rising / falling edges of the two input clocks when the motor speed is less than the minimum speed threshold; The time base unit is connected to the position counting control unit and the system clock; the time base unit is used to calculate the speed according to the periodic interruption generated by the system clock; The watchdog is connected to the position counting control unit; the watchdog is used for stall detection; The position counting control unit is connected to the orthogonal encoding unit; the position counting control unit is used to receive the encoding signal, and determine the running direction, count, position of the motor and generate interrupt information according to the encoding signal.

2. An EQEP module according to claim 1, characterized in that: The position counting control unit includes: a position counter and a position counting register.

3. A motor position and speed measurement system, the measurement system comprising: An EQEP module and an optical encoder according to any one of claims 1 to 2 connected via a programmable input module; characterized in that the measurement system comprises: The position measurement module is used for when the EQEP module works in the position event, reset position counting mode, when the index signal EQEPI is in the forward motion, the position counter inside the position counting control unit is reset to 0; when the index signal EQEPI is in the reverse motion, the position counter is reset to the value in the position counting register inside the position counting control unit; and the mechanical angle of the rotor is determined according to the position counting value of the position counter and the resolution line number of the optical encoder; The motor speed measurement module is used to measure the speed using the M method when the motor speed is greater than the maximum speed threshold; when the motor speed is less than the minimum speed threshold, the T method is used to measure the speed; when the motor speed is greater than or equal to the minimum speed threshold and less than or equal to the maximum speed threshold, the M / T combined method is used to measure the speed.

4. A motor position and speed measurement system according to claim 3, characterized in that: The position measurement module specifically includes: Position measurement unit for using the formula Determine the rotor mechanical angle; Where, θ is the rotor mechanical angle, QPOSCNT is the position count value of the position counter, X is the resolution line number of the optical encoder, and θ is the position of the position counter. ex is the angle offset.

5. A motor position and speed measurement system according to claim 4, characterized in that: The motor speed measurement module specifically includes: The first measurement unit of the motor speed is used to use the formula Determine the motor speed; The second motor speed measurement unit is used to use the formula Determine the motor speed; The third motor speed measurement unit is used to measure the motor speed using the formula S c =a×S t +b×S m Determine the motor speed; Among them, S m is the motor speed when the motor speed is greater than the maximum speed threshold, S t is the motor speed when the motor speed is less than the minimum speed threshold, S c is the motor speed when the motor speed is greater than or equal to the minimum speed threshold and less than or equal to the maximum speed threshold, Q P is the value in the position count register, F s is the speed measurement frequency, D P is the inverse of the position pulse frequency division number, C s is the system clock, Q c is the value in the position count register QCPRDLAT, a and b are weight coefficients, a+b= S H and S L They are the maximum speed threshold and the minimum speed threshold respectively.

6. A method for measuring motor position and speed, used to implement a motor position and speed measurement system as claimed in any one of claims 3 to 5, characterized in that: The measuring method comprises: When the EQEP module works in the position event, reset position counting mode, when the index signal EQEPI is moving in the positive direction, the position counter inside the position counting control unit is reset to 0; When the index signal EQEPI is in reverse motion, the position counter is reset to the value in the position count register inside the position count control unit; Determine the mechanical angle of the rotor according to the position count value of the position counter and the resolution line number of the optical encoder; When the motor speed is greater than the maximum speed threshold, the M method is used to measure the speed; When the motor speed is less than the minimum speed threshold, the T method is used to measure the speed; When the motor speed is greater than or equal to the minimum speed threshold and less than or equal to the maximum speed threshold, the M / T combination method is used to measure the speed.

Citation Information

Patent Citations

  • Method and device for measuring rotating speed of motor

    CN102200541A

  • Rotary electrical machine control system

    JP2009248707A