VCO digital circuit control method and system with temperature compensation

By combining Monte Carlo and Bayesian iterative methods, the temperature compensation of the VCO circuit is optimized, the problem of VCO frequency drift is solved, and high-precision, adaptive frequency calibration is achieved, which is suitable for high-precision communication systems and precision instruments.

CN121000221BActive Publication Date: 2026-01-09ZHEJIANG FANSHUANG TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511525551.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-24
Publication Date
2026-01-09
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, cannot perform personalized compensation for the differences in characteristics of different batches of devices, and cannot meet the requirements of high-precision frequency control.

Method used

The Monte Carlo method is used to perform multiple random samplings to calculate the temperature compensation factor. Combined with Bayesian iteration, the adaptive weight value is calculated. A digital control signal is generated through a digital integrator to achieve frequency calibration. The temperature-frequency deviation characteristic curve is constructed, and piecewise linear interpolation and cubic spline interpolation are performed to optimize the compensation parameters.

Benefits of technology

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

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121000221B_ABST
    Figure CN121000221B_ABST
Patent Text Reader

Abstract

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

Description

TECHNICAL FIELD

[0001] The present application relates to circuit control technology, and in particular to a VCO digital circuit control method and system with temperature compensation. BACKGROUND

[0002] In modern communication systems and timing control circuits, voltage-controlled oscillators (VCOs) are 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 performance of the system. With the development of integrated circuit technology and the increasing demand for frequency accuracy in terminal equipment, 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 at different ambient temperatures, which seriously affects the reliability and stability of the system.

[0003] Traditional VCO temperature compensation methods mainly use analog circuit design methods, using thermistors, varactor diodes and other devices to form a temperature compensation network to offset the effects of temperature changes on frequency. With the development of digital technology, digital-controlled VCO temperature compensation methods have gradually become a research hotspot, with advantages such as high precision and good flexibility. Current digital VCO temperature compensation techniques usually use lookup table methods or simple linear fitting methods to achieve temperature compensation, but these methods have many limitations in practical applications.

[0004] The defects and deficiencies of the prior art mainly manifest in the following aspects: first, the traditional temperature compensation method lacks adaptive ability and cannot effectively cope with the characteristic drift of the VCO circuit caused by aging or environmental changes during long-term use, and the compensation accuracy decreases over time. Second, most existing compensation algorithms use linear or simple polynomial fitting, which cannot accurately describe the nonlinear frequency drift characteristics of the VCO over the full temperature range, resulting in unsatisfactory compensation at temperature extreme points. Third, the existing technology lacks accurate modeling and optimization methods for the temperature-frequency relationship of the VCO, and the determination of compensation parameters relies mainly on empirical values or simple measurements, which cannot provide personalized compensation for the characteristic differences of different batches of VCO devices, and cannot meet the demand for high-precision frequency control. SUMMARY

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

[0006] In a first aspect, the embodiment of the present application provides a VCO digital circuit control method with temperature compensation, comprising:

[0007] Obtaining an output frequency signal of a VCO circuit and corresponding real-time temperature data, comparing the output frequency signal with a preset standard frequency to obtain an initial frequency deviation value;

[0008] Calculating a temperature compensation coefficient of the VCO circuit based on the output frequency signal, correcting the initial frequency deviation value by using the temperature compensation coefficient to obtain an actual frequency deviation, and establishing a corresponding relationship between the actual frequency deviation and the real-time temperature data to generate a temperature-frequency deviation characteristic curve;

[0009] According to the temperature-frequency deviation characteristic curve, a temperature compensation factor is randomly sampled multiple times by a Monte Carlo method, a frequency deviation corresponding to each sampling point is calculated, and a temperature compensation factor with the minimum frequency deviation is selected as an optimal compensation factor;

[0010] The optimal compensation factor is used to perform real-time compensation on the output frequency signal of the VCO circuit, and an adaptive weight value of a compensation parameter is calculated by a Bayesian iteration based on a compensation effect evaluation parameter and a dynamic adjustment of the optimal compensation factor is performed according to the adaptive weight value. The compensated frequency signal is input into a digital integrator to perform cumulative operation on the frequency error, a digital control signal is generated and output to the VCO circuit, and frequency calibration is completed.

[0011] Calculating a temperature compensation coefficient of the VCO circuit based on the output frequency signal, correcting the initial frequency deviation value by using the temperature compensation coefficient to obtain an actual frequency deviation, and establishing a corresponding relationship between the actual frequency deviation and the real-time temperature data to generate a temperature-frequency deviation characteristic curve includes:

[0012] The temperature change amount at adjacent sampling time points is calculated, and a temperature change trend curve is established based on the temperature change amount; according to the amplitude and phase information of the output frequency signal, the temperature change trend curve is combined to calculate the temperature compensation coefficient by using a piecewise linear interpolation method;

[0013] The temperature compensation coefficient is used to weight and correct the initial frequency deviation value to obtain an actual frequency deviation, and the offset amount of the actual frequency deviation is calculated; the temperature compensation coefficient is corrected according to the offset amount, the corrected actual frequency deviation is paired with the real-time temperature data, and a temperature-frequency deviation characteristic curve is constructed by using a cubic spline interpolation method.

[0014] According to the temperature-frequency deviation characteristic curve, a temperature compensation factor is randomly sampled multiple times by a Monte Carlo method, a frequency deviation corresponding to each sampling point is calculated, and a temperature compensation factor with the minimum frequency deviation is selected as an optimal compensation factor includes:

[0015] Calculate a temperature change rate based on the temperature-frequency deviation characteristic curve, and determine a division step of a temperature change interval according to the temperature change rate to generate a temperature compensation interval sequence; and divide an adaptive sampling range of a temperature compensation factor according to the temperature compensation interval sequence;

[0016] In the adaptive sampling range, a random sampling point sequence is generated by a Monte Carlo method, and the random sampling point sequence is substituted into the temperature-frequency deviation characteristic curve to calculate a frequency deviation corresponding to each sampling point, and a temperature compensation factor with the minimum frequency deviation is selected as a candidate compensation factor;

[0017] A dynamic search window is constructed with the candidate compensation factor as a center value, Monte Carlo random sampling is re-executed in the dynamic search window, the temperature change rate is converted into a sampling weight coefficient, and a sampling point is weighted, and a temperature compensation factor with the minimum frequency deviation is selected from the weighted sampling result as an optimal compensation factor.

