WO2016184148A1 - Clock switching method, apparatus and base station - Google Patents

Clock switching method, apparatus and base station Download PDF

Info

Publication number
WO2016184148A1
WO2016184148A1 PCT/CN2016/070870 CN2016070870W WO2016184148A1 WO 2016184148 A1 WO2016184148 A1 WO 2016184148A1 CN 2016070870 W CN2016070870 W CN 2016070870W WO 2016184148 A1 WO2016184148 A1 WO 2016184148A1
Authority
WO
WIPO (PCT)
Prior art keywords
offset value
time
frequency offset
clock
current
Prior art date
Application number
PCT/CN2016/070870
Other languages
French (fr)
Chinese (zh)
Inventor
董广明
游洪波
肖辉
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2016184148A1 publication Critical patent/WO2016184148A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/16Performing reselection for specific purposes
    • H04W36/165Performing reselection for specific purposes for reducing network power consumption

Definitions

  • the present invention relates to the field of mobile communications, and in particular, to a method, an apparatus, and a base station for clock switching.
  • the reference clock source used includes GPS, air interface synchronization, and 1588. During the working process, there are some abnormal conditions that cause the current clock source to be unavailable. At this time, the system clock needs to be switched.
  • the method of switching the system clock is likely to cause the user to drop the call or access the network, thereby affecting the user experience and resulting in poor user experience.
  • the embodiment of the present invention is to provide a method, a device, and a base station for clock switching, which at least solves the problems existing in the prior art, and solves the problem that the switching of the existing system clock easily causes the user to drop the call and/or cannot access. Network problems.
  • the present invention provides a method of clock switching, the method comprising:
  • the system clock is adjusted according to the time offset value for the adjustment and the frequency offset value for the adjustment, and the current clock source is switched to the standby clock source.
  • the time offset value and the frequency offset of the current moment are The values are respectively smoothed, and the steps of adjusting the time offset value and the frequency offset value are obtained, which specifically includes:
  • the time-biased smoothing coefficient and the frequency-offset smoothing coefficient are calculated
  • the step of calculating a time-offset smoothing coefficient and a frequency offset smoothing coefficient according to the offset value and the frequency offset value of the standby clock source, and the time offset value and the frequency offset value of the current clock source are used. Specifically, including:
  • the time deviation value is obtained by performing a difference processing between the time offset value acquired by the current clock source and the time offset value obtained by the standby clock source;
  • the frequency offset value is obtained by performing a difference processing between the frequency offset value acquired by the current clock source and the frequency offset value obtained by the standby clock source.
  • the method further includes:
  • GPS or 1588 clock as the current clock source, use the air interface synchronous clock as the backup clock source; when the GPS or 1588 clock loses lock, switch the system clock; or
  • the air interface synchronous clock is used as the current clock source, and GPS or 1588 clock is used as the backup clock source; when the GPS or 1588 clock is locked, the system clock is switched.
  • the method further includes:
  • the time offset value for adjustment is specifically the time-averaged smoothing coefficient and the time-offset value of the current time.
  • the frequency offset value for adjustment is specifically the sum of the frequency offset smoothing coefficient and the frequency offset value of the current time.
  • the method further includes:
  • the time offset value for adjustment is specifically a difference between the time offset value of the current time and the time offset smoothing coefficient; and the frequency offset value used for the adjustment is specifically the frequency offset value of the current time and the frequency offset smoothing coefficient. Difference.
  • the invention provides a device for clock switching, the device comprising:
  • the time-frequency offset obtaining module is configured to acquire a time offset value and a frequency offset value of the current moment through the standby clock source;
  • the smoothing module is configured to perform smoothing processing on the time offset value and the frequency offset value of the current time, respectively, to obtain a time offset value for adjustment and a frequency offset value for adjustment;
  • the switching module is configured to adjust the system clock according to the time offset value for the adjustment and the frequency offset value for the adjustment, and switch the system clock from the current clock source to the standby clock source.
  • the time-frequency offset obtaining module is further configured to acquire a time offset value and a frequency offset value of the current time by using a current clock source;
  • the smoothing module is specifically configured to calculate a time-offset smoothing coefficient and a frequency offset smoothing coefficient according to the offset value and the frequency offset value of the standby clock source, and the time offset value and the frequency offset value of the current clock source;
  • the smoothing module includes a smoothing coefficient determining module, and the smoothing coefficient determining module is configured to acquire time offset values and frequency offset values of the plurality of different moments;
  • the time deviation value is obtained by performing a difference processing between the time offset value acquired by the current clock source and the time offset value obtained by the standby clock source;
  • the frequency offset value is obtained by performing a difference processing between the frequency offset value acquired by the current clock source and the frequency offset value obtained by the standby clock source.
  • the time-frequency offset obtaining module, the smoothing module, and the switching module, the smoothing coefficient determining module may use a central processing unit (CPU) and a digital signal processor (DSP, when performing processing). Digital Singnal Processor) or Field-Programmable Gate Array (FPGA) implementation.
  • CPU central processing unit
  • DSP digital signal processor
  • FPGA Field-Programmable Gate Array
  • the present invention provides a base station that performs clock switching using the clock switching apparatus of the present invention.
  • the time offset value and the frequency offset value of the current time source are obtained by performing smoothing processing on the standby clock source, thereby achieving the effect of clock smooth switching, improving the system clock performance, and effectively solving the problem that the user loses or fails when the system clock is switched.
  • the problem of accessing the network is obtained by performing smoothing processing on the standby clock source, thereby achieving the effect of clock smooth switching, improving the system clock performance, and effectively solving the problem that the user loses or fails when the system clock is switched.
  • FIG. 1 is a main flowchart of a method for clock switching in an embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of a device for clock switching according to an embodiment of the present invention.
  • the present invention provides a method, an apparatus, and a base station for clock switching.
  • the present invention further proceeds to the present invention with reference to the accompanying drawings and embodiments. Detailed description. It should be understood that the specifics described herein The examples are merely illustrative of the invention and are not intended to limit the invention.
  • an embodiment of the present invention provides a method for clock switching, where the method includes:
  • S102 Smoothing the time offset value and the frequency offset value of the current time to obtain a time offset value for adjustment and a frequency offset value for adjustment;
  • the clock source used includes GPS, air interface synchronization and 1588; generally, after the system is powered on, the GPS or 1588 clock is configured as the current clock source; the default air interface synchronization clock also runs at the same time as the backup clock source. .
  • the air interface synchronization clock is also configured as the current clock source, GPS or 1588 clock as the backup clock source.
  • the time offset value and the frequency offset value of the current time source are obtained by smoothing the backup clock source, thereby achieving the effect of clock smooth switching, improving the system clock performance, and effectively solving the system clock.
  • the step of smoothing the time offset value and the frequency offset value of the current time to obtain the time offset value for adjustment and the frequency offset value for adjustment are preferably implemented in the following manner:
  • S1011 Obtain a time offset value and a frequency offset value of the current time by using a current clock source
  • S1013 Determine, according to the time-averaged smoothing coefficient and the time-offset value of the current time, a time-offset value for adjusting;
  • S1014 Determine a frequency offset value for adjustment according to the frequency offset smoothing coefficient and the frequency offset value of the current time.
  • the integrated smoothing effect and the performance of the LTE system are preferably obtained by using the foregoing manner to obtain the time offset value and the frequency offset value for adjustment.
  • the method is simple to implement, and the calculation is fast without affecting the performance of the LTE system, and the clock is further improved. Smooth switching effect.
  • S10121 Obtain a time offset value and a frequency offset value at different times
  • S10122 Perform smoothing processing on the plurality of time offset values and frequency offset values, respectively, to obtain the time offset smoothing coefficient and the frequency offset smoothing coefficient;
  • the time deviation value is obtained by performing a difference processing between the time offset value acquired by the current clock source and the time offset value obtained by the standby clock source;
  • the frequency offset value is obtained by performing a difference processing between the frequency offset value acquired by the current clock source and the frequency offset value obtained by the standby clock source.
  • the effect of the smooth switching and the performance of the LTE system may be determined according to the need to determine the deviation value and the frequency offset value when performing the smoothing process respectively.
  • the number is preferably selected within 100 seconds, for example, 50, 55, 60, 65 or 70 in 1 second.
  • the method of the embodiment of the present invention may further include:
  • the GPS or 1588 clock is used as the current clock source, and the air interface synchronous clock is used as the backup clock source; when the GPS or 1588 clock loses lock, the system clock is switched.
  • the inventor of the present invention may also find that, when the LTE system detects the GPS or the 1588 clock lock, the current clock source needs to be switched from the new clock to the GPS or the 1588 clock.
  • the air interface synchronous clock is used as the current clock source, and GPS or 1588 clock is used as the backup clock source; when the GPS or 1588 clock is locked, the system clock is switched.
  • Step 1 The LTE system is powered on, and the GPS or 1588 clock is used as the current clock source to configure the working system clock.
  • Step 2 The air interface is synchronized to the software clock. At the same time, it is used as the backup clock source. It can run synchronously in real time and perform periodic air interface synchronization.
  • Step 3 The local base station obtains the time-frequency offset value of the local base station by scanning the primary base station existing around and by GPS or 1588 (current clock source).
  • Step 4 The local base station obtains the time-frequency offset between the local base station and the primary base station by scanning the primary base station existing around the primary base station, and records the time-frequency offset value by using the air interface synchronization (the backup clock source).
  • the time-frequency offset obtained by the air interface synchronization is not used as a reference value for adjusting the system clock, and only recording is performed.
  • Step 5 Smoothing the time-frequency offset obtained from the air interface synchronization, and smoothing the time-frequency offset obtained from the GPS or 1588 clock to obtain a time-frequency partial smoothing coefficient.
  • Step 51 The time offset value t 2 obtained by the current clock source and the time offset value t 1 obtained by the standby clock source are simultaneously subjected to difference processing, and the time deviation value ⁇ t i is obtained ;
  • ⁇ t i t 2 - t 1 at the i-th time
  • Step 52 Perform a difference processing between the frequency offset value obtained by the current clock source and the frequency offset value obtained by the standby clock source to obtain a frequency offset value ⁇ f i ;
  • ⁇ f i f 2 -f 1 at the i-th moment
  • Step 53 Obtain a time offset value and a frequency offset value of the plurality of different moments; that is, take the time offset value and the frequency offset value of the n times in the preset time period; for example, 60 times in 1 second;
  • Step 54 Smoothing the plurality of time offset values and frequency offset values, respectively, to obtain the time-biased smoothing coefficient and the frequency-offset smoothing coefficient;
  • time-biased smoothing coefficient k t is obtained by the following calculation method:
  • the frequency offset smoothing coefficient k f is obtained by the following calculation method:
  • Step 6 When the GPS or 1588 clock is out of lock, the system immediately determines the time offset value T 1 for adjustment according to the time-averaged smoothing coefficient and the time offset value T 01 of the current time; and the smoothing coefficient according to the frequency offset And the frequency offset value F 01 of the current time is determined, and the frequency offset value F 1 for adjustment is determined.
  • T 1 k t + T 01 ;
  • F 1 k f + F 01 .
  • the time offset value for adjustment is specifically the sum of the time-averaged smoothing coefficient and the time-offset value of the current time;
  • the frequency offset value used for the adjustment is specifically the frequency-offset smoothing coefficient and the current time The sum of the frequency offset values.
  • the system clock is adjusted according to the time offset value for the adjustment and the frequency offset value for the adjustment, and the current clock source is switched to the standby clock source.
  • the current clock source is the air interface synchronization clock
  • the backup clock source is GPS or 1588 clock.
  • the system detects whether the GPS or 1588 clock (the alternate clock source) is locked every 10 minutes, and after detecting the GPS or 1588 clock lock 2 times in succession, according to the time-averaged smoothing coefficient and the current moment a time offset value T 02 , determining a time offset value T 2 for adjustment;
  • T 2 T 02 - k t ;
  • F 2 F 02 - k f .
  • the time offset value for adjustment is specifically the difference between the time offset value of the current time and the time offset smoothing coefficient
  • the frequency offset value for adjustment is specifically the difference between the frequency offset value of the current time and the frequency offset smoothing coefficient.
  • the system clock is adjusted according to the time offset value for the adjustment and the frequency offset value for the adjustment, and the current clock source is switched to the GPS or 1588 clock.
  • the current clock source is GPS or 1588 clock
  • the backup clock source is the air interface synchronization clock
  • an embodiment of the present invention provides a device for clock switching, where the device includes:
  • the time-frequency offset obtaining module 30 is configured to acquire a time offset value and a frequency offset value of the current moment by using a backup clock source;
  • the smoothing module 32 is configured to perform smoothing processing on the time offset value and the frequency offset value of the current time, respectively, to obtain a time offset value for adjustment and a frequency offset value for adjustment;
  • the switching module 34 is configured to adjust the system clock according to the time offset value for the adjustment and the frequency offset value for the adjustment, and switch the current clock source to the backup clock source.
  • the time-frequency offset obtaining module 30 is further configured to obtain a time offset value and a frequency offset value of the current time by using the current clock source;
  • the smoothing module 32 is specifically configured to be based on the offset value and the frequency offset value of the standby clock source, and the current The time offset value and the frequency offset value of the clock source are calculated, and the time-averaged smoothing coefficient and the frequency-offset smoothing coefficient are calculated;
  • the smoothing module includes a smoothing coefficient determining module and a time-frequency offset determining module;
  • the smoothing coefficient determining module is configured to acquire time offset values and frequency offset values of the plurality of different moments; and smoothing the plurality of time offset values and the frequency offset values respectively to obtain the time skew smoothing coefficient and the frequency offset Smoothing factor
  • the time deviation value is obtained by performing a difference processing between the time offset value acquired by the current clock source and the time offset value obtained by the standby clock source;
  • the frequency offset value is obtained by performing a difference processing between the frequency offset value acquired by the current clock source and the frequency offset value obtained by the standby clock source.
  • the time-frequency offset value determining module is configured to determine a time-offset value for adjustment according to the time-shifted smoothing coefficient and the time-offset value of the current time; and the frequency-offset value according to the frequency-offset smoothing coefficient and the current time , determine the frequency offset value for adjustment.
  • the device in the embodiment of the present invention may further include a triggering module configured to use the GPS or 1588 clock as the current clock source in the LTE system, and use the air interface synchronous clock as the backup clock source; when the GPS or 1588 clock loses lock, trigger the switch.
  • the module switches the system clock; or
  • the GPS or 1588 clock is used as the backup clock source; when the GPS or 1588 clock is locked, the switching module is triggered to switch the system clock.
  • the time offset value for adjustment is specifically a sum of the time-averaged smoothing coefficient and the time-offset value of the current time; and the frequency offset value used for the adjustment is specifically the frequency-offset smoothing coefficient and the frequency offset value of the current time Sum.
  • the time offset value for adjustment is specifically a difference between the time offset value of the current time and the time offset smoothing coefficient; and the frequency offset value used for the adjustment is specifically the frequency offset value of the current time and the frequency offset smoothing coefficient. Difference.
  • the embodiment of the present invention is an embodiment of the device corresponding to the first embodiment.
  • the backup clock source when the device performs the system clock switching, the backup clock source obtains the time offset value and the frequency offset value of the current time to smooth the clock, thereby achieving the effect of clock smooth switching, improving the system clock performance, and effectively solving the problem.
  • An embodiment of the present invention provides a base station, where the base station includes the apparatus in Embodiment 2.
  • the base station when the system clock is switched, the base station obtains the time offset value and the frequency offset value of the current time by the backup clock source, thereby achieving the effect of clock smooth switching, improving the system clock performance, and effectively It solves the problem that the user drops the call or cannot access the network when the system clock is switched.
  • the time offset value and the frequency offset value of the current time source are obtained by performing smoothing processing on the standby clock source, thereby achieving the effect of clock smooth switching, improving the system clock performance, and effectively solving the problem that the user loses or fails when the system clock is switched.
  • the problem of accessing the network is obtained by performing smoothing processing on the standby clock source, thereby achieving the effect of clock smooth switching, improving the system clock performance, and effectively solving the problem that the user loses or fails when the system clock is switched.

