# DCSP-21 Jianfeng Feng Department of Computer Science Warwick Univ., UK

## Presentation on theme: "DCSP-21 Jianfeng Feng Department of Computer Science Warwick Univ., UK"— Presentation transcript:

DCSP-21 Jianfeng Feng Department of Computer Science Warwick Univ., UK Jianfeng.feng@warwick.ac.uk

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 Processes Random 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) r xx (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 Filter Assume 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)

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');

Download ppt "DCSP-21 Jianfeng Feng Department of Computer Science Warwick Univ., UK"

Similar presentations