DCSP-15: Matched Filter Jianfeng Feng Department of Computer Science Warwick Univ., UK

Slides:



Advertisements
Similar presentations
TARGET DETECTION AND TRACKING IN A WIRELESS SENSOR NETWORK Clement Kam, William Hodgkiss, Dept. of Electrical and Computer Engineering, University of California,
Advertisements

DCSP-17 Jianfeng Feng Department of Computer Science Warwick Univ., UK
DCSP-14 Jianfeng Feng Department of Computer Science Warwick Univ., UK
DCSP-17: Matched Filter Jianfeng Feng Department of Computer Science Warwick Univ., UK
DCSP-21 Jianfeng Feng Department of Computer Science Warwick Univ., UK
DCSP-20 Jianfeng Feng Department of Computer Science Warwick Univ., UK
DCSP-22 Jianfeng Feng Department of Computer Science Warwick Univ., UK
DCSP-12 Jianfeng Feng Department of Computer Science Warwick Univ., UK
DCSP-16 Jianfeng Feng Department of Computer Science Warwick Univ., UK
ECE 8443 – Pattern Recognition ECE 8423 – Adaptive Signal Processing Objectives: The Linear Prediction Model The Autocorrelation Method Levinson and Durbin.
Digital Image Processing
Spatial Filtering (Chapter 3)
Image Processing Lecture 4
Digital Signal Processing IIR Filter IIR Filter Design by Approximation of Derivatives Analogue filters having rational transfer function H(s) can be.
Image processing (spatial &frequency domain) Image processing (spatial &frequency domain) College of Science Computer Science Department
Integration of sensory modalities
STAT 497 APPLIED TIME SERIES ANALYSIS
ECE 8443 – Pattern Recognition ECE 8423 – Adaptive Signal Processing Objectives: Newton’s Method Application to LMS Recursive Least Squares Exponentially-Weighted.
Presenter: Yufan Liu November 17th,
DCSP-15 Jianfeng Feng Department of Computer Science Warwick Univ., UK
The Simple Linear Regression Model: Specification and Estimation
Single-Channel Speech Enhancement in Both White and Colored Noise Xin Lei Xiao Li Han Yan June 5, 2002.
Estimation and the Kalman Filter David Johnson. The Mean of a Discrete Distribution “I have more legs than average”
Course AE4-T40 Lecture 5: Control Apllication
Kalman Filtering Pieter Abbeel UC Berkeley EECS Many slides adapted from Thrun, Burgard and Fox, Probabilistic Robotics TexPoint fonts used in EMF. Read.
ECE 8443 – Pattern Recognition ECE 8423 – Adaptive Signal Processing Objectives: Adaptive Noise Cancellation ANC W/O External Reference Adaptive Line Enhancement.
1 Formation et Analyse d’Images Session 7 Daniela Hall 7 November 2005.
Random Processes and LSI Systems What happedns when a random signal is processed by an LSI system? This is illustrated below, where x(n) and y(n) are random.
Kalman filter and SLAM problem
Introduction to estimation theory Seoul Nat’l Univ.
David Wheeler Kyle Ingersoll EcEn 670 December 5, 2013 A Comparison between Analytical and Simulated Results The Kalman Filter: A Study of Covariances.
Computer Vision Group Prof. Daniel Cremers Autonomous Navigation for Flying Robots Lecture 6.2: Kalman Filter Jürgen Sturm Technische Universität München.
Time Series Data Analysis - I Yaji Sripada. Dept. of Computing Science, University of Aberdeen2 In this lecture you learn What are Time Series? How to.
ECE 8443 – Pattern Recognition ECE 8423 – Adaptive Signal Processing Objectives: Deterministic vs. Random Maximum A Posteriori Maximum Likelihood Minimum.
ECE 8443 – Pattern Recognition ECE 8423 – Adaptive Signal Processing Objectives: Conjugate Priors Multinomial Gaussian MAP Variance Estimation Example.
University of Colorado Boulder ASEN 5070: Statistical Orbit Determination I Fall 2014 Professor Brandon A. Jones Lecture 18: Minimum Variance Estimator.
Adv DSP Spring-2015 Lecture#9 Optimum Filters (Ch:7) Wiener Filters.
Chapter 6. Effect of Noise on Analog Communication Systems
ECE 5525 Osama Saraireh Fall 2005 Dr. Veton Kepuska
EE513 Audio Signals and Systems
The Simple Linear Regression Model: Specification and Estimation ECON 4550 Econometrics Memorial University of Newfoundland Adapted from Vera Tabakova’s.
Robotics Research Laboratory 1 Chapter 7 Multivariable and Optimal Control.
Chapter 11 Filter Design 11.1 Introduction 11.2 Lowpass Filters
1 Conditions for Distortionless Transmission Transmission is said to be distortion less if the input and output have identical wave shapes within a multiplicative.
Dept. E.E./ESAT-STADIUS, KU Leuven
An Introduction To The Kalman Filter By, Santhosh Kumar.
Machine Learning 5. Parametric Methods.
Discrete-time Random Signals
Lecture 3: MLE, Bayes Learning, and Maximum Entropy
Page 0 of 7 Particle filter - IFC Implementation Particle filter – IFC implementation: Accept file (one frame at a time) Initial processing** Compute autocorrelations,
: Chapter 5: Image Filtering 1 Montri Karnjanadecha ac.th/~montri Image Processing.
Geology 6600/7600 Signal Analysis 26 Oct 2015 © A.R. Lowry 2015 Last time: Wiener Filtering Digital Wiener Filtering seeks to design a filter h for a linear.
DSP-CIS Part-III : Optimal & Adaptive Filters Chapter-9 : Kalman Filters Marc Moonen Dept. E.E./ESAT-STADIUS, KU Leuven
Digital Signal Processing
STATISTICAL ORBIT DETERMINATION Kalman (sequential) filter
STATISTICAL ORBIT DETERMINATION Coordinate Systems and Time Kalman Filtering ASEN 5070 LECTURE 21 10/16/09.
ASEN 5070: Statistical Orbit Determination I Fall 2014
Sampling rate conversion by a rational factor
Lecture 11 Image restoration and reconstruction II
Department of Computer Science Warwick Univ., UK
Probabilistic Robotics
Department of Computer Science Warwick Univ., UK
The Simple Linear Regression Model: Specification and Estimation
Integration of sensory modalities
CONTEXT DEPENDENT CLASSIFICATION
Tania Stathaki 811b LTI Discrete-Time Systems in Transform Domain Ideal Filters Zero Phase Transfer Functions Linear Phase Transfer.
Mathematical Foundations of BME Reza Shadmehr
Lecture 4 Image Enhancement in Frequency Domain
Kalman Filter: Bayes Interpretation
Presentation transcript:

