Energy-saving control method system for temperature-controlled crystal oscillators

By integrating the isolated forest algorithm with Kalman filtering for temperature disturbance identification, and combining the three-dimensional finite element heat conduction model and Bellman optimality equation for energy consumption optimal path search, the balance between low power consumption and high stability in the isothermal crystal oscillator is solved, achieving fast response and high-precision isothermal control.

CN122092802APending Publication Date: 2026-05-26苏州杭晶电子科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
苏州杭晶电子科技有限公司
Filing Date
2026-01-28
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing technologies cannot achieve a balance between low power consumption and high stability in temperature-controlled crystal oscillators, resulting in excessive energy consumption or temporary temperature deviations.

Method used

By acquiring ambient temperature data and the internal temperature of the crystal oscillator, difference calculation and heat conduction simulation are performed. Temperature disturbance identification is achieved by combining the isolated forest algorithm and Kalman filtering. Transient thermal simulation is performed using a three-dimensional finite element heat conduction model. Energy-optimal path search is performed using a lumped parameter thermal network and Bellman optimality equation. Closed-loop feedback regulation is achieved by combining incremental PID control algorithm and pulse width modulation. This enables high-precision calculation of initial temperature deviation and judgment of frequency stability.

Benefits of technology

It achieves rapid response and high-precision control to dynamic ambient temperature, ensuring that the crystal oscillator maintains high frequency stability under low power consumption, and improving the system's adaptability and control accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122092802A_ABST
    Figure CN122092802A_ABST
Patent Text Reader

Abstract

This invention discloses an energy-saving control method and system for a cryogenic crystal oscillator. The method includes acquiring ambient temperature data and the internal temperature of the crystal oscillator, calculating the difference to obtain an initial temperature deviation; performing heat conduction simulation using a heat conduction model to obtain the thermal response time, and searching for the optimal energy consumption path to obtain a preliminary heating power curve; correcting the preliminary heating power curve based on the internal temperature of the crystal oscillator and a preset temperature change threshold to obtain a corrected heating power curve; performing closed-loop feedback regulation calculations based on the corrected heating power curve to obtain a preliminary control signal; extracting the power output value based on the preliminary control signal, and performing frequency stability judgment and backtracking optimization based on the extraction results to obtain a final control signal; and performing cryogenic control of the crystal oscillator based on the final control signal. This invention achieves a balance between low power consumption and high stability in the crystal oscillator.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of energy-saving control technology, and in particular to an energy-saving control method and system for a thermostatic crystal oscillator. Background Technology

[0002] Currently, novel temperature-controlled crystal oscillators (TCCs) are used in precision equipment in aerospace and communications to maintain extremely high frequency stability. Temperature fluctuations can cause frequency drift, necessitating heating to maintain a constant temperature. However, the heating process involves complex factors such as heat conduction, heat capacity, and heat dissipation, and power requirements dynamically change with environmental conditions. Preset power curves are difficult to match actual thermal demands, easily leading to excessive energy consumption or temporary temperature deviations. Therefore, it is necessary to develop a method that can calculate the globally optimal heating power based on thermodynamic characteristics to output a precise control signal, achieving a balance between low power consumption and high stability.

[0003] In one existing technology, a fixed heating power level and a defined temperature shut-off threshold are preset. Upon startup, the heater operates continuously at this fixed power until a temperature sensor detects that the crystal temperature has reached the shut-off threshold, at which point heating is completely cut off. Once the temperature naturally drops below the threshold due to heat dissipation, the system reconnects to the fixed power for heating, and this cycle repeats. The entire process relies solely on switching between "full power heating" and "heating off" states; the heating power value is independent of ambient temperature and the current thermal state, and the on / off thresholds are all fixed values, lacking any smooth adjustment.

[0004] Therefore, existing technologies cannot achieve a balance between low power consumption and high stability in crystal oscillators. Summary of the Invention

[0005] This invention provides an energy-saving control method and system for a temperature-controlled crystal oscillator, so as to achieve a balance between low power consumption and high stability of the crystal oscillator.

[0006] In a first aspect, to solve the above-mentioned technical problems, the present invention provides an energy-saving control method for a temperature-controlled crystal oscillator, comprising: Acquire ambient temperature data and the internal temperature of the crystal oscillator; Based on the ambient temperature data and the internal temperature of the crystal oscillator, the difference is calculated to obtain the initial temperature deviation; Based on the initial temperature deviation, thermal conduction simulation is performed using a pre-built thermal conduction model to obtain the thermal response time; Based on the thermal response time, an optimal energy consumption path search is performed to obtain a preliminary heating power curve; The preliminary heating power curve is corrected based on the internal temperature of the crystal oscillator and a preset temperature change threshold to obtain a corrected heating power curve. Based on the modified heating power curve, a preliminary control signal is obtained by performing closed-loop feedback regulation calculations using an incremental PID control algorithm. Based on the preliminary control signal, the power output value is extracted, and frequency stability is judged and backtracked optimization is performed based on the extraction result and the preset frequency locking threshold to obtain the final control signal. Based on the final control signal, the crystal oscillator isothermal control is performed by pulse width modulation.

[0007] In a second aspect, the present invention provides an energy-saving control system for a temperature-controlled crystal oscillator, comprising: The data acquisition module is used to acquire ambient temperature data and the internal temperature of the crystal oscillator; The difference calculation module is used to calculate the difference based on the ambient temperature data and the internal temperature of the crystal oscillator to obtain the initial temperature deviation. The simulation module is used to perform heat conduction simulation based on the initial temperature deviation using a pre-built heat conduction model to obtain the thermal response time. The optimal path module is used to search for the optimal energy consumption path based on the thermal response time to obtain a preliminary heating power curve. The correction module is used to correct the initial heating power curve based on the internal temperature of the crystal oscillator and a preset temperature change threshold, so as to obtain a corrected heating power curve. The preliminary adjustment module is used to perform closed-loop feedback adjustment calculations based on the modified heating power curve using an incremental PID control algorithm to obtain a preliminary control signal. The optimization and adjustment module is used to extract the power output value based on the preliminary control signal, and to perform frequency stability judgment and backtracking optimization based on the extraction result and the preset frequency locking threshold to obtain the final control signal. The output module is used to perform constant temperature control of the crystal oscillator by pulse width modulation according to the final control signal.

[0008] Compared with the prior art, the present invention has the following beneficial effects: (1) This invention integrates the isolated forest algorithm and Kalman filter to identify and estimate temperature disturbances, and combines the gradient boosting decision tree model to perform nonlinear correction, thereby achieving high-precision calculation of the initial temperature deviation and improving the system's response speed and control accuracy to dynamic environmental temperature.

[0009] (2) Transient thermal simulation is performed based on the three-dimensional finite element heat conduction model, and the thermal response time is extracted by fitting using the least squares method. This can accurately reflect the thermal dynamic characteristics of the crystal oscillator, provide key time basis for subsequent energy-saving control, and enhance the system's adaptability and control foresight under variable temperature conditions.

[0010] (3) By using lumped parameter thermal networks and Bellman optimality equations to search for the optimal energy consumption path, the temperature state change sequence with the lowest cumulative energy consumption can be planned under the constraint of thermal response time, so as to achieve optimal energy control of the heating process from the global level and achieve energy saving effect.

[0011] (4) Introduce frequency stability judgment and backtracking optimization mechanism in closed-loop temperature control, estimate frequency offset in real time through heat-frequency conversion relationship, and trigger gradient descent power correction when the limit is exceeded, so as to realize dual closed-loop stability of temperature and frequency and ensure high frequency stability of crystal oscillator under low power consumption operation. Attached Figure Description

