VCO digital circuit control method and system with temperature compensation

By establishing temperature-frequency deviation characteristic curves and adjusting adaptive compensation factors, the frequency drift problem of VCO circuits under aging and environmental changes is solved, achieving high-precision and stable frequency control, which is suitable for high-stability communication systems and precision instruments.

CN121000221AActive Publication Date: 2025-11-21ZHEJIANG FANSHUANG TECH CO LTD

Patent Information

Application Number
CN202511525551.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-24
Publication Date
2025-11-21
Estimated Expiration
2045-10-24

AI Technical Summary

Technical Problem

Existing VCO temperature compensation methods lack adaptability, cannot effectively cope with frequency drift caused by aging or environmental changes, the compensation accuracy decreases over time, it is difficult to accurately describe nonlinear frequency drift characteristics, and lacks personalized compensation, thus failing to meet the requirements of high-precision frequency control.

Method used

By acquiring the output frequency signal and temperature data of the VCO circuit, a temperature-frequency deviation characteristic curve is established. The Monte Carlo method and Bayesian iteration are used to calculate the adaptive adjustment temperature compensation factor, and frequency calibration is performed in conjunction with a digital integrator to achieve real-time compensation and dynamic optimization.

Benefits of technology

It improves the accuracy and adaptive adjustment capability of temperature compensation, reduces the impact of frequency drift on system performance, and enhances the stability and frequency accuracy of VCO circuits in complex environments, making it particularly suitable for high-stability communication systems and precision instruments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121000221A_ABST
    Figure CN121000221A_ABST
Patent Text Reader

Abstract

The invention provides a VCO digital circuit control method and system with temperature compensation, and relates to the technical field of circuit control, and the method comprises the steps: obtaining VCO output frequency and real-time temperature, and calculating an initial frequency deviation; correcting the frequency deviation based on the temperature compensation coefficient, and generating a temperature-frequency deviation characteristic curve; an optimal compensation factor is determined through Monte Carlo sampling; calculating a compensation parameter adaptive weight by using Bayesian iteration, and dynamically adjusting a compensation factor; and a control signal is generated through the digital integrator to realize frequency calibration. According to the invention, the high-precision frequency stability of the VCO under the temperature change condition is realized, and the circuit reliability is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to circuit control technology, and more particularly to a digital circuit control method and system for VCO with temperature compensation. Background Technology

[0002] In modern communication systems and timing control circuits, the voltage-controlled oscillator (VCO) is a core frequency generation component, whose output frequency can be adjusted by controlling the voltage. However, the frequency stability of the VCO has a crucial impact on the overall system performance. With the development of integrated circuit technology and the increasing frequency accuracy requirements of terminal devices, the temperature stability of the VCO output frequency has become a key factor affecting system performance. Due to the inherent temperature characteristics of semiconductor devices, the output frequency of the VCO will drift under different ambient temperatures, which seriously affects the reliability and stability of the system.

[0003] Traditional VCO temperature compensation methods primarily employ analog circuit design, using devices such as thermistors and varactor diodes to form a temperature compensation network to counteract the impact of temperature changes on frequency. With the development of digital technology, digitally controlled VCO temperature compensation methods have gradually become a research hotspot, offering advantages such as high accuracy and flexibility. Current digital VCO temperature compensation techniques typically employ lookup table methods or simple linear fitting to achieve temperature compensation, but these methods have many limitations in practical applications.

[0004] The shortcomings and deficiencies of existing technologies are mainly reflected in the following aspects: First, traditional temperature compensation methods lack adaptability and cannot effectively cope with the characteristic drift of VCO circuits caused by aging or environmental changes during long-term use, resulting in a decrease in compensation accuracy over time. Second, most existing compensation algorithms use linear or simple polynomial fitting, which is difficult to accurately describe the nonlinear frequency drift characteristics of VCOs across the entire temperature range, leading to unsatisfactory compensation effects at temperature extremes. Third, existing technologies lack precise modeling and optimization methods for the temperature-frequency relationship of VCOs. The determination of compensation parameters relies heavily on empirical values ​​or simple measurements, making it impossible to provide personalized compensation for the differences in characteristics of different batches of VCO devices, thus failing to meet the requirements of high-precision frequency control. Summary of the Invention

[0005] The present invention provides a digital circuit control method and system for VCO with temperature compensation, which can solve the problems in the prior art.

[0006] A first aspect of the present invention provides a digital circuit control method for a VCO with temperature compensation, comprising: The output frequency signal of the VCO circuit and the corresponding real-time temperature data are obtained, and the output frequency signal is compared with a preset standard frequency to obtain the initial frequency deviation value. The temperature compensation coefficient of the VCO circuit is calculated based on the output frequency signal. The initial frequency deviation value is corrected using the temperature compensation coefficient to obtain the actual frequency deviation. The actual frequency deviation is then correlated with the real-time temperature data to generate a temperature-frequency deviation characteristic curve. Based on the temperature-frequency deviation characteristic curve, the temperature compensation factor is randomly sampled multiple times using the Monte Carlo method, the frequency deviation corresponding to each sampling point is calculated, and the temperature compensation factor with the smallest frequency deviation is selected as the optimal compensation factor. The output frequency signal of the VCO circuit is compensated in real time using the optimal compensation factor. Combined with the compensation effect evaluation parameters, the adaptive weight value of the compensation parameter is obtained through Bayesian iteration. The optimal compensation factor is dynamically adjusted according to the adaptive weight value. The compensated frequency signal is input into a digital integrator to accumulate the frequency error, generate a digital control signal, and output it to the VCO circuit to complete the frequency calibration.

[0007] The temperature compensation coefficient of the VCO circuit is calculated based on the output frequency signal. The initial frequency deviation value is corrected using the temperature compensation coefficient to obtain the actual frequency deviation. A correspondence is established between the actual frequency deviation and the real-time temperature data to generate a temperature-frequency deviation characteristic curve, including: Calculate the temperature change at adjacent sampling times and establish a temperature change trend curve based on the temperature change; calculate the temperature compensation coefficient using a piecewise linear interpolation method based on the amplitude and phase information of the output frequency signal and the temperature change trend curve. The initial frequency deviation value is weighted and corrected using the temperature compensation coefficient to obtain the actual frequency deviation, and the offset of the actual frequency deviation is calculated. The temperature compensation coefficient is corrected according to the offset, and the corrected actual frequency deviation is paired with the real-time temperature data. A temperature-frequency deviation characteristic curve is constructed using cubic spline interpolation.