[0018] In the adaptive sampling range, a random sampling point sequence is generated by a Monte Carlo method, and the random sampling point sequence is substituted into the temperature-frequency deviation characteristic curve to calculate a frequency deviation corresponding to each sampling point, and a temperature compensation factor with the minimum frequency deviation is selected as a candidate compensation factor;

[0019] Upper and lower limit values of the adaptive sampling range are obtained, and a search space of Monte Carlo random sampling is constructed based on the upper and lower limit values;

[0020] A random sampling initial point is generated in the search space, the random sampling initial point is substituted into the temperature-frequency deviation characteristic curve to calculate an initial frequency deviation, and a sampling weight distribution is determined according to the initial frequency deviation;

[0021] A random sampling point sequence is generated by a Monte Carlo method based on the sampling weight distribution, and the random sampling point sequence is substituted into the temperature-frequency deviation characteristic curve to calculate a frequency deviation corresponding to each sampling point.

[0022] The optimal compensation factor is used for real-time compensation of an output frequency signal of the VCO circuit, and an adaptive weight value of a compensation parameter is calculated through Bayesian iteration combined with a compensation effect evaluation parameter, and the adaptive weight value of the compensation parameter includes:

[0023] The optimal compensation factor is used for real-time compensation of an output frequency signal of the VCO circuit, and a compensated output frequency signal is obtained; frequency stability analysis is performed on the compensated output frequency signal, and a frequency stability and a phase noise index are extracted as a compensation effect evaluation parameter, and the compensation effect evaluation parameter is converted into a Bayesian prior probability distribution;

[0024] An initial weight value of a compensation parameter is set based on the Bayesian prior probability distribution, a mapping relationship between a compensation effect evaluation parameter and the weight value is constructed, Bayesian iteration operation is performed according to the mapping relationship, when the compensation effect evaluation parameter indicates that the frequency performance is improved, the weight value of the corresponding compensation parameter is improved through iteration calculation, and when the compensation effect evaluation parameter indicates that the frequency performance is reduced, the weight value of the corresponding compensation parameter is reduced through iteration calculation.

[0025] The compensated frequency signal is input into a digital integrator, frequency error accumulation operation is performed on the frequency error, and a digital control signal is generated.

[0026] The frequency error between the compensated frequency signal and an ideal frequency is calculated, the frequency error is input into a digital integrator, frequency error accumulation operation is performed, an integrator response coefficient is set based on the accumulated value of the frequency error, the integrator response coefficient is increased and the integration time constant is shortened when the frequency error accumulation value exceeds a preset range, the integrator response coefficient is reduced and the integration time constant is lengthened when the frequency error accumulation value is within the preset range, and adaptive adjustment of the integrator response characteristic is realized.

[0027] Frequency error accumulation operation is continuously performed according to the adjusted integrator response characteristic, accumulated frequency error data is obtained, and the accumulated frequency error data is converted into a digital control signal.

[0028] In a second aspect of the embodiment of the present application, a VCO digital circuit control system with temperature compensation is provided, which comprises:

[0029] A first unit is configured to obtain an output frequency signal of a VCO circuit and corresponding real-time temperature data, compare the output frequency signal with a preset standard frequency, and obtain an initial frequency deviation value;

[0030] A second unit is configured to calculate a temperature compensation coefficient of the VCO circuit based on the output frequency signal, correct the initial frequency deviation value by using the temperature compensation coefficient, obtain an actual frequency deviation, and establish a corresponding relationship between the actual frequency deviation and the real-time temperature data to generate a temperature-frequency deviation characteristic curve;

[0031] A third unit is configured to perform multiple random samplings on a temperature compensation factor by using a Monte Carlo method according to the temperature-frequency deviation characteristic curve, calculate a frequency deviation corresponding to each sampling point, and select a temperature compensation factor with the minimum frequency deviation as an optimal compensation factor.

[0032] A fourth unit is configured to compensate the output frequency signal of the VCO circuit in real time by using the optimal compensation factor, and to dynamically adjust the optimal compensation factor according to an adaptive weight value of the compensation parameter calculated by Bayesian iteration in combination with a compensation effect evaluation parameter; and to input the compensated frequency signal into a digital integrator, accumulate the frequency error, generate a digital control signal and output the digital control signal to the VCO circuit, thereby completing frequency calibration.

[0033] In a third aspect, the present application provides an electronic device, comprising:

[0034] a processor;

[0035] a memory for storing processor-executable instructions;

[0036] The processor is configured to invoke the instructions stored in the memory to execute the method described above.

[0037] In a fourth aspect, the present application provides a computer-readable storage medium having computer program instructions stored thereon, wherein the computer program instructions are executed by a processor to implement the method described above.

[0038] The present application has the following advantages:

[0039] The VCO digital circuit control method with temperature compensation provided by the present application can accurately capture the frequency drift characteristics of the VCO circuit at different temperatures, establish a dynamic mapping relationship between temperature and frequency deviation, and thus realize real-time correction of the frequency output.

[0040] The present application combines Monte Carlo random sampling and Bayesian iteration, thereby improving the accuracy of temperature compensation, and enabling the system to have adaptive adjustment capability, automatically optimizing the compensation parameter according to the actual working environment, effectively reducing the influence of frequency drift on system performance, and enhancing the stability of the VCO circuit in complex environments.

[0041] In addition, the present application uses a digital integrator to accumulate the frequency error and generate a digital control signal, thereby simplifying the circuit structure, reducing power consumption, improving the response speed of the system to temperature changes, and enabling the VCO circuit to maintain high frequency accuracy and stability in a wide temperature range, and is particularly suitable for communication systems and precision instruments and equipment with high requirements for frequency stability. BRIEF DESCRIPTION OF DRAWINGS

[0042] Figure 1 FIG. 1 is a flowchart of the VCO digital circuit control method with temperature compensation according to an embodiment of the present application;

[0043] Figure 2A flowchart of a temperature compensation factor search process for an embodiment of the present application. DETAILED DESCRIPTION

[0044] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0045] The technical solutions of the present application will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes can not be described in some embodiments.

