A magnetic encoder harmonic suppression method and system based on improved phase-locked loop
By improving the phase-locked loop method, harmonic interference in the magnetic encoder signal is decomposed and suppressed, the interference problem in the analog TMR magnetic encoder signal processing is solved, and the signal accuracy and system stability are improved.
Patent Information
- Application Number
- CN202510713357.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2045-05-30
AI Technical Summary
The prior art faces complex interference such as low-order and high-order harmonics, DC bias, and random noise when processing analog TMR magnetic encoder signals, resulting in degradation of signal accuracy and system performance.
The improved phase-locked loop method is adopted to generate a phase error signal by collecting the output signal of the magnetic encoder and the phase-locked loop feedback signal, which is decomposed into phase error and harmonic interference terms. The amplitude and phase of the harmonic interference are estimated using the gradient descent algorithm, and the phase of the harmonic interference term is adjusted to zero phase through the trigonometric function expansion. The steps are repeated until the phase-locked loop feedback signal is consistent with the magnetic encoder signal.
It realizes accurate identification and suppression of low-order and high-order harmonic interference, simplifies the phase estimation and compensation process, improves the convergence speed and stability of the algorithm, and ensures fast locking of the system.
Smart Images

Figure CN120263173B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of encoder control, and in particular to a magnetic encoder harmonic suppression method and system based on an improved phase-locked loop. Background Art
[0002] In analog TMR magnetic encoder systems, signal processing faces complex interference challenges. These interferences include low- and high-order harmonics, DC offset, and random noise, which severely impact signal accuracy and system performance. For example, in power quality monitoring systems, the presence of harmonics can increase measurement errors, reducing system reliability and accuracy. Therefore, effectively suppressing interference and improving signal processing accuracy are pressing challenges.
[0003] To address interference in signal processing, a variety of techniques have been proposed and applied. For example, adaptive Kalman filtering methods use residual analysis to estimate and suppress interference. Optimization methods based on gradient descent algorithms are also widely used in signal processing for parameter estimation and model optimization.
[0004] While existing technologies can handle interference in signals to a certain extent, they still face challenges in practical application. While adaptive Kalman filtering can estimate harmonics, its effectiveness in dealing with high-frequency interference and random noise is limited. Furthermore, while gradient descent algorithms excel in parameter optimization, they struggle to estimate the phase of non-deterministic interference harmonics and are susceptible to the effects of initialization and learning rates. Therefore, the accuracy and stability of existing technologies in processing complex interference signals still need to be improved. Summary of the Invention
[0005] The present invention proposes a magnetic encoder harmonic suppression method and system based on an improved phase-locked loop, which solves the problem that the existing signal processing technology has low accuracy and stability when processing complex interference signals.
[0006] To solve the above technical problems, the present invention provides a magnetic encoder harmonic suppression method based on an improved phase-locked loop, comprising the following steps:
[0007] Step S1: Acquire 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;
[0008] Step S2: decomposing the phase error signal into phase error and harmonic interference terms, and estimating the amplitude and phase of the harmonic interference terms by using a gradient descent algorithm;
[0009] Step S3: adjusting the phase of the harmonic interference term to zero phase by trigonometric function expansion, and updating the estimated value of the amplitude of the harmonic interference term and the estimated angle signal;
[0010] Step S4: Repeat steps S1 to S3 until 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.
[0011] Preferably, after the angle signal output by the magnetic encoder is collected in step S1, Kalman filtering is performed on the angle signal.
[0012] Preferably, the expression of the phase error signal in step S1 is:
[0013] ;
[0014] Where, is the phase error signal; 、 They are respectively the sine signal and cosine signal of the angle signal output by the magnetic encoder; is an arbitrary sinusoidal phase without loss of generality, whose frequency is the main encoder shaft frequency of times; The phase of low-order and high-order harmonics, whose frequency is the main encoder shaft frequency of times; 、 are the amplitudes of the sine and cosine signals respectively; 、 are the amplitudes of the harmonic interference terms of the sine signal and cosine signal respectively; 、 are the phases of the harmonic interference terms of the sine signal and cosine signal respectively; is the amount of harmonic interference in the angle signal output by the magnetic encoder; The sinusoidal phase of the estimated angle signal output by the phase-locked loop, whose frequency is the estimated frequency of times; 、 are the DC bias of sine and cosine signals respectively; 、 are random noises for sine and cosine signals respectively.
[0015] Preferably, the expression of the harmonic interference term in step S2 is:
[0016] ;
[0017] Where, is the harmonic interference term; 、 are the amplitudes of the sine and cosine signals respectively; is the phase of the estimated angle signal output by the phase-locked loop; 、 are the DC bias of sine and cosine signals respectively; is the number of interfering harmonics in the angle signal output by the magnetic encoder; 、 are the amplitudes of the interfering harmonics of the sine and cosine signals respectively; 、 are the phases of the interfering harmonics of the sine and cosine signals respectively; 0 to Integer between ; is any positive integer; Estimate the phase of the angle signal for a phase-locked loop.
[0018] Preferably, the estimating the amplitude and phase of the harmonic interference term by the gradient descent algorithm in step S2 comprises the following steps:
[0019] Step S21: Simplify the harmonic interference term to:
[0020] ;
[0021] ;
[0022] ;
[0023] ;
[0024] Where, is a simplified form of the harmonic interference term; The number of low-order and high-order harmonics in the angle signal output by the magnetic encoder; 、 are the true amplitudes of the harmonic interference of sine and cosine signals respectively; is any positive integer; is the phase of the estimated angle signal output by the phase-locked loop; is the estimated value of the amplitude of the harmonic interference term; 、 Respectively t Second and t -Estimated value of the amplitude of the harmonic interference term at iteration 1; 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;
[0025] Step S22: Gradually update the estimated value of the amplitude of the harmonic interference term by gradient descent method ,until Converge to the true amplitude .
[0026] 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;
[0027] The signal acquisition module performs real-time sampling on the magnetic encoder to obtain the angle signal of the magnetic encoder;
[0028] The signal preprocessing module performs filtering on the collected angle signal to remove high-frequency noise;
[0029] The phase-locked loop module includes a phase detector, a loop filter and a voltage-controlled oscillator;
[0030] The phase detector compares the angle signal with the feedback signal of the phase-locked loop to generate a phase error signal;
[0031] The loop filter is used to filter out high-frequency noise and harmonic interference in the phase error signal to generate a control signal;
[0032] 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;
[0033] The signal output module obtains the precise angle and speed information of the magnetic encoder from the voltage-controlled oscillator of the phase-locked loop module.
[0034] Preferably, the loop filter uses a 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.
[0035] Preferably, the system further comprises a control and monitoring module, which monitors the operating status of each module and dynamically adjusts the parameters of the signal preprocessing module and the phase-locked loop module according to system requirements.
[0036] An embodiment of the present invention further provides an electronic device, comprising: a memory, a processor, and a computer program, wherein the computer program is stored in the memory and configured to be executed by the processor to implement the above-mentioned magnetic encoder harmonic suppression method based on an improved phase-locked loop.
[0037] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, 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.
[0038] The benefits of the present invention include at least:
[0039] 1. By decomposing the phase error signal into phase error and harmonic interference terms, and using the gradient descent algorithm to estimate the amplitude and phase of the harmonic interference terms, it is possible to accurately identify and suppress low-order and high-order harmonic interference in the signal;
[0040] 2. The phase of the harmonic interference term is adjusted to zero phase through trigonometric function expansion, which simplifies the complexity of phase estimation and compensation. This not only reduces the computational cost, but also improves the convergence speed and stability of the algorithm, enabling the system to reach the ideal locking state in a shorter time. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 Schematic diagram of a method flow in an embodiment of the present invention;
[0042] Figure 2 Schematic diagram of the Kalman filter process according to an embodiment of the present invention;
[0043] Figure 3 Schematic diagram of the processing flow of a phase-locked loop according to an embodiment of the present invention;
[0044] Figure 4 This is a flow chart of harmonic suppression control according to an embodiment of the present invention. DETAILED DESCRIPTION
[0045] The following is a clear and complete description of the technical solutions in the embodiments of the present invention, in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts are within the scope of protection of the present invention.
[0046] like Figure 1 As shown, an embodiment of the present invention provides a magnetic encoder harmonic suppression method based on an improved phase-locked loop, comprising the following steps:
[0047] Step S1: Acquire 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.
[0048] Specifically, after the system is started, the angle signal of the analog TMR magnetic encoder is sampled to obtain the sine and cosine signals of the angle and establish the original information. The obtained sine and cosine signals of the angle are then Kalman filtered to improve the signal quality and ensure the orthogonality of the sine and cosine signals.
[0049] The Kalman filter is a recursive minimum variance estimator that is widely used in control systems, navigation systems, signal processing, and other fields. Its main purpose is to estimate the state of the system from observation data in the presence of noise and minimize the estimation error.
[0050] like Figure 2 As shown in Figure 1, 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 observation model of the system, and uses prior knowledge and new observation data to continuously correct the estimate of the system state. Assume there is a linear dynamic system, the state equation of which can be expressed as:
[0051] ;
[0052] Where, For the system at time step k The state vector at time ; is the state transition matrix, which is used to describe how the state of the system is transferred; is the control input matrix, which describes the influence 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.
[0053] The expression of the observation equation is:
[0054] ;
[0055] Where, For the system at time step k The observation vector at time ; is the observation matrix, which describes how the system state is mapped to the observation value; For observation noise, it is usually assumed to be Gaussian white noise with zero mean.
[0056] The Kalman filter workflow is divided into two main steps: prediction and update. The prediction process includes the following steps:
[0057] Predict the state of the system:
[0058] ;
[0059] Where, For the system at time step k The prior state estimate at .
[0060] Compute the predicted prior covariance matrix:
[0061] ;
[0062] Where, For the system at time step k The prior covariance matrix when ; Process noise The covariance matrix of .
[0063] The update process includes the following steps:
[0064] Calculate the Kalman gain:
[0065] ;
[0066] Where, For the system at time step k The Kalman gain at , which is used to adjust the difference between the predicted value and the actual observed value; Observation noise The covariance matrix of .
[0067] Update the state estimate:
[0068] ;
[0069] Where, For the system at time step k The posterior state estimate at .
[0070] Update the posterior covariance matrix of the predictions:
[0071] ;
[0072] Where, For the system at time step k The posterior covariance matrix at .
[0073] The Kalman filter is the optimal minimum variance estimator for linear systems and Gaussian noise. The Kalman filter is a recursive algorithm that only needs to store the current state and covariance, without having to store all historical data. By adjusting the noise covariance matrix Q and R , which can improve the robustness of the filter.
[0074] After Kalman filtering, the noise signal in the waveform is greatly reduced, making the waveform smoother and laying the foundation for subsequent phase-locked loop calculations.
[0075] Step S2: Decompose the phase error signal into phase error and harmonic interference terms, and estimate the amplitude and phase of the harmonic interference terms using a gradient descent algorithm.
[0076] Step S3: adjusting the phase of the harmonic interference term to zero phase by trigonometric function expansion, and updating the estimated value of the amplitude of the harmonic interference term and the estimated angle signal;
[0077] Step S4: Repeat steps S1 to S3 until 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.
[0078] Specifically, the angle signal after Kalman filtering is input into the phase-locked loop PLL. Figure 3 As shown in the figure, a PLL, as a closed-loop control system, typically consists of three components: a phase detector (PD), a loop filter (LF), and a voltage-controlled oscillator (VCO). Its basic operating principle is that the voltage phase signal input to the PLL is compared with the voltage phase signal output by the loop via the PD. The resulting phase difference is converted into a corresponding voltage signal, which is then filtered out by the LF to remove noise and high-frequency signals. Finally, the LF output information is fed into the VCO. If the frequencies of the PD input signal and the LF output signal are exactly the same, the phase difference between them remains constant, and the VCO frequency remains constant, ultimately achieving phase lock.
[0079] Assume that the actual angle of the analog TMR magnetic encoder is θ , and its sine and cosine values are and And use the two as the input of the phase-locked loop. The proportional integral PI in the main loop can effectively filter out the high-frequency components in the input signal. Because the system filters out the position change δ The noise signal in the and The high-frequency components in the signal are reduced, thus greatly suppressing the interference in the system.
[0080] Multiply the given input by the estimated angle of the phase-locked loop φ The cosine and sine of , and then the difference between the two, that is - = .
[0081] when Approaching zero, = , this phase-locked loop is a type II system, the steady-state error of the type II system is 0, so when it is stable, That is, when the system is stable, the phase-locked loop output is the current angle of the encoder, completing the phase lock.
[0082] In the actual system, there is harmonic interference in the angle signal output by the collected magnetic encoder. Therefore, the embodiment of the present invention adds the following in the control process of the phase-locked loop: Figure 4 Harmonic suppression shown.
[0083] Assumptions is a sinusoidal phase, the signal with interference can be expressed as:
[0084] ;
[0085] ;
[0086] Where, 、 They are respectively the sine and cosine signals of the angle signal output by the magnetic encoder; 、 are the amplitudes of the sine and cosine signals respectively; is the number of interfering harmonics present in the input signal; 、 are the amplitudes of the interfering harmonics of the sine and cosine signals respectively; for; 、 are the harmonic phases of the sine and cosine signals respectively; 、 are the DC bias of sine and cosine signals respectively; 、 are random noises for sine and cosine signals respectively.
[0087] It can be seen from the above formula that in addition to the basic signal, the angle signal also includes interference such as low-order and high-order harmonics, DC bias and random noise.
[0088] According to the structure of the PD position detector, , the phase error signal can be Expressed as:
[0089] .
[0090] At the same time, you can It is divided into phase error and interference terms, so the output of the PD position detector can be expressed as:
[0091] .
[0092] In the phase-locked state, ≈ , that is, Nωt≈ . So the phase error e≈ ≈ ≈ , random noise , and the interference in the rest. To remove the interference, it is necessary to estimate the amplitude of the non-deterministic interference harmonics { , } and phase { , However, in practice, it is very difficult to learn the harmonic phase by gradient descent. Therefore, in the embodiment of the present invention, the phase of the harmonic interference is adjusted to zero phase by trigonometric function expansion. ≈Nωt≈ When , the interference items that need to be rejected are:
[0093] ;
[0094] Where, is the harmonic interference term; 、 are the amplitudes of the sine and cosine signals respectively; is the phase of the estimated angle signal output by the phase-locked loop; 、 are the DC bias of sine and cosine signals respectively; is the number of interfering harmonics in the angle signal output by the magnetic encoder; 、 are the amplitudes of the interfering harmonics of the sine and cosine signals respectively; 、 are the phases of the interfering harmonics of the sine and cosine signals respectively; 0 to K Any integer between ; is any positive integer; To estimate the phase.
[0095] To simplify the expression, the higher-order harmonics are combined into a homologous form, so the interference term can be expressed as:
[0096] ;
[0097] ;
[0098] ;
[0099] Where, is a simplified form of the harmonic interference term; The number of low-order and high-order harmonics in the angle signal output by the magnetic encoder; 、 are the true amplitudes of the harmonic interference of sine and cosine signals respectively; is any positive integer; is the phase of the estimated angle 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; 、 are the amplitudes of the sine and cosine terms of each order, respectively.
[0100] The estimated value of the amplitude of the harmonic interference term is gradually updated by the gradient descent method ,until Converge to the true amplitude :
[0101] ;
[0102] Where, 、 Respectively t Second and t -Estimated value of the amplitude of the harmonic interference term at iteration 1; is the learning rate of the gradient descent algorithm; is the gradient.
[0103] The relationship between the transfer function of the output of the phase-locked loop and the output of the phase detector in the discrete domain is:
[0104] ;
[0105] ;
[0106] Therefore, we can use the partial derivative and Solving for gradients :
[0107] ;
[0108] ;
[0109] In the above formula, 、 、 、 、 、 is the coefficient, and , , , =4, =8, =4; is the proportional term coefficient, is the integral term coefficient, is the sampling time. is a discrete symbol; is the phase detector output, i.e. the deviation value; 、 are the true amplitudes of the harmonic interference terms of the sine signal and cosine signal respectively.
[0110] Among them, the learning rate from and gradually increase to three times the previous value until divergence occurs. The appropriate value for Half the product of the initial value and the maximum stable value.
[0111] An 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.
[0112] The signal acquisition module is used to sample the magnetic encoder in real time and obtain the angle signal of the magnetic encoder. The signal preprocessing module filters the collected angle signal to remove high-frequency noise.
[0113] The phase-locked loop module includes a phase detector, a loop filter, and a voltage-controlled oscillator (VCO). The phase detector compares the angle signal with the PLL's feedback signal to generate a phase error signal. The loop filter filters out high-frequency noise and harmonic interference from the phase error signal to generate a control signal. The VCO adjusts the frequency and phase of the PLL's feedback signal based on the loop filter's control signal.
[0114] The signal output module obtains the precise angle and speed information of the magnetic encoder from the voltage-controlled oscillator of the phase-locked loop module.
[0115] The control and monitoring module is used to monitor the operating status of each module and dynamically adjust the parameters of the signal preprocessing module and the phase-locked loop module according to system requirements.
[0116] An embodiment of the present invention further provides an electronic device, comprising: a memory, a processor, and a computer program, wherein the computer program is stored in the memory and configured to be executed by the processor to implement the above-mentioned magnetic encoder harmonic suppression method based on an improved phase-locked loop.
[0117] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored. 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.
[0118] The method of the embodiment of the present invention not only greatly improves the quality of the angle signal obtained from the analog TMR and effectively reduces noise, but also the fast tracking mechanism of the phase-locked loop accurately and quickly obtains real-time angle and speed information, has strong anti-interference ability, and has significant practical value.
[0119] The technical features of the above embodiments may be combined in any manner. To simplify the description, not all possible combinations of the technical features in the above embodiments are described. Only preferred embodiments of the present invention are presented. While the description is relatively specific and detailed, it should not be construed as limiting the scope of the present invention. As long as there are no conflicts in the combination of these technical features, they should be considered to be within the scope of this specification.
[0120] It should be noted that, for those skilled in the art, various modifications and improvements can be made without departing from the scope of the present invention, and these modifications and improvements fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be determined by the appended claims.
Claims
1. A magnetic encoder harmonic suppression method based on an improved phase-locked loop, characterized in that: The following steps are involved: Step S1: Acquire 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 phase error and harmonic interference terms. The expression of the harmonic interference term is: In the above formula, e d is the harmonic interference term; a s 、a c are the amplitudes of the sine and cosine signals respectively; is the phase of the estimated angle signal output by the phase-locked loop; b s 、b c are the DC bias of the sine signal and cosine signal respectively; K is the number of interference harmonics in the angle signal output by the magnetic encoder; a ns 、a nc are the amplitudes of the interfering harmonics of the sine and cosine signals respectively; are the phases of the interfering harmonics of the sine signal and cosine signal respectively; n is any integer between 0 and K; N is any positive integer; To estimate the phase; The phase of the harmonic interference term is adjusted to zero phase by trigonometric function expansion: Where, e' d is a simplified form of the harmonic interference term; L is the number of low-order and high-order harmonics in the angle signal output by the magnetic encoder; a ms 、a mc are the true amplitudes of the harmonic interference of the sine signal and cosine signal respectively; N is an arbitrary positive integer; is the phase of the estimated angle signal output by the phase-locked loop; w is the estimated amplitude of the harmonic interference term; x is the sine and cosine terms of each order; a Ls 、a Lc are the amplitudes of the sine and cosine terms of each order respectively; Step S3: gradually update the estimated value w of the amplitude of the harmonic interference term by gradient descent method until w converges to the true amplitude {a ms ,a mc }: Through partial derivatives and Solving for gradients In the above formula, μ is the learning rate; a0, a1, a2, b0, b1, b2 are coefficients, and a2 = -2K p ·T+K i ·T 2 , a1=-2K i ·T 2 , a0=2K p ·T+K i ·T 2 , K p is the proportional term coefficient, K i is the integral term coefficient; T is the sampling time; z is the discrete symbol; e is the phase detector output, that is, the deviation value; are the true amplitudes of the harmonic interference terms of the sine signal and cosine signal respectively; Updating 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 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.
2. The method for suppressing harmonics in a magnetic encoder based on an improved phase-locked loop according to claim 1, characterized in that: After the angle signal output by the magnetic encoder is collected in step S1, a Kalman filter is performed on the angle signal.
3. The method for suppressing harmonics of 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: Where, e pd is the phase error signal; u s 、u c are the sine and cosine signals of the angle signal output by the magnetic encoder respectively; Nωt is an arbitrary sine phase without loss of generality, and its frequency is N times the main encoder shaft frequency ω; nωt is the low-order and high-order harmonic phase, and its frequency is n times the main encoder shaft frequency ω; a s 、a c are the amplitudes of the sine and cosine signals respectively; a ns 、a nc are the amplitudes of the harmonic interference terms of the sine signal and cosine signal respectively; are the phases of the harmonic interference terms of the sine signal and cosine signal respectively; K is the number of harmonic interferences in the angle signal output by the magnetic encoder; The sinusoidal phase of the estimated angle signal output by the phase-locked loop, whose frequency is the estimated frequency N times of b s 、b c are the DC bias of sine and cosine signals respectively; n s 、n c are random noises for sine and cosine signals respectively.
4. A magnetic encoder harmonic suppression system based on an improved phase-locked loop, implemented based on a magnetic encoder harmonic suppression method based on an improved phase-locked loop according to any one of claims 1 to 3, characterized in that: include: Signal acquisition module, signal preprocessing module, phase-locked loop module and signal output module; The signal acquisition module performs real-time sampling on the magnetic encoder to obtain the angle signal of the magnetic encoder; The signal preprocessing module performs filtering on the collected angle 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 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; The signal output module obtains the precise angle and speed information of the magnetic encoder from the voltage-controlled oscillator of the phase-locked loop module.
5. The magnetic encoder harmonic suppression system based on an improved phase-locked loop according to claim 4, characterized in that: The loop filter uses a gradient descent algorithm to estimate the amplitude and phase of harmonic interference, suppresses the harmonic interference through trigonometric function expansion, and generates a smooth control signal.
6. The magnetic encoder harmonic suppression system based on an improved phase-locked loop according to claim 4, characterized in that: The system further comprises a control and monitoring module, which monitors the operating status of each module and dynamically adjusts the parameters of the signal preprocessing module and the phase-locked loop module according to system requirements.
7. 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 the magnetic encoder harmonic suppression method based on an improved phase-locked loop as described in any one of claims 1 to 3.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the magnetic encoder harmonic suppression method based on an improved phase-locked loop according to any one of claims 1 to 3.
Citation Information
Patent Citations
Method and device for correcting harmonic error and assembling error of magnetoelectric encoder
CN116429159A
Carrier phase delay compensation method and system based on single-chip microcomputer control
CN119880119A