[0008] Based on the temperature-frequency deviation characteristic curve, the temperature compensation factor is randomly sampled multiple times using the Monte Carlo method. The frequency deviation corresponding to each sampling point is calculated, and the temperature compensation factor with the smallest frequency deviation is selected as the optimal compensation factor. The temperature change rate is calculated based on the temperature-frequency deviation characteristic curve, and the step size for dividing the temperature change interval is determined according to the temperature change rate to generate a temperature compensation interval sequence; the adaptive sampling range of the temperature compensation factor is divided according to the temperature compensation interval sequence. Within the adaptive sampling range, a random sampling point sequence is generated using the Monte Carlo method, and the random sampling point sequence is substituted into the temperature-frequency deviation characteristic curve to calculate the frequency deviation corresponding to each sampling point. The temperature compensation factor with the smallest frequency deviation is selected as the candidate compensation factor. A dynamic search window is constructed with the candidate compensation factor as the center value. Monte Carlo random sampling is re-executed within the dynamic search window. The temperature change rate is converted into a sampling weight coefficient. The sampling points are weighted. The temperature compensation factor with the smallest frequency deviation is selected from the weighted sampling results as the optimal compensation factor.

[0009] Within the adaptive sampling range, a sequence of random sampling points is generated using the Monte Carlo method. This sequence is then substituted into the temperature-frequency deviation characteristic curve to calculate the frequency deviation corresponding to each sampling point, including: Obtain the upper and lower limits of the adaptive sampling range, and construct a Monte Carlo random sampling search space based on the upper and lower limits; Random sampling initial points are generated within the search space. The random sampling initial points are substituted into the temperature-frequency deviation characteristic curve to calculate the initial frequency deviation. The sampling weight distribution is determined based on the initial frequency deviation. Based on the sampling weight distribution, a random sampling point sequence is generated using the Monte Carlo method. The random sampling point sequence is then substituted into the temperature-frequency deviation characteristic curve to calculate the frequency deviation corresponding to each sampling point.

[0010] The output frequency signal of the VCO circuit is compensated in real time using the optimal compensation factor, and the adaptive weight values ​​of the compensation parameters are obtained through Bayesian iteration calculation by combining the compensation effect evaluation parameters. The output frequency signal of the VCO circuit is compensated in real time using the optimal compensation factor to obtain the compensated output frequency signal; frequency stability analysis is performed on the compensated output frequency signal, and frequency stability and phase noise index are extracted as compensation effect evaluation parameters, which are then converted into Bayesian prior probability distributions. Based on the Bayesian prior probability distribution, initial weight values ​​for compensation parameters are set, and a mapping relationship between compensation effect evaluation parameters and weight values ​​is constructed. Bayesian iterative calculations are performed according to the mapping relationship. When the compensation effect evaluation parameter indicates an improvement in frequency performance, the weight value of the corresponding compensation parameter is increased through iterative calculation. When the compensation effect evaluation parameter indicates a decrease in frequency performance, the weight value of the corresponding compensation parameter is decreased through iterative calculation.

[0011] The compensated frequency signal is input into a digital integrator to accumulate the frequency error and generate digital control signals, including: The frequency error between the compensated frequency signal and the ideal frequency is calculated, and the frequency error is input into a digital integrator to perform frequency error accumulation calculation. The integrator response coefficient is set based on the accumulated value of the frequency error. When the accumulated value of the frequency error exceeds a preset range, the integrator response coefficient is increased and the integration time constant is shortened. When the accumulated value of the frequency error is within a preset range, the integrator response coefficient is decreased and the integration time constant is extended, thereby realizing adaptive adjustment of the integrator response characteristics. Based on the adjusted integrator response characteristics, the frequency error accumulation operation is continuously performed to obtain the accumulated frequency error data, and the accumulated frequency error data is converted into a digital control signal.

[0012] A second aspect of the present invention provides a VCO digital circuit control system with temperature compensation, comprising: The first unit is used to acquire the output frequency signal of the VCO circuit and the corresponding real-time temperature data, and compare the output frequency signal with a preset standard frequency to obtain the initial frequency deviation value. The second unit is used to calculate the temperature compensation coefficient of the VCO circuit based on the output frequency signal, use the temperature compensation coefficient to correct the initial frequency deviation value, obtain the actual frequency deviation, and establish a correspondence between the actual frequency deviation and the real-time temperature data to generate a temperature-frequency deviation characteristic curve. The third unit is used to perform multiple random samplings of the temperature compensation factor based on the temperature-frequency deviation characteristic curve using the Monte Carlo method, calculate the frequency deviation corresponding to each sampling point, and select the temperature compensation factor with the smallest frequency deviation as the optimal compensation factor. The fourth unit is used to perform real-time compensation of the output frequency signal of the VCO circuit using the optimal compensation factor, and to obtain the adaptive weight value of the compensation parameter through Bayesian iteration by combining the compensation effect evaluation parameters. The optimal compensation factor is dynamically adjusted according to the adaptive weight value. The compensated frequency signal is input into a digital integrator to accumulate the frequency error, generate a digital control signal and output it to the VCO circuit to complete the frequency calibration.

[0013] A third aspect of the present invention provides an electronic device, comprising: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.

[0014] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.

[0015] The beneficial effects of this application are as follows: By employing the temperature-compensated VCO digital circuit control method provided by this invention, the frequency drift characteristics of the VCO circuit at different temperatures can be accurately captured, and a dynamic mapping relationship between temperature and frequency deviation can be established, thereby achieving real-time correction of the frequency output.

[0016] This invention, through the combination of Monte Carlo random sampling and Bayesian iteration, not only improves the accuracy of temperature compensation but also enables the system to have adaptive adjustment capabilities. It can automatically optimize compensation parameters according to the actual working environment, effectively reduce the impact of frequency drift on system performance, and enhance the stability of VCO circuits in complex environments.

[0017] Furthermore, this invention uses a digital integrator to accumulate frequency errors and generate digital control signals, which simplifies the circuit structure, reduces power consumption, and improves the system's response speed to temperature changes. This allows the VCO circuit to maintain high frequency accuracy and stability over a wide temperature range, making it particularly suitable for communication systems and precision instruments that require high frequency stability. Attached Figure Description

[0018] Figure 1 This is a schematic flowchart of a temperature-compensated VCO digital circuit control method according to an embodiment of the present invention. Figure 2 This is a flowchart illustrating the temperature compensation factor search process in an embodiment of the present invention. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. 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.

[0020] The technical solution of the present invention will be described in detail below with reference to specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0021] Figure 1 This is a flowchart illustrating the temperature-compensated VCO digital circuit control method according to an embodiment of the present invention. Figure 1As shown, the method includes: The output frequency signal of the VCO circuit and the corresponding real-time temperature data are obtained, and the output frequency signal is compared with a preset standard frequency to obtain the initial frequency deviation value. The temperature compensation coefficient of the VCO circuit is calculated based on the output frequency signal. The initial frequency deviation value is corrected using the temperature compensation coefficient to obtain the actual frequency deviation. The actual frequency deviation is then correlated with the real-time temperature data to generate a temperature-frequency deviation characteristic curve. Based on the temperature-frequency deviation characteristic curve, the temperature compensation factor is randomly sampled multiple times using the Monte Carlo method, the frequency deviation corresponding to each sampling point is calculated, and the temperature compensation factor with the smallest frequency deviation is selected as the optimal compensation factor. The output frequency signal of the VCO circuit is compensated in real time using the optimal compensation factor. Combined with the compensation effect evaluation parameters, the adaptive weight value of the compensation parameter is obtained through Bayesian iteration. The optimal compensation factor is dynamically adjusted according to the adaptive weight value. The compensated frequency signal is input into a digital integrator to accumulate the frequency error, generate a digital control signal, and output it to the VCO circuit to complete the frequency calibration.

