Crystal determination method, device and storage medium

By obtaining multiple temperature values ​​and frequency deviation values ​​of the crystal in the preset temperature segment, calculating the fitting first term coefficient and constant term value, and using multiple indicators to make judgments, the fitting frequency deviation curve fitting in the prior art is solved. The problem of inaccuracy improves the accuracy and reliability of crystal judgment.

CN112292814BActive Publication Date: 2024-11-15HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201880094853.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-07-05
Publication Date
2024-11-15
Estimated Expiration
2038-07-05

AI Technical Summary

Technical Problem

In the prior art, the first term coefficient value and constant term value in the frequency deviation curve fit of the crystal are inaccurate, resulting in many unqualified crystals being unable to be discovered.

Method used

By obtaining at least three temperature values ​​of the crystal in the preset temperature segment and its corresponding frequency deviation values, the fitted first term coefficient value and constant term value are calculated using the least squares method or the average value method, and the mean square deviation, correlation coefficient and Determine indicators such as residual value difference to improve the accuracy of judgment.

Benefits of technology

The accuracy and reliability of the crystal judgment results are improved, the discovery rate of unqualified crystals is ensured, and the problem of excessive difference between the frequency deviation curve fitting results and the actual curve is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112292814B_ABST
    Figure CN112292814B_ABST
Patent Text Reader

Abstract

A crystal determination method, device and storage medium, wherein the method comprises: obtaining at least three temperature values ​​of the crystal in a preset temperature range, and a test frequency deviation value corresponding to each temperature value, determining the fitted linear term coefficient value and the fitted constant term value of the frequency deviation curve corresponding to the crystal when the crystal is in the preset temperature range according to the at least three temperature values ​​and the test frequency deviation value corresponding to each temperature value, and determining whether the crystal is qualified according to the obtained fitted linear term coefficient value and the fitted constant term value. The determination result of the method has high accuracy and reliability, and avoids the problem that unqualified crystals cannot be found.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a crystal determination method, device and storage medium. Background Art

[0002] Normally, the clock source on the chip is usually implemented by a passive crystal. Since the frequency deviation value of the passive crystal changes with the temperature value, a thermistor is usually added to test the temperature value of the passive crystal for chips with strict requirements on the clock frequency deviation value, and then the frequency deviation curve is fitted using different frequency deviation values ​​under different temperature values, and the frequency deviation compensation is performed based on the frequency deviation curve and temperature value. At present, the frequency deviation value and temperature value of the crystal are represented by the following fitting frequency deviation curve: f(t) = c3(t-t0) 3 +c2(t-t0) 2 +c1(t-t0)+c0, where t is the temperature value, t0 is the reference temperature value, c0 is the constant term, c1 is the coefficient of the first-order term, c2 is the coefficient of the second-order term, c3 is the coefficient of the third-order term, and f(t) is the frequency deviation value when the temperature value is t.

[0003] At present, based on the correspondence between the frequency deviation value and the temperature value, the c1 value and the c0 value can be calculated by extracting the frequency deviation values ​​corresponding to the two temperature values, and the c1 value and the c0 value are used to determine whether the crystal is qualified. When the crystal is determined to be qualified, the c1 value and the c0 value are used as the c1 value and the c0 value of the fitting frequency deviation curve, and the c2 value and the c3 value use the given default value. Specifically, first extract the frequency deviation value corresponding to a temperature value, and then extract the frequency deviation value corresponding to the second temperature value after raising the given temperature. Since the frequency deviation curve in the normal temperature section is close to a straight line, the second-order term and the third-order term can be ignored. In this way, the c1 value and the c0 value can be solved by using the straight line fitted by the two temperature values ​​and the corresponding frequency deviation value. Secondly, determine whether the c1 value and the c0 value meet the preset threshold values ​​respectively. If not, the crystal is directly judged as unqualified.

[0004] However, the c1 and c0 values ​​calculated by the above method may have large deviations, resulting in many unqualified crystals not being found. For example, when the crystal frequency deviation curve has a large jump between two temperature values, and the frequency deviation value corresponding to one of the temperature values ​​happens to be between unstable frequency deviation values, the c1 and c0 values ​​calculated by the above method may not be accurate, but may meet the threshold values ​​of the c1 and c0 values, so that the full-temperature frequency deviation curve fitted by the c1 and c0 values ​​will differ greatly from the actual frequency deviation curve. Summary of the invention

[0005] The embodiments of the present application provide a crystal determination method, device and storage medium to solve the problem in the prior art that many unqualified crystals cannot be found due to inaccurate first-order phase coefficient values ​​and constant term values ​​corresponding to the fitted frequency deviation curve of the crystal.

[0006] The first aspect of the present application provides a crystal determination method, comprising:

[0007] Obtaining at least three temperature values ​​of the crystal in a preset temperature range, and a test frequency deviation value corresponding to each of the temperature values;

[0008] According to the at least three temperature values ​​and the test frequency deviation value corresponding to each temperature value, the fitting linear coefficient value c1 and the fitting constant term value c0 of the frequency deviation curve f(t) corresponding to the crystal when the crystal is in the preset temperature range are determined. The frequency deviation curve f(t) is expressed by formula (1):

[0009] f(t)=c1(t-t0)+c0 (1)

[0010] Where, t: temperature value variable, t0: reference temperature value, f(t): frequency deviation value when temperature value is t;

[0011] Whether the crystal is qualified is determined based on the fitting linear term coefficient value c1 and the fitting constant term value c0.

[0012] The technical solution of the present application uses at least three temperature values ​​and the frequency deviation values ​​corresponding to each temperature value to determine whether the crystal is qualified. There are many temperature values ​​and frequency deviation values ​​involved in the determination, and the determination result is accurate and reliable, thus avoiding the problem of unqualified crystals not being discovered.

[0013] Optionally, in a possible implementation manner of the first aspect, determining, according to the at least three temperature values ​​and the test frequency deviation value corresponding to each of the temperature values, a fitting linear term coefficient value c1 and a fitting constant term value c0 of a frequency deviation curve f(t) of the crystal in the preset temperature range, includes:

[0014] The at least three temperature values ​​and the test frequency deviation value corresponding to each temperature value are used to calculate the fitting linear term coefficient value c1 and the fitting constant term value c0 of the frequency deviation curve f(t) by the least square method.

[0015] In this embodiment, the least squares method can be used to easily obtain the fitting linear coefficient value c1 and the fitting constant term value c0, and the sum of the squares of the errors between the obtained fitting linear coefficient value c1 and the fitting constant term value c0 and the theoretical values ​​is minimized, laying the foundation for obtaining accurate crystal determination results later.

[0016] Optionally, in another possible implementation of the first aspect, determining, according to the at least three temperature values ​​and the test frequency deviation value corresponding to each of the temperature values, a fitting linear term coefficient value c1 and a fitting constant term value c0 of the frequency deviation curve f(t) of the crystal in the preset temperature range, includes:

[0017] Determine at least two groups of undetermined coefficients of the frequency deviation curve according to two temperature values ​​among the at least three temperature values ​​and the frequency deviation test value corresponding to each temperature value, each group of the undetermined coefficients comprising: a linear term coefficient value and a constant term value;

[0018] Determine the average value of the linear term coefficients according to the at least two groups of undetermined coefficients and the mean value of the constant term The average value of the linear coefficient is the average value of all linear coefficients in the at least two groups of undetermined coefficients, and the average value of the constant term is the average value of all constant terms in the at least two groups of undetermined coefficients;

[0019] The average value of the linear coefficient As the coefficient value c1 of the fitting first-order term, the average value of the constant term As the fitting constant term value c0.

[0020] Since the average value can reflect the trend in a set of data, the average value of the linear coefficient Closer to the slope of the above frequency deviation curve, the average value of the above constant term It is closer to the constant term of the above frequency deviation curve, so the average value of the coefficient of the first term is As the fitting coefficient value c1 of the frequency deviation curve, the average value of the constant term The fitted constant term value c0 of the frequency deviation curve can more accurately reflect the trends of the linear term coefficient value and the constant term value, and the obtained fitted linear term coefficient value and the fitted constant term value have high accuracy.

[0021] Optionally, in this possible implementation manner of the first aspect, judging whether the crystal is qualified according to the fitting linear term coefficient value c1 and the fitting constant term value c0 includes:

[0022] Based on the following formula (2), according to all the linear coefficient values ​​in the at least two groups of undetermined coefficients and the average value of the linear coefficients Calculate the mean square error σ of the fitting linear coefficient value c1 c1 ;

[0023]

[0024] Based on the following formula (3), according to all the constant terms in the at least two groups of unknown coefficients and the average value of the constant terms Calculate the mean square error σ of the fitting constant term c0 c0 ;

[0025]

[0026] Where, (c1) j is the coefficient value of the first-order term in the jth group of undetermined coefficients, (c0) j is the value of the constant term in the jth group of undetermined coefficients, M is the number of groups of the at least two groups of undetermined coefficients, and j is a positive integer greater than or equal to 1 and less than or equal to M;

[0027] According to the mean square error σ of the fitting linear coefficient value c1 c1 And the mean square error σ of the fitting constant term c0 c0 , determine whether the crystal is qualified.

[0028] In the embodiment of the present application, the mean square error can be used to describe the characteristics of the degree of dispersion of each data in the data set and the average value, and the mean square error σ of the fitting linear coefficient value c1 is calculated. c1 And the mean square error σ of the fitted constant term c0 c0 , and then determine whether the crystal is qualified. This method is easy to implement and has high determination accuracy.

[0029] Optionally, in another possible implementation of the first aspect, the method further includes:

[0030] When the crystal is determined to be qualified according to the fitting linear coefficient value c1 and the fitting constant term value c0, based on the frequency deviation curve f(t), the fitting frequency deviation value f(t) corresponding to each of the at least three temperature values ​​is obtained by the following formula (4): i ) and test frequency deviation value The correlation coefficient R 2 ;

[0031]

[0032] In the formula, f(t i ) is the fitted frequency deviation value of the ith temperature value obtained based on the frequency deviation curve f(t), is the test frequency deviation value of the ith temperature value, is the frequency deviation average value of N temperature values ​​obtained based on the frequency deviation curve f(t), N is the number of the at least three temperature values, and i is a positive integer greater than or equal to 1 and less than or equal to N;

[0033] According to the correlation coefficient value R 2, update the determination result of whether the crystal is qualified.

[0034] In this technical solution, since the correlation coefficient between the fitting frequency deviation value and the test frequency deviation value can reflect the accuracy of the above-determined fitting linear coefficient value c1 and the fitting constant term value c0, the result of determining whether the crystal is qualified by this technical solution is more accurate and more reliable.

[0035] Optionally, in another possible implementation manner of the first aspect, the method further includes:

[0036] When the crystal is determined to be qualified according to the fitted linear coefficient value c1 and the fitted constant term value c0, at least two groups of undetermined coefficients of the frequency deviation curve are determined according to two adjacent temperature values ​​among the at least three temperature values ​​and the frequency deviation test value corresponding to each temperature value, each group of the undetermined coefficients includes: a linear coefficient value and a constant term value;

[0037] According to the at least two groups of undetermined coefficients, at least one group of absolute values ​​of the undetermined coefficients is obtained, each group of absolute values ​​of the undetermined coefficients includes: an absolute value of a linear term coefficient and an absolute value of a constant term coefficient, the absolute value of the linear term coefficient is the absolute value of the difference between two linear term coefficient values ​​in two adjacent groups of undetermined coefficients, and the absolute value of the constant term coefficient is the absolute value of the difference between two constant term values ​​in two adjacent groups of undetermined coefficients;

