Method for obtaining running position of motor through resistance

By using a high-precision current source and MCP3561 ADC converter in motor position detection, combined with real-time 50Hz power frequency and high-frequency FIT filtering algorithm, the detection delay and inaccuracy caused by high-frequency signal interference during motor operation is solved, and high-frequency Accuracy and real-time motor position monitoring.

CN119420207APending Publication Date: 2025-02-11SHENZHEN SANJIE MICRO CONTROL IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411575795.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-06
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

The prior art causes delays and inaccuracies in motor position detection due to high-frequency signal interference during motor operation. Traditional RC filtering is not enough to eliminate interference and affect real-time monitoring.

Method used

Using high-precision current source and MCP3561 single low-noise 24-bit Δ-ΣADC converter, combined with real-time 50Hz power frequency and high-frequency FIT filtering algorithm, the voltage signal in motor position detection is filtered to remove periodic noise and burst noise. .

Benefits of technology

It realizes high-precision detection of motor position, improves the system's anti-interference ability, ensures the accuracy of measurement data, realizes real-time monitoring of motor displacement, and reduces detection delay.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119420207A_ABST
    Figure CN119420207A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of motor control, and provides a method for obtaining the running position of a motor through a resistor, and the high-precision detection of the position of the motor is realized through a high-precision current source and an MCP3561 single-path low-noise 24-bit delta-sigma ADC (Analog to Digital Converter). And high-frequency interference signals sensed during operation of the motor are filtered, so that the anti-interference capability of the system during operation of the motor is improved, and the accuracy of measured data is ensured. According to the invention, the reading speed is improved to 1.2 KHz, and the real-time monitoring of the displacement of the motor is realized in cooperation with the real-time 50Hz power frequency and high-frequency FIT filtering algorithm, so that the 50Hz periodic noise and burst noise are effectively removed, and the response speed of the system is improved to accurately obtain the running position of the motor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of motor control, and in particular relates to a method for obtaining a motor running position through a resistor. Background Art

[0002] In the use of motors, by accurately measuring the position of the motor, the operation of the motor can be controlled more accurately, which is crucial for applications that require fine adjustment (such as precision machinery, automation equipment, etc.). In some applications, such as industrial robotic arms or transportation systems, accurate motor position monitoring is a key factor in ensuring operational safety.

[0003] However, when the motor is running, the high-frequency signal generated by the motor will induce interference signals on the variable resistor connected to the motor surface. This interference signal will cause errors in measuring the resistance value, affecting the accurate detection of the motor position. The traditional motor position detection method does not add a filtering mechanism in the software. The RC filtering in the circuit alone cannot eliminate it, resulting in the inability to monitor the displacement of the variable resistor in real time, especially during the operation of the motor, which will cause delays and inaccuracies in the motor position detection.

[0004] Therefore, the prior art has defects. Summary of the invention

[0005] The purpose of the present invention is to overcome the above-mentioned shortcomings of the prior art in the detection of motor position, such as delay and inaccuracy, and to provide a method for obtaining the running position of a motor through a resistor.

[0006] The present invention is implemented as follows: a method for obtaining the running position of a motor through a resistor comprises the following steps:

[0007] S01, injecting current into the variable resistor through a high-precision current source;

[0008] S02, measuring the voltage across the variable resistor;

[0009] S03, using MCP3561 single-channel low-noise 24-bit Δ-Σ ADC converter to convert the measured voltage signal into a digital signal;

[0010] S04, reading the voltage value converted by the ADC converter at a rate of 1.2 KHz;

[0011] S05, using a software algorithm to perform real-time 50 Hz power frequency and high frequency FIT filtering on the voltage value to remove periodic noise and burst noise;

[0012] S06. Determine the running position of the motor according to the filtered voltage value.

[0013] Furthermore, in step S05, the software algorithm includes establishing a 24-point array corresponding to different phases of the 50 Hz signal.

[0014] Furthermore, the software algorithm also includes accumulating the values ​​at each moment a certain number of times m to obtain a model with superimposed 50 Hz noise.

[0015] Furthermore, the value of m is 64 to establish an array base

[64]

[24] and an array tmp

[24] of 64*24 points.

[0016] Furthermore, each value of tmp

[24] is a cumulative sum of 64 times with the same phase.

[0017] Furthermore, the real-time 50 Hz power frequency filter also includes calculating 1 / 2 of the difference between the value of each phase point and its 180 phase point to obtain the m-th sum of the power frequency noise of the current phase.

[0018] Furthermore, in step S05, the FIT filter uses 5-point [0.0625, 0.125, 0.375, 0.125, 0.0625] coefficients for recursive product sum.

[0019] Furthermore, after power-on, 64*24 values ​​are read at a reading rate of 1.2KHz and loaded into base

[64]

[24] and tmp

[24] respectively.

[0020] Furthermore, the value of tmp[tn] is updated after each reading, and a phase change is performed.

[0021] Furthermore, the m value is updated when the phase accumulation value changes, and is reset to 0 when the m value reaches 64.

[0022] The present invention provides a method for obtaining the running position of a motor through a resistor, which realizes high-precision detection of the motor position through a high-precision current source and a MCP3561 single-channel low-noise 24-bit Δ-ΣADC converter. The high-frequency interference signal induced when the motor is running is filtered, which improves the anti-interference ability of the system during the operation of the motor and ensures the accuracy of the measurement data. The reading rate is increased to 1.2KHz, and the real-time 50Hz power frequency and high-frequency FIT filtering algorithm are used to realize real-time monitoring of the motor displacement, effectively remove 50Hz periodic noise and burst noise, and improve the response speed of the system to accurately obtain the running position of the motor. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] 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 or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0024] The following drawings are only intended to illustrate and explain the present invention, and are not intended to limit the scope of the present invention.

[0025] Figure 1 The present invention provides a method flow chart of a method for obtaining the running position of a motor through resistance. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0027] See also Figure 1 , a method for obtaining the running position of a motor through resistance disclosed in the invention, comprising the following steps:

[0028] S01. Inject current into the variable resistor through a high-precision current source.

[0029] S02. Measure the voltage across the variable resistor.

[0030] S03. Use the MCP3561 single low-noise 24-bit Δ-Σ ADC converter to convert the measured voltage signal into a digital signal.

[0031] S04. Read the voltage value converted by the ADC converter at a rate of 1.2 KHz.

[0032] S05. Use a software algorithm to perform real-time 50 Hz power frequency and high frequency FIT filtering on the voltage value to remove periodic noise and burst noise.

[0033] S06. Determine the running position of the motor according to the filtered voltage value.

[0034] Specifically, first, a high-precision current source is used to inject current into the variable resistor, and the voltage across the resistor is measured to determine the position of the variable resistor sliding end. This voltage detection is achieved through a high-precision ADC conversion circuit. The main chip of the circuit is the MCP3561 single-channel low-noise 24-bit Δ-Σ ADC converter, which converts the measured voltage signal into a digital signal.

[0035] The voltage signal output by the conditioning circuit to MCP3561 includes the resistance value, i.e. voltage, 50Hz power frequency and 30KHz signal of motor interference. Although MCP3561 itself provides 50Hz notch function, it is necessary to monitor the displacement of the variable resistor during the operation of the motor, that is, to read the voltage value converted by MCP3561 by changing the reading rate to 1.2KHz, and to perform real-time 50Hz power frequency and high-frequency FIT filtering with the algorithm, that is, to remove 50Hz periodic noise, remove burst noise, obtain accurate voltage across the resistor, perform voltage displacement conversion, and can be used as the position reference of the motor operation.

[0036] According to the reading rate of 1.2KHz, a 24-point array is established, corresponding to the different phases tn0~tn23 of the 50Hz signal. The values ​​at each moment are accumulated a certain number of times m to obtain a model with superimposed 50Hz noise. The 1 / 2 difference between the value of each phase point and its 180 phase point is the sum of the current phase power frequency noise m times. The current phase value minus the noise value restores the expected value.

[0037] Considering the RAM resources of the MCU, i.e., the capacity of the random access memory used to temporarily store data and programs in the microcontroller unit, m is set to 64, and a 64*24 point array base

[64]

[24] and an array tmp

[24] are established. 24 corresponds to 24 phases of 360 degrees. The parameter m represents the number of accumulations and is used to construct a model of superimposed 50Hz noise. The selection of m=64 is based on the trade-off between RAM resources and noise filtering accuracy. A larger m value can provide better noise filtering accuracy, but at the same time, more RAM resources are required to store the accumulated data. The array base

[64]

[24] is used to store the voltage values ​​of 24 phase points of 64 consecutive cycles. Each phase point corresponds to a specific phase of the 50Hz signal. The 24 phase points cover the entire signal cycle, i.e., 360 degrees. The array tmp