Abstract

The embodiments of the present invention provide a clock switching method, an apparatus and a base station, and are used for solving the problem that switching of the existing system clock easily causes that the call of a user is dropped and/or the user is unable to access a network. The method comprises: obtaining a time offset value and a frequency offset value at the current time by a standby clock source; performing smoothing processing respectively on the time offset value and the frequency offset value at the current time to obtain a time offset value for adjusting and a frequency offset value for adjusting; adjusting the system clock according to the time offset value for adjusting and the frequency offset value for adjusting, and switching the current clock source to the standby clock source.

Description

一种时钟切换的方法、装置及基站Method, device and base station for clock switching 技术领域Technical field
本发明涉及移动通讯领域,特别是涉及一种时钟切换的方法、装置及基站。The present invention relates to the field of mobile communications, and in particular, to a method, an apparatus, and a base station for clock switching.
背景技术Background technique
目前,在LTE通讯系统中,使用的参考时钟源包括GPS、空口同步和1588,在工作过程中,会存在某些异常情况导致当前时钟源不可用,这个时候就需要进行系统时钟的切换。At present, in the LTE communication system, the reference clock source used includes GPS, air interface synchronization, and 1588. During the working process, there are some abnormal conditions that cause the current clock source to be unavailable. At this time, the system clock needs to be switched.
目前,进行系统时钟的切换方法容易导致用户掉话或者无法接入网络,从而影响用户感受,导致用户体验差。At present, the method of switching the system clock is likely to cause the user to drop the call or access the network, thereby affecting the user experience and resulting in poor user experience.
发明内容Summary of the invention
有鉴于此,本发明实施例希望提供一种时钟切换的方法、装置及基站,至少解决了现有技术存在的问题,解决了现有系统时钟的切换容易导致用户掉话和/或无法接入网络的问题。In view of this, the embodiment of the present invention is to provide a method, a device, and a base station for clock switching, which at least solves the problems existing in the prior art, and solves the problem that the switching of the existing system clock easily causes the user to drop the call and/or cannot access. Network problems.
本发明实施例的技术方案是这样实现的:The technical solution of the embodiment of the present invention is implemented as follows:
根据本发明的一个方面,本发明提供一种时钟切换的方法,所述方法包括:According to an aspect of the present invention, the present invention provides a method of clock switching, the method comprising:
通过备用时钟源获取当前时刻的时偏值和频偏值;Obtaining the time offset value and the frequency offset value of the current moment by using the alternate clock source;
将所述当前时刻的时偏值和频偏值分别进行平滑处理,获得调整用的时偏值和调整用的频偏值;Performing a smoothing process on the time offset value and the frequency offset value of the current time to obtain a time offset value for adjustment and a frequency offset value for adjustment;
根据所述调整用的时偏值和所述调整用的频偏值调整系统时钟,将当前时钟源切换到备用时钟源。The system clock is adjusted according to the time offset value for the adjustment and the frequency offset value for the adjustment, and the current clock source is switched to the standby clock source.
在本发明实施例一实施方式中,所述将所述当前时刻的时偏值和频偏 值分别进行平滑处理,获得调整用的时偏值和频偏值的步骤,具体包括:In an embodiment of the present invention, the time offset value and the frequency offset of the current moment are The values are respectively smoothed, and the steps of adjusting the time offset value and the frequency offset value are obtained, which specifically includes:
通过当前时钟源获取当前时刻的时偏值和频偏值;Obtaining the time offset value and the frequency offset value of the current moment by using the current clock source;
根据备用时钟源时偏值和频偏值,以及当前时钟源的时偏值和频偏值,计算得到时偏平滑系数和频偏平滑系数;According to the offset value and the frequency offset value of the standby clock source, and the time offset value and the frequency offset value of the current clock source, the time-biased smoothing coefficient and the frequency-offset smoothing coefficient are calculated;
根据所述时偏平滑系数和所述当前时刻的时偏值,确定调整用的时偏值;以及根据所述频偏平滑系数和所述当前时刻的频偏值,确定调整用的频偏值。Determining a time offset value for adjustment according to the time offset smoothing coefficient and the time offset value of the current time; and determining a frequency offset value for adjusting according to the frequency offset smoothing coefficient and the frequency offset value of the current time .
在本发明实施例一实施方式中,所述根据备用时钟源时偏值和频偏值,以及当前时钟源的时偏值和频偏值,计算得到时偏平滑系数和频偏平滑系数的步骤,具体包括:In an embodiment of the present invention, the step of calculating a time-offset smoothing coefficient and a frequency offset smoothing coefficient according to the offset value and the frequency offset value of the standby clock source, and the time offset value and the frequency offset value of the current clock source are used. Specifically, including:
获取若干个不同时刻的时偏差值和频偏差值;Obtaining time offset values and frequency offset values for several different moments;
分别将所述若干个时偏差值和频偏差值进行平滑,获得所述时偏平滑系数和所述频偏平滑系数;And respectively smoothing the plurality of time offset values and frequency offset values to obtain the time offset smoothing coefficient and the frequency offset smoothing coefficient;
其中,时偏差值是将同时刻当前时钟源获取的时偏值和备用时钟源获取的时偏值做差值处理获得;Wherein, the time deviation value is obtained by performing a difference processing between the time offset value acquired by the current clock source and the time offset value obtained by the standby clock source;
频偏差值是将同时刻当前时钟源获取的频偏值和备用时钟源获取的频偏值做差值处理获得。The frequency offset value is obtained by performing a difference processing between the frequency offset value acquired by the current clock source and the frequency offset value obtained by the standby clock source.
在本发明实施例一实施方式中,所述方法还包括:In an embodiment of the present invention, the method further includes:
采用GPS或1588时钟作为当前时钟源,采用空口同步时钟作为备用时钟源;当所述GPS或1588时钟发生失锁时,切换系统时钟;或者Use GPS or 1588 clock as the current clock source, use the air interface synchronous clock as the backup clock source; when the GPS or 1588 clock loses lock, switch the system clock; or
采用空口同步时钟作为当前时钟源,采用GPS或1588时钟作为备用时钟源;当所述GPS或1588时钟锁定后,切换系统时钟。The air interface synchronous clock is used as the current clock source, and GPS or 1588 clock is used as the backup clock source; when the GPS or 1588 clock is locked, the system clock is switched.
在本发明实施例一实施方式中,所述方法还包括:In an embodiment of the present invention, the method further includes:
由所述GPS或1588时钟发生失锁,而引起的切换系统时钟时,When the GPS or 1588 clock is lost, the system clock is switched when
调整用的时偏值具体为所述时偏平滑系数和所述当前时刻的时偏值之 和;以及调整用的频偏值具体为所述频偏平滑系数和所述当前时刻的频偏值之和。The time offset value for adjustment is specifically the time-averaged smoothing coefficient and the time-offset value of the current time. And the frequency offset value for adjustment is specifically the sum of the frequency offset smoothing coefficient and the frequency offset value of the current time.
在本发明实施例一实施方式中,所述方法还包括:In an embodiment of the present invention, the method further includes:
由所述GPS或1588时钟锁定,而引起切换系统时钟时,Locked by the GPS or 1588 clock, causing switching system clocks,
调整用的时偏值具体为所述当前时刻的时偏值和所述时偏平滑系数之差;以及调整用的频偏值具体为所述当前时刻的频偏值和所述频偏平滑系数之差。The time offset value for adjustment is specifically a difference between the time offset value of the current time and the time offset smoothing coefficient; and the frequency offset value used for the adjustment is specifically the frequency offset value of the current time and the frequency offset smoothing coefficient. Difference.
根据本发明的一个方面,本发明提供一种时钟切换的装置,所述装置包括:According to an aspect of the invention, the invention provides a device for clock switching, the device comprising:
时频偏值获取模块,配置为通过备用时钟源获取当前时刻的时偏值和频偏值;The time-frequency offset obtaining module is configured to acquire a time offset value and a frequency offset value of the current moment through the standby clock source;
平滑模块,配置为将所述当前时刻的时偏值和频偏值分别进行平滑处理,获得调整用的时偏值和调整用的频偏值;The smoothing module is configured to perform smoothing processing on the time offset value and the frequency offset value of the current time, respectively, to obtain a time offset value for adjustment and a frequency offset value for adjustment;
切换模块,配置为根据所述调整用的时偏值和所述调整用的频偏值调整系统时钟,将系统时钟从当前时钟源切换到备用时钟源。The switching module is configured to adjust the system clock according to the time offset value for the adjustment and the frequency offset value for the adjustment, and switch the system clock from the current clock source to the standby clock source.
在本发明实施例一实施方式中,所述时频偏值获取模块还配置为通过当前时钟源获取当前时刻的时偏值和频偏值;In an embodiment of the present invention, the time-frequency offset obtaining module is further configured to acquire a time offset value and a frequency offset value of the current time by using a current clock source;
所述平滑模块具体配置为根据备用时钟源时偏值和频偏值,以及当前时钟源的时偏值和频偏值,计算得到时偏平滑系数和频偏平滑系数;The smoothing module is specifically configured to calculate a time-offset smoothing coefficient and a frequency offset smoothing coefficient according to the offset value and the frequency offset value of the standby clock source, and the time offset value and the frequency offset value of the current clock source;
根据所述时偏平滑系数和所述当前时刻的时偏值,确定调整用的时偏值;以及根据所述频偏平滑系数和所述当前时刻的频偏值,确定调整用的频偏值。Determining a time offset value for adjustment according to the time offset smoothing coefficient and the time offset value of the current time; and determining a frequency offset value for adjusting according to the frequency offset smoothing coefficient and the frequency offset value of the current time .
在本发明实施例一实施方式中,所述平滑模块包括平滑系数确定模块,所述平滑系数确定模块配置为获取若干个不同时刻的时偏差值和频偏差值; In an embodiment of the present invention, the smoothing module includes a smoothing coefficient determining module, and the smoothing coefficient determining module is configured to acquire time offset values and frequency offset values of the plurality of different moments;
分别将所述若干个时偏差值和频偏差值进行平滑,获得所述时偏平滑系数和所述频偏平滑系数;And respectively smoothing the plurality of time offset values and frequency offset values to obtain the time offset smoothing coefficient and the frequency offset smoothing coefficient;
其中,时偏差值是将同时刻当前时钟源获取的时偏值和备用时钟源获取的时偏值做差值处理获得;Wherein, the time deviation value is obtained by performing a difference processing between the time offset value acquired by the current clock source and the time offset value obtained by the standby clock source;
频偏差值是将同时刻当前时钟源获取的频偏值和备用时钟源获取的频偏值做差值处理获得。The frequency offset value is obtained by performing a difference processing between the frequency offset value acquired by the current clock source and the frequency offset value obtained by the standby clock source.
所述时频偏值获取模块,所述平滑模块,所述切换模块,所述平滑系数确定模块在执行处理时,可以采用中央处理器(CPU,Central Processing Unit)、数字信号处理器(DSP,Digital Singnal Processor)或可编程逻辑阵列(FPGA,Field-Programmable Gate Array)实现。The time-frequency offset obtaining module, the smoothing module, and the switching module, the smoothing coefficient determining module may use a central processing unit (CPU) and a digital signal processor (DSP, when performing processing). Digital Singnal Processor) or Field-Programmable Gate Array (FPGA) implementation.
根据本发明的一个方面,本发明提供一种基站,所述基站采用本发明所述的时钟切换的装置进行时钟切换。According to an aspect of the present invention, the present invention provides a base station that performs clock switching using the clock switching apparatus of the present invention.
本发明有益效果如下:The beneficial effects of the present invention are as follows:
本发明实施例通过将备用时钟源获取当前时刻的时偏值和频偏值进行平滑处理,达到了时钟平滑切换的效果,提高了系统时钟性能,有效解决了系统时钟切换时用户掉话或者无法入网的问题。In the embodiment of the present invention, the time offset value and the frequency offset value of the current time source are obtained by performing smoothing processing on the standby clock source, thereby achieving the effect of clock smooth switching, improving the system clock performance, and effectively solving the problem that the user loses or fails when the system clock is switched. The problem of accessing the network.
附图说明DRAWINGS
图1是本发明实施例中一种时钟切换的方法的主流程图;1 is a main flowchart of a method for clock switching in an embodiment of the present invention;
图2是本发明实施例中一种时钟切换的方法的详细流程图;2 is a detailed flowchart of a method for clock switching in an embodiment of the present invention;
图3是本发明实施例中一种时钟切换的装置结构示意图。FIG. 3 is a schematic structural diagram of a device for clock switching according to an embodiment of the present invention.
具体实施方式detailed description
为了解决现有系统时钟的切换容易导致用户掉话和/或无法接入网络的问题,本发明提供了一种时钟切换的方法、装置及基站,以下结合附图以及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体 实施例仅仅用以解释本发明,并不限定本发明。In order to solve the problem that the switching of the existing system clock is easy to cause the user to drop the call and/or the network cannot be accessed, the present invention provides a method, an apparatus, and a base station for clock switching. The present invention further proceeds to the present invention with reference to the accompanying drawings and embodiments. Detailed description. It should be understood that the specifics described herein The examples are merely illustrative of the invention and are not intended to limit the invention.
实施例一Embodiment 1
如图1所示,本发明实施例提供一种时钟切换的方法,所述方法包括:As shown in FIG. 1 , an embodiment of the present invention provides a method for clock switching, where the method includes:
S101,通过备用时钟源获取当前时刻的时偏值和频偏值;S101. Obtain a time offset value and a frequency offset value of the current moment by using a backup clock source.
S102,将所述当前时刻的时偏值和频偏值分别进行平滑处理,获得调整用的时偏值和调整用的频偏值;S102: Smoothing the time offset value and the frequency offset value of the current time to obtain a time offset value for adjustment and a frequency offset value for adjustment;
S103,根据所述调整用的时偏值和所述调整用的频偏值调整系统时钟,将当前时钟源切换到备用时钟源。S103. Adjust a system clock according to the time offset value for the adjustment and the frequency offset value for the adjustment, and switch the current clock source to the backup clock source.
其中,在LTE通讯系统中,使用的时钟源包括GPS、空口同步和1588;一般地系统上电后,配置GPS或1588时钟,作为当前时钟源;默认空口同步时钟也同时运行,作为备用时钟源。也有特殊情况时,例如GPS或1588时钟发生失锁后,也会配置空口同步时钟为当前时钟源,GPS或1588时钟作为备用时钟源。Among them, in the LTE communication system, the clock source used includes GPS, air interface synchronization and 1588; generally, after the system is powered on, the GPS or 1588 clock is configured as the current clock source; the default air interface synchronization clock also runs at the same time as the backup clock source. . There are also special cases, such as GPS or 1588 clock loss, the air interface synchronization clock is also configured as the current clock source, GPS or 1588 clock as the backup clock source.
本发明实施例进行系统时钟的切换时,通过将备用时钟源获取当前时刻的时偏值和频偏值进行平滑处理,达到了时钟平滑切换的效果,提高了系统时钟性能,有效解决了系统时钟切换时用户掉话或者无法入网的问题。In the embodiment of the present invention, when the system clock is switched, the time offset value and the frequency offset value of the current time source are obtained by smoothing the backup clock source, thereby achieving the effect of clock smooth switching, improving the system clock performance, and effectively solving the system clock. The problem that the user dropped the call or failed to access the network when switching.
其中,将所述当前时刻的时偏值和频偏值分别进行平滑处理,获得调整用的时偏值和调整用的频偏值的步骤,优选采用下述方式实现:The step of smoothing the time offset value and the frequency offset value of the current time to obtain the time offset value for adjustment and the frequency offset value for adjustment are preferably implemented in the following manner:
S1011,通过当前时钟源获取当前时刻的时偏值和频偏值;S1011: Obtain a time offset value and a frequency offset value of the current time by using a current clock source;
S1012,根据备用时钟源时偏值和频偏值,以及当前时钟源的时偏值和频偏值,计算得到时偏平滑系数和频偏平滑系数;S1012, calculating a time-biased smoothing coefficient and a frequency-offset smoothing coefficient according to the offset value and the frequency offset value of the standby clock source, and the time offset value and the frequency offset value of the current clock source;
S1013,根据所述时偏平滑系数和所述当前时刻的时偏值,确定调整用的时偏值;以及S1013: Determine, according to the time-averaged smoothing coefficient and the time-offset value of the current time, a time-offset value for adjusting;
S1014,根据所述频偏平滑系数和所述当前时刻的频偏值,确定调整用的频偏值。 S1014: Determine a frequency offset value for adjustment according to the frequency offset smoothing coefficient and the frequency offset value of the current time.
现有技术中,平滑处理方式有很多,有的方式实现简单,但平滑效果差,有的方式平滑效果好,但实现复杂,对LTE系统的计算能力要求高。本发明实施例综合平滑效果和LTE系统的性能,优选采用上述方式获取调整用的时偏值和频偏值,该方式实现简单,在不影响LTE系统的性能的情况下计算迅速,进一步提高时钟平滑切换的效果。In the prior art, there are many smoothing methods, some of which are simple to implement, but the smoothing effect is poor, and some methods have a good smoothing effect, but the implementation is complicated, and the computing power of the LTE system is high. In the embodiment of the present invention, the integrated smoothing effect and the performance of the LTE system are preferably obtained by using the foregoing manner to obtain the time offset value and the frequency offset value for adjustment. The method is simple to implement, and the calculation is fast without affecting the performance of the LTE system, and the clock is further improved. Smooth switching effect.
S1012步骤的具体实现可以参考如下方式:For the specific implementation of the S1012 step, refer to the following manner:
S10121,获取若干个不同时刻的时偏差值和频偏差值;S10121: Obtain a time offset value and a frequency offset value at different times;
S10122,分别将所述若干个时偏差值和频偏差值进行平滑处理,获得所述时偏平滑系数和所述频偏平滑系数;S10122: Perform smoothing processing on the plurality of time offset values and frequency offset values, respectively, to obtain the time offset smoothing coefficient and the frequency offset smoothing coefficient;
其中,时偏差值是将同时刻当前时钟源获取的时偏值和备用时钟源获取的时偏值做差值处理获得;Wherein, the time deviation value is obtained by performing a difference processing between the time offset value acquired by the current clock source and the time offset value obtained by the standby clock source;
频偏差值是将同时刻当前时钟源获取的频偏值和备用时钟源获取的频偏值做差值处理获得。The frequency offset value is obtained by performing a difference processing between the frequency offset value acquired by the current clock source and the frequency offset value obtained by the standby clock source.
在本发明实施例中,在获得所述时偏平滑系数和所述频偏平滑系数时,可以根据需要平滑切换的效果和LTE系统的性能,确定分别进行平滑处理时偏差值和频偏差值的个数,优选采用1秒内选择100个以内,例如1秒内50、55、60、65或70个。In the embodiment of the present invention, when the time-shifting smoothing coefficient and the frequency-offset smoothing coefficient are obtained, the effect of the smooth switching and the performance of the LTE system may be determined according to the need to determine the deviation value and the frequency offset value when performing the smoothing process respectively. The number is preferably selected within 100 seconds, for example, 50, 55, 60, 65 or 70 in 1 second.
目前,引起系统时钟切换的原因有很多,但是本发明的发明人发现,很大一部分原因是由GPS或1588时钟失锁引起的,因此基于此发现,本发明实施例方法还可以包括:At present, there are many reasons for causing the system clock to be switched. However, the inventors of the present invention have found that a large part of the reason is caused by the loss of the GPS or 1588 clock. Therefore, based on the discovery, the method of the embodiment of the present invention may further include:
采用GPS或1588时钟作为当前时钟源,采用空口同步时钟作为备用时钟源;当所述GPS或1588时钟发生失锁时,切换系统时钟。The GPS or 1588 clock is used as the current clock source, and the air interface synchronous clock is used as the backup clock source; when the GPS or 1588 clock loses lock, the system clock is switched.
本发明的发明人还发现,当LTE系统探测到GPS或1588时钟锁定后,需要将当前时钟源从新切换到GPS或1588时钟,因此基于此发现,本发明实施例方法还可以包括: The inventor of the present invention may also find that, when the LTE system detects the GPS or the 1588 clock lock, the current clock source needs to be switched from the new clock to the GPS or the 1588 clock.
采用空口同步时钟作为当前时钟源,采用GPS或1588时钟作为备用时钟源;当所述GPS或1588时钟锁定后,切换系统时钟。The air interface synchronous clock is used as the current clock source, and GPS or 1588 clock is used as the backup clock source; when the GPS or 1588 clock is locked, the system clock is switched.
为了使本发明实施例更加清楚,以下以GPS或1588时钟失锁引起的系统时钟切换为例,详细描述本发明实施例中方法。如图2所示,详细流程如下:In order to make the embodiment of the present invention more clear, the following describes the method in the embodiment of the present invention by taking the system clock switching caused by GPS or 1588 clock loss of lock as an example. As shown in Figure 2, the detailed process is as follows:
步骤1:LTE系统上电运行,采用GPS或1588时钟作为当前时钟源,配置工作的系统时钟。Step 1: The LTE system is powered on, and the GPS or 1588 clock is used as the current clock source to configure the working system clock.
步骤2:空口同步为软件时钟,同时作为备用时钟源,可以同步实时运行,并进行周期空口同步。Step 2: The air interface is synchronized to the software clock. At the same time, it is used as the backup clock source. It can run synchronously in real time and perform periodic air interface synchronization.
步骤3:本地基站通过扫描周围存在的主基站,通过GPS或1588(当前时钟源)获得本地基站的时频偏值。Step 3: The local base station obtains the time-frequency offset value of the local base station by scanning the primary base station existing around and by GPS or 1588 (current clock source).
步骤4:本地基站通过扫描周围存在的主基站,通过空口同步(备用时钟源)获取本地基站与主基站间的时频偏值,记录该时频偏值。空口同步获得的时频偏值不作为调整系统时钟的参考值,只进行记录。Step 4: The local base station obtains the time-frequency offset between the local base station and the primary base station by scanning the primary base station existing around the primary base station, and records the time-frequency offset value by using the air interface synchronization (the backup clock source). The time-frequency offset obtained by the air interface synchronization is not used as a reference value for adjusting the system clock, and only recording is performed.
步骤5:根据空口同步获取到的时频偏值,与GPS或1588时钟获取到的时频偏值进行平滑处理,获取时频偏平滑系数。Step 5: Smoothing the time-frequency offset obtained from the air interface synchronization, and smoothing the time-frequency offset obtained from the GPS or 1588 clock to obtain a time-frequency partial smoothing coefficient.
该步骤的具体实现可以采用如下方式:The specific implementation of this step can be as follows:
步骤51,将同时刻当前时钟源获取的时偏值t2和备用时钟源获取的时偏值t1做差值处理,获得时偏差值△tiStep 51: The time offset value t 2 obtained by the current clock source and the time offset value t 1 obtained by the standby clock source are simultaneously subjected to difference processing, and the time deviation value Δt i is obtained ;
具体说,第i时刻的△ti=t2-t1Specifically, Δt i = t 2 - t 1 at the i-th time;
步骤52,将同时刻当前时钟源获取的频偏值和备用时钟源获取的频偏值做差值处理,获得频偏差值△fiStep 52: Perform a difference processing between the frequency offset value obtained by the current clock source and the frequency offset value obtained by the standby clock source to obtain a frequency offset value Δf i ;
具体说,第i时刻的△fi=f2-f1Specifically, Δf i = f 2 -f 1 at the i-th moment;
步骤53,获取若干个不同时刻的时偏差值和频偏差值;也就是说,在预设时间段内取n次的时偏差值和频时偏差值;例如1秒内60次; Step 53: Obtain a time offset value and a frequency offset value of the plurality of different moments; that is, take the time offset value and the frequency offset value of the n times in the preset time period; for example, 60 times in 1 second;
步骤54,分别将所述若干个时偏差值和频偏差值进行平滑处理,获得所述时偏平滑系数和所述频偏平滑系数;Step 54: Smoothing the plurality of time offset values and frequency offset values, respectively, to obtain the time-biased smoothing coefficient and the frequency-offset smoothing coefficient;
具体说,时偏平滑系数kt采用下述计算方式获得:Specifically, the time-biased smoothing coefficient k t is obtained by the following calculation method:
Figure PCTCN2016070870-appb-000001
Figure PCTCN2016070870-appb-000001
频偏平滑系数kf采用下述计算方式获得:The frequency offset smoothing coefficient k f is obtained by the following calculation method:
Figure PCTCN2016070870-appb-000002
Figure PCTCN2016070870-appb-000002
其中,i=1,2,3,……,n。Where i=1, 2, 3, ..., n.
步骤6:当GPS或1588时钟失锁,系统立即根据所述时偏平滑系数和所述当前时刻的时偏值T01,确定调整用的时偏值T1;以及根据所述频偏平滑系数和所述当前时刻的频偏值F01,确定调整用的频偏值F1Step 6: When the GPS or 1588 clock is out of lock, the system immediately determines the time offset value T 1 for adjustment according to the time-averaged smoothing coefficient and the time offset value T 01 of the current time; and the smoothing coefficient according to the frequency offset And the frequency offset value F 01 of the current time is determined, and the frequency offset value F 1 for adjustment is determined.
具体说,T1=kt+T01;F1=kf+F01Specifically, T 1 = k t + T 01 ; F 1 = k f + F 01 .
也就是说,调整用的时偏值具体为所述时偏平滑系数和所述当前时刻的时偏值之和;调整用的频偏值具体为所述频偏平滑系数和所述当前时刻的频偏值之和。That is to say, the time offset value for adjustment is specifically the sum of the time-averaged smoothing coefficient and the time-offset value of the current time; the frequency offset value used for the adjustment is specifically the frequency-offset smoothing coefficient and the current time The sum of the frequency offset values.
然后根据所述调整用的时偏值和所述调整用的频偏值调整系统时钟,将当前时钟源切换到备用时钟源。Then, the system clock is adjusted according to the time offset value for the adjustment and the frequency offset value for the adjustment, and the current clock source is switched to the standby clock source.
切换完成后,当前时钟源为空口同步时钟,备用时钟源为GPS或1588时钟。After the switchover is complete, the current clock source is the air interface synchronization clock, and the backup clock source is GPS or 1588 clock.
为了使本发明实施例更加清楚,以下以GPS或1588时钟锁定后引起的时钟切换为例,详细描述本发明实施例中方法。详细流程如下:In order to make the embodiment of the present invention more clear, the following describes the method in the embodiment of the present invention by taking the clock switching caused by GPS or 1588 clock locking as an example. The detailed process is as follows:
在此详细流程中,前6个步骤与上述的详细流程一样,在此不再赘述;In the detailed process, the first six steps are the same as the detailed process described above, and are not described here;
在上述步骤6之后,系统每间隔10分钟探测GPS或1588时钟(备用时钟源)是否锁定,当连续2次探测到GPS或1588时钟锁定后,根据所述时偏平滑系数和所述当前时刻的时偏值T02,确定调整用的时偏值T2;以及After the above step 6, the system detects whether the GPS or 1588 clock (the alternate clock source) is locked every 10 minutes, and after detecting the GPS or 1588 clock lock 2 times in succession, according to the time-averaged smoothing coefficient and the current moment a time offset value T 02 , determining a time offset value T 2 for adjustment;
根据所述频偏平滑系数和所述当前时刻的频偏值F02,确定调整用的频 偏值F2The value of the smoothing coefficient to the frequency deviation and frequency deviation of the current time F 02, determined by the offset value to adjust the frequency F 2.
具体说,T2=T02-kt;F2=F02-kfSpecifically, T 2 = T 02 - k t ; F 2 = F 02 - k f .
也就是说,调整用的时偏值具体为所述当前时刻的时偏值和所述时偏平滑系数之差;That is to say, the time offset value for adjustment is specifically the difference between the time offset value of the current time and the time offset smoothing coefficient;
调整用的频偏值具体为所述当前时刻的频偏值和所述频偏平滑系数之差。The frequency offset value for adjustment is specifically the difference between the frequency offset value of the current time and the frequency offset smoothing coefficient.
然后根据所述调整用的时偏值和所述调整用的频偏值调整系统时钟,将当前时钟源切换到GPS或1588时钟。Then, the system clock is adjusted according to the time offset value for the adjustment and the frequency offset value for the adjustment, and the current clock source is switched to the GPS or 1588 clock.
切换完成后,当前时钟源为GPS或1588时钟,备用时钟源为空口同步时钟。After the switchover is complete, the current clock source is GPS or 1588 clock, and the backup clock source is the air interface synchronization clock.
实施例二Embodiment 2
如图3所示,本发明实施例提供一种时钟切换的装置,所述装置包括:As shown in FIG. 3, an embodiment of the present invention provides a device for clock switching, where the device includes:
时频偏值获取模块30,配置为通过备用时钟源获取当前时刻的时偏值和频偏值;The time-frequency offset obtaining module 30 is configured to acquire a time offset value and a frequency offset value of the current moment by using a backup clock source;
平滑模块32,配置为将所述当前时刻的时偏值和频偏值分别进行平滑处理,获得调整用的时偏值和调整用的频偏值;The smoothing module 32 is configured to perform smoothing processing on the time offset value and the frequency offset value of the current time, respectively, to obtain a time offset value for adjustment and a frequency offset value for adjustment;
切换模块34,配置为根据所述调整用的时偏值和所述调整用的频偏值调整系统时钟,将当前时钟源切换到备用时钟源。The switching module 34 is configured to adjust the system clock according to the time offset value for the adjustment and the frequency offset value for the adjustment, and switch the current clock source to the backup clock source.
其中,所述时频偏值获取模块30还配置为通过当前时钟源获取当前时刻的时偏值和频偏值;平滑模块32具体配置为根据备用时钟源时偏值和频偏值,以及当前时钟源的时偏值和频偏值,计算得到时偏平滑系数和频偏平滑系数;The time-frequency offset obtaining module 30 is further configured to obtain a time offset value and a frequency offset value of the current time by using the current clock source; the smoothing module 32 is specifically configured to be based on the offset value and the frequency offset value of the standby clock source, and the current The time offset value and the frequency offset value of the clock source are calculated, and the time-averaged smoothing coefficient and the frequency-offset smoothing coefficient are calculated;
根据所述时偏平滑系数和所述当前时刻的时偏值,确定调整用的时偏值;以及根据所述频偏平滑系数和所述当前时刻的频偏值,确定调整用的频偏值。 Determining a time offset value for adjustment according to the time offset smoothing coefficient and the time offset value of the current time; and determining a frequency offset value for adjusting according to the frequency offset smoothing coefficient and the frequency offset value of the current time .
具体说,平滑模块包括平滑系数确定模块和时频偏值确定模块;Specifically, the smoothing module includes a smoothing coefficient determining module and a time-frequency offset determining module;
平滑系数确定模块配置为获取若干个不同时刻的时偏差值和频偏差值;以及分别将所述若干个时偏差值和频偏差值进行平滑处理,获得所述时偏平滑系数和所述频偏平滑系数;The smoothing coefficient determining module is configured to acquire time offset values and frequency offset values of the plurality of different moments; and smoothing the plurality of time offset values and the frequency offset values respectively to obtain the time skew smoothing coefficient and the frequency offset Smoothing factor
其中,时偏差值是将同时刻当前时钟源获取的时偏值和备用时钟源获取的时偏值做差值处理获得;Wherein, the time deviation value is obtained by performing a difference processing between the time offset value acquired by the current clock source and the time offset value obtained by the standby clock source;
频偏差值是将同时刻当前时钟源获取的频偏值和备用时钟源获取的频偏值做差值处理获得。The frequency offset value is obtained by performing a difference processing between the frequency offset value acquired by the current clock source and the frequency offset value obtained by the standby clock source.
时频偏值确定模块配置为根据所述时偏平滑系数和所述当前时刻的时偏值,确定调整用的时偏值;以及根据所述频偏平滑系数和所述当前时刻的频偏值,确定调整用的频偏值。The time-frequency offset value determining module is configured to determine a time-offset value for adjustment according to the time-shifted smoothing coefficient and the time-offset value of the current time; and the frequency-offset value according to the frequency-offset smoothing coefficient and the current time , determine the frequency offset value for adjustment.
本发明实施例中装置还可以包括触发模块,配置为当LTE系统采用GPS或1588时钟作为当前时钟源,采用空口同步时钟作为备用时钟源;当所述GPS或1588时钟发生失锁时,触发切换模块切换系统时钟;或者The device in the embodiment of the present invention may further include a triggering module configured to use the GPS or 1588 clock as the current clock source in the LTE system, and use the air interface synchronous clock as the backup clock source; when the GPS or 1588 clock loses lock, trigger the switch. The module switches the system clock; or
当LTE系统采用空口同步时钟作为当前时钟源,采用GPS或1588时钟作为备用时钟源;当所述GPS或1588时钟锁定后,触发切换模块切换系统时钟。When the LTE system uses the air interface synchronous clock as the current clock source, the GPS or 1588 clock is used as the backup clock source; when the GPS or 1588 clock is locked, the switching module is triggered to switch the system clock.
其中,由所述GPS或1588时钟发生失锁,而引起的切换系统时钟时,Wherein, when the GPS or 1588 clock is lost, the system clock is switched when
调整用的时偏值具体为所述时偏平滑系数和所述当前时刻的时偏值之和;以及调整用的频偏值具体为所述频偏平滑系数和所述当前时刻的频偏值之和。The time offset value for adjustment is specifically a sum of the time-averaged smoothing coefficient and the time-offset value of the current time; and the frequency offset value used for the adjustment is specifically the frequency-offset smoothing coefficient and the frequency offset value of the current time Sum.
由所述GPS或1588时钟锁定,而引起切换系统时钟时,Locked by the GPS or 1588 clock, causing switching system clocks,
调整用的时偏值具体为所述当前时刻的时偏值和所述时偏平滑系数之差;以及调整用的频偏值具体为所述当前时刻的频偏值和所述频偏平滑系数之差。 The time offset value for adjustment is specifically a difference between the time offset value of the current time and the time offset smoothing coefficient; and the frequency offset value used for the adjustment is specifically the frequency offset value of the current time and the frequency offset smoothing coefficient. Difference.
本发明实施例为实施例一对应的装置实施例,具体的设置参阅实施例一,在此不再赘述。本发明实施例中装置进行系统时钟的切换时,通过将备用时钟源获取当前时刻的时偏值和频偏值进行平滑处理,达到了时钟平滑切换的效果,提高了系统时钟性能,有效解决了系统时钟切换时用户掉话或者无法入网的问题。The embodiment of the present invention is an embodiment of the device corresponding to the first embodiment. For the specific configuration, refer to the first embodiment, and details are not described herein again. In the embodiment of the present invention, when the device performs the system clock switching, the backup clock source obtains the time offset value and the frequency offset value of the current time to smooth the clock, thereby achieving the effect of clock smooth switching, improving the system clock performance, and effectively solving the problem. The problem that the user dropped the call or failed to access the network when the system clock was switched.
实施例三Embodiment 3
本发明实施例提供一种基站,所述基站包括实施例二所述装置。本发明实施例中基站中在进行系统时钟的切换时,通过将备用时钟源获取当前时刻的时偏值和频偏值进行平滑处理,达到了时钟平滑切换的效果,提高了系统时钟性能,有效解决了系统时钟切换时用户掉话或者无法入网的问题。An embodiment of the present invention provides a base station, where the base station includes the apparatus in Embodiment 2. In the embodiment of the present invention, when the system clock is switched, the base station obtains the time offset value and the frequency offset value of the current time by the backup clock source, thereby achieving the effect of clock smooth switching, improving the system clock performance, and effectively It solves the problem that the user drops the call or cannot access the network when the system clock is switched.
尽管为示例目的,以上已经公开了本发明的优选实施例,但本领域的技术人员将意识到各种改进、增加和取代也是可能的,因此,本发明的范围应当不限于上述实施例。Although the preferred embodiments of the present invention have been disclosed above for illustrative purposes, those skilled in the art will appreciate that various modifications, additions and substitutions are possible. Therefore, the scope of the present invention should not be limited to the embodiments described above.
工业实用性Industrial applicability
本发明实施例通过将备用时钟源获取当前时刻的时偏值和频偏值进行平滑处理,达到了时钟平滑切换的效果,提高了系统时钟性能,有效解决了系统时钟切换时用户掉话或者无法入网的问题。 In the embodiment of the present invention, the time offset value and the frequency offset value of the current time source are obtained by performing smoothing processing on the standby clock source, thereby achieving the effect of clock smooth switching, improving the system clock performance, and effectively solving the problem that the user loses or fails when the system clock is switched. The problem of accessing the network.