[0012] Figure 1 This is a schematic flowchart of the energy-saving control method for a thermostatic crystal oscillator provided in the first embodiment of the present invention; Figure 2 This is a schematic diagram of the energy-saving control system structure of the isothermal crystal oscillator provided in the second embodiment of the present invention. Detailed Implementation

[0013] 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.

[0014] Reference Figure 1 The first embodiment of the present invention provides an energy-saving control method for a temperature-controlled crystal oscillator, comprising the following steps: S11, acquire ambient temperature data and the internal temperature of the crystal oscillator; S12, calculate the difference between the ambient temperature data and the internal temperature of the crystal oscillator to obtain the initial temperature deviation; S13, Based on the initial temperature deviation, perform heat conduction simulation using a pre-built heat conduction model to obtain the thermal response time; S14. Based on the thermal response time, perform an energy-optimal path search to obtain a preliminary heating power curve; S15, the preliminary heating power curve is corrected according to the internal temperature of the crystal oscillator and the preset temperature change threshold to obtain the corrected heating power curve; S16, Based on the modified heating power curve, a preliminary control signal is obtained by performing closed-loop feedback adjustment calculation through an incremental PID control algorithm; S17, Based on the preliminary control signal, extract the power output value, and perform frequency stability judgment and backtracking optimization based on the extraction result and the preset frequency locking threshold to obtain the final control signal; S18, according to the final control signal, the crystal oscillator isothermal control is performed by pulse width modulation.

[0015] In step S11, ambient temperature data and the internal temperature of the crystal oscillator are acquired.

[0016] Specifically, the internal temperature of the crystal oscillator is directly measured by an internal temperature sensor installed at the thermistor of the crystal oscillator. The analog signals output by the two sensors are sent to an analog-to-digital converter (ADC) to be converted into corresponding digital values. The system reads and records the digital value output by the ambient temperature sensor as the ambient temperature data, and simultaneously reads and records the digital value output by the internal temperature sensor as the internal temperature of the crystal oscillator.

[0017] Ambient temperature data reflects the operating conditions of the crystal oscillator, while the internal temperature of the crystal directly characterizes the current thermal state of the controlled object. Accurate acquisition of these two temperature variables is the starting point for all subsequent calculations, simulations, and decision-making processes.

[0018] In step S12, the difference between the ambient temperature data and the internal temperature of the crystal oscillator is calculated to obtain the initial temperature deviation.

[0019] In one specific implementation, the step of calculating the difference between the ambient temperature data and the internal temperature of the crystal oscillator to obtain the initial temperature deviation includes: Based on the ambient temperature data and the internal temperature of the crystal oscillator, a temperature gradient matrix is ​​obtained through first-order difference calculation. Based on the temperature gradient matrix, nonlinear perturbation feature points are identified using the isolated forest algorithm, and the nonlinear perturbation feature points are optimally fused and estimated using the Kalman filter algorithm to obtain the nonlinear thermal coupling difference. Based on the nonlinear thermal coupling difference, the difference is corrected using a pre-built nonlinear correction model to obtain the initial temperature deviation; The nonlinear correction model is constructed based on the gradient boosting decision tree algorithm.

[0020] Specifically, a first-order difference operation is first performed on the two sets of temperature data sequences. This operation calculates the difference between the current temperature value and the previous temperature value for each sampling moment, and then divides it by a fixed sampling time interval to obtain the temperature change rate corresponding to each sampling point. The rates of change of the ambient temperature and the rates of change of the internal temperature of the crystal oscillator are arranged in chronological order to form a two-dimensional temperature gradient matrix. Each row of this matrix corresponds to a specific sampling moment, and its two columns record the rates of change of the ambient temperature and the internal temperature of the crystal oscillator at that moment, respectively.

[0021] Next, the Isolation Forest algorithm is applied to process the temperature gradient matrix to identify anomalous data points caused by nonlinear thermal perturbations. During model building, the algorithm uses a large amount of historical temperature gradient data collected under normal operating conditions as a training set. Multiple isolation trees are constructed by randomly selecting subsets of data and features, recursively partitioning the data space until each sample point is isolated or a set tree depth is reached. The algorithm calculates an anomaly score for each data point; the closer the score is to the numerical value, the higher the probability that the point is an anomaly. The system sorts all anomaly scores from the historical training data in ascending order and uses the score at the 95th percentile as the threshold for identifying anomalies. In application, the algorithm calculates the anomaly score for each data point in the current gradient matrix and marks those points with scores exceeding the preset threshold as nonlinear perturbation feature points.

[0022] For the identified nonlinear perturbation feature points, a Kalman filter algorithm is used for optimal fusion estimation. The algorithm establishes a state-space model with the temperature gradient as the state variable. This model includes a process equation describing the natural evolution of the state over time and an observation equation describing the sensor observations. Both introduce process noise and observation noise that conform to a Gaussian distribution. The filtering process recursively executes two steps: prediction and update. The prediction step uses the optimal state estimate from the previous time step to deduce the prior estimate of the current state and its covariance. The update step uses the nonlinear perturbation feature point data actually observed at the current time step, combined with the covariance matrix of the prior estimate and observation noise, to calculate the Kalman gain to balance the weights of the predicted and observed values, and finally outputs the posterior optimal estimate of the current state and its estimation error covariance. Through this process, the scattered and noisy nonlinear perturbation feature point information is fused into a stable optimal estimate, namely the nonlinear thermal coupling difference.

[0023] Finally, the calculated nonlinear thermal coupling difference is input into a pre-built nonlinear correction model for final correction. This model is built based on the gradient boosting decision tree algorithm. The training data for the model comes from historical experiments. Input features include various statistical features of the temperature gradient matrix and the corresponding historical nonlinear thermal coupling differences. The output label is the actual temperature deviation value obtained through high-precision calibration equipment. The model is composed of multiple regression decision trees connected in series, with each subsequent tree striving to fit the residual of the prediction result of the previous tree. Key parameters of the model, such as the total number of trees, the maximum depth of each tree, and the learning rate, are selected optimally using a combination of cross-validation and grid search, with the selection criterion being to minimize the mean square error of the prediction deviation. The completed model receives the currently calculated nonlinear thermal coupling difference and its related features, and directly outputs the final result after nonlinear correction, i.e., the initial temperature deviation.

[0024] The input features of the nonlinear correction model include, but are not limited to, the currently calculated nonlinear thermal coupling difference, the moving average and standard deviation of the difference over the past M consecutive sampling windows, and the absolute value of the ambient temperature gradient at the same time; the model determines the optimal hyperparameters through grid search and five-fold cross-validation, including a decision tree number of 100, a maximum depth of 5, and a learning rate of 0.1.

[0025] This step, by integrating temporal gradient analysis, outlier detection, optimal estimation theory, and machine learning correction methods, can accurately separate and quantify the true temperature difference caused by complex nonlinear thermal coupling effects from the raw temperature data. This overcomes the limitation of simple arithmetic subtraction in reflecting the dynamic physical relationships of thermal coupling, providing accurate initial driving conditions that characterize the thermodynamic essence for subsequent heat conduction simulations. It is a fundamental step in achieving rapid response and high-precision temperature control in the control system.

[0026] In step S13, based on the initial temperature deviation, thermal conduction simulation is performed using a pre-built thermal conduction model to obtain the thermal response time.

[0027] In one specific implementation, the step of performing heat conduction simulation based on the initial temperature deviation using a pre-built heat conduction model to obtain the thermal response time includes: The initial temperature deviation is loaded onto a heat conduction model pre-constructed using a three-dimensional finite element model for transient thermal analysis simulation, resulting in a transient heat flux density distribution field containing heat flux density time-series data. A thermal response simulation curve is formed by connecting the time-series data of the transient heat flux density distribution field in chronological order. The thermal response simulation curve is fitted with a first-order exponential function using the least squares method to obtain the thermal response fitting function, and the time constant term is extracted from the thermal response fitting function as the thermal response time.