[0038] The determination result of whether the crystal is qualified is updated according to the at least one group of absolute values ​​of the coefficients to be determined.

[0039] This technical solution determines whether the crystal is qualified based on the fitted linear coefficient value c1 and the fitted constant term value c0, and adds the variation range of adjacent linear coefficient values ​​and constant term values ​​to further determine whether the crystal is qualified. While ensuring the accuracy of the determination result, the technical solution is simple and easy to implement.

[0040] Optionally, in another possible implementation manner of the first aspect, the method further includes:

[0041] When the crystal is determined to be qualified according to the fitting linear term coefficient value c1 and the fitting constant term value c0, a fitting frequency deviation value corresponding to each temperature value of the at least three temperature values ​​is obtained based on a frequency deviation curve f(t) obtained by the fitting linear term coefficient value c1 and the fitting constant term value c0;

[0042] Based on the following formula (5), according to the test temperature value corresponding to each of the at least three temperature values ​​and the fitting frequency deviation value corresponding to each of the at least three temperature values, the residual value difference corresponding to each of the at least three temperature values ​​is determined;

[0043]

[0044] In the formula, RES(t i ) is the residual value difference corresponding to the i-th temperature value, f(t i ) is the fitted frequency deviation value of the ith temperature value obtained based on the frequency deviation curve f(t), is the test frequency deviation value of the i-th temperature value, where i is one temperature value among the at least three temperature values;

[0045] Based on the residual value difference corresponding to each of the at least three temperature values, the determination result of whether the crystal is qualified is updated.

[0046] This technical solution, based on determining whether the crystal is qualified according to the fitting linear coefficient value c1 and the fitting constant term value c0, adds a residual value difference to assist in judging whether the crystal is qualified, thereby making the crystal identification more accurate.

[0047] Optionally, in this possible implementation manner of the first aspect, updating the determination result of whether the crystal is qualified based on the residual value difference corresponding to each of the at least three temperature values ​​includes:

[0048] Based on the following formula (6), at least two residual error change rates RES_s are determined according to the residual value differences corresponding to two adjacent temperature values ​​in the at least three temperature values;

[0049]

[0050] Wherein, t2 and t1 are two adjacent temperature values ​​among the at least three temperature values, RES(t1) is the residual value difference corresponding to the temperature value t1, RES(t2) is the residual value difference corresponding to the temperature value t2, and t2 is greater than t1;

[0051] The determination result of whether the crystal is qualified is updated according to the at least two residual error change rates RES_s.

[0052] This technical solution determines whether the crystal is qualified based on the fitting coefficient value c1 and the fitting constant term value c0, and then judges whether the crystal is qualified based on the residual error change rate. This can ensure the accuracy of all frequency deviation points fitted on the frequency deviation curve, making the crystal identification more accurate.

[0053] A second aspect of the present application provides a crystal determination device, comprising: a crystal, a temperature sensor, an analog-to-digital converter ADC, and a power management unit PMU chip;

[0054] The temperature sensor is used to obtain at least three temperature values ​​of the crystal in a preset temperature range, and a test frequency deviation value corresponding to each of the temperature values;

[0055] The ADC is used to perform analog-to-digital conversion processing on the at least three temperature values ​​acquired by the temperature sensor and the test frequency deviation value corresponding to each of the temperature values;

[0056] The PMU chip is used to determine, according to the at least three temperature values ​​processed by the ADC and the test frequency deviation value corresponding to each of the temperature values, a fitting linear term coefficient value c1 and a fitting constant term value c0 of the frequency deviation curve f(t) corresponding to the crystal when the crystal is in the preset temperature range, and to determine whether the crystal is qualified according to the determined fitting linear term coefficient value c1 and the fitting constant term value c0;

[0057] The frequency deviation curve f(t) is expressed by formula (1):

[0058] f(t)=c1(t-t0)+c0 (1)

[0059] Wherein, t: temperature value variable, t0: reference temperature value, f(t): frequency deviation value when temperature value is t.

[0060] Optionally, in a possible implementation of the second aspect, the PMU chip is specifically used to use the at least three temperature values ​​processed by the ADC and the test frequency deviation value corresponding to each of the temperature values ​​to calculate the fitting linear term coefficient value c1 and the fitting constant term value c0 of the frequency deviation curve f(t) through the least squares method.

[0061] Optionally, in another possible implementation of the second aspect, the PMU chip is specifically used to determine at least two groups of undetermined coefficients of the frequency deviation curve according to two temperature values ​​of the at least three temperature values ​​processed by the ADC and the frequency deviation test value corresponding to each temperature value, and determine the average value of the linear term coefficient according to the at least two groups of undetermined coefficients. and the mean value of the constant term And the average value of the linear coefficient As the coefficient value c1 of the fitting first-order term, the average value of the constant term As the fitting constant term value c0;

[0062] Each group of undetermined coefficients includes: a linear term coefficient value and a constant term value, and the average value of the linear term coefficient is is the average value of all linear coefficients in the at least two groups of undetermined coefficients, and the average value of the constant term is the average value of all constant terms in the at least two groups of undetermined coefficients.

[0063] Optionally, in this possible implementation of the second aspect, the PMU chip is further used to calculate, based on the following formula (2), all linear coefficient values ​​in the at least two groups of undetermined coefficients and the average value of the linear coefficients: Calculate the mean square error σ of the fitting linear coefficient value c1 c1 , based on the following formula (3), according to all the constant terms in the at least two groups of unknown coefficients and the average value of the constant terms Calculate the mean square error σ of the fitting constant term c0 c0 , according to the mean square error σ of the fitting linear coefficient value c1 c1 And the mean square error σ of the fitting constant term c0 c0 , determine whether the crystal is qualified;

[0064]

[0065]

[0066] Where, (c1) j is the coefficient value of the first-order term in the jth group of undetermined coefficients, (c0) j is the constant term value in the jth group of undetermined coefficients, M is the number of groups of the at least two groups of undetermined coefficients, and j is a positive integer greater than or equal to 1 and less than or equal to M.

[0067] Optionally, in another possible implementation of the second aspect, the PMU chip is further used to obtain the fitting frequency deviation value f(t) corresponding to each of the at least three temperature values ​​based on the frequency deviation curve f(t) by the following formula (4) when determining that the crystal is qualified according to the fitting linear term coefficient value c1 and the fitting constant term value c0. i ) and test frequency deviation value The correlation coefficient R 2 , and according to the correlation coefficient value R 2 , updating the determination result of whether the crystal is qualified;

[0068]

[0069] In the formula, f(t i ) is the fitted frequency deviation value of the ith temperature value obtained based on the frequency deviation curve f(t), is the test frequency deviation value of the ith temperature value, is the frequency deviation average value of N temperature values ​​obtained based on the frequency deviation curve f(t), N is the number of the at least three temperature values, and i is a positive integer greater than or equal to 1 and less than or equal to N.

[0070] Optionally, in another possible implementation of the second aspect, the PMU chip is further used to determine at least two groups of undetermined coefficients of the frequency deviation curve according to two adjacent temperature values ​​among the at least three temperature values ​​after ADC processing and the frequency deviation test value corresponding to each temperature value when determining that the crystal is qualified according to the fitting linear term coefficient value c1 and the fitting constant term value c0, obtain at least one group of absolute values ​​of the undetermined coefficients according to the at least two groups of undetermined coefficients, and update the determination result of whether the crystal is qualified according to the at least one group of absolute values ​​of the undetermined coefficients.

[0071] Among them, each group of the undetermined coefficients includes: a linear coefficient value and a constant term value, and each group of the absolute values ​​of the undetermined coefficients includes: an absolute value of the linear coefficient and an absolute value of the constant term coefficient. The absolute value of the linear coefficient is the absolute value of the difference between the two linear coefficient values ​​in two adjacent groups of undetermined coefficients, and the absolute value of the constant term coefficient is the absolute value of the difference between the two constant term values ​​in two adjacent groups of undetermined coefficients.

[0072] Optionally, in another possible implementation of the second aspect, the PMU chip is further used to, when determining that the crystal is qualified according to the fitted linear coefficient value c1 and the fitted constant term value c0, obtain a fitted frequency deviation value corresponding to each of the at least three temperature values ​​based on a frequency deviation curve f(t) obtained by the fitted linear coefficient value c1 and the fitted constant term value c0, and determine a residual value difference corresponding to each of the at least three temperature values ​​according to a test temperature value corresponding to each of the at least three temperature values ​​after ADC processing and a fitted frequency deviation value corresponding to each of the at least three temperature values ​​based on the following formula (5), and update a determination result of whether the crystal is qualified based on the residual value difference corresponding to each of the at least three temperature values ​​after ADC processing;

[0073]

[0074] In the formula, RES(t i ) is the residual value difference corresponding to the i-th temperature value, f(t i ) is the fitted frequency deviation value of the ith temperature value obtained based on the frequency deviation curve f(t), is the test frequency deviation value of the i-th temperature value, and i is one temperature value among the at least three temperature values.

[0075] Optionally, in this possible implementation manner of the second aspect, the PMU chip is further used to update the determination result of whether the crystal is qualified based on the residual value difference corresponding to each of the at least three temperature values ​​after the ADC processing, specifically:

[0076] The PMU chip is further used to determine at least two residual error change rates RES_s based on the following formula (6) according to the residual value differences corresponding to two adjacent temperature values ​​of the at least three temperature values ​​after the ADC processing, and update the determination result of whether the crystal is qualified according to the at least two residual error change rates;

[0077]

[0078] In the formula, t2 and t1 are two adjacent temperature values ​​among the at least three temperature values, RES(t1) is the residual value difference corresponding to the temperature value t1, RES(t2) is the residual value difference corresponding to the temperature value t2, and t2 is greater than t1.

[0079] For the possible beneficial effects of the second aspect of the embodiments of the present application, please refer to the records of the possible implementations of the first aspect, and will not be repeated here.

[0080] A third aspect of an embodiment of the present application provides a crystal determination device, which includes an acquisition module, a processing module and a determination module. The acquisition module, the processing module and the determination module are used to execute the method provided in the first aspect of the present application.

[0081] A fourth aspect of an embodiment of the present application provides a crystal determination device, comprising at least one processing element (or chip) for executing each of the possible implementations of the above first aspect.

[0082] A fifth aspect of an embodiment of the present application provides a storage medium, wherein instructions are stored in the storage medium, and when the storage medium is run on a computer, the computer executes the method provided in the first aspect above.

[0083] A sixth aspect of an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the method provided in the first aspect.

[0084] In each of the above aspects, by obtaining at least three temperature values ​​of the crystal in a preset temperature range and the test frequency deviation value corresponding to each temperature value, and according to the at least three temperature values ​​and the test frequency deviation value corresponding to each temperature value, the fitting linear coefficient value c1 and the fitting constant term value c0 of the frequency deviation curve f(t) corresponding to the crystal in the preset temperature range are determined, and finally, according to the fitting linear coefficient value c1 and the fitting constant term value c0, whether the crystal is qualified is determined. In this technical solution, by using at least three temperature values ​​and the frequency deviation value corresponding to each temperature value to determine whether the crystal is qualified, the determination result is accurate and reliable, and the problem of unqualified crystals not being found is avoided. BRIEF DESCRIPTION OF THE DRAWINGS