[0022] In one optional implementation, the temperature compensation coefficient of the VCO circuit is calculated based on the output frequency signal, the initial frequency deviation value is corrected using the temperature compensation coefficient to obtain the actual frequency deviation, and a correspondence is established between the actual frequency deviation and the real-time temperature data to generate a temperature-frequency deviation characteristic curve, including: Calculate the temperature change at adjacent sampling times and establish a temperature change trend curve based on the temperature change; calculate the temperature compensation coefficient using a piecewise linear interpolation method based on the amplitude and phase information of the output frequency signal and the temperature change trend curve. The initial frequency deviation value is weighted and corrected using the temperature compensation coefficient to obtain the actual frequency deviation, and the offset of the actual frequency deviation is calculated. The temperature compensation coefficient is corrected according to the offset, and the corrected actual frequency deviation is paired with the real-time temperature data. A temperature-frequency deviation characteristic curve is constructed using cubic spline interpolation.

[0023] The temperature change between adjacent sampling times is calculated by the difference in continuous readings from a digital temperature sensor. The processor reads the temperature sensor values ​​at fixed time intervals, ranging from one to ten seconds, with the specific interval determined based on the thermal response speed of the VCO circuit. The processor subtracts the temperature value at the current sampling time from the temperature value at the previous sampling time to obtain the temperature change value. To reduce the influence of measurement noise, the processor performs a moving average filtering process on five consecutive temperature changes, and the filtered value is taken as the valid temperature change. When the absolute value of the temperature change is less than the sensor's accuracy threshold, the processor sets the change to zero to avoid minor noise interfering with subsequent calculations.

[0024] The temperature change trend curve is established using time series analysis to process historical temperature change data. The processor collects temperature change data for the most recent hour and arranges these data in chronological order to form a change sequence. The trend curve is obtained by least squares fitting, with a quadratic polynomial chosen as the basic function, which can effectively describe slow and abrupt temperature changes. The parameters of the fitted curve include linear coefficients, quadratic coefficients, and a constant term, which are obtained through matrix operations. The processor also calculates the root mean square error between the fitted curve and the actual data points. When the error exceeds a preset threshold, the order of the fitted function is automatically adjusted or a new fitting time window is selected.

[0025] The amplitude information of the VCO output frequency signal is extracted using digital signal processing (DSP). The processor converts the analog frequency signal into a digital signal via a high-speed analog-to-digital converter (ADC). The sampling frequency is set to at least ten times the signal frequency to ensure signal integrity. Amplitude extraction employs a Fast Fourier Transform (FFT) algorithm. The processor performs a FFT on the sampled time-domain signal to find the amplitude corresponding to the dominant frequency component in the frequency domain. To improve amplitude measurement accuracy, the processor uses window function techniques to reduce spectral leakage. Commonly used window functions include the Hamming window and the Blackman window. Amplitude information is expressed in decibels (dB) by taking the logarithm of the linear amplitude and multiplying it by twenty.

[0026] Phase information extraction is achieved through a phase detector and a digital phase-locked loop (PLL). The phase detector compares the VCO output signal with a reference clock signal, outputting a voltage signal proportional to the phase difference. This voltage signal is converted into digital phase information by an analog-to-digital converter (ADC), achieving phase accuracy at the degree level. The PLL filters the phase information, removing high-frequency noise and phase jitter, outputting stable phase data. A high-precision crystal oscillator is used as the time reference for the phase information, ensuring long-term stability of the phase measurement. The processor converts the phase information into radians for subsequent calculations.

[0027] The temperature compensation coefficient is calculated by combining the amplitude and phase information of the frequency signal with the temperature change trend curve. The processor establishes a three-dimensional lookup table, which records the baseline values ​​of the compensation coefficient corresponding to different combinations of amplitude, phase, and temperature change rate. When the actual measured value is not on a node of the lookup table, a piecewise linear interpolation method is used to calculate the corresponding compensation coefficient.

[0028] During piecewise linear interpolation, the processor finds the smallest cube enclosing the target point, whose eight vertices correspond to eight data points in a lookup table. The processor performs three-dimensional linear interpolation on these eight data points, and the calculation process consists of three steps: performing four one-dimensional interpolations along one coordinate axis to obtain four intermediate values; performing two one-dimensional interpolations along a second coordinate axis to obtain two intermediate values; and performing one interpolation along a third coordinate axis on the last two intermediate values ​​to obtain the final compensation coefficient.

[0029] The weighted correction of the initial frequency deviation value employs an adaptive weight allocation strategy. The processor determines the weight value based on the reliability of the temperature compensation coefficient, which is assessed by comparing the similarity between the current operating conditions and historical calibration conditions. When the operating conditions are highly similar to the calibration conditions, the weight of the temperature compensation coefficient is set to a value close to one; when the similarity is low, the weight is correspondingly reduced. The weighted correction is calculated by multiplying the initial frequency deviation value by the weight coefficient and then by the temperature compensation coefficient; the corrected value is the actual frequency deviation. The processor also considers the impact of the temperature change rate on the compensation effect; when the temperature changes rapidly, the weight of the compensation coefficient is appropriately reduced to avoid oscillations caused by overcompensation.

[0030] The actual frequency deviation is calculated by comparing it with the theoretical frequency deviation value, which is calculated based on the temperature coefficient specifications of the VCO circuit and the current temperature conditions. This value represents the frequency deviation that should be achieved under ideal compensation conditions. The processor subtracts the theoretical frequency deviation value from the actual frequency deviation value to obtain the offset value. The sign of the offset indicates the direction of compensation; a positive value indicates undercompensation, and a negative value indicates overcompensation. The magnitude of the offset reflects the compensation accuracy; a smaller offset indicates a better compensation effect. The processor performs statistical analysis on the offset measurements from multiple consecutive measurements, calculating the mean and standard deviation of the offsets to evaluate the stability of the compensation algorithm.

[0031] The temperature compensation coefficient is corrected based on a feedback adjustment mechanism of the offset. The processor establishes a mapping relationship between the offset and the adjustment amount of the compensation coefficient, which is obtained through offline training and stored in the parameter table. When the offset is positive, the processor increases the value of the temperature compensation coefficient to enhance the compensation effect; when the offset is negative, the compensation coefficient is decreased to avoid overcompensation. The magnitude of the adjustment is proportional to the magnitude of the offset, and the proportionality coefficient is determined according to the response characteristics of the VCO circuit. The correction process adopts a gradual adjustment strategy, with each adjustment limited to within five percent of the current compensation coefficient to ensure the stability of the adjustment process.

