Вы находитесь на странице: 1из 27

CHAPTER 2 Probability and Random Process

2.1 Probability
2.1.1 Definition of Probability
2.1.2 Joint Probability and
Conditional Probability
2.1.3 Probability Distribution/Density Function
2.1.4 Joint Probability Density Function
2.1.5 Conditional Probability Density Function
2.1.6 Independence
2.1.7 Function of a Random Variable
2.1.8 Expectation, Variance, and Correlation
2.1.9 Conditional Expectation
2.1.10 Central Limit Theorem
2.1.11 Random Processes
2.1.12 Stationary Processes and
Ergodic Processes
2.1.13 Power Spectral Density (PSD)
2.1.14 White Noise and Colored Noise
2.2 Linear Filtering and PSD of a Random Process
2.3 Fading Effect of a Multi-Path Channel
CHAPTER OUTLINE
2.1 PROBABILITY
2.1.1 Definition of Probability
1 2
1 2 1 2
(P1) ( ) 0
(P2) ( ) 1 since any event belongs to the sample space .
(P3) If the events , ,& are exclusive, i.e., (the empty set) ,
the following relations hold:
( ...) ( ) ( )
j
i
P A
P S S
A A A A i j
P A A P A P A
f

=
= "
= +

... ; ( ) ( ) (2.1.1)
( ) 1, ( ) 0, and ( ) 1 ( ) (2.1.2)
i
i i
i
P A P A
P A P P A P A f
+ =
= = -

The probability is a mapping of every event into a real number satisfying the following axioms:
(2.1.4)
1 1
1
0 0 1 1
( | ) ( ) 0.8 0.1 8
( | )
( | ) ( ) ( | ) ( ) 0.1 0.9 0.8 0.1 17
P B A P A
P A B
P B A P A P B A P A

= = =
+ +
(2.1.3)
( ): Joint Probability
Conditional Probability: ( | ) with ( ) 0
( )
P A B
P A B P B
P B

= >
(2.1.3) (2.1.3)

(2.1.4)
( ) ( | ) ( ) ( | ) ( )
Bayes' Rule: ( | )
( ) 0 ( ) ( | ) ( )
where ( | ) is the likelihood that will occur after occurs and
, (mutually exclu
i i i i i
i
j j
j
i
P A B P B A P A P B A P A
P A B
P B P B P B A P A
P B A B A
i
A S A A
j i
j j
|

= = =
=
= =

sive) i j =


2.1.2 Joint Probability and Conditional Property
If the possible cause of the event is one of the mutually exclusive events , the
posteriori probability that turns out to be the cause of the event after is known
to have occurred is written in terms of the priori probability that we guess to have
occurred before or without knowing about the occurrence of as follows:
B
2 1
, , { } A A
( | )
i
P A B
B
B B
( )
i
P A
i
A
(Example 2.1) Application of Bayes Rule
(2.1.4)
1 1
1
0 0 1 1
( | ) ( ) 0.2 0.1 2
( | )
( | ) ( ) ( | ) ( ) 0.9 0.9 0.2 0.1 83
P B A P A
P A B
P B A P A P B A P A

= = =
+ +
ProbabilityDistribution Function(PDF): (2.1.5) ( ) ( ) F x P x = s
x
x
,
|
(2.1.11)
( , )
( | )
( )
f x y
f x y
f y
=
x y
x y
y


2.1.3 Probability Distribution/Density Function
probability density function (pdf): (2.1.6) ( ) ( )
d
f x P x
dx
= s
x
x


( ) ( ) ( ) ( ) ( ) ( ) (2.1.7)
b
a
P a b P b P a F b F a f x dx < s = s s = =
}
x x x
x x x
2.1.4 Joint Probability Density Function
,
2
, ,
Joint PDF: ( , ) ( , ) (2.1.8)
Joint pdf: ( , ) ( , ) (2.1.9)

F x y P x y
f x y F x y
x y
= s s
c
=
c c
x y
x y x y
x y

, ,
- -
Marginal pdf: ( ) ( , ) , ( ) ( , ) (2.1.10) f x f x y dy f y f x y dx


