Crystal oscillator taming system based on Kalman filtering and adaptive PID

By combining Kalman filtering with adaptive PID, the problems of parameter tuning relying on experience and insufficient noise suppression capability in crystal oscillator discipline of traditional PID control are solved, achieving high-precision crystal oscillator discipline and improving frequency stability and time synchronization accuracy.

CN121508478APending Publication Date: 2026-02-10CHENGDU JINNUOXIN HIGH-TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511619720.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-06
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Traditional PID control relies on experience for parameter tuning in crystal oscillator discipline, making it difficult to adapt to dynamic requirements under different environments. It also has poor adaptability to nonlinear disturbances and limited noise suppression capabilities, leading to the accumulation of frequency offsets and making it difficult to meet long-term synchronization requirements.

Method used

A crystal oscillator discipline system based on Kalman filtering and adaptive PID is adopted. The phase deviation is estimated by Kalman filtering and the covariance is output. The PID parameters, including the proportional coefficient Kp, integral coefficient Ki and derivative coefficient Kd, are adaptively adjusted to achieve dynamic adjustment. Combined with the control feedback module, the crystal oscillator voltage control voltage is adjusted to compensate for the frequency offset.

Benefits of technology

It improves the long-term frequency stability and time synchronization accuracy of crystal oscillators, reduces the standard deviation of phase deviation by 40%-60%, and reduces the maximum time deviation from 35ns to 10ns, adapting to nonlinear disturbances in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121508478A_ABST
    Figure CN121508478A_ABST
Patent Text Reader

Abstract

The invention discloses a crystal oscillator taming system based on Kalman filtering and adaptive PID, and relates to the technical field of time-frequency equipment. Comprising a crystal oscillator time frequency module used for generating a local time frequency signal, a reference module used for receiving an external reference time frequency signal, an error measurement module used for measuring the phase deviation between the local time frequency signal and the reference time frequency signal, and a Kalman filtering estimation module used for performing Kalman filtering estimation based on the phase deviation. The Kalman filtering module is used for outputting phase deviation estimation and covariance estimation and adaptively adjusting PID parameters according to the phase deviation estimation, the position deviation estimation and the covariance estimation; the control feedback module is used for superposing the voltage-controlled voltage adjustment quantity to the crystal oscillator time frequency module to adjust the output frequency of the crystal oscillator; according to the method, the crystal oscillator taming parameters are dynamically adjusted through Kalman filtering in combination with self-adaptive PID, high-precision and robust taming of the crystal oscillator is achieved, and the long-term frequency stability and the time synchronization precision of the crystal oscillator are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of time and frequency equipment technology, and specifically to a crystal oscillator discipline system based on Kalman filtering and adaptive PID. Background Technology

[0002] In fields such as communications, navigation, power, and aerospace, high-precision time synchronization is a critical requirement. Time and frequency devices, as high-precision time and frequency sources, typically employ low-cost temperature-controlled crystal oscillators (OCXOs) as their core frequency source. While these OCXOs offer high short-term frequency stability, they are susceptible to long-term nonlinear disturbances such as temperature fluctuations, voltage changes, and aging, leading to accumulated frequency offsets and making it difficult to meet long-term synchronization requirements. Therefore, "discipline" techniques are needed to compensate for crystal oscillator errors, bringing their output frequency closer to that of high-precision reference sources (such as atomic clocks and satellite navigation signals).

[0003] Traditional crystal oscillator discipline techniques primarily rely on PID control: by measuring the phase deviation between the 1PPS generated by the crystal oscillator as the frequency source and the 1PPS of the reference source in real time, the crystal oscillator voltage-controlled voltage (or current) is adjusted to compensate for the frequency offset. However, PID control has significant limitations:

[0004] 1) Parameter tuning relies on experience: proportional coefficient (K) p ), integral coefficient (K) i ), differential coefficients (K) d It requires manual adjustment based on the characteristics of the crystal oscillator, making it difficult to adapt to dynamic requirements under different environments (such as temperature and load changes);