[0032] The pairing process between actual frequency deviation and real-time temperature data establishes a time synchronization mechanism to ensure data consistency. The processor adds a precise timestamp to each frequency deviation and temperature measurement, with millisecond-level accuracy. During data pairing, the processor selects the frequency deviation and temperature values ​​with the closest timestamps for pairing; data pairs with a time difference exceeding a preset threshold are marked as invalid and excluded. Valid data pairs are sorted by temperature value to form a temperature-frequency deviation data sequence. The processor also performs outlier detection on the data sequence, using the quartile method to identify and remove data points that significantly deviate from the normal range.

[0033] The process of constructing the temperature-frequency deviation characteristic curve using cubic spline interpolation employs natural boundary conditions. The processor uses sorted temperature-frequency deviation data points as interpolation nodes and constructs cubic polynomial functions between adjacent nodes. Each cubic polynomial contains four undetermined coefficients, which are determined by the continuity of function values, first derivatives, and second derivatives at the nodes. The boundary conditions are set so that the second derivatives at both ends of the curve are zero, i.e., natural spline conditions.

[0034] The interpolation calculation employs a chasing method to solve a system of tridiagonal linear equations, which offers high computational efficiency and good numerical stability. The constructed characteristic curve can calculate the corresponding frequency deviation at any temperature point, with interpolation accuracy superior to linear interpolation methods. The processor stores the parameters of the characteristic curve in non-volatile memory for subsequent frequency compensation calculations.

[0035] In one optional implementation, based on the temperature-frequency deviation characteristic curve, the temperature compensation factor is randomly sampled multiple times using the Monte Carlo method, the frequency deviation corresponding to each sampling point is calculated, and the temperature compensation factor with the smallest frequency deviation is selected as the optimal compensation factor, including: The temperature change rate is calculated based on the temperature-frequency deviation characteristic curve, and the step size for dividing the temperature change interval is determined according to the temperature change rate to generate a temperature compensation interval sequence; the adaptive sampling range of the temperature compensation factor is divided according to the temperature compensation interval sequence. Within the adaptive sampling range, a random sampling point sequence is generated using the Monte Carlo method, and the random sampling point sequence is substituted into the temperature-frequency deviation characteristic curve to calculate the frequency deviation corresponding to each sampling point. The temperature compensation factor with the smallest frequency deviation is selected as the candidate compensation factor. A dynamic search window is constructed with the candidate compensation factor as the center value. Monte Carlo random sampling is re-executed within the dynamic search window. The temperature change rate is converted into a sampling weight coefficient. The sampling points are weighted. The temperature compensation factor with the smallest frequency deviation is selected from the weighted sampling results as the optimal compensation factor.

[0036] like Figure 2 As shown, the method includes: After obtaining the temperature-frequency deviation characteristic curve, the temperature change rate is calculated to accurately divide the temperature compensation interval. Specifically, the change in frequency deviation between adjacent temperature points on the temperature-frequency deviation characteristic curve can be divided by the change in temperature to obtain the temperature change rate at each temperature point. For example, for a characteristic curve with a temperature range from -40°C to 85°C, data points are collected every 5°C, resulting in 25 temperature change rate values. If the frequency deviation changes from -32ppm to -29ppm when the temperature rises from -40°C to -35°C, then the temperature change rate for this interval is ((-29)-(-32)) / ((-35)-(-40)) = 3 / 5 = 0.6ppm / °C.

[0037] Based on the calculated rate of temperature change, the step size for dividing the temperature change range is determined. Smaller step sizes are used in regions with larger rate of temperature change, and larger step sizes are used in regions with smaller rate of temperature change. For example, when the absolute value of the rate of temperature change is greater than 1 ppm / °C, the step size is set to 2°C; when the absolute value of the rate of temperature change is between 0.5 ppm / °C and 1 ppm / °C, the step size is set to 3°C; and when the absolute value of the rate of temperature change is less than 0.5 ppm / °C, the step size is set to 5°C. Based on these step sizes, the system generates a temperature compensation range sequence, such as [-40°C, -38°C], [-38°C, -35°C], [-35°C, -32°C], etc.

[0038] The adaptive sampling range of the temperature compensation factor is divided according to the temperature compensation interval sequence. For each temperature compensation interval, the corresponding compensation factor sampling range is determined based on the frequency deviation variation range within that interval. For example, if the frequency deviation range within the [-40°C, -38°C] interval is [-32ppm, -30ppm], considering the relationship between the compensation effect and the actual frequency deviation, the compensation factor sampling range for this interval can be set to [28ppm, 34ppm]. This approach ensures that the sampling range matches the actual required compensation amount.

[0039] After determining the adaptive sampling range, a Monte Carlo method is used to generate a sequence of random sampling points. For example, for a compensation factor sampling range of [28ppm, 34ppm], 1000 uniformly distributed sampling points can be randomly generated. These sampling points include: 28.35ppm, 29.72ppm, 30.18ppm, 31.45ppm, 32.87ppm, etc.

[0040] Substituting these randomly generated sampling points into the temperature-frequency deviation characteristic curve, the frequency deviation corresponding to each sampling point is calculated. The calculation method is to add the original frequency deviation to the compensation factor value to obtain the compensated frequency deviation. For example, if the original frequency deviation is -32ppm at -40°C, and a compensation factor of 31.45ppm is used, then the compensated frequency deviation is -32ppm + 31.45ppm = -0.55ppm. The system performs this calculation for all sampling points and calculates the average or maximum absolute value of the frequency deviation for each compensation factor over the entire temperature range. By comparison, the system selects the temperature compensation factor with the smallest frequency deviation index as the candidate compensation factor. Assume that in the first round of sampling, the system determines the candidate compensation factor to be 31.45ppm.

[0041] To further optimize the compensation effect, a dynamic search window is constructed with the candidate compensation factor of 31.45 ppm as the center value. The window width can be set to ±5% of the candidate compensation factor, i.e., [29.88 ppm, 33.02 ppm]. Within this search window, the system performs Monte Carlo random sampling again to generate a new sequence of sampling points.

[0042] In this round of sampling, the temperature change rate is converted into a sampling weighting coefficient, and the sampling points are weighted accordingly. Specifically, the larger the temperature change rate, the larger the weighting coefficient. For example, if the temperature change rate of a certain interval is 0.6 ppm / °C, it can be normalized and multiplied by a coefficient (such as 10) to obtain a weighting value of 6. When calculating the frequency deviation index, the system multiplies the frequency deviation of each temperature point by the corresponding weighting coefficient and then sums them or takes the maximum value.

[0043] This weighted processing allows for greater emphasis on compensation effects in temperature-sensitive areas. From the weighted sampling results, the system selects the temperature compensation factor with the smallest frequency deviation as the final optimal compensation factor. For example, after weighted calculation, the optimal compensation factor is determined to be 31.72 ppm.

[0044] In practical applications, this method was validated in a real crystal oscillator temperature compensation circuit with an operating temperature range of -40°C to 85°C. The original frequency deviation varied by approximately 64 ppm across the entire temperature range. The optimal compensation factor calculated using this method was 31.72 ppm. After applying this compensation factor, the maximum frequency deviation across the entire temperature range decreased from 32 ppm to 3.2 ppm, and the average deviation decreased from 15 ppm to 1.5 ppm, effectively improving the system's temperature stability.