= =
} }
x y x y x y
2.1.5 Conditional Probability Density Function
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
Two events and with ( ) 0 and ( ) 0 are said to be of
each other if
A B P A P B independent > >


2.1.6 Independence
2.1.7 Function of a Random Variable
( )
( ) where 's are the roots of ( ) (2.1.14)
| / |
i
i i
x x
f x
f u x g x u
dg dx
=
= =

x
u
(2.1.12) ( ) ( ) ( ) or ( | ) ( ) or ( | ) ( ) P A B P A P B P A B P A P B A P B = = =
Two random variables and are said to be of each other if independent x y
, ,
(2.1.13) ( , ) ( ) ( ) or ( , ) ( ) ( ) F x y F x F y f x y f x f y = =
x y x y x y x y
( ) For a random variable , a differentiable function of , , is another random
variable and its pdf can be obtained from the pdf of asfollows:
g = x x u x
x
1
Especially if the function ( ) is a one-to-one correspondence mapping so that
its inverse function ( ) ( ) exists and is differentiable, the above equation
for the pdf of ( ) becomes
u g x
x h u g u
g

=
= =
= u x
( )
( ) ( ( )) (2.1.15)
dh u
f u f h u
du
=
u x
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
For two random variables and , a differentiable function ( , ) is also another
random variable and its PDF can be obtained from the joint pdf of and as follows:
g = x y u x y
x y
,
( ) (( , ) ) ( , ) where {( , ) | ( , ) } (2.1.16)
u
u u
D
F u P D f x y dxdy D x y g x y u = e = = s
}}
x y u
x y
Especially if ( , ) where and are independent of each other, then the
pdf of is the convolution of the two pdfs of and as
g = = + u x y x y x y
u x y

- -
( ) ( ) ( ) ( ) ( ) ( ) ( ) (2.1.17) f u f u f u f u y f y dy f x f u x dx


= - = =
} }
x y x y u x y
1 2
Additionally, the joint pdf of two functions ( , ) and ( , ) is g g = = u x y v x y
,
,
( , ) ( , )
( , )
( , ) (2.1.18)
| ( , )|
i i
i
x y x y
f x y
f u v
J x y
=
=

x y
u v
1 2
where ( , )'s are the roots of two simultaneous equations ( , ) and ( , )
and
i i
x y g x y u g x y v = =
1 1
2 2
( , ) ( , )
( , ) (2.1.19)
( , ) ( , )
: Jacobian
g x y g x y
x y
J x y
g x y g x y
x y
c c
c c
=
c c
c c
(
(
(
(

Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
1 2
1
2
Especially if the relation between the two pairs ( , ) and ( , ) through and is a
one-to-one correspondence mapping so that the inverse function is defined by ( , )
and ( , ) that are dif
x y u v g g
x h u v
y h u v
=
= ferentiable, the above equation for the joint pdf of and
becomes
u v
, , 1 2
( , ) ( ( , ), ( , )) | ( , ) | (2.1.20) f u v f h u v h u v J u v =
u v x y


1 1
2 2
where
( , ) ( , )
( , ) (2.1.21)
( , ) ( , )
: Jacobian
h x y h x y
u v
J u v
h x y h x y
u v
c c
c c
=
c c
c c
(
(
(
(

2.1.8 Expectation, Variance, and Correlation
For a random variable having the pdf ( ), its expectation or mean (expected value)
and variance or deviation are defined as
f x
x
x
2 2
2
2 2 2 2
( ) ( (2.1.22)
var( ) {( ) } ( ) ( (2.1.23)
{ } 2 { } { }
)
)
E m x f x dx
E m m f x dx
E m E m E m
o

= =
= = =
= + =
}
}
x x
x x x
x
x x x
x
x x x
x x x
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
2 2
( ) 2
Especially if has a normal (Gaussian) distribution with pdf as
1
( ) (2.1.25)
2
x m
f x e
o
to

=
x x
x
x
x
2
its mean and variance are and , respectively, and this normal distribution is
denoted by
m o
x x
2
2 2

2


0
(2.1.26)
where
(2.1.27)
1 1
( ) erfc
2 2 2
2 2
erfc( ) 1 1 erf ( )

t
x
x
t t
x
e
e e
x
Q x dt
x dt dt x
t
t t


= =
= = =
| |
|
\ .
}
} }
2
~ ( , ) N m o
x x
x
The probability that the value of a Gaussian random variable goes away from its mean
value by further than is expressed in terms of the error function erf ( ) or co-err
(complementary error) f
m A
x
unction erfc( ) as
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
{
If has has a uniform distribution on the interval [ , ] with pdf
1/ ( ) for
( ) (2.1.28)
0 elsewhere
a b
b a a x b
f x
s s
=
x
x
as denoted by
2

(2.1.22)

2

(2.1.23) (2.1.29)
2 2
(2.1.28)

3
2
( ) (2.1.29)
2( )
1
( ) ( )
2
1 1
( ) (2.1.30)
3( ) 2 12
1
( )
2


b
b
a
a
b
a
b
a
x
x f x
b a b a
a b
x m f x dx x dx
b a
a b
x b a
b a
x
m dx dx a b
o

=

+
= =

+
= =

= = = +
| |
|
\ .
| |
|
\ .
} }
} }
x
x
x
x x
~ ( , ) U a b x
its mean and variance are as follows:
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
The exp or value of a function ( ) of a random variable can be
written as
{ ( )} ( ) ( (2.1.31) )
ectation mean g
E g g x f x dx

