Magnetic encoder harmonic suppression method and system based on improved phase-locked loop

By improving the phase-locked loop method, using Kalman filtering and gradient descent algorithm to decompose and suppress harmonic interference, the problem of interference in the analog TMR magnetic encoder signal is solved, the accuracy and stability of signal processing are improved, phase estimation is simplified, and calculation cost is reduced.

CN120263173AActive Publication Date: 2025-07-04HUBEI DOMAIN CONTROL INTELLIGENT DRIVE TECH CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202510713357.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-07-04
Estimated Expiration
2045-05-30

AI Technical Summary

Technical Problem

The prior art is inadequate in the accuracy and stability when processing complex interference in analog TMR magnetic encoder signals, especially in the power quality monitoring system, harmonic interference leads to an increase in measurement errors and reduces system reliability and accuracy.

Method used

The improved phase lock loop method is adopted to collect the output signal of the magnetic encoder, and the phase error signal is decomposed using Kalman filtering and gradient descent algorithms, estimate the amplitude and phase of the harmonic interference term, and adjust the phase of the harmonic interference term to zero through trigonometric function expansion to achieve harmonic suppression.

Benefits of technology

It improves the accuracy and stability of signal processing, simplifies the complexity of phase estimation and compensation, reduces the calculation cost, and improves the algorithm's convergence speed and the system's lock time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120263173A_ABST
    Figure CN120263173A_ABST
Patent Text Reader

Abstract

The invention discloses a magnetic encoder harmonic suppression method and system based on an improved phase-locked loop, and the method comprises the following steps: collecting an angle signal outputted by a magnetic encoder, comparing the angle signal outputted by the magnetic encoder with an estimated angle signal fed back by the phase-locked loop, and generating a phase error signal; decomposing the phase error signal into a phase error and a harmonic interference term, and estimating the amplitude and phase of the harmonic interference term through a gradient descent algorithm; adjusting the phase of the harmonic interference item to be zero phase through trigonometric function expansion, and updating an estimated value and an estimated angle signal of the amplitude of the harmonic interference item; and repeating the steps until the estimated angle signal fed back by the phase-locked loop is consistent with the angle signal output by the magnetic encoder in phase, and outputting the angle and speed information of the magnetic encoder.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of encoder control, and particularly relates to a method and system for suppressing harmonics of a magnetic encoder based on an improved phase-locked loop. Background Art

[0002] In an analog TMR magnetic encoder system, signal processing faces complex interference problems. These interferences include low-order and high-order harmonics, DC bias, and random noise, which seriously affect the accuracy of the signal and the performance of the system. For example, in a power quality monitoring system, the presence of harmonics will cause an increase in measurement errors and reduce the reliability and accuracy of the system. Therefore, how to effectively suppress interference and improve the accuracy of signal processing is an urgent problem to be solved currently.

[0003] For the interference problems in signal processing, a variety of techniques have been proposed and applied currently. For example, the method based on adaptive Kalman filtering realizes the estimation and suppression of interference through residual analysis. The optimization method based on the gradient descent algorithm has also been widely applied in the field of signal processing for parameter estimation and model optimization.

[0004] Although the existing technologies can handle the interference in the signal to a certain extent, they still face some challenges in practical applications. The adaptive Kalman filtering method can estimate harmonics, but it has limited effects in dealing with high-frequency interference and random noise. In addition, although the gradient descent algorithm performs well in parameter optimization, it has difficulties in estimating the phase of non-deterministic interference harmonics and is easily affected by the initial value and learning rate. Therefore, the accuracy and stability of the existing technologies in dealing with complex interference signals still need to be improved. Summary of the Invention

[0005] The present invention proposes a method and system for suppressing harmonics of a magnetic encoder based on an improved phase-locked loop, which solves the problem of low accuracy and stability of the existing signal processing technologies in dealing with complex interference signals.