[0005] 2) Poor adaptability to nonlinear disturbances: When the crystal oscillator is subjected to discontinuous disturbances such as sudden temperature changes or voltage jumps, the linear control characteristics of the PID controller are prone to overshoot or regulation lag.

[0006] 3) Limited noise suppression capability: The 1PPS involved in the measurement contains random noise, which will be amplified by the PID integral element and affect long-term stability. Summary of the Invention

[0007] The purpose of this invention is to overcome the shortcomings of the prior art and provide a crystal oscillator discipline system based on Kalman filtering and adaptive PID, thereby improving its long-term frequency stability and time synchronization accuracy.

[0008] The objective of this invention is achieved through the following technical solution:

[0009] A crystal oscillator discipline system based on Kalman filtering and adaptive PID includes:

[0010] Crystal oscillator time and frequency module: used to generate a local time and frequency signal based on the crystal oscillator frequency, the crystal oscillator frequency is adjusted by a voltage control signal;

[0011] Reference module: Used to receive external high-precision reference time and frequency signals;

[0012] Error measurement module: used to acquire and measure the phase deviation between the local time and frequency signal generated by the crystal oscillator time and frequency module and the reference time and frequency signal output by the reference module;

[0013] Kalman filter module: used to perform Kalman filter estimation based on the phase deviation, and output phase deviation estimate and covariance estimate;

[0014] Adaptive PID module: Receives phase deviation estimate, position deviation estimate, and covariance estimate from the Kalman filter module. It dynamically adjusts the PID parameters using an adaptive PID adjustment strategy and outputs the voltage-controlled voltage adjustment. The PID parameters include the proportional coefficient K. p Integral coefficient K i and differential coefficient K d ;

[0015] Control feedback module: used to superimpose the voltage-controlled voltage adjustment amount onto the crystal oscillator voltage-controlled terminal of the crystal oscillator time-frequency module to adjust the crystal oscillator output frequency;

[0016] The adaptive PID adjustment strategy is as follows:

[0017] Determine if the covariance estimate is greater than a preset threshold. If so, continue to determine if the phase deviation is increasing. If the phase deviation is increasing, increase the scaling factor K. p If the phase deviation decreases, the proportional coefficient K will decrease. p If not, determine whether the system is stable. If the system is stable, reduce the proportional coefficient; if it is unstable, do not make any adjustment.

[0018] Determine if the rate of change of phase deviation exceeds a preset threshold; if so, decrease the integral coefficient K. i If not, continue to determine whether the phase deviation is less than the preset threshold and is in a steady state. If so, calculate the average value I of the last 5 integral terms, and then determine whether the average value I of the integral terms is less than the preset threshold. If so, increase the integral coefficient; otherwise, decrease the integral coefficient. If the phase deviation is greater than the preset threshold, no adjustment is made.

[0019] If the system remains stable in the long term, increase the differential coefficient K. d If the system oscillates, decrease the differential coefficient; if the rate of change of the system's lag phase deviation is much greater than the phase deviation, increase the differential coefficient.

[0020] Furthermore, the local time and frequency signal is a 10MHz signal or a 1PPS signal, and the high-precision reference time and frequency signal is a reference 10MHz signal from an atomic clock or a reference 1PPS signal from BeiDou / GPS.

[0021] Further, the step of performing Kalman filtering estimation based on the phase deviation to output phase deviation estimate and covariance estimate includes the following steps:

[0022] Define the initial state x0 = [Δt], where Δt is the phase deviation between the 1PPS signal generated by the crystal oscillator time-frequency module and the reference 1PPS signal;

[0023] State prediction is performed, yielding phase deviation prediction and covariance prediction, respectively: P k|k-1 =FP k-1|k-1 F T +Q, where P represents the system state at time k-1. k-1|k-1 Let F = [1] represent the covariance at time k-1, where F = [1] is the state transition matrix and Q is the process noise covariance matrix.