DCSP-15: Matched Filter Jianfeng Feng Department of Computer Science Warwick Univ., UK

Filters Stop or allow to pass for certain signals

There are four main classes of filter in widespread use: filters. The name are self-explanatory This four types are shown in the next figure Filter Types Lowpass highpass bandpass bandstop

Filter Types: TFs

General Filter Design Using Chebyshev or Butterworth polynomials to approximate a square wave function in the frequency domain Any function can be approximated by a polynomials. Optimal filter design aims to minimize these ripples We are not discussing them here in details, but the principle is the same as our simple filter Ideal case Polynomial approximation

Filters Stop or allow to pass for certain signals as we have talked before Detect certain signals such as radar etc (pattern recognitions)

Ex: Detect it when it comes close

Matched filters: Question Assume that we can detect S = (s 1, s 2, s 3, s 4, s 5 s 6 ) To find a i y(0) = a 0 x(0)+ a 1 x(-1)+a 2 x(- 2) + a 3 x(-3) + a 4 x(-4) +a 5 x(-5) so that we can find S, more precisely Y(0) = a 0 s 6 + a 1 s 5 + a 2 s 4 + a 3 s 3 + a 4 s 2 + a 5 s 1

At time -5 we have x(-5) = S 1 =1 (length ) detector Y(-5) = a a 1 x(-6) + a 2 x(-7) + a 3 x(-8) + a 4 x(-9) + a 5 x(-10)

At time -4 we have x(-4) = S 2 = 2 (length ) detector Y(-5) = a a 1 x(-6) + a 2 x(-7) + a 3 x(-8) + a 4 x(-9) + a 5 x(-10) Y(-4) = a a a 2 x(-6) + a 3 x(-7) + a 4 x(-8) + a 5 x(-9)

At time -3 we have x(-3) = S 3 = 3 (length ) detector Y(-5) = a a 1 x(-6) + a 2 x(-7) + a 3 x(-8) + a 4 x(-9) + a 5 x(-10) Y(-4) = a a a 2 x(-6) + a 3 x(-7) + a 4 x(-8) + a 5 x(-9) Y(-3) = a a a a 3 x(-4) + a 4 x(-5) + a 5 x(-6)

At time -2 we have x(-2) = S 4 = 4 (length ) detector

At time -1 we have x(-1) = S 5 = 8 (length ) detector

At time 0 we have x(0) = S 6 = 6 (length ) detector

Signal The input signal is S = (s 1, s 2, s 3, s 4, s 5, s 6 ) = ( 1, 2, 3, 4, 8, 6)