[24] is used to store the 64 accumulated sums of the same phase point, i.e., tmp[n]=base[0][n]+base[1][n]+base[2][n]+…base

[63] [n]. In this way, the noise value at each phase point can be effectively calculated and subtracted from the raw voltage value to obtain a more accurate voltage reading.

[0038] After power-on, the voltage value is read 1200 times per second at a reading rate of 1.2KHz. Since there are 64 cycles of data and each cycle has 24 phase points, the system needs to read 64*24 values. The system stores the read voltage values ​​in two arrays, base

[64]

[24] and tmp

[24] . The base

[64]

[24] array is used to store the voltage values ​​of 64 cycles, each cycle has 24 phase points. The tmp

[24] array is used to store the cumulative sum of the 24 phase points. Before officially entering the voltage displacement conversion, an initial adjustment of the tmp

[24] array is required. Specifically, the value of tmp[0] needs to be subtracted from the value of base[0][0] in order to eliminate the initial phase deviation and ensure the accuracy of subsequent calculations. After the system completes the above reading rate, number of times, and data storage adjustments, the system enters the formal voltage displacement conversion stage. At this stage, the system will process the voltage value according to the established algorithm, perform real-time noise filtering and position monitoring, and enter the formal voltage displacement conversion. It can ensure that data can be effectively stored and processed under limited RAM resources, providing accurate basic data for subsequent signal processing and position monitoring.

[0039] Since each cycle has 24 phase points, each phase point corresponds to a specific time point or angle, and each phase point is defined as tn. Each phase point corresponds to 1 / 24 of a complete cycle of a 50Hz AC signal. The value range of tn is 0 to 23. tn=0 represents the beginning of the cycle, and tn=23 represents the end of the cycle. For each phase point tn (tn=0~23), perform the following steps:

[0040] A. Add the number of tmp corresponding to the current phase tn to the currently read voltage value inVLM.

[0041] Specifically, the tmp array is used to store the cumulative sum of these phase points. For each phase point tn (tn=0-23), the currently read voltage value inVLM is added to tmp[tn], which can be expressed as tmp[tn]+=inVLM.

[0042] B. Calculate the current phase tmp value minus the tmp value of the 180-degree phase difference to get the noise sum, and divide it by 64 to get the current phase noise value noiseVLM.

[0043] Specifically, in AC signal processing, a 180-degree phase difference means that the two signals differ in time by half a cycle. For example, if one signal is at a phase of 0 degrees and the other is at a phase of 180 degrees, they differ in waveform by half a cycle. The tmp array stores the cumulative sum of 24 phase points, and the value of each phase point is the cumulative sum of the voltage values ​​of the phase point in the past 64 cycles. For the current phase tn, calculate the difference between tmp[tn] and tmp[tn+12]. This difference represents the voltage difference between the current phase and its 180-degree phase. This difference is mainly caused by noise. In order to obtain the noise value of the current phase, divide the calculated difference by 64, and you can get the average noise value noiseVLM, which can be expressed as: noiseVLM = (tmp[tn]-tmp[tn+12]) / 64. Once the noise value noiseVLM is obtained, it can be subtracted from the original voltage value to get a more accurate voltage reading.

[0044] C. The current read voltage value inVLM minus the noise value noiseVLM gets the expected value result. The expected value result is the expected real voltage value after removing the noise effect, which is closer to the real resistance value of the motor at the current position. It can be expressed as: result = inVLM – noiseVLM.

[0045] D. Update tmp[tn], subtract the current read value inVLM, and prepare for the next read.

[0046] Specifically, the tmp[tn] array stores the cumulative sum of a specific phase tn. After each processing cycle, updating the tmp[tn] array can avoid additional calculations during the next read, thereby improving processing efficiency. After each processing of the data of the current phase tn, the last processed read value inVLM needs to be subtracted from tmp[tn] in order to remove the used value from the cumulative sum and ensure that the cumulative sum always reflects the latest data. This can be expressed as: tmp[tn]-=inVLM.