[0045] This implementation scheme achieves precise optimization of the temperature compensation factor by combining the Monte Carlo method with adaptive sampling and weighted processing techniques. It can be widely applied in electronic devices requiring high-precision temperature compensation, such as communication equipment, navigation systems, and precision instruments. This method not only improves compensation accuracy but also exhibits good robustness due to the use of random sampling, enabling it to adapt to different types of temperature-frequency deviation characteristic curves.

[0046] In one optional implementation, within the adaptive sampling range, a sequence of random sampling points is generated using the Monte Carlo method, and this sequence is substituted into the temperature-frequency deviation characteristic curve to calculate the frequency deviation corresponding to each sampling point, including: Obtain the upper and lower limits of the adaptive sampling range, and construct a Monte Carlo random sampling search space based on the upper and lower limits; Random sampling initial points are generated within the search space. The random sampling initial points are substituted into the temperature-frequency deviation characteristic curve to calculate the initial frequency deviation. The sampling weight distribution is determined based on the initial frequency deviation. Based on the sampling weight distribution, a random sampling point sequence is generated using the Monte Carlo method. The random sampling point sequence is then substituted into the temperature-frequency deviation characteristic curve to calculate the frequency deviation corresponding to each sampling point.

[0047] The upper and lower limits of the adaptive sampling range are obtained by analyzing the temperature compensation factor variation range of the VCO circuit under different operating conditions. The processor extracts the minimum and maximum values ​​of the temperature compensation factor from historical operating data, subtracts a 10% safety margin from the minimum value to obtain the lower limit, and adds a 10% safety margin to the maximum value to obtain the upper limit. When historical data is insufficient, the processor calculates the theoretical lower and upper limits based on the temperature coefficient range given in the VCO circuit's device datasheet. The determination of the lower and upper limits also needs to consider the current ambient temperature range. A temperature sensor monitors ambient temperature changes in real time, and the sampling range boundaries are dynamically adjusted to adapt to actual operating conditions.

[0048] The Monte Carlo random sampling search space is constructed based on multi-dimensional spatial partitioning using the obtained upper and lower bounds. The search space is defined as a multi-dimensional rectangular region, where each dimension corresponds to the value range of a temperature compensation parameter. The processor evenly divides the value range of each dimension into several sub-intervals. The number of sub-intervals is determined by the required sampling precision, typically set to one hundred to one thousand. A coordinate transformation mechanism is also required during the construction of the search space to convert the physically meaningful temperature compensation parameter values ​​into standardized sampling coordinate values, ensuring consistent sampling density across different parameter dimensions.

[0049] The initial random sampling points are generated using a linear congruent random number generator to produce a uniformly distributed sequence of random numbers. The processor uses the current timestamp as a random number seed, generates random numbers between zero and one using a linear congruent algorithm, and then maps these random numbers proportionally to the value ranges of each parameter dimension. The number of initial points is set to ten times the number of dimensions of the search space to ensure that the initial sampling covers the main regions of the search space. Each initial point contains a complete combination of temperature compensation parameters, and these parameter combinations constitute the initial sampling point set.

[0050] The temperature-frequency deviation characteristic curve is calculated using a polynomial interpolation method. The characteristic curve is stored in memory as a lookup table, which records the frequency deviation data points corresponding to different temperature values. When the temperature value of a sampling point is not among the pre-stored data points, the processor uses a cubic spline interpolation algorithm to calculate the corresponding frequency deviation value. During the interpolation calculation, the processor selects four data points near the temperature value of the sampling point, constructs a cubic polynomial interpolation function, and uses this function to calculate the frequency deviation value of the sampling point. The interpolation accuracy is improved by increasing the density of the characteristic curve data points and using a higher-order interpolation algorithm.

[0051] The initial frequency deviation is calculated to determine the parameters of the sampling weight distribution. The processor statistically analyzes the frequency deviation values ​​of all initial sampling points, calculating their mean and standard deviation as the basic parameters of the weight distribution. Sampling points with smaller frequency deviations are assigned higher weight values, while those with larger frequency deviations are assigned lower weight values. The weight values ​​are calculated by taking the reciprocal of the ratio of each sampling point's frequency deviation to the minimum frequency deviation, ensuring that high-quality sampling points receive more sampling opportunities. The weight distribution also needs to be normalized so that the sum of all weight values ​​equals one.

[0052] The sampling weight distribution is established using a probability density function to describe the sampling probability of each search space region. The processor calculates the weight density of each sub-interval based on the weight values ​​of the initial sampling points; regions with higher weight densities are more likely to be selected in subsequent sampling. The weight distribution function is constructed using piecewise linear interpolation, connecting discrete weights into a continuous probability density curve. To avoid over-concentration of sampling in local regions, a smoothing factor is added to the weight distribution function to ensure that all regions maintain the minimum sampling probability.

[0053] The Monte Carlo method employs importance sampling to improve sampling efficiency in generating random sampling point sequences. Instead of simple uniform random sampling, the processor generates a sequence of random numbers conforming to the sampling weight distribution. Importance sampling is achieved through the inverse transform of the cumulative distribution function. The processor calculates the cumulative distribution function of the weight distribution, generates uniform random numbers between zero and one, and obtains the coordinates of sampling points conforming to the weight distribution through the inverse transform. The length of the sampling point sequence is determined based on the required optimization accuracy, typically set to one thousand to ten thousand sampling points.

[0054] The calculation of the temperature-frequency deviation characteristic curve using a random sampling point sequence employs a batch processing approach to improve computational efficiency. The processor groups the sampling point sequence into groups of one hundred sampling points, and calculates the corresponding frequency deviation value for each group in parallel. Parallel computation is implemented using a multi-threaded processor architecture, with each thread responsible for calculating the frequency deviation for one sampling point. Intermediate results from the interpolation algorithm are reused during the calculation process to avoid repeatedly calculating interpolation coefficients for the same temperature range.

[0055] The accuracy of frequency deviation calculation is controlled through a multi-level interpolation strategy. When the distance between the sampling point temperature value and the characteristic curve data point is less than a preset threshold, linear interpolation is used directly to quickly calculate the frequency deviation. When the distance exceeds the threshold, cubic spline interpolation is used to improve the calculation accuracy. In special cases, when the sampling point is located in the boundary region of the characteristic curve, the processor uses an extrapolation algorithm to estimate the frequency deviation value. The extrapolation algorithm makes predictions based on the changing trend of data points near the boundary.

[0056] The frequency deviation of the sampling points is stored using a compressed storage format to reduce memory usage. The processor quantizes and encodes the frequency deviation values, converting floating-point values ​​into fixed-point representations, with precision loss controlled to within one-thousandth. The storage format also includes index information for the sampling points, facilitating subsequent fast lookup and comparison operations. The calculated sampling points and their frequency deviation values ​​constitute a complete set of sampling data, providing a data foundation for the subsequent selection of the optimal compensation factor. The quality control mechanism ensures the reliability of the sampling results by verifying the uniformity of the sampling point distribution and the rationality of the frequency deviation values.