[0028] Specifically, based on the calculated initial temperature deviation, a pre-built heat conduction model is used to simulate and obtain the thermal response time. This heat conduction model is a numerical model pre-built using the three-dimensional finite element method, based on the actual physical structure of the crystal oscillator. The model construction begins with accurate geometric modeling of the crystal oscillator entity, establishing a three-dimensional digital model in computer-aided engineering software based on its design drawings. Subsequently, realistic material thermal parameters, including thermal conductivity, density, and specific heat capacity, are assigned to each component in the model, such as the crystal element, heater, insulation layer, and shell.

[0029] The model construction process involves finite element mesh generation, discretizing the continuous three-dimensional geometry into a large number of tiny volume elements. The mesh density is optimized based on the expected thermal gradient changes in the structure; a denser mesh is used in regions where rapid temperature changes are anticipated, while a sparser mesh is used in regions with gentler temperature distributions, balancing computational accuracy and simulation time. After mesh generation, the boundary conditions of the model need to be set. This includes relating the outer surface of the crystal oscillator to the environmental convection heat transfer conditions and defining the thermal contact relationship between the heater and the crystal element.

[0030] After mesh generation, setting boundary conditions for the heat conduction model is a crucial step. This involves two main aspects. The first is defining the convective heat transfer between the outer surface of the crystal oscillator and the surrounding air. This convective heat transfer coefficient is not based on a single theoretical value but is determined through a set of calibration experiments conducted under typical operating conditions. In the experiments, the sample was placed in a temperature-controlled chamber, and the temperature difference between the outer surface of the device and the surrounding air was measured at different ambient temperatures and airflow velocities, along with the corresponding steady-state heating power. The equivalent average convective heat transfer coefficient was then derived using Newton's law of cooling, and this coefficient was used as the input parameter for the outer surface boundary conditions in the model.

[0031] The second aspect is defining the thermal contact relationship between the internal heating element and the crystal element. Due to the physical contact and potential gaps between them, a "thermal contact conduction" model is used. This model requires setting an equivalent thermal contact conduction coefficient. The initial value of this coefficient is theoretically estimated based on the surface roughness of the two materials, contact pressure, and the characteristics of any filling material that may exist between the interfaces. Subsequently, its precise value will be calibrated and determined through a subsequent model validation process.

[0032] Once constructed, the heat conduction model must undergo rigorous experimental verification to ensure its reliability. Verification utilizes a series of independent benchmark experimental data derived from steady-state and transient thermal tests performed on a physical crystal oscillator on a dedicated test platform. During the tests, a high-precision infrared thermal imager was used to measure the steady-state temperature distribution field on the device's outer casing surface under specific heating power, while embedded miniature thermocouples were used to record the transient temperature response curves of key points within the crystal element under different heating step signals.

[0033] The experimentally measured steady-state temperature distribution is compared point-by-point with the simulation results to calculate the mean absolute temperature error across the entire surface region. Simultaneously, the experimentally measured transient temperature rise curves at key internal points are compared with the corresponding temperature time-series data output from the simulation, and the coefficient of determination between the two curves is calculated to measure the consistency of their trends. If the mean absolute error exceeds a preset verification threshold (e.g., three degrees Celsius) or the coefficient of determination is lower than a preset fit threshold (e.g., 0.95), it indicates that the model has a bias.

[0034] When model validation fails, calibration is required. The calibration process is an iterative adjustment. The main parameters adjusted are the convective heat transfer coefficient and the internal thermal contact conductivity coefficient, as mentioned earlier. Adjustments are not arbitrary but rather targeted corrections based on error characteristics. For example, if the simulated overall temperature is generally higher than the measured value, the convective heat transfer coefficient may be appropriately increased to enhance the simulated heat dissipation effect; if the simulated temperature rise rate of the internal crystal element is faster than the measured value, the thermal contact conductivity coefficient between the heating element and the crystal may be appropriately decreased to simulate the thermal resistance at the interface. The adjusted parameters are then substituted into the model for recalculation and compared again with experimental data until the comparison error between the simulation results and all benchmark experimental data meets the preset validation threshold requirements. The final model parameters confirmed through this process ensure that the three-dimensional finite element heat conduction model can reliably reflect the thermodynamic characteristics of the actual device.

[0035] In the application phase, the initial temperature deviation is used as the initial load condition for transient thermal analysis and applied to the previously validated three-dimensional finite element heat conduction model. The simulation process simulates the dynamic evolution of the temperature field of the system under natural heat conduction and convection, starting from this initial temperature difference state. The solver advances the calculation with an adaptive time step within the set total simulation time, outputting the temperature distribution and heat flux density distribution throughout the entire model space at each time step. From these results, the time-varying sequence data of the heat flux density at the target monitoring point (usually located in the crystal core region) is extracted; this data sequence constitutes the key time-domain information of the transient heat flux density distribution field.

[0036] The obtained heat flux density time-series data points are connected sequentially to form a thermal response simulation curve. To extract quantitative parameters characterizing the system's thermal inertia from this curve, a first-order exponential function is fitted using the least squares method. The specific form of the fitting function used is as follows: in, It is over time Changing heat flux density, It is the steady-state heat flux density obtained by fitting. It is the difference between the initial heat flux density and the steady-state value. It is a natural constant. It is the time constant to be determined, i.e., the thermal response time.

[0037] The fitting process aims to find a set of optimal parameters. , , This minimizes the overall error between the discrete data points of the exponential function curve and the thermal response simulation curve. The specific process is as follows: First, the parameters are initialized. The initial value is the average of the data from the last stage of the simulation. For initial data and The difference between the initial values, A rough estimate is made based on the data curve. Subsequently, nonlinear least squares optimization algorithms, such as the Levenberg-Marquardt algorithm, are used for iterative processing. In each iteration, the algorithm calculates the predicted value of the fitted curve at each data point. Compared with actual value The sum of squared residuals is used as the objective function, and the parameters are updated by calculating the partial derivatives (Jacobi matrix) of the objective function with respect to each parameter, so that the value of the objective function continuously decreases. Iteration continues until the change in the objective function value between two consecutive iterations is less than a preset convergence threshold (e.g., ...). At this point, it is assumed that the parameters have converged to the optimal solution.

[0038] After fitting is completed, the optimal parameters are obtained. , , And the final thermal response fitting function: The time constant extracted from this function This is the thermal response time that is solved in this step.

[0039] Finally, the time constant term is directly extracted from the first-order exponential function obtained from the fitting. This time constant is defined as the thermal response time of the system, which physically characterizes the magnitude of the system's thermal inertia and reflects how quickly the temperature changes and tends to stabilize.

[0040] This step utilizes a three-dimensional finite element model for transient thermal simulation, transforming the abstract initial temperature deviation into a concrete time constant reflecting the overall thermal inertia of the system. Accurate acquisition of the thermal response time is crucial, providing an irreplaceable key time scale for planning the energy-optimal heating path that meets time constraints in subsequent steps. This enables the entire energy-saving control strategy to adapt to the specific thermal dynamic characteristics of the controlled object, making it a core element in achieving forward-looking and adaptive control.

[0041] In step S14, based on the thermal response time, an optimal energy consumption path search is performed to obtain a preliminary heating power curve.

