| Page 1 09.11.2012 Angelo Farina UNIPR | All Rights Reserved | Confidential Digital sound processing Convolution Digital Filters FFT Fast Convolution.

Slides:



Advertisements
Similar presentations
| Page Angelo Farina UNIPR | All Rights Reserved | Confidential Digital sound processing Convolution Digital Filters FFT.
Advertisements

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.
1 Chapter 16 Fourier Analysis with MATLAB Fourier analysis is the process of representing a function in terms of sinusoidal components. It is widely employed.
DFT/FFT and Wavelets ● Additive Synthesis demonstration (wave addition) ● Standard Definitions ● Computing the DFT and FFT ● Sine and cosine wave multiplication.
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 – Chapter 11 Introduction to the Design of Discrete Filters Prof. Yasser Mostafa Kadah
Digital Signal Processing
CEN352, Dr. Ghulam Muhammad King Saud University
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.
Chapter 8: The Discrete Fourier Transform
FFT-based filtering and the Short-Time Fourier Transform (STFT) R.C. Maher ECEN4002/5002 DSP Laboratory Spring 2003.
Intro to Fourier Analysis Definition Analysis of periodic waves Analysis of aperiodic waves Digitization Time-frequency uncertainty.
Sampling, Reconstruction, and Elementary Digital Filters R.C. Maher ECEN4002/5002 DSP Laboratory Spring 2002.
20 October 2003WASPAA New Paltz, NY1 Implementation of real time partitioned convolution on a DSP board Enrico Armelloni, Christian Giottoli, Angelo.
Spectral Analysis Spectral analysis is concerned with the determination of the energy or power spectrum of a continuous-time signal It is assumed that.
CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling.
Systems: Definition Filter
Finite Impuse Response Filters. Filters A filter is a system that processes a signal in some desired fashion. –A continuous-time signal or continuous.
Digital Signals and Systems
Unit III FIR Filter Design
EE513 Audio Signals and Systems Digital Signal Processing (Systems) Kevin D. Donohue Electrical and Computer Engineering University of Kentucky.
Echivalarea sistemelor analogice cu sisteme digitale Prof.dr.ing. Ioan NAFORNITA.
DSP. What is DSP? DSP: Digital Signal Processing---Using a digital process (e.g., a program running on a microprocessor) to modify a digital representation.
Discrete-Time and System (A Review)
LE 460 L Acoustics and Experimental Phonetics L-13
Ni.com Data Analysis: Time and Frequency Domain. ni.com Typical Data Acquisition System.
DTFT And Fourier Transform
1 Chapter 8 The Discrete Fourier Transform 2 Introduction  In Chapters 2 and 3 we discussed the representation of sequences and LTI systems in terms.
GCT731 Fall 2014 Topics in Music Technology - Music Information Retrieval Overview of MIR Systems Audio and Music Representations (Part 1) 1.
Lecture 1 Signals in the Time and Frequency Domains
The Wavelet Tutorial: Part3 The Discrete Wavelet Transform
Dual-Channel FFT Analysis: A Presentation Prepared for Syn-Aud-Con: Test and Measurement Seminars Louisville, KY Aug , 2002.
Chapter 5 Frequency Domain Analysis of Systems. Consider the following CT LTI system: absolutely integrable,Assumption: the impulse response h(t) is absolutely.
Speech Signal Representations I Seminar Speech Recognition 2002 F.R. Verhage.
Zhongguo Liu_Biomedical Engineering_Shandong Univ. Chapter 8 The Discrete Fourier Transform Zhongguo Liu Biomedical Engineering School of Control.
1 Lecture 1: February 20, 2007 Topic: 1. Discrete-Time Signals and Systems.
Real time DSP Professors: Eng. Julian S. Bruno Eng. Jerónimo F. Atencio Sr. Lucio Martinez Garbino.
Digital Signal Processing Chapter 3 Discrete transforms.
Astronomical Data Analysis I
EEE 503 Digital Signal Processing Lecture #2 : EEE 503 Digital Signal Processing Lecture #2 : Discrete-Time Signals & Systems Dr. Panuthat Boonpramuk Department.
ES97H Biomedical Signal Processing
revision Transfer function. Frequency Response
DTFT continue (c.f. Shenoi, 2006)  We have introduced DTFT and showed some of its properties. We will investigate them in more detail by showing the associated.
Lecture 3: The Sampling Process and Aliasing 1. Introduction A digital or sampled-data control system operates on discrete- time rather than continuous-time.
The Discrete Fourier Transform
Topics 1 Specific topics to be covered are: Discrete-time signals Z-transforms Sampling and reconstruction Aliasing and anti-aliasing filters Sampled-data.
Finite Impuse Response Filters. Filters A filter is a system that processes a signal in some desired fashion. –A continuous-time signal or continuous.
بسم الله الرحمن الرحيم Digital Signal Processing Lecture 14 FFT-Radix-2 Decimation in Frequency And Radix -4 Algorithm University of Khartoum Department.
Prof. Brian L. Evans Dept. of Electrical and Computer Engineering The University of Texas at Austin EE445S Real-Time Digital Signal Processing Lab Spring.
Lecture 19 Spectrogram: Spectral Analysis via DFT & DTFT
Chapter 4 Discrete-Time Signals and transform
Spectral Analysis Spectral analysis is concerned with the determination of the energy or power spectrum of a continuous-time signal It is assumed that.
Lab 4 Application of RTOS
FFT-based filtering and the
Sampling and Reconstruction
EE Audio Signals and Systems
The sampling of continuous-time signals is an important topic
Sampling Sampling an electrical signal means capturing its value repeatedly at a constant, very fast rate. Sampling frequency (fs) is defined as the number.
Chapter 8 The Discrete Fourier Transform
Chapter 2 Ideal Sampling and Nyquist Theorem
Finite Wordlength Effects
LECTURE 18: FAST FOURIER TRANSFORM
Chapter 8 The Discrete Fourier Transform
Tania Stathaki 811b LTI Discrete-Time Systems in Transform Domain Ideal Filters Zero Phase Transfer Functions Linear Phase Transfer.
Chapter 8 The Discrete Fourier Transform
Lec.6:Discrete Fourier Transform and Signal Spectrum
Electrical Communication Systems ECE Spring 2019
LECTURE 18: FAST FOURIER TRANSFORM
Electrical Communications Systems ECE
Presentation transcript:

| Page Angelo Farina UNIPR | All Rights Reserved | Confidential Digital sound processing Convolution Digital Filters FFT Fast Convolution

| Page Angelo Farina UNIPR | All Rights Reserved | Confidential Sampling  Sampling an electrical signal means capturing its value repeatedly at a constant, very fast rate.  Sampling frequency (f s ) is defined as the number of samples captured per second  The sampled value is known with finite precision, given by the “number of bits” of the analog-to-digital converter, which is limited (typically ranging between 16 and 24 bits) Of consequence, in a time-amplitude chart, the analog waveform is approximated by a sequence of points, which lye in the knots of a lattice, as both time and amplitude are integer multiplies of small “sampling units” of time and amplitude Of consequence, in a time-amplitude chart, the analog waveform is approximated by a sequence of points, which lye in the knots of a lattice, as both time and amplitude are integer multiplies of small “sampling units” of time and amplitude

| Page Angelo Farina UNIPR | All Rights Reserved | Confidential Time/frequency discretization  VVVV Analog signal (true) Digital signal (sampled)

| Page Angelo Farina UNIPR | All Rights Reserved | Confidential Fidelity of sampled signals Can a sampled digital signal represent faithfully the original analog one? YES, but only if the following “Shannon theorem” is true: “Sampling frequency must be at least twice of the largest frequency in the signal being sampled” A frequency equal to half the sampling frequency is named the “Nyquist frequency”– for avoiding the presence of signals at frequencies higher than the Nyquist’s one, an analog low-pass filter is inserted before the sampler. It is called an “anti Aliasing” filter.