=
=
} x
u x x
x
2
Now we define the , the , and the
for two real-valued random variables and as follows:
covariance correlation coefficient correlation r o
|
xy xy
xy
x y
2
2
,
2 2 2
2
Especially if two random variables and have jointly Gaussian (normal) distribution
with pdf
( )( ) ( )
1 ( ) 1
( , ) exp 2
2(1 )
2 1
(2.1.35)
x m y m y m
x m
f x y r
r
r
o o o o
t o o


= +


(

`
(


)
x y y
x
xy x y
x y xy x y
x y xy
x y
2
2
2 2
cov( , ) {( )( )} { } (2.1.32)
{( )( )}
cov( , )
(2.1.33)
var( ) var( )
{( ) } {( ) }
cor( , ) { } (2.1.34)
E m m E m m
E m m
E m E m
E
o
o
o o
|
= = =

= = =

= =
x y x y xy
x y xy
xy
x y
x y
xy
x y x y xy
x y
x y
x y
x y
x y xy
their covariance becomes
(2.1.33)
2
cov( , ) (2.1.36) r o o o = =
xy
xy x y
x y
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
If two random variables and are with each other, i.e. cov( , ) 0, we have uncorrelated = x y x y
Two random variables and are said to be to each other if
{ } 0 (2.1.39)
orthogonal
E =
x y
xy
1 2
On the other hand, we define the covariance matrix for a real-valued random vector
[ ... ] as follows:
T
N
= x x x x
0, { } { } { } (2.1.37)
var( ) var( ) var( ) (2.1.38)
r E E E m m = = =
+ = +
xy x y
xy x y
x y x y
[Remark 2.1] Independence and Correlation
If two random variables and are independent of each other, they are also uncorrelated
with each other; but the converse is not true unless they have joint
x y
ly normal distribution.
In other words, even if they are uncorrelated with each other, they may be dependent on
each other.
1 2
2 2 2
11 12 1
2 2 2
21 22 2
2 2 2
1 2

2
(2.1.40)
where
[ ] : Mean vector
cov( , ) { }: Covariance
cov( , ) {[ ][ ] }
[ ][ ]
N
j i
N
T
N
N N NN
T
ij i j i j
m m m
E
E
o o o
o o o
o o o
o

=
= =

E = = =


(
(
(
(

x x x
x x x x
x x
x m x m
m
x x
x x
x m x m
2
1 2
If all the components of are mutually independent, i.e., cov( , ) 0 , the
covariance matrix becomes diagonal. Moreover, if the components have a joint
Gaussian (normal) distrib
, ,...,
j
i ij
N
i j o = = = x x x
x x x
ution, the pdf of the real-valued random vector can be written as x
{ }
1
/ 2 1/ 2
1 1
( ) exp [ ] [ ] (2.1.41)
2 (2 ) | |
T
N
f x
t

= E
E
x x x x
x
x m x m
*
The cross-covariance matrix of two random vectors and is defined as
cov( , ) { } (2.1.42) [ ][ ]
T
E = = E
xy
x y
x y
x y y x m m
The two random vectors and are said to be uncorrelated with each other if
cov( , ) (2.1.43) = = E
xy
x y
x y O
This situation is denoted by
) , ( ~
x x
m x E N
and they are said to be orthogonal to each other if
*
( ) (2.1.44)
T
E = xy O
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
(Example 2.2) Uniform Number and Gaussian Number Generated by MATLAB
(a) Uniform Number
( ) (E2.2.1) y b a x a = +
%dc02e02a.m
N=8000; NB=40; % the number of samples and bins
u_noise=rand(1,N); % an 1xN random vector with U(0,1)
subplot(221), hist(u_noise,NB) % histogram having NB bins
u_noise1=2*u_noise-1; % an 1xN random vector with U(-1,1)
subplot(222), hist(u_noise1,NB) % histogram
>>dc02e02a
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
(E2.2.2) y x m o = +
%dc02e02b.m
N=8000; NB=40; % the number of samples and bins
g_noise=randn(1,N); % an 1xN random vector with N(0,1)
subplot(223), hist(g_noise,NB) % histogram having NB bins
m=1; sigma=1/2; % average and sigma=sqrt(deviation)
g_noise1=g_noise/2+1; % an 1xNB random vector with N(m,sigma^2)
subplot(224), hist(g_noise1,NB) % histogram
[ns,cs]=hist(g_noise1,NB); dx=cs(2)-cs(1); % bin width
x=m+[-500:500]*(sigma/100); % the range on the x-axis
f=exp(-(x-m).^2/(2*sigma^2))/sqrt(2*pi)/sigma; % Eq.(2.1.25)
hold on, plot(x,N*dx*f,'r')
sum(g_noise1)/N-m, sum((g_noise1-m).^2)/N-sigma^2
(b) Gaussian (Normal) Number
>>dc02e02b
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
2.1.10 Central Limit Theorem Normal Convergence Theorem
(2.1.49)
1
i
i
L
=

y x
Irrespective of the distribution of the individual variables, the average of the random
variables
L
2 2
has an approximate Gaussian distribution ( , / ) with mean and variance / .
Note that
N m L m L o o
{ }
( )
{ }
1 1
2
2 2
1 1
2
independence
2
2
1 2 2 1
{( )( )} 0
1 1 1
{ } { }
1 1
var( ) {( ) }
1 1 1
( ) {( ) }
i j
L L
i i
i i
L L
i
i i
L L
i i
i i
E m m
m E E E Lm m
L L L
E m E m
L L
E m E m
L L L
o
o
= =
= =
= =
=
= = = = =


| |
= = =
`
|
\ .

)
= = =