[0085] Figure 1A schematic diagram of the structure of a crystal determination circuit provided in an embodiment of the present application;

[0086] Figure 2 A distribution diagram of two temperature points extracted in the prior art on an actual frequency deviation curve;

[0087] Figure 3 To use Figure 2 Distribution diagram of the fitted frequency deviation curve and the actual frequency deviation curve obtained by fitting two temperature points shown;

[0088] Figure 4 A schematic diagram of a flow chart of a first embodiment of a crystal determination method provided in an embodiment of the present application;

[0089] Figure 5 A schematic diagram of the flow chart of the second embodiment of the crystal determination method provided in the present application;

[0090] Figure 6 A schematic diagram of the process of the third embodiment of the crystal determination method provided in the present application;

[0091] Figure 7 for Figure 6 A schematic diagram of the distribution of each group of undetermined coefficients in the embodiment shown;

[0092] Figure 8 A schematic diagram of the flow chart of the fourth embodiment of the crystal determination method provided in the present application;

[0093] Fig. 9 A schematic diagram of the structure of a first embodiment of a crystal determination device provided in an embodiment of the present application;

[0094] Fig.10 This is a schematic diagram of the structure of Embodiment 2 of the crystal determination device provided in the embodiments of the present application. DETAILED DESCRIPTION

[0095] The crystal determination method provided in the following embodiments of the present application can be applied to a crystal determination circuit. Figure 1 This is a schematic diagram of the structure of a crystal determination circuit provided in an embodiment of the present application. Figure 1As shown, the crystal determination circuit may include a passive crystal 11, a temperature sensor 12, a power management unit (PMU) chip 13 and an analog-to-digital converter (ADC) 14. The temperature sensor 12 is in contact with the passive crystal 11, the analog-to-digital converter 14 is arranged on the power management unit chip 13, the temperature sensor 12 is electrically connected to the analog-to-digital converter 14, and the temperature sensor 12 is used to detect the temperature of the passive crystal 11 and transmit the detected temperature to the analog-to-digital converter 14 to determine the relationship between the temperature and the frequency deviation value of the passive crystal according to the value output by the analog-to-digital converter 14. Optionally, the crystal determination circuit may also include components such as a power supply, a resistor R1, and a load capacitor, and the crystal determination circuit also needs to be grounded, but the embodiments of the present application are not limited thereto.

[0096] The passive crystal involved in the embodiment of the present application needs to be used with the oscillator in the digital signal processor (DSP) chip. The advantage of the passive crystal is that there is no voltage problem, and the signal level is variable, that is, the signal level of the passive crystal oscillator is determined according to the oscillation circuit. The same crystal can be applied to a variety of voltages and can be used for DSPs with different clock signal voltage requirements, and the price is usually low. Therefore, under normal circumstances, if conditions permit, it is recommended to use a passive crystal. However, since the signal quality of the passive crystal is poor compared to the crystal oscillator, it is usually necessary to accurately match the peripheral circuit (capacitors, inductors, resistors, etc. for signal matching), and the peripheral configuration circuit needs to be adjusted accordingly when replacing crystals of different frequencies. Optionally, the passive crystal in the embodiment of the present application can be a quartz crystal with higher precision.

[0097] In the embodiment of the present application, the temperature sensor may be a thermistor with a negative temperature coefficient (NTC). Optionally, NTC refers to a thermistor phenomenon and material with a negative temperature coefficient whose resistance decreases exponentially with increasing temperature.

[0098] Optional, PMU chip is a highly integrated power management solution for portable applications, which integrates several types of traditional discrete power management devices into a single package, so as to achieve higher power conversion efficiency and lower power consumption, and fewer components to adapt to the reduced board space. PMU chip is a chip that is responsible for the conversion, distribution, detection and other power management of electric energy in electronic equipment systems.

[0099] Optionally, the analog-to-digital converter 14 refers to a device that converts a continuously changing analog signal into a discrete digital signal. In the embodiment of the present application, the analog-to-digital converter 14 is used to convert an analog temperature signal received from a temperature sensor into a discrete digital signal for processing by the PMU chip.

[0100] In the embodiments of the present application, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.

[0101] Firstly, the technical solution of the present application is briefly described below with respect to the problem that many unqualified crystals cannot be discovered in the prior art.

[0102] In the prior art, the c1 value and c0 value of the frequency deviation curve corresponding to the crystal are calculated at room temperature by extracting two temperature points of the crystal (each temperature point includes a temperature value and a frequency deviation value corresponding to the temperature value) and fitting. However, in some cases, the c1 value and c0 value calculated by this method may have a large deviation, resulting in many unqualified crystals not being discovered.

[0103] For example, Figure 2 The figure is a distribution diagram of two temperature points extracted in the prior art on an actual frequency deviation curve. Figure 3 To use Figure 2 The distribution diagram of the fitted frequency deviation curve and the actual frequency deviation curve obtained by fitting the two temperature points shown in FIG. Figure 2 As shown in FIG. 1 , when the actual frequency deviation curve of the crystal has a large jump between the first temperature point and the second temperature point, and one of the temperature points happens to be in an unstable frequency deviation curve segment, the c1 value and c0 value calculated by the prior art method may be inaccurate. However, sometimes the error threshold of the c1 value and c0 value is met, resulting in a large difference between the final fitted full-temperature frequency deviation curve and the actual frequency deviation curve. For details, please refer to Figure 3 As shown, in Figure 3 In the figure, the thin solid line represents the actual frequency deviation curve, and the thin dotted line represents the fitted frequency deviation curve.

[0104] In view of the above problems in the prior art, the embodiments of the present application provide a crystal determination method, device and storage medium, which are used to solve the problem that unqualified crystals cannot be found due to inaccurate first-order coefficient values ​​and constant term values ​​of the frequency deviation curve. The technical solution of the present application is described in detail below through specific embodiments.

[0105] It should be noted that the following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0106] Figure 4 Schematic diagram of the process of the first embodiment of the crystal determination method provided in the embodiment of the present application. Optionally, the crystal determination method is applied to Figure 1 In the scenario shown. Figure 4 As shown, in the embodiment of the present application, the crystal determination method may include the following steps:

[0107] Step 41: Obtain at least three temperature values ​​of the crystal in a preset temperature range, and a test frequency deviation value corresponding to each temperature value.

[0108] Optionally, in the embodiments of the present application, when it is necessary to determine whether a crystal is qualified, the above Figure 1 The crystal determination circuit shown first controls the temperature of the crystal to change within a preset temperature range, and then obtains at least three temperature values ​​of the crystal in the preset temperature range through a testing method. Correspondingly, the test frequency deviation value of the crystal at each of the above temperature values ​​is obtained through a testing method.

[0109] Optionally, in this embodiment, the preset temperature section may refer to a normal temperature section in common parlance. Normally, the temperature range of the normal temperature section may be 0°C to 25°C.

[0110] Step 42: Determine the fitting linear coefficient value c1 and the fitting constant term value c0 of the frequency deviation curve f(t) corresponding to the crystal when the crystal is in the preset temperature range according to the at least three temperature values ​​and the test frequency deviation value corresponding to each temperature value.

[0111] The frequency deviation curve is expressed by formula (1):

[0112] f(t)=c1(t-t0)+c0 (1)

[0113] Optionally, in the embodiment of the present application, it has been proved in practice that the frequency deviation curve of the crystal in the normal temperature range is close to a straight line. Therefore, when the crystal is in the above-mentioned preset temperature range, the frequency deviation curve of the crystal can be expressed by the above-mentioned formula (1). In the formula, t0 is the reference temperature value, c0 is the value of the fitting constant term to be determined, c1 is the value of the fitting linear term coefficient to be determined, t is the temperature value variable, and f(t) refers to the frequency deviation value when the temperature value is t.

[0114] In this embodiment, after obtaining the above-mentioned at least three temperature values ​​of the crystal and the test frequency deviation value corresponding to each temperature value, the above-mentioned at least three temperature values ​​and the test frequency deviation value corresponding to each temperature value are substituted into the above-mentioned formula (1) to calculate the fitting linear coefficient value c1 and the fitting constant term value c0 of the frequency deviation curve f(t) corresponding to the crystal when the crystal is in the above-mentioned preset temperature range.

[0115] Optionally, the possible implementation method of this step (determining the fitting first-order coefficient value c1 and the fitting constant term value c0 of the frequency deviation curve f(t) corresponding to the crystal when the crystal is in a preset temperature range based on the above-mentioned at least three temperature values ​​and the test frequency deviation value corresponding to each temperature value) can be any one of the following two possible implementation methods, and please refer to the following introduction for details.

[0116] Optionally, in a possible implementation of the present application, this step may be implemented by the following possible implementation, which is as follows:

[0117] By using the at least three temperature values ​​and the test frequency deviation value corresponding to each temperature value, the fitting linear term coefficient value c1 and the fitting constant term value c0 of the frequency deviation curve f(t) are calculated by the least square method.

[0118] Optionally, in this possible implementation method, the implementation principle of the least squares method is: minimizing the sum of squares of the deviations between the test frequency deviation value and the fitting frequency deviation value corresponding to each of the at least three temperature values ​​mentioned above is used as the basis for calculating the fitting linear term coefficient value c1 and the fitting constant term value c0.

[0119] Specifically, in the embodiment of the present application, it is assumed that f(t i ) is the fitted frequency deviation value of the ith temperature value obtained based on the frequency deviation curve f(t), For the test frequency deviation value of the ith temperature value, finding the fitting coefficient c1 and the fitting constant c0 is actually finding When c1 and c0 are at their minimum values. When the value of is the smallest, the partial derivatives of c1 and c0 are calculated respectively, and then the two partial derivative formulas are set equal to zero, so as to obtain the fitting linear term coefficient value c1 and the fitting constant term value c0.

[0120] Therefore, the least squares method can be used to easily obtain the fitting linear coefficient value c1 and the fitting constant term value c0, and the sum of the squares of the errors between the obtained fitting linear coefficient value c1 and the fitting constant term value c0 and the theoretical values ​​can be minimized, laying the foundation for obtaining accurate crystal identification results later.

[0121] Optionally, in another possible implementation of the present application, this step can be implemented in the following manner, see specifically steps A1 to A3 below:

[0122] Step A1: Determine at least two groups of undetermined coefficients of the frequency deviation curve according to two temperature values ​​among the at least three temperature values ​​and the frequency deviation test value corresponding to each temperature value, wherein each group of undetermined coefficients includes: a linear term coefficient value and a constant term value.

[0123] Optionally, in this possible implementation, by taking out any two temperature values ​​from the at least three temperature values ​​mentioned above and the frequency deviation value corresponding to each temperature value, and substituting them into the frequency deviation curve f(t) shown in the above formula (1), at least two sets of unknown coefficients can be obtained, that is, at least two sets of linear term coefficient values ​​and constant term values.

[0124] Step A2: Determine the average value of the linear term coefficient based on the above at least two groups of undetermined coefficients and the mean value of the constant term

[0125] Among them, the average value of the linear coefficient is the average value of all linear coefficients in the above at least two groups of undetermined coefficients. It is the average value of all constant terms in the above at least two groups of unknown coefficients.