Matched filters: Question To find a i y(0) = a a 1 8 +a 2 4 +a a 4 2 +a 5 1 to detect that S = (s 1, s 2, s 3, s 4, s 5 s 6 ) is here

Matched filters: visulization a 0 x(0) + a 1 x(-1) + a 2 x(- 2) + a 3 x(-3) + a 4 x(-4) + a 5 x(-5) = y(0) Matched Matched !!!! incoming signals is matched by the coefficients a 5

Data requirement Without loss of generality, we can assume that (normalized signals) and we can assume that (normalized coefficients)

Remember that If and only if a i = s N-I for all I which essentially says that the coefficients a and the incoming signal s are identical ( matched, a i = s N-i ). Or equivalently a 0 S N + a 1 S N-1 + …. + a N-1 S 1 = 1 if and only if a i = s N-I for all i a 0 S N + a 1 S N-1 + …. + a N-1 S 1 < 1 otherwise Ideas

Define a i = s N-i (reversing the order) y(n) = a 0 x(n) + a 1 x(n-1) + … + a N x(n-N) So when the signal arrives we have y(n) = S N x(n) + S N-1 x(n-1) + … + S 1 x(n-N) = S N S N + S N-1 S N-1 + … + S 1 S 1 Matched filter

At time -5 we have y(-5) =0.0877* = Y(-5) = a 0 x(-5)+a 1 x(-6) +… detector S= ( ) a = ( ) x=( s )

Y(-4) = a 0 x(-4)+a 1 x(-5)+a 2 x(-6)+…= detector S= ( ) a = ( ) s 2 s

At time -3 we have Y(-3) = a 0 x(-3)+a 1 x(-4)+a 2 x(-5)+a 3 x(-6)…= detector S= ( ) a = ( ) s 3 s 2 s

At time -2 we have Y(-2) = a 0 x(-2) +a 1 x(-3) +a 2 x(-4) +a 3 x(-5)+a 4 x(-6)…= detector S= ( ) a = ( ) s 4 s 3 s 2 s 1 0 0

At time -1 we have y(-1) = a 0 x(-1)+a 1 x(-2)+a 2 x(-3)+a 3 x(-4)+a 4 x(-5)… detector S= ( ) a = ( ) s 5 s 4 s 3 s 2 s 1 0

detector S= ( ) a = ( ) s 6 s 5 s 4 s 3 s 2 s 1 At time 0 we have Y(0) = a 0 x(0) + a 1 x(-1) + a 2 x(-2) + a 3 x(-3) + a 4 x(-4) + a 5 x(-5) + a 6 x(-6) = 1

detector S= ( ) a = ( ) 0 s 6 s 5 s 4 s 3 s 2 s 1 At time 1 we have y(1) = a 0 x(1) + a 1 x(0) + a 2 x(-1) + a 3 x(-2) + a 4 x(-3) + a 5 x(-4) + a 6 x(-5) =

Matched Filter Outcome

Matlab Demo Matched-filter- demo It is a simple idea, but useful A bit theory first

Auto-correlation function Auto-correlation Function

Detection theory A means to quantify the ability to discern between information-bearing patterns and noise Patterns: stimulus in human, signal in machines Noise: random patterns that distract from the information

Can it be useful? Any signal here?

Filter output