[0046] Figure 1 A flowchart of a VCO digital circuit control method with temperature compensation for an embodiment of the present application is shown in FIG. 1, which includes the following steps. Figure 1

[0047] An output frequency signal of a VCO circuit and corresponding real-time temperature data are obtained, the output frequency signal is compared with a preset standard frequency, and an initial frequency deviation value is obtained;

[0048] A temperature compensation coefficient of the VCO circuit is calculated based on the output frequency signal, the initial frequency deviation value is corrected by using the temperature compensation coefficient, an actual frequency deviation is obtained, a corresponding relationship between the actual frequency deviation and the real-time temperature data is established, and a temperature-frequency deviation characteristic curve is generated;

[0049] According to the temperature-frequency deviation characteristic curve, a temperature compensation factor is randomly sampled multiple times by a Monte Carlo method, a frequency deviation corresponding to each sampling point is calculated, and the temperature compensation factor with the minimum frequency deviation is selected as an optimal compensation factor;

[0050] The output frequency signal of the VCO circuit is compensated in real time by using the optimal compensation factor, an adaptive weight value of a compensation parameter is calculated by a Bayesian iteration based on a compensation effect evaluation parameter and a dynamic adjustment of the optimal compensation factor is performed according to the adaptive weight value, the frequency signal after compensation is input into a digital integrator, a frequency error is accumulated and operated, a digital control signal is generated and output to the VCO circuit, and frequency calibration is completed.

[0051] ​In an alternative embodiment, a temperature compensation coefficient of the VCO circuit is calculated based on the output frequency signal, the initial frequency deviation value is corrected by using the temperature compensation coefficient to obtain an actual frequency deviation, and a temperature-frequency deviation characteristic curve is generated by establishing a corresponding relationship between the actual frequency deviation and the real-time temperature data, including:

[0052] A temperature change amount at a neighboring sampling time is calculated, and a temperature change trend curve is established based on the temperature change amount; a temperature compensation coefficient is calculated by using a piecewise linear interpolation method according to amplitude and phase information of the output frequency signal and in combination with the temperature change trend curve;

[0053] The initial frequency deviation value is weighted and corrected by using the temperature compensation coefficient to obtain an actual frequency deviation, and a deviation amount of the actual frequency deviation is calculated; the temperature compensation coefficient is corrected according to the deviation amount, the actual frequency deviation after correction is paired with the real-time temperature data, and a temperature-frequency deviation characteristic curve is constructed by using a cubic spline interpolation method.

[0054] The calculation of the temperature change amount at the neighboring sampling time is obtained by a difference value of continuous reading of the digital temperature sensor. The processor reads the temperature sensor value at a fixed time interval, and the time interval is set to one second to ten seconds, and the specific value is determined according to the thermal response speed of the VCO circuit. The processor subtracts the temperature value at the previous sampling time from the temperature value at the current sampling time to obtain the temperature change amount value. In order to reduce the influence of measurement noise, the processor performs sliding average filtering processing on the temperature change amount for five times, and the filtered value is used as the effective temperature change amount. When the absolute value of the temperature change amount is less than the sensor accuracy threshold, the processor sets the change amount to zero to avoid the interference of small noise on subsequent calculation.

[0055] The temperature change trend curve is established by using a time series analysis method to process historical temperature change data. The processor collects temperature change amount data within the last one hour, and arranges these data in time sequence to form a change sequence. The trend curve is obtained by least square fitting, and a quadratic polynomial is selected as a basic function in the fitting process, which can well describe the slow change and mutation of the temperature. The parameters of the fitting curve include a linear term coefficient, a quadratic term coefficient and a constant term, which are obtained by matrix operation method. The processor also calculates the root mean square error between the fitting curve and the actual data points, and automatically adjusts the order of the fitting function or reselects the fitting time window when the error exceeds a preset threshold.

[0056] The amplitude information of the VCO output frequency signal is extracted by digital signal processing technology. The processor converts the analog frequency signal into a digital signal through a high-speed analog-to-digital converter, and the sampling frequency is set to be more than ten times the signal frequency to ensure signal integrity. The amplitude extraction uses the fast Fourier transform algorithm, and the processor performs Fourier transform on the time-domain signal obtained by sampling to find the amplitude corresponding to the main frequency component in the frequency domain. To improve the accuracy of amplitude measurement, the processor uses window function technology to reduce spectral leakage. Commonly used window functions include the Hamming window and the Blackman window. The amplitude information is expressed in decibels, which is obtained by taking the logarithm of the linear amplitude and multiplying it by twenty.

[0057] The extraction of phase information is achieved through a phase detector and a digital phase-locked loop. The phase detector compares the VCO output signal with the reference clock signal and outputs a voltage signal proportional to the phase difference. This voltage signal is converted into digital phase information by an analog-to-digital converter, and the phase accuracy reaches the degree level. The digital phase-locked loop filters the phase information to remove high-frequency noise and phase jitter, and outputs stable phase data. The time reference of the phase information is provided by a high-precision crystal oscillator to ensure the long-term stability of the phase measurement. The processor converts the phase information into radians for subsequent calculations.

[0058] The calculation of the temperature compensation coefficient is combined with the amplitude, phase information of the frequency signal and the temperature change trend curve. The processor establishes a three-dimensional lookup table, which records the reference value of the compensation coefficient corresponding to different amplitude, phase and temperature change rate combinations. When the actual measurement value is not on the nodes of the lookup table, the processor uses the piecewise linear interpolation method to calculate the corresponding compensation coefficient.

[0059] In the piecewise linear interpolation process, the processor finds the smallest cube that encloses the target point, and the eight vertices of the cube correspond to the eight data points in the lookup table. The processor performs three-dimensional linear interpolation on the eight data points, and the calculation process consists of three steps: four one-dimensional interpolations along one coordinate axis to obtain four intermediate values, two one-dimensional interpolations along the second coordinate axis to obtain two intermediate values, and one interpolation along the third coordinate axis to obtain the final compensation coefficient.

