**3.4 Software description**

The Measurement Frequency software (MF) of the Multi-Channel Digital Frequency Stability Analyzer is operated by the LabWindows/CVI applications. MF configures the parameters of DAQ, stores original data and results of measuring to disk, maintains synchronization of the data stream, carries out the algorithms of measuring frequency and phase difference, analyzes frequency stability, retrieves the stored data from disk and prepares plots of original data, frequency, phase difference, and Allan deviation. Figure 8 shows the main interface. To view interesting data, user can click corresponding control buttons to show beat signals graph, frequency values, phase difference and Allan deviation and so on.

MF consists of four applications, a virtual instrument panel that is the user interface to control the hardware and the others via DLL, a server program is used to manage data, processing program, and output program. Figure 7 shows the block diagram of MF software.

Fig. 7. Block Diagram of the Measurement Frequency Software

The virtual instrument panel have been developed what can be handled friendly by users. It looks like a real instrument. It consists of options pull-down menu, function buttons, choice menus. Figure 8 (a) shows the parameters setting child panel. Users can configure a set of parameters what involve DAQ, such as sampling frequency, amplitude value and time base of DAQ. Figure 8 (b) shows the screen shot of MF main interface. On the left of Fig. 8 (b), users can assign any measurement channel start or pause during measurement. On the right of Fig. 8 (b), strip chart is used to show the data of user interesting, such as real-time original data, measured frequency values, phase difference values and Allan deviation. To distinguish different curves, different coloured curves are used to represent different channels when every channel name has a specific colour. Figure 8 (c) shows the graph of the real-time results of frequency measurement when three channels are operated synchronously, and (d) shows the child panel what covers the original data, frequency values and Allan deviation information of one of channel.

122 Applications of Digital Signal Processing

The Measurement Frequency software (MF) of the Multi-Channel Digital Frequency Stability Analyzer is operated by the LabWindows/CVI applications. MF configures the parameters of DAQ, stores original data and results of measuring to disk, maintains synchronization of the data stream, carries out the algorithms of measuring frequency and phase difference, analyzes frequency stability, retrieves the stored data from disk and prepares plots of original data, frequency, phase difference, and Allan deviation. Figure 8 shows the main interface. To view interesting data, user can click corresponding control buttons to show beat signals graph,

MF consists of four applications, a virtual instrument panel that is the user interface to control the hardware and the others via DLL, a server program is used to manage data, processing program, and output program. Figure 7 shows the block diagram of MF

The virtual instrument panel have been developed what can be handled friendly by users. It looks like a real instrument. It consists of options pull-down menu, function buttons, choice menus. Figure 8 (a) shows the parameters setting child panel. Users can configure a set of parameters what involve DAQ, such as sampling frequency, amplitude value and time base of DAQ. Figure 8 (b) shows the screen shot of MF main interface. On the left of Fig. 8 (b), users can assign any measurement channel start or pause during measurement. On the right of Fig. 8 (b), strip chart is used to show the data of user interesting, such as real-time original data, measured frequency values, phase difference values and Allan deviation. To distinguish different curves, different coloured curves are used to represent different channels when every channel name has a specific colour. Figure 8 (c) shows the graph of the real-time results of frequency measurement when three channels are operated synchronously, and (d) shows the child panel what covers the original data, frequency

frequency values, phase difference and Allan deviation and so on.

Fig. 7. Block Diagram of the Measurement Frequency Software

values and Allan deviation information of one of channel.

**3.4 Software description** 

software.

Server program configures the parameters of each channel, maintains synchronization of the data stream, carries out the simple preprocessing (either ignore those points that are significantly less than or greater than the threshold or detect missing points and substitute extrapolated values to maintain data integrity), stores original data and results of measuring to disk.

Fig. 8. MF software, (a) shows the window of configuring parameters and choosing channels, (b) shows the strip chart of real-time original data of one of channels, (c) shows the graph of the real-time results of frequency measurement, (d) shows the child panel that covers the original data, frequency values and Allan deviation information of one of channel.

High-Precision Frequency Measurement Using Digital Signal Processing 125

quantization noise of channel i and generates by ADC, n is a positive integer and its value is

Formula (3.8) could be transformed into following normalized expression (3.9) to deduce

( ) sin(2 ) () () *b i i ii i f f v n n gn ln <sup>N</sup>*

To realize one time frequency measurement, sampling beat-frequency signal must be continuous operated at least two seconds. For example, the j-th measurement frequency of