[0126] Optionally, when at least two groups of undetermined coefficients of the frequency deviation curve are determined according to the at least three temperature values ​​and the frequency deviation values ​​corresponding to each temperature value, the sum of all the linear coefficient values ​​in the at least two groups of undetermined coefficients is divided by the number of all the linear coefficients to obtain the average linear coefficient value. Sum the values ​​of all constant terms in the above at least two groups of undetermined coefficients and divide them by the number of all constant terms to get the average value of the constant terms

[0127] Step A3: Average the coefficients of the above linear terms As the coefficient value c1 of the first-order fitting term, the average value of the above constant term As the fitting constant term value c0.

[0128] Optionally, since the average value can reflect the trend in a set of data, the average value of the linear coefficient Closer to the slope of the above frequency deviation curve, the average value of the above constant term It is closer to the constant term of the above frequency deviation curve, so when the average value of the first-order coefficient is obtained, and the mean value of the constant term Afterwards, the average value of the linear coefficient can be As the fitting coefficient value c1 of the frequency deviation curve, the average value of the constant term As the fitting constant value c0 of the frequency deviation curve.

[0129] It is worth noting that the embodiments of the present application are not limited to the above two possible implementation methods, and may also include other possible implementation methods, which will not be repeated here.

[0130] Step 43: Determine whether the crystal is qualified based on the above-mentioned fitting linear term coefficient value c1 and fitting constant term value c0.

[0131] Optionally, in the chip where the crystal determination circuit is located, the numerical range of the first-order term corresponding to the first-order term coefficient value of the frequency deviation curve and the numerical range of the constant term corresponding to the constant term value can be preset respectively. Therefore, after determining the fitted first-order term coefficient value c1 and the fitted constant term value c0 of the frequency deviation curve, it can be determined whether the fitted first-order term coefficient value c1 is within the preset numerical range of the first-order term and whether the fitted constant term value c0 is within the preset numerical range of the constant term. If so, the crystal is determined to be qualified; if not, the crystal is determined to be unqualified.

[0132] Optionally, as an example, when the average value of the linear coefficients obtained above is As the coefficient value c1 of the first-order fitting term, the average value of the constant term When c0 is used as the fitting constant term value, this step can be implemented by the following steps B1 to B3:

[0133] Step B1: Based on the following formula (2), according to the values ​​of all linear coefficients in the above at least two groups of undetermined coefficients and the average value of the linear coefficients Calculate the mean square error σ of the fitting linear coefficient value c1 c1 ;

[0134]

[0135] Step B2: Based on the following formula (3), according to all the constant terms in the above at least two groups of undetermined coefficients and the average value of the above constant terms Calculate the mean square error σ of the fitting constant term c0 c0 ;

[0136]

[0137] Where, (c1) j is the coefficient value of the first-order term in the jth group of undetermined coefficients, (c0) j is the constant term value in the jth group of undetermined coefficients, M is the number of groups of the at least two groups of undetermined coefficients, and j is a positive integer greater than or equal to 1 and less than or equal to M.

[0138] Specifically, since the mean square error can describe the degree of dispersion of each data in the data set and the average value, in this embodiment, the mean square error σ of the fitted linear coefficient value c1 can be calculated based on all linear coefficient values ​​and the average value of all linear coefficient values ​​in the at least two groups of undetermined coefficients determined above. c1 , according to all the constant terms in the at least two groups of unknown coefficients determined above and the average value of the constant terms, calculate the mean square error σ of the fitted constant terms c0 , and then determine the degree of dispersion of all linear coefficient values ​​and the average value of linear coefficients in at least two groups of undetermined coefficients and the degree of dispersion of all constant term values ​​and the average value of constant terms.

[0139] Sub-step B3: According to the above fitting linear coefficient value c1, the mean square error σ c1 And the mean square error σ of the fitted constant term c0 c0 , determine whether the crystal is qualified.

[0140] Optionally, the mean square error σ of the coefficient value c1 of the fitted first-order term c1越 The smaller the value, the smaller the fluctuation of all the linear coefficients in at least two groups of undetermined coefficients is, and the mean square error σ of the fitted constant term value c0 is c0 The smaller it is, the smaller the fluctuation of all constant terms in the above at least two groups of undetermined coefficients is, so the stability of the crystal can be determined based on it. Therefore, the mean square error σ of the above fitting linear coefficient value c1 can be determined. c1 Is it within the preset range of the mean square error of the first-order term and the mean square error σ of the fitting constant term value c0? c0 Whether it is within the preset constant term mean square error range, if so, it is determined that the crystal is qualified, if not, it is determined that the crystal is unqualified.

[0141] It is worth noting that the embodiment of the present application is not limited to directly judging whether the crystal is qualified based on the fitting linear coefficient value c1 and the fitting constant term value c0, nor is it limited to judging whether the crystal is qualified based on the mean square error σ of the fitting linear coefficient value c1. c1 And the mean square error σ of the fitted constant term c0 c0 To determine whether the crystal is qualified, in fact, it is also possible to determine whether the crystal is qualified by calculating the correlation coefficient of the fitted linear term coefficient value c1, the correlation coefficient of the fitted constant term value c0, or the statistics of the fitted linear term coefficient value c1, the statistics of the fitted constant term value c0, etc. The embodiment of the present application does not limit it, and it can be determined according to actual needs.

[0142] The crystal determination method provided in the embodiment of the present application obtains at least three temperature values ​​of the crystal in a preset temperature range, and the test frequency deviation value corresponding to each temperature value, and determines the fitting linear coefficient value c1 and the fitting constant term value c0 of the frequency deviation curve f(t) corresponding to the crystal in the preset temperature range according to the at least three temperature values ​​and the test frequency deviation value corresponding to each temperature value, and finally determines whether the crystal is qualified according to the fitting linear coefficient value c1 and the fitting constant term value c0. In this technical solution, by using at least three temperature values ​​and the frequency deviation value corresponding to each temperature value to determine whether the crystal is qualified, the determination result is accurate and reliable, and the problem of unqualified crystals not being found is avoided.

[0143] Optional, in the above Figure 4 Based on the embodiment shown, as an example, Figure 5 This is a flow chart of the second embodiment of the crystal determination method provided in this application. Figure 5 As shown, the crystal determination method of the embodiment of the present application may further include the following steps 51 and 52 after the above step 43:

[0144] Step 51: When the crystal is determined to be qualified according to the fitting coefficient value c1 and the fitting constant term value c0, based on the above frequency deviation curve f(t), the fitting frequency deviation value f(t) corresponding to each temperature value of the above at least three temperature values ​​is obtained by the following formula (4). i ) and test frequency deviation value The correlation coefficient R 2 ;

[0145]

[0146] In the formula, f(t i ) is the fitted frequency deviation value of the ith temperature value obtained based on the frequency deviation curve f(t), is the test frequency deviation value of the ith temperature value, is the frequency deviation average value of N temperature values ​​obtained based on the frequency deviation curve f(t), N is the number of the above-mentioned at least three temperature values, and i is a positive integer greater than or equal to 1 and less than or equal to N.

[0147] Step 52: According to the correlation coefficient value R 2 , update the judgment result of whether the crystal is qualified.

[0148] As an example, since the correlation coefficient can represent the linear correlation between two variables, the absolute value of the correlation coefficient is less than or equal to 1. The closer the correlation coefficient value is to 1, the stronger the correlation between the two variables is. Figure 4In the embodiment shown, when the fitting linear term coefficient value c1 and the fitting constant term value c0 of the frequency deviation curve are determined, the fitting frequency deviation curve can be determined accordingly. Therefore, in the embodiment of the present application, when the crystal is determined to be qualified according to the fitting linear term coefficient value c1 and the fitting constant term value c0, the correlation coefficient value R between the fitting frequency deviation value and the test frequency deviation value corresponding to each temperature value of the at least three temperature values ​​can be calculated by the above formula (4). 2 , and then determine whether the above crystal is qualified again according to the size of the correlation coefficient value, and accordingly update the determination result of whether the crystal is qualified.

[0149] Optionally, the correlation coefficient value range can be pre-configured. If the correlation coefficient value R between the fitting frequency deviation value and the test frequency deviation value is 2 If it is within the relevant value range, the crystal is deemed qualified; otherwise, the crystal is deemed unqualified.

[0150] The crystal determination method provided in the embodiment of the present application determines that the crystal is qualified according to the fitting linear coefficient value c1 and the fitting constant term value c0, and then obtains the fitting frequency deviation value f(t) corresponding to each temperature value of at least three temperature values ​​through the following formula (4) based on the frequency deviation curve f(t): i ) and test frequency deviation value The correlation coefficient R 2 , and according to the correlation coefficient value R 2 , update the result of whether the crystal is qualified. Figure 4 On the basis of the shown embodiment, the correlation coefficient value between the fitting frequency deviation value and the test frequency deviation value is obtained. Since the correlation coefficient value can reflect the accuracy of the above-determined fitting linear coefficient value c1 and the fitting constant term value c0, the technical solution is more accurate and reliable in determining whether the crystal is qualified.

[0151] Optional, in the above Figure 4 Based on the embodiment shown, as another example, Figure 6 This is a flow chart of the third embodiment of the crystal determination method provided in this application. Figure 6 As shown, the crystal determination method of the embodiment of the present application may further include the following steps 61 to 63 after the above step 43:

[0152] Step 61: When the crystal is determined to be qualified based on the fitting linear coefficient value c1 and the fitting constant term value c0, at least two groups of unknown coefficients of the frequency deviation curve are determined based on two adjacent temperature values ​​among the at least three temperature values ​​and the frequency deviation test value corresponding to each temperature value.

[0153] Each group of undetermined coefficients includes a linear term coefficient value and a constant term value.

[0154] Optional, in the above Figure 4 On the basis of the shown embodiment, when the crystal is determined to be qualified based on the fitted linear coefficient value c1 and the fitted constant term value c0, a linear coefficient value and a constant term value can be calculated based on the principle that a linear coefficient value and a constant term value can be calculated based on two adjacent temperature values ​​and the frequency deviation test value corresponding to each temperature value. The at least three temperature values ​​obtained above and the frequency deviation values ​​corresponding to each temperature value can be used again to calculate at least two groups of unknown coefficients of the frequency deviation curve, each group of unknown coefficients includes a linear coefficient value and a constant term value.

[0155] For example, Figure 7 for Figure 6 The distribution diagram of each group of undetermined coefficients in the embodiment shown in FIG. Figure 7 As shown, within the above preset temperature range, assuming that a total of n temperature values ​​and the frequency deviation value corresponding to each temperature value are obtained, a total of n-1 groups of unknown coefficients can be obtained through the above method, where n is an integer greater than 2.

[0156] Step 62: Obtain at least one set of absolute values ​​of the undetermined coefficients according to the at least two sets of undetermined coefficients.

[0157] Among them, each group of absolute values ​​of undetermined coefficients includes: an absolute value of a linear coefficient and an absolute value of a constant coefficient. The absolute value of the linear coefficient is the absolute value of the difference between the two linear coefficient values ​​in two adjacent groups of undetermined coefficients, and the absolute value of the constant coefficient is the absolute value of the difference between the two constant values ​​in two adjacent groups of undetermined coefficients.