[0060] The weighted correction of the initial frequency deviation value adopts an adaptive weight distribution strategy. The processor determines a weight value according to the reliability of the temperature compensation coefficient, which is evaluated by comparing the similarity between the current working condition and the historical calibration condition. When the working condition is highly similar to the calibration condition, the weight of the temperature compensation coefficient is set to a value close to one; when the similarity is lower, the weight is correspondingly reduced. The calculation of the weighted correction is achieved 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 influence of the temperature change rate on the compensation effect and appropriately reduces the weight of the compensation coefficient when the temperature changes rapidly to avoid oscillation phenomena caused by excessive compensation.

[0061] The calculation of the actual frequency deviation offset is obtained by comparing the actual frequency deviation value with the theoretical frequency deviation value, which is calculated according to the temperature coefficient specification of the VCO circuit and the current temperature condition. This value represents the frequency deviation that should be achieved under ideal compensation conditions. The processor subtracts the actual frequency deviation value from the theoretical frequency deviation value to obtain the offset value. The sign of the offset indicates the direction of compensation, with a positive value indicating insufficient compensation and a negative value indicating excessive compensation. The size of the offset reflects the compensation accuracy, with a smaller offset indicating better compensation effect. The processor statistically analyzes the offsets measured multiple times in succession to calculate the mean and standard deviation of the offsets for evaluating the stability of the compensation algorithm.

[0062] The correction of the temperature compensation coefficient is achieved 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 a parameter table. When the offset is positive, the processor increases the value of the temperature compensation coefficient to strengthen the compensation effect; when the offset is negative, the compensation coefficient is reduced to avoid excessive compensation. The size of the adjustment amount is proportional to the size of the offset, and the proportional coefficient is determined according to the response characteristics of the VCO circuit. The correction process adopts a gradual adjustment strategy, with the adjustment amplitude limited to within five percent of the current compensation coefficient to ensure the stability of the adjustment process.

[0063] The pairing process of the actual frequency deviation and real-time temperature data establishes a time synchronization mechanism to ensure the consistency of the data. The processor adds precise time stamps to each frequency deviation measurement value and temperature measurement value, with a time stamp accuracy of milliseconds. When pairing the data, the processor selects the frequency deviation value and temperature value with the closest time stamps for pairing, and the data pairs with a time difference exceeding the preset threshold are marked as invalid and excluded. The 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 eliminate data points that are significantly deviated from the normal range.

[0064] The process of constructing the temperature-frequency deviation characteristic curve by cubic spline interpolation method adopts natural boundary condition. The processor takes the sorted temperature-frequency deviation data points as interpolation nodes, and constructs a cubic polynomial function between adjacent nodes. Each cubic polynomial contains four undetermined coefficients, which are determined by the function value continuity, first-order derivative continuity and second-order derivative continuity conditions at the nodes. The boundary condition is set to zero second-order derivative at both ends of the curve, i.e. natural spline condition.

[0065] The interpolation calculation adopts the chasing method to solve the three-diagonal linear equation set, which has high calculation efficiency and good numerical stability. The constructed characteristic curve can calculate the corresponding frequency deviation value at any temperature point, and the interpolation accuracy is better than that of the linear interpolation method. The processor stores the parameters of the characteristic curve in the non-volatile memory for subsequent frequency compensation calculation.

[0066] In an optional implementation, according to the temperature-frequency deviation characteristic curve, a plurality of random sampling points of the temperature compensation factor are calculated by 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:

[0067] Based on the temperature-frequency deviation characteristic curve, the temperature change rate is calculated, and the division step of the temperature change interval is determined according to the temperature change rate to generate a temperature compensation interval sequence; and the adaptive sampling range of the temperature compensation factor is divided according to the temperature compensation interval sequence;

[0068] In the adaptive sampling range, a random sampling point sequence is generated by 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;

[0069] A dynamic search window is constructed with the candidate compensation factor as the center value, Monte Carlo random sampling is re-executed in the dynamic search window, the temperature change rate is converted into a sampling weight coefficient, the sampling points are weighted, and the temperature compensation factor with the smallest frequency deviation is selected from the weighted sampling results as the optimal compensation factor.

[0070] As shown in Figure 2 The method includes:

[0071] After obtaining the temperature-frequency deviation characteristic curve, in order to accurately divide the temperature compensation interval, the temperature change rate is calculated. Specifically, the frequency deviation change amount between adjacent temperature points on the temperature-frequency deviation characteristic curve can be divided by the temperature change amount 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, a data point is collected every 5°C, and 25 temperature change rate values can be calculated. For example, when the temperature rises from -40°C to -35°C, if the frequency deviation changes from -32ppm to -29ppm, the temperature change rate of this interval is ((-29)-(-32)) / ((-35)-(-40)) = 3 / 5 = 0.6ppm / °C.

[0072] According to the calculated temperature change rate, the division step of the temperature change interval is determined. In the area with larger temperature change rate, a smaller step is used; in the area with smaller temperature change rate, a larger step is used. For example, when the absolute value of the temperature change rate is greater than 1 ppm / °C, the step is set to 2°C; when the absolute value of the temperature change rate is between 0.5 ppm / °C and 1 ppm / °C, the step is set to 3°C; when the absolute value of the temperature change rate is less than 0.5 ppm / °C, the step is set to 5°C. Based on these steps, the system generates a temperature compensation interval sequence, such as [-40°C, -38°C], [-38°C, -35°C], [-35°C, -32°C], etc.

[0073] According to the temperature compensation interval sequence, the adaptive sampling range of the temperature compensation factor is divided. For each temperature compensation interval, based on the frequency deviation change range in the interval, the corresponding compensation factor sampling range is determined. For example, if the frequency deviation range in 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 of this interval can be set to [28ppm, 34ppm]. This approach ensures that the sampling range matches the actual required compensation amount.

[0074] After determining the adaptive sampling range, a random sampling point sequence is generated using the Monte Carlo method. For example, for an interval with 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.

[0075] The random generated sampling points are substituted into the temperature-frequency deviation characteristic curve to calculate the frequency deviation corresponding to each sampling point. The calculation method is to add the original frequency deviation and the compensation factor value to obtain the compensated frequency deviation. For example, if the original frequency deviation is -32 ppm at -40°C, and the compensation factor is 31.45 ppm, then the compensated frequency deviation is -32 ppm + 31.45 ppm = -0.55 ppm. The system performs such calculations for all sampling points and calculates the average or maximum value of the absolute value of the frequency deviation of each compensation factor within the entire temperature range. By comparison, the system selects the temperature compensation factor with the smallest frequency deviation index as the candidate compensation factor. Suppose that in the first round of sampling, the system determines the candidate compensation factor to be 31.45 ppm.