[0057] In one optional implementation, the output frequency signal of the VCO circuit is compensated in real time using the optimal compensation factor, and the adaptive weight values ​​of the compensation parameters are obtained through Bayesian iterative calculation by combining the compensation effect evaluation parameters, including: The output frequency signal of the VCO circuit is compensated in real time using the optimal compensation factor to obtain the compensated output frequency signal; frequency stability analysis is performed on the compensated output frequency signal, and frequency stability and phase noise index are extracted as compensation effect evaluation parameters, which are then converted into Bayesian prior probability distributions. Based on the Bayesian prior probability distribution, initial weight values ​​for compensation parameters are set, and a mapping relationship between compensation effect evaluation parameters and weight values ​​is constructed. Bayesian iterative calculations are performed according to the mapping relationship. When the compensation effect evaluation parameter indicates an improvement in frequency performance, the weight value of the corresponding compensation parameter is increased through iterative calculation. When the compensation effect evaluation parameter indicates a decrease in frequency performance, the weight value of the corresponding compensation parameter is decreased through iterative calculation.

[0058] In the process of real-time compensation of the VCO circuit output frequency signal using the optimal compensation factor, a digital signal processor (DSP) reads the current VCO circuit output frequency signal and performs numerical calculations with the optimal compensation factor stored in non-volatile memory. The DSP uses an interpolation algorithm to retrieve the corresponding compensation coefficient from a compensation factor lookup table based on the current temperature value. This lookup table is divided into multiple intervals according to temperature range, with each interval corresponding to a specific compensation factor value. The processor multiplies the original frequency signal with the compensation factor for the corresponding temperature interval to obtain the temperature-compensated frequency signal output.

[0059] The compensated output frequency signal is sampled by a high-precision frequency counter, which uses a one-second gated measurement method to continuously record frequency values ​​over one hundred measurement cycles. The frequency stability analysis module statistically processes these one hundred frequency values ​​and calculates their standard deviation as a frequency stability index. Phase noise analysis involves inputting the compensated frequency signal into a phase noise analyzer, which scans and measures within a frequency offset range of 1 kHz to 100 kHz, extracting the phase noise power spectral density value at a frequency offset of 10 kHz as a phase noise index.

[0060] Frequency stability and phase noise metrics constitute a set of parameters for evaluating the compensation effect. These parameters are mapped to parameters of a Bayesian prior probability distribution through a preset transformation function. During the transformation, the frequency stability value is divided by a preset maximum stability threshold to obtain a normalized stability parameter, and the ratio of the phase noise value to a preset noise baseline value is used as the normalized noise parameter. The normalized stability parameter and noise parameter correspond to the shape parameter and scale parameter in the Bayesian probability distribution, respectively, forming a complete description of the prior probability distribution.

[0061] Based on the Bayesian prior probability distribution, an initial weight value is assigned to each temperature compensation parameter. The initialization process involves using the expected value of the prior probability distribution as the baseline weight, and then adjusting this baseline value according to the historical compensation effect within the current temperature range. The temperature compensation parameters include linear compensation coefficients, quadratic compensation coefficients, and cubic compensation coefficients, each corresponding to a different weight value. The mapping relationship is constructed by establishing a lookup table between the compensation effect evaluation parameters and the weight adjustment amounts. This lookup table records the weight adjustment strategies corresponding to different combinations of evaluation parameters.

[0062] During the execution of the Bayesian iterative computation, the processor periodically reads the latest compensation effect evaluation parameters and compares the current parameter values ​​with those of the previous iteration. When the frequency stability index improves compared to the previous measurement, it indicates that the current compensation parameter configuration has a positive effect, and the processor calculates the weight increment value based on the degree of improvement. The weight increment is calculated by multiplying the stability improvement ratio by a preset learning rate coefficient, which is dynamically adjusted based on the historical iteration convergence speed.

[0063] The phase noise index is evaluated in a similar manner. When the phase noise power spectral density decreases, it indicates an improvement in frequency quality, and the corresponding compensation parameter weights need to be increased accordingly. The adjustment amount of the weights is obtained by multiplying the noise improvement magnitude by the current weight value and then multiplying by an adjustment factor, which is determined based on the significance of the noise improvement. When multiple compensation parameters simultaneously produce positive effects, the processor allocates the weight increments according to the proportion of each parameter's contribution to the overall performance improvement.

[0064] When the compensation effect evaluation parameters indicate a decrease in frequency performance, the iterative algorithm performs a weight reduction operation. In cases of deteriorating frequency stability, the processor calculates the stability degradation ratio and uses this ratio as the basis for weight reduction. The weight reduction amount is determined by multiplying the degradation ratio by the current weight value and then by a penalty coefficient, which is set to twice the learning rate coefficient to ensure a rapid response to negative effects. The same processing logic is used when phase noise indicators deteriorate, calculating the weight reduction amount based on the increased noise power spectral density value.

[0065] A boundary constraint mechanism is added during the weight update process to ensure that all weight values ​​remain within a preset reasonable range. The lower limit of the weight value is set to one-tenth of the initial weight value, and the upper limit is set to ten times the initial weight value. When the calculated new weight value exceeds the boundary range, the processor automatically limits it to the boundary value and records the boundary limit event for subsequent analysis. The weight value storage adopts a double buffering mechanism. The newly calculated weight value is first written to the spare storage area, and then replaces the value in the main storage area after a consistency check.

[0066] Iterative convergence is determined by monitoring the changes in weight values ​​across multiple iterations. When the changes in all weight values ​​are less than a preset threshold for ten consecutive iterations, the algorithm considers itself to have reached convergence, pausing weight adjustments and maintaining the current weight configuration. The convergence threshold is dynamically set based on the accuracy requirements of the VCO circuit and the application scenario; higher-precision applications employ stricter convergence criteria. Intermediate results and final weight values ​​during the iteration process are recorded in a log file, providing data support for subsequent performance analysis and parameter optimization.

[0067] In one optional implementation, the compensated frequency signal is input into a digital integrator to accumulate the frequency error and generate a digital control signal, including: The frequency error between the compensated frequency signal and the ideal frequency is calculated, and the frequency error is input into a digital integrator to perform frequency error accumulation calculation. The integrator response coefficient is set based on the accumulated value of the frequency error. When the accumulated value of the frequency error exceeds a preset range, the integrator response coefficient is increased and the integration time constant is shortened. When the accumulated value of the frequency error is within a preset range, the integrator response coefficient is decreased and the integration time constant is extended, thereby realizing adaptive adjustment of the integrator response characteristics. Based on the adjusted integrator response characteristics, the frequency error accumulation operation is continuously performed to obtain the accumulated frequency error data, and the accumulated frequency error data is converted into a digital control signal.

[0068] The system receives a pre-processed and compensated frequency signal from a clock circuit, frequency synthesizer, or other frequency source. It compares this compensated frequency signal with a pre-set ideal frequency value and calculates the frequency error. For example, if the compensated frequency signal is 10.002MHz and the ideal frequency value is 10.000MHz, the frequency error is +0.002MHz, or +2kHz.