<sup>1</sup> [ ( ) ( ) ( )] [ ( ) ( ) ( )]

*ij ij ij i j i j i j*

u

)

2 *A m* Z

*i j ij i j* ( 1) ( 1) *g ll R*

the second part is the cross-correlation function between noise and signal;

*ij i j* ( 1) *ij i j* ( 1) *ij i j* ( 1) *ij i j* ( 1)

*ij i j* ( 1) ( 1) ( 1) ( 1) *ij i j ij i j ij i j*

*ij i j* ( 1) *ij i j* ( 1) *ij i j* ( 1) *ij i j* ( 1)

the third part is the cross-correlation function between noise and noise:

*xn gn ln x nm g nm l nm <sup>N</sup>*

2 *ij i j ij i j ij i j ij i j ij i j ij i j*

Formula (3.10) could be split into three parts; with the first part is cross-correlation function

According to the property of correlation function, if two circular signals are correlated then it will result in a period signal with the same period as the original signal. Therefore, the C

1

0 <sup>1</sup> ( ) *N*

Because the term B isn't strictly zero. We will discuss the effect of ignoring B and C on

*m C Rm N*

*ij*

*BR R R R xg xl gx lx* of cross-correlation can't be ignored.

*ij ij x g x l g x g g g l l x*

*m R RR R RR*

 M

' (3.9)

( 1) ( 1) ( 1) ( 1) ( 1) ( 1)

*BR R R R xg xl gx lx* (3.12)

*CR R R R gg gl lg ll* (3.13)

¦ (3.14)

*ij* )*ij* (3.11)

( 1) ( 1) ( 1)

(3.10)

S

channel i will analyze the j second ( ) *ij v n* and j+1 second ( 1)( ) *i j v n* data from DAQ. The cross-correlation between ( ) *ij v n* and ( 1)( ) *i j v n* have been used by following formula:

in the range 1 ~ f .

1

*N ij ij i j n*

<sup>1</sup> ( ) () ( )

*R m v nv n m*

0

¦

1

*N*

*N*

*n*

between signals *x n*( ) :

The term

0

¦

<sup>1</sup> cos( )

can be denoted average ( ) *R mij* over m:

measurement precision in following section.

Z ( 1)

*ij*

*l*

*R*

<sup>1</sup> cos( )

conveniently.

Digital signal processing program retrieves the stored data from disk and carries out the processing. Frequency measurement includes dual-channel phase difference and single frequency measurement modes in the digital signal processing program. The program will run different functions according to the select mode of users. Single frequency measurement mode can acquire frequency values and the Allan deviation of every input signal source. In addition, the dual-channel phase difference mode can output the phase difference between two input signals.

The output program manages the interface that communicate with other instruments, exports the data of user interesting to disk or graph. Text files of these data are available if the user need to analyze data in the future.

#### **3.5 Measurement precision**

The dual-mixer and digital correlation algorithms are applied to DFSA. In this system, has symmetrical structure and simultaneously measurement to cancel out the noise of common offset reference source. (THOMAS E. PARKER, 2001) So the noise of common offset source can be ignored. The errors of the Multi-Channel Digital Frequency Stability Analyzer relate to thermal noise and quantization error (Ken Mochizuki, 2007 & Masaharu Uchino, 2004). The cross-correlation algorithm can reduce the effect of circuit noise floor and improve the measurement precision by averaging amount of sampling data during the measurement interval. In addition, this system is more reliability and maintainability because the structure of system is simpler than other high-precision frequency measurement system. This section will discuss the noise floor of the proposed system.

To evaluate the measurement precision of DFSA, we measured the frequency stability when the test signal and reference signal came from a single oscillator in phase (L.Sojdr, J. Cermak, 2003). Ideally, between the test channel and reference were operated symmetrically, so the error will be zero. However, since the beat signals output from MBFG include thermal noise, the error relate to white Gaussian noise with a mean value of zero.

Although random disturbance noise can be removed by running digital correlation algorithms in theory, we just have finite number of sampling data available in practice. So it will lead to the results that the cross-correlation between the signal and noise aren't completely uncorrelated. Then the effect of random noise and quantization noise can't be ignored. We will discuss the effect of ignored on measurement precision in following chapter.

According to above formula (3.7) introduction, the frequency drift '*f* could be acquired by measuring the beat-frequency signal at frequency. But in the section 3.2.2, the beat signal is no noise, and that is inexistence in the real world. When the noises are added in the beat signal, it should be expressed like:

$$\psi\_i(\mathbf{n}) = V\_i \sin(2\pi \frac{f\_b + \Delta f\_i}{N} \mathbf{n} + \varphi\_i) + \mathbf{g}\_i(\mathbf{n}) + l\_i(\mathbf{n}), i = 1, 2, 3... \tag{3.8}$$

Where ( ) *<sup>i</sup> v n* represents beat-frequency signal, *Vi* indicates amplitude of channel i, *bf* is the nominal frequency of beat-frequency signal, unknown frequency drift *<sup>i</sup>* '*f* of source under test in channel i, M*<sup>i</sup>* denotes the initial phase of channel i. Here *N* is sampling frequency of analog-to-digital converter (ADC), ( ) *<sup>i</sup> g n* denotes random noise of channel i, ( ) *il n* is 124 Applications of Digital Signal Processing

Digital signal processing program retrieves the stored data from disk and carries out the processing. Frequency measurement includes dual-channel phase difference and single frequency measurement modes in the digital signal processing program. The program will run different functions according to the select mode of users. Single frequency measurement mode can acquire frequency values and the Allan deviation of every input signal source. In addition, the dual-channel phase difference mode can output the phase difference between

The output program manages the interface that communicate with other instruments, exports the data of user interesting to disk or graph. Text files of these data are available if

The dual-mixer and digital correlation algorithms are applied to DFSA. In this system, has symmetrical structure and simultaneously measurement to cancel out the noise of common offset reference source. (THOMAS E. PARKER, 2001) So the noise of common offset source can be ignored. The errors of the Multi-Channel Digital Frequency Stability Analyzer relate to thermal noise and quantization error (Ken Mochizuki, 2007 & Masaharu Uchino, 2004). The cross-correlation algorithm can reduce the effect of circuit noise floor and improve the measurement precision by averaging amount of sampling data during the measurement interval. In addition, this system is more reliability and maintainability because the structure of system is simpler than other high-precision frequency measurement system. This section

To evaluate the measurement precision of DFSA, we measured the frequency stability when the test signal and reference signal came from a single oscillator in phase (L.Sojdr, J. Cermak, 2003). Ideally, between the test channel and reference were operated symmetrically, so the error will be zero. However, since the beat signals output from MBFG include thermal noise,

Although random disturbance noise can be removed by running digital correlation algorithms in theory, we just have finite number of sampling data available in practice. So it will lead to the results that the cross-correlation between the signal and noise aren't completely uncorrelated. Then the effect of random noise and quantization noise can't be ignored. We will discuss the effect of ignored on measurement precision in following

According to above formula (3.7) introduction, the frequency drift '*f* could be acquired by measuring the beat-frequency signal at frequency. But in the section 3.2.2, the beat signal is no noise, and that is inexistence in the real world. When the noises are added in the beat

( ) sin(2 ) ( ) ( ), 1,2,3... *b i*

' (3.8)

*<sup>i</sup>* denotes the initial phase of channel i. Here *N* is sampling frequency of

 M

Where ( ) *<sup>i</sup> v n* represents beat-frequency signal, *Vi* indicates amplitude of channel i, *bf* is the nominal frequency of beat-frequency signal, unknown frequency drift *<sup>i</sup>* '*f* of source under

analog-to-digital converter (ADC), ( ) *<sup>i</sup> g n* denotes random noise of channel i, ( ) *il n* is

*i i ii i f f vn V n gn lni <sup>N</sup>*

S

two input signals.

chapter.

test in channel i,

signal, it should be expressed like:

M

the user need to analyze data in the future.

will discuss the noise floor of the proposed system.

the error relate to white Gaussian noise with a mean value of zero.

**3.5 Measurement precision** 

quantization noise of channel i and generates by ADC, n is a positive integer and its value is in the range 1 ~ f .

Formula (3.8) could be transformed into following normalized expression (3.9) to deduce conveniently.

$$\text{tr}\_i(n) = \sin(2\pi \frac{f\_b + \Delta f\_i}{N} n + \varphi\_i) + g\_i(n) + l\_i(n) \tag{3.9}$$

To realize one time frequency measurement, sampling beat-frequency signal must be continuous operated at least two seconds. For example, the j-th measurement frequency of channel i will analyze the j second ( ) *ij v n* and j+1 second ( 1)( ) *i j v n* data from DAQ.

The cross-correlation between ( ) *ij v n* and ( 1)( ) *i j v n* have been used by following formula:

$$\begin{split} R\_{\vec{\eta}}(m) &= \frac{1}{N} \sum\_{n=0}^{N-1} v\_{\vec{\eta}}(n) v\_{i(j+1)}(n+m) \\ &= \frac{1}{N} \sum\_{n=0}^{N-1} \left[ \mathbf{x}\_{\vec{\eta}}(n) + g\_{\vec{\eta}}(n) + l\_{\vec{\eta}}(n) \right] \times \left[ \mathbf{x}\_{i(j+1)}(n+m) + g\_{i(j+1)}(n+m) + l\_{i(j+1)}(n+m) \right] \\ &= \frac{1}{2} \cos(\alpha\_{\vec{\eta}}m + \Phi\_{ij}) + R\_{\mathbf{x}\_{\vec{\eta}};\mathbf{\xi}\_{(i+1)}} + R\_{\mathbf{x}\_{\vec{\eta}}l\_{i(j+1)}} + R\_{\mathbf{\xi}\_{\vec{\eta}}^{\*}\mathbf{x}\_{i(j+1)}} + R\_{\mathbf{\xi}\_{\vec{\eta}}\mathbf{\xi}i\_{(i+1)}} + R\_{\mathbf{\xi}\_{\vec{\eta}}^{\*}i\_{(i+1)}} + R\_{l\_{\vec{\eta}}^{\*}i\_{(i+1)}} \\ &\quad + R\_{l\_{\vec{\eta}}\mathbf{\xi}i\_{(i+1)}} + R\_{l\_{\vec{\eta}}^{\*}l\_{i(j+1)}} \end{split} \tag{3.10}$$

Formula (3.10) could be split into three parts; with the first part is cross-correlation function between signals *x n*( ) :

$$A = \frac{1}{2}\cos(\alpha\_{\vec{\eta}}m + \Phi\_{\vec{\eta}})\tag{3.11}$$

the second part is the cross-correlation function between noise and signal;

$$B = R\_{x\_{\overline{\eta}}\mathcal{G}\_{i(j+1)}} + R\_{x\_{\overline{\eta}}l\_{i(j+1)}} + R\_{\mathcal{G}\_{\overline{\eta}}x\_{i(j+1)}} + R\_{l\_{\overline{\eta}}x\_{i(j+1)}} \tag{3.12}$$

the third part is the cross-correlation function between noise and noise:

$$\mathbf{C} = \mathbf{R}\_{\mathcal{G}\_{\overline{\eta}}\mathcal{G}\_{i(j+1)}} + \mathbf{R}\_{\mathcal{G}\_{\overline{\eta}}^{-l}i\_{i(j+1)}} + \mathbf{R}\_{l\_{\overline{\eta}}\mathcal{G}\_{i(j+1)}} + \mathbf{R}\_{l\_{\overline{\eta}}l\_{i(j+1)}} \tag{3.13}$$

According to the property of correlation function, if two circular signals are correlated then it will result in a period signal with the same period as the original signal. Therefore, the C can be denoted average ( ) *R mij* over m:

$$C = \frac{1}{N} \sum\_{m=0}^{N-1} R\_{ij}(m) \tag{3.14}$$

The term *ij i j* ( 1) *ij i j* ( 1) *ij i j* ( 1) *ij i j* ( 1) *BR R R R xg xl gx lx* of cross-correlation can't be ignored. Because the term B isn't strictly zero. We will discuss the effect of ignoring B and C on measurement precision in following section.

High-Precision Frequency Measurement Using Digital Signal Processing 127

0

¦ (3.20)

¦ ) (3.21)

*BR R xl lx* respectively. So *B* can be

(3.22)

' (3.23)

V*<sup>g</sup>* '.

( 1) ( 1) 2 *ij i j ij i j*

1

*N*

*m B* 

1

*N*

*m*

*N*

1 1 (0) ( ) cos( ) <sup>2</sup>

*R Rm B*

Let the error terms that are caused by the white Gaussian noise and the quantization noise

Here, quantization noise is generally caused by the nonlinear transmission of AD converter. To analysis the noise, AD conversion usual is regarded as a nonlinear mapping from the continuous amplitude to quantization amplitude. The error that is caused by the nonlinear mapping can be calculated by using either the random statistical approach or nonlinear determinate approach. The random statistical approach means that the results of AD conversion are expressed with the sum of sampling amplitude and random noise, and it is

We assume that *g t*( ) is Gaussian random variable of mean '0'and standard deviation ' <sup>2</sup>

2 <sup>2</sup> 2 *<sup>g</sup> <sup>B</sup> N* V

