dcsp-21 jianfeng feng department of computer science warwick univ., uk [email protected]
TRANSCRIPT
Stochastic Processes
Random variables: x Stochastic processes: x(t), x(n)
• P(x=1)=0.5 P (x(n)=1)=0.5
• Toss a coin toss a coin many times
A sequence here
Stochastic ProcessesRandom variables: x Stochastic processes: x(t), x(n)
• P(x=1)=0.5 P (x(n)=1)=0.5
• mean E x =0.5 mean E x(n) = 0.5• Variance
var (x) = var ( x(n) ) =
• correlation between
x(0) and x (n)
rxx(n) = E (x(0) – E x(0)) (x(n) – E x(n))
• x=randn(1000,1);• hold on• y=zeros(1000);• z=zeros(1000);• plot(x);• for i=1:900• y(i)=x(i+100);• z(i+100)=x(i+100);• mxy(i)=x(i)*y(i);• end• plot(z+10,'r')• plot(y+20,'g')• plot(mxy+30,'b')
• mean(mxy)
• ans =
• 0.0218
plot(abs(fft(autocorr(x)))) hold on plot(abs(fft((x))),'r')
White noise: the spectrum of its autorrelation is flat
Stochastic Processes
Random variables: x Stochastic processes: x(t), x(n)
The summation of two normal random variables Is again a normal random variable
Z = X + Y
mean (Z) = mean (X) + mean(Y)
var(Z) = var (X) + var(Y)
(if X and Y are independent)
The summation of two white noise processes is again a white noise process
Z(n) = X(n) + Y(n)
mean (Z) = mean (X) + mean(Y)
var(Z) = var (X) + var(Y)
(if X and Y are independent)
Stochastic Processes
Random variables: x Stochastic processes: x(t), x(n)
The summation of two normal random variables Is again a normal random variable
Z = X + Y
mean (Z) = mean (X) + mean(Y)
var(Z) = var (X) + var(Y)
(if X and Y are independent)
The summation of two white noise processes is again a white noise process
Z(n) = X(n) + Y(n)
mean (Z) = mean (X) + mean(Y)
var(Z) = var (X) + var(Y)
(if X and Y are independent)
Application: Matched FilterAssume
an n bit signal
a(i) = S(-i)
Y(n)= a(0) X(n) + a(1) X(n-1) + … + a(N) X(n-N)
Actual input X(i) = S(i)+ (i)
[1,1, 1] /S N
2 2 2 2
2
2
(0) (0) (1) (2) ( )
[ (0) ( )] /
1 [ (0) ( )] /
([ (0) ( )] / ) 0
var([ (0) ( )] / )
var( (0))
Y S S S S N
N N
N N
mean N N
N N
The variance is not enlarged due to the summation of many noise terms
• clear all• close all• mag=0.3;• for i=1:500• x(i)=0;• v(i)=randn(1,1);• w(i)=x(i)+v(i);• end• for i=501:600• x(i)=mag;• v(i)=randn(1,1);• w(i)=x(i)+v(i);• end• for i=601:1000• x(i)=0;• v(i)=randn(1,1);• w(i)=x(i)+v(i);• end• for i=1:100• h(i)=1;• end• • for j=101:1000• dec(j)=h*w([j-100:j-1])';• end• figure(1)• plot(v);• hold on• plot(x,'r');• • figure(2)• plot(dec);• figure(3)• plot(w,'r');