[0042] In one specific implementation, the step of performing an energy-optimal path search based on the thermal response time to obtain a preliminary heating power curve includes: The physical structure and thermal parameters of the crystal oscillator are obtained, and combined with the internal temperature of the crystal oscillator, an equivalent thermal resistance network model of the crystal oscillator is constructed using the lumped parameter thermal network method. Based on the equivalent thermal resistance network model and the thermal response time, the continuous temperature in the equivalent thermal resistance network model is divided into equal intervals to generate a temperature state model containing discrete temperature nodes. Based on the temperature state model and the thermal response time, the minimum energy consumption required for state transitions between discrete temperature nodes within the thermal response time is solved using the first law of thermodynamics and the heat conduction equation, thereby generating a state transition energy matrix. Based on the state transition energy matrix and the thermal response time, the Bellman optimality equation with time constraints is constructed and solved. Based on the Bellman optimality equation, a full path search is performed from the initial temperature state to the target temperature state to identify the optimal temperature state sequence containing the temperature state change that has the lowest cumulative energy cost under the condition of satisfying the thermal response time. Based on the optimal temperature state sequence and the equivalent thermal resistance network model, reverse power calculation is performed to convert the temperature state change into the heating power value required to drive the temperature state change, thus obtaining a heating power set. The heating power set is continuously fitted using cubic spline interpolation to obtain a preliminary heating power curve.

[0043] Specifically, first, the physical structure dimensions and material thermal parameters of the crystal oscillator are obtained. Based on this information, an equivalent thermal resistance network model is constructed using the lumped-parameter thermal network method. The specific construction process is as follows: The physical structure of the crystal oscillator is divided into several isothermal nodes according to its thermal characteristics. These nodes typically include a core node representing the crystal chip itself, a heating node representing the heater, a substrate node representing the mounting substrate, and a shell node representing the outer casing. Each node is assigned a lumped thermal capacity value, which is equal to the specific heat capacity of the physical component represented by the node multiplied by its mass. The heat transfer path connecting any two nodes is modeled as a lumped thermal resistance. For example, the crystal chip node and the heater node are connected by contact thermal resistance, the heater node and the substrate node are connected by conduction thermal resistance, and the shell node and the environment are connected by convection and radiation thermal resistance. The value of each thermal resistance is calculated based on the thermal conductivity of the material, the contact area, and the length of the heat transfer path, or obtained through experimental calibration. Finally, the entire crystal oscillator is abstracted as an electrical analog network consisting of several thermal capacity nodes and the thermal resistances connecting them.

[0044] Based on the equivalent thermal resistance network model and the known thermal response time, the temperature range from the current internal temperature of the crystal oscillator to the target isothermal temperature is discretized. This continuous temperature range is divided into a series of discrete temperature values ​​at fixed intervals (e.g., 0.1 degrees Celsius). Each discrete temperature value represents a possible temperature state of the system, and all discrete temperature values ​​constitute a temperature state model.

[0045] Next, a state transition energy matrix is ​​generated. This matrix quantifies the minimum energy required to change from one discrete temperature state to another. The calculation is based on the fundamental principles of the first law of thermodynamics (conservation of energy) and Fourier's law of heat conduction. For a core node in the network, the minimum energy required to raise its temperature from state A to state B theoretically consists of two parts. The first part is the heat required to increase the node's internal energy, which equals the node's heat capacity multiplied by the temperature change (the temperature of state B minus the temperature of state A). The second part is the heat lost to other parts of the network and the environment within a unit time step corresponding to the temperature change, due to the node's higher temperature compared to other nodes and the environment, through all the thermal resistances connected to it. This heat loss is estimated by dividing the difference between the current node temperature and the temperatures of adjacent nodes (or the environment temperature) by the corresponding thermal resistance and then multiplying by the time step. Therefore, the energy transferred from state A to state B is the sum of the aforementioned increase in internal energy and the estimated heat loss. By iterating through all possible combinations of initial state A and target state B and performing this calculation, a two-dimensional matrix is ​​generated, namely the state transition energy matrix, whose element in the i-th row and j-th column represents the minimum energy required to transition from the i-th temperature state to the j-th temperature state.

[0046] Subsequently, the Bellman optimality equation with time constraints is constructed and solved to find the path with the lowest total energy consumption from the initial temperature state to the target isothermal state within the total thermal response time. The total thermal response time is discretized into N equal time steps. A cost function is defined, which is the minimum accumulated energy consumption from the initial state to a certain temperature state s at a certain time step k. The solution is obtained using a forward recursive method of dynamic programming. During initialization, at time step zero, only the accumulated energy consumption of the initial temperature state is zero, and the accumulated energy consumption of other states is set to infinity. For each time step from one to N, every possible temperature state s at that time step is traversed. For state s, all possible states p at the previous time step (k-1 steps) are traversed. The cost of transitioning from state p to state s is calculated, which is equal to the minimum accumulated energy consumption of state p at time step k-1, plus the energy required to transition from state p to state s (obtained from the state transition energy matrix). From all possible transition costs corresponding to the predecessor state p, select the minimum value as the new cumulative minimum energy consumption to reach time step k and state s, and record the corresponding predecessor state p as the best predecessor of state s at time step k. This process is recursively repeated until the final time step N.

[0047] After completing the forward recursion, a backward tracing is performed to obtain the optimal path. At the final time step N, the cumulative minimum energy consumption corresponding to the target isothermal state is the global minimum energy consumption. Starting from this state, based on the recorded best predecessor information, the state it originated from at time step N-1 is found. Using this state as a base, the best predecessor is traced back to the previous time step, and this process is repeated until the initial state at time step zero is reached. The sequence of states traversed in this backtracking process constitutes the optimal temperature state sequence with the lowest cumulative energy consumption under the thermal response time constraint. This sequence indicates the ideal temperature that the system should reach at each time step.

[0048] After obtaining the optimal temperature state sequence, inverse power calculation is performed. The sequence gives the temperature state that the system should reach at each discrete time step. For the temperature state change between two adjacent time steps, the average heating power required to drive the change is calculated based on the equivalent thermal resistance network model. Specifically, the calculation is as follows: First, calculate the internal energy increment required for the core node to change from the current temperature state to the next target temperature state, which is the node heat capacity multiplied by the temperature difference. Second, estimate the heat lost by the core node through thermal resistance due to the temperature difference with other parts of the network within this time step. This value is the sum of the heat flow (temperature difference divided by thermal resistance) of each thermal resistance branch multiplied by the time step. The net heat increment required to drive this state change is the sum of the above internal energy increment and the heat loss due to heat dissipation. Finally, divide this net heat increment by the time step (thermal response time divided by the total number of steps N) to obtain the average heating power required within this time period. This calculation is performed for each state transition in the optimal sequence to obtain a set of heating power values ​​corresponding to each discrete time point.

[0049] Finally, cubic spline interpolation is used to continuously fit the set of heating power values. This method generates a smooth curve that passes through all given discrete power points and has continuous first and second derivatives between adjacent points. This curve is the initial heating power curve, which provides the theoretically optimal continuous power control command for the entire thermal response time, starting from the current moment.

[0050] This step combines the system's thermal inertia (thermal response time), thermodynamic structure (thermal resistance network), and global optimization theory to proactively plan a temperature ramp-up trajectory with minimal energy consumption. This fundamentally avoids the energy waste that may occur in traditional fixed-power or simple feedback control and is the core optimization step for achieving the goal of low power consumption in isothermal control of crystal oscillators.

[0051] In step S15, the initial heating power curve is corrected based on the internal temperature of the crystal oscillator and a preset temperature change threshold to obtain a corrected heating power curve.

