Windowing Purpose: process pieces of a signal and minimize impact to the frequency domain Using a window – First Create the window: Use the window formula.

Slides:



Advertisements
Similar presentations
Design of Digital IIR Filter
Advertisements

Digital filters: Design of FIR filters
All slides © S. J. Luck, except as indicated in the notes sections of individual slides Slides may be used for nonprofit educational purposes if this copyright.
ACHIZITIA IN TIMP REAL A SEMNALELOR. Three frames of a sampled time domain signal. The Fast Fourier Transform (FFT) is the heart of the real-time spectrum.
Nonrecursive Digital Filters
Let’s go back to this problem: We take N samples of a sinusoid (or a complex exponential) and we want to estimate its amplitude and frequency by the FFT.
Hossein Sameti Department of Computer Engineering Sharif University of Technology.
Filtering Filtering is one of the most widely used complex signal processing operations The system implementing this operation is called a filter A filter.
So far We have introduced the Z transform
Digital Signal Processing
Ideal Filters One of the reasons why we design a filter is to remove disturbances Filter SIGNAL NOISE We discriminate between signal and noise in terms.
LINEAR-PHASE FIR FILTERS DESIGN
6/9/2015Digital Image Processing1. 2 Example Histogram.
Chapter 8 FIR Filter Design
Lecture 17 spectral analysis and power spectra. Part 1 What does a filter do to the spectrum of a time series?
Pulse Code Modulation (PCM ) We measure the amplitude of a signal at points in time and store them in an array. – Usually 2 bytes per sample big or little.
FILTERING GG313 Lecture 27 December 1, A FILTER is a device or function that allows certain material to pass through it while not others. In electronics.
AGC DSP AGC DSP Professor A G Constantinides 1 Digital Filter Specifications Only the magnitude approximation problem Four basic types of ideal filters.
Signal: sin(2 π * 3f s ) Three periods per sampling time period –When f=3, DFT correlation squares each value; result >0 –Result is N/2 times the time.
Introduction to Spectral Estimation
Lecture 9 FIR and IIR Filter design using Matlab
1 Lecture 2: February 27, 2007 Topics: 2. Linear Phase FIR Digital Filter. Introduction 3. Linear-Phase FIR Digital Filter Design: Window (Windowing)
Image Processing1 Image Filtering Filtering can be use to enhance some features and de- enhance others. Usually used as a pre-processing step.
Practical Signal Processing Concepts and Algorithms using MATLAB
Vibrationdata 1 Unit 19 Digital Filtering (plus some seismology)
GG 313 Lecture 26 11/29/05 Sampling Theorem Transfer Functions.
Time-Domain Methods for Speech Processing 虞台文. Contents Introduction Time-Dependent Processing of Speech Short-Time Energy and Average Magnitude Short-Time.
Signal Filters Purposes Separate Signals Eliminate interference distortions Remove unwanted data Restore to its original form (after transmission) Model.
Interpolation and Pulse Shaping
1 BIEN425 – Lecture 10 By the end of the lecture, you should be able to: –Describe the reason and remedy of DFT leakage –Design and implement FIR filters.
Speech Signal Representations I Seminar Speech Recognition 2002 F.R. Verhage.
Professor A G Constantinides 1 The Fourier Transform & the DFT Fourier transform Take N samples of from 0 to.(N-1)T Can be estimated from these? Estimate.
Systems (filters) Non-periodic signal has continuous spectrum Sampling in one domain implies periodicity in another domain time frequency Periodic sampled.
Technion, CS department, SIPC Spring 2014 Tutorials 12,13 discrete signals and systems 1/39.
Chapter 6 Spectrum Estimation § 6.1 Time and Frequency Domain Analysis § 6.2 Fourier Transform in Discrete Form § 6.3 Spectrum Estimator § 6.4 Practical.
Extends Euclidean space algebra to higher dimensions
11/22/20151 Digital Filters. 11/22/20152 Time domain to Frequency Domain and vice versa Filter Characteristics.
Original signal Median of seven Moving average Non-Linear Filter Median of five or seven.
Chapter 7 Finite Impulse Response(FIR) Filter Design
Chapter 3 Time Domain Analysis of Speech Signal. 3.1 Short-time windowing signal (1) Three types windows : –Rectangular window –h r [n] = u[n] – u[n –
Lecture#10 Spectrum Estimation
Chapter 7. Filter Design Techniques
Summary of Widowed Fourier Series Method for Calculating FIR Filter Coefficients Step 1: Specify ‘ideal’ or desired frequency response of filter Step 2:
By Sarita Jondhale 1 Signal preprocessor: “conditions” the speech signal s(n) to new form which is more suitable for the analysis Postprocessor: operate.
The IIR FILTERs These are highly sensitive to coefficients,
: Chapter 5: Image Filtering 1 Montri Karnjanadecha ac.th/~montri Image Processing.
DISP 2003 Lecture 5 – Part 1 Digital Filters 1 Frequency Response Difference Equations FIR versus IIR FIR Filters Properties and Design Philippe Baudrenghien,
Coherence spectrum (coherency squared)  = 0.1, 0.05, 0.01 X is the Fourier Transform Cross-spectral power density Confidence level: = running mean or.
Learning from the Past, Looking to the Future James R. (Jim) Beaty, PhD - NASA Langley Research Center Vehicle Analysis Branch, Systems Analysis & Concepts.
Professor A G Constantinides 1 Digital Filter Specifications We discuss in this course only the magnitude approximation problem There are four basic types.
Chapter 4 Discrete-Time Signals and transform
Lecture 14 Outline: Windowing in FIR Filter Design
(plus some seismology)
CS 591 S1 – Computational Audio
FIR Filter Design Using Neural Network
Spectral Analysis Spectral analysis is concerned with the determination of the energy or power spectrum of a continuous-time signal It is assumed that.
Fourier Analysis of Signals Using DFT
LINEAR-PHASE FIR FILTERS DESIGN
Filter Design by Windowing
Lecture 13 Outline: Windowing in FIR Filter Design
Ideal Filters One of the reasons why we design a filter is to remove disturbances Filter SIGNAL NOISE We discriminate between signal and noise in terms.
Quiz: Fast Fourier Transforms (FFTs) and Windowing TIPL 4302 TI Precision Labs – ADCs Created by Art Kay.
Interpolation and Pulse Shaping
Digital Image Processing Week IV
Coherence spectrum (coherency squared)
(plus some seismology)
Chapter 7 Finite Impulse Response(FIR) Filter Design
INTRODUCTION TO THE SHORT-TIME FOURIER TRANSFORM (STFT)
Chapter 7 Finite Impulse Response(FIR) Filter Design
Presentation transcript:

Windowing Purpose: process pieces of a signal and minimize impact to the frequency domain Using a window – First Create the window: Use the window formula to calculate an array of window values – Next apply the window: multiply these values by each time domain amplitude in a frame Window Length: The number of signal values in a frame is the window length

Example: Hamming Window Create Window double[] window = new double[windowSize]; double c = 2*Math.PI / (windowSize - 1); for (int h=0; h<windowSize; h++) window[h] = *Math.cos(c*h); Apply window for(int i=0; i<window.length; i++) frame[i]=frame[i]*window[i]; Note: Time domain multiplication is frequency domain convolution. Therefore, windows act as a frequency domain filter.

Windowing Frequency Response Main Lobe: Narrow implies better frequency resolution. As the window length grows, the main lobe width narrows (less initial spectral leakage). Side lobe: Higher for abrupt time domain window transitions from 1 to 0. Roll-off rate: Slower for abrupt window discontinuities. Main Lobe Side Lobe Roll-off Rate Spectral Leakage: Some of the spectral energy leaks into other frequency bins, which blur frequency distinctions. Note: some windows act as a amplifier of total energy

Rectangular Frequency Response Fourier transform of r(x): R(f) = ∫ ∞,∞ r(x) e -2πxfi dt r(x) is zero outside ±T/2: R(f) = ∫ -T/2, T/2 1. e -2πfti dt Chain Rule: The integral of e -2πfti is e -2πfti /(-2πfi) R(f) = e -2πfti /(-2πfti) | T/2,-T/2 = e -2πfT/2i /(-2πfi) - e -2πf(-T/2)i /(-2πfi) By Eulers formula: R(f) = (e πfTi - e -πfTi )/(2πfi) = sin(πfT)/(πfT)

Rectangular Window Main lobe width: 4π/M, Side lobe width: 2 π /M Minimal leakage, but directed to places that hurt analysis Poor roll off and high initial lobe

Convoluting Rectangular Window with a particular frequency Note: Windows with more points narrow the central lobe

Triangular (Bartlett Window)

Compare: Hamming to Hanning HanningHamming Hanning: Faster roll of; Hamming: lower first lobe

Evaluation: Non-Rectangular Greater total leakage, but redistributed to places where analysis is not affected. If little energy spills outside the main lobe, it is harder to resolve frequencies that are near to each other. Fast roll-off implies wide initial lobe and higher side lobe; worse at detecting weak sinusoids amidst noise. Moderate roll-off, implies narrower initial lobe and lower side lobe. Tradeoff: Resolving comparable strength signals with similar frequencies (moderate) and resolving disparate strength signals with dissimilar frequencies (fast roll-off).

Windowing Formulae Hanning: w[n] = cos(2πn/(N-1)) Hamming: w[n] = 0.54 – 0.45 cos(2πn/(N-1)) Bartlett: w[n] = 2/(N-1). (N-1)/2 - |(n–(N-1)/2|) Triangle: w[n] = 2/N. (N/2 - |(n–(N-1)/2|) Blackman: w[n ] = a 0 – a 1 cos(2πn/(N-1)) – a 2 cos(4πn/(N-1)) where: a 0 = (1-α)/2 ; a 1 = ½ ; a 2 = α /2; α =0.16 Blackman-Harris: w[n] = a 0 –a 1 cos(2πn/(N-1))–a 2 cos(4πn/(N-1)) - a 3 cos(6πn/(N-1)) where: a 0 = ; a 1 = ; a 2 = ; a 3 = Note: Small formula changes can cause large frequency response differences

Moving Average Filters Both filters can be used to smooth a signal and reduce noise It curves sharp angles in the time domain. It overreacts to outlier samples Slow roll-off destroys ability to separate frequency bands Horrible stop band attenuation Evaluation – An exceptionally good smoothing filter – An exceptionally bad low-pass filter

Moving Average Filter FIR version: Y n = 1/M ∑ i=0, M-1 x n-I Slower than the IIR version IIR version: y n = y n-1 + (x n – x n-M )/M Propagates rounding errors Example: {1,2,3,4,5,4,3,2,1,2,3,4,5}; M = 4 – Starting filtered values: {¼, ¾, 1 ½, 2 ½, … } – Next value using the FIR version: Y 4 = ¼( ) = 3 ½ – Next value using the IIR version: y 4 = 2 ½ + (5 – 1)/4 = 3 ½ – Not appropriate for speech because: – Blurs transitions between voiced/unvoiced sounds – Negatively impacts the frequency domain

Median Filter

Median definition: – The middle value of an ordered list – If there is no middle value, average the two middle values Median filter: Y n = median m=0,M-1 {x n-m } Advantages – Good edge preserving properties – Preserves sharp discontinuities of significant length – Eliminates outliers Applications – The most effective algorithm to removes sudden impulse noise – Remove outliers in estimates of a pitch contour Implementation: Requires maintaining a running sorted list

Characteristics: Median Filter Linearity tests  Fails: a n * M n + b n * M n ≠ (an + bn) * M n  Succeeds: α (a n )*M n = (α a n )*M n  Succeeds: A n * M n = b n, then A n+k * M n+k = b n+k Every output will match an input (if the filter length is odd) Frequency response There is not a mathematic formula Must be determined experimentally

Double Smoothing 1.Apply a median filter (ex:five point) and then a 2.Apply a linear filter (Ex: Hanning with values 0, ¼, ½, ¼, 0) 3.Recursively apply steps 1 and 2 to the filtered signal 4.Add the result of the recursive application back Single Smoothing Double Smoothing

Compare Median to Moving Average Filter