y
y y
x x
y x x
y y x
x x
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
(Example 2.3) Central Limit Theorem (CLT)
%dc02e03.m
% Plot Fig. 2.3 to check the validity of the CLT
clear, clf
Ns=10000; NB=100; % the numbers of samples and bins
mx=1/2; % the mean of standard uniform noise: Eq.(2.1.29) (a=0, b=1)
sgmx2=1/12; % the variance of standard uniform noise: Eq.(2.1.30)
sgmx=sqrt(sgmx2);
Ls=[2 10];
for i=1:length(Ls)
L=Ls(i); % # of iterations
rand('twister',5489); %return rand() to its default initial state
y = sum(rand(L,Ns))/L; % Eq.(2.1.49)
hist(y,NB), pause
end
hold on
[ns,cs]=hist(y,NB);
dy=cs(2)-cs(1); % the bin width
my=mx; sgmy2=sgmx2/L; %the average & variance of the sample averages
sgmy=sqrt(sgmy2);
y=my+[-500:500]*(my/500); % the range on the y-axis
fy=exp(-(y-my).^2/2/sgmy2)/sqrt(2*pi)/sgmy;
plot(y,Ns*dy*fy,'r')
>>dc02e02a
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
2.1.11 Random Processes
(Example 2.4) Bandpass Gaussian Noise and Rice Probability Density Function
0
(D.20)
0 0
0 0
(D.28)
2 2
( ) ( ) ( ) cos( ) ( )
(cos cos( ) sin sin( )) ( ) cos( ) ( ) sin( )
( cos ( )) cos( ) ( sin ( )) sin( )
( ) cos( ) ( ) sin( ) ( ) ( ) cos ta
c
c c c s c
c
c c s c
c c s c
c s c
t s t t A t t
A t t t t t t
A t t A t t
t t t t t t t
e u
u e u e e e
u e u e
e e e =
= + = + +
= +
= + +
= + +
r n n
n n
n n
r r r r
1
( )
n
( )
( ) cos( ( )) (E2.4.1)
s
c
c
t
t
t t t e