[0024] To calculate the state update value, first calculate the Kalman gain: K k =P k|k-1 H T HP k|k-1 H T +R) -1 Phase bias and covariance are updated based on the Kalman gain, as follows: P k|k =(IK k H)P k|k-1 , where z k Let H = [1] be the observation matrix for phase deviation at time k; R is the observation noise covariance matrix, used to describe the 1PPS phase deviation measurement error.

[0025] Calculate K = K + 1;

[0026] Output state covariance P k Phase deviation estimation x k .

[0027] Furthermore, the algorithm steps of the adaptive PID adjustment strategy are as follows:

[0028] Define the proportionality coefficient K p Integral coefficient K i Differential coefficient K d Integral mean I, fluctuation variance var, phase deviation stability count sc, K p Learning rate a, K i Learning rate β, K i Learning rate γ, covariance threshold P thr Phase deviation threshold x thr Phase deviation change rate threshold Integral term threshold I thr The initial value of the phase deviation stable counting threshold thr;

[0029] Calculate the rate of change of phase deviation Δx k =x k -x k-1 x k and x k-1 These are the estimated phase deviation values ​​at time k and time k-1, respectively.

[0030] Determine the state covariance P k Is it greater than the preset threshold P? thr If so, then continue to determine whether the phase deviation is increasing, that is, determine |x k |>|x k-1 | Is this true? If so, increase the proportionality coefficient K. p , making K p =K p +a(P k -P thr If the phase deviation decreases, the proportional coefficient K will decrease. p , making K p =K p -a(P k -P thr If not, then determine whether the system is stable, i.e., determine |x / 2; k | <x thr and If both conditions are met, and the system is stable, then the proportionality coefficient should be decreased to make K... p =K p -aP k If it is unstable, no adjustment will be made;

[0031] Determine the rate of change of phase deviation Is it greater than the preset threshold? If so, then decrease the integral coefficient K. i ,make If not, continue to determine the phase deviation |x k Is it less than the preset threshold x? thr And if it is in a steady state, then calculate the average of the last 5 integral terms I, and then determine whether the average of the integral terms I is less than the preset threshold I. thr If so, increase the integral coefficient to make K i =K i +0.1β, otherwise decrease the integral coefficient to make K i =K i -0.2β; if the phase deviation |x k | Greater than the preset threshold x thr If so, no adjustment will be made;

[0032] Determine |x k | <x thr and If both conditions are met, increment the sc value until it exceeds the set threshold thr. This indicates that the system is stable in the long term. Then, reset the sc value to zero and set K... d =K d If not, clear the sc value to zero and recalculate the output variance var. Check if the variance var is greater than 0.5. If so, then set K... d =K d -0.5γ, if the fluctuation variance var is not greater than 0.5, then continue to determine whether the rate of change of the lag phase deviation is much greater than the phase deviation, i.e. If so, then make K d =K d +0.3γ, otherwise no adjustment is made.

[0033] Furthermore, the formula for calculating the voltage-controlled voltage adjustment amount is as follows:

[0034]

[0035] Where σ represents the conversion coefficient between phase deviation and voltage control voltage adjustment, x k x represents the phase deviation at time k. k-1 x represents the phase deviation at time k-1. i This represents the phase deviation at time i.

[0036] Furthermore, the control feedback module uses a DAC converter to convert the voltage-controlled voltage value into an analog signal, adaptively controlling the output frequency of the crystal oscillator to synchronize the local time frequency signal with the reference time frequency signal.

[0037] The beneficial effects of this invention are:

[0038] 1) High-precision discipline: Kalman filtering reduces the impact of crystal oscillator noise (such as white noise and flicker noise) through optimal state estimation. Adaptive PID dynamically adjusts parameters according to the uncertainty of state estimation, suppressing frequency shift caused by time-varying disturbances (such as sudden temperature changes). The standard deviation of phase deviation (TE) is reduced by 40% to 60% compared with traditional PID, thereby achieving high-precision clock synchronization.

[0039] 2) Strong robustness: The online optimization of parameters of the adaptive PID based on the Kalman filter estimation results can cope with nonlinear disturbances in complex environments (such as temperature changes from -40℃ to 85℃ and voltage fluctuations of ±5%), and the maximum time deviation is reduced from 35ns peak-to-peak to 10ns peak-to-peak. Attached Figure Description