2

2 2

*g*

V

12

'

(3.24)

)*ij B* on the right-hand side of formula (3.21) will be

In the view of Eq.(3.15) and (3.17), we have obtained the standard deviation as follow:

1

Assume that the AD converter is round-off uniformly quantizer and using quantization step ' . Then *l t*( ) is uniformly distributed in the range r' / 2 and its mean value is zero

> <sup>2</sup> 2 12 *<sup>B</sup> N*

22 2 2 2

*BB B N N*

calculated by the following formula to evaluate the influence of noise on measurement

V

1 2

 V

VV

2

V

*ij ij ij*

0

just need to discuss the term B as follows. Eq. (3.12) can be given by

*BR R xg gx* and

be represented by ( 1) ( 1) <sup>1</sup> *ij i j ij i j*

the major approach to calculate the error at present.

and standard deviation is <sup>2</sup> ( /12) ' . We have

2

For *B*<sup>1</sup> and *B*<sup>2</sup> are uncorrelated, then

The mean square value of <sup>1</sup> cos( )

initial phase difference.

expressed by *BB B* 1 2 .

0

In view of the Eq. (3.20), although the B isn't strictly zero, their sum is equal to zero. We all known that on the right-hand side of Eq.(3.14) is the sum of cross-correlation function. Applying the Eq. (3.20) to (3.14) term by term, we obtain that the Eq.(3.14) strictly hold. Now we have the knowledge that the term C doesn't effect on the measurement results and we

According to the property of cross-correlation and sine function, we have

$$\begin{split} \mathcal{R}\_{\boldsymbol{x}\_{\vec{\boldsymbol{\eta}}},\boldsymbol{g}\_{(j+1)}}(m) &= \mathcal{R}\_{\mathcal{S}\_{\boldsymbol{\eta}(j+1)},\boldsymbol{\eta}\_{j}}(-m) = \frac{1}{N} \sum\_{n=0}^{N-1} \mathcal{g}\_{i(j+1)}(n) \mathbf{x}\_{\vec{\boldsymbol{\eta}}}(n-m) \\ &= \frac{1}{N} \sum\_{n=0}^{N-1} \mathcal{g}\_{i(j+1)}(n) \sin(\boldsymbol{\rho}\_{\vec{\boldsymbol{\eta}}} + \boldsymbol{\alpha}\_{\vec{\boldsymbol{\eta}}} n - \boldsymbol{\alpha}\_{\vec{\boldsymbol{\eta}}} m) \\ &= \frac{1}{N} \sum\_{n=0}^{N-1} \mathcal{g}\_{i(j+1)}(n) [\sin(\boldsymbol{\rho}\_{\vec{\boldsymbol{\eta}}} + \boldsymbol{\alpha}\_{\vec{\boldsymbol{\eta}}} n) \cos(\boldsymbol{\alpha}\_{\vec{\boldsymbol{\eta}}} m) - \cos(\boldsymbol{\rho}\_{\vec{\boldsymbol{\eta}}} + \boldsymbol{\alpha}\_{\vec{\boldsymbol{\eta}}} n) \sin(\boldsymbol{\alpha}\_{\vec{\boldsymbol{\eta}}} m)] \\ &= \frac{1}{N} \cos(\boldsymbol{\alpha}\_{\vec{\boldsymbol{\eta}}} m) \sum\_{n=0}^{N-1} \mathcal{g}\_{i(j+1)}(n) \sin(\boldsymbol{\rho}\_{\vec{\boldsymbol{\eta}}} + \boldsymbol{\alpha}\_{\vec{\boldsymbol{\eta}}} n) - \frac{1}{N} \sin(\boldsymbol{\alpha}\_{\vec{\boldsymbol{\eta}}} m) \sum\_{n=0}^{N-1} \mathcal{g}\_{i(j+1)}(n) \cos(\boldsymbol{\rho}\_{\vec{\boldsymbol{\eta}}} + \boldsymbol{\alpha}\_{\vec{\boldsymbol{\eta}}} n) \end{split} \tag{3.15}$$

Similarly, for other cross-correlation, we have