[0076] To further optimize the compensation effect, a dynamic search window is constructed with the candidate compensation factor 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.

[0077] In this round of sampling, the temperature change rate is converted into a sampling weight coefficient, and the sampling points are weighted. Specifically, the greater the temperature change rate in a region, the greater the weight 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 weight value of 6. When calculating the frequency deviation index, the system multiplies the frequency deviation of each temperature point by the corresponding weight coefficient and then sums or takes the maximum value.

[0078] Through this weighting process, more attention can be paid to the compensation effect of temperature-sensitive regions. From the weighted sampling results, the system selects the temperature compensation factor with the smallest frequency deviation index as the final optimal compensation factor. For example, after weighted calculation, the optimal compensation factor is determined to be 31.72 ppm.

[0079] In practical applications, this method is verified in an actual crystal oscillator temperature compensation circuit with a working temperature range of -40°C to 85°C and an original frequency deviation varying by about 64 ppm within the entire temperature range. The optimal compensation factor calculated by this method is 31.72 ppm, and after applying this compensation factor, the maximum frequency deviation within the entire temperature range is reduced from 32 ppm to 3.2 ppm, and the average deviation is reduced from 15 ppm to 1.5 ppm, effectively improving the temperature stability of the system.

[0080] The embodiment realizes accurate optimization of the temperature compensation factor by combining Monte Carlo method with adaptive sampling and weighting processing technology, and can be widely applied in electronic devices requiring high-precision temperature compensation, such as communication devices, navigation systems, precision instruments and the like. The method not only improves the compensation precision, but also has good robustness due to the random sampling, and can adapt to different forms of temperature-frequency deviation characteristic curves.

[0081] In an optional embodiment, a random sampling point sequence is generated by Monte Carlo method in the adaptive sampling range, 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.

[0082] Upper and lower limit values of the adaptive sampling range are obtained, and a search space of Monte Carlo random sampling is constructed based on the upper and lower limit values;

[0083] A random sampling initial point is generated in the search space, the random sampling initial point is substituted into the temperature-frequency deviation characteristic curve to calculate an initial frequency deviation, and a sampling weight distribution is determined according to the initial frequency deviation;

[0084] A random sampling point sequence is generated by Monte Carlo method based on the sampling weight distribution, 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.

[0085] The upper and lower limit values of the adaptive sampling range are obtained by analyzing the temperature compensation factor variation interval of the VCO circuit under different working conditions. The processor extracts the minimum value and the maximum value of the temperature compensation factor from the historical running data, subtracts ten percent of the safety margin from the minimum value as the lower limit value, and adds ten percent of the safety margin to the maximum value as the upper limit value. When the historical data is insufficient, the processor calculates the theoretical upper and lower limit values according to the temperature coefficient range given in the device specification of the VCO circuit. The determination of the lower limit value and the upper limit value also needs to consider the current environmental temperature range, and the environmental temperature change is monitored in real time by the temperature sensor to dynamically adjust the sampling range boundary to adapt to the actual working conditions.

[0086] The construction of the search space of Monte Carlo random sampling is based on the obtained upper and lower limit values for multi-dimensional space division. 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 uniformly divides the value range of each dimension into a plurality of subintervals, and the number of subintervals is determined according to the required sampling accuracy, which is usually set to one hundred to one thousand subintervals. A coordinate conversion mechanism needs to be established during the construction of the search space to convert the temperature compensation parameter values with physical meaning into standardized sampling coordinate values, so as to ensure that the sampling density between different parameter dimensions remains consistent.

[0087] The generation of random initial points uses a linear congruential random number generator to generate a uniformly distributed sequence of random numbers. The processor uses the current timestamp as a random number seed to generate random numbers between zero and one through the linear congruential algorithm, and then maps these random numbers to the value range of each parameter dimension in proportion. The number of initial points is set to ten times the number of search space dimensions to ensure that the initial sampling can cover the main area of the search space. Each initial point contains a complete set of temperature compensation parameter combinations, which constitute the initial sampling point set.

[0088] The substitution calculation of the temperature-frequency deviation characteristic curve is realized by the polynomial interpolation method. The characteristic curve is stored in the memory in the form of a lookup table, which records the frequency deviation data points corresponding to different temperature values. When the temperature value of the sampling point is not on the pre-stored data points, the processor calculates the corresponding frequency deviation value using the cubic spline interpolation algorithm. During the interpolation calculation process, the processor selects four data points near the temperature value of the sampling point to construct a cubic polynomial interpolation function, and calculates the frequency deviation value of the sampling point through the function. The interpolation accuracy is improved by increasing the density of the characteristic curve data points and using high-order interpolation algorithms.

[0089] The calculation result of the initial frequency deviation is used to determine the parameters of the sampling weight distribution. The processor statistically analyzes the frequency deviation values of all initial sampling points to calculate their mean and standard deviation as the basic parameters of the weight distribution. Sampling points with smaller frequency deviations are assigned higher weight values, and sampling points with larger frequency deviations are assigned lower weight values. The calculation of the weight value is realized by taking the reciprocal of the ratio of the frequency deviation of each sampling point to the minimum frequency deviation, ensuring that high-quality sampling points have more sampling opportunities. The weight distribution also needs to be normalized to make the sum of all weight values equal to one.

[0090] The establishment of the sampling weight distribution uses a probability density function to describe the sampling probability of each search space region. The processor calculates the weight density of each sub-interval according to the weight values of the initial sampling points, and the regions with high weight density have a higher probability of being selected in subsequent sampling. The weight distribution function is constructed by the piecewise linear interpolation method, which connects discrete weight points into a continuous probability density curve. To avoid excessive sampling concentration in local areas, a smoothing factor is added to the weight distribution function to ensure that all regions maintain a minimum sampling probability.