[0052] In one specific implementation, the step of power correction of the initial heating power curve based on the internal temperature of the crystal oscillator and a preset temperature change threshold to obtain a corrected heating power curve includes: The temperature change rate is calculated using a sliding time window algorithm based on the internal temperature of the crystal oscillator. When the temperature change rate does not exceed the preset temperature change threshold, the preliminary heating power curve is directly used as the corrected heating power curve. When the temperature change rate exceeds the preset temperature change threshold, the change time window of the temperature change rate is captured, and the standard deviation of the internal temperature of the crystal oscillator within the change time window is calculated to obtain the crystal oscillator temperature fluctuation value. The crystal oscillator temperature fluctuation value is converted into the corresponding correction power by querying the preset fluctuation characteristic-correction power mapping table, and the correction power is superimposed on the initial heating power curve to obtain the correction heating power curve.

[0053] Specifically, the system first employs a sliding time window algorithm to calculate the real-time rate of temperature change within the crystal oscillator. This algorithm defines a fixed-length observation period as a window on a continuous time axis. At each new sampling moment, the window slides forward by one sampling interval, discarding the earliest data point and adding the latest crystal oscillator internal temperature data point. The difference between the last temperature data point and the first temperature data point within this window is calculated and then divided by the window's time span. The result is the rate of temperature change at the current moment, reflecting the average rate of temperature change over a short period.

[0054] A preset temperature change threshold serves as a key criterion for determining whether the system is operating stably. This threshold is not arbitrarily set but is derived from the analysis of historical temperature data collected during the long-term stable operation of the crystal oscillator. Specifically, under constant temperature control and stable conditions, temperature change rate data calculated over a large number of time windows are statistically analyzed to determine its distribution characteristics. The statistically obtained temperature change rate data are sorted by absolute value, and the value at the 95th percentile is selected as the initial reference threshold. This reference threshold is then fine-tuned and confirmed in conjunction with the maximum temperature disturbance requirement allowed by the crystal oscillator's frequency stability index, ultimately forming a fixed temperature change threshold for real-time judgment.

[0055] The system compares the calculated real-time temperature change rate with the preset threshold. If the absolute value of the temperature change rate does not exceed the threshold, the current thermal state is determined to be stable, and no intervention is needed on the preliminary heating power curve. The preliminary heating power curve is directly output as the final corrected heating power curve.

[0056] If the absolute value of the real-time temperature change rate exceeds a preset threshold, the system is deemed to have experienced an anomaly or significant thermal disturbance, requiring power compensation correction. In this case, the system will extract all internal temperature data sequences of the crystal oscillator within the complete time window corresponding to the excessive temperature change rate. Statistical analysis will be performed on this data sequence, and its standard deviation will be calculated. The resulting value represents the crystal oscillator temperature fluctuation value, characterizing the severity of temperature fluctuations during that time period.

[0057] The system internally stores a fluctuation characteristic-corrected power mapping table, which is used to convert the calculated crystal oscillator temperature fluctuation value into a specific additional power correction amount. This mapping table is constructed from offline experimental and simulation data. During the experimental phase, known thermal perturbations of different intensities and types were artificially applied to the system, and the fluctuation values ​​of the crystal oscillator's internal temperature under various perturbations were recorded, along with the minimum additional heating power increment required to quickly quell the fluctuation and restore stability. By analyzing a large number of such data pairs, a lookup table was established with temperature fluctuation values ​​as input and the necessary power correction amount as output. To facilitate online querying, the table was discretized and linearly interpolated during construction, ensuring that for any calculated fluctuation value, the corresponding corrected power value can be quickly obtained through table lookup and interpolation.

[0058] Finally, the corrected power value obtained from the query is algebraically superimposed with the corresponding power value of the initial heating power curve for the current and a short future time period. During superposition, the corrected power is added in the form of pulses or gradual changes, and its duration is related to the length of the previously intercepted temperature change time window. The new power curve formed after superposition is the corrected heating power curve. This curve, while maintaining the original optimal energy consumption trajectory, adds an active compensation capability to cope with sudden thermal disturbances, aiming to suppress temperature fluctuations more quickly and enable the system to return to a stable thermal equilibrium path rapidly, thereby ensuring the stability of the control frequency in dynamic environments.

[0059] In step S16, based on the modified heating power curve, a closed-loop feedback adjustment calculation is performed using an incremental PID control algorithm to obtain a preliminary control signal.

[0060] Specifically, the input data for this step includes the real-time acquired internal temperature of the crystal oscillator, Temp_crystal, the preset target isothermal temperature of the crystal, Target_temp, and the corrected heating power curve Power_curve_corrected output from step S15. The corrected heating power curve provides a reference value for the theoretical heating power as it changes over time.

[0061] The core of incremental PID control is to calculate the incremental change of the control signal relative to the previous cycle in each control cycle, rather than the absolute output value. The algorithm first calculates the temperature deviation e_now for the current control cycle, which is the target isothermal temperature Target_temp minus the currently measured internal temperature of the crystal oscillator Temp_crystal. Simultaneously, the algorithm records the temperature deviation e_prev from the previous control cycle and the temperature deviation e_prev2 from the control cycle before that.

[0062] The increment Δu of the control quantity consists of three parts. The first part is the proportional term increment, which is proportional to the difference between the current temperature deviation e_now and the temperature deviation e_prev of the previous cycle, with the proportionality coefficient denoted as Kp. The second part is the integral term increment, which is proportional to the current temperature deviation e_now, with the proportionality coefficient denoted as Ki, corresponding to the cumulative effect of the deviation. The third part is the derivative term increment, which is proportional to the difference between the current deviation e_now, twice the previous cycle deviation e_prev, and the deviation of the cycle before that, e_prev², with the proportionality coefficient denoted as Kd, reflecting the trend of deviation change.

[0063] The tuning of the key parameters in the algorithm—proportional coefficient Kp, integral coefficient Ki, and derivative coefficient Kd—is crucial. These parameters are determined based on offline analysis and experimental tuning of the dynamic characteristics of the controlled object (the thermal system of the crystal oscillator). Specifically, a step heating power is first applied to the system in open-loop mode, and the temperature rise curve inside the crystal oscillator is recorded. Based on the characteristic parameters of this curve (such as lag time and time constant), engineering tuning methods such as the critical proportional gain method are used to initially calculate a set of PID parameters. Subsequently, experiments are conducted under closed-loop control, observing the system's response curve to a step change in the target temperature. Based on indicators such as overshoot, settling time, and steady-state error of the response curve, the values ​​of Kp, Ki, and Kd are manually fine-tuned until the system achieves fast, stable, and zero steady-state error temperature tracking performance. This final set of parameters is then embedded in the control algorithm.

[0064] In each control cycle, in addition to calculating the PID increment Δu_pid based on the temperature deviation, the algorithm also processes the feedforward quantity. From the corrected heating power curve Power_curve_corrected, the corresponding theoretical power value P_ff is retrieved according to the current time index. The change in this theoretical power value relative to the theoretical power value of the previous control cycle, ΔP_ff, is calculated as the feedforward increment. The final control signal increment Δu_total is the sum of the PID increment Δu_pid and the feedforward increment ΔP_ff. The total control signal output value u_prev from the previous control cycle, plus the total increment Δu_total calculated in this cycle, yields the preliminary control signal u_preliminary for the current control cycle. This signal is a numerical quantity characterizing the desired heating intensity.

[0065] The significance of this step lies in its organic integration of feedforward and feedback control. The corrected heating power curve serves as feedforward, providing a primary heating plan based on model prediction and global optimization; the incremental PID feedback loop compensates for inaccuracies in the feedforward model and external unknown disturbances in real time, quickly eliminating subtle deviations between the actual and target temperatures. This combination allows the system to track the optimal heating trajectory while ensuring highly accurate and stable temperature control, laying a direct foundation for high-frequency stability. Furthermore, the incremental algorithm outputs changes in the control quantity, rather than absolute position, which helps prevent abrupt changes in the actuator and facilitates seamless switching between manual and automatic control modes.