$$\begin{split} R\_{\mathbf{x}\_{\vec{\boldsymbol{\eta}}}l\_{(j+1)}}(m) &= \frac{1}{N} \sum\_{n=0}^{N-1} l\_{i(j+1)}(n) \mathbf{x}\_{\vec{\boldsymbol{\eta}}}(n-m) \\ = \frac{1}{N} \cos(\alpha\_{\vec{\boldsymbol{\eta}}}m) \sum\_{n=0}^{N-1} l\_{i(j+1)}(n) \sin(\varphi\_{\vec{\boldsymbol{\eta}}} + \alpha\_{\vec{\boldsymbol{\eta}}}n) - \frac{1}{N} \sin(\alpha\_{\vec{\boldsymbol{\eta}}}m) \sum\_{n=0}^{N-1} l\_{i(j+1)}(n) \cos(\varphi\_{\vec{\boldsymbol{\eta}}} + \alpha\_{\vec{\boldsymbol{\eta}}}n) \end{split} \tag{3.16}$$

$$\begin{split} R\_{\mathcal{G}\_{i}\mathbf{x}\_{i(j+1)}}(m) &= \frac{1}{N} \sum\_{n=0}^{N-1} \mathbf{g}\_{ij}(n) \mathbf{x}\_{i(j+1)}(n+m) \\ &= \frac{1}{N} \cos(\alpha\_{ij}m) \sum\_{n=0}^{N-1} \mathbf{g}\_{ij}(n) \sin(\alpha\_{i(j+1)} + \alpha\_{ij}n) + \frac{1}{N} \sin(\alpha\_{ij}m) \sum\_{n=0}^{N-1} \mathbf{g}\_{ij}(n) \cos(\alpha\_{i(j+1)} + \alpha\_{ij}n) \end{split} \tag{3.17}$$

$$\begin{split} R\_{l\_{\vec{\eta}}x\_{i(j+1)}}(m) &= \frac{1}{N} \sum\_{n=0}^{N-1} l\_{\vec{\eta}}(n) x\_{i(j+1)}(n+m) \\ &= \frac{1}{N} \cos(\alpha\_{\vec{\eta}}m) \sum\_{n=0}^{N-1} l\_{\vec{\eta}}(n) \sin(\varphi\_{i(j+1)} + \alpha\_{\vec{\eta}}n) + \frac{1}{N} \sin(\alpha\_{\vec{\eta}}m) \sum\_{n=0}^{N-1} l\_{\vec{\eta}}(n) \cos(\varphi\_{i(j+1)} + \alpha\_{\vec{\eta}}n) \end{split} \tag{3.18}$$

Then, the *B* can be obtained as follows:

$$\begin{split} &B = \frac{1}{N} \cos(\alpha\_{\vec{\eta}} m) \Big| \sum\_{n=0}^{N-1} g\_{(j+1)}(n) \sin(\rho\_{\vec{\eta}} + \alpha\_{\vec{\eta}} n) + \sum\_{n=0}^{N-1} l\_{(j+1)}(n) \sin(\rho\_{\vec{\eta}} + \alpha\_{\vec{\eta}} n) \\ &+ \sum\_{n=0}^{f\_{-1}-1} g\_{\vec{\eta}}(n) \sin(\rho\_{\vec{\eta}(j+1)} + \alpha\_{\vec{\eta}} n) + \sum\_{n=0}^{f\_{-1}-1} l\_{(j)}(n) \sin(\rho\_{\vec{\eta}(j+1)} + \alpha\_{\vec{\eta}} n) \Big| \\ &+ \frac{1}{N} \sin(\alpha\_{\vec{\eta}} m) \Big| \sum\_{n=0}^{N-1} g\_{\vec{\eta}}(n) \cos(\rho\_{\vec{\eta}(j+1)} + \alpha\_{\vec{\eta}} n) - \sum\_{n=0}^{N-1} g\_{\vec{\eta}(j+1)}(n) \cos(\rho\_{\vec{\eta}} + \alpha\_{\vec{\eta}} n) \\ &+ \sum\_{n=0}^{N-1} l\_{\vec{\eta}}(n) \cos(\rho\_{\vec{\eta}(j+1)} + \alpha\_{\vec{\eta}} n) - \sum\_{n=0}^{N-1} l\_{(j+1)}(n) \cos(\rho\_{\vec{\eta}} + \alpha\_{\vec{\eta}} n) \Big| \end{split} \tag{3.19}$$

The sum of formula (3.19) is equal to zero in the range [0,N-1].

126 Applications of Digital Signal Processing

( 1)

According to the property of cross-correlation and sine function, we have

<sup>1</sup> () ( ) () ( )

*N*

*n*

 Z

M Z

1

0

¦

<sup>1</sup> ( )[sin( )cos( ) cos( )sin( )]

*N N*