Claims (10)

  1. 一种时钟切换的方法,所述方法包括:A method of clock switching, the method comprising:
    通过备用时钟源获取当前时刻的时偏值和频偏值;Obtaining the time offset value and the frequency offset value of the current moment by using the alternate clock source;
    将所述当前时刻的时偏值和频偏值分别进行平滑处理,获得调整用的时偏值和调整用的频偏值;Performing a smoothing process on the time offset value and the frequency offset value of the current time to obtain a time offset value for adjustment and a frequency offset value for adjustment;
    根据所述调整用的时偏值和所述调整用的频偏值调整系统时钟,将系统时钟从当前时钟源切换到备用时钟源。Adjusting the system clock according to the time offset value for the adjustment and the frequency offset value for the adjustment, and switching the system clock from the current clock source to the standby clock source.
  2. 如权利要求1所述的方法,其中,所述将所述当前时刻的时偏值和频偏值分别进行平滑处理,获得调整用的时偏值和频偏值的步骤,具体包括:The method according to claim 1, wherein the step of smoothing the time offset value and the frequency offset value of the current time to obtain a time offset value and a frequency offset value for adjustment, specifically comprising:
    通过当前时钟源获取当前时刻的时偏值和频偏值;Obtaining the time offset value and the frequency offset value of the current moment by using the current clock source;
    根据备用时钟源时偏值和频偏值,以及当前时钟源的时偏值和频偏值,计算得到时偏平滑系数和频偏平滑系数;According to the offset value and the frequency offset value of the standby clock source, and the time offset value and the frequency offset value of the current clock source, the time-biased smoothing coefficient and the frequency-offset smoothing coefficient are calculated;
    根据所述时偏平滑系数和所述当前时刻的时偏值,确定调整用的时偏值;以及根据所述频偏平滑系数和所述当前时刻的频偏值,确定调整用的频偏值。Determining a time offset value for adjustment according to the time offset smoothing coefficient and the time offset value of the current time; and determining a frequency offset value for adjusting according to the frequency offset smoothing coefficient and the frequency offset value of the current time .
  3. 如权利要求2所述的方法,其中,所述根据备用时钟源时偏值和频偏值,以及当前时钟源的时偏值和频偏值,计算得到时偏平滑系数和频偏平滑系数的步骤,具体包括:The method according to claim 2, wherein said calculating a time-skew smoothing coefficient and a frequency-offset smoothing coefficient according to a bias value and a frequency offset value of the standby clock source, and a time offset value and a frequency offset value of the current clock source The steps specifically include:
    获取若干个不同时刻的时偏差值和频偏差值;Obtaining time offset values and frequency offset values for several different moments;
    分别将所述若干个时偏差值和频偏差值进行平滑,获得所述时偏平滑系数和所述频偏平滑系数;And respectively smoothing the plurality of time offset values and frequency offset values to obtain the time offset smoothing coefficient and the frequency offset smoothing coefficient;
    其中,时偏差值是将同时刻当前时钟源获取的时偏值和备用时钟源获取的时偏值做差值处理获得;Wherein, the time deviation value is obtained by performing a difference processing between the time offset value acquired by the current clock source and the time offset value obtained by the standby clock source;
    频偏差值是将同时刻当前时钟源获取的频偏值和备用时钟源获取的频 偏值做差值处理获得。The frequency offset value is the frequency offset value obtained by simultaneously engraving the current clock source and the frequency acquired by the alternate clock source. The partial value is obtained by the difference processing.
  4. 如权利要求1-3任意一项所述的方法,其中,所述方法还包括:The method of any of claims 1-3, wherein the method further comprises:
    采用GPS或1588时钟作为当前时钟源,采用空口同步时钟作为备用时钟源;当所述GPS或1588时钟发生失锁时,切换系统时钟;或者Use GPS or 1588 clock as the current clock source, use the air interface synchronous clock as the backup clock source; when the GPS or 1588 clock loses lock, switch the system clock; or
    采用空口同步时钟作为当前时钟源,采用GPS或1588时钟作为备用时钟源;当所述GPS或1588时钟锁定后,切换系统时钟。The air interface synchronous clock is used as the current clock source, and GPS or 1588 clock is used as the backup clock source; when the GPS or 1588 clock is locked, the system clock is switched.
  5. 如权利要求4所述的方法,其中,所述方法还包括:The method of claim 4 wherein the method further comprises:
    由所述GPS或1588时钟发生失锁,而引起的切换系统时钟时,When the GPS or 1588 clock is lost, the system clock is switched when
    调整用的时偏值具体为所述时偏平滑系数和所述当前时刻的时偏值之和;以及调整用的频偏值具体为所述频偏平滑系数和所述当前时刻的频偏值之和。The time offset value for adjustment is specifically a sum of the time-averaged smoothing coefficient and the time-offset value of the current time; and the frequency offset value used for the adjustment is specifically the frequency-offset smoothing coefficient and the frequency offset value of the current time Sum.
  6. 如权利要求4所述的方法,其中,所述方法还包括:The method of claim 4 wherein the method further comprises:
    由所述GPS或1588时钟锁定,而引起切换系统时钟时,Locked by the GPS or 1588 clock, causing switching system clocks,
    调整用的时偏值具体为所述当前时刻的时偏值和所述时偏平滑系数之差;以及调整用的频偏值具体为所述当前时刻的频偏值和所述频偏平滑系数之差。The time offset value for adjustment is specifically a difference between the time offset value of the current time and the time offset smoothing coefficient; and the frequency offset value used for the adjustment is specifically the frequency offset value of the current time and the frequency offset smoothing coefficient. Difference.
  7. 一种时钟切换的装置,所述装置包括:A device for clock switching, the device comprising:
    时频偏值获取模块,配置为通过备用时钟源获取当前时刻的时偏值和频偏值;The time-frequency offset obtaining module is configured to acquire a time offset value and a frequency offset value of the current moment through the standby clock source;
    平滑模块,配置为将所述当前时刻的时偏值和频偏值分别进行平滑处理,获得调整用的时偏值和调整用的频偏值;The smoothing module is configured to perform smoothing processing on the time offset value and the frequency offset value of the current time, respectively, to obtain a time offset value for adjustment and a frequency offset value for adjustment;
    切换模块,配置为根据所述调整用的时偏值和所述调整用的频偏值调整系统时钟,将系统时钟从当前时钟源切换到备用时钟源。The switching module is configured to adjust the system clock according to the time offset value for the adjustment and the frequency offset value for the adjustment, and switch the system clock from the current clock source to the standby clock source.
  8. 如权利要求7所述的装置,其中,所述时频偏值获取模块还配置为通过当前时钟源获取当前时刻的时偏值和频偏值; The apparatus according to claim 7, wherein the time-frequency offset obtaining module is further configured to acquire a time offset value and a frequency offset value of the current moment by using a current clock source;
    所述平滑模块具体配置为根据备用时钟源时偏值和频偏值,以及当前时钟源的时偏值和频偏值,计算得到时偏平滑系数和频偏平滑系数;The smoothing module is specifically configured to calculate a time-offset smoothing coefficient and a frequency offset smoothing coefficient according to the offset value and the frequency offset value of the standby clock source, and the time offset value and the frequency offset value of the current clock source;
    根据所述时偏平滑系数和所述当前时刻的时偏值,确定调整用的时偏值;以及根据所述频偏平滑系数和所述当前时刻的频偏值,确定调整用的频偏值。Determining a time offset value for adjustment according to the time offset smoothing coefficient and the time offset value of the current time; and determining a frequency offset value for adjusting according to the frequency offset smoothing coefficient and the frequency offset value of the current time .
  9. 如权利要求8所述的装置,其中,所述平滑模块包括平滑系数确定模块,所述平滑系数确定模块配置为获取若干个不同时刻的时偏差值和频偏差值;The apparatus of claim 8, wherein the smoothing module comprises a smoothing coefficient determining module, the smoothing coefficient determining module configured to acquire time offset values and frequency offset values of the plurality of different moments;
    分别将所述若干个时偏差值和频偏差值进行平滑,获得所述时偏平滑系数和所述频偏平滑系数;And respectively smoothing the plurality of time offset values and frequency offset values to obtain the time offset smoothing coefficient and the frequency offset smoothing coefficient;
    其中,时偏差值是将同时刻当前时钟源获取的时偏值和备用时钟源获取的时偏值做差值处理获得;Wherein, the time deviation value is obtained by performing a difference processing between the time offset value acquired by the current clock source and the time offset value obtained by the standby clock source;
    频偏差值是将同时刻当前时钟源获取的频偏值和备用时钟源获取的频偏值做差值处理获得。The frequency offset value is obtained by performing a difference processing between the frequency offset value acquired by the current clock source and the frequency offset value obtained by the standby clock source.
  10. 一种基站,所述基站采用权利要求7-9任意一项所述的时钟切换的装置进行时钟切换。 A base station that performs clock switching using the apparatus for clock switching according to any one of claims 7-9.