[0158] Optionally, after obtaining at least two groups of undetermined coefficients of the frequency deviation curve, a group of absolute values ​​of the undetermined coefficients can be determined based on two adjacent groups of undetermined coefficients, that is, the absolute value of the difference between two first-order coefficient values ​​in the two adjacent groups of undetermined coefficients is used as the absolute value of the first-order coefficient in the group of absolute values ​​of the undetermined coefficients, and the absolute value of the difference between two constant term values ​​in the two adjacent groups of undetermined coefficients is used as the absolute value of the constant term coefficient in the group of absolute values ​​of the undetermined coefficients. Similarly, at least one group of absolute values ​​of the undetermined coefficients can be obtained based on the above at least two groups of undetermined coefficients.

[0159] Step 63: Based on the above at least one set of absolute values ​​of the coefficients to be determined, update the result of determining whether the crystal is qualified.

[0160] Optionally, in this embodiment, the absolute value range of the first-order term coefficient and the absolute value range of the constant term of the absolute value of the constant term can be pre-configured. Therefore, after obtaining at least one set of absolute values ​​of the coefficients to be determined, the largest absolute value of the first-order term coefficient and the largest absolute value of the constant term coefficient are taken out, and the largest absolute value of the first-order term coefficient is compared with the preset absolute value range of the first-order term, and the largest absolute value of the constant term coefficient is compared with the preset absolute value range of the constant term, and whether the crystal is qualified is determined based on the relationship between the two.

[0161] Specifically, when the absolute value of the largest constant term coefficient is less than or equal to the preset constant term absolute value range, and the absolute value of the largest constant term coefficient is less than or equal to the preset constant term absolute value range, the crystal is deemed qualified, otherwise, the crystal is deemed unqualified.

[0162] The crystal determination method provided in the embodiment of the present application can determine the quality of the crystal based on the fitted linear coefficient value and the fitted constant term value, and then determine at least two groups of undetermined coefficients of the frequency deviation curve based on two adjacent temperature values ​​among the at least three temperature values ​​and the frequency deviation test value corresponding to each temperature value, and then obtain at least one group of undetermined coefficient absolute values, and finally update the determination result of whether the crystal is qualified based on the at least one group of undetermined coefficient absolute values. Figure 4 On the basis of the illustrated embodiment, the variation range of adjacent first-order coefficient values ​​and constant term values ​​is added to determine whether the crystal is qualified. Under the premise of ensuring the accuracy of the determination result, the technical solution is simple and easy to implement.

[0163] Optional, in the above Figure 4 Based on the embodiment shown, as another example, Figure 8 This is a flow chart of the fourth embodiment of the crystal determination method provided in this application. Figure 8 As shown, the crystal determination method of the embodiment of the present application may further include the following steps 81 to 83 after the above step 43:

[0164] Step 81: When the crystal is determined to be qualified according to the above-mentioned fitting linear coefficient value c1 and the fitting constant term value c0, the fitting frequency deviation value corresponding to each of the above-mentioned at least three temperature values ​​is obtained based on the frequency deviation curve f(t) obtained by the above-mentioned fitting linear coefficient value c1 and the fitting constant term value c0.

[0165] Optionally, when the above-obtained fitting linear coefficient value c1 and fitting constant term value c0 are substituted into the formula of the frequency deviation curve corresponding to the crystal, the frequency deviation curve f(t) described in the above formula (1) can be obtained, and then the above-mentioned at least three temperature values ​​are substituted into formula (1) respectively, and the fitting frequency deviation value corresponding to each of the above-mentioned at least three temperature values ​​can be obtained.

[0166] Step 82: Based on the following formula (5), according to the test temperature value corresponding to each temperature value of at least three temperature values ​​and the fitting frequency deviation value corresponding to each temperature value of at least three temperature values, determine the residual value difference corresponding to each temperature value;

[0167]

[0168] In the formula, RES(t i) is the residual value difference corresponding to the i-th temperature value, f(t i ) is the fitted frequency deviation value of the ith temperature value obtained based on the frequency deviation curve f(t), is the test frequency deviation value of the i-th temperature value, where i is one temperature value among at least three temperature values.

[0169] Optionally, the absolute value obtained by subtracting the test temperature value corresponding to each temperature value from the fitted frequency deviation value corresponding to the temperature value can be defined as the residual value difference corresponding to the temperature value. Thus, according to the test temperature value corresponding to each temperature value in the at least three temperature values ​​and the fitted frequency deviation value corresponding to each temperature value in the at least three temperature values, the residual value difference corresponding to each temperature value in the at least three temperature values ​​can be obtained using the above formula (5).

[0170] Step 83: Based on the residual value difference corresponding to each temperature value of the at least three temperature values, update the determination result of whether the crystal is qualified.

[0171] Optionally, in this embodiment, as a possible implementation, based on the residual value difference corresponding to each temperature value of the at least three temperature values, the residual value difference with the largest value is selected, that is, the maximum residual value difference, and then the maximum residual value difference is used to determine whether the crystal is qualified. Specifically, it is determined whether the maximum residual value difference is within the preset residual value range. If so, the crystal is deemed qualified, otherwise, the crystal is deemed unqualified. Accordingly, the determination result is updated according to the determination result. Figure 4 The results of determining whether a crystal is qualified in the embodiment shown.

[0172] As another possible implementation, based on the residual value difference corresponding to each of the at least three temperature values, the average value of the residual value difference corresponding to all temperature values, i.e., the average residual value difference, can be calculated, and then the average residual value difference can be used to determine whether the crystal is qualified. Figure 4 The results of determining whether a crystal is qualified in the embodiment shown.

[0173] As another possible implementation, based on the residual value difference corresponding to each of the at least three temperature values, the sum of the residual value differences corresponding to all temperature values ​​can be calculated, and then based on the sum of the residual value differences corresponding to all temperature values, whether the crystal is qualified is determined. Accordingly, after determining the determination result, update the Figure 4 The results of determining whether a crystal is qualified in the embodiment shown.

[0174] Further, in the embodiment of the present application, step 83 (updating the determination result of whether the crystal is qualified based on the residual value difference corresponding to each temperature value of the at least three temperature values) can also be implemented by the following steps C1 and C2:

[0175] Step C1: Based on the following formula (6), at least two residual error change rates RES_s are determined according to the residual value differences corresponding to two adjacent temperature values ​​in the at least three temperature values;

[0176]

[0177] In the formula, t2 and t1 are two adjacent temperature values ​​among the at least three temperature values ​​mentioned above, RES(t1) is the residual value difference corresponding to the temperature value t1, RES(t2) is the residual value difference corresponding to the temperature value t2, and t2 is greater than t1.

[0178] Optionally, it can be known from the above step 82 that each of the above at least three temperature values ​​corresponds to a residual value difference. Therefore, based on formula (6), according to the residual value differences corresponding to two adjacent temperature values, the residual error change rate RES_s between the two residual difference values ​​corresponding to the two adjacent temperatures can be calculated. Similarly, according to the residual value differences corresponding to the above at least three temperature values, at least two residual error change rates RES_s can be determined.

[0179] Step C2: updating the determination result of whether the crystal is qualified according to the at least two residual error change rates RES_s.

[0180] Optionally, in this embodiment, one of the at least two residual error change rates RES_s can be used to further determine whether the crystal is qualified. Specifically, the residual error change rate with the largest value, that is, the maximum residual error change rate, can be selected from the at least two residual error change rates, and the maximum residual error change rate can be used to determine whether the crystal is qualified. Alternatively, the average value of all residual error change rates in the at least two residual error change rates can be obtained, that is, the average residual error change rate, and the average residual error change rate can be used to determine whether the crystal is qualified. Alternatively, the sum of all residual error change rates in the at least two residual error change rates can be obtained, and whether the crystal is qualified can be determined based on the sum of all residual error change rates.

[0181] By calculating the residual error change rate, the accuracy of the fitting frequency deviation values ​​corresponding to all temperature values ​​can be guaranteed, thereby ensuring that the obtained fitting linear term coefficient value and fitting constant term value are relatively accurate.

[0182] The crystal determination method provided in the embodiment of the present application determines that the crystal is qualified based on the above-mentioned fitting linear coefficient value and the fitting constant term value, and then obtains the fitting frequency deviation value corresponding to each of the above-mentioned at least three temperature values ​​based on the frequency deviation curve obtained by the fitting linear coefficient value and the fitting constant term value, and then determines the residual value difference corresponding to each temperature value based on the test temperature value corresponding to each of the above-mentioned at least three temperature values ​​and the fitting frequency deviation value corresponding to each of the at least three temperature values, and finally updates the determination result of whether the crystal is qualified based on the residual value difference corresponding to each of the at least three temperature values. This technical solution can assist in determining whether the fitting linear coefficient value and the fitting constant term value are accurate through the residual value difference, thereby ensuring that the determination result of whether the crystal is qualified is accurate.

[0183] To summarize, the crystal identification method provided in the embodiments of the present application aims to solve the problem in the prior art that unqualified crystals cannot be discovered due to inaccurate fitted linear coefficient values ​​and constant term values. It improves the accuracy of fitted linear coefficient values ​​and fitted constant term values ​​from different angles and dimensions, improves the judgment result of whether the crystal is qualified, and can ensure that most unqualified crystals can be discovered, laying the foundation for subsequent improvement of crystal performance.

[0184] Fig. 9 This is a schematic diagram of the structure of the first embodiment of the crystal determination device provided in the present application. Fig. 9 As shown, the crystal determination device provided in the embodiment of the present application may include: an acquisition module 91 , a processing module 92 and a determination module 93 .

[0185] The acquisition module 91 is used to acquire at least three temperature values ​​of the crystal in a preset temperature range, and a test frequency deviation value corresponding to each temperature value;

[0186] The processing module 92 is used to determine the fitting linear coefficient value c1 and the fitting constant term value c0 of the frequency deviation curve f(t) corresponding to the crystal when the crystal is in the preset temperature range according to the at least three temperature values ​​obtained by the obtaining module 91 and the test frequency deviation value corresponding to each temperature value. The frequency deviation curve f(t) is expressed by formula (1):

[0187] f(t)=c1(t-t0)+c0 (1)

[0188] Where, t: temperature value variable, t0: reference temperature value, f(t): frequency deviation value when temperature value is t;

[0189] The determination module 93 is used to determine whether the crystal is qualified according to the fitting linear term coefficient value c1 and the fitting constant term value c0 determined by the processing module 92 .

[0190] Optionally, in a possible implementation of an embodiment of the present application, the processing module 92 is specifically used to use the at least three temperature values ​​acquired by the acquisition module 91 and the test frequency deviation value corresponding to each of the temperature values ​​to calculate the fitting linear term coefficient value c1 and the fitting constant term value c0 of the frequency deviation curve f(t) through the least squares method.

[0191] Optionally, in another possible implementation of the embodiment of the present application, the processing module 92 is specifically used to determine at least two groups of undetermined coefficients of the frequency deviation curve according to two temperature values ​​of the at least three temperature values ​​acquired by the acquisition module 91 and the frequency deviation test value corresponding to each temperature value, and determine the average value of the linear term coefficient according to the at least two groups of undetermined coefficients. and the mean value of the constant term And the average value of the linear coefficient As the coefficient value c1 of the fitting first-order term, the average value of the constant term As the fitting constant term value c0;

[0192] Each group of undetermined coefficients includes: a linear term coefficient value and a constant term value, and the average value of the linear term coefficient is is the average value of all linear coefficients in the at least two groups of undetermined coefficients, and the average value of the constant term is the average value of all constant terms in the at least two groups of undetermined coefficients.