*gn n m n m <sup>N</sup>*

*i j ij ij ij ij ij ij*

1 1

0 0

1 1 ( 1) ( 1) 0 0

¦ ¦

1 1

¦ ¦

*N N*

*n n*

0 0

1 1

1 1

¦ ¦

 M

*B m g n n ln n*

( 1) ( 1)

*ij ij i j ij i j i*

( )sin( ) ( )sin( )]

*ij i j ij ij i j ij*

*m gn n g n <sup>N</sup>*

 MZ

( 1) ( 1)

*ij i j ij i j ij ij*

*l n n ln n*

*g n nl n n*

*N N*

*n n*

<sup>1</sup> sin( )[ ( )cos( ) ( )cos(

( )cos( ) ( )cos( )]

¦ ¦

*N N*

*n n*

0 0

*N N*

*n n*

 M

( 1)

 MZ

( 1)

 MZ

1 1 cos( ) ( )sin( ) sin( ) ( )cos( )

1 1 cos( ) ( )sin( ) sin( ) ( )cos( )

1 1 cos( ) ( )sin( ) sin( ) ( )cos( )

*ij ij i j ij ij ij i j ij*

( 1) ( 1) 0 0

Z

*ij i j ij ij i j ij ij*

<sup>1</sup> cos( )[ ( )sin( ) ( )sin( )

( 1) ( 1)

 MZ

*N*

*n*

1

0

¦

M Z

*m ln n m ln n*

*ij ij i j ij ij ij i j ij*

*m g n nm g n n*

*ij i j ij ij ij i j ij ij*

ZZ

*ml n n ml n n*

( 1) ( 1)

( 1) ( 1)

 Z

 Z

 MZ

Z

*N*

¦ ¦

 Z

( 1)

*n*

*ij i j ij ij*

*m g n n*

 M

 M

 MZ

 MZ

 M

M

*j ij*

Z

Z

)

*n*

Z

Z

(3.15)

(3.16)

(3.17)

(3.18)

(3.19)

<sup>1</sup> sin( ) ( )cos( )

 Z

( 1) ( 1)

*ij i j i j ij*

( 1)

( 1)

*n*

Similarly, for other cross-correlation, we have

( 1)

*mg n n <sup>N</sup>*

1 ( 1) 0

*R m l nx n m N*

1

0

1

*N l x ij i j n*

Z

Z

0

¦

*R m l nx n m N*

¦

*R m g nx n m <sup>N</sup>*

¦

*N x l i j ij n*

*N g x ij i j n*

<sup>1</sup> ( ) () ( )

*N N*

<sup>1</sup> ( ) () ( )

*N N*

<sup>1</sup> ( ) () ( )

*N N*

1 1

 

MZ

 Z

*s s*

¦ ¦

*n n N*

*f f*

0 0 1

0

¦ ¦

1 1

0 0

The sum of formula (3.19) is equal to zero in the range [0,N-1].

*N N*

*n n*

¦

*n*

M

*ij i j ij ij*

<sup>1</sup> cos( ) ( )sin( )

<sup>1</sup> ( )sin( )

*g n nm <sup>N</sup>*

*i j ij ij ij*

*x g g x i j ij*

MZ

MZ

*R m R m g nx n m <sup>N</sup>*

1

*N*

*n N*

*n*

0 1

 

¦

0

( 1)

( 1)

( 1)

*ij i j*

*ij i j*

*ij i j*

¦

Z

Z

Z

Z

*N*

Then, the *B* can be obtained as follows:

$$\sum\_{m=0}^{N-1} B = 0 \tag{3.20}$$

In view of the Eq. (3.20), although the B isn't strictly zero, their sum is equal to zero. We all known that on the right-hand side of Eq.(3.14) is the sum of cross-correlation function. Applying the Eq. (3.20) to (3.14) term by term, we obtain that the Eq.(3.14) strictly hold. Now we have the knowledge that the term C doesn't effect on the measurement results and we just need to discuss the term B as follows. Eq. (3.12) can be given by

$$R\_{ij}(0) - \frac{1}{N} \sum\_{m=0}^{N-1} R\_{ij}(m) = \frac{1}{2} \cos(\Phi\_{ij}) + B \tag{3.21}$$

Let the error terms that are caused by the white Gaussian noise and the quantization noise be represented by ( 1) ( 1) <sup>1</sup> *ij i j ij i j BR R xg gx* and ( 1) ( 1) 2 *ij i j ij i j BR R xl lx* respectively. So *B* can be expressed by *BB B* 1 2 .

Here, quantization noise is generally caused by the nonlinear transmission of AD converter. To analysis the noise, AD conversion usual is regarded as a nonlinear mapping from the continuous amplitude to quantization amplitude. The error that is caused by the nonlinear mapping can be calculated by using either the random statistical approach or nonlinear determinate approach. The random statistical approach means that the results of AD conversion are expressed with the sum of sampling amplitude and random noise, and it is the major approach to calculate the error at present.

We assume that *g t*( ) is Gaussian random variable of mean '0'and standard deviation ' <sup>2</sup> V *<sup>g</sup>* '. In the view of Eq.(3.15) and (3.17), we have obtained the standard deviation as follow:

$$
\sigma\_{B\_1}^2 = \frac{2\sigma\_g^2}{N} \tag{3.22}
$$

Assume that the AD converter is round-off uniformly quantizer and using quantization step ' . Then *l t*( ) is uniformly distributed in the range r' / 2 and its mean value is zero and standard deviation is <sup>2</sup> ( /12) ' . We have

$$
\sigma\_{\text{B}\_2}^2 = \frac{2\Delta^2}{12N} \tag{3.23}
$$

For *B*<sup>1</sup> and *B*<sup>2</sup> are uncorrelated, then

$$
\sigma\_B^2 = \sigma\_{B\_1}^2 + \sigma\_{B\_2}^2 = \frac{2\sigma\_{\mathcal{g}}^2}{N} + \frac{2\Lambda^2}{12N} \tag{3.24}
$$

The mean square value of <sup>1</sup> cos( ) 2 )*ij B* on the right-hand side of formula (3.21) will be calculated by the following formula to evaluate the influence of noise on measurement initial phase difference.