[0040] Figure 1A system block diagram of a crystal oscillator discipline system based on Kalman filtering and adaptive PID provided by the present invention;

[0041] Figure 2 This is a schematic diagram of the phase deviation Kalman filter process in this invention;

[0042] Figure 3 This is a flowchart of the algorithm steps for the adaptive PID adjustment strategy in this invention. Detailed Implementation

[0043] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0044] See Figures 1-3 The present invention provides a technical solution:

[0045] A crystal oscillator discipline system based on Kalman filtering and adaptive PID, such as Figure 1 As shown, it includes:

[0046] Crystal oscillator time and frequency module: used to generate a local time and frequency signal based on the crystal oscillator frequency, the crystal oscillator frequency is adjusted by a voltage control signal;

[0047] Reference module: Used to receive external high-precision reference time and frequency signals;

[0048] Error measurement module: used to acquire and measure the phase deviation between the local time and frequency signal generated by the crystal oscillator time and frequency module and the reference time and frequency signal output by the reference module;

[0049] Kalman filter module: used to perform Kalman filter estimation based on the phase deviation, and output phase deviation estimate and covariance estimate;

[0050] Adaptive PID module: Receives phase deviation estimate, position deviation estimate, and covariance estimate from the Kalman filter module. It dynamically adjusts the PID parameters using an adaptive PID adjustment strategy and outputs the voltage-controlled voltage adjustment. The PID parameters include the proportional coefficient K. p Integral coefficient K i and differential coefficient K d ;

[0051] Control feedback module: used to superimpose the voltage-controlled voltage adjustment amount onto the crystal oscillator voltage-controlled terminal of the crystal oscillator time-frequency module to adjust the crystal oscillator output frequency;

[0052] The adaptive PID adjustment strategy is as follows:

[0053] Determine if the covariance estimate is greater than a preset threshold. If so, continue to determine if the phase deviation is increasing. If the phase deviation is increasing, increase the scaling factor K. p If the phase deviation decreases, the proportional coefficient K will decrease. p If not, determine whether the system is stable. If the system is stable, reduce the proportional coefficient; if it is unstable, do not make any adjustment.

[0054] Determine if the rate of change of phase deviation exceeds a preset threshold; if so, decrease the integral coefficient K. i If not, continue to determine whether the phase deviation is less than the preset threshold and is in a steady state. If so, calculate the average value I of the last 5 integral terms, and then determine whether the average value I of the integral terms is less than the preset threshold. If so, increase the integral coefficient; otherwise, decrease the integral coefficient. If the phase deviation is greater than the preset threshold, no adjustment is made.

[0055] If the system remains stable in the long term, increase the differential coefficient K. d If the system oscillates, decrease the differential coefficient; if the rate of change of the system's lag phase deviation is much greater than the phase deviation, increase the differential coefficient.

[0056] The local time and frequency signal is a 10MHz signal or a 1PPS signal, and the high-precision reference time and frequency signal is a reference 10MHz signal from an atomic clock or a reference 1PPS signal from BeiDou / GPS.

[0057] In one embodiment, the Kalman filter estimation based on the phase deviation is performed, and the output phase deviation estimate and covariance estimate are shown in the schematic diagram of the Kalman filter estimation process. Figure 2 As shown, the specific steps include:

[0058] Define the initial state x0 = [Δt], where Δt is the phase deviation between the 1PPS signal generated by the crystal oscillator time-frequency module and the reference 1PPS signal;

[0059] State prediction is performed, yielding phase deviation prediction and covariance prediction, respectively: P k|k-1 =FP k-1|k-1 F T +Q, where Let F = [1] represent the system state at time k-1, where F = [1] is the state transition matrix and Q is the process noise covariance matrix.