[0006] To solve the above technical problems, the present invention provides a method for suppressing harmonics of a magnetic encoder based on an improved phase-locked loop, including the following steps: Step S1: Collect the angle signal output by the magnetic encoder, compare the angle signal output by the magnetic encoder with the estimated angle signal fed back by the phase-locked loop, and generate a phase error signal; Step S2: Decompose the phase error signal into a phase error and a harmonic interference term, and estimate the amplitude and phase of the harmonic interference term through the gradient descent algorithm; Step S3: Adjust the phase of the harmonic interference term to zero phase through trigonometric function expansion, and update the estimated value of the amplitude of the harmonic interference term and the estimated angle signal; Step S4: Repeat steps S1 to S3 until the phase of the estimated angle signal fed back by the phase-locked loop is consistent with the phase of the angle signal output by the magnetic encoder, and output the angle and speed information of the magnetic encoder.

[0007] Preferably, after collecting the angle signal output by the magnetic encoder in step S1, perform Kalman filtering on the angle signal.

[0008] Preferably, the expression of the phase error signal in step S1 is: ; In the formula, is the phase error signal; , are respectively the sine signal and the cosine signal of the angle signal output by the magnetic encoding; is an arbitrary sine phase without loss of generality, and its frequency is times the main encoder shaft frequency ; is the low-order and high-order harmonic phases, and its frequency is times the main encoder shaft frequency ; , are respectively the amplitudes of the sine signal and the cosine signal; , are respectively the amplitudes of the harmonic interference terms of the sine signal and the cosine signal; , are respectively the phases of the harmonic interference terms of the sine signal and the cosine signal; is the number of harmonic interferences in the angle signal output by the magnetic encoding; is the sine phase of the estimated angle signal output by the phase-locked loop, and its frequency is times the estimated frequency ; , are respectively the DC biases of the sine signal and the cosine signal; , are respectively the random noises of the sine signal and the cosine signal.

[0009] Preferably, the expression of the harmonic interference term in step S2 is: ; In the formula, is the harmonic interference term; , are respectively the amplitudes of the sine signal and the cosine signal; is the phase of the estimated angle signal output by the phase-locked loop; , are respectively the DC biases of the sine signal and the cosine signal; is the number of interfering harmonics in the angular signal output by the magnetic encoder; , are the amplitudes of the interfering harmonics of the sine signal and the cosine signal respectively; , are the phases of the interfering harmonics of the sine signal and the cosine signal respectively; is an integer between 0 and ; is any positive integer; is the phase of the phase-locked loop estimated angular signal.

[0010] Preferably, the estimating the amplitudes and phases of the harmonic interference terms by the gradient descent algorithm in step S2 includes the following steps: Step S21: Simplify the harmonic interference term to: ; ; ; ; wherein, is the simplified form of the harmonic interference term; is the number of low-order and high-order harmonics in the angular signal output by the magnetic encoder; , are the true amplitudes of the harmonic interference of the sine signal and the cosine signal respectively; is any positive integer; is the phase of the estimated angular signal output by the phase-locked loop; is the estimated value of the amplitude of the harmonic interference term; , are the estimated values of the amplitude of the harmonic interference term at the t th and the t -1th iterations respectively; is the learning rate of the gradient descent algorithm; is the gradient; are the sine and cosine terms of each order; , are the amplitudes of the sine and cosine terms of each order respectively; Step S22: Gradually update the estimated value of the amplitude of the harmonic interference term until converges to the true amplitude .

[0011] The present invention also provides a magnetic encoder harmonic suppression system based on an improved phase-locked loop, which is implemented based on the above-mentioned magnetic encoder harmonic suppression method based on an improved phase-locked loop, and includes: a signal acquisition module, a signal preprocessing module, a phase-locked loop module, and a signal output module; The signal acquisition module: performs real-time sampling on the magnetic encoder to obtain the angular signal of the magnetic encoder; The signal preprocessing module: filters the acquired angular signal to remove high-frequency noise; The phase-locked loop module: includes a phase detector, a loop filter, and a voltage-controlled oscillator; The phase detector: compares the angular signal with the feedback signal of the phase-locked loop to generate a phase error signal; The loop filter: filters out high-frequency noise and harmonic interference in the phase error signal to generate a control signal; The voltage-controlled oscillator: adjusts the frequency and phase of the feedback signal of the phase-locked loop according to the control signal of the loop filter; The signal output module: obtains the accurate angular and speed information of the magnetic encoder from the voltage-controlled oscillator of the phase-locked loop module.