[0091] The Monte Carlo method generates a sequence of random sampling points using an importance sampling technique to improve sampling efficiency. Instead of simple uniform random sampling, the processor generates a sequence of random numbers that conform to the sampling weight distribution based on the sampling weight distribution. Importance sampling is achieved through the inverse transform method of the cumulative distribution function. The processor calculates the cumulative distribution function of the weight distribution, generates a uniform random number between zero and one, and obtains the sampling point coordinates conforming to the weight distribution through inverse transformation. The length of the sequence of sampling points is determined according to the optimization accuracy requirement, and is usually set to one thousand to ten thousand sampling points.

[0092] The calculation process of the sequence of random sampling points into the temperature-frequency deviation characteristic curve adopts a batch processing method to improve the calculation efficiency. The processor processes the sequence of sampling points in groups, each group containing one hundred sampling points, and calculates the frequency deviation value corresponding to each group of sampling points in parallel. Parallel calculation is achieved through a multi-thread processor architecture, and each thread is responsible for processing the frequency deviation calculation of one sampling point. In the calculation process, the intermediate results of the interpolation algorithm are reused to avoid repeated calculation of the interpolation coefficients of the same temperature interval.

[0093] The accuracy control of frequency deviation calculation is achieved through a multi-level interpolation strategy. When the distance between the temperature value of the sampling point and the data point of the characteristic curve is less than a preset threshold, the linear interpolation method is directly used 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, which is based on the trend of the data points near the boundary.

[0094] The storage of the frequency deviation of the sampling point uses a compressed storage format to reduce the memory occupation. The processor quantizes and encodes the frequency deviation value, converts the floating point value to fixed point representation, and the precision loss is controlled within one thousandth. The storage format also includes the index information of the sampling point, which facilitates subsequent fast lookup and comparison operations. The calculated sampling points and their frequency deviation values constitute a complete sampling data set, which provides a data basis for the subsequent selection of the optimal compensation factor. The quality control mechanism ensures the reliability of the sampling results by checking the uniformity of the sampling point distribution and the reasonableness of the frequency deviation value.

[0095] In an alternative embodiment, the output frequency signal of the VCO circuit is compensated in real time using the optimal compensation factor, and the adaptive weight value of the compensation parameter is calculated through Bayesian iteration combined with the compensation effect evaluation parameter, including:

[0096] The output frequency signal of the VCO circuit is compensated in real time by using the optimal compensation factor to obtain a compensated output frequency signal; the frequency stability of the compensated output frequency signal is analyzed to extract the frequency stability and phase noise indicators as compensation effect evaluation parameters, and the compensation effect evaluation parameters are converted into Bayesian prior probability distribution;

[0097] Based on the Bayesian prior probability distribution, the initial weight value of the compensation parameter is set, and the mapping relationship between the compensation effect evaluation parameters and the weight value is constructed; according to the mapping relationship, Bayesian iterative operation is performed, when the compensation effect evaluation parameters indicate that the frequency performance is improved, the weight value of the corresponding compensation parameter is increased through iterative calculation, and when the compensation effect evaluation parameters indicate that the frequency performance is reduced, the weight value of the corresponding compensation parameter is reduced through iterative calculation.

[0098] In the process of compensating the output frequency signal of the VCO circuit in real time by using the optimal compensation factor, the digital signal processor reads the frequency signal output by the current VCO circuit, and performs numerical operation on the frequency signal and the optimal compensation factor stored in the non-volatile memory. The digital signal processor uses an interpolation algorithm to obtain the corresponding compensation coefficient from the compensation factor lookup table according to the current temperature value, and the lookup table is divided into multiple intervals according to the temperature range, and each interval corresponds to a specific compensation factor value. The processor performs multiplication operation on the original frequency signal and the compensation factor corresponding to the temperature interval to obtain the temperature-compensated frequency signal output.

[0099] The compensated output frequency signal is sampled by a high-precision frequency counter, which uses a measurement method with a gate time of one second to continuously record the frequency values in one hundred measurement periods. The frequency stability analysis module statistically processes the one hundred frequency values to calculate the standard deviation as the frequency stability indicator. The phase noise analysis is performed by inputting the compensated frequency signal into a phase noise analyzer, which scans and measures in the frequency offset range of one kilohertz to one hundred kilohertz, and extracts the phase noise power spectral density value at ten kilohertz frequency offset as the phase noise indicator.

[0100] The frequency stability and phase noise indicators constitute a set of compensation effect evaluation parameters, which are mapped into the parameters of the Bayesian prior probability distribution through a preset conversion function. In the conversion process, the frequency stability value is divided by the preset maximum stability threshold to obtain the normalized stability parameter, and the ratio of the phase noise value to the preset noise reference value is taken 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 prior probability distribution description.

[0101] An initial weight value is assigned to each temperature compensation parameter based on a Bayesian prior probability distribution, and the initialization process of the weight value adjusts a benchmark weight value as an expected value of the prior probability distribution according to a historical compensation effect of the current temperature interval. The temperature compensation parameters include a linear compensation coefficient, a quadratic compensation coefficient, and a cubic compensation coefficient, each of which corresponds to a different weight value. The construction of the mapping relationship is realized by establishing a lookup table between the compensation effect evaluation parameters and the weight adjustment amount, which records the weight adjustment strategy corresponding to different evaluation parameter combinations.

[0102] During the execution process of the Bayesian iterative operation, the processor periodically reads the latest compensation effect evaluation parameters, compares and analyzes the current parameter value with the parameter value of the last iteration. When the frequency stability index improves compared with the last measurement result, it indicates that the current compensation parameter configuration produces a positive effect, and the processor calculates the weight increment value according to the improvement degree. The calculation of the weight increment is realized by multiplying the stability improvement ratio by a preset learning rate coefficient, and the learning rate coefficient is dynamically adjusted according to the historical iteration convergence speed.

[0103] The evaluation of the phase noise index adopts a similar manner, when the phase noise power spectral density value decreases, it indicates that the frequency quality is improved, and the corresponding compensation parameter weight value needs to be increased accordingly. The adjustment amount of the weight value is obtained by multiplying the noise improvement amplitude by the current weight value and then multiplying it by an adjustment factor, and the adjustment factor is determined according to the significance of the noise improvement. When multiple compensation parameters produce positive effects at the same time, the processor allocates the weight increment according to the contribution proportion of each parameter to the overall performance improvement.