[0060] To calculate the state update value, first calculate the Kalman gain: K k =P k|k-1 H T HP k|k-1 H T +R) -1Phase bias and covariance are updated based on the Kalman gain, as follows: P k|k =(IK k H)P k|k-1 , where z k Let H = [1] be the observation matrix for phase deviation at time k; R is the observation noise covariance matrix, used to describe the 1PPS phase deviation measurement error.

[0061] Calculate K = K + 1;

[0062] Output state covariance P k Phase deviation estimation x k .

[0063] The Kalman filter module filters the phase deviation measured in real time and estimates the optimal phase deviation. By establishing the state equation of the phase deviation, the Kalman filter makes the optimal estimate of the phase deviation, separates noise and real clock drift, and can provide smooth and accurate error feedback for PID.

[0064] In one specific embodiment, the algorithm steps of the adaptive PID adjustment strategy are as follows: Figure 3 As shown, specifically:

[0065] Define the proportionality coefficient K p Integral coefficient K i Differential coefficient K d Integral mean I, fluctuation variance var, phase deviation stability count sc, K p Learning rate a, K i Learning rate β, K i Learning rate γ, covariance threshold P thr Phase deviation threshold x thr Phase deviation change rate threshold Integral term threshold I thr The initial value of the phase deviation stable counting threshold thr;

[0066] Calculate the rate of change of phase deviation Δx k =x k -x k-1 x k and x k-1 These are the estimated phase deviation values ​​at time k and time k-1, respectively.