[0012] Preferably, the loop filter uses the gradient descent algorithm to estimate the amplitude and phase of the harmonic interference, suppresses the harmonic interference through trigonometric function expansion, and generates a smooth control signal.

[0013] Preferably, the system further includes a control and monitoring module, and the control and monitoring module: monitors the operating states of each module, and dynamically adjusts the parameters of the signal preprocessing module and the phase-locked loop module according to system requirements.

[0014] An embodiment of the present invention also provides an electronic device, including: a memory, a processor, and a computer program, where the computer program is stored in the memory and is configured to be executed by the processor to implement the above-mentioned method for suppressing harmonics of a magnetic encoder based on an improved phase-locked loop.

[0015] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, and the computer program is executed by a processor to implement the above-mentioned method for suppressing harmonics of a magnetic encoder based on an improved phase-locked loop.

[0016] The beneficial effects of the present invention at least include: 1. By decomposing the phase error signal into a phase error and a harmonic interference term, and using the gradient descent algorithm to estimate the amplitude and phase of the harmonic interference term, it is possible to accurately identify and suppress low-order and high-order harmonic interferences in the signal; 2. By adjusting the phase of the harmonic interference term to zero phase through trigonometric function expansion, the complexity of phase estimation and compensation is simplified, not only reducing the calculation cost, but also improving the convergence speed and stability of the algorithm, enabling the system to reach the ideal locking state in a shorter time. Description of the Drawings

[0017] Figure 1 Schematic diagram of the method process according to an embodiment of the present invention; Figure 2 Schematic diagram of the process of Kalman filtering according to an embodiment of the present invention; Figure 3 Schematic diagram of the processing flow of the phase-locked loop according to an embodiment of the present invention; Figure 4 Harmonic suppression control flow chart according to an embodiment of the present invention. Detailed implementation manners

[0018] The following combines the accompanying 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 a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the protection scope of the present invention.

[0019] As Figure 1 shown, the embodiment of the present invention provides a method for suppressing harmonics of a magnetic encoder based on an improved phase-locked loop, including the following steps: Step S1: Collect the angle signal output by the magnetic encoder, compare the angle signal output by the magnetic encoder with the estimated angle signal fed back by the phase-locked loop, and generate a phase error signal.

[0020] Specifically, after the system is started, sample the angle signal of the analog TMR magnetic encoder, obtain the sine and cosine signals of the angle, and establish the original information. Perform Kalman filtering on the obtained sine and cosine signals of the angle to improve the signal quality and ensure the orthogonality of the sine and cosine signals.

[0021] The Kalman Filter is a recursive minimum variance estimator, which is widely used in control systems, navigation systems, signal processing and other fields. Its main purpose is to estimate the state of the system through observed data in the presence of noise and minimize the estimation error as much as possible.

[0022] As Figure 2 shown, the Kalman filter is based on the idea of Bayesian filtering and estimates the state of the system through two steps: prediction and update. Specifically, the Kalman filter combines the dynamic model and the observation model of the system, and uses prior knowledge and new observed data to continuously correct the estimation of the system state. Suppose there is a linear dynamic system, and the state equation of this linear dynamic system can be expressed as: ; In the formula, is the state vector of the system at time step k ; is the state transition matrix, which is used to describe how the state of the system transitions; is the control input matrix, which describes the impact of the control input on the system state; is the control input vector; is the process noise, which is usually assumed to be Gaussian white noise with zero mean.