= +
| |
|
\ .
r
r
z
2 2
1
0 0
1
2
0 0
( , )
( cos ) ( sin )
(E2.4.2)
( , )
tan {( sin ) /( cos )}
c s
c s
c s
s c
g
A A
g
A A
u u
u u

+ + +
= =
+ +
(
( (
(
( (


n n z n n
n n
n n
0 0 1
2 0 0
cos cos cos ( , )
; (E2.4.3)
( , ) sin sin sin
c c
s s
A A h
h A A
u u
u u

= = =

( ( ( (
( ( ( (

n r z z
z n r z

2 2 2 2
2 2 2
2 2
,
( ) 2
2
1 1
( , ) ( ) ( )
2 2
1
(E2.4.4)
2
c s
c s c s
c s
n n
c s c s
n n
f n n f n f n e e
e
o o
o
o
to to
t

+
= =
=
n n n n
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.

2 2 2
1 1
2 2
2 2 2
0 0
(E2.4.4) (2.1.18)
1 ( ) 2
( , ) ( , )
, ,
2
(2.1.20)
(E2.4.5) ( , ) ( , )
(E2.4.3)
[( cos cos ) ( sin sin ) ]/ 2
2
2
( )
( , ) ( , ) ( , )
2
( )
for
2
c s
c c
c s
s s
n n s
h z h z n n
c
c s s
n h z n h z
z A z A
s
c s
zu z
f z f n n J n n e
z u z
e z r r
o
u u
u u
u u u u o
o
o
u
t
t
+
= =
= =
+
= =
= = +
z n n

2 2 2
0
2
(D.20)
( 2 cos( ) ) / 2
2
0
( )
(E2.4.7)
2
z zA A
s
z u z
e
u u o
o t
+
>
=
Thus we obtain the joint pdf of and as z
Now we can use Eq. (2.1.10) to get the (marginal) pdf of the amplitude or envelope : z
2 2 2
0
2 2 2
2
0
2 2 2
2 (2.1.10) (E2.4.7)
( 2 cos( ) ) / 2
,
2
- 0
2
( ) / 2
( / )cos( )
2
0
( ) / 2
0
2 2
( )
( ) ( , )
2
( ) 1

2
( )
: Rice pdf
z zA A
s
z A
zA s
z A
s
z u z
f z f z d e d
z u z
e d
z u z
zA
I
e
e
t
u u o
t
o
o u u
o
o
o
u u u
t o
u
t
o

+

+
= =
=
| |
=
|
\ .
} }
}
z z
(E2.4.8)
Especially if the sinusoidal component is not involved in the signal, i.e., 0 as depicted
in Fig. 2.4.1(a), the pdf of the envelope of only the band-ass noise becomes
A =
z
2 2
/ 2
2
( )
( ) : Rayleigh pdf (E2.4.9)
z
s
z u z
f z e
o
o

=
z
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
2
Note that the pdf (E2.4.8) will get closer to Gaussian pdf ( , ) as becomes larger
(Fig. 2.4.2).
A
N A o
o
: ( ) { ( )} (2.1.50)
: ( , ) { ( ) ( ) } (2.1.51)
: ( , ) { ( ) ( ) } (2.1.52)
T
i j i j
T
i j i j
Mean function m t E t
Autocorrelation function t t E t t
Crosscorrelation function t t E t t
Autocovariance fu
=
=
=
x
x
xy
x
x x
x y
: ( , ) {[ ( ) ( )][ ( ) ( )] } (2.1.53)
: ( , ) {[ ( ) ( )][ ( ) ( )] } (2.1.54)
T
i j i i j j
T
i j i i j j
nction t t E t t t t
Crosscovariance function t t E t t t t
=
=
E
E
x x x
xy x y
x m x m
x m y m
A (possibly complex-valued) random process ( ) is said to be wide-sense stationary if its
mean function is constant and its correlation/covariance is a function of time difference, i.e.,
t x
2.1.12 Stationary Processes and Ergodic Processes
*
: { ( )} (2.1.55)
: ( , ) { ( ) ( )} ( ) (2.1.56)
: ( , ) ( ) (2.1.57)
T
i j i j i j
i j i j
Mean function m E t
Autocorrelation function t t E t t t t
Autocovariance t t t t
=
= =
E = E
x
x x
x x
x
x x
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
2.1.14 White Noise and Colored Noise
A white noise is a continuous-time/discrete-time zero-mean SSP / whose correlation
and PSD are as summarized in Table 2.3. In contrast with this, a continuous/discrete-time zero-
mean SSP whose correlation is not an impulse function and consequently, its PSD is not constant
over frequency may be called a colored noise.
) (t w [ ] w n
%dc02f05.m
% generates white noise and computes its autocorrelation and DFT-PSD
rand('twister',5489); % To return rand() to its default initial state
N=500; % Length of Data Sequence
N_DFT=128; % Size of DFT and length of Autocorrelation to be computed
phiw_sum=zeros(1,N_DFT); PHIw_sum=zeros(1,N_DFT);
for iter=1:20 % To take the ensemble average over 5 realizations
w=rand(1,N)-1/2;% N i.i.d. r.v.s uniformly distributed over [-1/2,1/2]
phiw= xcorr(w,w,'bias'); % Autocorrelation of w[n]
phiw= phiw(N-N_DFT/2+1:N+N_DFT/2);
PHIw= fftshift(fft(phiw)); % PSD of w[n]
phiw_sum=phiw_sum+phiw; % Sum of correlations
phiw_avg=phiw_sum/iter; % Ensemble average of correlations
PHIw_sum=PHIw_sum+PHIw; % Sum of PSDs
PHIw_avg=PHIw_sum/iter; % Ensemble average of PSDs
PHIwmag= abs([PHIw_avg PHIw_avg(1)]);
subplot(311), plot([0:99], w(1:100)), title('w[n]')
subplot(312), plot([-N_DFT/2+1:N_DFT/2], phiw_avg)
title('Autocorrelation phix[n]')
subplot(313), plot([-0.5:1/N_DFT:0.5], PHIwmag)
title('Power Spectral Density')
end
var=sum(w.^2)/N % should be 1/12=0.0833 theoretically.
phiw_avg(N_DFT/2) % phiw[0]
mean(PHIwmag) % Average of PSD
(Example 2.5) Autocorrelation of a White Noise Correlated with a Sinusoidal Wave
( 1)
2
'[ ] ( ) cos( ) (E2.5.1)
b
b
k T
c
kT
b
w k w d
T
t t e t
+
=
}
(2.1.66a)
stationarity
0
1 2 1 2 1 2 1 2
where ( ) is a (real-valued) zero-mean Gaussian white noise with autocorrelation
( , ) ( ) { ( ) ( )} ( ) (E2.5.2)
2
and the integration period is an integer t
w w
b
w t
N
t t t t E w t w t t t
T
| | o = = =
0
imes / (half of the period of cos( )). Note
that / 2 [W/Hz] is called the noise PSD (power spectral density).
c c
N
t t e e
'
( 1)
2
Mean: [ ] { '[ ]} { ( )}cos( ) 0 (E2.5.3)
b
b
k T
c w
kT
b
m k E w k E w d
T
t t e t
+
= = =
}
2
' '
( 1) ( 1)
1 1 1 2 2 2
( 1) ( 1)
1 1 2 2 1 2
(E2.5.2) (
0
1 2
cos( )
Variance: [0] { '[ ] '[ ]}
2 2
( ) cos( ) ( ) cos( )
2
{ ( ) ( )} cos( )
2
( )
2
b b
b b
b b
b b
b
w w
k T k T
c c
kT kT
b b
k T k T
c c
kT kT
b
k
kT
b
E w k w k
E w d w d
T T
E w w d d
T
N
T
e t
o |
t e t t t e t t
t t e t t t
o t t
+ +
+ +
+
= =


=
`

)
=
=
} }
} }
( )
( 1) 1)
1 2 1 2
( 1) ( 1) (E1.6.1) (D.31)
0 0 0
2
cos( ) cos( )
1
cos ( ) 1 cos(2 ) (E2.5.4)
2 2
b b
b
b b
b b
k T T
c c
kT
k T k T
c c
kT kT
b b
d d
N N N
d d
T T
e t e t t t
e t t e t t
+
+ +
= = + =
} }
} }
(2.1.66b)
'
( 1) ( 1)
1 1 1 2 2 2
( )
( 1) ( 1)
1 1 2 2 1 2
( )
(E2.5.2)
cos( )
[ ] { '[ ] '[ ]} (with 0)
2 2
( ) cos( ) ( ) cos( )
2
{ ( ) ( )} cos( )
2
b b
b b
b b
b b
w
k m T k T
c c
k m T kT
b b
k m T k T
c c
k m T kT
b
m E w k m w k m
E w d w d
T T
E w w d d
T
T
e t
|
t e t t t e t t
t t e t t t
+ + +
+
+ + +
+
= + =


=
`

)
=
=
} }
} }
1 2
1 2
( 1) ( 1)
0
1 1 2 2 1 2
( ) 0 ( )
cos( ) ( ) cos( ) 0 (E2.5.5)
2
b b
b b
k m T k T
c c
k m T kT
b
N
d d
t t
o t t
e t o t t e t t t
+ + = +
= +
=
} }
0
'
; [ ] [ ] (E2.5.6)
2
This is a discrete-time impulse sequence while the autocorrelation of ( ) is a
continuous-time impulse function.
w
N
m m
w t
| o =
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
%dc02e05.m: Statistical Property of White Noises
% the autocorrelation and distribution (histogram) of a white noise
clear, clf
Nb=8; %number of samples per bit time interval
M=5000; N=M*Nb; % Sample size
Tb=1; dt=Tb/Nb; % Bit time interval and sampling interval
xlim=10; xx=-xlim:0.02:xlim;
NB=40; % Number of bins
randn('state',0); %return randn() to its default initial state
w=randn(1,N)/sqrt(dt); % divide by sqrt(dt) so that integral(w^2(t))dt=1
for i=1:2
if i==1
sigma2= w*w'/N % phiw(0)=integral(w^2(t))dt/(N*dt)
sgm2=1/dt; f=exp(-xx.^2/2/sgm2)/sqrt(2*pi*sgm2);
nn=[-N/2:N/2]; tt=nn*dt; nnt=nn+N+1;
else
w=cos(2*pi*[0:Nb-1]/Nb)*reshape(w,Nb,M)*sqrt(2/Tb)*dt; %Eq.(E2.5.1)
sigma2= w*w'/M % phiw[0]=sum(w^2(n))*Tb/(M*Tb)
f=exp(-xx.^2/2)/sqrt(2*pi);
nn=[-M/2:M/2]; tt=nn*Tb; nnt=nn+M+1;
end
phiw=xcorr(w,'u');
subplot(219+2*i), plot(tt,phiw(nnt))
idx=find(abs(w)<=xlim);
w1=w(idx); N1=length(w1);
subplot(220+2*i)
[ns,cs]=hist(w1,NB);
dx=cs(2)-cs(1);
hist(w1,NB), hold on, plot(xx,N1*f*dx,'r')
% plot(xx,f*dx,'r',cs,ns/N1,':')
end
( 1)
(E2.5.1) 2
'[ ] ( ) cos( )
b
b
k T
c
kT
b
w k w d
T
t t e t
+
=
}

2 2
2
1
2
x
e
o
o t

2.3 FADING EFFECT OF A MULTIPATH CHANNEL
1 1 1
2 2
1
1 1
( ) cos( ) cos cos sin sin
cos sin cos( ) (2.3.1)
where cos , sin , and tan
N N N
c c c n n n n n n
n n n
c Q c c I I Q
N N Q
I n n Q n n
n n
I
r t A t A t A t
r t r t r r t
r
r A r A
r
e u u e u e
e e e |
u u |
= = =

= =
= + =
= = + +
= = =


[Remark 2.2] Fast Fading vs. Slow Fading and Frequency-Selective Fading vs. Flat Fading
(1) If the amplitude and phase changes caused by the channel are considerable over the period of
use, the channel effect is called fast fading; otherwise, it is slow fading, which may result
from shadowing due to a large obstruction such as a hill or large building.
(2) If the channel fading effect changes over the frequency, it is called frequency-selective fading;
otherwise, it is (frequency-)flat fading.
%test_Rayleigh_fading.m
% To see Rayleigh fading effect (Fig. 2.8)
clear, clf
pi2=2*pi; N=5; % Number of paths
Ns=10000; NB=40; % Numbers of samples and bins
rand('twister',5489) % return rand() to its default initial state
for m=1:Ns
An=rand(1,N); thn=pi2*rand(N,1);
rI(m)=An*cos(thn); rQ(m)=An*sin(thn);
end
B=5; rQ = rQ(find(abs(rQ)<=B)); % rQ within the boundary
subplot(311), hist(rQ,NB), hold on
[ns,cs]=hist(rQ,NB);
dz=cs(2)-cs(1);
z= -B:0.01:B;
mz=0; sgmz2=1; sgmz=sqrt(sgmz2);
fz= exp(-(z-mz).^2/2/sgmz2)/sqrt(2*pi)/sgmz; % normal (Gaussian) pdf
plot(z,length(rQ)*dz*fz,'r')
As=[0 2]; zmin=0; zmax=5; fzmax=700;
for i=1:length(As)
A=As(i); % the amplitude of LOS component through a direct path
z= sqrt((A+rI).^2+rQ.^2);
zz=zmin:0.02:zmax; % the range on the z(amplitude)-axis
z=z(find(z>zmin)); z=z(find(z<zmax));
subplot(311+i), hist(z,NB), hold on
[ns,cs]=hist(z,NB); dz=cs(2)-cs(1);
fz= Rice_pdf(zz,A,1);
plot(zz,length(z)*dz*fz,'r')
end
(P 2.1) Amplitude of a Bandpass Gaussian Noise and Rice Probability Density Function
%dc02p01.m
clear, clf
wc=pi/2; th0=pi/4;
t=0:0.001:10; Nt=length(t);
x=0:0.1:5; NB=50; B=5;
for m=1:2
A=2*(m-1); Ac=A*cos(th0); As=A*sin(th0);
for n=1:Nt
rc= Ac+randn; rs=As+randn;
r(n)= rc*cos(wc*t(n))-rs*sin(wc*t(n));
z(n)=sqrt(rc^2+rs^2);
end
below_B=z(find(z<B)); Nz=length(z);
subplot(210+m)
[ns,cs]=hist(z_below_B,NB); dx=cs(2)-cs(1);
f= ????????(x,A,1);
plot(x,f*dx,'r',cs,ns/Nz,':')
end
function f=Rice_pdf(x,A,sigma)
%Rice density function
sigma2= sigma^2; sgm2= 2*sigma2;
f=(x>=0).*x/sigma2.*??(x*A/sigma2).*exp(-(x.*x+A*A)/sgm2);
function f=I0(beta)
%Bessel function of order 0
exp_bcos=inline('exp(beta*cos(theta))','theta','beta');
pi2=2*pi;
for n=1:length(beta)
f(n)=quad('????????',0,pi2,0.0001,[],beta(n))/pi2;
end
2 2 2
2 ( ) E2.4.8
( ) / 2
cos
0 0
2 2
0
( ) 1
( ) with ( )
2
z A
s
z u z
zA
f z I I e d e
t
o
| u
o
| u
o t
+ | |
= =
|
\ .
} z

Вам также может понравиться