[0066] In step S17, the power output value is extracted based on the preliminary control signal, and frequency stability is judged and backtracked based on the extraction result and the preset frequency lock threshold to obtain the final control signal.

[0067] In one specific implementation, the step of extracting the power output value based on the preliminary control signal, and performing frequency stability judgment and backtracking optimization based on the extraction result and a preset frequency lock-in threshold to obtain the final control signal includes: Based on the initial control signal, the heating circuit is driven by pulse width modulation, and the voltage and current in the heating circuit are obtained; The thermoelectric power is calculated using Ohm's law based on the voltage and current. Based on the thermoelectric power and the preset thermo-frequency conversion coefficient matrix, the estimated frequency offset value is obtained through matrix multiplication. When the estimated frequency offset value does not exceed the preset frequency locking range, the preliminary control signal is directly used as the final control signal; When the estimated frequency offset value exceeds the preset frequency locking threshold range, the difference is recalculated based on the ambient temperature data and the internal temperature of the crystal oscillator to obtain a new temperature deviation value. Based on the new temperature deviation value and the estimated frequency offset value, the power correction is calculated using the gradient descent algorithm to obtain the corrected power; The corrected power is superimposed on the corrected heating power curve to obtain the compensated heating power curve; Based on the compensated heating power curve, the final control signal is obtained by calculating using an incremental PID control algorithm.

[0068] Specifically, the system first executes a preliminary control signal, which drives the pulse width modulation module to generate a corresponding duty cycle waveform, controlling the power switching devices in the heating circuit. During this process, the system uses built-in sensors to collect the voltage across the heating circuit and the current flowing through the heating element in real time.

[0069] Using the measured voltage and current values, the system calculates power using Ohm's law, multiplying the two values ​​to obtain the instantaneous thermoelectric power actually consumed by the heater during the current control cycle. This power value is a direct measure of the thermal energy input to the crystal oscillator.

[0070] To assess the impact of the current thermal input on the output frequency, the system uses a pre-constructed thermal-frequency conversion coefficient matrix for estimation. This matrix is ​​derived from a precision calibration experiment. During calibration, the crystal oscillator sample was placed in a high-precision temperature-controlled chamber, and the heating power was adjusted in minute steps at multiple different steady-state ambient temperatures (i.e., different operating points), while the output frequency changes were recorded using a high-precision frequency meter. A large dataset containing ambient temperature, heating power changes, and corresponding frequency changes was collected. A multiple linear regression method was used to fit the data. This model uses heating power changes and ambient temperature as inputs to predict frequency changes. The model uses "heating power changes" and "baseline ambient temperature" as two independent variables, and "crystal output frequency changes" as the dependent variable. The model assumes a linear relationship between the dependent variable and the two independent variables; that is, the frequency change equals a constant term, plus "heating power changes" multiplied by a coefficient A, plus "baseline ambient temperature" multiplied by a coefficient B. By fitting all experimental data using the least squares method, the optimal coefficients A and B, along with a constant term, can be determined to minimize the overall error between the model's predicted values ​​and all experimental measurements. To improve accuracy, the entire operating temperature range is divided into multiple sub-intervals, and regression is performed independently within each sub-interval to obtain a set of specific coefficients. The set of coefficients from all sub-intervals constitutes a heat-to-frequency conversion coefficient matrix, which is stored in a lookup table. Each row defines the upper and lower limits of a temperature range and its corresponding regression coefficients (including the power change coefficient, the ambient temperature coefficient, and a constant term).

[0071] In the calibration phase, the baseline ambient temperature refers to the steady-state ambient temperature value set by the temperature control box before applying a step change in power. In the real-time application phase, the current ambient temperature used in the query matrix serves as the input value for this independent variable, used to select the corresponding coefficient range and participate in the calculation. In real-time control, the system reads the current ambient temperature data, queries the matrix to determine the current temperature range, and extracts the corresponding coefficients. Subsequently, the difference between the current thermoelectric power and the current operating point reference power (i.e., the change in heating power) and the current ambient temperature value are substituted into the linear model of this range for calculation, and the output result is the estimated frequency offset value.

[0072] The system has a preset frequency lock-in range as a stability criterion. The positive and negative boundary values ​​of this range are determined based on the frequency stability indicators in the product specifications. During long-term aging and high / low temperature tests, the maximum natural fluctuation peak of the output frequency under the target constant temperature condition is statistically analyzed. This peak value is multiplied by a safety factor of 1.2 to 1.5, and the final value is the frequency lock-in threshold. If the absolute value of the estimated frequency offset does not exceed this threshold, the system determines that the frequency is stable and directly outputs the preliminary control signal as the final control signal.

[0073] If the estimated frequency offset exceeds the threshold, a backtracking optimization mechanism is triggered. The system immediately reacquires the current ambient temperature and the internal temperature of the crystal oscillator, and calculates a new temperature deviation value according to the method in step S12. Subsequently, this new temperature deviation value and the estimated frequency offset value exceeding the limit are used as inputs to start the gradient descent algorithm to calculate the power correction. This algorithm defines an objective function, the value of which is the square of the difference between the frequency offset estimated based on the latest thermal state and thermal-frequency relationship and the zero offset after applying a certain power adjustment.

[0074] The algorithm iterates starting from zero power adjustment. The fixed step size, a key parameter, is set based on data analysis of historical successful amendment cases. The median of the power adjustment change in each iteration is calculated, and this is fine-tuned after considering the convergence speed and stability from numerous simulation tests. The tolerance threshold is derived from the product's maximum allowable frequency offset, using the thermal-frequency relationship to back-calculate the corresponding objective function error value, and then multiplied by a safety factor of 0.1. The maximum number of iterations is determined by combining the real-time requirements of the control cycle with the 99th percentile of historical convergent iterations, taking the smaller value and rounding it up.

[0075] In each iteration, the algorithm calculates the gradient of the objective function with respect to the power adjustment, and then updates the power adjustment in the opposite direction of the gradient with a preset fixed step size. The iteration continues until the objective function value is less than the tolerance threshold or the number of iterations reaches its maximum value. At this point, the output power adjustment is the corrected power.

[0076] The system uses the calculated corrected power as a compensation amount and adds it to the power values ​​for a future period on the corrected heating power curve generated in step S15, forming a new compensated heating power curve. Finally, the system immediately uses this compensated curve as a new feedforward input, and, combined with real-time temperature feedback, re-executes the incremental PID control algorithm calculation in step S16, thereby quickly generating a final control signal that incorporates frequency stability compensation.

[0077] Once backtracking optimization is triggered and a compensated heating power curve is generated, the system immediately uses the latest crystal oscillator internal temperature and ambient temperature data as feedback input, and combines them with the compensated heating power curve to execute the calculation of the incremental PID control algorithm. This process is completed within one control cycle, thereby ensuring that the final output control signal is the optimal decision based on the latest system state and the optimized target.

[0078] This step introduces a supervised optimization layer with frequency stability as the ultimate goal, achieving a leap from simple temperature control to dual temperature-frequency stability control. It utilizes the thermal-electrical-frequency mapping relationship for real-time prediction and judgment, and proactively backtracks to the thermal analysis stage in case of anomalies. Through gradient descent optimization, it rapidly generates compensation strategies, ensuring the extreme stability of the crystal oscillator's output frequency under dynamic environments and low-power operation. This is the core guarantee mechanism for achieving the high stability target of this method.

[0079] In step S18, the crystal oscillator is temperature controlled by pulse width modulation according to the final control signal.