[0023] The expression of the observation equation is: ; In the formula, is the observation vector of the system at time step k ; is the observation matrix, which describes how the system state is mapped to the observed value; is the observation noise, which is usually assumed to be Gaussian white noise with zero mean.

[0024] The working process of the Kalman filter is divided into two main steps: prediction and update. Among them, the prediction process includes the following steps: Predict the state of the system: ; In the formula, is the prior state estimate of the system at time step k ;

[0025] Calculate the predicted prior covariance matrix: ; In the formula, is the prior covariance matrix of the system at time step k ; is the process noise covariance matrix.

[0026] The update process includes the following steps: Calculate the Kalman gain: ; In the formula, is the Kalman gain of the system at time step k , which is used to adjust the difference between the predicted value and the actual observed value; is the observation noise covariance matrix.

[0027] Update the state estimate: ; In the formula, is the posterior state estimate of the system at time step k ;

[0028] Update the predicted posterior covariance matrix: ; wherein, is the posterior covariance matrix of the system at time step k .

[0029] Under linear systems and Gaussian noise, the Kalman filter is an optimal minimum variance estimator. The Kalman filter is a recursive algorithm that only needs to store the current state and covariance, without the need to store all historical data. By adjusting the noise covariance matrix Q and R , the robustness of the filter can be improved.

[0030] After Kalman filtering, the noise signal in the waveform is greatly reduced, making the waveform smoother and laying a foundation for subsequent phase-locked loop calculations.

[0031] Step S2: Decompose the phase error signal into a phase error and a harmonic interference term, and estimate the amplitude and phase of the harmonic interference term through the gradient descent algorithm.

[0032] Step S3: Adjust the phase of the harmonic interference term to zero phase through trigonometric expansion, and update the estimated value of the amplitude of the harmonic interference term and the estimated angle signal; Step S4: Repeat Step S1 to Step S3 until the phase of the estimated angle signal fed back by the phase-locked loop is consistent with the phase of the angle signal output by the magnetic encoder, and output the angle and speed information of the magnetic encoder.

[0033] Specifically, input the angle signal after Kalman filtering into the phase-locked loop PLL. As Figure 3 shown, as a closed-loop control system, PLL is usually composed of three parts: a phase detector PD, a loop filter LF, and a voltage-controlled oscillator VCO. Its basic working principle is that the voltage phase signal input to the PLL is compared with the voltage phase signal output by the loop through the PD, and the obtained phase difference is converted into a corresponding voltage signal, and then the noise and high-frequency signals are filtered by the LF. Finally, the output information of the LF is sent into the VCO. If the frequencies of the input signal of the PD and the output signal of the LF are exactly the same, the phase difference between the two is a constant value, and the frequency of the VCO no longer changes, ultimately achieving the purpose of phase locking.

[0034] Assume that the actual angle of the analog TMR magnetic encoder is θ , and its sine and cosine values are and respectively, and use the two as the input quantities of the phase-locked loop. The proportional-integral regulation PI in the main circuit can effectively filter out the high-frequency components in the input signal. Because the system filters out the noise signal in the position change amount δ , rather than the input signals and The high-frequency components in it thus greatly suppress the interference in the system.

[0035] Multiply the given input quantity by the estimated angle of the phase-locked loop φ by the cosine and sine respectively, and then take the difference between the two, that is - = .

[0036] When tends to zero, = , this phase-locked loop is a type-II system, and the steady-state error of a type-II system is 0. Therefore, when stable, there is . That is, when the system is stable, the output of the phase-locked loop is the current angle of the encoder, and the phase locking is completed.

[0037] In an actual system, there are harmonic interferences in the angle signal output by the collected magnetic encoder. Therefore, the embodiments of the present invention add harmonic suppression as shown in Figure 4 during the control process of the phase-locked loop.

[0038] Assume is the sine phase, and the signal with interference can be expressed as: ; ; In the formula, , are the sine and cosine signals of the angle signal output by the magnetic encoder respectively; , are the amplitudes of the sine and cosine signals respectively; is the number of interference harmonics in the input signal; , are the amplitudes of the interference harmonics of the sine and cosine signals respectively; is; , are the harmonic phases of the sine and cosine signals respectively; , are the DC biases of the sine and cosine signals respectively; , are the random noises of the sine and cosine signals respectively.