PCT/CN2016/070870 2015-10-29 2016-01-14 Clock switching method, apparatus and base station WO2016184148A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510724300.9A CN106658626B (en) 2015-10-29 2015-10-29 Clock switching method, device and base station
CN201510724300.9 2015-10-29

Publications (1)

Publication Number Publication Date
WO2016184148A1 true WO2016184148A1 (en) 2016-11-24

Family

ID=57319314

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/070870 WO2016184148A1 (en) 2015-10-29 2016-01-14 Clock switching method, apparatus and base station

Country Status (2)

Country Link
CN (1) CN106658626B (en)
WO (1) WO2016184148A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4120754A4 (en) * 2020-03-31 2023-07-26 Huawei Technologies Co., Ltd. Clock calibration method and apparatus
CN117112316B (en) * 2023-10-25 2024-02-09 苏州元脑智能科技有限公司 Switching system, method, device and medium of clock circuit

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1555168A (en) * 2003-12-24 2004-12-15 烽火通信科技股份有限公司 Damage-free switching method for main and spare synchronous digital series device timing source
CN102769906A (en) * 2012-05-29 2012-11-07 中兴通讯股份有限公司 Home enhanced node B synchronization method and home enhanced node B
US20130163617A1 (en) * 2011-12-27 2013-06-27 Prashant R. Chandra Multi-protocol i/o interconnect time synchronization

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7089442B2 (en) * 2003-02-07 2006-08-08 Rambus Inc. Fault-tolerant clock generator
CN101162959B (en) * 2007-10-19 2011-08-24 中兴通讯股份有限公司 Clock master-slave phase difference automatic measurement and compensation process
CN101521565A (en) * 2008-02-26 2009-09-02 华为技术有限公司 Main/standby system clock seamless switching method, device and communication equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1555168A (en) * 2003-12-24 2004-12-15 烽火通信科技股份有限公司 Damage-free switching method for main and spare synchronous digital series device timing source
US20130163617A1 (en) * 2011-12-27 2013-06-27 Prashant R. Chandra Multi-protocol i/o interconnect time synchronization
CN102769906A (en) * 2012-05-29 2012-11-07 中兴通讯股份有限公司 Home enhanced node B synchronization method and home enhanced node B