s=rand(1,100); s=s/sqrt(s*s'); a=s; k=100; N=100*k; sigma=0.2; x=randn(1,N)*sigma; signal=zeros(1,N); for i=3*N/k+1:N*4/k x(i)=a(i-3*N/k)+x(i); signal(i)=a(i-3*N/k); end for i=1:N*(k-1)/k c(i)=x([i:i+N/k-1])*s'; end figure(1) plot(x); hold on plot(signal,'r'); figure(2) plot(c)

Matched filter The result is amazing It depends on SNR We will not go into details, but you might be able to investigate it using Matlab

RGB = imread(‘bush.png'); I = rgb2gray(RGB); J = imnoise(I,'gaussian',0, 0.005); K = wiener2(J,[5 5]); figure, imshow(J), figure, imshow(K) Tomorrow

DCSP-16: Wiener Filter and Kalman Filter* Jianfeng Feng Department of Computer Science Warwick Univ., UK

Father of cybernetics Norbert Wiener: Harvard awarded Wiener a PhD, when he was 17.

The RGB format stores three color values, R, G and B, for each pixel. RGB = imread(‘bush.png'); size(RGB) ans = imshow(RGB) Example

Setup Recorded signal x(n,m) = s(n,m) +  (n,m) for example, an image of 1500 X1200 True Signal noise

RGB = imread(‘bush.png'); I = rgb2gray(RGB); J = imnoise(I,'gaussian',0,0.0 05); figure, imshow(I), figure, imshow(J) Setup

To find a constant a(m,n) such that E ( a(m,n) x(m,n) – s(m,n) ) 2 as small as possible y(m,n) = a(m,n) x(m,n) Different from the filter before, a(m,n) depends on (m,n) : Adaptive filter Setup

The quanttity above is minimized if the derivative of it with respect to a is zero Setup (optimal Wiener gain)

Without loss of generality, we assume that Es=0 E  =0 for simplicity of formulation. S,  are independent Setup

The filtered output is given by Note that the coefficient a depends on the position  is the local variance, E  2 is the global variance (noise) Algorithm

where summation is over an area of N and M 3X 3 area (N=3, M=3) Algorithm

Algorithm in Matlab wiener2 lowpass - filters an intensity image that has been degraded by constant power additive noise. wiener2 uses a pixelwise adaptive Wiener method based on statistics estimated from a local neighborhood of each pixel.

RGB = imread(‘bush.png'); I = rgb2gray(RGB); J = imnoise(I,'gaussian',0, 0.005); K = wiener2(J,[5 5]); figure, imshow(J), figure, imshow(K) Example

Large M and N reduce noise, but blur the photo small M and N will not affect noise optimal size should be used Further issues N=M=50 N=M=2

A more general version of Wiener: Kalman filter Kaman filter is widely used in many areas (still a very hot research topic) As an introductory course, we only give you a taste of its flavour Further issues

Kalman Filter: find out x k Have two variables state variable x which is not observable x k = F k x k-1 + B k u k + w k Observable variable z which we can observe, but is contaminated by noise z k = H k x k +v k where w k ~ N(0,Q k ) and v k ~ N(0,R k ) are noise, F k and H k are constants. X k-1 Input u k BkBk Output x k

Kalman Filter For given x k-1|k-1 and p K-1|K-1 Predict Predicted (a priori) state estimate x k|k-1 = F k-1 x k-1|k-1 +B k u k Predicted (a priori) estimate covariance p k|k-1 = F k-1 p k-1 |k-1 F K-1 +Q K Update measurement residual y k = z k –H k X k|k-1 measurement residual covariance S k = H k P k|k-1 H K +R k optimal Kalman gainK k = P k|k-1 H k (S K ) -1 updated (a posteriori) state estimate X k|k = x k|k-1 + K k y k updated (a posteriori) estimate covariance p K|K = (I-K k H k ) P k|k-1

Kalman Filter It is one of the most useful filters in the literature, as shown below We do not have time to go further, but do read around clear all close all N=1000; q=1; r=1; f=0.1; h=0.2; x(1)=0.5; xsignal(1)=0.5; xhat=zeros(1,N+1); phat=zeros(1,N+1); xhat(1)=x(1); phat(1)=x(1); p(1)=1; z(1)=0.1; y(1)=1; for i=1:N xsignal(i+1)=f*xsignal(i)+randn(1,1)*sqrt(q)+1*cos(2*pi*0.01*i); z(i+1)=h*xsignal(i)+randn(1,1)*sqrt(r); end for i=1:N x(i+1)=f*xhat(i)+1*cos(2*pi*0.01*i); p(i+1)=f*phat(i)*f+q; y(i+1)=z(i+1)-h*x(i+1); s(i+1)=h*p(i+1)*h+r; k(i+1)=p(i+1)*h/s(i+1); atemp=x(i+1)+k*y(i+1); xhat(1,i+1)=atemp(1,i+1); atemp=(1-k*h)*p(i+1); phat(i+1)=atemp(1,i+1); clear atemp end plot(xsignal); hold on plot(xhat,'r') plot(z,'g') plot(xhat,'r')

Applications Attitude and Heading Reference Systems Autopilot Battery state of charge (SoC) estimation [1][2] Brain-computer interface Chaotic signals Tracking and Vertex Fitting of charged particles in Particle Detectors [35] Tracking of objects in computer vision Dynamic positioning Economics, in particular macroeconomics, time series, and econometrics Inertial guidance system Orbit Determination Power system state estimation Radar tracker Satellite navigation systems Seismology [3] Sensorless control of AC motor variable-frequency drives Simultaneous localization and mapping Speech enhancement Weather forecasting Navigation system 3D modeling Structural health monitoring Human sensorimotor processing[36] Flight control unit of an Airbus A340 modern weather forecasting.

Final slide Information theory FT (continuous, discrete, discrete +finite) Filters (band related filters, matched, Wiener + Kalman) No lectures next week, but drop me a line if you need help for your assignment