[0039] It can be seen from the above formula that in addition to the basic signal, the angle signal also includes interferences such as low-order and high-order harmonics, DC bias, and random noise.

[0040] According to the structure of the PD position detector, , the phase error signal can be expressed as: 。

[0041] Meanwhile, can be divided into a phase error and interference terms. Therefore, the output of the PD position detector can be expressed as: 。

[0042] In the state of locked phase, ≈ , that is, Nωt≈ . Thus, the phase error e≈ ≈ ≈ , random noise , and the interference in the remaining part. To remove the interference, it is necessary to estimate the amplitudes { , } and phases { , } of the non-deterministic interference harmonics. However, in practice, it is difficult to learn the harmonic phase through gradient descent. Therefore, in the embodiments of the present invention, the phase of the harmonic interference is adjusted to zero phase through trigonometric function expansion. When ≈Nωt≈ , the interference terms to be rejected are: ; In the formula, is the harmonic interference term; , are the amplitudes of the sine signal and the cosine signal respectively; is the phase of the estimated angle signal output by the phase-locked loop; , are the DC biases of the sine signal and the cosine signal respectively; is the number of interference harmonics in the angle signal output by the magnetic encoding; , are the amplitudes of the interference harmonics of the sine signal and the cosine signal respectively; , are the phases of the interference harmonics of the sine signal and the cosine signal respectively; is any integer between 0 and K ; is any positive integer; is the estimated phase.

[0043] To simplify the expression, the high-order harmonics are combined into a homologous form. Thus, the interference term can be expressed as: ; ; ; In the formula, is the simplified form of the harmonic interference term; is the number of low-order and high-order harmonics in the angular signal output by magnetic encoding; and are respectively the true amplitudes of the harmonic interferences of the sine signal and the cosine signal; is any positive integer; is the phase of the estimated angular signal output by the phase-locked loop; is the estimated value of the amplitude of the harmonic interference term; are the sine and cosine terms of each order; and are respectively the amplitudes of the sine and cosine terms of each order.

[0044] Gradually update the estimated value of the amplitude of the harmonic interference term by the gradient descent method until converges to the true amplitude : ; In the formula, and are respectively the estimated values of the amplitude of the harmonic interference term at the t -th and the t -1-th iteration; is the learning rate of the gradient descent algorithm; is the gradient.

[0045] The relationship between the transfer function of the output of the phase-locked loop and the output of the phase discriminator in the discrete domain is: ; ; Therefore, the gradient and can be used to solve the gradient : ; ; In the above formula, , , , , , are coefficients, and , , , = 4, = 8, = 4; is the proportional term coefficient, is the integral term coefficient, is the sampling time. is a discrete symbol; is the output of the phase detector, i.e., the deviation value; , are respectively the true amplitudes of the harmonic interference terms of the sine signal and the cosine signal.

[0046] Among them, the learning rate starts from and gradually increases to three times the previous value until divergence occurs. The appropriate value of is half of the product of the initial value and the maximum stable value of

[0047] The embodiment of the present invention also provides a magnetic encoder harmonic suppression system based on an improved phase-locked loop, which is implemented based on the above-mentioned magnetic encoder harmonic suppression method based on an improved phase-locked loop, and includes: a signal acquisition module, a signal preprocessing module, a phase-locked loop module, a signal output module, and a control and monitoring module.

[0048] The signal acquisition module is used to perform real-time sampling on the magnetic encoder to obtain the angle signal of the magnetic encoder. The signal preprocessing module filters the acquired angle signal to remove high-frequency noise.