| Page Angelo Farina UNIPR | All Rights Reserved | Confidential Common cases  CD audio – f s = 44.1 kHz – discretization = 16 bit Nyquist frequency is kHz, the anti-aliasing starts at 20 kHz, so that at kHz the signal is already attenuated by at least 80 dB. Hence the filter is very steep, causing a lot of artifacts in time domain (ringing, etc.)  DAT recorder – fs = 48 kHz – discretization = 16 bit Nyquist frequency is 24 kHz, the anti-aliasing starts at 20 kHz, so that at 24 kHz the signal is already attenuated by at least 80 dB. Now the filter is less steep, and the time-domain artifacts are almost gone.  DVD Audio – f s = 96 kHz – discretization = 24 bit Nyquist frequency is 48 kHz, but the anti-aliasing starts around 24 kHz, with a very gentle slope, so that at 48 kHz the signal is attenuated by more than 120 dB.  Such a gentle filter is very “short” in time domain, hence there are virtually no time-domain artifacts.

| Page Angelo Farina UNIPR | All Rights Reserved | Confidential Impulse Response System under test Unit pulse  System’s impulse response Time of flight Direct sound Early reflections Reverberant tail

| Page Angelo Farina UNIPR | All Rights Reserved | Confidential A simple linear system CD player AmplifierLoudspeakerMicrophone Real-world system (one input, one output) Block diagram x(  ) h(  ) y(  ) Input signal System’s Impulse Response (Transfer function) Output signal “SYSTEM” Analyzer

| Page Angelo Farina UNIPR | All Rights Reserved | Confidential FIR Filtering (Finite Impulse Response) The effect of the linear system h on the signal x passing through it is described by the mathematical operation called “convolution”, defined by: This “sum of products” is also called FIR filtering, and models accurately any kind of linear systems. This is usually written, in compact notation, as: “convolution” operator

| Page Angelo Farina UNIPR | All Rights Reserved | Confidential IIR Filtering (Infinite Impulse Response) Alternatively, the filtering caused by a linear system can also be described by the following recursive formula: In practice, the filter is computed not only from the input samples x, but also as a function of the output samples y, obtained at the previous time steps.In practice, the filter is computed not only from the input samples x, but also as a function of the output samples y, obtained at the previous time steps. In many cases, this method allows for representinging faithfully the behaviour of the system with a much smaller number of coefficients than when employing FIR filtering.In many cases, this method allows for representinging faithfully the behaviour of the system with a much smaller number of coefficients than when employing FIR filtering. However, modern algorithms on fast computers make FIR filtering preferable and even fasterHowever, modern algorithms on fast computers make FIR filtering preferable and even faster

| Page Angelo Farina UNIPR | All Rights Reserved | Confidential The FFT Algorithm  The Fast Fourier Transform (FFT) is often employed in Acoustics, with two goals: ► Performing spectral analysis with constant bandwidth ► Fast FIR filtering  FFT transforms a segment of time-domain data in the corresponding spectrum, with constant frequency resolution, starting at 0 Hz (DC) up to Nyquist frequency (which is half of the sampling frequency)  The longer the time segment, the narrower will be the frequency resolution: [N sampled points in time] = > [N/2+1 frequency bands] (the +1 represents the band at frequency 0 Hz, that is the DC component – but in acoustics, this is always with zero energy…)

| Page Angelo Farina UNIPR | All Rights Reserved | Confidential The FFT Algorithm The number of points in the time block must be a power of 2 – for example: 4096, 8192, 16384, etc. Time signal (64 points) FFT Frequency spectrum (32 bands + DC) IFFT The inverse transform is also possible (from frequency to time)