High-Precision Frequency Measurement Using Digital Signal Processing 129

Fig. 9. An example of noise floor characteristics of the DFSA: Allan deviation

$$\begin{aligned} &\frac{1}{N}\sum\_{m=0}^{N-1}(\frac{1}{4}\cos^2(\Phi\_{\vec{\eta}}) + B\cos(\Phi\_{\vec{\eta}}) + B^2) \\ &= \frac{1}{4}\cos^2(\Phi\_{\vec{\eta}}) + \frac{1}{N}\sum\_{m=0}^{N-1}(B\cos(\Phi\_{\vec{\eta}}) + B^2) \\ &= \frac{1}{4}\cos^2(\Phi\_{\vec{\eta}}) + \left(\frac{2\sigma\_{\mathcal{S}}^2}{N} + \frac{2\Delta^2}{12N}\right) + \frac{1}{N}\sum\_{m=0}^{N-1}B\cos(\Phi\_{\vec{\eta}}) \\ &\leq \frac{1}{4}\cos^2(\Phi\_{\vec{\eta}}) + \left(\frac{2\sigma\_{\mathcal{S}}^2}{N} + \frac{2\Delta^2}{12N}\right) + \frac{1}{N}\sum\_{m=0}^{N-1}B \\ &= \frac{1}{4}\cos^2(\Phi\_{\vec{\eta}}) + \left(\frac{2\sigma\_{\mathcal{S}}^2}{N} + \frac{2\Delta^2}{12N}\right) \end{aligned} \tag{3.25}$$

Where <sup>2</sup> V *<sup>g</sup>* represent standard deviation of Gaussian random variable, Signal Noise Ratio 2 2 *g <sup>V</sup> SN* V, and here the V is the amplitude of input signal, let amplitude resolution of a-bit

digitize and quantization step be ' , here variable 'a' can be 8~24. We have <sup>2</sup> 2 1 *<sup>a</sup> V* ' ( Ken Mochizuki, 2007). Applying this equation to formula (3.25) term by term, we obtain

$$\sigma\_{\varepsilon} = \sqrt{\frac{1}{4} \cos^2(\Phi\_{ij}) + \frac{1}{N} (\frac{2V^2}{SN^2} + \frac{2\Delta^2}{12})} \tag{3.26}$$

Where V *<sup>e</sup>* is the standard deviation of measurement initial phase difference. The standard deviation of digital correlation algorithms depends on the sampling frequency N, SNR and amplitude resolution 'a', as understood from formula (3.26). Here the noise of amplitude resolution can be ignored if the 'a' is sufficiently bigger than 16-bit and the SNR is smaller than 100 dB. The measurement accuracy for this method is mostly related to SNR of signal. This method has been tested that has the strong anti-disturbance capability.