[0049] The phase-locked loop module includes a phase detector, a loop filter, and a voltage-controlled oscillator. Among them, the phase detector is used to compare the angle signal with the feedback signal of the phase-locked loop to generate a phase error signal. The loop filter is used to filter out high-frequency noise and harmonic interference in the phase error signal to generate a control signal. The voltage-controlled oscillator adjusts the frequency and phase of the feedback signal of the phase-locked loop according to the control signal of the loop filter.

[0050] The signal output module obtains the accurate angle and speed information of the magnetic encoder from the voltage-controlled oscillator of the phase-locked loop module.

[0051] The control and monitoring module is used to monitor the operating states of each module and dynamically adjust the parameters of the signal preprocessing module and the phase-locked loop module according to system requirements.

[0052] The embodiment of the present invention also provides an electronic device, including: a memory, a processor, and a computer program, where the computer program is stored in the memory and is configured to be executed by the processor to implement the above-mentioned magnetic encoder harmonic suppression method based on an improved phase-locked loop.

[0053] The embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, and the computer program is executed by a processor to implement the above-mentioned magnetic encoder harmonic suppression method based on an improved phase-locked loop.

[0054] The method of the embodiment of the present invention not only greatly improves the quality of the angle signal obtained from the analog TMR, effectively reduces the noise, but also the fast tracking mechanism of the phase-locked loop accurately and quickly obtains the real-time angle and speed information, with strong anti-interference ability and significant practical value.

[0055] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. Only the preferred embodiments of the present invention are expressed. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the present invention. As long as the combination of these technical features does not conflict, it should be considered as the scope described in this specification.

[0056] It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can be made, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the appended claims.

Claims

1. A harmonic suppression method for a magnetic encoder based on an improved phase-locked loop, characterized in that, Including the following steps: Step S1: Collect the angular signal output by the magnetic encoder, compare the angular signal output by the magnetic encoder with the estimated angular signal fed back by the phase-locked loop, and generate a phase error signal; Step S2: Decompose the phase error signal into a phase error and a harmonic interference term, and estimate the amplitude and phase of the harmonic interference term through a gradient descent algorithm; Step S3: Adjust the phase of the harmonic interference term to zero phase through trigonometric function expansion, and update the estimated value of the amplitude of the harmonic interference term and the estimated angular signal; Step S4: Repeat steps S1 to S3 until the phase of the estimated angular signal fed back by the phase-locked loop is consistent with the phase of the angular signal output by the magnetic encoder, and output the angular and speed information of the magnetic encoder.

2. The harmonic suppression method of a magnetic encoder based on an improved phase-locked loop according to claim 1, characterized in that: After collecting the angular signal output by the magnetic encoder in step S1, perform Kalman filtering on the angular signal.

3. A harmonic suppression method for a magnetic encoder based on an improved phase-locked loop according to claim 1, characterized in that: The expression of the phase error signal in step S1 is: ; Wherein, is the phase error signal; , are respectively the sine signal and the cosine signal of the angle signal output by the magnetic encoding; is an arbitrary sine phase for generality, and its frequency is times of the main encoder shaft frequency; is the low-order and high-order harmonic phases, and its frequency is times of the main encoder shaft frequency; , are respectively the amplitudes of the sine signal and the cosine signal; , are respectively the amplitudes of the harmonic interference terms of the sine signal and the cosine signal; , are respectively the phases of the harmonic interference terms of the sine signal and the cosine signal; is the number of harmonic interferences in the angle signal output by the magnetic encoding; is the sine phase of the estimated angle signal output by the phase-locked loop, and its frequency is times of the estimated frequency; , are respectively the DC biases of the sine signal and the cosine signal; , are respectively the random noises of the sine signal and the cosine signal.

4. A harmonic suppression method for a magnetic encoder based on an improved phase-locked loop according to claim 1, characterized in that: The expression of the harmonic interference term in step S2 is: ; In the formula, is the harmonic interference term; , are the amplitudes of the sine signal and the cosine signal respectively; is the phase of the estimated angle signal output by the phase-locked loop; , are the DC biases of the sine signal and the cosine signal respectively; is the number of interfering harmonics in the angle signal output by the magnetic encoding; , are the amplitudes of the interfering harmonics of the sine signal and the cosine signal respectively; , are the phases of the interfering harmonics of the sine signal and the cosine signal respectively; is an integer between 0 and ; is an arbitrary positive integer; is the phase of the phase-locked loop estimated angle signal.