Also Published As

Publication number Publication date
CN106658626A (en) 2017-05-10
CN106658626B (en) 2020-12-22

Similar Documents

Publication Publication Date Title
US8689035B2 (en) Communication system, communication interface, and synchronization method
US20200127752A1 (en) Time synchronization device and time synchronization method
JP2015505214A5 (en)
US9967084B2 (en) Synchronising devices using clock signal time difference estimation
WO2019201199A1 (en) Beam failure detection method, information configuration method, terminal and network device
TWI571724B (en) Time-synchronizing a group of nodes
WO2017054554A1 (en) Clock synchronization method, device, and communication apparatus
US11650619B2 (en) Synchronising devices using clock signal delay estimation
WO2010091590A1 (en) Method and device for realizing clock synchronization of base station
TW200829005A (en) Fast re-synchronization techniques for DVB-H systems
CN109392074A (en) Clock correcting method and device
WO2016184148A1 (en) Clock switching method, apparatus and base station
WO2013189441A2 (en) Method and device for adaptive adjustment of measurement period of neighbouring cell
US20200259631A1 (en) Synchronising Devices Using Clock Signal Delay Comparison
CN107547160B (en) A kind of method for synchronizing time and device
CN109818700B (en) Synchronization method and device of wide area system protection device, plant station and topological architecture
WO2015021911A1 (en) Clock synchronization method and device, and base station system
WO2016161577A1 (en) Method, apparatus and device for determining optimal heartbeat period
CN114499816B (en) Clock synchronization method and device, terminal equipment and readable storage medium
US20120290866A1 (en) Method and system for correcting timing errors due to thermal changes within a portable computing device
JP2009008444A (en) Time management server, time management program, and time management method
WO2015078167A1 (en) Method and device for determining backup clock source, and computer storage medium
CN103973804A (en) Method and device for setting terminal time
WO2022141575A1 (en) Method and device for using reference time information
WO2017032064A1 (en) Time conversion method, terminal and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16795635

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16795635

Country of ref document: EP

Kind code of ref document: A1