[0067] Determine the state covariance P k Is it greater than the preset threshold P? thr If so, then continue to determine whether the phase deviation is increasing, that is, determine |x k |>|xk-1 | Is this true? If so, increase the proportionality coefficient K. p , making K p =K p +a(P k -P thr If the phase deviation decreases, the proportional coefficient K will decrease. p , making K p =K p -a(P k -P thr If not, then determine whether the system is stable, i.e., determine |x / 2; k | <x thr and If both conditions are met, and the system is stable, then the proportionality coefficient should be decreased to make K... p =K p -aP k If it is unstable, no adjustment will be made;

[0068] Determine the rate of change of phase deviation Is it greater than the preset threshold? If so, then decrease the integral coefficient K. i ,make If not, continue to determine the phase deviation |x k Is it less than the preset threshold x? thr And if it is in a steady state, then calculate the average of the last 5 integral terms I, and then determine whether the average of the integral terms I is less than the preset threshold I. thr If so, increase the integral coefficient to make K i =K i +0.1β, otherwise decrease the integral coefficient to make K i =K i -0.2β; if the phase deviation |x k | Greater than the preset threshold x thr If so, no adjustment will be made;

[0069] Determine |x k | <x thr and If both conditions are met, increment the sc value until it exceeds the set threshold thr. This indicates that the system is stable in the long term. Then, reset the sc value to zero and set K... d =K d If not, clear the sc value to zero and recalculate the output variance var. Check if the variance var is greater than 0.5. If so, then set K... d =K d -0.5γ, if the fluctuation variance var is not greater than 0.5, then continue to determine whether the rate of change of the lag phase deviation is much greater than the phase deviation, i.e. If so, then make K d=K d +0.3γ, otherwise no adjustment is made.

[0070] In this embodiment, the formula for calculating the voltage control voltage adjustment is:

[0071]

[0072] Where σ represents the conversion coefficient between phase deviation and voltage control voltage adjustment, x k x represents the phase deviation at time k. k-1 x represents the phase deviation at time k-1. i This represents the phase deviation at time i.

[0073] By repeatedly executing the algorithm steps of the adaptive PID adjustment strategy described above, the adaptively adjusted PID parameters are output. The voltage control voltage is calculated by continuously adjusting the PID parameters, thus realizing the crystal oscillator PID disciplined closed-loop control.

[0074] In this embodiment, the control feedback module uses a DAC converter to convert the voltage-controlled voltage value into an analog signal, adaptively controlling the output frequency of the crystal oscillator to synchronize the local time frequency signal with the reference time frequency signal.

[0075] The adaptive PID module dynamically calculates the PID discipline parameters based on the state covariance and phase deviation rate of change of the Kalman filter output, realizing online learning of adaptive strategies and suppressing time-varying disturbances, such as frequency shifts caused by sudden temperature changes. The standard deviation of phase deviation (TE) (Allan variance) is reduced by 40% to 60% compared to traditional PID, thus achieving high-precision clock synchronization. The online optimization of parameters of the adaptive PID based on Kalman filter estimation results can cope with nonlinear disturbances in complex environments (such as temperature changes from -40℃ to 85℃ and ±5% voltage fluctuations), reducing the maximum time deviation from 35 ns peak-to-peak to 10 ns peak-to-peak.

[0076] The above description is merely a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the forms disclosed herein and should not be construed as excluding other embodiments. It can be used in various other combinations, modifications, and environments, and can be altered within the scope of the concept described herein through the above teachings or related technologies or knowledge. Modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the present invention should be within the protection scope of the appended claims.

Claims

1. A crystal oscillator discipline system based on Kalman filtering and adaptive PID, characterized in that, include: Crystal oscillator time and frequency module: used to generate a local time and frequency signal based on the crystal oscillator frequency, the crystal oscillator frequency is adjusted by a voltage control signal; Reference module: Used to receive external high-precision reference time and frequency signals; Error measurement module: used to acquire and measure the phase deviation between the local time and frequency signal generated by the crystal oscillator time and frequency module and the reference time and frequency signal output by the reference module; Kalman filter module: used to perform Kalman filter estimation based on the phase deviation, and output phase deviation estimate and covariance estimate; Adaptive PID module: Receives phase deviation estimate, position deviation estimate, and covariance estimate from the Kalman filter module. It dynamically adjusts the PID parameters using an adaptive PID adjustment strategy and outputs the voltage-controlled voltage adjustment. The PID parameters include the proportional coefficient K. p Integral coefficient K i and differential coefficient K d ; Control feedback module: used to superimpose the voltage-controlled voltage adjustment amount onto the crystal oscillator voltage-controlled terminal of the crystal oscillator time-frequency module to adjust the crystal oscillator output frequency; The adaptive PID adjustment strategy is as follows: Determine if the covariance estimate is greater than a preset threshold. If so, continue to determine if the phase deviation is increasing. If the phase deviation is increasing, increase the scaling factor K. p If the phase deviation decreases, the proportional coefficient K will decrease. p If not, determine whether the system is stable. If the system is stable, reduce the proportional coefficient; if it is unstable, do not make any adjustment. Determine if the rate of change of phase deviation exceeds a preset threshold; if so, decrease the integral coefficient K. i If not, continue to determine whether the phase deviation is less than the preset threshold and is in a steady state. If so, calculate the average value I of the last 5 integral terms, and then determine whether the average value I of the integral terms is less than the preset threshold. If so, increase the integral coefficient; otherwise, decrease the integral coefficient. If the phase deviation is greater than the preset threshold, no adjustment is made. If the system remains stable in the long term, increase the differential coefficient K. d If the system oscillates, decrease the differential coefficient; if the rate of change of the system's lag phase deviation is much greater than the phase deviation, increase the differential coefficient.

2. The crystal oscillator discipline system based on Kalman filtering and adaptive PID according to claim 1, characterized in that: The local time and frequency signal is a 10MHz signal or a 1PPS signal, and the high-precision reference time and frequency signal is a reference 10MHz signal from an atomic clock or a reference 1PPS signal from BeiDou / GPS.

3. The crystal oscillator discipline system based on Kalman filtering and adaptive PID according to claim 2, characterized in that: The step of performing Kalman filtering estimation based on the phase deviation, and outputting phase deviation estimate and covariance estimate, includes the following steps: Define the initial state x0 = [Δt], where Δt is the phase deviation between the 1PPS signal generated by the crystal oscillator time-frequency module and the reference 1PPS signal; State prediction is performed, yielding phase deviation prediction and covariance prediction, respectively: in, P represents the system state at time k-1. k-1|k-1 Let F = [1] represent the covariance at time k-1, where F = [1] is the state transition matrix and Q is the process noise covariance matrix. To calculate the state update value, first calculate the Kalman gain: K k =P k|k-1 H T HP k|k-1 H T +R) -1 Phase bias and covariance are updated based on the Kalman gain, as follows: P k|k =(IK k H)P k|k-1 , where z k Let H be the phase deviation observation at time k, H = [1] be the observation matrix, and R be the observation noise covariance matrix, which is used to describe the 1PPS phase deviation measurement error. Calculate K = K + 1; Output state covariance P k Phase deviation estimation x k .

4. The crystal oscillator discipline system based on Kalman filtering and adaptive PID according to claim 3, characterized in that: The algorithm steps of the adaptive PID adjustment strategy are as follows: Define the proportionality coefficient K p Integral coefficient K i Differential coefficient K d Integral mean I, fluctuation variance var, phase deviation stability count sc, K p Learning rate a, K i Learning rate β, K i Learning rate γ, covariance threshold P thr Phase deviation threshold x thr Phase deviation change rate threshold Integral term threshold I thr The initial value of the phase deviation stable counting threshold thr; Calculate the rate of change of phase deviation Δx k =x k -x k-1 x k and x k-1 These are the estimated phase deviation values ​​at time k and time k-1, respectively. Determine the state covariance P k Is it greater than the preset threshold P? thr If so, then continue to determine whether the phase deviation is increasing, that is, determine |x k |>|x k-1 | Is this true? If so, increase the proportionality coefficient K. p , making K p =K p +a(P k -P thr If the phase deviation decreases, the proportional coefficient K will decrease. p , making K p =K p -a(P k -P thr If not, then determine whether the system is stable, i.e., determine |x / 2; k | <x thr and If both conditions are met, and the system is stable, then the proportionality coefficient should be decreased to make K... p =K p -aP k If it is unstable, no adjustment will be made; Determine the rate of change of phase deviation Is it greater than the preset threshold? If so, then decrease the integral coefficient K. i ,make If not, continue to determine the phase deviation |x k Is it less than the preset threshold x? thr And if it is in a steady state, then calculate the average of the last 5 integral terms I, and then determine whether the average of the integral terms I is less than the preset threshold I. thr If so, increase the integral coefficient to make K i =K i +0.1β, otherwise decrease the integral coefficient to make K i =K i -0.2β; if the phase deviation |x k | Greater than the preset threshold x thr If so, no adjustment will be made; Determine |x k | <x thr and If both conditions are met, increment the sc value until it exceeds the set threshold thr. This indicates that the system is stable in the long term. Then, reset the sc value to zero and set K... d =K d If not, clear the sc value to zero and recalculate the output variance var. Check if the variance var is greater than 0.

5. If so, then set K... d =K d -0.5γ, if the fluctuation variance var is not greater than 0.5, then continue to determine whether the rate of change of the lag phase deviation is much greater than the phase deviation, i.e. If so, then make K d =K d +0.3γ, otherwise no adjustment is made.

5. A crystal oscillator discipline system based on Kalman filtering and adaptive PID according to claim 1, characterized in that: The formula for calculating the voltage control voltage adjustment is: Where σ represents the conversion coefficient between phase deviation and voltage control voltage adjustment, x k x represents the phase deviation at time k. k-1 x represents the phase deviation at time k-1. i This represents the phase deviation at time i.

6. The crystal oscillator discipline system based on Kalman filtering and adaptive PID according to claim 1, characterized in that: The control feedback module uses a DAC converter to convert the voltage-controlled voltage value into an analog signal, adaptively controlling the output frequency of the crystal oscillator to synchronize the local time frequency signal with the reference time frequency signal.

Citation Information

Cited By

  • A clock frequency calibration and tracking method and system for a wireless shielding device

    CN122316333A