CN114553192A - Clock chip frequency compensation method and device, electronic equipment and storage medium - Google Patents

Clock chip frequency compensation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114553192A
CN114553192A CN202210291102.8A CN202210291102A CN114553192A CN 114553192 A CN114553192 A CN 114553192A CN 202210291102 A CN202210291102 A CN 202210291102A CN 114553192 A CN114553192 A CN 114553192A
Authority
CN
China
Prior art keywords
clock chip
detection period
temperature value
frequency
frequency compensation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210291102.8A
Other languages
Chinese (zh)
Inventor
田学红
方佳泽
邱文才
林满院
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Daguangxin Technology Co ltd
Original Assignee
Guangdong Daguangxin Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Daguangxin Technology Co ltd filed Critical Guangdong Daguangxin Technology Co ltd
Priority to CN202210291102.8A priority Critical patent/CN114553192A/en
Publication of CN114553192A publication Critical patent/CN114553192A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K3/00Circuits for generating electric pulses; Monostable, bistable or multistable circuits
    • H03K3/01Details
    • H03K3/011Modifications of generator to compensate for variations in physical values, e.g. voltage, temperature
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/04Generating or distributing clock signals or signals derived directly therefrom
    • G06F1/14Time supervision arrangements, e.g. real time clock
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3058Monitoring arrangements for monitoring environmental properties or parameters of the computing system or of the computing system component, e.g. monitoring of power, currents, temperature, humidity, position, vibrations
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K3/00Circuits for generating electric pulses; Monostable, bistable or multistable circuits
    • H03K3/01Details
    • H03K3/012Modifications of generator to improve response time or to decrease power consumption
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Power Sources (AREA)

Abstract

The invention discloses a clock chip frequency compensation method, a device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring historical temperature values obtained by detecting a clock chip in a historical detection period; determining a current detection period according to the historical temperature value and the precision grade of the clock chip; acquiring a current temperature value obtained by detecting a clock chip in a current detection period; and performing frequency compensation on the clock chip based on the current temperature value. By using the scheme, the detection period of the clock chip can be adaptively adjusted according to the precision grade of the clock chip, and the problems of high power consumption, resource waste and the like caused by the fact that the clock chip has various grade requirements in the same application scene in the existing scheme are solved.

Description

