Clock test apparatus for electronic device
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     This invention relates to a clock test apparatus for an electronic device such as a receiver, for modeling clock error in a clock generator for use in the receiver, and analyzing and checking the performance of the receiver by simulating the clock error. 
     2. Description of the Related Art 
     As is well known, a GPS (Global Positioning System) receiver is mounted in a moving body such as an aircraft or a ship, receives radio waves from GPS satellites, and outputs positional data. The GPS receiver also detects the Doppler frequency of the radio waves by means of a clock, and calculates the velocity of the moving body relative to the satellite from the detection result. A navigation calculation is performed on the basis of the positional data and the relative velocity. Hence, the performance of a GPS receiver greatly depends on the clock characteristic for detecting the Doppler frequency. Accordingly, to analyze or check the performance of a GPS receiver, it is necessary to model and simulate a clock error in the clock generator, thereby obtaining design data. 
     Further, a Kalman filter is used to perform the navigation calculation on the basis of the relative velocity, thereby increasing the accuracy of the calculation. The Kalman filter has a clock error dynamics model of the GPS receiver. In a GPS receiver, since the clock error dynamics model is an essential feature, the property of the model influences navigational accuracy. 
     In the conventional art, short-term stability, which is statistically obtained from the average value of clock frequencies, is used as an index of the characteristic of a clock, and the performance of a GPS receiver is analyzed and checked on the basis of the short-term stability. However, since the short-term stability is a statistical index, how the clock fluctuates in practice as time passes and the status of the clock error dynamics (a differential equation representing a clock error dynamics) are not taken into account. Hence, the performance of a GPS receiver cannot be analyzed and checked reliably on the basis of short-term stability. 
     Although the above description relates to a GPS receiver, the same problems arise in other electronic apparatuses incorporating clock generators. 
     SUMMARY OF THE INVENTION 
     The object of the invention is to provide a simple clock test apparatus, wherein clock error in a clock generator for use in an electronic device can be modeled and simulated with high accuracy, thereby increasing the reliability of the test result and the dynamics model of clock error in a data processing filter. 
     According to an aspect of the present invention, there is provided a clock test apparatus for modeling clock error in an electronic apparatus including a clock generator, comprising: 
     a frequency detecting section for detecting the frequency of a clock output from the clock generator; and 
     a clock error identification section for statistically calculating short-term stability from an average value of the clock frequency detected by the frequency detecting section, and calculating clock error on the basis of the short-term stability. 
     Additional objects and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objects and advantages of the invention may be realized and obtained by means of the instrumentalities and combinations particularly pointed out in the appended claims. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate presently preferred embodiments of the invention, and together with the general description given above and the detailed description of the preferred embodiments given below, serve to explain the principles of the invention. 
     FIG. 1 is a diagram showing an embodiment in which a clock test apparatus of the present invention is applied to a GPS receiver; 
     FIG. 2 is a flowchart showing an operation of the clock error identification section shown in FIG. 1 and error simulation; 
     FIG. 3 is a characteristic diagram showing an example of the short-term stability of error sources of clock errors and the causes of the errors; 
     FIG. 4 is a system diagram showing a method of simulating a clock error in the clock error identification section; 
     FIG. 5 is a waveform diagram showing a relationship between frequency error and power spectrum density of the clock error having short-time stability shown in FIG. 3; and 
     FIG. 6 is a waveform diagram showing an example of the results of the analysis by the dynamics simulator shown in FIG. 1. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     An embodiment of the present invention will now be described with reference to the accompanying drawings. 
     FIG. 1 shows an arrangement in which a GPS receiver 1 is connected to a clock test apparatus of the invention including a frequency counter 11, a clock error identification section 12, and a dynamics simulator 13. The frequency counter 11 receives a clock output from a clock generator 10 incorporated in the GPS receiver 1, and detects the frequency of the clock. The clock frequency data is supplied from the frequency counter 11 to the clock error identification section 12. 
     The clock error identification section 12 receives the clock frequency data from the frequency counter 11, obtains short-term stability from the data, and calculates a clock error on the basis of the short-term stability. Clock error data obtained by the clock error identification section 12 is supplied to the dynamics simulator 13, which simulates circuit dynamics of the GPS receiver. More specifically, the dynamics simulator receives the clock error simulation data, and calculates a relative velocity error due to the influence of the clock error, thereby analyzing the performance of the receiver. The clock error identification section 12 and the dynamics simulator 13 are each constituted by a computer. 
     An operation of the clock error identification section 12 will be described below with reference to the flowchart shown in FIG. 2. 
     In step S1, short-term stability σ, which represents a clock characteristic, is obtained on the basis of the clock frequency data supplied from the frequency counter 11. The short-term stability σ is obtained in a statistical fashion from the average value of clock frequencies. More specifically, assuming that an average value of clock frequencies y during a time period from t k-  τ to t k  is Y k , and an average value thereof during a time period from t k+1  -τ to t k+1  is Y k+1 , the short-term stability σ is determined by the following formula: 
     
         σ.sup.2 =(1/2)&lt;(Y.sub.k+1 -Y.sub.k)2&gt;                (1) 
    
     where τ represents an average time, t k  is equal to t k+1  -τ, and a symbol &lt;&gt; represents an ensemble means. A short-term stability σ and an average time τ have a relationship, for example, as is indicated by the solid line A in FIG. 3. 
     In general, clock error sources δn i  include the following: a frequency random walk error source δn 1 , a frequency flicker noise error source δn 2 , a frequency white noise error source δn 3 , and a phase white noise error source δn 4 . Short-term stabilities σ (δn 1 ), σ (δn 2 ), σ (δn 3 ), and σ (δn 4 ) of the error sources are represented by the following formulas: 
     
         σ (δn.sub.1)=4π.sup.2 h.sub.-2 ·τ/6(2) 
    
     
         σ (δn.sub.2)=2h.sub.-1 ·ln(2)         (3) 
    
     
         σ (δn.sub.3)=h.sub.0 /(2τ)                 (4) 
    
     
         σ (δn.sub.4)=3f.sub.h h.sub.2 /{(2π).sup.2 τ.sup.2 }(5) 
    
     where f h  represents the cut-off frequency of white noise, and ln represents a natural logarithm. 
     In view of these formulas (2) to (5), the short-term stability σ (δn 1 ) of the frequency random walk is proportional to the average time r (the formula (2)), the stability σ (δn 2 ) of the frequency flicker noise is a constant (the formula (3)), the stability σ (δn 3 ) of the frequency white noise is proportional to 1/τ (the formula (4)) and the stability σ (δn 4 ) of the phase white noise is proportional to 1/τ 2  (the formula (5)). Hence, using the formulas (2) to (5), short-term stability σ of the receiver clock can be polynomial-approximated from the clock error sources δ n i . 
     In step S2, the coefficients h -2 , h -1 , h 0 , and h 2  are substituted in the above equations (2) to (5), and the short-time stability σ obtained in step S1 is polynomial-approximated by adding together the equations (2) to (5) for calculating the error sources δn 1 , δn 2 , δn 3 , and δn 4 . 
     As is shown in FIG. 3, the short-time stability characteristic of the clock error indicated by the solid line A can be polynomial-approximated by adding together the short-term stability characteristics of the three error sources σ (δn 1 ), σ (δn 2 ), and σ (δn 4 ) indicated by the dot lines B, C, and D. Hence, the short-term stability o of the clock error can be approximated by substituting the values of the coefficients h -2 , h -1 , h 0 , and h 2  in the formulas (2) to (5), and adding the formulas (2), (3), and (5) relating to the short-time stability of the error sources σ (δn 1 ), σ (δn 2 ), and σ (δn 4 ). 
     Power spectrum densities S(δn 1 ), S(δn 2 ), S(δn 3 ) and S(δn 4 ) are related to a Fourier frequency f as follows: 
     
         S(δn.sub.1)=h.sub.-2 /f.sup.2                        (6) 
    
     
         S(δn.sub.2)=h.sub.-1 /f                              (7) 
    
     
         S(δn.sub.3)=h.sub.0                                  (8) 
    
     
         S(δn.sub.4)=h.sub.2 f.sup.2                          (9) 
    
     Thus, S(δn 1 ) and S(δn 2 ) are proportional to 1/f 2  and 1/f, respectively, S(δn 3 ) represents a constant value, and S(δn 4 ) is proportional to f 2 . 
     In a step S3, the coefficients h -2 , h -1 , h 0 , and h 2  given in the step S2 are substituted in the formulas (6) to (9), thereby calculating frequency spectrum densities of the error sources δn 1 , δn 2 , δn 3 , and δn 4 . 
     Dynamics (transfer functions) D(ιn 1 ), D(δn 2 ), D(δn 3 ), and D(δn 4 ) are obtained from the power spectrum density functions as follows: 
     
         D(δn.sub.1)=1/s                                      (10) 
    
     
         D(δn.sub.2)=(Ts+1)/(10Ts+1)                          (11) 
    
     
         D(δn.sub.3)=1                                        (12) 
    
     
         D(δn.sub.4)=s                                        (13) 
    
     where T represents a constant corresponding to τ in which flicker noise δn 2  is prominent. Thus, the error sources W -2 , W -1 , W 0 , and W 2  of δn 1 , δn 2 , δn 3 , and δn 4  generate different errors in accordance with their power densities. 
     In step S4, electric power densities of white noise are calculated by the following formulas, such that when white noise is input, the outputs of the dynamics D(δn 1 ), D(δn 2 ), D(δn 3 ), and D(δn 4 ) coincide with the frequency spectrum densities obtained in step S3: 
     
         S(W.sub.-2)=(2π).sup.2 h.sub.-2                         (14) 
    
     
         S(W.sub.-1)=2πh.sub.-1                                  (15) 
    
     
         S(W.sub.0)=h.sub.0                                         (16) 
    
     
         S(W.sub.2)=h.sub.2 /(2π).sup.2                          (17) 
    
     where W -2 , W -1 , W 0 , and W 2  represent white noise, and S() represents the power spectrum density of the corresponding noise. 
     In step S5, noise W -2 , W -1 , W 0 , and W 2  are generated in accordance with the power spectrum densities S(W -2 ), S(W -1 ), S(W 0 ), and S(W 2 ), respectively. In step S6, the noises W -2 , W -1 , W 0 , and W 2  are input in the dynamics represented by the above-mentioned formulas (10) to (13), thereby obtaining values of error sources δn 1  (t), δn 2  (t), δn 3  (t), and δn 4  (t) at time t. In step S7, a clock error δy(t) is obtained by the following formula: 
     
         δy(t)=Σδn.sub.i (t)                      (18) 
    
     FIG. 4 shows a processing system utilizing the above steps S5 to S7. 
     As is described above with reference to FIG. 3, the short-time stability characteristic A of a clock error can be determined by the short-term stability characteristics B, C, and D of the three error sources δn 1 , δn 2 , and δn 4  of frequency random walk, frequency flicker noise, and phase white noise. FIG. 5 shows a relationship between a Fourier frequency and a power spectrum density regarding a clock error δy(t) obtained in the step S7. As is obvious from FIG. 5, the clock error δy(t) is obtained by adding the error sources δn 1 , δn 2 , and δn 4 . 
     An operation of the dynamics simulator 13 will now be described with reference to FIG. 6. 
     The dynamics simulator 13 receives clock error δy(t) obtained by the clock error identification section 12, and calculates an error of the relative velocity of a receiver caused by the clock error δy(t), thereby analyzing the performance of the receiver. FIG. 6 shows an example of the analysis result. The relative velocity error data can be used in, for example, designing a GPS receiver circuit and selecting a clock generator for use in a GPS receiver. 
     As described above, the clock test apparatus calculates short-term stability from the output frequency of the clock generator 10, and obtains an error of the clock generator 10 as error dynamics. In addition, an error of the clock generator 10 is simulated on the basis of the error dynamics, thereby analyzing the performance of the GPS receiver connected to the clock test apparatus. By virtue of these features, error can be accurately simulated in accordance with an actual fluctuation of the clock generator 10, and performance analyses and tests can be performed with high accuracy. 
     In the above-described embodiment, the performance of a GPS receiver is analyzed and checked on the basis of a clock error δy(t) calculated by the clock error identification section 12. However, this invention is not limited to this embodiment. For example, the clock error dynamics calculated by the clock error identification section 12 can be used as a system model for a Kalman filter. With this feature, since the accuracy of the clock generator 10 which determines the performance of a GPS receiver is detected precisely, a Kalman filter with high accuracy can be fabricated, with the result that accurate navigation can be easily performed. 
     Moreover, in the above embodiment, the clock error identification section 12 simulates an error of the clock generator 10 on the basis of coefficients h -2 , h -1 , h 0 , and h 2  obtained in the step S2. However, if design values are substituted in step S3 as indicated by the dot line in FIG. 2, a permissible error in the receiver can be calculated back. As a result, a suitable clock generator can be selected easily. 
     Further, although short-term stability is detected by the frequency counter 11 in the above embodiment, it may be detected by other apparatuses. 
     Still further, although the clock check apparatus is connected to a GPS receiver in the above embodiment, the present invention can be applied to various electronic devices, for example, a receiver including a frequency detecting clock. 
     Thus, the present invention is not limited to the above-described embodiment, but can be variously modified without departing from the spirit and scope of the invention. 
     Additional advantages and modifications will readily occur to those skilled in the art. Therefore, the invention in its broader aspects is not limited to the specific details, and representative devices, shown and described herein. Accordingly, various modifications may be without departing from the spirit or scope of the general inventive concept as defined by the appended claims and their equivalents.