| Page Angelo Farina UNIPR | All Rights Reserved | Confidential Elaborazione numerica del suono Complex spectrum, autospectrum  FFT yields a complex spectrum, at every frequency we get a value made of a real and an imaginary parts (Pr, Pi), or, equivalently, by modulus and phase  In many cases the phase is considered meaningless,and only the magnitude of the spectrum is plotted in dB: The second version of the formula contains the definition of the Autospectrum, that is the product, at every frequency, of the spectral complex number P(f) with its complex conjugate P’(f)The second version of the formula contains the definition of the Autospectrum, that is the product, at every frequency, of the spectral complex number P(f) with its complex conjugate P’(f)

| Page Angelo Farina UNIPR | All Rights Reserved | Confidential Complex spectrum, autospectrum In other cases, also the phase information is relevant, and is charted separately (mainly when the FFT is applied to an impulse response).

| Page Angelo Farina UNIPR | All Rights Reserved | Confidential “leakage” and “windows”  One of the assumptions of Fourier analysis is that the time-segment analysed represents a complete period of a periodic waveform  This is generally UNTRUE: the imperfect connection of the end of a segment with the beginning of the next one (identical, as the signal is assumed to be periodic), causes a “click”, which produces a wide-band “white noise”, contaminating the whole spectrum (“leakage”): Theoretical spectrum Leakage

| Page Angelo Farina UNIPR | All Rights Reserved | Confidential “leakage” and “windows”  If we want to analyze a generic, aperiodic signal, we need to “window” the signal inside the block being analyzed, bringing it to zero at both ends  To this purpose, many differnet types of “windows” are used, named “Hanning”, “Hamming”, “Blackmann”, “Kaizer”, “Bartlett”, “Parzen”, etc.

| Page Angelo Farina UNIPR | All Rights Reserved | Confidential Window overlapping  The problem is that events occurring near the ends of two adjacent blocks are substantially not analyzed  To avoid this loss of information, instead of shifting the analysis window by one whole block, we need to analyze partially-overlapped blocks, with at least 50% overlapping, usually overalpped at 75% or even more Block 1 WindowFFT Block 2 WindowFFT Block 3 WindowFFT

| Page Angelo Farina UNIPR | All Rights Reserved | Confidential 17 Averaging, waterfall, spectrogram  Once a sequence of FFT spectra is obtained, we can average them either exponentially (Fast, Slow) o linearly (Leq), emulating a SLM  Alternatively, we can visualize how the spectrum changes over time, by two graphical representations called “waterfall” and “spectrogram” (or “sonogram”)

| Page Angelo Farina UNIPR | All Rights Reserved | Confidential Convolution is signifcantly faster if performed in frequency domain: Problems The whole lenght of signal must be recorded before being processed The whole lenght of signal must be recorded before being processed if N is large, a lot of memory is required. if N is large, a lot of memory is required. x(n)X(k)FFT X(k)  H(k) Y(k)y(n) IFFT x(n)  h(n) y(n) Solution “Overlap & Save”Algorithm “Overlap & Save”Algorithm Fast FIR filtering with FFT

| Page Angelo Farina UNIPR | All Rights Reserved | Confidential FFT N-point FFT x IFFTXm(k)H(k) Select last N – Q + 1 samples Append to y(n) x m (n) h(n) Convoluzione veloce FFT con Overlap & Save (Oppenheim & Shafer, 1975): Problems Excessive processing latency between input and output Excessive processing latency between input and output If N is large, a lot of memory is still required If N is large, a lot of memory is still required Solution “uniformly-partitioned Overlap & Save” “uniformly-partitioned Overlap & Save” Overlap & Save

| Page Angelo Farina UNIPR | All Rights Reserved | Confidential Filter’s impulse response h(n) is also partitioned in a number of blocks Now latency and memory occupation reduce to the length of one single block 1 st block 2 nd block 3 rd block 4 th block Uniformly Partitioned Overlap & Save