[0193] Accordingly, in this possible implementation of the embodiment of the present application, the determination module 93 is specifically used to determine the linear coefficient values ​​of the at least two groups of undetermined coefficients and the average linear coefficient value based on the following formula (2): Calculate the mean square error σ of the fitting linear coefficient value c1 c1 , based on the following formula (3), according to all the constant terms in the at least two groups of unknown coefficients and the average value of the constant terms Calculate the mean square error σ of the fitting constant term c0 c0 , according to the mean square error σ of the fitting linear coefficient value c1 c1 And the mean square error σ of the fitting constant term c0 c0 , determine whether the crystal is qualified;

[0194]

[0195]

[0196] Where, (c1) j is the coefficient value of the first-order term in the jth group of undetermined coefficients, (c0) jis the constant term value in the jth group of undetermined coefficients, M is the number of groups of the at least two groups of undetermined coefficients, and j is a positive integer greater than or equal to 1 and less than or equal to M.

[0197] Optionally, in another possible implementation of the embodiment of the present application, the processing module 92 is further configured to obtain the fitting frequency deviation value f(t) corresponding to each of the at least three temperature values ​​based on the frequency deviation curve f(t) by using the following formula (4) when the determination module 93 determines that the crystal is qualified according to the fitting first-order term coefficient value c1 and the fitting constant term value c0. i ) and test frequency deviation value The correlation coefficient R 2 ;

[0198]

[0199] In the formula, f(t i ) is the fitted frequency deviation value of the ith temperature value obtained based on the frequency deviation curve f(t), is the test frequency deviation value of the ith temperature value, is the frequency deviation average value of N temperature values ​​obtained based on the frequency deviation curve f(t), N is the number of the at least three temperature values, and i is a positive integer greater than or equal to 1 and less than or equal to N;

[0200] Correspondingly, the determination module 93 is also used to determine the value of the correlation coefficient R 2 , update the determination result of whether the crystal is qualified.

[0201] Optionally, in another possible implementation of the embodiment of the present application, the processing module 92 is further configured to determine at least two groups of undetermined coefficients of the frequency deviation curve according to two adjacent temperature values ​​among the at least three temperature values ​​and a frequency deviation test value corresponding to each temperature value when the determination module 93 determines that the crystal is qualified according to the fitting linear term coefficient value c1 and the fitting constant term value c0, and obtain at least one group of absolute values ​​of the undetermined coefficients according to the at least two groups of undetermined coefficients;

[0202] Each group of the undetermined coefficients includes: a linear coefficient value and a constant value; each group of the undetermined coefficient absolute values ​​includes: an linear coefficient absolute value and a constant coefficient absolute value; the linear coefficient absolute value is the absolute value of the difference between the two linear coefficient values ​​in two adjacent groups of undetermined coefficients; the constant coefficient absolute value is the absolute value of the difference between the two constant values ​​in two adjacent groups of undetermined coefficients;

[0203] Correspondingly, the determination module 93 is further configured to update the determination result of whether the crystal is qualified according to the at least one set of absolute values ​​of the coefficients to be determined.

[0204] Optionally, in another possible implementation of the embodiment of the present application, the processing module 92 is further used to obtain the fitting frequency deviation value corresponding to each of the at least three temperature values ​​based on the frequency deviation curve f(t) obtained by the fitting first-order term coefficient value c1 and the fitting constant term value c0 when the determination module 93 determines that the crystal is qualified according to the fitting first-order term coefficient value c1 and the fitting constant term value c0, and determine the residual value difference corresponding to each of the at least three temperature values ​​based on the test temperature value corresponding to each of the at least three temperature values ​​and the fitting frequency deviation value corresponding to each of the at least three temperature values ​​based on the following formula (5);

[0205]

[0206] In the formula, RES(t i ) is the residual value difference corresponding to the i-th temperature value, f(t i ) is the fitted frequency deviation value of the ith temperature value obtained based on the frequency deviation curve f(t), is the test frequency deviation value of the i-th temperature value, where i is one temperature value among the at least three temperature values;

[0207] Correspondingly, the determination module 93 is further configured to update the determination result of whether the crystal is qualified based on the residual value difference corresponding to each of the at least three temperature values.

[0208] Optionally, in this possible implementation of the embodiment of the present application, the determination module 93 is further configured to update the determination result of whether the crystal is qualified based on the residual value difference corresponding to each of the at least three temperature values, specifically:

[0209] The determination module 93 is further configured to determine at least two residual error change rates RES_s based on the following formula (6) according to the residual value differences corresponding to two adjacent temperature values ​​in the at least three temperature values, and to update the determination result of whether the crystal is qualified according to the at least two residual error change rates;

[0210]

[0211] In the formula, t2 and t1 are two adjacent temperature values ​​among the at least three temperature values, RES(t1) is the residual value difference corresponding to the temperature value t1, RES(t2) is the residual value difference corresponding to the temperature value t2, and t2 is greater than t1.

[0212] The crystal determination device provided in this embodiment can be used to perform Figure 4 , Figure 5 , Figure 6 and Figure 8The technical solution, specific implementation method and technical effect of the method embodiment shown are similar and will not be repeated here.

[0213] It should be noted that it should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software called by processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. For example, the determination module can be a separately established processing element, or it can be integrated in a chip of the above device. In addition, it can also be stored in the memory of the above device in the form of program code, and called and executed by a processing element of the above device. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.

[0214] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more digital singnal processors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a module above is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0215] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a readable storage medium, or transmitted from one readable storage medium to another readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integration. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.

[0216] Fig.10 This is a schematic diagram of the structure of the second embodiment of the crystal determination device provided in the embodiment of the present application. Fig.10 As shown, the crystal determination device may include: a crystal 101 , a temperature sensor 102 , an analog-to-digital converter ADC 103 and a power management unit PMU chip 104 .

[0217] The temperature sensor 102 is used to obtain at least three temperature values ​​of the crystal in a preset temperature range, and a test frequency deviation value corresponding to each temperature value;

[0218] The ADC 103 is used to perform analog-to-digital conversion processing on the at least three temperature values ​​acquired by the temperature sensor 102 and the test frequency deviation value corresponding to each of the temperature values;

[0219] The PMU chip 104 is used to determine the fitting linear coefficient value c1 and the fitting constant term value c0 of the frequency deviation curve f(t) corresponding to the crystal when the crystal is in the preset temperature range according to the at least three temperature values ​​processed by the ADC 103 and the test frequency deviation value corresponding to each temperature value, and determine whether the crystal is qualified according to the determined fitting linear coefficient value c1 and the fitting constant term value c0;

[0220] The frequency deviation curve f(t) is expressed by formula (1):

[0221] f(t)=c1(t-t0)+c0 (1)

[0222] Wherein, t: temperature value variable, t0: reference temperature value, f(t): frequency deviation value when temperature value is t.

[0223] Optionally, in a possible implementation of the embodiment of the present application, the PMU chip 104 is specifically used to use the at least three temperature values ​​processed by the ADC 103 and the test frequency deviation value corresponding to each of the temperature values ​​to calculate the fitting linear term coefficient value c1 and the fitting constant term value c0 of the frequency deviation curve f(t) by the least squares method.

[0224] Optionally, in another possible implementation of the embodiment of the present application, the PMU chip 104 is specifically used to determine at least two groups of undetermined coefficients of the frequency deviation curve according to two temperature values ​​of the at least three temperature values ​​processed by the ADC 103 and the frequency deviation test value corresponding to each temperature value, and determine the average value of the linear term coefficient according to the at least two groups of undetermined coefficients. and the mean value of the constant term And the average value of the linear coefficient As the coefficient value c1 of the fitting first-order term, the average value of the constant term As the fitting constant term value c0;

[0225] Each group of undetermined coefficients includes: a linear term coefficient value and a constant term value, and the average value of the linear term coefficient is is the average value of all linear coefficients in the at least two groups of undetermined coefficients, and the average value of the constant term is the average value of all constant terms in the at least two groups of undetermined coefficients.

[0226] Optionally, in this possible implementation of the embodiment of the present application, the PMU chip 104 is further used to calculate, based on the following formula (2), all the linear coefficient values ​​in the at least two groups of undetermined coefficients and the average value of the linear coefficients: Calculate the mean square error σ of the fitting linear coefficient value c1 c1 , based on the following formula (3), according to all the constant terms in the at least two groups of unknown coefficients and the average value of the constant terms Calculate the mean square error σ of the fitting constant term c0 c0 , according to the mean square error σ of the fitting linear coefficient value c1 c1 And the mean square error σ of the fitting constant term c0 c0 , determine whether the crystal is qualified;

[0227]

[0228]

[0229] Where, (c1) j is the coefficient value of the first-order term in the jth group of undetermined coefficients, (c0) j is the constant term value in the jth group of undetermined coefficients, M is the number of groups of the at least two groups of undetermined coefficients, and j is a positive integer greater than or equal to 1 and less than or equal to M.

[0230] Optionally, in another possible implementation of the embodiment of the present application, the PMU chip 104 is further used to obtain the fitting frequency deviation value f(t) corresponding to each of the at least three temperature values ​​based on the frequency deviation curve f(t) by the following formula (4) when determining that the crystal is qualified according to the fitting first-order coefficient value c1 and the fitting constant term value c0. i ) and test frequency deviation value The correlation coefficient R 2 , and according to the correlation coefficient value R 2 , updating the determination result of whether the crystal is qualified;

[0231]

[0232] In the formula, f(t i ) is the fitted frequency deviation value of the ith temperature value obtained based on the frequency deviation curve f(t), is the test frequency deviation value of the ith temperature value, is the frequency deviation average value of N temperature values ​​obtained based on the frequency deviation curve f(t), N is the number of the at least three temperature values, and i is a positive integer greater than or equal to 1 and less than or equal to N.

[0233] Optionally, in another possible implementation of the embodiment of the present application, the PMU chip 104 is also used to determine at least two groups of undetermined coefficients of the frequency deviation curve according to two adjacent temperature values ​​among the at least three temperature values ​​processed by the ADC103 and the frequency deviation test value corresponding to each temperature value when determining that the crystal is qualified according to the fitting linear term coefficient value c1 and the fitting constant term value c0, obtain at least one group of absolute values ​​of the undetermined coefficients according to the at least two groups of undetermined coefficients, and update the determination result of whether the crystal is qualified according to the at least one group of absolute values ​​of the undetermined coefficients.

[0234] Among them, each group of the undetermined coefficients includes: a linear coefficient value and a constant term value, and each group of the absolute values ​​of the undetermined coefficients includes: an absolute value of the linear coefficient and an absolute value of the constant term coefficient. The absolute value of the linear coefficient is the absolute value of the difference between the two linear coefficient values ​​in two adjacent groups of undetermined coefficients, and the absolute value of the constant term coefficient is the absolute value of the difference between the two constant term values ​​in two adjacent groups of undetermined coefficients.

[0235] Optionally, in another possible implementation of the embodiment of the present application, the PMU chip 104 is further used to obtain a fitting frequency deviation value corresponding to each of the at least three temperature values ​​based on the frequency deviation curve f(t) obtained by the fitting first-order coefficient value c1 and the fitting constant term value c0 when determining that the crystal is qualified according to the fitting first-order coefficient value c1 and the fitting constant term value c0; and based on the following formula (5), determine a residual value difference corresponding to each of the at least three temperature values ​​according to a test temperature value corresponding to each of the at least three temperature values ​​after processing by the ADC 103 and a fitting frequency deviation value corresponding to each of the at least three temperature values; and update a determination result of whether the crystal is qualified based on the residual value difference corresponding to each of the at least three temperature values ​​after processing by the ADC 103;

[0236]

[0237] In the formula, RES(t i ) is the residual value difference corresponding to the i-th temperature value, f(t i ) is the fitted frequency deviation value of the ith temperature value obtained based on the frequency deviation curve f(t), is the test frequency deviation value of the i-th temperature value, and i is one temperature value among the at least three temperature values.

[0238] Optionally, in this possible implementation of the embodiment of the present application, the PMU chip 104 is further used to update the determination result of whether the crystal is qualified based on the residual value difference corresponding to each of the at least three temperature values ​​after being processed by the ADC 103, specifically:

[0239] The PMU chip 104 is further configured to determine at least two residual error change rates RES_s based on the following formula (6) according to the residual value differences corresponding to two adjacent temperature values ​​of the at least three temperature values ​​after being processed by the ADC 103, and to update the determination result of whether the crystal is qualified according to the at least two residual error change rates;

[0240]

[0241] In the formula, t2 and t1 are two adjacent temperature values ​​among the at least three temperature values, RES(t1) is the residual value difference corresponding to the temperature value t1, RES(t2) is the residual value difference corresponding to the temperature value t2, and t2 is greater than t1.

[0242] Optionally, the temperature sensor 102 in this embodiment may correspond to the above Fig. 9 The acquisition module 91 in the ADC 103 can complete part of the functions of the processing module 92, and the PMU chip 104 can correspond to the above Fig. 9 The processing module 92 and the determination module 93 in it.

[0243] The crystal determination device provided in this embodiment can be used to perform Figure 4 , Figure 5 , Figure 6 and Figure 8 The technical solution, specific implementation method and technical effect of the method embodiment shown are similar and will not be repeated here.

[0244] The present application provides a storage medium in which instructions are stored. When the storage medium is run on a computer, the computer executes the above-mentioned Figure 4 , Figure 5 , Figure 6 and Figure 8 The technical solution of the embodiment shown.

[0245] Optionally, an embodiment of the present application provides a chip for executing instructions, wherein the chip is used to execute Figure 4 , Figure 5 , Figure 6 and Figure 8 The technical solution of the method embodiment shown.

[0246] The term "plurality" in this article refers to two or more than two. The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the previous and next associated objects are in an "or" relationship; in a formula, the character " / " indicates that the previous and next associated objects are in a "division" relationship.

[0247] It should be understood that the various numerical numbers involved in the embodiments of the present application are only used for the convenience of description and are not used to limit the scope of the embodiments of the present application.

[0248] It can be understood that in the embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0249] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A crystal determination method, It is characterized in that include: Obtaining at least three temperature values ​​of the crystal in a preset temperature range, and a test frequency deviation value corresponding to each of the temperature values; According to the at least three temperature values ​​and the test frequency deviation value corresponding to each temperature value, the fitting linear coefficient value c1 and the fitting constant term value c0 of the frequency deviation curve f(t) corresponding to the crystal when the crystal is in the preset temperature range are determined. The frequency deviation curve f(t) is expressed by formula (1): f(t)=c1(t-t0)+c0 (1) Where, t: temperature value variable, t0: reference temperature value, f(t): frequency deviation value when temperature value is t; Whether the crystal is qualified is determined based on the fitting linear term coefficient value c1 and the fitting constant term value c0.

2. The method according to claim 1, It is characterized in that The step of determining, according to the at least three temperature values ​​and the test frequency deviation value corresponding to each of the temperature values, a fitting linear term coefficient value c1 and a fitting constant term value c0 of the frequency deviation curve f(t) of the crystal in the preset temperature range, comprises: The at least three temperature values ​​and the test frequency deviation value corresponding to each temperature value are used to calculate the fitting linear term coefficient value c1 and the fitting constant term value c0 of the frequency deviation curve f(t) by the least square method.

3. The method according to claim 1, It is characterized in that The step of determining, according to the at least three temperature values ​​and the test frequency deviation value corresponding to each of the temperature values, a fitting linear term coefficient value c1 and a fitting constant term value c0 of the frequency deviation curve f(t) of the crystal in the preset temperature range, comprises: Determine at least two groups of undetermined coefficients of the frequency deviation curve according to two temperature values ​​among the at least three temperature values ​​and the frequency deviation test value corresponding to each temperature value, each group of the undetermined coefficients comprising: a linear term coefficient value and a constant term value; Determine the average value of the linear term coefficients according to the at least two groups of undetermined coefficients and the mean value of the constant term The average value of the linear coefficient is the average value of all linear coefficients in the at least two groups of undetermined coefficients, and the average value of the constant term is the average value of all constant terms in the at least two groups of undetermined coefficients; The average value of the linear coefficient As the coefficient value c1 of the fitting first-order term, the average value of the constant term As the fitting constant term value c0.

4. The method according to claim 3, It is characterized in that The step of judging whether the crystal is qualified according to the fitting linear term coefficient value c1 and the fitting constant term value c0 includes: Based on the following formula (2), according to all the linear coefficient values ​​in the at least two groups of undetermined coefficients and the average value of the linear coefficients Calculate the mean square error σ of the fitting linear coefficient value c1 c1 ; Based on the following formula (3), according to all the constant terms in the at least two groups of unknown coefficients and the average value of the constant terms Calculate the mean square error σ of the fitting constant term c0 c0 ; Where, (c1) j is the coefficient value of the first-order term in the jth group of undetermined coefficients, (c0) j is the value of the constant term in the jth group of undetermined coefficients, M is the number of groups of the at least two groups of undetermined coefficients, and j is a positive integer greater than or equal to 1 and less than or equal to M; According to the mean square error σ of the fitting linear coefficient value c1 c1 And the mean square error σ of the fitting constant term c0 c0 , determine whether the crystal is qualified.

5. The method according to any one of claims 1 to 4, It is characterized in that The method further comprises: When the crystal is determined to be qualified according to the fitting linear coefficient value c1 and the fitting constant term value c0, based on the frequency deviation curve f(t), the fitting frequency deviation value f(t) corresponding to each of the at least three temperature values ​​is obtained by the following formula (4): i ) and test frequency deviation value The correlation coefficient R 2 ; In the formula, f(t i ) is the fitted frequency deviation value of the ith temperature value obtained based on the frequency deviation curve f(t), is the test frequency deviation value of the ith temperature value, is the frequency deviation average value of N temperature values ​​obtained based on the frequency deviation curve f(t), N is the number of the at least three temperature values, and i is a positive integer greater than or equal to 1 and less than or equal to N; According to the correlation coefficient value R 2 , update the determination result of whether the crystal is qualified.

6. The method according to any one of claims 1 to 4, It is characterized in that The method further comprises: When the crystal is determined to be qualified according to the fitted linear coefficient value c1 and the fitted constant term value c0, at least two groups of undetermined coefficients of the frequency deviation curve are determined according to two adjacent temperature values ​​among the at least three temperature values ​​and the frequency deviation test value corresponding to each temperature value, each group of the undetermined coefficients includes: a linear coefficient value and a constant term value; According to the at least two groups of undetermined coefficients, at least one group of absolute values ​​of the undetermined coefficients is obtained, each group of absolute values ​​of the undetermined coefficients includes: an absolute value of a linear term coefficient and an absolute value of a constant term coefficient, the absolute value of the linear term coefficient is the absolute value of the difference between two linear term coefficient values ​​in two adjacent groups of undetermined coefficients, and the absolute value of the constant term coefficient is the absolute value of the difference between two constant term values ​​in two adjacent groups of undetermined coefficients; The determination result of whether the crystal is qualified is updated according to the at least one group of absolute values ​​of the coefficients to be determined.

7. The method according to any one of claims 1 to 4, It is characterized in that The method further comprises: When the crystal is determined to be qualified according to the fitting linear term coefficient value c1 and the fitting constant term value c0, a fitting frequency deviation value corresponding to each temperature value of the at least three temperature values ​​is obtained based on a frequency deviation curve f(t) obtained by the fitting linear term coefficient value c1 and the fitting constant term value c0; Based on the following formula (5), according to the test temperature value corresponding to each of the at least three temperature values ​​and the fitting frequency deviation value corresponding to each of the at least three temperature values, the residual value difference corresponding to each of the at least three temperature values ​​is determined; In the formula, RES(t i ) is the residual value difference corresponding to the i-th temperature value, f(t i ) is the fitted frequency deviation value of the ith temperature value obtained based on the frequency deviation curve f(t), is the test frequency deviation value of the i-th temperature value, where i is one temperature value among the at least three temperature values; Based on the residual value difference corresponding to each of the at least three temperature values, the determination result of whether the crystal is qualified is updated.

8. The method according to claim 7, It is characterized in that The updating of the determination result of whether the crystal is qualified based on the residual value difference corresponding to each of the at least three temperature values ​​comprises: Based on the following formula (6), at least two residual error change rates RES_s are determined according to the residual value differences corresponding to two adjacent temperature values ​​in the at least three temperature values; Wherein, t2 and t1 are two adjacent temperature values ​​among the at least three temperature values, RES(t1) is the residual value difference corresponding to the temperature value t1, RES(t2) is the residual value difference corresponding to the temperature value t2, and t2 is greater than t1; The determination result of whether the crystal is qualified is updated according to the at least two residual error change rates RES_s.

9. A crystal determination device, It is characterized in that include: An acquisition module, used to acquire at least three temperature values ​​of the crystal in a preset temperature range, and a test frequency deviation value corresponding to each of the temperature values; A processing module is used to determine, according to the at least three temperature values ​​acquired by the acquisition module and the test frequency deviation value corresponding to each of the temperature values, a fitting linear term coefficient value c1 and a fitting constant term value c0 of a frequency deviation curve f(t) corresponding to the crystal when the crystal is in the preset temperature range, wherein the frequency deviation curve f(t) is expressed by formula (1): f(t)=c1(t-t0)+c0 (1) Where, t: temperature value variable, t0: reference temperature value, f(t): frequency deviation value when temperature value is t; A determination module is used to determine whether the crystal is qualified according to the fitting linear term coefficient value c1 and the fitting constant term value c0 determined by the processing module.

10. The device according to claim 9, It is characterized in that The processing module is specifically used to calculate the fitting linear term coefficient value c1 and the fitting constant term value c0 of the frequency deviation curve f(t) by the least squares method using the at least three temperature values ​​acquired by the acquisition module and the test frequency deviation value corresponding to each temperature value.

11. The device according to claim 9, It is characterized in that The processing module is specifically used to determine at least two groups of undetermined coefficients of the frequency deviation curve according to two temperature values ​​of the at least three temperature values ​​acquired by the acquisition module and the frequency deviation test value corresponding to each temperature value, and determine the average value of the linear term coefficient according to the at least two groups of undetermined coefficients. and the mean value of the constant term And the average value of the linear coefficient As the coefficient value c1 of the fitting first-order term, the average value of the constant term As the fitting constant term value c0; Each group of undetermined coefficients includes: a linear term coefficient value and a constant term value, and the average value of the linear term coefficient is is the average value of all linear coefficients in the at least two groups of undetermined coefficients, and the average value of the constant term is the average value of all constant terms in the at least two groups of undetermined coefficients.