[0104] When the compensation effect evaluation parameter indicates that the frequency performance decreases, the iterative algorithm performs a weight decrement operation. In the case of frequency stability deterioration, the processor calculates the stability degradation ratio, which is used as the basis for weight decrement. The determination of the weight decrement amount is realized by multiplying the degradation ratio by the current weight value and then multiplying it by a penalty coefficient, and the penalty coefficient is set to twice the learning rate coefficient to ensure a rapid response to negative effects. The same processing logic is adopted when the phase noise index deteriorates, and the weight decrement amount is calculated by the increased noise power spectral density value.

[0105] A boundary constraint mechanism is added to the updating process of the weight value to ensure that all weight values remain within a predetermined 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 limitation event for subsequent analysis. The storage of the weight value adopts a double buffering mechanism, and the newly calculated weight value is first written to the standby storage area, and then replaced with the value in the main storage area after consistency verification.

[0106] The iteration convergence judgment is realized by monitoring the variation amplitude of the weight values in continuous iterations. When the variation amplitudes of all the weight values in ten continuous iterations are all less than a preset threshold, the algorithm determines that the convergence state has been reached, suspends the weight adjustment, and maintains the current weight configuration. The convergence threshold is dynamically set according to the accuracy requirement of the VCO circuit and the application scenario. A more stringent convergence standard is used in a high-precision application scenario. The intermediate results in the iteration process and the final weight values are recorded in a log file, providing data support for subsequent performance analysis and parameter optimization.

[0107] In an alternative embodiment, the compensated frequency signal is input into a digital integrator, and a frequency error is accumulated to generate a digital control signal, including:

[0108] A frequency error between the compensated frequency signal and an ideal frequency is calculated, and the frequency error is input into a digital integrator to perform frequency error accumulation. An 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 the preset range, the integrator response coefficient is decreased and the integration time constant is lengthened, to realize adaptive adjustment of the integrator response characteristics.

[0109] The frequency error accumulation is continuously performed based on the adjusted integrator response characteristics, to obtain accumulated frequency error data. The accumulated frequency error data is converted into a digital control signal.

[0110] A frequency signal that has been pre-processed and compensated is received. The frequency signal is from a clock circuit, a frequency synthesizer, or other frequency sources. The system compares the compensated frequency signal with a pre-set ideal frequency value, and calculates a frequency error value. For example, if the compensated frequency signal is 10.002 MHz, and the ideal frequency value is 10.000 MHz, the frequency error value is +0.002 MHz, i.e., +2 kHz.

[0111] After the frequency error is calculated, the error is input into a designed digital integrator. The digital integrator uses a discrete-time integration algorithm to accumulate the frequency error. In actual implementation, the system collects the frequency error value once every fixed sampling period (e.g., 10 microseconds), and accumulates it into the integrator. The initial state of the integrator is set to zero, and the integration value gradually accumulates as the frequency error is continuously input.

[0112] ​To achieve adaptive adjustment of the integrator response characteristics, the cumulative value of the frequency error is continuously monitored, and the response coefficient of the integrator is dynamically adjusted accordingly. The system pre-sets a safe range for the cumulative value of the frequency error, for example [-50 Hz·s, +50 Hz·s]. When it is detected that the cumulative value of the frequency error exceeds this pre-set range, it indicates that the system frequency deviates greatly and needs to be adjusted quickly. In this case, the system increases the response coefficient of the integrator, for example from the original 0.5 to 2.0, and at the same time shortens the integration time constant, for example from the original 100 milliseconds to 25 milliseconds, to speed up the system's correction speed for frequency deviation.

[0113] Suppose at a certain time, the cumulative value of the frequency error reaches +75 Hz·s, exceeding the pre-set upper limit of +50 Hz·s. After the system detects this situation, it immediately increases the response coefficient of the integrator from the default value of 0.5 to 2.0, and reduces the integration time constant from 100 milliseconds to 25 milliseconds. This adjustment enables the system to respond and correct the frequency deviation more quickly, quickly pulling the frequency back to the vicinity of the ideal state.

[0114] When it is detected that the cumulative value of the frequency error is within the pre-set range, it indicates that the frequency state is relatively stable, at which time the system automatically reduces the response coefficient of the integrator, for example from 2.0 to 0.5, and extends the integration time constant, for example from 25 milliseconds to 100 milliseconds. This adjustment can reduce the system's over-response to transient disturbances, improving the system's stability and anti-interference ability.

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

[0116] According to the adjusted integrator response characteristic, the cumulative operation of the frequency error is continuously performed, and in each sampling period, the system multiplies the current sampled frequency error value by the adjusted response coefficient and then adds it to the integrated cumulative value. This processing mode ensures that the system can adaptively adjust the response speed and stability according to the degree of frequency deviation.

[0117] After the cumulative operation, the cumulative frequency error data is obtained, which represents the cumulative effect of the frequency deviation over time. The system then converts the cumulative frequency error data into a digital control signal for subsequent frequency adjustment. During the conversion process, the system uses a digital-to-analog conversion mapping relationship to map the cumulative frequency error data to a digital control value in a suitable range. For example, assuming that the range of the digital control signal of the system is 0 to 4095 (12-bit precision), and the effective range of the cumulative frequency error is [-100Hz·s, +100Hz·s], a linear mapping relationship can be established: when the cumulative value of the frequency error is -100Hz·s, the corresponding digital control signal is 0; when the cumulative value of the frequency error is +100Hz·s, the corresponding digital control signal is 4095; when the cumulative value of the frequency error is 0, the corresponding digital control signal is 2048. The intermediate values are calculated by linear interpolation.

[0118] The digital control signal output by the system can be directly used to drive a voltage-controlled oscillator, a digital-controlled oscillator, or other frequency adjustment devices to achieve precise control of the system frequency, so that the actual output frequency of the system gradually approaches 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 of the adaptive integrator.

[0119] In a second aspect of the embodiments of the present application, a VCO digital circuit control system with temperature compensation is provided, comprising:

[0120] A first unit is configured to obtain an output frequency signal of a VCO circuit and corresponding real-time temperature data, compare the output frequency signal with a preset standard frequency, and obtain an initial frequency deviation value;

