Slides

advertisement
Stochastic processes
Lecture 8
Ergodicty
1
Random process
2
3
Agenda (Lec. 8)
• Ergodicity
• Central equations
• Biomedical engineering example:
– Analysis of heart sound murmurs
4
Ergodicity
• A random process X(t) is ergodic if all of its
statistics can be determined from a sample
function of the process
• That is, the ensemble averages equal the
corresponding time averages with probability
one.
5
Ergodicity ilustrated
• statistics can be determined by time averaging
of one realization
Realization 1
x(t)
5
0
-5
0
2
4
6
t (s)
Realization 2
8
10
0
2
4
8
10
x(t)
5
0
-5
6
t (s)
Realization 3
x(t)
5
Estimate of
E[X(x)] from one
Realization over
time
0
-5
0
2
4
Estimate of E[X(x)]
across Realizations
6
8
10
t (s)
6
Ergodicity and stationarity
• Wide-sense stationary: Mean and
Autocorrelation is constant over time
• Strictly stationary: All statistics is constant
over time
7
Weak forms of ergodicity
• The complete statistics is often difficult to
estimate so we are often only interested in:
– Ergodicity in the Mean
– Ergodicity in the Autocorrelation
8
Ergodicity in the Mean
• A random process is ergodic in mean if E(X(t))
equals the time average of sample function
(Realization)
• Where the <> denotes time averaging
• Necessary and sufficient condition:
X(t+τ) and X(t) must become independent as τ
approaches ∞
9
Example
• Ergodic in mean:
X 𝑑 = a sin(2πœ‹πœ”π‘Ÿ + πœƒ)
• Where:
– πœ”π‘Ÿ is a random variable
– a and θ are constant variables
• Mean is impendent on the random variable πœ”π‘Ÿ
• Not Ergodic in mean:
X 𝑑 = π‘Ž sin 2πœ‹πœ”π‘Ÿ + πœƒ + π‘‘π‘π‘Ÿ
– Where:
– πœ”π‘Ÿ and dcr are random variables
– a and θ are constant variables
• Mean is not impendent on the random variable π‘‘π‘π‘Ÿ
10
Ergodicity in the Autocorrelation
• Ergodic in the autocorrelation mean that the
autocorrelation can be found by time averaging a
single realization
• Where
• Necessary and sufficient condition:
X(t+τ) X(t) and X(t+τ+a) X(t+a) must become
independent as a approaches ∞
11
The time average autocorrelation
(Discrete version)
N=12
𝑁− π‘š −1
𝑅π‘₯π‘₯ π‘š =
π‘₯ 𝑛 π‘₯[𝑛 + π‘š]
𝑛=0
Autocorrelation
Autocorrelation
M=-10
M=0
M=4
222
888
111
666
000
444
-1-1
-1
-2-2
-2
-10
-10
-10
-5
-5
-5
000
555
nnn
10
10
10
15
15
15
20
20
20
222
000
222
111
-2
-2
-2
000
-4
-4
-4
-1-1
-1
-2-2
-2
-10
-10
-10
-5
-5
-5
000
555
n+m
n+m
n+m
10
10
10
15
15
15
20
20
20
-6
-6
-6
-15
-15
-15
-10
-10
-10
-5
-5
0
5
10
15
12
Example (1/2)
Autocorrelation
• A random process
– where A and fc are constants, and Θ is a random
variable uniformly distributed over the interval [0,
2π]
– The Autocorraltion of of X(t) is:
– What is the autocorrelation of a sample function?
13
Example (2/2)
• The time averaged autocorrelation of the
sample function
•
𝐴
= lim
𝑇→∞ 2𝑇
𝑇
−𝑇
cos 2πœ‹π‘“π‘ 𝜏 + cos 4πœ‹π‘“π‘ 𝑑 + 2πœ‹π‘“π‘ 𝜏 + πœƒ
Thereby
14
Ergodicity of the First-Order
Distribution
• If an process is ergodic the first-Order
Distribution can be determined by inputting x(t)
in a system Y(t)
• And the integrating the system
• Necessary and sufficient condition:
X(t+τ) and X(t) must become independent as τ
approaches ∞
15
Ergodicity of Power Spectral Density
• A wide-sense stationary process X(t) is ergodic
in power spectral density if, for any sample
function x(t),
16
Example
• Ergodic in PSD:
X 𝑑 = a sin(2πœ‹πœ” + πœƒπ‘Ÿ )
• Where:
– θπ‘Ÿ is a random variable
– a and πœ” are constant variables
• The PSD is impendent on the phase the random variable πœƒπ‘Ÿ
• Not Ergodic in PSD:
X 𝑑 = π‘Ž sin 2πœ‹πœ”π‘Ÿ + πœƒ
– Where:
– πœ”π‘Ÿ are random variables
– a and θ are constant variables
• The PSD is not impendent on the random variable πœ”π‘Ÿ
17
Essential equations
18
Typical signals
• Dirac delta δ(t)
𝛿 𝑑 =
∞
0
𝑑=0
𝑒𝑙𝑠𝑒
∞
𝛿 𝑑 𝑑𝑑 = 0
−∞
• Complex exponential functions
𝑒 𝑗𝑑 = cos 𝑑 + 𝑗𝑠𝑖𝑛(𝑑)
19
Essential equations
Distribution and density functions
First-order distribution:
First-order density function:
2end order distribution
2end order density function
20
Essential equations
Expected value 1st order (Mean)
• Expected value (Mean)
• In the case of WSS
π‘šπ‘₯ = 𝐸[𝑋(𝑑)]
• In the case of ergodicity
Where<> denotes time averaging such as
21
Essential equations
Auto-correlations
• In the general case
– Thereby
• If X(t) is WSS
𝑅π‘₯π‘₯ 𝜏 = 𝑅π‘₯π‘₯ 𝑑 + 𝜏, 𝑑 = 𝐸[𝑋 𝑑 + 𝜏 𝑋(𝑑)]
• If X(i) is Ergodic
– where
22
Essential equations
Cross-correlations
• In the general case
𝑅π‘₯𝑦 𝑑1, 𝑑2 = 𝐸 𝑋 𝑑1 π‘Œ 𝑑2
∗
= 𝑅𝑦π‘₯ (𝑑2, 𝑑1)
• In the case of WSS
𝑅π‘₯𝑦 𝜏 = 𝑅π‘₯𝑦 𝑑 + 𝜏, 𝑑 = 𝐸[𝑋 𝑑 + 𝜏 π‘Œ(𝑑)]
23
Properties of autocorrelation and
crosscorrelation
• Auto-correlation:
Rxx(t1,t1)=E[|X(t)|2]
When WSS:
Rxx(0)=E[|X(t)|2]=σx2+mx2
• Cross-correlation:
– If Y(t) and X(t) is independent
Rxy(t1,t2)=E[X(t)Y(t)]=E[X(t)]E[Y(t)]
– If Y(t) and X(t) is orthogonal
Rxy(t1,t2)=E[X(t)Y(t)]=E[X(t)]E[Y(t)]=0;
24
Essential equations
PSD
• Truncated Fourier transform of X(t):
• Power spectrum
• Or from the autocorrelation
– The Fourier transform of the auto-correlation
25
Essential equations
LTI systems (1/4)
• Convolution in time domain:
Where h(t) is the impulse response
Frequency domain:
Where X(f) and H(f) is the Fourier transformed signal and impluse
response
26
Essential equations
LTI systems (2/4)
• Expected value (mean) of the output:
∞
πΈπ‘Œ 𝑑
=
∞
𝐸 𝑋 𝑑 − 𝛼 β„Ž 𝛼 𝑑𝛼 =
−∞
π‘šπ‘₯ (𝑑 − 𝛼)β„Ž 𝛼 𝑑𝛼
−∞
– If WSS:
π‘€β„Žπ‘’π‘Ÿπ‘’ π‘šπ‘₯ 𝑑 𝑖𝑠 π‘šπ‘’π‘Žπ‘› π‘œπ‘“π‘‹ 𝑑 π‘Žπ‘  𝐸[𝑋(𝑑)]
∞
π‘šπ‘¦ = 𝐸 π‘Œ 𝑑
= π‘šπ‘₯
β„Ž 𝛼 𝑑𝛼
−∞
• Expected Mean square value of the output
∞
πΈπ‘Œ 𝑑
2
∞
=
𝑅π‘₯π‘₯(𝑑 − 𝛼, 𝑑 − 𝛽)β„Ž 𝛼 β„Ž 𝛽 𝑑𝛼1𝑑𝛼2
−∞ −∞
– If WSS:
∞
πΈπ‘Œ 𝑑
2
=
∞
𝑅π‘₯π‘₯ (𝛼 − 𝛽) β„Ž 𝛼 β„Ž 𝛽 𝑑𝛼1𝑑𝛼2
−∞ −∞
27
Essential equations
LTI systems (3/4)
• Cross correlation function between input and
output when WSS
∞
𝑅𝑦π‘₯ 𝜏 =
𝑅π‘₯π‘₯ 𝜏 − 𝛼 β„Ž 𝛼 𝑑𝛼 = 𝑅π‘₯π‘₯ 𝜏 ∗ β„Ž(𝜏)
−∞
• Autocorrelation of the output when WSS
∞
𝑅𝑦𝑦 𝜏 =
∞
𝐸[𝑋 𝑑 + 𝜏 − 𝛼 𝑋 𝑑 + 𝛼 ]β„Ž 𝛼 β„Ž −π‘Ž 𝑑𝛼𝑑𝛼
−∞ −∞
𝑅𝑦𝑦 𝜏 = 𝑅𝑦π‘₯ 𝜏 ∗ β„Ž(−𝜏)
𝑅𝑦𝑦 𝜏 = 𝑅π‘₯π‘₯ 𝜏 ∗ β„Ž(𝜏) ∗ β„Ž(−𝜏)
28
Essential equations
LTI systems (4/4)
• PSD of the output
𝑆𝑦𝑦 𝑓 = 𝑆π‘₯π‘₯ 𝑓 𝐻 𝑓 𝐻 ∗ (𝑓)
𝑆𝑦𝑦 𝑓 = 𝑆π‘₯π‘₯ 𝑓 |𝐻 𝑓 |2
• Where H(f) is the transfer function
– Calculated as the four transform of the impulse
response
29
A biomedical example on a stochastic
process
• Analyze of Heart murmurs from Aortic valve
stenosis using methods from stochastic
process.
30
Introduction to heart sounds
• The main sounds is S1 and S2
– S1 the first heart sound
• Closure of the AV valves
– S2 the second heart sound
• Closure of the semilunar valves
31
Aortic valve stenosis
• Narrowing of the Aortic valve
32
Reflections of Aortic valve stenosis in
the heart sound
• A clear diastolic murmur which is due to post
stenotic turbulence
33
Abnormal heart sounds
34
Signals analyze for algorithm
specification
• Is heart sound stationary, quasi-stationary or
non-stationary?
• What is the frequency characteristic of systolic
Murmurs versus a normal systolic period?
35
exercise
• Chi meditation and autonomic nervous system
36
Download