Detailed Description
The present application will be further described in detail with reference to the accompanying drawings, for the purpose of making the objects, technical solutions and advantages of the present application more apparent, and the described embodiments should not be construed as limiting the present application, and all other embodiments obtained by those skilled in the art without making any inventive effort are within the scope of the present application.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is to be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments and can be combined with one another without conflict.
If a similar description of "first\second\third" appears in the application document, the following description is added, in which the terms "first\second\third" are merely distinguishing between similar objects and do not represent a particular ordering of the objects, it being understood that the "first\second\third" may be interchanged in a particular order or precedence, where allowed, to enable embodiments of the application described herein to be practiced in an order other than that illustrated or described herein.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of the application only and is not intended to be limiting of the application.
Example 1:
In order to solve the problems in the background art, as shown in fig. 1, the application provides a time keeping method, which is applied to a time keeping module of a radar. The functions implemented by the device data processing provided by the embodiment of the application can be implemented by calling program codes by a processor of the electronic device, wherein the program codes can be stored in a computer storage medium, and the time keeping method comprises the following steps:
And S11, judging the receiving condition of the satellite time signals, and determining whether the satellite time signals are normally received or not.
The determination of the reception of the satellite time signal means whether the radar can receive the satellite time signal or whether the radar can accurately analyze the satellite time signal after receiving the satellite time signal. Wherein if the radar cannot receive the satellite time signal or the radar cannot properly analyze the satellite time signal, it is determined that the reception of the satellite time signal is abnormal.
And step S12, under the condition that abnormal satellite time signal reception is determined, acquiring a power supply mode indication signal, crystal oscillator state information and a time reference signal issued by a control terminal.
The application aims at a low-altitude defense radar networking system. So that the time synchronization in the whole low-altitude defense radar networking system is required to be consistent. It is necessary to base the time of the control side. It is necessary to acquire the time reference signal issued by the control terminal.
And S13, selecting a target constant-temperature crystal oscillator according to the crystal oscillator state information.
For time-keeping stability, the fault tolerance of the radar is increased. Therefore, the radar device is provided with two constant-temperature crystal oscillators. The main constant temperature crystal oscillator and the standby constant temperature crystal oscillator are respectively adopted. Because of product variability, the output frequencies of the main thermostatic crystal oscillator and the standby thermostatic crystal oscillator can be different. Therefore, when the time keeping is performed, the constant temperature crystal oscillator needs to be selected first.
In some embodiments, step S13 "selecting a target constant temperature crystal oscillator according to the crystal oscillator state information" includes:
Step S131, determining whether a high-level signal exists or not based on the crystal oscillator state information.
And S132, determining the constant-temperature crystal oscillator corresponding to the high-level signal as a target constant-temperature crystal oscillator.
When the main constant temperature crystal oscillator has a high-level signal, the main constant temperature crystal oscillator is preferentially selected as the target constant temperature crystal oscillator.
When the constant-temperature crystal oscillator is selected, the constant-temperature crystal oscillator needs to be self-checked. During self-checking, the system clock and the clock of the constant-temperature crystal oscillator are input into an internal phase-locked loop together. Judging whether the constant-temperature crystal oscillator is normal according to the carrying signal of the internal phase-locked loop.
The self-checking of the main constant temperature crystal oscillator is carried out firstly, and if the carrying signal of the internal phase-locked loop is high level during the self-checking of the main constant temperature crystal oscillator, the main constant temperature is the target constant temperature crystal oscillator. And if the carrying signal of the internal phase-locked loop is at a low level, performing self-checking on the standby constant-temperature crystal oscillator. The self-checking mode of the standby constant-temperature crystal oscillator is the same as that of the main constant-temperature crystal oscillator, so that the self-checking mode is not repeated here.
And S14, determining a power supply mode according to the power supply mode indication signal.
For radars, the power supply modes are divided into two types, one is used for supplying power to the power adapter, and the other is used for supplying power through a battery. The power supply modes can generate corresponding power supply mode indication signals, so that the power supply mode can be judged by the power supply mode indication signals.
In some embodiments, the method further comprises:
step S21, determining whether the power supply condition of the external input power supply is normal.
The power supply condition judgment of the external input power supply is to judge the stability of the external input power supply, and if the voltage of the external input power supply is stable, the power supply of the external input power supply is considered to be normal. If the power supply condition of the external input power supply cannot be obtained or the voltage of the external input power supply is unstable, the power supply of the external input power supply is considered to be abnormal.
And S22, when the external input power supply is determined to be normal in power supply, the power adapter is adopted for power supply, and a power supply mode indication signal is generated.
And S23, when the power supply abnormality of the external input power supply is determined, the external input power supply is powered by a battery, and a power supply mode indication signal is generated and the current battery power value is output in real time.
In the application, the two power supply modes can be automatically switched, when the external power supply is powered down, the battery is automatically switched to supply power, and when the external input power supply is normal in power supply, the power supply is switched back to the power supply mode of the power adapter, so that the two power supply modes are automatically switched seamlessly. When power is supplied through the power adapter, the battery is charged at the same time, so that the effective working time of the radar is ensured.
The two power supply modes are switched to supply power in a seamless mode, so that the working time of the radar is longer, and meanwhile, the accuracy of radar time keeping can be better guaranteed.
And S15, determining a target optimal calibration weight corresponding to the target constant-temperature crystal oscillator according to the target constant-temperature crystal oscillator and the power supply mode.
Because the constant-temperature crystal oscillator has product difference, the output frequencies of the main constant-temperature crystal oscillator and the standby constant-temperature crystal oscillator can be different, so that the corresponding optimal calibration weights are different when the time keeping is performed. The target optimal calibration weight here corresponds to the constant temperature crystal oscillator used when needed.
Under different power supply modes, the output frequency of the same constant-temperature crystal oscillator is also different, so that the target optimal calibration weight corresponding to the constant-temperature crystal oscillator is also different, and the target optimal calibration weight corresponding to the constant-temperature crystal oscillator is also required to be selected according to the synchronous power supply mode.
In some embodiments, step S15 "determining an optimal calibration weight according to the target constant temperature crystal oscillator and the power supply mode" includes:
And step S151, when the power supply mode supplies power for the power adapter, obtaining a target optimal calibration weight corresponding to the target constant-temperature crystal oscillator in the storage device.
The optimal calibration weight of the constant-temperature crystal oscillator is determined when the crystal oscillator leaves a factory or is debugged, and the determined optimal calibration weight is recorded in a non-erasable storage device. Therefore, the storage device records the optimal calibration weight corresponding to each constant-temperature crystal oscillator when the power adapter supplies power. So that the corresponding target optimal calibration weight value is required to be determined according to the selected constant-temperature crystal oscillator and the power supply mode.
In some embodiments, step S15 "determining an optimal calibration weight according to the target constant temperature crystal oscillator and the power supply mode" includes:
Step S152 obtains a power weight coefficient table corresponding to the target constant temperature crystal oscillator and a current power value of the battery when the power supply mode is the battery power supply mode, wherein the power weight coefficient table includes a corresponding relation between the power value and an optimal calibration weight.
And step 153, determining the target optimal calibration weight according to the current electric quantity value and the electric quantity weight coefficient table.
The electric quantity of the battery gradually decreases along with the working time, and the voltage of the battery is influenced by the decrease of the electric quantity of the general battery, and when the voltage changes, the output frequency of the constant-temperature crystal oscillator also changes, and then the corresponding optimal calibration weight value also changes. A table of the relationship between the battery power value and the optimum calibration weight, i.e. a table of the power weight coefficient in the case of battery power is stored in the storage means. Different optimal calibration weights are recorded for different electric quantity values in the electric quantity weight coefficient table. Therefore, when determining the target optimal calibration weight corresponding to the target constant-temperature crystal oscillator, the current electric quantity value of the battery needs to be acquired first, and the corresponding optimal calibration weight is determined in the electric quantity weight coefficient according to the current electric quantity value and is used as the target optimal calibration weight.
In some embodiments, step S153 "determining the optimal calibration weight according to the current power value and the power weight coefficient table" includes:
and step S1531, when the current electric quantity value is smaller than the minimum electric quantity value in the electric quantity weight coefficient table, calculating the target optimal calibration weight value based on the current electric quantity to sum function relation.
The electric quantity weight coefficient represents a table obtained by measurement, but the obtained data is limited, so that the current electric quantity value is possibly smaller than the minimum electric quantity value in the electric quantity weight coefficient table in actual use, and the optimal calibration weight corresponding to the current electric quantity value cannot be obtained through the electric quantity weight coefficient table. The optimal calibration weight corresponding to the current electric quantity value needs to be calculated through a functional relation at the moment. The function relation is obtained by fitting the optimal calibration weight corresponding to the electricity and the magnitude in the electricity weight coefficient table.
And S16, adjusting time count according to the target optimal calibration weight and the time reference signal to generate perpetual calendar time.
The constant temperature crystal oscillator can stably operate only under the condition that the temperature reaches a certain value. Therefore, before time keeping, the constant-temperature crystal oscillator needs to be preheated and whether the constant-temperature crystal oscillator needs to be subjected to self-adaptive frequency calibration is judged.
In some embodiments, the method further comprises:
and S31, preheating the constant-temperature crystal oscillator to stabilize the output frequency of the constant-temperature crystal oscillator.
After the constant-temperature crystal oscillator is preheated, the state of the constant-temperature crystal oscillator needs to be confirmed, and whether the constant-temperature crystal oscillator needs to be subjected to self-adaptive frequency calibration is confirmed.
And S32, acquiring a calibration state flag bit of the constant-temperature crystal oscillator.
And step S33, when the calibration state flag bit is at a high level, determining whether a calibration command sent by the control end is received.
And step S34, under the condition that the calibration command is received, carrying out self-adaptive frequency calibration on the constant-temperature crystal oscillator.
And step 35, when the calibration state flag bit is at a low level, performing self-adaptive frequency calibration on the constant-temperature crystal oscillator.
The judging conditions of the self-adaptive frequency calibration are two, one is to perform self-adaptive calibration on the constant-temperature crystal oscillator when the calibration state flag bit is in a low level, and the other is to calibrate the constant-temperature crystal oscillator when a calibration command issued by the control end is received. The calibration status flag bit is used for reflecting whether the constant-temperature crystal oscillator is calibrated or not. When the calibration state flag bit is the resisting level, the constant-temperature crystal oscillator is not calibrated, and the constant-temperature crystal oscillator needs to be used after being calibrated.
In some embodiments, the step S34 or the step S35 of "the constant temperature crystal oscillator performs adaptive frequency calibration", includes:
And S341, firstly, carrying out the self-adaptive frequency calibration on the main constant-temperature crystal oscillator under the power supply of the power adapter, and then carrying out the self-adaptive frequency calibration on the standby constant-temperature crystal oscillator.
And step S342, performing the self-adaptive frequency calibration on the main constant-temperature crystal oscillator under the power supply of the battery, and performing the self-adaptive frequency calibration on the standby constant-temperature crystal oscillator.
When the constant-temperature crystal oscillator is calibrated, the two constant-temperature crystal oscillators are the main constant-temperature crystal oscillator and the standby constant-temperature crystal oscillator respectively, and the main constant-temperature crystal oscillator needs to be calibrated firstly during the calibration. The calibration of the main constant temperature crystal oscillator is generally performed before use or when leaving the factory. The standby constant-temperature crystal oscillator can be calibrated in the process of integrating the main constant-temperature crystal oscillator into the time keeping process, and a large amount of time can be saved.
In the calibration process, the output frequency of the constant-temperature crystal oscillator is affected by the voltage, and when the power adapter supplies power, the voltage is stable, so that the calibration of one calibration period is only needed. In the case of battery power supply, the optimal calibration weight corresponding to different electric quantity values needs to be obtained, so that in the case of battery power supply, a plurality of periods need to be calibrated. Therefore, the main constant temperature crystal oscillator is calibrated by power supply of the power adapter.
In some embodiments, it is also necessary to take into account whether the manner in which the power is supplied satisfies the calibration order when performing the adaptive frequency calibration. The method further comprises the steps of:
Step S41, determining whether the power supply mode meets the calibration sequence.
Step S42, when the power supply mode does not meet the calibration sequence, the generated error self-checking code prompts the change of the power supply mode.
The calibration sequence referred to herein is only a sequence of power supply modes that requires power to be supplied by the power adapter and then calibrated using battery power when adaptively calibrating for different power supply modes.
In some embodiments, step S341 "first performs the adaptive frequency calibration on the main thermostatic crystal oscillator and then performs the adaptive frequency calibration on the standby thermostatic crystal oscillator under the power supplied by the power adapter" includes:
In step S3411, a calibration period with a duration of T is preset, and the calibration period is divided into D unit time lengths.
When the power adapter supplies power, the constant-temperature crystal oscillator has the characteristic of stable voltage, so that the output frequency of the constant-temperature crystal oscillator is stable, and only one calibration period is needed.
Step S3412, obtaining the j second pulse output by the positioning orientation card in the i unit time.
The second pulse output by the positioning and orientation clamping plate is generated based on satellite time signals, so the number of second pulse rising edges generated by the positioning and orientation clamping plate is used as a reference.
And step S3413, acquiring the kth second pulse output by the main constant temperature crystal oscillator in the ith unit time.
While the positioning and orientation clamping plate generates the second pulse, the main constant temperature crystal oscillator also generates the second pulse.
And S3414, determining the ith clock deviation number of the kth second pulse relative to the jth second pulse according to the rising edge number of the jth second pulse and the rising edge number of the kth second pulse.
The duration of the two pulses per second is the same, both being one unit time long. At this time, the rising edge numbers of the two second pulses are obtained, and the rising edge numbers of the two second pulses are compared, so that the clock deviation number of the second pulses generated by the constant-temperature crystal oscillator and the second pulses generated by the directional clamping plate can be obtained.
And step S3415, comparing the ith clock deviation number with a first threshold value.
And S3416, when the ith clock deviation number is larger than the first threshold value, determining an ith correction weight according to the ith clock deviation number.
In radar time keeping, the required time keeping deviation is required to be smaller than 1us, and the output frequency of a common constant-temperature crystal oscillator is 200M, so when the number of clock deviations is larger than 2, the constant-temperature crystal oscillator is considered to be required to be calibrated, and the number of clock deviations is taken as a correction weight.
Step S3417, determining whether the ith correction weight satisfies an optimization condition.
And step S3418, when the ith correction weight meets the optimization condition, the ith correction weight is regarded as a first optimal calibration weight and written into the storage device.
Because the obtained clock deviation number is larger than the first threshold value, the clock number of the main constant-temperature crystal oscillator in unit time is modified according to the clock deviation number, so that the clock number in unit time after modification is more in line with the output frequency of the main constant-temperature crystal oscillator. The calibration is continued for the next unit time. Wherein i, j and k are positive integers less than or equal to D.
In some embodiments, step S3418 "in which, in the case where it is determined that the i-th correction weight satisfies the optimization condition, the i-th correction weight is regarded as the first optimal calibration weight is written into the storage device", includes:
And step S34181, when the number of the (i+1) th clock deviations is smaller than the first threshold value, the (i) th correction weight is regarded as a first optimal calibration weight to be written into the storage device.
And step S34182, when i is equal to D, the i-th correction weight is regarded as a first optimal calibration weight and written into the storage device.
In step S3418, two optimization conditions are provided, and one is that when the number of clock deviations corresponding to a certain time unit is smaller than the first threshold, it is indicated that the correction weight obtained at this time is a correction result, and then the correction weight obtained in the last unit time is recorded in the storage device as the optimal calibration weight of the main constant-temperature crystal oscillator under the condition of power supply of the power adapter.
In another case, when the calibration period is completed after the D unit time is reached, but the number of the D clock offsets is still greater than the first threshold, the D correction weight determined according to the number of the D clock offsets is recorded in the storage device as the optimal calibration weight of the main constant-temperature crystal oscillator under the condition of power supply of the power adapter.
In some embodiments, step S342 "performing the adaptive frequency calibration on the main oven-controlled crystal oscillator and then performing the adaptive frequency calibration on the standby oven-controlled crystal oscillator under the power supplied by the battery" includes:
And step S3421, presetting N calibration periods for the main constant-temperature crystal oscillator, wherein the total time length of the N calibration periods is greater than or equal to a first time threshold.
Because the electric quantity of the battery can change along with the power supply time, and meanwhile, the voltage of the battery can also change along with the electric quantity of the battery, the output frequency of the constant-temperature crystal oscillator can be influenced by the electric quantity of the battery under the condition of power supply of the battery. Therefore, calibration needs to be performed for a plurality of periods to obtain the corresponding relation between the optimal calibration weight and the battery power. Considering the length of time the radar needs to operate, it is necessary to obtain data that is sufficiently rich to support the conservation of radar for more than 48 hours. The total time required for calibration is greater than 48 hours.
Step S3422, obtaining a first optimal calibration weight.
The first optimal calibration weight is an optimal calibration weight obtained by the main constant-temperature crystal oscillator under the condition of stable voltage. The first optimal calibration weight may be used as a reference herein to reduce the dependence on the satellite time signal when performing adaptive frequency calibration so that the optimal calibration weight when battery powered may be performed in a state where the satellite time signal cannot be normally obtained.
And step S3423, obtaining the number of the corresponding second pulse rising edges generated by the main constant-temperature crystal oscillator in each unit time length in the current period.
And step S3424, determining the clock deviation number corresponding to each unit duration in the current period according to the corresponding second pulse rising edge number and the first optimal calibration weight.
And step S3425, obtaining the clock deviation numbers corresponding to each unit time length in the current period, and carrying out weighted average on the clock deviation numbers to obtain a second optimal calibration weight corresponding to the current period.
And step S3426, obtaining the battery electric quantity in the current period, and writing the battery electric quantity and the second optimal calibration weight into the storage device to form the electric quantity weight coefficient table corresponding to the main constant-temperature crystal oscillator.
The above process is a working method in a single calibration period, and to complete the optimal calibration weight of the main constant-temperature crystal oscillator under the condition of battery power supply, the above steps are required to be carried out for N times until the calibration of N calibration periods is completed, and finally, an electric quantity weight coefficient table is obtained, and only then, enough data in the electric quantity weight data table can be ensured, so that the radar can realize accurate time keeping within 48 hours.
The above is of course a procedure for adaptive frequency calibration of a main oven controlled crystal. For the standby constant temperature crystal oscillator, the process of performing self-adaptive frequency calibration on the standby constant temperature crystal oscillator is the same, but the self-adaptive frequency calibration on the standby constant temperature crystal oscillator can be performed during the process of performing time keeping operation on the main constant temperature crystal oscillator. Therefore, a description of how to perform adaptive frequency calibration on the standby constant temperature crystal is omitted here.
The method is provided for accurately keeping time when the radar cannot receive the satellite time signal or the radar cannot accurately analyze the satellite time signal. And when the radar can receive the satellite time signal and can properly resolve the satellite time signal.
In some embodiments, as shown in fig. 2, the method further comprises:
step S41, when the satellite time signal is determined to be normally received, the satellite time signal and the satellite second pulse are received.
And S42, selecting a target constant-temperature crystal oscillator.
The specific method for how to select the constant temperature crystal oscillator is the same as that of step S13.
And S43, generating perpetual calendar and crystal oscillator second pulse by taking the frequency of the constant-temperature crystal oscillator as the clock frequency.
And S44, carrying out timing alignment on the perpetual calendar and the crystal oscillator second pulse according to the satellite time signal and the satellite second pulse.
The satellite time signal can be obtained, so that whether the output frequency of the constant-temperature crystal oscillator is the same as the standard time is not needed to be considered, and the perpetual calendar and the second pulse can be corrected according to the satellite time signal only after a certain time.
The method provided by the application can ensure that the radar continuously performs time keeping work for 48 hours under the severe conditions of long-time power failure, disappearance of satellite signals and the like, the error of the time keeping result is less than 1us, and the time synchronization requirement of a radar networking system can be fully met.
Of course the application also considers the extreme temperature and strong electromagnetic interference situations. The radar is provided with the electromagnetic shielding structure and the power filter for interference prevention, so that interference signals are prevented from affecting the work of the time keeping module.
To prevent extreme temperature conditions, the radar does not work properly. The method of the present application further comprises:
And S51, acquiring the current temperature of the timekeeping module in real time in the power-on starting and working process.
And S52, judging whether to take temperature correction measures according to the current temperature and the temperature threshold value.
And step S53, when the current temperature is greater than the temperature threshold value, starting the refrigeration equipment.
And S54, when the current temperature is smaller than the temperature threshold value, starting the heating equipment.
Finally, the timekeeping module of the radar can normally work in an environment of-55 degrees to 80 degrees.
As shown in fig. 3, an overall operation flow chart of the radar time keeping module in the application is shown. The figure comprises the following steps:
And step S61, the radar is powered on and started.
Step S62, automatically selecting the power supply and simultaneously generating a power indication signal.
And step S63, preheating the constant-temperature crystal oscillator.
Step S64, after preheating, judging whether the constant temperature crystal oscillator needs to perform self-adaptive frequency calibration, if yes, jumping to step S652, and if not, jumping to step S651.
Step S651, determining whether the satellite time signal is received normally, if yes, jumping to step S661, and if no, jumping to step S663.
Step S661, outputting perpetual calendar and second pulse by the constant temperature crystal oscillator;
And S662, acquiring satellite time signals, aligning the perpetual calendar and the second pulse output by the constant-temperature crystal oscillator in a timing way, and jumping to S67.
Step S652, performing adaptive frequency calibration;
Step S653, update the adaptive frequency calibration result to the storage device, and jump to step S651.
Step S663, obtaining a time reference issued by a control end;
step S664, obtaining the optimal calibration weight in the storage device.
And step S665, generating perpetual calendar and second pulse based on the optimal calibration weight and the time reference.
And step S67, completing timekeeping.
Of course, as shown in fig. 4. The step S62 further includes:
and S72, acquiring the current temperature of the timekeeping module.
Step S73, determining whether the current temperature is within a threshold range.
And step S74, judging whether the current temperature is greater than a threshold value when the current temperature is not in the threshold value range, if so, jumping to step S75, and if not, jumping to step S76.
Step S75, starting the refrigeration equipment.
Step S76, judging whether the current temperature is smaller than a threshold value, if so, jumping to step S77.
And S77, starting the heating equipment.
As shown in fig. 5, a flow chart for performing adaptive frequency calibration for a constant temperature crystal oscillator includes the following steps:
step S81, acquiring a satellite time reference;
s82, taming and correcting the frequency of the constant-temperature crystal oscillator according to satellite time;
And S83, calculating to obtain a correction weight.
And S84, judging whether the frequency of the constant-temperature crystal oscillator is converged to the correction weight, if so, jumping to the step S85, and if not, jumping to the step S87.
And step S85, the correction weight is used as the update of the optimal correction weight to be stored in a storage device.
And S86, completing calibration.
Step S87, judging whether the tame times reach the maximum iteration times, if so, jumping to step S85, and if not, jumping to step S88.
Step S88, the number of counting clocks of the constant temperature crystal oscillator is updated according to the correction weight, and the step S81 is skipped.
If the timekeeping module performs timekeeping operation, as shown in fig. 6. The figure comprises the following steps:
And S91, preheating and calibrating the constant-temperature crystal oscillator.
Step S92, determining whether the satellite time signal is received normally, if yes, jumping to step S931, and if no, jumping to step S941.
Step S931, acquiring a satellite time reference, and selecting a normal target constant-temperature crystal oscillator;
Step S932, generating perpetual calendar and second pulse through the target constant-temperature crystal oscillator.
And step S933, performing timing alignment on perpetual calendar and second pulse generated by the target constant-temperature crystal oscillator based on the satellite time reference.
Step S941, a time reference issued by a control end is obtained, and a normal target constant-temperature crystal oscillator is selected.
Step S942, judging whether the power supply is for supplying power to the adapter, if so, jumping to step S951, and if not, jumping to step S961.
And step S951, obtaining an optimal calibration weight corresponding to the target constant-temperature crystal oscillator under the power supply of the power adapter.
And step S952, generating perpetual calendar and second pulse according to the optimal calibration weight.
Step S961, obtaining a weight electric quantity coefficient table corresponding to the target constant temperature crystal oscillator.
Step S962 is to obtain the current electric quantity of the battery.
Step S963, determining the optimal calibration weight according to the current electric quantity value and the weight electric quantity coefficient table, and jumping to step S952.
The application provides a precise time keeping method which uses domestic military grade FPGA as a controller, uses 200M constant temperature crystal oscillator as a frequency reference, uses satellite time marking calibration and self-feedback principle to perform self-adaptive precise calibration on the constant temperature crystal oscillator frequency under different power supply modes, and simultaneously adopts dual-power supply automatic seamless switching power supply, electromagnetic interference prevention design, temperature real-time sensing and correction, thereby realizing continuous 48-hour work under extremely complex environment and having a time error less than 1 us.
Example 2:
Based on the foregoing embodiments, the embodiments of the present application provide a time keeping device, where each module included in the device and each unit included in each module may be implemented by a processor in a computer device, or may of course also be implemented by a specific logic circuit, and in the implementation process, the processor may be a central Processing unit (CPU, central Processing Unit), a microprocessor (MPU, microprocessor Unit), a digital signal processor (DSP, digital Signal Processing), a field programmable gate array (FPGA, field Programmable GATE ARRAY), or the like.
As shown in fig. 7, the second aspect provides a time keeping device, which comprises a first determining module 1, a first acquiring module 2, a selecting module 3, a second determining module 4, a second acquiring module 5 and a first working module 6.
The first determining module 1 is configured to determine a receiving situation of a satellite time signal, and determine whether the receiving of the satellite time signal is normal. The first obtaining module 2 is configured to obtain a power supply mode indication signal, crystal oscillator state information, and a time reference signal sent by the control terminal when it is determined that satellite time signal reception is abnormal. And the selecting module 3 is used for selecting the target constant-temperature crystal oscillator according to the crystal oscillator state information. The second determining module 4 is configured to determine a power supply mode according to the power supply mode indication signal. The second obtaining module 5 is configured to determine a target optimal calibration weight corresponding to the target constant-temperature crystal oscillator according to the target constant-temperature crystal oscillator and the power supply mode. The first working module 6 is used for adjusting time count according to the target optimal calibration weight and the time reference signal so as to generate perpetual calendar time.
In some embodiments, the second acquisition module 5 includes a third acquisition module, a fourth acquisition module, and a third determination module.
And the third acquisition module is used for acquiring a target optimal calibration weight corresponding to the target constant-temperature crystal oscillator in the storage device when the power supply mode supplies power for the power adapter. And the fourth acquisition module is used for acquiring an electric quantity weight coefficient table corresponding to the target constant-temperature crystal oscillator and the current electric quantity value of the battery when the power supply mode is used for supplying power to the battery. And the third determining module is used for determining the target optimal calibration weight according to the current electric quantity value and the electric quantity weight coefficient table.
In some embodiments, the second acquisition module 5 further comprises a fourth determination module.
And the fourth determining module is used for calculating the target optimal calibration weight based on the current electric quantity to sum function relation when the current electric quantity value is smaller than the minimum electric quantity value in the electric quantity weight coefficient table.
In some implementations, the timekeeping apparatus further includes a fifth determination module, a first execution module, and a second execution module.
The fifth determining module is used for determining whether the power supply condition of the external input power supply is normal. The first execution module is used for adopting the power adapter to supply power and generating a power supply mode indication signal when the power supply of the external input power supply is determined to be normal. The second execution module is used for adopting a battery to supply power when the power supply abnormality of the external input power supply is determined, generating a power supply mode indication signal and outputting the current battery power value in real time.
In some embodiments, the selecting module 3 includes a sixth determining module and a third executing module.
And the sixth determining module is used for determining whether a high-level signal exists or not based on the crystal oscillator state information. And the third execution module is used for determining the constant-temperature crystal oscillator corresponding to the high-level signal as a target constant-temperature crystal oscillator.
In some embodiments, the time keeping device further comprises a preheating module, a fifth acquisition module, a receiving module, a seventh determination module and a fourth execution module.
The preheating module is used for preheating the constant-temperature crystal oscillator so as to stabilize the frequency of the constant-temperature crystal oscillator output. And the fifth acquisition module is used for acquiring the calibration state zone bit of the constant-temperature crystal oscillator. The receiving module is used for receiving the calibration command sent by the control end. And the seventh determining module is used for determining whether a calibration command sent by the control end is received or not when the calibration state flag bit is at a high level. And the fourth execution module is used for carrying out self-adaptive frequency calibration on the constant-temperature crystal oscillator under the condition that the calibration command is received or when the calibration state flag bit is at a low level.
In some embodiments, the fourth execution module includes a fifth execution module and a sixth execution module.
The fifth execution module is used for firstly carrying out the self-adaptive frequency calibration on the main constant-temperature crystal oscillator under the power supply of the power adapter, and then carrying out the self-adaptive frequency calibration on the standby constant-temperature crystal oscillator. And the sixth execution module is used for carrying out the self-adaptive frequency calibration on the main constant-temperature crystal oscillator under the power supply of the battery, and then carrying out the self-adaptive frequency calibration on the standby constant-temperature crystal oscillator.
In some embodiments, the timekeeping apparatus further comprises an eighth determination module and a seventh execution module.
The eighth determining module is used for determining whether the power supply mode meets the calibration sequence. The seventh execution module is used for generating error self-checking codes to prompt the change of the power supply mode under the condition that the power supply mode does not meet the calibration sequence.
In some embodiments, the fifth execution module includes a first preset module, a sixth acquisition module, a seventh acquisition module, a first comparison module, a ninth determination module, a tenth determination module, an eleventh determination module, and an eighth execution module.
The first preset module is used for presetting a calibration period with a duration of T and dividing the calibration period into D unit time lengths. The sixth acquisition module is used for acquiring the j second pulse output by the positioning orientation card in the i unit time. The seventh acquisition module is used for acquiring the kth second pulse output by the main constant-temperature crystal oscillator in the ith unit time. And the ninth determining module is used for determining the ith clock deviation number of the kth second pulse relative to the jth second pulse according to the rising edge number of the jth second pulse and the rising edge number of the kth second pulse. The first comparison module is used for comparing the ith clock deviation number with a first threshold value. And the tenth determining module is used for determining an ith correction weight according to the ith clock deviation number when the ith clock deviation number is larger than the first threshold value. The eleventh determining module is configured to determine whether the ith correction weight satisfies an optimization condition. And the eighth execution module is used for writing the ith correction weight as a first optimal calibration weight into the storage device under the condition that the ith correction weight is determined to meet the optimization condition.
In some embodiments, the eighth execution module includes a ninth execution module and a tenth execution module.
And the ninth execution module is used for writing the ith correction weight as a first optimal calibration weight into the storage device when the number of the (i+1) th clock deviations is smaller than the first threshold value. And the tenth execution module is used for writing the i-th correction weight as a first optimal calibration weight into the storage device when i is equal to D.
In some embodiments, the sixth execution module includes a second preset module, an eighth acquisition module, a ninth acquisition module, a twelfth determination module, a first calculation module, and an eleventh execution module.
The second preset module is used for presetting the calibration of the main constant-temperature crystal oscillator for N calibration periods, and the total time length of the N calibration periods is greater than or equal to a first time threshold. The eighth acquisition module is used for acquiring the first optimal calibration weight. And the ninth acquisition module is used for acquiring the number of the corresponding second pulse rising edges generated by the main constant-temperature crystal oscillator in each unit time length in the current period. And the twelfth determining module is used for determining the clock deviation number corresponding to each unit duration in the current period according to the corresponding second pulse rising edge number and the first optimal calibration weight. The first calculation module is used for obtaining the clock deviation numbers corresponding to each unit duration in the current period, and carrying out weighted average on the clock deviation numbers to obtain a second optimal calibration weight corresponding to the current period. The eleventh execution module is configured to obtain the battery power in the current period, write the battery power and the second optimal calibration weight into the storage device, and form the power weight coefficient table corresponding to the main constant-temperature crystal oscillator.
In some embodiments, the time keeping device further comprises a tenth acquisition module, a selection module 3, a second working module and an alignment module.
The tenth acquisition module is used for receiving the satellite time signal and the satellite second pulse under the condition that the satellite time signal is normally received. The selecting module 3 is used for selecting a target constant-temperature crystal oscillator. And the second working module is used for generating perpetual calendar and crystal oscillator second pulse by taking the frequency of the constant-temperature crystal oscillator as the clock frequency. And the alignment module is used for carrying out timing alignment on the perpetual calendar and the crystal oscillator second pulse according to the satellite time signal and the satellite second pulse.
The application provides a precise time keeping device which uses domestic military grade FPGA as a controller, uses 200M constant temperature crystal oscillator as a frequency reference, uses satellite time marking calibration and self-feedback principle to perform self-adaptive precise calibration on the constant temperature crystal oscillator frequency under different power supply modes, adopts dual-power supply automatic seamless switching power supply, electromagnetic interference prevention design, temperature real-time sensing and correction, and realizes continuous 48-hour work under extremely complex environment with time error less than 1 us.
Each module in the above-mentioned time keeping device may be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in the processor in the robot equipment in a hardware form or can be independent of the processor in the robot equipment, and can also be stored in a memory in the processing device in a software form, so that the processor can call and execute the operations corresponding to the modules. It should be noted that, in the embodiment of the present application, the division of the modules is schematic, which is merely a logic function division, and other division manners may be implemented in actual implementation.
Example 3:
A third aspect provides an electronic device comprising a memory storing a computer program and a processor implementing the steps of a time keeping method when the computer program is executed by the processor.
Example 4:
A fourth aspect provides a storage medium storing a computer program executable by one or more processors, the computer program operable to implement the steps of any of the time keeping methods of the first aspect.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, or the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory. By way of illustration, and not limitation, RAM can be in various forms such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc.
Example 5:
As shown in fig. 8, of course, the present application also discloses a fifth aspect. The fifth aspect provides a time keeping module, which comprises an FPGA controller, a frequency source module, a storage device, a power supply module, a temperature correction module and an external communication module.
The frequency source module comprises a main constant temperature crystal oscillator, a standby constant temperature crystal oscillator and a system clock crystal oscillator. The main thermostatic crystal oscillator and the standby thermostatic crystal oscillator are used for generating second pulses and completing time keeping in combination with the optimal calibration weight stored in the storage device. The system clock crystal oscillator is used for self-checking the main constant-temperature crystal oscillator and the standby constant-temperature crystal oscillator.
The power module comprises a power adapter, a lithium battery pack, a power filter and a DC/DC module. The power module is used for supplying power to the FPGA controller and other modules.
The temperature correction module comprises a temperature sensor, refrigerating equipment and heating equipment. The temperature correction module is used for obtaining the current temperature of the timekeeping module and adjusting the temperature of the timekeeping module.
The external communication module comprises a radar positioning and orientation component, a radar signal processing component, a radar data processing component and a radar total section display control. The radar positioning and orientation component is used for acquiring satellite time signals. The radar signal processing component is used for resolving various information received.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in various embodiments of the present application, the sequence numbers of the foregoing processes do not mean the order of execution, and the order of execution of the processes should be determined by the functions and internal logic thereof, and should not constitute any limitation on the implementation process of the embodiments of the present application. The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is merely a logical function division, and there may be additional divisions of actual implementation, such as multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. In addition, the various components shown or discussed may be coupled or directly coupled or communicatively coupled to each other via some interface, whether indirectly coupled or communicatively coupled to devices or units, whether electrically, mechanically, or otherwise.
The units described as separate components may or may not be physically separate, and components displayed as units may or may not be physical units, may be located in one place or distributed on a plurality of network units, and may select some or all of the units according to actual needs to achieve the purpose of the embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of hardware plus a form of software functional unit.
It will be appreciated by those of ordinary skill in the art that implementing all or part of the steps of the above method embodiments may be implemented by hardware associated with program instructions, where the above program may be stored in a computer readable storage medium, where the program when executed performs the steps comprising the above method embodiments, where the above storage medium includes various media that may store program code, such as a removable storage device, a Read Only Memory (ROM), a magnetic disk, or an optical disk.
Or the above-described integrated units of the application may be stored in a computer-readable storage medium if implemented in the form of software functional modules and sold or used as separate products. Based on such understanding, the technical solutions of the embodiments of the present application may be embodied essentially or in part in the form of a software product stored in a storage medium, including instructions for causing a controller to perform all or part of the methods described in the embodiments of the present application. The storage medium includes various media capable of storing program codes such as a removable storage device, a ROM, a magnetic disk, or an optical disk.
The foregoing is merely an embodiment of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes and substitutions are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.