Académique Documents
Professionnel Documents
Culture Documents
2004
1 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
xk (t ) {x1 (t ), x2 (t ), x3 (t )}...xK (t )} , t
Where: { }: Ensemble of sample functions xk(t)
k: Index of sample function (k=1,2,3K)
t: Time variable
x1(t)
t+
(3) For discrete sample function, discrete values of any sample random function are
measured at certain time points t1, t2, t3, tN (N: number of sampling values of
sample function)
2 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
Stationary process
Ergodic process
Gaussian process
Non-Gaussian process
Non-ergodic signals
Non-stationary
processes
y k (t )
(1) Mean value (Expectation): First-order statistical moment
x (t ) E[ x k (t )] Lim N
1
N
(t ) dt
3 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
y (t ) E[ y k (t )] Lim N
1
N
(t )dt
2 x (t ) E[( xk (t ) x (t )) 2 ] E[ x 2 k (t )] k2 (t )
: Variance
2 y (t ) E[( y k (t ) y (t )) 2 ] E[ y 2 k (t )] y2 (t )
: Variance
E[ xk (t ) * y k (t )] x (t ) * y (t )
C xx ( ) E[( xk (t ) x (t ))( xk (t ) x (t ))]
: Covariance
: Covariance
2 x (t ) E[( xk (t )) 2 ]
: Variance
2 y (t ) E[( y k (t )) 2 ]
: Variance
C xx (0) 2 x (t )
C yy (0) 2 y (t )
(3) Mean square and root mean square
C xx (t ) E[ x 2 k (t )]
: Mean square
C yy (t ) E[ y 2 k (t )]
: Mean square
Rxx ( ) E[ xk (t ) * xk (t )]
: Autocorrelation
R yy ( ) E[ y k (t ) * y k (t )]
: Autocorrelation
Rxy ( ) E[ xk (t ) * y k (t )]
: Cross-correlation
Note:
C xx ( ) Rxx ( ) 2 x
C yy ( ) R yy ( ) 2 y
C xy ( ) Rxy ( ) x y
Zero mean random process:
x (t ) 0 , y (t ) 0
C xx ( ) Rxx ( )
C yy ( ) R yy ( )
C xy ( ) Rxy ( )
(5) Correlation coefficients
C xx ( ) Rxx ( ) x2
xx ( )
Rxx ( )
Rxx ( )
yy ( )
xy ( )
C yy ( )
R yy ( )
C xy ( )
Rxy ( )
: Auto-correlation coefficient
R yy ( ) y2
R yy ( )
: Auto-correlation coefficient
Rxy ( ) x y
Rxy ( )
: Cross-correlation coefficient
5 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
xx ( )
yy ( )
xy ( )
C xx ( ) C xx ( )
Rxx ( )
2x
C yy ( )
R yy ( )
C xy ( )
Rxy ( )
C yy ( )
2y
C xy ( )
x y
Note 1:
i)
C xx ( ) R xx ( )
ii)
C xx ( ) C xx (0)
iii)
iv)
v)
| C xy ( ) |2 C xx (0) * C yy (0)
vi)
| C xy ( ) |2 x2 y2
vii)
viii)
Rxy ( ) R yx ( )
Note 2:
i)
C xx (0) x2
: Variance
6 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
ii)
C yy (0) y2
: Variance
iii)
Rxx (0) E[ x 2 (t )] x2
: Mean square
iv)
R yy (0) E[ y 2 (t )] y2
: Mean square
S xx ( f ) Rxx ( ) * e j 2f d
S yy ( f ) R yy ( ) * e j 2f d
S xy ( f ) Rxy ( ) * e j 2f d
: Cross-spectral density
function
Inverse Fourier Transform:
Rxx ( ) S xx ( f ) * e j 2f df
: Auto-correlation
R yy ( ) S yy ( f ) * e j 2f df
: Auto-correlation
Rxy ( ) S xy ( f ) * e j 2f df
: Cross-correlation
7 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
Rxx ( ) 2 S xx ( f ) * cos 2f d
0
Changing the two-sided spectral density Sxx(f) with f[-,] to the one-sided spectral
density Gxx(f) with f[0,]
Gxx ( f ) 2 S xx ( f )
G yy ( f ) 2 S yy ( f )
Gxy ( f ) 2 S xy ( f )
Gxx(f)=2Sxx(f): One-sided
Spectra
Sxx(f): Two-sided
[-,0]
[0,]
Thus,
8 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
f(Hz)
C xy ( f ) : Co-spectrum
Qxy ( f ) : Quadratic spectrum
Writing in standard form:
G xy ( f ) | G xy ( f ) | e
j xy ( f )
Where:
xy ( f ) tan 1
Qxy ( f )
C xy ( f )
C xy ( f ) | Gxy ( f ) | cos xy ( f )
Qxy ( f ) | Gxy ( f ) | sin xy ( f )
Rxy (0) C xy ( f ) df
0
X k ( f ) xk (t )e j 2ft dt
0
xk ( f ) X k ( f )e j 2ft df
0
9 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
Gxx ( f ) 2 LimT
1
E[| X k ( f ) |2 ]
T
G yy ( f ) 2 LimT
1
E[| Yk ( f ) |2 ]
T
Gxy ( f ) 2 LimT
1
E[ X k ( f ) * Yk ( f )]
T
1.5. Coherence
Coherence plays the same role as the correlation coefficient. The correlation coefficient
is expressed in time domain, whereas the coherence in frequency domain.
| E[ x(t ) * y (t )] |2 E[ x 2 (t )] * E[ y 2 (t )]
| C xy ( ) |2 C xx (0) * C yy (0) 2 x * 2 y
Thus,
xy ( )
C xy ( )
x * y
: Correlation coefficient
0 xy ( ) 1
(2) Coherence:
| Gxy ( f ) |2 Gxx ( f ) * G yy ( f )
| Gxy ( f ) |2
xy ( f )
Gxx ( f ) * G yy ( f )
0 xy ( f ) 1
interpreted as fractional portion of the mean square value at the output y(t) that is
contributed by the input x(t) at frequency value f. In contrast,
the quantity
2 xy ( )
1)
2)
3)
a. Extra noise
b. Non-linear system between input x(t) and output y(t)
11 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
c. SIMO or MISO
xy
(f)
xy ( f )
C xy ( f ) 2 iQxy ( f )
Gxx ( f ) * G yy ( f )
C xy ( f ) 2
Gxx ( f ) * G yy ( f )
: Coherence
12 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
2.2. Classifications
(1) Signals can be commonly classified in the engineering application by some follows
categories: i) Continuous (analogue) and discrete signals (digital), ii) Deterministic
and random signals
Electric signals
(by data acquisition)
Analogue Signals
(Continuous)
Sampling and
A/D conversion
Discrete Signals
(Digital)
Data Analysis and
Post-data processing
Periodic signals
Sinusoidal signals
(2 cycle)
Complex periodic signals
(T cycle)
Nonperiodic signals
Transient signals
Random signals
Stationary signals
Ergodic signals
Non-ergodic signals
Nonstationary signals
Specific classification of
nonstationary signals
x (t ) x (t 2 n )
x(t ) x (t nT )
The complex periodic signals may be expanded by a Fourier series into the
combination of harmonic components (sine and cosine functions) as follow:
x(t ) X 0 cos(
2
t 0 )
T
a0
1
1
x (t )
[an cos 2n t bn sin 2n t ]
2 n 1
T
T
iii)
(Original signals)
(Fourier series)
iv)
14 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
(2) The characteristics of the random signals can be clarified by some following
quantities:
i)
ii)
iii)
(3) For discrete signals, the above-mentioned quantities can be expressed by formulas:
1
x
N
1
xi ; rms x
N
i 1
1
R xx ( )
N
1
Sx ( f )
N
i 1
x (t
i
) x i (t 0 )
i 1
N
x e
j 2nk / N
; n=[1,N]
k 1
Stationary signals are that their mean value and correlation of discrete
signals do not vary on time.
ii)
x (t ) x
R xx (t , ) R xx ( )
iii)
Weakly stationary signals (or stationary in the wide sense) are that mean
value and correlation (first and joint moments) are time invariant.
15 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
x (t ) x
R xx (t , ) R xx ( )
iv)
Strongly stationary signals (or stationary in the strict sense) are that all
moments and joint moments (not only first moment but also high-order
moments) are time invariant.
x (t ) x
R xx (t , ) R xx ( )
th
i x (t ) x
R
v)
i th
xx
(t , ) R xx ( )
Ergodic signal is stationary one (Mean value and correlation are time
invariant), moreover, its mean value and correlation are constant with
different samples of signal.
x (k ) x
Rxx
(k )
( ) Rxx ( )
vi)
Non-ergodic signal is stationary one (Mean value and correlation are time
invariant), however, its mean value and correlation are differed with
different samples of signal.
x (k ) x
R xx
vii)
(k )
( ) R xx ( )
16 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
x (k ) 0
(k )
(k )
Rxx ( ) C xx ( ) 2
viii)
x (t ) x 0
C xx ( ) 2
Note 1:
Single random process: Signal of one physical quantity (phenomenon) at one
position
Multi-random processes: Signals of many physical quantities at different
positions
Sampling: Signal of random process at any time ( time interval)
Multi-dimensional process: are multi-variable function
Multi-variate process: Vector of many signals
Multi-variate and multi-dimensional process: Vector of many processes (signals)
in which each individual signal is multi-variable function
Ensemble: the collection of sample functions (any time interval) of one signal.
Thus random signal is the collection of these sample function of one signal
Note 2:
Process (Field): Display and illustration of one physical quantity at one position
(If measurement of the same physical quantity at one position differs from that
at another position due to its distribution and redistribution)
Sample: Display and illustration of a physical quantity at one position at any
time interval
17 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
Record: Discrete display of a physical quantity at one position and one time
Signal: Electric display (continuous or discrete) of a physical quantity at one
position and one time
- Different amplitude
Items
Stationary
Definition
Note
Stationary-Ergodic
Sampling-independant
Stationary-
Nonergodic
Weak stationary
Mean
value
and
Sampling-dependant
Strong stationary
and
moments
Non-stationary
18 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
high-order
(5) The ensemble (collection of sampling records) of random signal can be divided by
two categories: Individual sample records (one process) and Multiple sample
records (many processes). The characteristics of individual and multiple sample
records of one and many processes can be expressed by figure hereinafter:
One sample of one process
Note 3:
Coherence function: is the relation between the power auto-spectral density and
the power cross-spectral density.
Frequency response function (gain factors and phase factors): is also the linear
relation between the power auto-spectral density and the power cross-spectral
density.
19 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
(SIMO); iii) Multi input and single output systems (MISO); iv.Multi input and
multi output systems (MIMO).
(2) In the practical applications, many signal channels are simultaneously measured at
various positions or different time delays. For many cases of MIMO systems, many
input and output signals can be correlated or uncorrelated measured simultaneously.
20 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
Frequency Response
Function (FRF)
Input signal
x(t)
Hxy(f)
Signal noise
n(t)
Output signal
y(t)
SISO system
Input signal
x1(t)
Hxy,1(f)
Signal noise
n(t)
Output signal
y1(t)
Input signal
x2(t)
Hxy,2 (f)
Output signal
y2(t)
Channel No.2
Output signal
yk(t)
Channel No.k
Channel No.1
..
Input signal
xk(t)
Hxy,k (f)
21 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
Data Acquisition
Data Conversion
Data Qualification
Data Analysis
Transducer
A/D Conversion
Classification
Individual Sample
Records
Signal Conditioning
Aliasing Errors
Validation
Multiple Sample
Records
Signal Calibration
Quantization Errors
Editing
(3) Three following main steps of the digital signal processing procedure will be
overviewed as follows:
22 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
metallic
like
copper-nickel
alloy
and
semiconductor
like
monocrystalline silicon.
Signal conditioning: Change from the electric signals (charge and resistance)
to voltage.
Note: ADC can be stored under two types of codes: binary and ASCII codes
Binary code: By numbers 0 and 1 (8 bytes)
ASCII code: By numbers from 0 to 9 (1byte). However, almost data of
discrete signals (after ADC) has been stored under this ASCII code in
application, because it is easily red by any applied programs such as Matlab
and Fortran for data post-processing.
23 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
Sample collection of
Cross-Correlation Function
Analysis
Auto-Correlation Function
Analysis
Auto-spectral Density
Analysis
Cross-spectral Density
Analysis
Coherence Function
Analysis
24 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
Frequency
Response Function
Signal Filter
A/D Conversion
Data Sampling
Multi sample record (of multi signals) = Collection of number of individual sample
records (of individual signal). Thus analysis of the multi sample record can be carried
out by analysis of the individual sample record and analysis of the pairs of correlated
two individual sample records.
Continuous Signal
A/D Conversion
Data Sampling
Discrete Signal
xn
Equally spaced time interval (T: sampling time or sampling period) of samples in
discrete signal:
Tn T0 n * T
n=1,2,3 N
25 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
Tn n * T
(T0 = 0)
T: Sampling period
NT: Total time length of discrete signal;
F: Sampling frequency (Hz);
Thus,
xi x(Tn ) x (T0 n * T )
N *T
1
T
F0
1
N *T
n=1,2,3 N
Noting that the Limit sampling frequency (the Nyquist frequency) for eliminating the
Aliasing Errors
FN
1
2 *T
x' n (can be called the fluctuating data record) that has the
1
x
N
x n to
n=1,2,3N
(Mean value)
n1
26 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
1 N 2
s x SQRT [
x n]
N 1 n 1
value)
Note: For the stationary ergodic data record (time-invariant and samplingindependent), it is very convenient and common to transform the initial data
record
x'n :
n=1,2,3N
x'n xn x xn (nT ) x
n=1,2,3N
Having:
x' 0
2
x'
(Zero-mean value)
1 N 2
x' n
N 1 n 1
1 N 2
s x ' x ' SQRT [
x' n ]
N 1 n 1
(Root Mean Square or Standard Deviation)
x'n
n=1,2,3N
1
X ( Fk )
[ x(n T ) * exp( j 2 F
n T )]
n 1
27 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
Fk
Note:
i) The frequency space (f ) = The fundamental sampling frequency (F0)
f F0
1
NT
Fc Fs
F0
Fc : Cut-off frequency
Fs : Starting frequency
Fk Fs k ( f ) Fs
Fk
k
;
NT
k
;
NT
k=0,2,3K-1
k=0,2,3K-1
28 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
k
1
X ( Fk ) X (
)
NT
k
1
X ( Fk ) X (
)
NT
DFT
X(Fk)
X(F1)
X(Fi)
f(Hz)
F1=Fs
k=1
Fi=Fs+i/NT
k=i
1
k=1: X ( F1 ) X ( Fs )
F1=Fc
k=K
N
[ x(n T ) * exp( j 2 n / N )]
n 1
1
1 N
) [ x (n T ) * exp( j 2 2 n / N )]
k=2: X ( F2 ) X ( Fs
NT
n 1
2
1
)
k=3: X ( F3 ) X ( Fs
NT
[ x(n T ) * exp( j 2 3 n / N )]
n 1
1
x( nT )
N
[ X ( NT ) * exp( j 2 k n / N )] ;
k 1
29 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
n=0,1,2N
4) Auto-correlation function
Auto-correlation function can be computed by i) Direct computation by definition and
ii) Indirect computation via FFT. Note that the second method is more efficiency
because of application of FFT algorithm, however, the first one is easier to compute
but more time consuming.
x'n
n=1,2,3N
1
R xx (s)
N
[ x
(n)
( s) x( n s ) ( s s )] (Auto-correlation functions)
n 1
s r * t
1
R xx ( r * t )
N r
N r
[ x (s) x
n
nr
( s s )]
n 1
x'n
n=1,2,3N
30 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
1
Definition of mean power: S xx E[ x (t )]
N
2
N 1
1
x
NT
n0
2
n
NT
(t ) dt
x(t)
2T
3T
4T 5T
S xx ( f )
1
NT
6T
(N-1)T NT
N 1
| X
( f ) |2
n 0
1 N 1
X ( f ) x n * exp[ j 2nk / N ] ; k=0,1,2N-1
N n 0
2
G xx ( f k ) 2S xx ( f k )
NT
N 1
| X
n0
xn , n=1,2,3N
2) Data Standardization: Compute the mean value of data record ( x ), then
reconstruct the Fluctuating Data Record
( x'
x'n with
0)
31 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
zero-mean value
x'n , n=1,2,3N
3) Data Blocking: Taper data record by each data blocks using Window
functions
4) Fourier Transform: Compute the Fourier Transform at frequency fk,
k=1,2,3N by using FFT technique
X ( f k ) , k=1,2,3N
5) Scale Factor Adjustment of X ( f k ) : Scale factor of X ( f k ) due to the loss
by tapering operation. (By Hanning tapering: Scale factor by 8 / 3 )
6) Spectral Density: Estimate the spectral density
blocks
32 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
4. CORRELATION FUNCTION
4.1. Introduction
(1) The correction functions evaluate the statistical independence between the signals
(time-dependant) or stochastic processes (space-dependant). The cross correlation
function is a measure to tell us how much two processes or two signals are like each
other, whereas the auto correlation function tell us how much a process or a signal at
time t is like itself at time t+ (: time shift or time lag) or how much a process or a
signal at location (x,y,z) is like itself at another location (x+x,y+y,z+z). In addition,
to evaluate how much two processes or two signals are like each other, the correlation
coefficient function also is given.
R xy ( s ) E[ x( n ) y ( n s ) ] Lim N
1
N
N 1
[ x
(n)
( s) y ( n s ) ( s s)]
n 0
For the number of samples is taken large enough, we have following approximations:
1
R xx (s)
N
[ x
(n)
( s) x( n s ) ( s s )] (Auto-correlation functions)
n 1
1
R xy (s )
N
[x
(n)
( s ) y ( n s ) ( s s )]
n 1
functions)
33 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
(Cross-correlation
s s
Span-wise
Rxx (si )
s
si
xy ( s ) E[ x( n ) ]E[ y ( n s ) ] Lim N
1
N
N 1
[ x
( n)
( s )] Lim N
n 0
1
N
N 1
[ y
( n s )
( s s ) ]
n 0
For the number of samples is taken large enough, we have following approximations:
1
xx ( s )
N
1
[ x ( n ) ( s )]
N
n 1
1
xy (s )
N
[ x
( n s )
n 1
1
[
x
(
s
)]
(n)
N
n 1
[ y
( n s )
( s s )]
n 1
(Cross-covariance
functions)
s : Spatial interval or time shift
If x, y are the zero-mean processes or signals, these mean that E[x(s)]=0 and E[y(s)]=0,
then the Root mean square (R.M.S) value must be replaced to the mean value (or
Expected value):
Auto-covariance function:
1
xx ( s ) SQRT {
N
1
[
x
(
s
)]}
SQRT
{
(
n
)
N
n 1
2
[ x
( n s )
( s s )]}
( n s )
( s s )]}
n 1
Cross-covariance function:
1
xy ( s ) SQRT {
N
1
[ x ( n ) ( s )]} SQRT {
N
n 1
2
[ y
n 1
xx ( s)
xy (s)
Rxx ( s)
xx ( s)
Rxy ( s)
xy (s)
4.5. Examples
Example 1: Correlation function
Initial signals x,y
1
0.5
0.1
-0.5
-0.1
-1
50
100
150
Number of sample
Auto-correlation Rxx,Ryy by Xcorr(x)
0.6
-0.2
50
100
150
Number of sample
Cross-correlation Rxy by Xcorr(x,y)
0.2
0.4
0.1
0.2
-0.1
-0.2
100
200
300
-0.2
100
200
300
Initial sinal+noise
2
1.5
1.2
1
1
0.5
0.8
0
-0.5
0.6
-1
0.4
-1.5
0.2
-2
0
-2.5
-3
2
Time (s)
3
-3
x 10
-0.2
0.2
0.4
Time (s)
0.6
37 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
0.8
5. FOURIER TRANSFORM
5.1. Introduction
(1) It is well known that the Fourier Series Transform and Fourier Spectral Transform
have been widely applied for almost kinds of natural and physical phenomena.
Applications and contributions of the Fourier Series and Fourier Transform concentrate
on the problem of the Digital Signal Processing (D.S.P) in the data processing and
analysis of measurements and the buffeting response prediction in which the spectral
representation cant be required.
(2) In summary, the Fourier Series and the Fourier Transform will be studied for such
purposes as follows:
1) Data processing and analysis of measurement processes in the Digital Signal
Processing (D.S.P)
2) Spectral representation in the buffeting response prediction
(3) Data measurements can be expressed under the continuous or discrete processes.
However, almost measured signals have been collected under the discrete signal for the
data post-processing and analysis. The discretization of measured signals is well
known as the sampling processes.
N: Number of samples
T: Period (Time step of sampling) of a sample (s)
F: Frequency of a sample (Hz), F
1
T
1
NT
a0 M 1
xn
[a m cos( mn 0T ) bm sin( mn 0T )]
2 m 1
2
2
Fo NT
a0 M 1
xn
[ a m cos( 2mn / N ) bm sin( 2mn / N )]
2 m1
39 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
2
am
N
2
bm
N
N 1
cos( 2mn / N ) ;
sin( 2mn / N ) ;
0 m M 1
n 0
N 1
1 m M 1
n 0
Computational procedure:
Step 1: Setting parameters
-
Initial signal
Number of samples N
Number of series M
Step 2: Sampling
Step 3: Calculating Fourier Coefficients
-
am, bm
Step 4: Simulating Fourier series and Plotting Simulated signal vs. number of
samples (n)
1
NT
40 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
X ( k ) [ x ( nT ) e j k n T ]
n 1
1
X ( fk )
2
[ x(nT ) e
j 2 f k n T
n 1
2
2
Fo NT
Computational procedure:
Step 1: Setting parameters
- T (cycle sampling), N (numbers of samples)
- Freq. range: fs (starting freq.), fc (cut-off freq.)
- Number of freq. interval: K ( fc fs) / k
Step 2:
Loop 1: Frequency
For k=1 to K k k ( )
Loop 2: Sampling
N
41 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
Putting 0
2
2
into formulas:
Fo NT
N
X (k 0 ) [ x ( nT )e jk0 nT ]
n 1
X (k 2F0 ) [ x (nT )e
jk
2
nT
NT
n1
X ( kF0 ) [ x( nT )e j 2kn / N ]
n 1
a0 K
h(t )
[ ak cos( k k t ) bk sin( kk t )]
2 k 1
ak
2
Re{H ( k )}
N
bk
2
Im{ H (k )}
N
Leakage Effect: Amplitudes will distribute on adjacent closed frequencies. This effects
occurs in cases that total sampling time NT does not coincide the integer multiple of
the sampling cycle T. To prevent the leakage effect by Averaging Method or Window
Functions
42 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
N 1
X k x nW Nkn ; k=[0,N-1]; WN e j 2 / N
n 0
(Eulers Formula)
2n
N
n 0
1 e
1 e
2N
N
j
2
N
Sum can be expressed in the complex plane of 2=3600 (N=8 for example)
Im
900 k=2
1350 k=3
j 2 2 / 8
450 k=1
e j
0
e j 2 0 / 8 0 k=0
1800 k=4
e j 2 5 / 8
e j 2 7 / 8
2250 k=5
3150 k=7
2700 k=6
Complex plane
43 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
Re
W Nm e ( j 2 / N ) m ; m[0,N-1]
W Nrem ( m , N ) e ( j 2 / N )( iN m ) ; i=1,2,.. Max(kn)
N
Xk
N / 21
x2 nW
2 kn
N
n 0
Due to:
W N2 kn ; k=[0:N-1]
2 n 1
n 0
W Nk / 2 W N2 k/ 2 , thus
N / 2 1
Xk
n 0
N / 2 1
x 2 nW
kn
N /2
W Nkn/ 2 ;
2 n 1
n0
44 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
N
2
N
N
2
K log 2 N (in comparison of N components in DFT)
2
2
X ( kF 0 )
[ x ( nT ) e
j 2 kn / N
] ; k=[0:N-1]:
n 01
1
x ( nT )
N
N 1
[ X ( kF )e
j 2 kn / N
k 0
45 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
Fsampling 2 Fmax,signal
5.8. Examples
Example 1: D.F.S
1.2
0.9
0.8
Signal from
D.F.S
0.6
0.5
0.4
0.3
0.4
0.2
-0.2
0.1
10
20
30
40
number of samples
50
60
70
-0.4
0.4
10
20
30
40
number of samples
50
60
-0.2
70
1.2
1.2
1.2
0.8
0.8
0.6
0.4
0.2
-0.2
0.6
0.4
0.2
10
20
30
40
number of samples
50
60
70
-0.2
10
20
30
40
number of samples
50
60
70
10
20
30
40
number of samples
50
60
70
0.6
0.4
0.2
0
0.8
N u m b e r o f s e rie s M = 5 0
N u m b e r o f s e rie s M = 2 0
N u m b e r o f s e rie s M = 1 0
0.6
0.2
Initial Signal
Impulse Function
0.2
0.8
N u m be r of s erie s M = 5
0.6
0.7
Nu m be r of s erie s M = 3
Nu m be r of s erie s M = 1
0.8
-0.2
10
20
30
40
number of samples
50
60
70
-0.4
Initial signal (impulse function) and signal due to Discrete Fourier Series at various
number of series (M=1,3,5,10,10,50)
46 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
20
8
6
10
Amplitude
f1=8Hz
f1=33Hz
2
Noise
-10
0.2
0.4
time [t]
signal
0.6
0.8
20
20
40
60
frequency [Hz]
spectrum by using spectrum
25
20
10
15
10
5
-10
0.2
0.4
time [t]
0.6
0.8
No noise
0
20
40
frequency [Hz]
60
Note:
Fourier Transform
Spectrum
CFT ( x) X ( j )
jt
x(t )e dt
CSPEC( x) X ( j ) x 2 (t )e jt dt
N 1
DFT ( x) X ( j ) x n e jnT
n 0
N 1
DSPEC ( x) X ( j ) x 2 n e jnT
47 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
n 0
Example 3: DFT
Signal
FFT command
1
0.6
0.8
0.4
0.6
0.2
0.4
0.2
-0.2
-0.4
DFT Magnitude
0
0.2
0.4
0.6
0.8
Number of samples or time interval
DFT by definition
0.6
0.4
20
40
Frequency Hz
Spectrum command
60
20
40
Frequency Hz
60
8
6
0.2
4
0
2
-0.2
-0.4
20
40
Frequency Hz
60
Results: +) Fast Fourier Transform (FFT) is not a new form of Fourier transform, the
N
H0=x*exp(-j*2*pi*k'*n/N);
n: pointer of sample, k: pointer of frequency, k must be transposed (k)
H0=H0/N; H0 must be standardized by dividing by N (number of samples)
48 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
0.6
0.8
0.4
Amplitude
Signal
Spectrum
1
0.6
0.4
0.2
0
-0.2
0.2
0.4
0.6
Number of samples
Phase spectrum
-0.4
0.8
20
15
Phase(rad)
Phase(rad)
0.2
0
-2
-4
fftshift(H)
20
40
Frequency(Hz)
Phase spectrum
60
10
5
unwrap()
Angle(H)
0
20
40
Frequency(Hz)
60
20
40
Frequency(Hz)
60
1.5
signal
4
FFT
phase spectrum
unwrapped p.s
4
150
2
100
0.5
-2
50
-0.5
50
100
signal
50
100
swapped FFT
-4
50
100
50
100
1.5
2
100
0.5
-2
-0.5
50
100
50
100
-4
50
50
100
50
49 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
100
(2) Thus the questions are that what terms of statistical parameters can be able to
describe the characteristics of the random signals. It is well known that the two mostcommonly-used means are:
i)
ii)
(3) In the term of amplitude distribution, the commonly-used statistical quantities are:
i) mean value (expectation); ii) mean square (variance when zero-mean signals) or root
mean square (standard deviation when zero-mean signals).
(4) It is broadly said that the square of DFT magnitudes of any function x(t) is
considered as power contribution of any frequency components in x(t) over the
frequency domain.
1
- Mean value (Expectation): x E[ x ]
N
- Mean square
1
E[ x ]
N
2
x
N 1
i 0
N 1
i 0
N 1
1
E[ x ] sqrt (
N
2
i 0
- Variance:
1
E[( x x ) ] E[ x ] [
N
2
x
- Standard deviation:
2
x
N 1
1
x i][
N
i 0
2
N 1
x ]
i 0
y a x b
Linear relationship of y and x as y=ax+b, we easily obtain:
x2 a 2 x2
ii)
The instantaneous power of signal x(t) at any time t can be defined as:
Power | x(t ) |2
For the complex signals, we must use the mean power or expected power:
T /2
T /2
1
1
2
Mean power E[ x (t )] LimT
x
(
t
)
dt
x 2 (t ) dt
T T / 2
T T / 2
2
1 N 1 2
1
Discrete mean power S xx E[ x (t )] x n
N n 0
NT
2
NT
(t ) dt
1
x ( nT )
N
N 1
[ X ( kF )e
j 2 kn / N
k 0
1
S xx
N
N 1
1
x
N
n 0
2
n
N 1
1
[
n 0 N
N 1
X (kF )e
0
j 2kn / N 2
k 0
N 1
1 N 1 N 1
1 N 1 N 1
j 2kn / N 2
S xx 3 [ X ( kF0 )e
] 3 X k X m e j 2 ( k m ) n / N
N n 0 k 0
N k 0 m 0
n 0
1
S xx 2
N
N 1
2
k
k 0
52 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
1 N 1 2
x k
We have: S xx
N k 0
As a result, the relationship between the mean power of signal in the time domain and
power spectrum, or the mean power of signal can be presented in the term of the power
spectrum. This expression has been well known as the Parsevals Theorem.
N 1
1 N 1
x Xk
N k 0
k 0
2
k
(Parsevals Theorem)
Pxx (k )
1
Xk
N
k=[0,N-1]
Pxx (k ) Pxx ( N k )
The power spectrum can be obtained:
1
S xx
N
N 1
x
k 0
N 1
xx
(k )
k 0
Note: In the same way that x k2 represents a measure of signal power at a point in
the time domain, Pxx(k) represents the measure of signal power at the point in
the frequency domain.
Therefore, the vector P xx=[Pxx(k)], k=[0:N-1] is considered as the measure of
estimation of the power spectral density (PSD) of signal x(t).
53 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
N 1
1
Discrete PSD: 1) S xx 2
N
(Frequency domain)
k 0
1
S
2) xx
N
(Time domain)
k 0
1
3) S xx
N
k 0
1
Xk
N
Pxx (k )
N 1
1
Parsevals Theorem: x
N
k 0
2
k
1
S
Continuous PSD: 1) xx
NT
N 1
xx
S xx
(Periodogram)
k 0
; m=[0,N-1]
N 1
2
k
(Parsevals Equality)
(t ) dt
(Frequency domain)
k 0
NT
/T
1 / 2T
2)
(k )
xx
( f )df or S xx
xx
( ) d
/T
1 / 2T
The relationship of the power spectrum to the auto-correlation: The discrete autocorrelation of vector x from sampled values of signal x(t) with extended period has
been defined as follows:
1
R xx ( s )
N
N 1
x x
n
n 0
n s ;
s=[0:N-1]
54 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
1
R xx (0)
N
N 1
S xx Mean power
n0
1
S R DFT {R xx ( s )}
N
N 1 N 1
j 2sk / N
x
x
e
n n s
s 0 n 0
k=[0:N-1]
N 1
X k x n e j 2kn / N ; k=[0:N-1]
(Definition of DFT)
n0
S R DFT {Rxx ( s )}
1
Xk
N
Pxx (k ) ;
k=[0:N-1]
In the conclusion, the periodogram of vector x with periodic extension is the DFT of
the auto-correlation function of x, that means:
S R DFT {Rxx ( s )}
1
2
X k Pxx ( k )
N
The Cross Spectrum: involves two time-dependant signals (two time series). Suppose x
and y are vectors of length N sampled from two signals x(t) and y(t).
The cross-periodogram:
1
Pxy(k) XkY'k ;
N
k=[0:N-1]
55 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
Mean cross-power:
1 N1
Sxy xn yn
N n0
1 N1
1 N1
Sxy Rxy(0) 2 XnY'n Pxy(k)
N k0
N k0
Role of the cross spectrum gives us information on how the cross
correlation function is distributed over the frequency scale.
Coherence function: The magnitude of the cross periodogram Pxy(k), that is Pxy (k ) , is
the measure of the coherence of signals x(t) and y(t) at different frequencies.
Coherence function:
Coh 2 xy ( f )
Pxy ( f )
Pxx ( f ) Pyy ( f )
6.4. Examples
Example 1: FFT and SPECTRUM
Impulse signal
0.8
0.4
0.6
The same
0.2
0.2
0.5
0.4
0.3
0.4
FFT
DFT
Amplitude
0.5
Amplitude
0.1
0
0.5
0.8
50
2
50
Spectrum
8
6
Difference in shape?
Different in value? 4
0.4
x 10
0.6
0.2
0.2
0.1
-5
0.3
0
1
0 Process and Digital
50 Signal
0 Processing
56 | Le Thai Hoa - Notes
on 0.5
Stationary Random
Time (s)
Frequency (Hz)
Frequency (Hz)
50
%DFT by definition
H=[H(1) 2*H(2:N/2)]/N;
3) Using SPECTRUM command
S=SPECTRUM(x);
S=[S(1) 2*S(2:N/2)]; %Vector length limit
4) Using spectrums definition
S=ABS(H).^2;
Sampling process
(Step 2)
FFT
(Step 3)
Digital Signal or
Random Process
57 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
SPECTRUM
(Step 4)
normal signal
uniform signal
sine signal
impulse signal
10
10
0.5
-10
FFT
0.4
0.2
-2
1.5
50
50
1
0.5
0.5
0
40
40
0
50 0
200
20
20
100
0 spectrum 50
50
50
50
0
40
20
50
FFT
20
10
10
10
0
-10
-20
50
50
FFT with hann
3
2
1
0
50
50
58 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
50
(2)
(3)
Inter-relation or inter-influence
Stochastic process A
or digital signal A
Stochastic process B
or digital signal B
(2) The Auto-spectrum represents the Fourier transform of the Auto correlation
59 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
(3) The Cross-spectrum represents the Fourier transform of the Cross correlation
(4) The Cross-spectrum is the complex valued function whose magnitude and phase
are used in the signal processing to indicate the degree of correlation between two
signals
(5) The magnitude of the cross spectrum indicates whether frequency components of
one signal are associated with large or small amplitudes at the same frequency in
the second signal.
(6) The phase of the cross spectrum indicates whether the phase lag (tre) or lead (dan
truoc) of one signal with respect to the second signal for a given frequency
component.
(7) The cross-spectrum is used to determine the coherence function between two
signals
(8) Cross spectrum and coherence function can be determined by the MATLAB as
powerful engineering program for Digital Signal Processing
Y(f)=F{y(t)}
S xy ( f )
Coh xy ( f )
S xx ( f ) S yy ( f )
| S xy ( f ) | 2
| Cohxy ( f ) |
Note: Here two discrete signals are taken into account. In cases, many pairs of two
discrete signals are counted, the summation must be used, called the average cross
spectrum and the average coherence function.
Cohu1u 2
S u1u 2 ( )
( )
S u1 ( ) S u 2 ( )
Cohu1u 2 ( )
S u1u 2 ( )
S u1 ( ) S u 2 ( )
61 | Le Thai Hoa - Notes on Stationary Random Process and Digital Signal Processing
Cohu ,y ( )
S u ,y ( )
S u , 0 ( ) S u , y ( )
7.4. Examples
Example 1: FFT vs. SPECTRUM
signal
20
8
6
10
4
0
2
-10
0.2
0.4
time [t]
signal
0.6
0.8
20
20
40
60
frequency [Hz]
spectrum by using spectrum
25
20
10
15
10
5
-10
0.2
0.4
time [t]
0.6
0.8
Input Signal
20
40
frequency [Hz]
60
20
8
6
10
4
0
2
-10
0.2
0.4
0.6
Time[s]
Input Signal
0.8
20
60
20
40
Frequency [Hz]
0.5
-0.5
40
60