12. The device according to claim 11, It is characterized in that The determination module is specifically used to determine the linear coefficient values ​​of the at least two groups of undetermined coefficients and the average linear coefficient values ​​based on the following formula (2): Calculate the mean square error σ of the fitting linear coefficient value c1 c1 , based on the following formula (3), according to all the constant terms in the at least two groups of unknown coefficients and the average value of the constant terms Calculate the mean square error σ of the fitting constant term c0 c0 , according to the mean square error σ of the fitting linear coefficient value c1 c1 And the mean square error σ of the fitting constant term c0 c0 , determine whether the crystal is qualified; Where, (c1) j is the coefficient value of the first-order term in the jth group of undetermined coefficients, (c0) j is the constant term value in the jth group of undetermined coefficients, M is the number of groups of the at least two groups of undetermined coefficients, and j is a positive integer greater than or equal to 1 and less than or equal to M.

13. The device according to any one of claims 9 to 12, It is characterized in that The processing module is further configured to obtain, based on the frequency deviation curve f(t), a fitting frequency deviation value f(t) corresponding to each of the at least three temperature values ​​by using the following formula (4), when the determination module determines that the crystal is qualified according to the fitting linear term coefficient value c1 and the fitting constant term value c0. i ) and test frequency deviation value The correlation coefficient R 2 ; In the formula, f(t i ) is the fitted frequency deviation value of the ith temperature value obtained based on the frequency deviation curve f(t), is the test frequency deviation value of the ith temperature value, is the frequency deviation average value of N temperature values ​​obtained based on the frequency deviation curve f(t), N is the number of the at least three temperature values, and i is a positive integer greater than or equal to 1 and less than or equal to N; The determination module is also used to determine the correlation coefficient value R 2 , update the determination result of whether the crystal is qualified.

14. The device according to any one of claims 9 to 12, It is characterized in that The processing module is further configured to determine at least two groups of undetermined coefficients of the frequency deviation curve according to two adjacent temperature values ​​among the at least three temperature values ​​and the frequency deviation test value corresponding to each temperature value when the determination module determines that the crystal is qualified according to the fitting linear term coefficient value c1 and the fitting constant term value c0, and obtain at least one group of absolute values ​​of the undetermined coefficients according to the at least two groups of undetermined coefficients; Each group of the undetermined coefficients includes: a linear coefficient value and a constant value; each group of the undetermined coefficient absolute values ​​includes: an linear coefficient absolute value and a constant coefficient absolute value; the linear coefficient absolute value is the absolute value of the difference between the two linear coefficient values ​​in two adjacent groups of undetermined coefficients; the constant coefficient absolute value is the absolute value of the difference between the two constant values ​​in two adjacent groups of undetermined coefficients; The determination module is further configured to update a determination result of whether the crystal is qualified according to the at least one set of absolute values ​​of the coefficients to be determined.

15. The device according to any one of claims 9 to 12, It is characterized in that The processing module is further configured to obtain a fitting frequency deviation value corresponding to each of the at least three temperature values ​​based on a frequency deviation curve f(t) obtained by the fitting first-order coefficient value c1 and the fitting constant term value c0 when the determination module determines that the crystal is qualified according to the fitting first-order coefficient value c1 and the fitting constant term value c0, and determine a residual value difference corresponding to each of the at least three temperature values ​​according to a test temperature value corresponding to each of the at least three temperature values ​​and a fitting frequency deviation value corresponding to each of the at least three temperature values ​​based on the following formula (5); In the formula, RES(t i ) is the residual value difference corresponding to the i-th temperature value, f(t i ) is the fitted frequency deviation value of the ith temperature value obtained based on the frequency deviation curve f(t), is the test frequency deviation value of the i-th temperature value, where i is one temperature value among the at least three temperature values; The determination module is further configured to update a determination result of whether the crystal is qualified based on a residual value difference corresponding to each of the at least three temperature values.

16. The device according to claim 15, It is characterized in that The determination module is further configured to update a determination result of whether the crystal is qualified based on a residual value difference corresponding to each of the at least three temperature values, specifically: The determination module is further configured to determine at least two residual error change rates RES_s based on the following formula (6) according to the residual value differences corresponding to two adjacent temperature values ​​in the at least three temperature values, and update the determination result of whether the crystal is qualified according to the at least two residual error change rates; In the formula, t2 and t1 are two adjacent temperature values ​​among the at least three temperature values, RES(t1) is the residual value difference corresponding to the temperature value t1, RES(t2) is the residual value difference corresponding to the temperature value t2, and t2 is greater than t1.

17. A crystal determination device, It is characterized in that include: Crystal, temperature sensor, analog-to-digital converter ADC and power management unit PMU chip; The temperature sensor is used to obtain at least three temperature values ​​of the crystal in a preset temperature range, and a test frequency deviation value corresponding to each of the temperature values; The ADC is used to perform analog-to-digital conversion processing on the at least three temperature values ​​acquired by the temperature sensor and the test frequency deviation value corresponding to each of the temperature values; The PMU chip is used to determine, according to the at least three temperature values ​​processed by the ADC and the test frequency deviation value corresponding to each of the temperature values, a fitting linear term coefficient value c1 and a fitting constant term value c0 of the frequency deviation curve f(t) corresponding to the crystal when the crystal is in the preset temperature range, and to determine whether the crystal is qualified according to the determined fitting linear term coefficient value c1 and the fitting constant term value c0; The frequency deviation curve f(t) is expressed by formula (1): f(t)=c1(t-t0)+c0 (1) Wherein, t: temperature value variable, t0: reference temperature value, f(t): frequency deviation value when temperature value is t.

18. The device according to claim 17, It is characterized in that The PMU chip is specifically used to calculate the fitting linear term coefficient value c1 and the fitting constant term value c0 of the frequency deviation curve f(t) by the least squares method using the at least three temperature values ​​processed by the ADC and the test frequency deviation value corresponding to each temperature value.

19. The device according to claim 17, It is characterized in that The PMU chip is specifically used to determine at least two groups of undetermined coefficients of the frequency deviation curve according to two temperature values ​​of the at least three temperature values ​​processed by the ADC and the frequency deviation test value corresponding to each temperature value, and determine the average value of the linear term coefficient according to the at least two groups of undetermined coefficients. and the mean value of the constant term And the average value of the linear coefficient As the coefficient value c1 of the fitting first-order term, the average value of the constant term As the fitting constant term value c0; Each group of undetermined coefficients includes: a linear term coefficient value and a constant term value, and the average value of the linear term coefficient is is the average value of all linear coefficients in the at least two groups of undetermined coefficients, and the average value of the constant term is the average value of all constant terms in the at least two groups of undetermined coefficients.

20. The device according to claim 19, It is characterized in that The PMU chip is also used to calculate the linear coefficient values ​​of the at least two groups of undetermined coefficients and the average linear coefficient values ​​based on the following formula (2): Calculate the mean square error σ of the fitting linear coefficient value c1 c1 , based on the following formula (3), according to all the constant terms in the at least two groups of unknown coefficients and the average value of the constant terms Calculate the mean square error σ of the fitting constant term c0 c0 , according to the mean square error σ of the fitting linear coefficient value c1 c1 And the mean square error σ of the fitting constant term c0 c0 , determine whether the crystal is qualified; Where, (c1) j is the coefficient value of the first-order term in the jth group of undetermined coefficients, (c0) j is the constant term value in the jth group of undetermined coefficients, M is the number of groups of the at least two groups of undetermined coefficients, and j is a positive integer greater than or equal to 1 and less than or equal to M.

21. The device according to any one of claims 17 to 20, It is characterized in that The PMU chip is further used to obtain the fitting frequency deviation value f(t) corresponding to each of the at least three temperature values ​​by the following formula (4) based on the frequency deviation curve f(t) when determining that the crystal is qualified according to the fitting first-order coefficient value c1 and the fitting constant term value c0. i ) and test frequency deviation value The correlation coefficient R 2 , and according to the correlation coefficient value R 2 , updating the determination result of whether the crystal is qualified; In the formula, f(t i ) is the fitted frequency deviation value of the ith temperature value obtained based on the frequency deviation curve f(t), is the test frequency deviation value of the ith temperature value, is the frequency deviation average value of N temperature values ​​obtained based on the frequency deviation curve f(t), N is the number of the at least three temperature values, and i is a positive integer greater than or equal to 1 and less than or equal to N.

22. The device according to any one of claims 17 to 20, It is characterized in that The PMU chip is further used to determine at least two groups of undetermined coefficients of the frequency deviation curve according to two adjacent temperature values ​​of the at least three temperature values ​​after ADC processing and the frequency deviation test value corresponding to each temperature value when determining that the crystal is qualified according to the fitting linear term coefficient value c1 and the fitting constant term value c0, obtain at least one group of undetermined coefficient absolute values ​​according to the at least two groups of undetermined coefficients, and update the determination result of whether the crystal is qualified according to the at least one group of undetermined coefficient absolute values. Among them, each group of the undetermined coefficients includes: a linear coefficient value and a constant term value, and each group of the absolute values ​​of the undetermined coefficients includes: an absolute value of the linear coefficient and an absolute value of the constant term coefficient. The absolute value of the linear coefficient is the absolute value of the difference between the two linear coefficient values ​​in two adjacent groups of undetermined coefficients, and the absolute value of the constant term coefficient is the absolute value of the difference between the two constant term values ​​in two adjacent groups of undetermined coefficients.

23. The device according to any one of claims 17 to 20, It is characterized in that The PMU chip is further used for, when determining that the crystal is qualified according to the fitted linear coefficient value c1 and the fitted constant term value c0, obtaining a fitted frequency deviation value corresponding to each of the at least three temperature values ​​based on a frequency deviation curve f(t) obtained by the fitted linear coefficient value c1 and the fitted constant term value c0, and determining a residual value difference corresponding to each of the at least three temperature values ​​according to a test temperature value corresponding to each of the at least three temperature values ​​after ADC processing and a fitted frequency deviation value corresponding to each of the at least three temperature values ​​based on the following formula (5), and updating a determination result of whether the crystal is qualified based on the residual value difference corresponding to each of the at least three temperature values ​​after ADC processing; In the formula, RES(t i ) is the residual value difference corresponding to the i-th temperature value, f(t i ) is the fitted frequency deviation value of the ith temperature value obtained based on the frequency deviation curve f(t), is the test frequency deviation value of the i-th temperature value, and i is one temperature value among the at least three temperature values.

24. The device according to claim 23, It is characterized in that The PMU chip is further used to update the determination result of whether the crystal is qualified based on the residual value difference corresponding to each of the at least three temperature values ​​after the ADC processing, specifically: The PMU chip is further used to determine at least two residual error change rates RES_s based on the following formula (6) according to the residual value differences corresponding to two adjacent temperature values ​​of the at least three temperature values ​​after the ADC processing, and update the determination result of whether the crystal is qualified according to the at least two residual error change rates; In the formula, t2 and t1 are two adjacent temperature values ​​among the at least three temperature values, RES(t1) is the residual value difference corresponding to the temperature value t1, RES(t2) is the residual value difference corresponding to the temperature value t2, and t2 is greater than t1.

25. A storage medium, It is characterized in that The storage medium stores instructions, which, when executed on a computer, enable the computer to execute the method according to any one of claims 1 to 8.