[0080] Specifically, the input data for this step is the final control signal, a dimensionless digital quantity representing the desired heating power intensity. The system internally has a fixed pulse-width modulation carrier period, which corresponds to the standard operating frequency of the power switching devices.

[0081] The control process first converts the final control signal value into a corresponding duty cycle. The duty cycle is calculated by dividing the final control signal value by the maximum allowable value of the control signal, resulting in a proportionality coefficient between zero and one. This proportionality coefficient represents the proportion of time the heating power device should be on within a complete carrier cycle. Based on this duty cycle and the known carrier cycle, the system's internal digital controller generates a digital pulse waveform signal with a corresponding high-level width.

[0082] This digital pulse waveform is fed into a hardware pulse width modulation (PWM) module. This module typically contains a digital comparator and a triangular wave or sawtooth wave generator. The waveform generator produces a periodic triangular wave signal with a frequency corresponding to a preset carrier period. The digital comparator compares the DC level representing the duty cycle with the triangular wave signal in real time. When the instantaneous value of the triangular wave is lower than the DC level, the comparator outputs a high level; otherwise, it outputs a low level. Through this process, the digitized duty cycle command is converted into a pulse sequence with precise time width.

[0083] The generated pulse sequence, after being amplified and electrically isolated by the drive circuit, directly controls the gate of a power switching device (such as a metal-oxide-semiconductor field-effect transistor) connected in series in the heating circuit. When the pulse is high, the power switching device is turned on, heating current flows through the heating element, and electrical energy is converted into heat energy. When the pulse is low, the power switching device is turned off, and heating stops. By adjusting the high-level width of the pulse (i.e., the duty cycle), the average power injected into the heater within one cycle is precisely controlled, thereby achieving continuous and smooth adjustment of the heating intensity.

[0084] In the design of the driver circuit, a key protection and optimization parameter is set: dead time. Dead time refers to the brief delay time inserted between the turn-off and turn-on of one of the complementary power switching devices, used to prevent shoot-through short circuits between the upper and lower bridge arms. The specific threshold of this dead time is not arbitrarily set, but determined through experimental statistical methods. During the hardware testing phase, the switching characteristics of a batch of power switching devices are measured, and the actual delay time distribution from turn-off to complete turn-off and from the issuance of the turn-on signal to complete turn-on is statistically analyzed. The sum of the "maximum turn-off delay time" and the "maximum turn-on delay time" from all samples is taken, and its 95th percentile value is used as the base dead time. An engineering margin (e.g., 20%) is added to this base dead time to obtain the final fixed dead time threshold, which is then written into the configuration register of the driver chip.

[0085] This step is the final physical execution stage of the entire closed-loop control chain. It transforms the intelligent control command, calculated through all the preceding steps (including initial deviation calculation, thermal response simulation, global energy consumption optimization, dynamic power correction, closed-loop PID adjustment, and frequency stability backtracking optimization), which embodies the dual optimization goals of low power consumption and high stability, into actual heating energy acting on the controlled object. The successful execution of this step directly determines whether the optimization effects of all previous algorithms can be realized in the physical world. It is an indispensable key hardware action for ultimately achieving the invention goal of balancing low power consumption and high stability of the crystal oscillator.

[0086] Reference Figure 2 The second embodiment of the present invention provides an energy-saving control system for a temperature-controlled crystal oscillator, comprising: The data acquisition module is used to acquire ambient temperature data and the internal temperature of the crystal oscillator; The difference calculation module is used to calculate the difference based on the ambient temperature data and the internal temperature of the crystal oscillator to obtain the initial temperature deviation. The simulation module is used to perform heat conduction simulation based on the initial temperature deviation using a pre-built heat conduction model to obtain the thermal response time. The optimal path module is used to search for the optimal energy consumption path based on the thermal response time to obtain a preliminary heating power curve. The correction module is used to correct the initial heating power curve based on the internal temperature of the crystal oscillator and a preset temperature change threshold, so as to obtain a corrected heating power curve. The preliminary adjustment module is used to perform closed-loop feedback adjustment calculations based on the modified heating power curve using an incremental PID control algorithm to obtain a preliminary control signal. The optimization and adjustment module is used to extract the power output value based on the preliminary control signal, and to perform frequency stability judgment and backtracking optimization based on the extraction result and the preset frequency locking threshold to obtain the final control signal. The output module is used to perform constant temperature control of the crystal oscillator by pulse width modulation according to the final control signal.

[0087] It should be noted that the energy-saving control system for a thermostatic crystal oscillator provided in this embodiment of the invention is used to execute all the process steps of the energy-saving control method for a thermostatic crystal oscillator in the above embodiment. The working principles and beneficial effects of the two are one-to-one, so they will not be described again.

[0088] This invention also provides an electronic device. The electronic device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, such as an energy-saving control program for a cryogenic crystal oscillator. When the processor executes the computer program, it implements the steps in the above-described energy-saving control method embodiments for cryogenic crystal oscillators, for example... Figure 1 Step S11 is shown. Alternatively, when the processor executes the computer program, it implements the functions of each module / unit in the above system embodiments, such as the energy-saving control module of the temperature-controlled crystal oscillator.

[0089] For example, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the electronic device.

[0090] The electronic device may be a desktop computer, laptop, handheld computer, or smart tablet, etc. The electronic device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the above components are merely examples of electronic devices and do not constitute a limitation on the electronic device. It may include more or fewer components than described above, or combine certain components, or different components. For example, the electronic device may also include input / output devices, network access devices, buses, etc.

[0091] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the electronic device, connecting all parts of the electronic device via various interfaces and lines.

[0092] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function, etc.; the data storage area may store data created based on the use of the mobile phone, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0093] Wherein, if the modules / units integrated in the electronic device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or system capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.

[0094] It should be noted that the system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the system embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.

[0095] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.

Claims

1. An energy-saving control method for a temperature-controlled crystal oscillator, characterized in that, include: Acquire ambient temperature data and the internal temperature of the crystal oscillator; Based on the ambient temperature data and the internal temperature of the crystal oscillator, the difference is calculated to obtain the initial temperature deviation; Based on the initial temperature deviation, thermal conduction simulation is performed using a pre-built thermal conduction model to obtain the thermal response time; Based on the thermal response time, an optimal energy consumption path search is performed to obtain a preliminary heating power curve; The preliminary heating power curve is corrected based on the internal temperature of the crystal oscillator and a preset temperature change threshold to obtain a corrected heating power curve. Based on the modified heating power curve, a preliminary control signal is obtained by performing closed-loop feedback regulation calculations using an incremental PID control algorithm. Based on the preliminary control signal, the power output value is extracted, and frequency stability is judged and backtracked optimization is performed based on the extraction result and the preset frequency locking threshold to obtain the final control signal. Based on the final control signal, the crystal oscillator isothermal control is performed by pulse width modulation.

2. The energy-saving control method for a temperature-controlled crystal oscillator according to claim 1, characterized in that, The step of calculating the difference between the ambient temperature data and the internal temperature of the crystal oscillator to obtain the initial temperature deviation includes: Based on the ambient temperature data and the internal temperature of the crystal oscillator, a temperature gradient matrix is ​​obtained through first-order difference calculation. Based on the temperature gradient matrix, nonlinear perturbation feature points are identified using the isolated forest algorithm, and the nonlinear perturbation feature points are optimally fused and estimated using the Kalman filter algorithm to obtain the nonlinear thermal coupling difference. Based on the nonlinear thermal coupling difference, the difference is corrected using a pre-built nonlinear correction model to obtain the initial temperature deviation; The nonlinear correction model is constructed based on the gradient boosting decision tree algorithm.