5. A harmonic suppression method for a magnetic encoder based on an improved phase-locked loop according to claim 1, characterized in that: In step S2, estimating the amplitude and phase of the harmonic interference term through the gradient descent algorithm includes the following steps: Step S21: Simplify the harmonic interference term to: ; ; ; ; In the formula, is the simplified form of the harmonic interference term; is the number of low-order and high-order harmonics in the angular signal output by the magnetic encoding; , are the true amplitudes of the harmonic interferences of the sine signal and the cosine signal, respectively; is any positive integer; is the phase of the estimated angular signal output by the phase-locked loop; is the estimated value of the amplitude of the harmonic interference term; , are the estimated values of the amplitudes of the harmonic interference terms at the t -th and the t -1-th iterations, respectively; is the learning rate of the gradient descent algorithm; is the gradient; are the sine and cosine terms of each order; , are the amplitudes of the sine and cosine terms of each order, respectively; Step S22: Gradually update the estimated value of the amplitude of the harmonic interference term by the gradient descent method , until it converges to the true amplitude .

6. A harmonic suppression system for a magnetic encoder based on an improved phase-locked loop, which is implemented based on a harmonic suppression method for a magnetic encoder based on an improved phase-locked loop according to any one of claims 1 to 5, characterized in that Including: A signal acquisition module, a signal preprocessing module, a phase-locked loop module, and a signal output module; The signal acquisition module: Perform real-time sampling on the magnetic encoder to obtain the angular signal of the magnetic encoder; The signal preprocessing module: Perform filtering processing on the collected angular signal to remove high-frequency noise; The phase-locked loop module: Includes a phase detector, a loop filter, and a voltage-controlled oscillator; The phase detector: Compare the angular signal with the feedback signal of the phase-locked loop to generate a phase error signal; The loop filter: Filter out high-frequency noise and harmonic interference in the phase error signal to generate a control signal; The voltage-controlled oscillator: Adjust the frequency and phase of the feedback signal of the phase-locked loop according to the control signal of the loop filter; The signal output module: Obtain the accurate angular and speed information of the magnetic encoder from the voltage-controlled oscillator of the phase-locked loop module.

7. A harmonic suppression system of a magnetic encoder based on an improved phase-locked loop according to claim 6, characterized in that: The loop filter uses a gradient descent algorithm to estimate the amplitude and phase of harmonic interference, suppresses harmonic interference through trigonometric function expansion, and generates a smooth control signal.

8. A harmonic suppression system of a magnetic encoder based on an improved phase-locked loop according to claim 6, characterized in that: The system further includes a control and monitoring module, and the control and monitoring module: Monitor the operating states of each module, and dynamically adjust the parameters of the signal preprocessing module and the phase-locked loop module according to system requirements.

9. An electronic device, comprising: A memory, a processor, and a computer program, characterized in that: The computer program is stored in the memory and is configured to be executed by the processor to implement a method for suppressing harmonics of a magnetic encoder based on an improved phase-locked loop according to any one of claims 1 to 5.

10. A computer-readable storage medium, characterized in that: A computer program is stored in the computer-readable storage medium, and the computer program is executed by a processor to implement a method for suppressing harmonics of a magnetic encoder based on an improved phase-locked loop according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • A decoding method and system of a sine and cosine magnetic encoder

    CN109714059A

  • Method and device for correcting harmonic error and assembling error of magnetoelectric encoder

    CN116429159A

  • Magnetic encoder decoding method and system

    CN116678436A

  • Carrier phase delay compensation method and system based on single-chip microcomputer control

    CN119880119A

  • PLL circuit and optical disk drive using this circuit

    JP2006286154A