[0047] E. Perform phase changes and update the tn value. When processing periodic signals, it is necessary to track the phase point currently being processed. Each time a phase point is processed, the value of tn will increase by 1, and so on. Specifically, if tn reaches 24, reset tn to 0 and update the m value: When the value of tn reaches 24, it means that a full cycle (24 phase points) has been processed. At this time, tn will be reset to 0 to start the next cycle of processing. The reset of tn ensures that the algorithm can process all phase points in a loop, and the parameter m is used to track the number of cycles currently being processed. Each time tn is reset to 0, the value of m will increase by 1, indicating that an additional cycle of processing has been completed. If m reaches 64, reset m to 0: When the value of m reaches 64, it means that 64 cycles of processing have been completed. At this time, m will be reset to 0 to start a new cycle count, ensuring that the value of m will not grow indefinitely and remain within a controllable range.

[0048] F. After obtaining the expected value result, use the 5-point [0.0625, 0.125, 0.375, 0.125, 0.0625] coefficients for FIT filtering, and obtain a voltage value that accurately reflects the resistance value by recursive product sum. The expected value result is the voltage value after preliminary processing and is the input of the filtering process. The performance of the FIT filter is determined by its coefficients. In this embodiment, the FIT filter uses 5 coefficients: [0.0625, 0.125, 0.375, 0.125, 0.0625]. For each new input value result, the output of the FIR filter can be calculated in the following way: output = 0.0625 × result + 0.125 × result n-1 +0.375×result n-2 +0.125×result n-3 +0.0625×result n-4 Through FIR filtering, a smoother and more accurate voltage value can be obtained, providing a basis for subsequent confirmation of the motor's operating position.

[0049] G. Finally, the processed voltage value is converted into a motor position reference to ensure accurate monitoring of the motor position. Since there may be a linear or nonlinear relationship between the voltage value of the motor and its position, the motor operating position can be confirmed by the voltage value. The conversion from voltage value to motor position is generally completed by the motor control system. In this solution, the specific method of converting from voltage value to motor position is not limited.

[0050] Through the above steps, the technical solution mainly obtains the running position of the motor by obtaining the precise voltage value after removing the noise, realizes the real-time monitoring of the motor displacement, so as to accurately obtain the running position of the motor, and can maintain high accuracy and stability even in the presence of high-frequency interference.

[0051] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions or improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for obtaining the running position of a motor through resistance, characterized in that: The steps include: S01, injecting current into the variable resistor through a high-precision current source; S02, measuring the voltage across the variable resistor; S03, using MCP3561 single-channel low-noise 24-bit Δ-Σ ADC converter to convert the measured voltage signal into a digital signal; S04, reading the voltage value converted by the ADC converter at a rate of 1.2 KHz; S05, using a software algorithm to perform real-time 50 Hz power frequency and high frequency FIT filtering on the voltage value to remove periodic noise and burst noise; S06. Determine the running position of the motor according to the filtered voltage value.

2. A method for obtaining the running position of a motor through resistance according to claim 1, characterized in that: In step S05, the software algorithm includes establishing an array of 24 points corresponding to different phases of the 50 Hz signal.

3. The method for obtaining the running position of a motor by using a resistor according to claim 2, characterized in that: The software algorithm also includes accumulating the values ​​at each moment a certain number of times m to obtain a model with superimposed 50 Hz noise.

4. The method for obtaining the running position of a motor by using a resistor according to claim 3, characterized in that: The value of m is 64 to establish an array base[64][24] and an array tmp[24] of 64*24 points.

5. The method for obtaining the running position of a motor through resistance according to claim 4, characterized in that: Each value of tmp[24] is the sum of 64 accumulations of the same phase.

6. The method for obtaining the running position of a motor through resistance according to claim 1, characterized in that: The real-time 50 Hz power frequency filter also includes calculating 1 / 2 of the difference between the value of each phase point and its 180 phase point to obtain the m-th sum of the power frequency noise of the current phase.

7. The method for obtaining the running position of a motor through resistance according to claim 1, characterized in that: In step S05, the FIT filter uses 5-point [0.0625, 0.125, 0.375, 0.125, 0.0625] coefficients for recursive product sum.

8. The method for obtaining the running position of a motor through resistance according to claim 4, characterized in that: After power-on, read 64*24 values ​​at a reading rate of 1.2KHz and load them into base[64][24] and tmp[24] respectively.

9. The method for obtaining the running position of a motor through resistance according to claim 8, characterized in that: The value of tmp[tn] is updated after each read and a phase change is made.

10. The method for obtaining the running position of a motor through resistance according to claim 3, characterized in that: The value of m is updated when the phase accumulation value changes and reset to 0 when the value of m reaches 64.