[0121] A second unit is configured to calculate a temperature compensation coefficient of the VCO circuit based on the output frequency signal, correct the initial frequency deviation value using the temperature compensation coefficient to obtain an actual frequency deviation, establish a corresponding relationship between the actual frequency deviation and the real-time temperature data, and generate a temperature-frequency deviation characteristic curve;

[0122] The third unit is configured to perform multiple random samplings on the temperature compensation factor by using a Monte Carlo method according to the temperature-frequency deviation characteristic curve, calculate a frequency deviation corresponding to each sampling point, and select a temperature compensation factor with the minimum frequency deviation as an optimal compensation factor.

[0123] The fourth unit is configured to perform real-time compensation on an output frequency signal of the VCO circuit by using the optimal compensation factor, obtain an adaptive weight value of the compensation parameter by using a Bayesian iteration calculation in combination with a compensation effect evaluation parameter, dynamically adjust the optimal compensation factor according to the adaptive weight value, input the compensated frequency signal into a digital integrator, perform cumulative operation on a frequency error, generate a digital control signal and output the digital control signal to the VCO circuit, and complete frequency calibration.

[0124] In a third aspect, an electronic device is provided, including:

[0125] a processor;

[0126] a memory for storing processor-executable instructions;

[0127] The processor is configured to invoke the instructions stored in the memory to execute the method described above.

[0128] In a fourth aspect, a computer-readable storage medium is provided, which stores computer program instructions. When the computer program instructions are executed by a processor, the method described above is implemented.

[0129] The present application can be a method, device, system and / or computer program product. The computer program product can include a computer readable storage medium having computer readable program instructions stored therein, which are used to perform various aspects of the present application.

[0130] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement to part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method of digitally controlling 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, 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. The output frequency signal of the VCO circuit is compensated in real time using the optimal compensation factor, and adaptive weight values ​​of the compensation parameters are obtained through Bayesian iteration 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 ​​of compensation parameters are set, and a mapping relationship between compensation effect evaluation parameters and weight values ​​is constructed. Bayesian iterative calculation is 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. The optimal compensation factor is dynamically adjusted according to the adaptive weight value; the compensated frequency signal is input into the 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 of claim 1, wherein, The temperature compensation coefficient of the VCO circuit is calculated based on the output frequency signal, the initial frequency deviation value is corrected by using the temperature compensation coefficient to obtain an actual frequency deviation, and a temperature-frequency deviation characteristic curve is generated by establishing a corresponding relationship between the actual frequency deviation and the real-time temperature data, including: The temperature change amount at adjacent sampling time points is calculated, and a temperature change trend curve is established based on the temperature change amount; the temperature compensation coefficient is calculated by using the amplitude and phase information of the output frequency signal and combining the temperature change trend curve by using a piecewise linear interpolation method; The initial frequency deviation value is weighted and corrected by using the temperature compensation coefficient to obtain an actual frequency deviation, and the offset amount of the actual frequency deviation is calculated; the temperature compensation coefficient is corrected according to the offset amount, the actual frequency deviation after correction is paired with the real-time temperature data, and a temperature-frequency deviation characteristic curve is constructed by using a cubic spline interpolation method.

3. The method of claim 1, wherein, In the adaptive sampling range, a random sampling point sequence is generated by using a 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, including: The upper and lower limit values of the adaptive sampling range are obtained, and a search space of Monte Carlo random sampling is constructed based on the upper and lower limit values; A random sampling initial point is generated in the search space, the initial frequency deviation is calculated by substituting the random sampling initial point into the temperature-frequency deviation characteristic curve, and the sampling weight distribution is determined according to the initial frequency deviation; A random sampling point sequence is generated by using a Monte Carlo method based on the sampling weight distribution, 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.

4. The method of claim 1, wherein, The compensated frequency signal is input into a digital integrator, and frequency error accumulation operation is performed to generate a digital control signal, including: The frequency error between the compensated frequency signal and the ideal frequency is calculated, the frequency error is input into a digital integrator, and frequency error accumulation operation is performed; the integrator response coefficient is set based on the accumulated value of the frequency error, the integrator response coefficient is increased and the integration time constant is shortened when the frequency error accumulation value exceeds the preset range, the integrator response coefficient is decreased and the integration time constant is lengthened when the frequency error accumulation value is within the preset range, and adaptive adjustment of the integrator response characteristic is realized; The frequency error accumulation operation is continuously performed according to the adjusted integrator response characteristic to obtain accumulated frequency error data, and the accumulated frequency error data is converted into a digital control signal.

5. A digitally controlled system for a VCO with temperature compensation for implementing the method of any of the preceding claims 1-4, characterized in that, including: The first unit is configured to obtain an output frequency signal of a VCO circuit and corresponding real-time temperature data, compare the output frequency signal with a preset standard frequency, and obtain an initial frequency deviation value; The second unit is configured to calculate a temperature compensation coefficient of the VCO circuit based on the output frequency signal, correct the initial frequency deviation value by using the temperature compensation coefficient to obtain an actual frequency deviation, establish a corresponding relationship between the actual frequency deviation and the real-time temperature data, and generate a temperature-frequency deviation characteristic curve. The third unit is configured to perform multiple random samplings on the temperature compensation factor by using a Monte Carlo method according to the temperature-frequency deviation characteristic curve, calculate a frequency deviation corresponding to each sampling point, and select a temperature compensation factor with the minimum frequency deviation as an optimal compensation factor. The fourth unit is configured to perform real-time compensation on the output frequency signal of the VCO circuit by using the optimal compensation factor, combine a compensation effect evaluation parameter, calculate an adaptive weight value of the compensation parameter by using a Bayesian iteration, dynamically adjust the optimal compensation factor according to the adaptive weight value, input the compensated frequency signal into a digital integrator, perform cumulative operation on a frequency error, generate a digital control signal, and output the digital control signal to the VCO circuit, so as to complete frequency calibration.

6. An electronic device, comprising: The computer program instructions are executed by the processor to implement the method in any one of claims 1 to 4. The computer program instructions are executed by the processor to implement the method in any one of claims 1 to 4. ​ ​ 7. A computer-readable storage medium having stored thereon computer program instructions, wherein, ​

Citation Information

Patent Citations

  • Temperature compensation method and crystal oscillator

    US20140184344A1

  • Pre-Compensation Method and Pre-Compensation Circuit Thereof

    US20240195363A1