3. The energy-saving control method for a temperature-controlled crystal oscillator according to claim 1, characterized in that, The step of performing heat conduction simulation based on the initial temperature deviation using a pre-built heat conduction model to obtain the thermal response time includes: The initial temperature deviation is loaded onto a heat conduction model pre-constructed using a three-dimensional finite element model for transient thermal analysis simulation, resulting in a transient heat flux density distribution field containing heat flux density time-series data. The thermal response simulation curve is formed by connecting the time-series data of the transient heat flux density distribution field in chronological order. The thermal response simulation curve is fitted with a first-order exponential function using the least squares method to obtain the thermal response fitting function, and the time constant term is extracted from the thermal response fitting function as the thermal response time.

4. The energy-saving control method for a temperature-controlled crystal oscillator according to claim 1, characterized in that, The step of performing an energy-optimal path search based on the thermal response time to obtain a preliminary heating power curve includes: The physical structure and thermal parameters of the crystal oscillator are obtained, and combined with the internal temperature of the crystal oscillator, an equivalent thermal resistance network model of the crystal oscillator is constructed using the lumped parameter thermal network method. Based on the equivalent thermal resistance network model and the thermal response time, the continuous temperature in the equivalent thermal resistance network model is divided into equal intervals to generate a temperature state model containing discrete temperature nodes. Based on the temperature state model and the thermal response time, the minimum energy consumption required for state transitions between discrete temperature nodes within the thermal response time is solved using the first law of thermodynamics and the heat conduction equation, thereby generating a state transition energy matrix. Based on the state transition energy matrix and the thermal response time, the Bellman optimality equation with time constraints is constructed and solved. Based on the Bellman optimality equation, a full path search is performed from the initial temperature state to the target temperature state to identify the optimal temperature state sequence containing the temperature state change that has the lowest cumulative energy cost under the condition of satisfying the thermal response time. Based on the optimal temperature state sequence and the equivalent thermal resistance network model, reverse power calculation is performed to convert the temperature state change into the heating power value required to drive the temperature state change, thus obtaining a heating power set. The heating power set is continuously fitted using cubic spline interpolation to obtain a preliminary heating power curve.

5. The energy-saving control method for a temperature-controlled crystal oscillator according to claim 1, characterized in that, The step of correcting the initial heating power curve based on the internal temperature of the crystal oscillator and a preset temperature change threshold to obtain a corrected heating power curve includes: The temperature change rate is calculated using a sliding time window algorithm based on the internal temperature of the crystal oscillator. When the temperature change rate does not exceed the preset temperature change threshold, the preliminary heating power curve is directly used as the corrected heating power curve. When the temperature change rate exceeds the preset temperature change threshold, the change time window of the temperature change rate is captured, and the standard deviation of the internal temperature of the crystal oscillator within the change time window is calculated to obtain the crystal oscillator temperature fluctuation value. The crystal oscillator temperature fluctuation value is converted into the corresponding correction power by querying the preset fluctuation characteristic-correction power mapping table, and the correction power is superimposed on the initial heating power curve to obtain the correction heating power curve.

6. The energy-saving control method for a temperature-controlled crystal oscillator according to claim 1, characterized in that, The step involves extracting the power output value based on the preliminary control signal, and then performing frequency stability judgment and backtracking optimization based on the extraction result and a preset frequency lock-in threshold to obtain the final control signal, including: Based on the initial control signal, the heating circuit is driven by pulse width modulation, and the voltage and current in the heating circuit are obtained; The thermoelectric power is calculated using Ohm's law based on the voltage and current. Based on the thermoelectric power and the preset thermo-frequency conversion coefficient matrix, the estimated frequency offset value is obtained through matrix multiplication. When the estimated frequency offset value does not exceed the preset frequency locking range, the preliminary control signal is directly used as the final control signal; When the estimated frequency offset value exceeds the preset frequency locking threshold range, the difference is recalculated based on the ambient temperature data and the internal temperature of the crystal oscillator to obtain a new temperature deviation value. Based on the new temperature deviation value and the estimated frequency offset value, the power correction is calculated using the gradient descent algorithm to obtain the corrected power; The corrected power is superimposed on the corrected heating power curve to obtain the compensated heating power curve; Based on the compensated heating power curve, the final control signal is obtained by calculating using an incremental PID control algorithm.

7. An energy-saving control system for a temperature-controlled crystal oscillator, characterized in that, include: The data acquisition module is used to acquire ambient temperature data and the internal temperature of the crystal oscillator; The difference calculation module is used to calculate the difference based on the ambient temperature data and the internal temperature of the crystal oscillator to obtain the initial temperature deviation. The simulation module is used to perform heat conduction simulation based on the initial temperature deviation using a pre-built heat conduction model to obtain the thermal response time. The optimal path module is used to search for the optimal energy consumption path based on the thermal response time to obtain a preliminary heating power curve. The correction module is used to correct the initial heating power curve based on the internal temperature of the crystal oscillator and a preset temperature change threshold, so as to obtain a corrected heating power curve. The preliminary adjustment module is used to perform closed-loop feedback adjustment calculations based on the modified heating power curve using an incremental PID control algorithm to obtain a preliminary control signal. The optimization and adjustment module is used to extract the power output value based on the preliminary control signal, and to perform frequency stability judgment and backtracking optimization based on the extraction result and the preset frequency locking threshold to obtain the final control signal. The output module is used to perform constant temperature control of the crystal oscillator by pulse width modulation according to the final control signal.

8. The energy-saving control system for a temperature-controlled crystal oscillator according to claim 7, characterized in that, The simulation module includes: The transient thermal analysis unit is used to load the initial temperature deviation onto the heat conduction model pre-constructed by the three-dimensional finite element model to perform transient thermal analysis simulation, and obtain the transient heat flux density distribution field containing heat flux density time series data. The thermal curve generation unit is used to connect the time-series data of the heat flux density in the transient heat flux density distribution field in time order to form a thermal response simulation curve; The exponential fitting and constant extraction unit is used to perform first-order exponential function fitting on the thermal response simulation curve using the least squares method to obtain the thermal response fitting function, and extract the time constant term from the thermal response fitting function as the thermal response time.

9. The energy-saving control system for a thermostatic crystal oscillator according to claim 7, characterized in that, The correction module includes: The temperature change rate calculation unit is used to calculate the temperature change rate based on the internal temperature of the crystal oscillator using a sliding time window algorithm. The threshold comparison unit is used to directly use the preliminary heating power curve as the corrected heating power curve when the temperature change rate does not exceed the preset temperature change threshold. The temperature fluctuation extraction unit is used to extract the time window of the temperature change rate when the temperature change rate exceeds the preset temperature change threshold, and calculate the standard deviation of the internal temperature of the crystal oscillator within the time window to obtain the crystal oscillator temperature fluctuation value. The power correction mapping unit is used to convert the crystal oscillator temperature fluctuation value into the corresponding correction power by querying a preset fluctuation characteristic-correction power mapping relationship table, and to superimpose the correction power onto the initial heating power curve to obtain the correction heating power curve.

10. The energy-saving control system for a temperature-controlled crystal oscillator according to claim 7, characterized in that, The difference calculation module includes: The temperature gradient calculation unit is used to calculate the temperature gradient matrix based on the ambient temperature data and the internal temperature of the crystal oscillator through first-order difference operations. The perturbation estimation unit is used to identify nonlinear perturbation feature points based on the temperature gradient matrix using the isolated forest algorithm, and to perform optimal fusion estimation on the nonlinear perturbation feature points using the Kalman filter algorithm to obtain the nonlinear thermal coupling difference. The nonlinear correction unit is used to correct the nonlinear thermal coupling difference using a pre-built nonlinear correction model to obtain the initial temperature deviation.