[0069] After calculating the frequency error, this error is input into the designed digital integrator, which uses a discrete-time integration algorithm to accumulate the frequency error. In the actual implementation, the system collects the frequency error value every fixed sampling period (e.g., 10 microseconds) and adds it to the integrator. The integrator is initially set to zero, and the integral value gradually accumulates and changes as the frequency error continues to be input.

[0070] To achieve adaptive adjustment of the integrator's response characteristics, the system continuously monitors the accumulated frequency error and dynamically adjusts the integrator's response coefficient accordingly. A pre-defined safe range for the accumulated frequency error is set, for example, [-50Hz·s, +50Hz·s]. When the accumulated frequency error exceeds this preset range, it indicates a significant frequency deviation, requiring rapid adjustment. In this case, the system increases the integrator's response coefficient, for example, from 0.5 to 2.0, while simultaneously shortening the integration time constant, such as from 100 milliseconds to 25 milliseconds, to accelerate the system's correction of frequency deviations.

[0071] Suppose that at a certain moment, the accumulated frequency error reaches +75 Hz·s, exceeding the preset upper limit of +50 Hz·s. Upon detecting this, the system immediately increases the integrator response coefficient from the default value of 0.5 to 2.0 and reduces the integration time constant from 100 milliseconds to 25 milliseconds. This adjustment allows the system to respond to and correct frequency deviations more quickly, rapidly bringing the frequency back to near its ideal state.

[0072] When the cumulative frequency error is detected to be within a preset range, it indicates that the frequency state is relatively stable. At this time, the system will automatically reduce the integrator response coefficient, for example, from 2.0 to 0.5, and extend the integration time constant, such as from 25 milliseconds to 100 milliseconds. This adjustment can reduce the system's over-response to transient disturbances and improve the system's stability and anti-interference capability.

[0073] In practical applications, this adaptive adjustment mechanism can be implemented using a lookup table. Based on the magnitude of the accumulated frequency error, the corresponding integrator response coefficient and time constant are retrieved from a pre-configured lookup table. For example, a lookup table containing multiple threshold points can be designed: when the accumulated frequency error is within the range of [-10Hz·s, +10Hz·s], the integrator response coefficient is 0.2, and the integration time constant is 200 milliseconds; when the accumulated frequency error is within the range of [-30Hz·s, -10Hz·s] or [+10Hz·s, +30Hz·s], the integrator response coefficient is 0.5, and the integration time constant is 100 milliseconds; when the accumulated frequency error is within the range of [-50Hz·s, -30Hz·s] or [+30Hz·s, +50Hz·s], the integrator response coefficient is 1.0, and the integration time constant is 50 milliseconds; when the accumulated frequency error is less than -50Hz·s or greater than +50Hz·s, the integrator response coefficient is 2.0, and the integration time constant is 25 milliseconds.

[0074] Based on the adjusted integrator response characteristics, the system continuously performs frequency error accumulation calculations. Within each sampling period, the system multiplies the currently sampled frequency error value by the adjusted response coefficient and then adds it to the accumulated integral value. This approach ensures that the system can adaptively adjust its response speed and stability according to the degree of frequency deviation.

[0075] After accumulation calculation, the accumulated frequency error data is obtained, representing the cumulative effect of frequency deviation over time. The system then converts this accumulated frequency error data into a digital control signal for subsequent frequency adjustment. During the conversion, the system uses a digital-to-analog conversion mapping relationship to map the accumulated frequency error data to a digital control value within an appropriate range. For example, assuming the system's digital control signal range is 0 to 4095 (12-bit precision), and the effective range of the accumulated frequency error is [-100Hz·s, +100Hz·s], a linear mapping relationship can be established: when the accumulated frequency error is -100Hz·s, the corresponding digital control signal is 0; when the accumulated frequency error is +100Hz·s, the corresponding digital control signal is 4095; and when the accumulated frequency error is 0, the corresponding digital control signal is 2048. Intermediate values ​​are calculated through linear interpolation.

[0076] The digital control signal output by the system can be directly used to drive a voltage-controlled oscillator, a digitally controlled oscillator, or other frequency regulation devices to achieve precise control of the system frequency, thereby gradually bringing the actual output frequency of the system closer to the ideal frequency value. The entire control process of the system forms a closed-loop feedback system, which effectively improves the dynamic response capability and steady-state accuracy of the system through the adjustment action of the adaptive integrator.

[0077] A second aspect of the present invention provides a VCO digital circuit control system with temperature compensation, comprising: The first unit is used to acquire the output frequency signal of the VCO circuit and the corresponding real-time temperature data, and compare the output frequency signal with a preset standard frequency to obtain the initial frequency deviation value. The second unit is used to calculate the temperature compensation coefficient of the VCO circuit based on the output frequency signal, use the temperature compensation coefficient to correct the initial frequency deviation value, obtain the actual frequency deviation, and establish a correspondence between the actual frequency deviation and the real-time temperature data to generate a temperature-frequency deviation characteristic curve. The third unit is used to perform multiple random samplings of the temperature compensation factor based on the temperature-frequency deviation characteristic curve using the Monte Carlo method, calculate the frequency deviation corresponding to each sampling point, and select the temperature compensation factor with the smallest frequency deviation as the optimal compensation factor. The fourth unit is used to perform real-time compensation of the output frequency signal of the VCO circuit using the optimal compensation factor, and to obtain the adaptive weight value of the compensation parameter through Bayesian iteration by combining the compensation effect evaluation parameters. The optimal compensation factor is dynamically adjusted according to the adaptive weight value. The compensated frequency signal is input into a digital integrator to accumulate the frequency error, generate a digital control signal and output it to the VCO circuit to complete the frequency calibration.

[0078] A third aspect of the present invention provides an electronic device, comprising: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.

[0079] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.

[0080] This invention can be a method, apparatus, system, and / or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of the invention.

[0081] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A digital circuit control method for a VCO with temperature compensation, characterized in that, include: The output frequency signal of the VCO circuit and the corresponding real-time temperature data are obtained, and the output frequency signal is compared with a preset standard frequency to obtain the initial frequency deviation value. The temperature compensation coefficient of the VCO circuit is calculated based on the output frequency signal. The initial frequency deviation value is corrected using the temperature compensation coefficient to obtain the actual frequency deviation. The actual frequency deviation is then correlated with the real-time temperature data to generate a temperature-frequency deviation characteristic curve. Based on the temperature-frequency deviation characteristic curve, the temperature compensation factor is randomly sampled multiple times using the Monte Carlo method, the frequency deviation corresponding to each sampling point is calculated, and the temperature compensation factor with the smallest frequency deviation is selected as the optimal compensation factor. The output frequency signal of the VCO circuit is compensated in real time using the optimal compensation factor. Combined with the compensation effect evaluation parameters, the adaptive weight value of the compensation parameter is obtained through Bayesian iteration. The optimal compensation factor is dynamically adjusted according to the adaptive weight value. The compensated frequency signal is input into a digital integrator to accumulate the frequency error, generate a digital control signal, and output it to the VCO circuit to complete the frequency calibration.

2. The method according to claim 1, characterized in that, The temperature compensation coefficient of the VCO circuit is calculated based on the output frequency signal. The initial frequency deviation value is corrected using the temperature compensation coefficient to obtain the actual frequency deviation. A correspondence is established between the actual frequency deviation and the real-time temperature data to generate a temperature-frequency deviation characteristic curve, including: Calculate the temperature change at adjacent sampling times and establish a temperature change trend curve based on the temperature change; calculate the temperature compensation coefficient using a piecewise linear interpolation method based on the amplitude and phase information of the output frequency signal and the temperature change trend curve. The initial frequency deviation value is weighted and corrected using the temperature compensation coefficient to obtain the actual frequency deviation, and the offset of the actual frequency deviation is calculated. The temperature compensation coefficient is corrected according to the offset, and the corrected actual frequency deviation is paired with the real-time temperature data. A temperature-frequency deviation characteristic curve is constructed using cubic spline interpolation.

3. The method according to claim 1, characterized in that, Based on the temperature-frequency deviation characteristic curve, the temperature compensation factor is randomly sampled multiple times using the Monte Carlo method. The frequency deviation corresponding to each sampling point is calculated, and the temperature compensation factor with the smallest frequency deviation is selected as the optimal compensation factor. The temperature change rate is calculated based on the temperature-frequency deviation characteristic curve, and the step size for dividing the temperature change interval is determined according to the temperature change rate to generate a temperature compensation interval sequence; the adaptive sampling range of the temperature compensation factor is divided according to the temperature compensation interval sequence. Within the adaptive sampling range, a random sampling point sequence is generated using the Monte Carlo method, and the random sampling point sequence is substituted into the temperature-frequency deviation characteristic curve to calculate the frequency deviation corresponding to each sampling point. The temperature compensation factor with the smallest frequency deviation is selected as the candidate compensation factor. A dynamic search window is constructed with the candidate compensation factor as the center value. Monte Carlo random sampling is re-executed within the dynamic search window. The temperature change rate is converted into a sampling weight coefficient. The sampling points are weighted. The temperature compensation factor with the smallest frequency deviation is selected from the weighted sampling results as the optimal compensation factor.

4. The method according to claim 3, characterized in that, Within the adaptive sampling range, a sequence of random sampling points is generated using the Monte Carlo method. This sequence is then substituted into the temperature-frequency deviation characteristic curve to calculate the frequency deviation corresponding to each sampling point, including: Obtain the upper and lower limits of the adaptive sampling range, and construct a Monte Carlo random sampling search space based on the upper and lower limits; Random sampling initial points are generated within the search space. The random sampling initial points are substituted into the temperature-frequency deviation characteristic curve to calculate the initial frequency deviation. The sampling weight distribution is determined based on the initial frequency deviation. Based on the sampling weight distribution, a random sampling point sequence is generated using the Monte Carlo method. The random sampling point sequence is then substituted into the temperature-frequency deviation characteristic curve to calculate the frequency deviation corresponding to each sampling point.

5. The method according to claim 1, characterized in that, The output frequency signal of the VCO circuit is compensated in real time using the optimal compensation factor, and the adaptive weight values ​​of the compensation parameters are obtained through Bayesian iteration calculation by combining the compensation effect evaluation parameters. The output frequency signal of the VCO circuit is compensated in real time using the optimal compensation factor to obtain the compensated output frequency signal; frequency stability analysis is performed on the compensated output frequency signal, and frequency stability and phase noise index are extracted as compensation effect evaluation parameters, which are then converted into Bayesian prior probability distributions. Based on the Bayesian prior probability distribution, initial weight values ​​for compensation parameters are set, and a mapping relationship between compensation effect evaluation parameters and weight values ​​is constructed. Bayesian iterative calculations are performed according to the mapping relationship. When the compensation effect evaluation parameter indicates an improvement in frequency performance, the weight value of the corresponding compensation parameter is increased through iterative calculation. When the compensation effect evaluation parameter indicates a decrease in frequency performance, the weight value of the corresponding compensation parameter is decreased through iterative calculation.

6. The method according to claim 1, characterized in that, The compensated frequency signal is input into a digital integrator to accumulate the frequency error and generate digital control signals, including: The frequency error between the compensated frequency signal and the ideal frequency is calculated, and the frequency error is input into a digital integrator to perform frequency error accumulation calculation. The integrator response coefficient is set based on the accumulated value of the frequency error. When the accumulated value of the frequency error exceeds a preset range, the integrator response coefficient is increased and the integration time constant is shortened. When the accumulated value of the frequency error is within a preset range, the integrator response coefficient is decreased and the integration time constant is extended, thereby realizing adaptive adjustment of the integrator response characteristics. Based on the adjusted integrator response characteristics, the frequency error accumulation operation is continuously performed to obtain the accumulated frequency error data, and the accumulated frequency error data is converted into a digital control signal.

7. A VCO digital circuit control system with temperature compensation, used to implement the method of any one of claims 1-6, characterized in that, include: The first unit is used to acquire the output frequency signal of the VCO circuit and the corresponding real-time temperature data, and compare the output frequency signal with a preset standard frequency to obtain the initial frequency deviation value. The second unit is used to calculate the temperature compensation coefficient of the VCO circuit based on the output frequency signal, use the temperature compensation coefficient to correct the initial frequency deviation value, obtain the actual frequency deviation, and establish a correspondence between the actual frequency deviation and the real-time temperature data to generate a temperature-frequency deviation characteristic curve. The third unit is used to perform multiple random samplings of the temperature compensation factor based on the temperature-frequency deviation characteristic curve using the Monte Carlo method, calculate the frequency deviation corresponding to each sampling point, and select the temperature compensation factor with the smallest frequency deviation as the optimal compensation factor. The fourth unit is used to perform real-time compensation of the output frequency signal of the VCO circuit using the optimal compensation factor, and to obtain the adaptive weight value of the compensation parameter through Bayesian iteration by combining the compensation effect evaluation parameters. The optimal compensation factor is dynamically adjusted according to the adaptive weight value. The compensated frequency signal is input into a digital integrator to accumulate the frequency error, generate a digital control signal and output it to the VCO circuit to complete the frequency calibration.

8. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Dynamic response compensation system of temperature compensation crystal oscillator

    CN117375531A

  • Intelligent monitor temperature drift correction method and system based on temperature compensation algorithm

    CN120369024A

  • Cross-device clock correction method supporting accurate synchronization of meters

    CN120658344A

  • Power factor correction method and system for AC-DC conversion of server power supply

    CN120811110A

  • Method for manufacturing piezoelectric oscillator, and piezoelectric oscillator

    JP2011142444A

Cited By

  • Temperature control system and method

    CN121455255A

  • Microwave component performance adaptive scheduling method and system

    CN121690241A