Clock chip frequency compensation method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of chip design, in particular to a clock chip frequency compensation method and device, electronic equipment and a storage medium.
Background
The Clock chip (Real-Time Clock, abbreviated as RTC) can provide accurate Real-Time for people and provide accurate Time reference for electronic systems, and is widely applied to daily life, such as water meters, electricity meters, gas meters, and the like. Due to the characteristics of the clock chip, the frequency of the crystal oscillator may oscillate along with the temperature change during the working process, thereby causing inaccurate timing time, and therefore, the clock chip needs to be frequency compensated.
In the existing scheme, the precision of a clock chip is already defined when the clock chip leaves a factory, and in an application occasion, there may be multiple precision requirements, for example, when there is a low precision requirement in initial work, and when the precision requirement in subsequent work is high, the highest level of the precision requirement of the clock chip is generally selected and set, so as to meet multiple requirements.
However, the above scheme has a problem that when a low-precision level is required, a high-precision level clock chip needs to be used for working, so that power loss is large, and resource waste is caused.
Disclosure of Invention
The embodiment of the invention provides a clock chip frequency compensation method, a clock chip frequency compensation device, electronic equipment and a storage medium, and aims to solve the problem of resource waste caused by large power loss when a clock chip is compensated by the conventional scheme.
According to an aspect of the embodiments of the present invention, there is provided a clock chip frequency compensation method, including:
acquiring a historical temperature value obtained by detecting the clock chip in a historical detection period;
determining a current detection period according to the historical temperature value and the precision grade of the clock chip;
acquiring a current temperature value obtained by detecting the clock chip in the current detection period;
and carrying out frequency compensation on the clock chip based on the current temperature value.
According to another aspect of the present invention, there is provided a clock chip frequency compensation apparatus including:
the first acquisition module is used for acquiring historical temperature values obtained by detecting the clock chip in a historical detection period;
the determining module is used for determining the current detection period according to the historical temperature value and the precision grade of the clock chip;
the second acquisition module is used for acquiring the current temperature value obtained by detecting the clock chip in the current detection period;
and the compensation module is used for carrying out frequency compensation on the clock chip based on the current temperature value.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the clock chip frequency compensation method according to any of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement the clock chip frequency compensation method according to any one of the embodiments of the present invention when the computer instructions are executed.
According to the clock chip frequency compensation scheme disclosed by the technology of the embodiment of the invention, firstly, historical temperature values obtained by detecting a clock chip in a historical detection period are obtained; then determining the current detection period according to the historical temperature value and the precision grade of the clock chip; then obtaining a current temperature value obtained by detecting the clock chip in the current detection period; and finally, performing frequency compensation on the clock chip based on the current temperature value. By using the scheme, the detection period of the clock chip can be adaptively adjusted according to the precision grade of the clock chip, and the problems of high power consumption, resource waste and the like caused by the fact that the clock chip has various grade requirements in the same application scene in the existing scheme are solved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present invention, nor do they necessarily limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a clock chip frequency compensation method according to an embodiment of the present invention;
FIG. 2 is a flowchart of a clock chip frequency compensation method according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a clock chip frequency compensation apparatus according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device implementing the fourth embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example one
Fig. 1 is a flowchart of a clock chip frequency compensation method according to an embodiment of the present invention, where the method is applicable to frequency compensation of a clock chip, and the method may be implemented by a clock chip frequency compensation device, where the clock chip frequency compensation device may be implemented in a form of hardware and/or software, and the clock chip frequency compensation device may be configured in a computer device such as a server.
The clock chip is a low-power consumption real-time clock chip, and the requirement of high accuracy low-power consumption needs to be satisfied when using, because the 32K tuning fork crystal in the clock chip can be influenced by temperature variation, its oscillation frequency can change along with the temperature to lead to the clock chip timing inaccurate. Therefore, it is necessary to detect the temperature change of the clock chip. The frequency deviation condition is determined according to the temperature change condition, so that the frequency of the clock chip in different temperature states is compensated, and the clock chip can continuously meet the requirement of high precision during working. In view of this, embodiments of the present invention provide a clock chip frequency compensation scheme, which periodically detects a temperature value of a clock chip to perform frequency compensation on the clock chip in different detection periods, so that the clock chip meets requirements of high precision and low power consumption.
Referring to fig. 1, a clock chip frequency compensation method according to an embodiment of the present invention includes:
s110, obtaining a historical temperature value obtained by detecting a clock chip in a historical detection period.
The historical detection period indicates that a corresponding historical temperature value can be obtained every detection period when the clock chip works, the current historical detection period consists of two or more continuous detection periods, one detection period can be understood as a time period, namely, after the historical temperature values corresponding to at least two continuous time periods are accumulated, the subsequent steps are convenient to execute, and the advantage of the method is that the accuracy of frequency compensation of the clock chip in the subsequent steps is ensured.
In the historical detection period, the time period corresponding to each detection period is not necessarily the same, and the next detection period needs to be determined together with the precision grade of the clock chip in the subsequent step.
Alternatively, the historical temperature value is obtained by: acquiring a simulated temperature value obtained by detecting a clock chip in a historical detection period; and performing analog-to-digital conversion on the simulated temperature value to obtain a historical temperature value.
The simulated temperature value can be obtained by a temperature detection module integrated in the clock chip, and the temperature detection module can be realized by a temperature sensor. Because the temperature obtained by the temperature sensor is an analog temperature value, the analog temperature value can be converted into a digital temperature value by integrating an analog-to-digital conversion module in the clock chip, so that a historical temperature value corresponding to each historical detection period is obtained. The Analog conversion module can be implemented by an Analog-to-digital converter (ADC for short).
And S120, determining the current detection period according to the historical temperature value and the precision level of the clock chip.
The precision level of the clock chip represents the allowable deviation of the measured actual value and the standard value, and the current actual value and the standard value refer to the actual output frequency and the standard output frequency of the clock chip at the same temperature, namely the nominal frequency variation, and the unit is one part Per Million (Parts Per Million, abbreviated as PPM).
Generally, the precision grade requirement of the clock chip is different according to different use occasions of the clock chip, and the precision grade can be set to be +/-2 PPM within the range of 0 ℃ to +40 ℃ for example; the accuracy grade can be set to be +/-3.5 PPM and the like within the range of-40 ℃ to +0 ℃. The precision grade of the clock chip can be set when the clock chip leaves a factory, and can also be adjusted according to different requirements of customers, and the current adjustment mode can be defined by the customers through software. The setting mode and the precision grade range of the precision grade of the specific clock chip are not limited herein, and the actual requirements are taken as the standard.
Optionally, when the current detection period is determined according to the historical temperature value and the precision level of the clock chip, a frequency compensation error corresponding to the historical temperature value needs to be determined, and the frequency compensation error and the precision level of the clock chip can be compared to determine the current detection period.
The frequency compensation error can be obtained by obtaining corresponding historical temperature values according to at least two continuous detection periods in the historical detection periods. The purpose of determining the frequency compensation error is to determine the frequency compensation error in the process of the last detection period through at least two historical temperature values, so that the current detection period is determined according to the current frequency compensation error and the precision grade of the clock chip, and the accuracy of frequency compensation in the process of obtaining the current temperature value through the current detection period is further ensured.
S130, acquiring a current temperature value obtained by detecting the clock chip in the current detection period.
After the current detection period, the current temperature value corresponding to the current detection period can be directly obtained, and the method for obtaining the current temperature value is the same as the method for obtaining the historical temperature value, which is not repeated herein.
And S140, performing frequency compensation on the clock chip based on the current temperature value.
After the current detection period is determined based on the historical temperature value and the precision grade of the clock chip, in the process of obtaining the current temperature value according to the current detection period, the frequency compensation mode of the clock chip can be that after the actual output frequency corresponding to the current temperature value is obtained, the standard output frequency corresponding to the current temperature value is further obtained, and the actual output frequency and the standard output frequency are compared, so that the frequency compensation is carried out on the clock chip based on the standard output frequency.
The clock chip frequency compensation method provided by the embodiment of the invention comprises the steps of firstly, acquiring historical temperature values obtained by detecting a clock chip in a historical detection period; then determining the current detection period according to the historical temperature value and the precision grade of the clock chip; then obtaining a current temperature value obtained by detecting the clock chip in the current detection period; and finally, performing frequency compensation on the clock chip based on the current temperature value. By using the scheme, the detection period of the clock chip can be adaptively adjusted according to the precision grade of the clock chip, and the problems of high power consumption, resource waste and the like caused by the fact that the clock chip has various grade requirements in the same application scene in the existing scheme are solved.
Example two
Fig. 2 is a flowchart of a clock chip frequency compensation method according to a second embodiment of the present invention, and the relationship between the present embodiment and the above embodiments is to refine the features of the corresponding steps. As shown in fig. 2, the method includes:
s210, obtaining a historical temperature value obtained by detecting a clock chip in a historical detection period.
And S220, determining a frequency compensation error according to the historical temperature value.
In a measuring circuit in which a clock chip operates, real-time frequency compensation is generally not performed on the clock chip, for example, the temperature of the clock chip is not measured every 1s, so that frequency compensation is performed according to the current temperature, and due to the fact that the workload of the method is large, and the frequency error in a short time is generally within an allowable range. Therefore, the temperature of the clock chip is usually detected in a mode of detecting every certain detection period, and then the frequency compensation error in the detection period process is determined, so that the accuracy of subsequent temperature frequency measurement is judged according to the current frequency error, and the working accuracy of the clock chip is ensured.
Alternatively, determining the frequency compensation error from the historical temperature value may be represented by the expression:
σ=a*|(T1-t)2-(T2-t)2| (1)
wherein, σ represents the frequency compensation error, α represents a first preset parameter, T represents a second preset parameter, the historical detection period includes a first detection period and a second detection period, the second detection period is a previous detection period of the first detection period, the first detection period is a previous detection period of the current detection period, T1 represents a historical temperature value detected by the second detection period, and T2 represents a historical temperature value detected by the first detection period.
The first preset parameter a represents a mouth opening coefficient of the clock crystal, the second preset parameter t represents time corresponding to a vertex frequency in the temperature frequency relation information, and the temperature frequency relation information is standard output frequency which is stored in the clock chip in advance and corresponds to each temperature value. The first preset parameter a and the second preset parameter t are constants, and specific values are not limited herein.
And S230, acquiring the adjustment step size of the frequency compensation error.
The adjustment step size is generally set according to the user's requirement, and may be set to 1 second for example. The purpose of obtaining the adjustment step size of the frequency compensation error is to adjust the historical detection period according to the adjustment step size, which is helpful for the subsequent steps to more accurately determine the current detection period.
And S240, determining the current detection period according to the frequency compensation error, the adjustment step size and the precision level.
Optionally, determining the current detection period according to the frequency compensation error, the adjustment step size, and the precision level includes:
judging whether the frequency compensation error exceeds the precision level; if the precision grade is not exceeded, the current detection period is equal to the first detection period plus the adjustment step length; and if the precision level is exceeded, the current detection period is equal to the first detection period minus the adjustment step length.
And (3) setting the precision grade as delta, judging the sizes of the sigma and the delta obtained according to the formula (1), if the frequency compensation error does not exceed the precision grade, indicating that the compensation precision of the frequency compensation error in the historical detection period is accurate enough, properly prolonging the detection time of the detection period, and enabling the current detection period to be equal to the first detection period plus the adjustment step length. Let the current detection period be ω2The first detection period is ω1Then the current detection period can be expressed as: omega2=ω1+ Delta; if the frequency compensation error exceeds the precision grade, it indicates that the compensation precision of the frequency compensation error in the historical detection period does not meet the requirement corresponding to the precision grade, and the detection time of the detection period can be adaptively shortened, and then the current detection period can be represented as: omega2=ω1-Δ。
And S250, acquiring the current temperature value obtained by detecting the clock chip in the current detection period.
And S260, acquiring the actual output frequency corresponding to the current temperature value.
When the frequency compensation is performed on the clock chip according to the current temperature value, the actual output frequency corresponding to the current temperature value needs to be obtained first, and the current actual output frequency can be directly obtained by monitoring the oscillation condition of the clock crystal.
And S270, acquiring the standard output frequency corresponding to the current temperature value from the temperature frequency relation information.
The temperature frequency relation information includes standard output frequencies corresponding to the temperature values. The temperature frequency relation information can be stored in the clock chip in advance, so that the standard output frequency of the current temperature value to one can be directly obtained when the current temperature value is obtained.
The temperature frequency relation information can be stored in a clock chip in a curve form, namely, the standard output frequency corresponding to each temperature value is described in a curve form to form a temperature frequency characteristic curve; or storing in an array form, that is, an array is formed by a temperature value and a corresponding standard output frequency, so as to form a temperature frequency relation table. The storage form of the specific temperature frequency relation information in the clock chip is not limited herein.
And S280, performing frequency compensation on the clock chip according to the actual output frequency and the standard output frequency.
And judging a compensation range needing frequency compensation according to the actual output frequency and the standard output frequency corresponding to the current temperature value, so that the output frequency of the current temperature value approaches the standard output frequency, and the accuracy of the clock chip in working is ensured.
Accordingly, when step S210 is executed, in the historical monitoring period, when a corresponding historical temperature value is obtained every time one monitoring period passes, the clock chip is frequency compensated according to the actual output frequency and the standard output frequency corresponding to the historical temperature value, so as to ensure the accuracy of the output frequency corresponding to the temperature value obtained every time one monitoring period passes.
Optionally, frequency compensating the clock chip according to the actual output frequency and the standard output frequency includes: determining a frequency error according to the actual output frequency and the standard output frequency; and when the frequency error exceeds a preset error value, performing frequency compensation on the clock chip based on the frequency error.
The current frequency error may be set according to different requirements of a user, for example, 1%, 3%, or 5%, and the specific value of the frequency error is not limited herein.
And when the actual output frequency and the standard output frequency exceed the frequency error value, performing frequency compensation on the clock chip based on the frequency error. When frequency compensation is carried out, compensation can be carried out according to the minimum value, the maximum value or the intermediate value in the frequency error range, and in order to ensure the accuracy of temperature frequency detection when a subsequent detection period is determined according to the current temperature value, the actual output frequency can be compensated to be the standard output frequency. Accordingly, when the frequency error does not exceed the preset error value, the frequency compensation is not performed on the clock chip. Namely, the actual output frequency corresponding to the current temperature value is the standard output frequency.
It is to be noted that, when the clock chip works, the process of periodically compensating the frequency of the clock chip by determining a new detection period is not required, because the temperature of the clock chip gradually tends to be stable along with the working condition, the corresponding frequency compensation error also tends to be stable, and when the subsequent detection period is determined according to the frequency compensation error, the adjustment step length and the precision grade, the detection period also tends to be the same gradually, thereby ensuring the stable operation of the clock chip.
The technical scheme provided by the embodiment of the invention can be briefly described as the following process: the precision level of the clock chip is set, and the historical detection period is assumed to comprise a first detection period and a second detection period. Obtaining an initial temperature value of the clock chip when the clock chip starts to work, and obtaining a first historical temperature value t1 after analog-to-digital conversion; calculating a frequency error based on the actual output frequency of t1, and starting frequency compensation on the t1 temperature; during the first detection period omega1Then, a second historical temperature value t2 can be obtained, and frequency compensation for the temperature t2 is started (the compensation mode is the same as that of t 1), wherein the current first detection period can be set according to the experience of technicians or can be set as a default period; calculating frequency compensation errors according to the measured t1 and t2, wherein the time point t1 and the time point t2 are standard frequencies which are already compensated, the current frequency compensation error is the frequency compensation error in the time period from t1 to t2, and the second detection period omega is determined again according to the relation between the frequency compensation error and the precision grade2,ω2=ω1- Δ, or ω2=ω1+ Δ. During the second detection period omega2And then obtaining a third historical temperature value t3, calculating a current frequency compensation error through the second historical temperature value t2 and the third historical temperature value t3, further re-determining a current detection period according to the relation between the current frequency compensation error and the precision grade, obtaining the current temperature value after the current detection period, repeatedly executing the process of determining the frequency compensation error according to the current temperature value and the previous temperature value, further determining the next detection period, and after determining the next detection period, performing frequency difference compensation on the clock chip based on the next temperature value.
According to the clock chip frequency compensation scheme provided by the embodiment of the invention, the same clock chip can meet scenes with different precision grade requirements, the detection period can be shortened when the high precision is required, the detection period can be expanded when the low precision is required, the precision grade can be set according to the requirements of customers, compared with the existing mode of compensating according to a fixed precision and a fixed period, the power consumption of a compensation circuit can be reduced to more than 70%, and the implementation mode is simpler.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a clock chip frequency compensation device according to a third embodiment of the present invention. As shown in fig. 3, the apparatus includes: a first obtaining module 31, a determining module 32, a second obtaining module 33 and a compensating module 34, wherein:
the first obtaining module 31 is configured to obtain a historical temperature value obtained by detecting the clock chip in a historical detection period;
the determining module 32 is configured to determine a current detection period according to the historical temperature value and the accuracy level of the clock chip;
a second obtaining module 33, configured to obtain a current temperature value obtained by detecting the clock chip in the current detection period;
and the compensation module 34 is configured to perform frequency compensation on the clock chip based on the current temperature value.
The clock chip frequency compensation device provided by the embodiment of the invention firstly obtains a historical temperature value obtained by detecting a clock chip in a historical detection period; then determining the current detection period according to the historical temperature value and the precision grade of the clock chip; then obtaining a current temperature value obtained by detecting the clock chip in the current detection period; and finally, performing frequency compensation on the clock chip based on the current temperature value. By using the scheme, the detection period of the clock chip can be adaptively adjusted according to the precision grade of the clock chip, and the problems of high power consumption, resource waste and the like caused by the fact that the clock chip has various grade requirements in the same application scene in the existing scheme are solved.
Optionally, the determining module 32 includes: a first determining unit, a first obtaining unit and a second determining unit, wherein:
the first determining unit is used for determining a frequency compensation error according to the historical temperature value;
a first obtaining unit, configured to obtain an adjustment step size of the frequency compensation error;
and the second determining unit is used for determining the current detection period according to the frequency compensation error, the adjusting step size and the precision level.
Optionally, the determining a frequency compensation error according to the historical temperature value includes:
σ=a*|(T1-t)2-(T2-t)2|
wherein σ represents the frequency compensation error, α represents a first preset parameter, T represents a second preset parameter, the historical detection period includes a first detection period and a second detection period, the second detection period is a previous detection period of the first detection period, the first detection period is a previous detection period of the current detection period, T1 represents a historical temperature value detected by the second detection period, and T2 represents a historical temperature value detected by the first detection period.
Optionally, the second determining unit is specifically configured to determine whether the frequency compensation error exceeds the accuracy level; if the precision grade is not exceeded, the current detection period is equal to the first detection period plus the adjustment step length; and if the precision level is exceeded, the current detection period is equal to the first detection period minus the adjustment step length.
Optionally, the compensation module 34 comprises: a second acquisition unit, a third acquisition unit and a compensation unit, wherein:
the second acquisition unit is used for acquiring the actual output frequency corresponding to the current temperature value;
a third obtaining unit, configured to obtain a standard output frequency corresponding to the current temperature value from temperature frequency relationship information, where the temperature frequency relationship information includes standard output frequencies corresponding to the temperature values;
and the compensation unit is used for carrying out frequency compensation on the clock chip according to the actual output frequency and the standard output frequency.
Optionally, the compensation unit is specifically configured to determine a frequency error according to the actual output frequency and the standard output frequency; when the frequency error exceeds a preset error value, performing frequency compensation on the clock chip based on the frequency error; and when the frequency error does not exceed the preset error value, not performing frequency compensation on the clock chip.
Optionally, the historical temperature value is obtained by: acquiring a simulated temperature value obtained by detecting the clock chip in the historical detection period; and performing analog-to-digital conversion on the simulated temperature value to obtain the historical temperature value.
The clock chip frequency compensation device provided by the embodiment of the invention can execute the clock chip frequency compensation method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
Example four
FIG. 4 shows a schematic block diagram of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 4, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM)12, a Random Access Memory (RAM)13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 can perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM)12 or the computer program loaded from a storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data necessary for the operation of the electronic apparatus 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
A number of components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, or the like; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, or the like. Processor 11 performs the various methods and processes described above, such as method clock chip frequency compensation.
In some embodiments, the method clock chip frequency compensation may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the method clock chip frequency compensation described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform method clock chip frequency compensation by any other suitable means (e.g., by way of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on a machine, as a stand-alone software package partly on a machine and partly on a remote machine or entirely on a remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A clock chip frequency compensation method is characterized by comprising the following steps:
acquiring a historical temperature value obtained by detecting the clock chip in a historical detection period;
determining a current detection period according to the historical temperature value and the precision grade of the clock chip;
acquiring a current temperature value obtained by detecting the clock chip in the current detection period;
and carrying out frequency compensation on the clock chip based on the current temperature value.
2. The method of claim 1, wherein determining a current detection period based on the historical temperature value and the level of accuracy of the clock chip comprises:
determining a frequency compensation error according to the historical temperature value;
obtaining an adjusting step length of the frequency compensation error;
and determining the current detection period according to the frequency compensation error, the adjusting step length and the precision grade.
3. The method of claim 2, wherein determining a frequency compensation error from the historical temperature values comprises:
σ=a*|(T1-t)2-(T2-t)2|
wherein σ represents the frequency compensation error, α represents a first preset parameter, T represents a second preset parameter, the historical detection period includes a first detection period and a second detection period, the second detection period is a previous detection period of the first detection period, the first detection period is a previous detection period of the current detection period, T1 represents a historical temperature value detected by the second detection period, and T2 represents a historical temperature value detected by the first detection period.
4. The method of claim 3, wherein determining a current detection period based on the frequency compensation error, the adjustment step size, and the level of precision comprises:
judging whether the frequency compensation error exceeds the precision grade or not;
if the precision grade is not exceeded, the current detection period is equal to the first detection period plus the adjustment step length;
and if the precision level is exceeded, the current detection period is equal to the first detection period minus the adjustment step length.
5. The method of claim 1, wherein frequency compensating the clock chip based on the current temperature value comprises:
acquiring actual output frequency corresponding to the current temperature value;
acquiring standard output frequency corresponding to the current temperature value from temperature frequency relation information, wherein the temperature frequency relation information comprises the standard output frequency corresponding to each temperature value;
and performing frequency compensation on the clock chip according to the actual output frequency and the standard output frequency.
6. The method of claim 5, wherein frequency compensating the clock chip according to the actual output frequency and the standard output frequency comprises:
determining a frequency error according to the actual output frequency and the standard output frequency;
when the frequency error exceeds a preset error value, performing frequency compensation on the clock chip based on the frequency error;
the method further comprises the following steps:
and when the frequency error does not exceed the preset error value, not performing frequency compensation on the clock chip.
7. The method of claim 1, wherein the historical temperature value is obtained by:
acquiring a simulated temperature value obtained by detecting the clock chip in the historical detection period;
and performing analog-to-digital conversion on the simulated temperature value to obtain the historical temperature value.
8. A clock chip frequency compensation apparatus, comprising:
the first acquisition module is used for acquiring historical temperature values obtained by detecting the clock chip in a historical detection period;
the determining module is used for determining the current detection period according to the historical temperature value and the precision grade of the clock chip;
the second acquisition module is used for acquiring the current temperature value obtained by detecting the clock chip in the current detection period;
and the compensation module is used for carrying out frequency compensation on the clock chip based on the current temperature value.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the clock chip frequency compensation method of any one of claims 1-7.
10. A computer-readable storage medium storing computer instructions for causing a processor to implement the clock chip frequency compensation method of any one of claims 1-7 when executed.
CN202210291102.8A 2022-03-23 2022-03-23 Clock chip frequency compensation method and device, electronic equipment and storage medium Pending CN114553192A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210291102.8A CN114553192A (en) 2022-03-23 2022-03-23 Clock chip frequency compensation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210291102.8A CN114553192A (en) 2022-03-23 2022-03-23 Clock chip frequency compensation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114553192A true CN114553192A (en) 2022-05-27

Family

ID=81664820

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210291102.8A Pending CN114553192A (en) 2022-03-23 2022-03-23 Clock chip frequency compensation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114553192A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115267312A (en) * 2022-08-02 2022-11-01 远峰科技股份有限公司 ADC voltage detection compensation method, device, equipment and storage medium
CN116301197A (en) * 2023-04-27 2023-06-23 上海合见工业软件集团有限公司 Clock data recovery method, electronic device and medium
CN117150988A (en) * 2023-11-01 2023-12-01 成都北中网芯科技有限公司 High-precision clock generation method, device, equipment and medium for verification environment
CN117554661A (en) * 2024-01-12 2024-02-13 江苏优众微纳半导体科技有限公司 Radio frequency chip test error compensation method

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115267312A (en) * 2022-08-02 2022-11-01 远峰科技股份有限公司 ADC voltage detection compensation method, device, equipment and storage medium
CN115267312B (en) * 2022-08-02 2023-08-08 远峰科技股份有限公司 ADC voltage detection compensation method, device, equipment and storage medium
CN116301197A (en) * 2023-04-27 2023-06-23 上海合见工业软件集团有限公司 Clock data recovery method, electronic device and medium
CN116301197B (en) * 2023-04-27 2023-08-04 上海合见工业软件集团有限公司 Clock data recovery method, electronic device and medium
CN117150988A (en) * 2023-11-01 2023-12-01 成都北中网芯科技有限公司 High-precision clock generation method, device, equipment and medium for verification environment
CN117150988B (en) * 2023-11-01 2024-04-02 成都北中网芯科技有限公司 High-precision clock generation method, device, equipment and medium for verification environment
CN117554661A (en) * 2024-01-12 2024-02-13 江苏优众微纳半导体科技有限公司 Radio frequency chip test error compensation method
CN117554661B (en) * 2024-01-12 2024-03-26 江苏优众微纳半导体科技有限公司 Radio frequency chip test error compensation method

Similar Documents

Publication Publication Date Title
CN114553192A (en) Clock chip frequency compensation method and device, electronic equipment and storage medium
CN102591197A (en) Clock-temperature-error compensation method and system thereof
CN115630502A (en) Battery expansion force determination method, electronic device, and storage medium
CN114623939A (en) Method, device, equipment and medium for determining pulse frequency
CN112383498B (en) Low-frequency clock compensation method and device, storage medium and terminal
CN117629084A (en) Film thickness determination method and device, computer equipment and storage medium
CN113504401A (en) Method, device and system for compensating time error of electric energy meter diary
CN115844497A (en) Control method, device and equipment of ultrasonic transducer and storage medium
CN115017732A (en) Lightning protection analysis simulation step length calculation method, device, equipment and medium
CN115062026A (en) Power consumption data detection method and device, electronic equipment and storage medium
CN117131315B (en) Out-of-tolerance electric energy meter determining method and medium based on solving multi-element quadratic function extremum
CN115563015B (en) Code heat statistics method, device, equipment and storage medium
CN118012225A (en) RTC timing system and method
CN116908537B (en) Current voltage frequency calculation circuit and method
CN117872702A (en) Timing method, device, equipment and medium based on Global Positioning System (GPS) information
CN117936134A (en) Gain coefficient correction method, device, equipment and medium for power detector
CN117406577A (en) Timing error determining method, timing error determining device, chip and storage medium
CN117150325B (en) Processing method, device, equipment and medium for abnormal residual error data
CN115542174A (en) Lithium battery SOC correction method and device, energy storage system and storage medium
CN117131353B (en) Method and device for determining out-of-tolerance electric energy meter, electronic equipment and storage medium
CN116865746B (en) Clock circuit control method, device and medium
CN116208288A (en) Method, device, equipment and storage medium for correcting timing time
CN116224087B (en) Battery energy storage system and SOC estimation method and device thereof
CN115955189A (en) Method, device, equipment and medium for detecting power generation abnormity
CN115480993A (en) Method, device, equipment and storage medium for determining signal arrival time threshold

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination