Signal Processing An Introduction Magnus Danielsen 5 5-5...3.4.5.6.7-5...3.4.5.6.7.5.5...3.4.5.6.7 5...3.4.5.6.7 5-5...3.4.5.6.7-5...3.4.5.6.7 NVDRit 7:3
Heiti / Title Signal Processing An Introduction Høvundar / Authors Magnus Danielsen Ritslag / Report Type Undirvísingartilfar/Teaching Material NVDRit 7:3 Náttúruvísindadeildin og høvundurin ISSN 6-974 Útgevari / Publisher Náttúruvísindadeildin, Fróðskaparsetur Føroya Bústaður / Address Nóatún 3, FO Tórshavn, Føroyar (Faroe Islands) Postrúm / P.O. box 9, FO 65 Argir, Føroyar (Faroe Islands) @ 98 3555 98 3555 nvd@setur.fo
Abstract: English Signal Processing An Introduction Fundamentals of signal processing and analysis is treated on the base of Fourier representations, Laplace transformation, and z-transformation. Continuous and discrete Fourier representations are defined, and treated in depth with emphasis on illustrating the connection, similarities and non-similarities between the four Fourier representations of ) discrete time periodic, ) continuous time periodic, 3) discrete time non-periodic, and 4) continuous time non-periodic signals. Discrete Fourier transform is introduced, and the fast Fourier transform algorithms are defined and illustrated. The Laplace transform and the z- transform are defined and treated in the light of being a kind of generalization of the continuous and discrete Fourier transformations respectively. On the base of the signal representations a number of applications are dealt with. Sampling and reconstruction of signals, frequency analysis, fundamental analogue and digital filter constructions are treated, and a number of specific application examples are lined out. Føroyskt: Signalfrøði Ein inngangur Grundleggjandi signalfrøði viðgerð og greining er gjøgnumgingin við støði í Fourier røðum og transformum, Laplace-, og z-transformum. Fourier røð og transformatiónir eru lýst og viðgjørd við denti á sambandinum, líkheitini og ólíkheitini millum tær fýra Fourier umboðanirnar: ) diskret tíð periodisk, ) kontinuert tíð ikki periodisk, 3) diskret tíð periodisk, og 4) kontinuert tíð ikki periodisk signal. Diskret Fourier transform er tikið upp, og Fast Fourier Transform algoritmur eru lýstar. Laplace transform and the z-transform hættirnir eru lýstir og viðgjørdir í ljósinum av at vera eitt slag av algilding av kontinuertum og diskretum Fourier transformatiónum og røðum. Við støði í hesum signal umboðanunum eru nýtslur av hesum hættum tiknar upp. Sampling og endurskapan av signalum er viðgjørd, frekvensgreining, grundleggjandi analog and digital filtur eru viðgjørd, umframt ein røð av serstøkum nýtsluendamálum eru greinað.
Contents: Introduction. Introduction to course. Elementary signals and basic operations Linear time-invariant systems. Linear time invariant systems and convolution. Properties of impulse response of a linear system.3 Sinusoidal response, diff. equations, and block diagrams 3 Continuous and discrete time Fourier representation of periodic and non-periodic signals 3. Fourier representations of signals 3. Discrete time (DTFS) and continuous time (FS) Fourier series 3.3 Discrete time non periodic signals 3.4 Continuous time nonperiodic signals 3.5 Basic properties of Fourier Representations () 3.6 Basic properties of Fourier Representations () 3.7 Fundamental Operations and System Properties of Fourier Representations 3.8 Technical Applications of Fourier Representations 4 Sampling and reconstruction of signals 4. Sampling of signals 4. Aliasing and reconstruction of sampled signals 5 Discrete Fourier Transform and Fast Fourier Transform 5. Discrete Fourier Transform (DTF) for numerical evaluation 5. Fast Fourier Transform (FFT) an efficient algorithm for numerical evaluation of DFT 6 Laplace Transform representation og signals 6. Laplace transform principles 6. The Laplace transform transfer functions 7 Z-transform representation of signals 7. Digital filters overview, and z-transforms 7. The z-transform and its properties 7.3 The z-transform transfer functions 7.4 The z-transform transfer functions. Frequency response and block diagrammes 8 Analogue and Digital Filters 8. Analogue filters 8. Analogue Butterworth filters 8.3 Analogue Chebyshev filters and frequency transformations of filters 8.4 Analogue filters practical constructions 8.5 Digital FIR filter 8.6 Digital IIR filter Low-pass, and high-pass filters 8.7 Digital IIR filter Bandpass, and bandstop filters 9 Applications of signal processing in systems some examples 9. Acoustic spectrogramme example 9. Delays in systems 9.3 Seismic example
Signal Processing Part. Introduction to Course Magnus Danielsen
Textbooks incl. Supplementary Books S.Haykin. B.V.Veen: Signal and systems, John Wiley and Sons, ISBN:-47-38-7 (Course book) M.Danielsen: Phase delay and group delay NVDRit 7:, (Course note) J.W. Nilsson, S.A. Riedel: Electric Circuits, 7th Edition, (background knowledge) H. Baher. Analog and Digital Signal Processing, nd Edition, John Wiley and Sons, ISBN: 47-6354-7 (supplementary) P.A. Lynn, W. Fuerst, Introductory Digital Signal Processing, nd Edition John Wiley and Sons, ISBN: -47-9763-8 (supplementary) E.W.Kamen, B.S.Heck: Fundamentals of Signals and Systems, Prentice Hall, nd Edition, ISBN -3-793-6 (supplementary) J.H.McClellan, Signal Processing First, ISBN -3-65- (supplementary) J.G.Proakis, D.G.Manolakis, Digital Signal Processing, Prentice Hall, ISBN -3-37376-4 (Advanced for electronics) B.Burrkus, Spectral and Filter Theory, Springer, ISBN 3-54- 6674-3 (Advanced for geophysics)
Contents of Course () Introduction basic signals and operations application examples Time-domain linear time invariant systems Energy signals and power signals Fourier transforms: Discrete time periodic signals DTFS Continuous time periodic signals CTFS = FS Discrete time non-periodic signals DTFT Continous time non-periodic signals CTFT = FT Discrete Fourier transform and Fast fourier transform DFT & FFT Convolution/deconvolution Sampling and reconstruction of signals
Contents of Course () Laplace transform and its relations to Fourier transforms Z-transform and its relations to Laplace transform and Fourier transforms Analogue Filters Digital FIR filters Digital IIR filters Equalizers Application examples: Seismic geophone signal Communication modulation wave forms Speech signal spectrograms Control feedback system MATLAB as signal processing tool
Types of Signals - Phenomenologically: Analogue signals Function f(t) Continous magnitude range Continous argument t Discrete signals Function f(t)=f(nt) or f(n) Continuous magnitude range Discrete argument t=nt or n (n is an integer) Digital signals Function f(t) or f(n) Discrete magnitude range Discrete argument t=nt or n (n is an integer)
Types of Signals Physically: Sound Speech (- Hz) Music (- Hz) Telephone(3-34 Hz) Seismics (- Hz) Ultra sound (- khz ) Light Communications (glass fibres) Infrared temp.measurements Electrical current and voltage Sea-waves and -currents Communications systems (data, speech, pictures) Internet & Email Radiowaves Radar Broadcasting (sound, pictures) Communication Biological signals ECG (hearth signals) EEG (brain signals) Blood pressure Temperature Weather Temperature Moisture Windspeed and direction Visual signals Television Computer display Statistics World market Finance, price, stock Demography Etc.
Signal Processing System Input signal SYSTEM Output signal Communication system Control system Remote sensing system Biomedical system Auditory system Audio system Seismic system
Communication System Disturbance Message signal Transmitted signal Received signal Transmitter Channel Receiver Estimated received message signal Message: Speech, TV/video, data System: Digital or analogue Channel: Opt.fibre, coax, radiolink, satellite, mobile tel./pc Disturbance: Noise, distortion, interference Transceiv.: Coding, compression reconstruction, modulation (AM, FM, PM, ASK, FSK, PSK, QAM etc.) Electronics: VLSI Modes: Broadcasting, point-to-point
Control System Disturbance Reference Controller Plant Output Sensor Examples: aircraft, autopilots, automobil engine, machine tools, oil raffineries, oildrilling, papermills, fish industry, electrical powerplants, nuclear reactors, robots Response: Output follows input reference, regulation Robustness: Good regulation despite of disturbances Closed-loop: Feed-back control system SISO: Single input / single output MIMO: Multiple input / multiple output Analogue systems: Analogue electronics Digital systems: Digital electronics using microprocessors
Passive system: Object Input Signal Disturbance Remote Sensing System Sensor Detected Signal Signal processing Processed Signal Active system: Object Transmitted Signal Received Signal Disturbance Transmitter Sensor Signal processing Detected Signal Signal modulator Processed Signal Examples of fields: Acoustic (sound, seismic, ultrasound), electromagnetic, electric, magnetic, gravitational Passive (e.g. Earth quake), active (seismic) Sensors and systems: Radar: surface properties, topography, roughness, moisture, dielectric constant Infrared: near surface termal properties Visual/near infrared: Chemical composition X- and γ-ray: radioactive properties Seismics and seismology: oil and gass exploration, earth quakes Digital signal processing - examples Synthetic aperture radar (SAR): Use of single antenna in place of array, and use of FFT Ocean seismic tecnology using airgun/hydrophone streamer
EEG: Biomedical System ECG: Extraction of information from biological signals Biological signals trace back to electrical activity Neurons ECG (EKG) EEG Artifacts Instrumental : thermal noise, 5Hz powerline noise Biological: EEG interfered by ECG Signal analytical: roundoff, quantization Signal processing: Filtering Use of apriori known signal properties: frequency range, randomlike properties,etc.
Auditory System
Audio System - Spectrogram
A. Ziolkowski et al: The signature of an air gun array: Computation from nearfield measurements including interactions, Geophysics,vol. 47, oct. 98, P. 43 Seismic System
Signal Processing Part. Elementary Signals and Basic Operations Magnus Danielsen
Contents Types of signals Classification Basic operations Elementary signals Systems, response and properties Operators and block diagrams
Limitation of Signals Applied in this Course One dimensional signals and variables Single valued signals Real valued signals Complex valued signals Real independent variable (time or space)
Analogue signal = continuous signal: X(t) t Discrete signal: X[n] T n
Digital Signal f(t) T t
Analogue or Digital Signal Processing? Analogue: Real time Simple circuits (often) Physical in nature Inflexible change of system (rebuilding hardware) Suffers from parametrical variations Digital: Flexible Software change of system by changing programme Repeatibility Complicated circuits (VLSI)
Classification of Signals (). Continuous / discrete time signals x(t) x[n] with sampling time T. Even / odd signals Even: x(-t)=x(t) x[-n]=x[n] Odd: x(-t)=-x(t) x(-n)=-x[n] Conjugate symmetric: x(-t)=x*(t) x[-n]=x*[n] x(t)=a(t)jb(t); a(-t)=a(t); b(-t)=-b(t) 3. Deterministic signals/ Indeterministic signals (random)
Classification of Signals () 4. Periodic / non-periodic signals Periodic : x(tt)=x(t) per.= T=/f=(π)/ω x[nn]=x[n] per.= N=(π)/Ω Non-per. : x(t) and x[n] not repeated periodically 5. Energy / power signals Energy signals: Power signals: T n= T/ N lim x(t) dt lim x[n] T < < N N T/ x(t) dt < x[n] < n= N
Basic Operations on Signals Amplitude scaling y(t)=cx(t) y[n]=cx[n] Addition y(t)=x (t)x (t) Multiplication y(t)=x (t) x (t) y[n]=x [n]x [n] y[n]=x [n] x [n] Differentiation / differensing y(t)=dx(t)/dt y[n]= x[n]-x[n] Integration / summation y(t)= x(t)dt y[n]=σx[n]
Basic Operation on the Independent Variable() Scaling y(t)=x(at) x(t) t y(t) t x[n] y[n] Y[n]=x[kn] k = integer n n Reflection y(t)=x(-t) x(t) t y(t) t x[n] y[n] y[n]=x[-n] n n
Basic Operation on the Independent Variable Time shifting y(t)=x(t-t ) y[n]=x[n-m] x(t) t y(t) t t Precedence operation y(t)=x(at-b) y[n]=x[pn-q] x(t) t y(t) t t
Elementary Signals() Exponential signal x(t)=b exp(at) a> growing signal a< decaying signal x[n]=b r n r> growing; <r< decaying (B>) r> positive x; r< alternating x Sinussoidal signal x(t)=a cos(ωtϕ); x(tt)=x(t); T=/f=π/ω x[n]=a cos(ωnϕ); x[nn]=x(t); Ω(nN) ϕ = Ωnπm ϕ Periodicity requires: N=πm/ Ω
Elementary Signals() Complex exponential and sinusoidal fct. Eulers identities: e jθ = cos θjsin θ cos θ = / (e jθ e jθ ) sin θ = /(j) (e jθ -e -jθ ) B = A e jθ A cos(ωtθ) = Re{B e jωt } A sin(ωtθ) = Im{B e jωt }
Elementary Signals(3) Damped oscillation Analogue: X(t) = A e -αt cos(ωtθ) α > Discrete: X[n] = B r n cos(ωnθ) < r < Step function Analogue: u(t) = t < = t Discrete: u[n] = t < u[n] = t Rectangular pulse p(t) = u(t ½T) u(t ½T) p(t) = u(t) u(t T) p[n] = u[n] u[n N]
Elementary Signals(4) Impulse: Analogue: t δ(t) δ (t) = t = t δ (t)dt = x(t) δ(t t )dt = x(t ) Discrete: δ (n) n = n = δ[n] n Ramp: r(t) = t u(t) r[n] = n u[n] t n
Operator formulation: System and Operators Shift operator: x[n-k] = S k {x[n]} H = S k (or S t ) Differencing operator: y[n] = x[n-] x[n] H = S k Moving average operator: y[n] = /3 (x[n]x[n-]x[n-]) Block diagram: x(t) x[n] H H = /3 (S k S k ) x[n] S k S k y(t) = H{x(t)} y[n] = H{x[n]} = Σ /3 y[n]
Properties of System () x H y Stability BIBO: x Mx < y My < Memory: y(t ) depends on x for t<t memory: y[n] = /3 (x[n]x[n-]x[n-]) (Moving average ) i(t)=/l v(t)dt (Inductance) no memory: y[n]=x[n] (Square function) v(t)=r i(t) (Ohms law) Causality: y[n] depends only on x[m] for m n y(t ) depends only on x(t) for t t Causal signal: y[n] = /3 (x[n]x[n-]x[n-]) Noncausal sign.: y[n] = /3 (x[n]x[n]x[n-])
Properties of System () Invertibility inverse system: H - H=I H - =inverse operator; I=identity operator x H y=h{x} H - z=h - {H{ x}}=x Examples Equalizer Seismic signal detection y(t)=/l x(t)dt H= /L H - =L d/dt (inductance) y=x x= ±y ½ two solutions non invertible
Properties of System (3) Time invariance x H y=h{x} S k z= S k {H{ x}} x S k y=h{x} H z=h{s k { x}} Commutative rule: S k H = HS k
Properties of System (4) Linearity Input : x = a x i i Output: y= H x = ay = ah x {} { } i i i i Examples x= Σ a i x i Linearity: y = nx = nσ a i x i = Σa i nx i = Σa i y i Non-linearity y = x(t)x(t-) y = Σ a i x i (t) Σ a j x j (t-) = Σ Σa i a j x i (t) x j (t-) Σa i y i
Signal Processing Part. Linear Time Invariant Systems and Convolution Magnus Danielsen
Contents of Part.-.3 System Impulse responce h(t) and h[n] Convolution formulation for output: y=h x Differential equations for analogue signals Difference equations for discrete signals Block diagram Scalar multiplication Addition Integration for analogue signals Timeshift for discrete signals State variable description: st order differential for analogue signals st order difference equations for discrete signals
Analogue signals Impulse Response x(t)=δ(t) H y(t)=h{δ(t)}=h(t) x(t) y(t) t Discrete signals x[n]=δ[n] H y[n]=h{δ[n]}=h[n] x[n] n
Convolution for Discrete Signals Single pulse input: Input signal: x[n]=x[k] δ[n-k] Output signal: y[n]=h{x[n]}=h[n-k] Multi pulse input: Input signal: Output signal: k= k= k=- k= k=-x[n]= x[k] δ[n-k] k=-y[n]= x[k] h[n-k]= x[n-k] h[k] = x[n] h[n]
Convolution for Analogue Signals Infiniticimal pulse input: Input signal: dx=x(τ) δ(t-τ)dτ Output signal: dy=h{x(τ) δ(t-τ)dτ}=x(τ)h(t-τ)dτ Analogue function input: Input signal: Output signal: y(t) = x( τ) h(t- τ)d τ= x(t- τ) h( τ)dτ= x(t) h(t) - - x(t)= x( τ) δ(t- τ)dτ -
Discrete Convolution Graphically () x[n]=[- ½ ½ -½] h[n]=[½ ½ -½ ½ ¼ ] n n p k [n]=x[k]δ[n-k] v k [n]=p k [n] h[n-k]=x[k] h[n-k] k=- k= n n y[n] = p [n]h[n k] k= k= k = x[k]h[n k] k= n k= k=3 n n -4-3 - - 3 4 5 6 7 8 n
Discrete Convolution Graphically () x[n]=[- ½ ½ -½] h[n]=[½ ½ -½ ½ ¼ ] k h[--k] h[-k] k k n h[-k] n= k h[-k] h[3-k] h[4-k] n= k k k y(n) = x[k] h[n k] h[5-k] k h[6-k] k h[7-k] k h[8-k] k h[9-k] k
h(n-k) h(--k) h(--k) h(-k) h(-k) h(-k) h(3-k) h(4-k) h(5-k) h(6-k) h(7-k) h(8-k) h(9-k)... Discrete Convolution Calculation x[n] = [ ] k= x(k)...... - ½ ½ -½ ½ ¼ - - ½ ½ -½ ½ ¼ ½ ½ ½ -½ ½ ¼ ½ ½ -½ ½ ¼ ½ ½ ½ -½ ½ ¼ 3 -½ ½ ½ -½ ½ ¼ h[n] = [ ] 4 4 ½ ½ -½ ½ ¼ 5.................................... y[n] = x[k]h[n k] k= -½ = -.5 -¼ = -.75 -½½½ =.5 ½¼¼ = -½-¼½½-¼ = -¼¼-½¼-½ =.75 /8½-¼-¼ =.5 ¼¼¼ =.75 /8-¼ = -.5 /8 =.5...
Example on Discrete Convolution x[n] = u[n] h[n] = u[n] = [.. ( ) ( ) ( )...] ( 3) n 3 3 3 3 4 4 4 4 x[k] = h[3 k] u[k] h[5 k]... k... k... k y[ 5] = y[3] = ( ) ( ) ( ) =.734 3 3 3 3 4 4 4 ( ) y[5] = ( ) = = 3.88 n 3 5 3 k 4 4 3 4 n 3 3 ( 4) 4 3 4 y[] = ( ) = = 3.83 ( ) n 3 n 3 k 4 4 3 4 y[n] = ( ) =
Convolutional Integral for Analogue Signals () x(t) x[n] H y(t) y[n] x[n]=δ[n-k] y[n]=h[n-k] x[n]=σx[k]δ[n-k] y[n]=σx[k] h[n-k] x(t)=δ(t-τ) y(t)=h(t-τ)= H{δ(t-τ)} x( τδ ) (t- τ)d τ y(t)=h{ x( τδ ) (t- τ)d τ} - - = x( τ)h(t- τ)d τ= x(t- τ)h( τ)dτ - - y(t)=x(t) h(t)=h(t) x(t)
Convolutional Integral for Analogue Signals () Example: x(t)=e -3t {u(t) u(t-)} h(t) = e -t u(t) x(τ) t t< t t -3τ -(t- τ) -t -τ t t t 3t y(t) = e e dτ= e e dτ= ½e [e ] = ½(e e ) t -3τ -(t- τ) t 4 e e dτ= ½e [e ] = ½( e ) t >
Convolution of Discrete Step Functions Non - delayed step functions : Delayed step functions : [ ] [ ] = [ ] [ ] un [ n] un [ n] = uk [ n] un [ n k] ( n ) u[ n] n u n u n u k u n k = k= n n k= n ( n n n ) u[ n n n ] =... u[k] k=... k... u[k n ] k= k=n... k... u[n k]... k u[n n k]...... k [ ] u[ n] u n k= k=n... k= [ ] [ ] un n un n k=n-n... n= n... n= n=n n n
Moving Average System xn [ ] y[ n] [ ] hn N Definition : y[ n] = x[ n k] N k= where N is the averaging window width Impulse response : [ ] = δ[ ] [ ] = [ ] xn n yn hn N hn [ ] = δ[ n k] N k= = δ δ δ δ N = ( un [ ] un [ N ]) N ( [ n] [ n ] [ n ]... [ n N ] )
Moving Average of Rectangular Pulse Rectangular pulse of width M : xn [ ] = un [ ] un [ M] Moving average of rectangular pulse of width M : y[ n] = h[ n] x[ n] = ( u[ n] u[ n N] ) ( u[ n] u[ n M] ) = N ( u [ n ] u [ n ] u [ n N ] u [ n ] u [ n ] u [ n M ] u [ n N ] u [ n M ]) = N N (( n ) u[ n] ( n N ) u[ n N] ( n M ) u[ n M] ( n N M ) u[ n N M]) y[n] Averaging window width N=4 Pulse width M= ¼... n n= n=n- n=m- n=nm-
Convolution of Continuous Step Functions Non - delayed stepfunctions : Delayed stepfunctions : ( ) ( ) u t u t t ( ) ( ) = u τ u t τ dτ = t u () t ( ) ( ) t t u(τ) u(τ) u t t u t t t ( ) ( ) = u τ t u t t τ dτ ( ) = (t t t ) u t t t τ τ τ = τ = τ=t u(t-τ) u(t-τ) τ = τ = t τ τ = τ = t-t τ u(t) u(t) u(t-t ) u(t-t ) t = t t = t = t t t
Signal Processing Part. Properties of Impulse Response of a Linearsystem Magnus Danielsen
Contents of Part. Properties of impulse response Parallel and cascade connections Memory Causality Stability Inversion Step response
Properties of Impulse Respons () Parallel connection: h = h h x(t) h y(t)=x h x h =x (h h ) h Cascade connection: h = h h x(t) z(t)= y(t)=z h = x h h h h
Example x h h h 3 y = - x h 4 x (h h ) h 3 = x (-h 4 (h h ) h 3 ) h 4 h (n) = u(n) h(n) = u(n ) u(n) n h(n) 3 =δ(n ) h 4(n) =α u(n) [ ] hn= h (h h) h 4 3 n = α n = α δ u(n) (u(n) u(n ) u(n)) (n ) [ ] un [ ] [ ] un = α n ( ) u n
Properties of Impulse Respons () Memoryless system Causal system k= k=-y[n] = h[n] x[n]= h[k] x[n-k] = c x[n] h[n] = c δ[n] y(t) = h(t) x(t)= h( τ) x(t- τ)dτ = cx(t) - h(t) = c δ(t) k= k= y[n] h[n ] x[n ]= h[k] x[n-k]= h[k] x[n-k] = k=- k= y(t) h(t) x(t) = h( ) x(t- )d = h( ) x(t- )d = τ τ τ τ τ τ -
Properties of Impulse Respons (3) Stable systems: Bounded In Bounded Out: BIBO Discrete x[n] M < y[n] M < k= x k=-y[n]= h[k] x[n-k] x y y[n] h[k] x[n-k] M h[k] <M h[k] < y Analogue x(t) M < y(t) M < x y(n)= h( τ) x(t- τ)dτ y(t) h( τ) x(t- τ) dτ M h( τ) d τ<m h( τ) d τ< x y y
Discrete system n h[n] = a u[n ] Examples on Stability n For < a < : h[n] = a = a a BIBO stable a For a : h[n] = unstable Analogue system at h(t) = e u(t) > < = = a a at For a (i.e. e ) : h(t) dt e dt BIBO stable a For a (i.e. e ) : h(t) dt unstable =
Properties of Impulse Respons (4) x(t) h(t) y(t)=h(t) x(t) y(t) h - (t) x(t)=h - (t) y(t) Invertible systems and deconvolution Examples: Equalizer in telecommunication: x(t) Transmitter h(t) Seismic exploration Channel Receiver h - (t) y(t)= h - (t) h(t) x(t) = x(t) x[n] y[n]=h[n] x[n] h[n] = y[n] x - [n] = h[n] x[n] x - [n]
Example on Invertible Systems Undesired echo on data: x[n] h[n] y[n]= x[n] ax[n-] y[n]=h[n] x[n]=σh[n-k]x[k] Impulse response: h[n] = [ a] h - [n] h[n] = Σ h - [n-k] h[k] = δ[n] h - [] h - [-] a = h - [] = h - [] h - [] a = h - [] = -a h - [] h - [] a = h - [] = (-a) Inverse impulse response: h - [n] = (-a) n = [ -a (-a) (-a) 3 (-a) 4... ]
Step Response u[n] u(t) h[n] s[n]=h[n] u[n]=σh[n-k]u[k] s(t) = h(t) u(t)= h(t-τ)u(τ)dτ Step response found from impulse response: s[n] = h[n] u[n] = h[k] u[n k] = h[k] k= n k= s(t) = h(t) u(t) = h( τ) u(t τ)dτ = h( τ)dτ Impulse response found from step response: h[n] = s[n] s[n ] d h(t) = s(t) dt t
Examples on Step Response Analogue signal: E=δ(t) I R C Discrete signal: V=h(t) d E = RI V I = C V(t) dt d δ (t) = τ V(t) V(t) τ= RC = dt V( ) = δ (t)dt = Impulse response : V(t) = h(t) = exp( t)u(t) Step response : s(t) = h(t)dt = ( exp( t)) u(t) t n Impulse response: h[n] = (-a) u[n] a < n n Step response : s[n] = h[n] = u[n] (-a) = u[n] ( a) a
Properties of the Impulse Response Property \ System Memoryless Causal Stable Invertible Analogue system h(t)=c δ(t) h(t)= for t< h(t) dt < h(t) h inv (t) = δ(t) Discrete system h[n]=c δ[n] h[n]= for n< n= h[n] < h [n] h inv [n] = δ[n] Step response Impulse response t s(t) = h( τ)dτ h(t) s[n] = n k = h[k] d = s(t) h[n] = s[n] s[n ] dt
Signal Processing Part.3 Sinusoidal Response, Diff. Equations, and Block Diagrams Magnus Danielsen
Contents for Part.3 Sinussoidal response Analogue systems Discrete systems Differential equations Difference equations Block diagrams State variables
Sinusoisal Steady State Response x[n]=e jωn x(t) =e jωt h y[n]=h[n] x[n]=σh[k]x[n-k]=σh[k] e jω(n-k) =e jωn Σh[k] e -jωk y(t) = h(t) x(t)= h(τ)x(t-τ)dt= h(τ) e jω(t- τ) dt= e jωt h(τ) e -jωτ dτ Discrete frequency response: H(e jω )=Σh[k] e -jωk = H e jϕ y[n] = H(e jω )e jnω = H x[n] Analogue frequency response: H(e jω )= h(τ) e -jωτ dτ = H e jϕ y(t) = H(e jω )e jωt = H x(t)
Example on Sinusoidal Response x[n]= A cos(ωnθ) x(t) = A cos(ωtθ) h y[n] y(t) If h is reel H(e jω )= H(e -jω )* og H(jω)= H(-jω)* Discrete frequency response: x[n] = A cos(ωnθ) = ½A (e j(ωnθ) e -j(ωnθ) ) H = H(e jω ) = H(e jω ) e jϕ(exp(jω)) = H e jϕ y[n] = H(e jω ) e jϕ(exp(jω)) ½A e j(ωnθ) H(e -jω ) e jϕ(exp(-jω)) ½A e -j(ωnθ) = H A cos(ωn θ ϕ) Analogue frequency response: x(t) = A cos(ωtθ) = ½A (e j(ωtθ) e -j(ωtθ) ) H(jω) = H(jω) e jϕ(jω) y(t) = H(jω) e jϕ(jω) ½A e j(ωtθ) H(-jω) e -jϕ(jω) ½A e -j(ωtθ) = H A cos(ωt θ ϕ)
Example on Sinussoidal Response Obtained from Impulse Response h [n] = ½(δ[n] δ[n-]) H (e jω ) = ½( e jω ) = e jω cos(ω/) H H -π π -π π Ω -π h [n] = ½(δ[n] - δ[n-]) H (e -jω ) = ½( - e -jω ) = j e -jω sin(ω/) H H π/ Ω -π π Ω -π π -π/ Ω
Example: Analogue Sinusoidal Response H(j ω ) = t RC h(t) = e u(t) RC τ RC ωτ j RC H(j ω ) = e u(t)e dτ= RC RC ω RC.9.8.7.6.5.4.3.. RC jω -5 5.5 ω angle(h) = arctan ωrc.5 -.5 - -.5-5 5 ω
Example: Discrete Sinusoidal Response h[n] = n ( a) u[n] jω Ω j n n Ω j n H(e ) = h[n]e = ( a) e jω H(e ) j H(e Ω ) = n= n= = a e jω ( (a cos Ω ) (a sin Ω) asinω angle(h) = arctan (acos Ω )
Differential Equations N k M k d d a y(t) = bk x(t) k dt k k k= dt k= Example x(t) y(t) R L C dy L Ry ydt = x dt C d y dy dx = dt dt C dt L R y t Example k f m x(t) dy dy m f ky = x dt dt y(t)
Difference Equations N a y[n k] = b x[n k] M k k= k= k Recursive formula for y[n] Example N M = k k k= k= y[n] a y[n k] b x[n k] y[n] y[n-] ¼ y[n-] = x[n] x[n-] y[n] = - y[n-] - ¼ y[n-] x[n] x[n-]
Example Using Recursive Formula x[n] h[n] y[n] Input: x[n] = u[n] Initial output values: y[ ] = y[ ] = Difference equation: y[n] = ½ y[n ] ¼ y[n ] x[n] x[n 5] Output solution: y[-] = =. y[-] = =. y[] = ½ ¼ =. y[] = ½ ¼ =.75 y[] = ½.75 ¼ =.89 y[3] = ½.89 ¼.75 =.75 y[4] = ½.75 ¼.89 =.85 y[5] = ½.85 ¼.75 =.4 y[6] = ½.3 ¼.85 =.33 y[7] = ½.33 ¼.3 =. y[8] = ½. ¼.33 =.5 y[9] = ½.5 ¼. =.3 y[]= ½.3 ¼.5 =. x[n]... -3 - - 3 4 5 6 7 8 9 y[n] 5 7 9-3 - - 3 4 6 8 n n
Block Diagrams - Symbols x c y=cx x y=xw x Σ y=xw w w x(t) y(t)= t - x(t)dt x[n] S y[n]=x[n-] x[n] S k y[n]=x[n-k]
Block Diagram Discrete nd Order y[n] = b x[n] b x[n-] b x[n-] - a y[n-] a y[n-] w x b w y x b y x b y S S S S S b -a b -a -a b S S S S S b -a b -a -a b
Block Diagram Analogue nd Order a y a y a y = b x b x b x a y a y a y = b x b x b x y = b x b x b x a y a y w x b w y x b y x b y b -a b -a -a b b -a b -a -a b
Example Block diagram for system with given difference equation y[n] / y[n-] /3 y[n-] = 4 x[n] 3 x[n-] x[n-] x 4 y S -/ -3 S /3
State Variable Description x[n] b y[n] -a S S b q [n] q [n ] = a q [n] a q [n] x[n] q[n ] = q[n] y[n] = x[n] a q [n] a q [n] b q [n] b q [n] -a b q [n] q[n ] a a q[n] = x[n] q[n ] q[n] q[n] y[n] = { b a b a} { } x[n] q[n] q[n ] = A q[n] bx[n] y = c q Dx
Signal Processing Part 3. Fourier Representations of Signals Magnus Danielsen
Fourier Representations of Signals Inventor: Joseph Fourier 768 83 Theory includes: Any wellbehaved signal can be represented as a continous (integral) or discrete (summation) superposition of sinusoids Sinussoids can be complex (mostly applied) or reel. Complex fourier representations can be transformed into real representations and vice verse Fourier methods have widespread applications in signal systems like Communication systems Seismic exploration systems Audio systems etc.
Fourier Series using Real Sinusoids f(t) is a periodic time functions with period T = ω ω f(t) a a cosn t b sinn t n n n= n= a T = f(t)dt a ( ) b ( ) n = n = f(t)cos nωt dt f(t)sin nωt dt T T T T T d = a b n n n ϕ = arctan(a / b ) n n n f(t) = a d cos(nω t ϕ ) n n n= a b = d cosϕ = d sinϕ n n n n n n
Fourier Series using Complex Sinusoids Eulers equations: cos x = / (e jx e -jx ) sin x = /j (e jx e -jx ) e jx = cos x j sin x e -jx = cos x j sin x f(t) jnω t = jnω c e n= n T t cn f(t)e dt = T c = a c ½ a jb for n = ( ) ( b ) n = jcn cn n n n a = c c n n n
Definition of Eigenvalue Formulation Eigenvalue formulation for the operator H : H { ψ () t } =λ ψ() t () ψ t = eigenfunction λ = eigenvalue Eigenvalue formulation for the matrix A : A e e λ k k k =λ e k k = eigenvector = eigenvalue
Linear Time Invariant (LTI) Systems Complex Sinusoids Eigenfunctions for Analogue Systems Eigenpresentation of system: ψ(t) = e jωt y(t) = H(jω) e jωt H Impulse response : h( τ) System operator : H = h( τ ) corresponding to convolution operation Eigenfunction Output signal : H jωt { } Eigenvalue jωt : ψ(t) = e selected as input signal { ψ } y(t) = H (t) = jωt j ω(t- τ) jωt -jωτ jωt e = h( τ ) e = h()e τ dτ= e h()e τ dτ= H(j ω)e - - -jωτ : H(j ) h( )e d λ= ω = τ τ - General LTI system: x(t) H y(t) = H {x(t)} For LTI systems applies : j t jωk t k H{ } k k k= ωk x(t) = a e y(t) = x(t) = a H( j ω )e k=
Linear Time Invariant (LTI) Systems Complex Sinusoids Eigenfunctions for Discrete Systems ψ[n] = e Eigenpresentation jωn of system: Impulse response : System operator : H hn [ ] [ ] jωn [ ] [ ] H ψ[ ] { } { } [ ] [ ] = h n corresponding to convolution operation Eigenfunction: ψ n = e selected as input signal Output signal : y n = n = jωn jωn j Ω( n k) jωn jωk jω jωn H e = h n e = h k e = e h[ k] e = H(e )e k=- k=-jω jωk Eigenvalue H y[n] = H(e jω )e jωn k=- [ ] : λ= H(e ) = h k e General LTI system: x[n] H y[n]= H {x[n]} For LTI systems applies : k= k jωkn H{ } k jωk jωkn k= x[n] = a e y[n] = x[n] = a H(e )e
Fourier Representation for 4 Signal Classes Time property Periodic Nonperiodic Continuous FS = CTFS = Continuous Time Fourier Series FT = CTFT = Continuous Time Fourier Transform Discrete DTFS ( *DFT) = Discrete Time Fourier Series DTFT = Discrete Time Fourier Transform *DFT = Discrete Fourier Transform
Definitions of Fourier Representations Continuous Time Fourier Series = FS = CTFS: = = jnωt jnωt f(t) c e c f(t)e dt n n n= T T Discrete Time Fourier Series = DTFS ( DFT) : x[ n] = X[ k] e X[ k] = x[ n] e N N N jkω n jkω n k= n= Continous Time Fourier Transform = FT=CTFT: π π jωt jωt x() t = X( jω) e dω X( jω ) = x( t) e dt π π π Discrete Time Fourier Transform = DTFT: π x[ n] = X( e ) e dω X( e ) = x[ n] e π π jω jωn jω jωn n=
Discrete functions: [ ] Orthogonality φ = Ω = π jkω n n e N k N jkω n jmω n j( k m ) Ω n km = φkφ m = = N N n= I e e e j( k m ) Ω N e N for k = m = = = N δ k m e for k m j( k m ) Ω Continuous functions: jkωt (t) e T φ = ω = π k T [ ] jkωt jmωt j(k m ) ωt I (t) (t)dt e e dt e dt = φ φ = = km k m T t= t= T j( k m ) ω t e T for k = m = = = T δ k m j(k m ) ω for k m T [ ]
Discrete -Time Periodic Signals [ ] [ ] with Period N, and DTFS xn= xn N cyclicfrequencyω = [ ] [ ] [ ] Ω Ω jk n jk N approximate x n by xn Ake e N N π N = = [ ] Mean Square Error : MSE = x n x[ n] = when N Ak [ ] = Xk [ ] = xne [ ] and xn [ ] = Xke [ ] N N jkω n jkω n N x[n] DTFS, Ω X[k]
Proof of DTFS [ ] = [ ] Given periodic discrete function: x n x n N jkωn Cyclic frequency Ω = e = Define : Proof : π N [ ] [ ] jkω xn'e Xk = N N n' = xn [ ] = Xke [ ] = xn'e [ ] e N N N N jkω n jkω n' jkω n k= k= n' = N N N [ ] jkω( n n ') = xn' e = xn' N δ n n' = xn N N n' = k= n' = n' [ ] [ ] [ ] Consequently : [ ] [ ] jk Xke Ω xn = N n
Definition of DFT and FFT Discret Fourier Transform = DFT is most often defined as a modification of DTFS, where the factor /N is moved from X[k] to x[n], to be used for a finite number N of data: [ ] DFT, Ω [ ] x[n] = X k e X[k] = x n e N N N jkω n jkω n k= n= Fast Fourier Transform = FFT is defined as specifically efficient algoritms used to calculate DFT
Continuous Periodic Signals with Period T, and FS=CTFS x t = x t T cyclic frequency ω = () ( ) approximate x t by x t = A k e () () [ ] jkω k= t π T () Mean Square Error : MSE = x t x () t dt = when T T A[ k] = X[ k] = x() t e dt and x() t = X( ω) e T T jkω t jkω t k= ( ) FS, ω x t X[k]
Proof of FS jkωt Cyclic frequency ω = e = () = ( ) Given periodic continuous function: x t x t T Define : Proof : k' = T π T [ ] () [ ] jkω X k e X k such that x t = = T T k' = jkωt jk' ωt jkωt ˆX k xte dt Xk'e e dt [ ] () [ ] T [ ] ( ) = = δ = T T T [ ] [ ] [ ] jk' kωt Xk' e dt Xk' T k' k Xk = k= k' = t Consequently : = ˆ = jkωt jkωt x t X k e and X k x t e dt () [ ] [ ] () T k= T
Signal Processing Part 3. Discrete Time (DTFS) and Continuous Time (FS) Fourier Series Magnus Danielsen
Example on DTFS π π π x[ n] = cos( n ϕ ) Period N = 6 cyclic frequency Ω = = 8 6 8 ½ X[k] jϕ jϕ [ ] = = [ ] [ ] π π j n j n 8 π jk n 8 8 8 xn ½(e e e e ) Xke ϕ j ½e for k = = = for k, jϕ Xk ½e fork 7-3 4 5 6 7 8 9 3 4 5 6 7 8 X[k] ϕ - 3 4 5 6 7 8 9 3 4 5 6 7 8 -ϕ k k
Example on DTFS for Periodic Square Wave x(n) Period = N cyclic frequency =Ω n -M M N-M N n= M n M= M jkω n jkω M jk Ω (n M) [ ] = [ ] = [ ] Xk xne e xne N N Ω = e = jkω n= M n M= sin(k Ω (M ½) jk (M ) for k, ± N, ± Ω N,... jk M e N sin(½k Ω) N e M for k, ± N, ± N,... N N=64 M=5 X[k] k
Discrete Time Fourier Series with Harmonically Related Cosines Derivation xn [ ] = Xke [ ] Xk [ ] = xne [ ] N N jkω n jkω n Even symmetry : X[ k] = X[ k] Periodicity : NΩ = π N is even [ ] [ ] [ ] [ ] [ ] x n X k e X X k e X k e X e [ ] Bk N N jkω n jkω n jkω n N jπn = = N k= k= N k= [ ] = Bkcos(kΩ n) N Xk [ ] for k=, = N X[ k] for k =,,.., N
Discrete Time Fourier Series with Harmonically Related Cosines xn [ ] = Xke [ ] Xk [ ] = xne [ ] N N jkω n jkω n [ ] [ ] Even symmetry : X k = X k Periodicity : NΩ = π N is even N N Xk [ ] for k=, [ ] [ ] [ ] xn = Bkcos(k Ω n) Bk = k= N X[ k] for k =,,.., Even symmetry : X[ k] = X[ k] Periodicity : NΩ = π N is odd N x[ n] = B[ k] cos(kω n) B[ k] = N k= X k for k =,,.., [ ] [ ] N Xk for k=
Discrete Time Fourier Series with Harmonically Related Sines xn [ ] = Xke [ ] Xk [ ] = xne [ ] N N jkω n jkω n Odd symmetry : X[ k] = X[ k] Periodicity : NΩ = π N is even N N xn [ ] = Bksin(k [ ] Ω n) Bk [ ] = jx[ k] for k =,,.., k= Odd symmetry : X[ k] = X[ k] Periodicity : NΩ = π N is odd N N [ ] [ ] [ ] [ ] x n = B k sin(kω n) B k = jx k for k =,,.., k= N
Fourier Transform FS x t = x t T cyclic frequency ω = x t () ( ) = () ( ) jkω n= X k e t T t Xk xte dt [ ] jkω () = T π T T T T () = [ ] jkωt jmωt jkωt Proof: x t e dt X m e e dt m= m= T T = Xm e dt= Xmδ m k= Xk T [ ] j(m k) ω [ ] [ ] [ ] t m=
Example Cosine Function π π π π j j t j j t 4 4 π π 3 3 x(t) = 3cos( t ) = e e e e 4 3 Xk [ ] 3 - k X[ k] π 4 - k π 4
Example Sine Functions x(t) = sin(πt 3) sin(6πt) j j = je e je e e e j3 jπt j3 jπt j3(πt) j3(πt) X [ k] ½ k 3 - - 3 π 3 π X [ k] k -3 - - π 3 π
Example: FS of Square Wave x(t) t -T-T s -T -TT s -T s T s T-T s T TT s T T s s sin(k ωt s) sin(k π ) Ts sin( u) Ts Ts X[ k] x() t dt T π = = = = = sinc(u) u= T kπ kπ T πu T T T s.4...8.6.4. -. -. 4-5 -4-3 - - 3 4 5
FS Approximation of Square Wave Using Finite Number of Terms Haykin et al.
RC Circuit with Square Wave Input x(t) R L C y(t) x(t) X[k] is a rectangular per.pulse train with amplitude = RC=. s T s /T=/4 ω = π /RC Yk [ ] = Xk [ ] jkω / RC Ts /RC sin(kπ ) = T jkω / RC kπ kπ sin( ) = jπk kπ /RC H(j ω ) = k jω /RC ω= ω.6.4. 3 - - -3 - -5 - -5 5 5.8.6.4. y Y -. - - 5 - -5 5 5 arg ( Y [ k] ) ( t) [ k] k k - -.5.5 Time (s)
Signal Processing Part 3.3 Discrete Time Non Periodic Signals Magnus Danielsen
Non-periodic x[ n] Discrete-time Nonperiodic Signals () DTFT...... n Periodic x [ n] M M...... n [ ] [ ] [ ] [ ] Non-periodic signal: x n for n Define a periodic signal: x n = x np N = x n in period M n M Length of period : N = M (p is integer) [ ] = lim x [ n] x n M M [ ] [ ] DTFSfor per.signal : x n X k e jkω n = Ω = M [ ] = [ ] = [ ] M M jkω n jkω n M π M X k x n e x n e M M M
Discrete-time Nonperiodic Signals () DTFT Define : Ω= kω dω=ω = M Ω jkω n ( ) = [ ] = [ ] j jωt M M π M X e lim x n e x n e [ ] = [ ] = [ ] x n lim x n lim X k e = M M M k = M M M jkω n lim x[ n '] e e M jkω n ' jkω n M k = M n' = M π π dω jω jωn jω jωn ( ) = X e e = X( e ) e dω π π π π
DTFT Representation π xn [ ] = Xe ( ) e dω Xe ( ) = xne [ ] π π jω jωn jω jωn x[n] DTFT, Ω ( jω ) X e x[n] is non periodic and discrete in n ( jω ) X e is periodic and continuous in Ω
Example on Exponential Sequence () n [ ] =α un [ ] xn ( jω) n jωn jω n X e = α u[ n] e = ( α e ) = for α < Ω j αe ( jω) ( jω = ) X e X e e j X e jω ( ) X e Ω = = j ( ) ( ( ) ) ½ αcosω α sin Ω ( α αcosω) ½ jω αsin Ω X ( e ) = arctan α cos Ω
Example on Exponential Sequence () jω ( ) X e = ( α -αcosω) ½.8.6.4..8.6.4. α =.5 X e jω ( ) αsin Ω = arctan α cos Ω. 6. 4. - 5 - -5 5 5 α =.5 -π π -. -.4 -.6 -.8-5 - -5 5 5 -π π
Example: Rectangular Pulse () [ ] xn for n = for n > M = n Ω j Ω (M ) sin (M ) M jωm e e,, 4... jω jωn = Ω ± π ± π jωn X ( e ) = e = e Ω sin M M Ω =, ± π, ± 4 π...
Example: Rectangular Pulse () 5 ( j X e Ω ) M = 5 5 Ω π -5-5 - -5 5 5 π
Example: Square Frequency Function Discrete Sinc Time Function.4.4..8...8.6 π/w.6.4.4.. Ω - -.5 - -.5.5.5 π W W for Ω W jω X( e ) = for Ω > W π -. -.4-4 -3 - - 3 4 ( ) sin Wn W Wn xn [ ] = = sinc( ) πn π π n
DTFT for x[n]=δ[n] and x[n]= DTFT j jωn ( Ω) x[n] =δ[n] X e = δ [n]e = n= n Ω π Xe j x[n] e j Ω n d =δ Ω = δ Ω Ω= π π ( Ω) ( ) DTFT ( ) π Ω Ω
Example: Sinusoidal Spectrum for a Discrete Non-periodic Signal () jω Discrete Time Fourier Transform : X(e ) cos π π jωn jω jω jωn xn cos e d e e e d [ ] ( ) = Ω Ω= Ω π π π = e e π j( n) j( n) for n= = for n= forn ± π j Ω ( n) j Ω( n) = Ω π π
Example: Sinusoidal Spectrum for a Discrete Non-periodic Signal () j Magnitude : X(e Ω ) = cosω.5 Discrete time function x[ n].5.5.5-4 -3 - - 3 4 Ω -5 5 n 3.5 jω Angle : X(e ) 3.5.5.5-4 -3 - - 3 4 Ω
Signal Processing Part 3.4 Continuous Time Nonperiodic Signals Magnus Danielsen
Continuous-time Nonperiodic Signals () FT = CTFT N on-periodic x () t...... t () t Periodic x T/ T/...... t ( ) Non-periodic signal: x t for t T T Define a periodic signal: x () t = x () t period t x t () = lim x () t T () [ ] FSfor per.signal : x t X k e jkωt = ω = T T T T [ ] = () = () jkωt jkωt X k x t e dt x t e dt T T π T
Discrete-time Nonperiodic Signals () Define : ω= kω dω=ω = DTFT π T T jkωt jωt X ( jω ) = lim x() t e dt x() t e dt T = T jkωt T T k = T/ jkωt ' jk t lim ω x[ t' ] e dt' e T k = T T/ dω jωt jωt X( j ) e X( j ) e d π π () = () = [ ] x t lim x t lim X k e = = ω = ω ω
FT Representation j t jωt x t X j e d X j x t e dt ω () = ( ω) ω ( ω ) = () π () ( ) [ ] FT, ω X( jω) x t x t is non periodic and continuous in t X jω is non periodic and continuous in ω
Example on Exponential Decay.9.8.7.6.5.4.3.. x t = e u t () at ( ) a=.5-3 4 5 Time t.8.6.4..8.6.4 a=.5 X ( ω). -3 - - 3 Cyclic frequency ω ( ) X ω = e u( t) e dt = a j ω X ( ω ) = (a ω ) ω X jω = arctan a ( ) at jωt.5.5 -.5 - X a=.5 ( jω) -.5-3 - - 3 Cyclic frequency ω
Rectangular Pulse.4. T=.5.8.6.4. -T T -3 - - 3 Time t.5 π T -.5 - -5 - -5 5 5 π T π 3π T T Cyclic frequency ω T ω j t ω j t ω j t ωt X ( jω ) = x(t)e dt = e dt = e = sin ( ω T) = T sinc jω ω π T T T
Rectangular Spectrum W π W jωt jωt jωt W Wt x(t) = X( jω ) e dt = e dt = e = sin ( Wt ) = sinc π π jω πt π π W W W
FT for an Impulse () FT () ω j t δ t δ t e dt = FT for a DC signal δ( ω) FT x( t) = δ( ω) e jωt dω= π π ( ) FT πδ ω
FT of Ramp Function () - x(t) t t t x(t) = = t u(t ) u(t ) t > } [ ] - ω j t ω j t ω j t X( ω ) = t e dt = t e e dt ω j ω j ω j t = t e e j j ω ω = j cos( ω) j sin( ω) ω ω ω j t
FT of Ramp Function () log X(ω) (db) - -4-6 -8 Magnitude: - - -5 - -5 5 5 Cyclic frequency ω X( ω ) = j cos ω j sin ω ω ω ( ) ( ) Phase:.5 X (radian).5 -.5 - -.5 - - -5 - -5 5 5 Cyclic frequency ω
Binary Phase Shift Keying (BPSK) Digital Communication Signal () Rectangular pulse shaped BPSK T t Single rectangular pulse shape: x r (t) A -½T ½T t A t ½T x(t) r = t ½T ½T Power : P = x (t) dt = A T ½T r Raised cosine pulse shaped BPSK.5 -.5 T - 4 6 8 t.5 Single raised cosine pulse shape: x c (t) ½A( cos(πt /T )) t ½T A x(t) r = t ½T t ½T -.5.5 3 -½T ½T Power : P = x c(t) dt = A T 8 ½T
Binary Phase Shift Keying (BPSK) Digital Communication Signal () log X(f) (db) -5 - Power spectrum: P= Rectangular pulse ( ) Raised cosine pulse -5 - -5 5 Frequency f (unit = /T ) Rectangular pulse, P= A=: T / jπft X' r jf = e dt T / = sin ( πft ) πf Raised cosine pulse, P= A=(8/3) ½ : T / 8 jπft X' c( jf ) = ( cos( t/t )e dt 3 π T / ( πft ) sin = 3 πf sin f / T T.5 3 f /T.5 ( π( ) ) π( ) ( π ( ) ) π ( ) sin f / T T 3 f /T
Signal Processing Part 3.5 Basic Properties of Fourier Representations () Magnus Danielsen
Basic Properties of Fourier Representations 4 Fourier Representations Periodicity Linearity Symmetry Time-shift Frequency-shift Scaling Differentiation/ differencing in time Differentiation/ differencing in frequency Integration/summation
Time property Nonperiodic Continuous Periodic FS = CTFS = Continuous Time Fourier Series Nonperiodic FT = CTFT = Continuous Time Fourier Transform x(t) FS, ω FT X[ k] x(t) X [ jω] Discrete DTFS = DFT = Discrete Time Fourier Series DTFT = Discrete Time Fourier Transform Periodic DTFS; Ω DTFT [ ] Xk [ ] xn [ ] Xk [ ] xn Discrete Continuous Frequency property
Linearity x X y Y z = ax by Z= ax by Example with Fourier series: x(t) -/8 /8 t [ ] Xk π = sin k kπ -/4 y(t) /4 t [ ] Yk π = sin k kπ 4 z(t)=3/ x(t)/ y(t) t π π Z[ k] = 3sin k sin k kπ 4
Linearity and Decomposition - FT ( ω) ( ω) B j X( jω ) = = = A j ( ω) ( ω) ( ω) ( ) ( ω) ( ω) B j f j for M N M M N k p b ( ) k ( ) p jω ω p k A j = = N q a B j q ( jω ) q= for M < N A j B j N P k k,p For M < N fk = X( j ω ) = = ( ) p A jω k= jω d k p= for(jω d k) P mult. poles δ d d () t () t j () t (j ) dt δ ω dt δ ω k FT FT FT k k dt k FT p dt k FT (p )! x() t = e x() t = t e jω d (jω d ) k C k D p
Linearity and Decomposition - DTFT ( jω ) X e f e for M N ( ) M N jω M ( ) ( ) ( ) k Be p jω jω j b k ( j ) p e Ω Ω Be k= A e p= = = = ( jω) N ( ) q ( jω A e ) jω a Be q e < q= ( jω A e ) ( Ω j ) ( Ω j ) for M N Be C D For M < N f = X e = = ( ) N P ( Ω j ) k k,p k Ω j Ω j p Ae k= dke p= for( dke ) P mult. poles DTFT DTFT DTFT j n [ n] [ n ] e jω [ n n ] e Ω δ δ δ n DTFT [ ] [ ] ( jω ) xn= dun Xe = j Ω de DTFT [ ] p n [ ] ( j Ω ) (p )! ( d) xn= ndun Xe = Ω j p ( de ) p
Examples on Decomposition FT with different poles jω X( jω ) = (j ω ) 5j ω 6 C C jω jω 3 jω jω 3 = = FT jt j3t ( ) = x t e e DTFT with different poles 5 e Ω j 5 jω X( e ) = 6 6 6 C C = Ω j Ω j e e 3 4 = Ω j Ω j e e 3 Ω j Ω j (e ) e DTFT xn [ ] = 4 un [ ] un [ ] n 3 n
Symmetry for Real Valued Time Signals π DTFS for periodic x n, : X k x n e jkω [ ] [ ] [ ] Ω = = N N N π ω = = jkω () [ ] () t FSfor per.signal x t, : X k x t e dt T T T [ ] ( jω ) = [ ] DTFT for non periodic signal x n : X e x n e ω j t FT for non periodic signal x(t) : X( jω ) = x ( t) e dt n Ω j n [ ] = [ ] X k X k [ ] = [ ] X k X k = jω jω X e X e [ ω ] = [ ω] X j X j
Symmetry for Imaginary Valued Time Signals π DTFS for periodic x n, : X k x n e jkω [ ] [ ] [ ] Ω = = N N N π ω = = jkω () [ ] () t FSfor per.signal x t, : X k x t e dt T T T [ ] ( jω ) = [ ] DTFT for non periodic signal x n : X e x n e ω j t FT for non periodic signal x(t) : X( jω ) = x ( t) e dt n Ω j n [ ] = [ ] X k X k [ ] = [ ] X k X k = jω jω X e X e [ ω ] = [ ω] X j X j
Even and Odd Real Valued Function Symmetries Even valued real functions x(-t)=x(t) and x[-n]= x[n]: X* = X Im{X}= Odd valued real functions x(-t)=x(t) and x[-n]= -x[n]: X* = - X Re{X}= π DTFS for periodic x n, : X k x n e jkω [ ] [ ] [ ] Ω = = N N N n π ω = = jkω () [ ] () t FSfor per.signal x t, : X k x t e dt T T T [ ] ( jω ) = [ ] DTFT for non periodic signal x n : X e x n e ω j t FT for non periodic signal x(t) : X( jω ) = x ( t) e dt Ω j n
Time - Shift DTFS x n n : X k x n n e [ ] [ ] = [ ] n N N ( ) [ ] = ( ) jkωt FS x t t : Xt k x t t e dt T N jk Ω (n n ) jkωn [ ] [ ] T T jkω n = x n e = e X k N = x t e dt = e X k T jk ω (t t ) jkωt () [ ] [ ] DTFS, Ω jk Ω n x[n n ] e X k FS, ω ( ) jk ω [ ] t x t t e X k j jωn Ω [ ] n ( ) = [ ] DTFT x n n : X e x n n e DTFT Ω j n ( jω x[n n ) ] e X e j Ω (n n ) jωn jω [ ] ( ) = x n e = e X e jωt FT x(t t ) : X t ( jω ) = x ( t t ) e dt () = = ω j ω (t t ) jωt x t e dt e X(j ) FT jωt ( ) ( ω) x t t e X j
Example on Time Shift FT () -T T x(t) t x t sin( ωt) ω z(t) t T FT jωt ( ) ( ) ( ) z(t) = x t T Z jω = e X jω = ω ω jωt e sin( T) 5 X(ω) 8 6 4 Z(ω) = X(ω) 8 5 6 4-4 -3 - - 3 4-5 -4-3 - - 3 4 π3. 5 3. 5. 5 X(ω). 5-4 - 3 - - 3 4 Cyclic frequency ω π4 3 - -π Z(ω) - - 3-4 - 4-3 - - 3 4 Cyclic frequency ω
Signal Processing Part 3.6 Basic Properties of Fourier Representations () Magnus Danielsen
Z j X j( ) ( ) ( ) Frequency Shift x(t) FT FT ω = ω γ ( ω) jωt j( ω ' γ)t jγt z(t) = X j( ω γ) e dω= X j ω'e d ω ' = e x(t) X j ( ) ( ) π π [ ] Ω [ ] jk Ω n DTFS, e x n X k k jk ω t FS, ω [ ] e x(t) X k k [ ] DTFT ( Ω Γ ) jγt j( ) e x n X e jt γ FT ( ) e x(t) X j( ω γ)
Example on Frequency Shift for FT for t π x(t) = for t >π e for t for t π >π jt jt z(t) = = e x(t).4..8.6.4. x(t) -π π Time t -3 - - 3.5 Re{z(t)}.5 -.5 - -π π Time t -.5-3 - - 3 7 X j sin sinc ω ( ω ) = ( ωπ ) = π ( ω) 6 5 4 3 X(jω) Z(jω) Z j sin ( ω ) = πsinc ω ( ω ) = ( ω π) ( ) - - -5 - -5 5 5 Cyclic frequency ω
Example on Frequency Shift for DTFT [ ] n [ ] DTFT ( jω ) xn=α un Xe = α e = = α e ( jω) ( j( Ωπ/4) X e ) Z e π j n π j n j( Ωπ/ 4) [ ] 4 n [ ] 4 = α = [ ] zn e un e xn jω
Scaling τ ω j FT ω j t a ω z(t) = x(at) Z ( jω ) = x(at)e dt = x( )e d X j a τ τ= a a Example on rectangular pulse: a=½.4..8.6.4. - Time t -3 - - 3 ω ( ω ) = sin( ω) X j x(t) 4 3.5 3.5 x(t).5.5 -.5 FT ( ω) X j - - -5 - -5 5 5. 4.. 8. 6. 4. z(t)=x(½t) - Time t -3 - - 3 ω Zj sin sin ½ ω/½ ½ ω ( ω= ) = ( ω)
x(t) FT Scaling for Analogue Time Functions Continous Time Fourier Transform ( ω) X j τ ω j FT ω j t a ω z(t) = x(at) Z ( jω ) = x(at)e dt = x( τ)e dτ= X j a a a Continous Time Fourier Series x(t) FS, ω [ ω] X j a = any real number [ ] ω [ ] FS,aω jka t z(t) = x(at) Z k = x(at)e dt = X k T T/a a
Scaling for Discrete Time Signals p = any integer number Discrete Time Fourier Transform DTFT [ ] ( j Xe Ω ) xn [ ] [ ] [ ] zn xpn x pn ( Ω) Ze DTFT = = z j jωn = x[pn]e z n= Ω Ω j n j p p z z n= = x[n]e = X(e ) x[n] x z [n] z[n] n n n Discrete Time Fourier Series DTFS, Ω [ ] Xk [ ] xn [ ] [ ] [ ] DTFS,pΩ [ ] [ ] = = = z n x pn x pn Z k px k z z
Differentiation in Time Continuous Time Fourier transform, FT j t jωt x t X j e d X j x t e dt ω () = ( ω) ω ( ω ) = ( ) π d x t X j ( j ) e d ( j )X j dt jω t FT () = ( ω) ω ω ω ( ω) π () ( ) d x t FT (j )X j dt Continuous Time Fourier Series, FS = ω ω [ ] [ ] = = jkωt jkωt x(t) X k e X k x(t)e dt n= d x t jk X k dt T FS, ω () = ω [ ] T
Differencing in Time Discrete Time Fourier transform, DTFT n [ ] = [ ] [ ] = [ ] [ ] yn xk xn yn yn k= jω jω jω jω X(e ) = Y(e ) e Y(e ) [ ] DTFT j j j = Ω Ω Ω x n X(e ) ( e )Y(e ) Discrete Time Fourier Series, DTFS n [ ] = [ ] [ ] = [ ] [ ] yn xk xn yn yn k= [ ] [ ] jkω [ ] = Xk Yk e Yk [ ] DTFS, Ω [ ] [ ] jkω = xn Xk ( e )Yk
Differentiation in Frequency Continuous Time Fourier transform, FT j t jωt x t X j e d X j x t e dt ω () = ( ω) ω ( ω ) = ( ) π d X j x t ( jt)e dt jt x t dω jωt FT ( ω ) = ( ) ( ) d X j dω Discrete Time Fourier transform, DTFT FT ( ω ) jt x ( t ) ( ) d X e = x[ n] e X( e ) = jn x[ n] e dω jω jωn jω jωn n= [ ] DTFT d jω jn x n X(e ) d Ω n=
Differencing in Frequency Discrete Time Fourier Series, DTFS k [ ] = [ ] [ ] = [ ] [ ] Yk Xk Xk Yk Xk m= [ ] [ ] jnω [ ] = xn yn e yn [ ] jn Ω [ ] [ ] [ ] [ ] DTFS, Ω = = xn ( e )yn Xk Yk Xk
Differencing in Frequency Continuous Time Fourier Series, FS [ ] [ ] = = jkωt jkωt x(t) X k e X k x(t)e dt k = k [ ] = [ ] [ ] = [ ] [ ] Yk Xm Xk Yk Yk m= x t = y t e y t () () jω () t j t FS, x(t) = ( e ω )yt Xk= Yk Yk ( ) ω [ ] [ ] [ ] T T
Integration Fourier Transform, FT t d y(t) = x τ dτ y t = x(t) jωy jω = X jω dt ( ) ( ) ( ) ( ) t t t= ω j t ω j t ω j t ( ) ( ) ( ) Y jω = x τ dτ e dt= x τ dτ e x(t)e dt ω j ω j = X(j) πδ( ω ) X(j ω) jω t= t y(t) = x τ dτ Y jω = X jω πx j δ ω jω ( ) ( ) ( ) ( ) ( ) FT where first term equals zero for ω=
Example of Integration u(t) = δ(t)dt Use of the integration formula : Continuous impulse : () t () = δ() Step function : u t t dt Fourier transform : U( j ω ) = π δ ω jω Alternative calculation : Step function: u t sgn t Fourier transform : sgn t j ω δ t () = () () FT ω= FT ω= ( ) ( ) ( ) πδ ω = πδ ω Fourier transform : U( j ω ) = πδ( ω) jω
DTFT Summation n [ ] xk [ ] yn = k= [ ] [ ] [ ] DTFT j j j = = Ω Ω Ω yn yn xn X(e ) ( e )Y(e ) y n Y(e ) X(e ) X(e ) Ω j ( e ) [ ] DTFT jω jω j = π δ( Ω) for π Ω π where first term equals zero for Ω=
Signal Processing Part 3.7 Fundamental Operations and System Properties of Fourier Representations Magnus Danielsen
Fundamental Operations and System Properties of Fourier Representations Convolution Modulation Power spectrum and Parceval relationships Duality Time bandwidth product Auto correlation Cross correlation
Non-periodic Convolution (FT) x(t) FT X jω ( ) h(t) FT H jω ( ) y(t) FT Y jω ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) y(t) = h(t) x(t) = h τ x t τ dτ jωt Y jω = h τ x t τ dτ e dt jωt = h( τ) x( t τ) e dt dτ jωτ h X j e d = τ ω τ = H jω X jω
Non-periodic Convolution (DTFT) [ ] DTFT ( j Xe Ω ) xn [ ] DTFT ( j H e Ω ) h n [ ] DTFT ( j Ye Ω ) yn [ ] = [ ] [ ] = [ ] [ ] y n h n x n h k x n k k = j jωn ( Ω) [ ] [ ] Y e = h k x n k e n= k= k= [ ] [ ] ( jω) ( jω X e ) jωk j Ω(n k) = h k e x n k e = H e n=
Periodic Convolution (DTFS) π DTFS, Ω = [ ] N Xk [ ] xn π DTFS, Ω = [ ] N Y[ k] y n π DTFS, Ω = [ ] N H[ k] h n [ ] = [ ] [ ] = [ ] [ ] y n h n x n h k x n k [ ] = [ ] [ ] Y k N H k X k N
Periodic Convolution (FS) x(t) π FS, ω= T [ ] X k h(t) π FS, ω = T [ ] H k y(t) π FS, ω= T [ ] Y k [ ] = [ ] [ ] T ( ) ( ) y(t) = h(t) x(t) = h τ x t τ dτ Y k T H k X k
Non-periodic Modulation (FT) x(t) z(t) FT FT X jω ( ) Z jω ( ) FT y(t) x(t) z(t) Y j = ω ( ) j 't jωt y(t) z(t) x(t) Z j ' e d ' X j e d ( π) ( π) ( ) ( ) ω ( ) ( ) = = ω ω ω ω π π j ω't jωt j( ω ' ω)t ( ) ( ) ( ) ( ) = Z j ω' e X jω e d ω'dω = Z j ω' X jω e d ω'dω = ω λ ω ω λ jλt Z j ' X j( ' e d 'd ( π) jλt = ( ω ) ( λ ω ) ω λ = ( λ) π jλt e Z j ' X j( ' d ' d e Z j X ( jλ) y(t) = z(t) x(t) Y jω = Z jω X jω π dλ ( ) ( ) ( ) FT
Non-periodic Modulation (DTFT) [ ] DTFT ( j Xe Ω ) [ ] DTFT ( j Z e Ω ) xn z n [ ] = [ ] [ ] yn xn zn DTFT ( j ) Y e Ω y n z n x n Y e Z e X e π [ ] [ ] [ ] DTFT ( jω ) ( jω) ( jω = = )
Parceval Relationships Energy relations for nonperiodic signals: FT () X[ jω] x t jωt Proof : Ex = x() t dt = x () t x() t dt = X [ jω] e dω x() t dt π = X [ jω] X[ jω] dω= X[ jω] dω π π Ex = x() t dt = X[ jω] dω π DTFT [ ] ( j Xe Ω ) xn Power relations for periodic signals: π FS, ω= T () X[ k] x t π DTFS, Ω = N [ ] Xk [ ] xn [ ] ( jω E ) x = x n = X e dω π Px = x t dt = X k T T Px = x n = X k N N π () [ ] [ ] [ ] N
Duality FT FT () [ ω] ( ) π [ ω] x t X j X jt x DTFT [ ] ( j Ω ) ( jt) FS, [ ] xn Xe Xe x k π π N N DTFS, Ω = DTFS, Ω = [ ] [ ] [ ] [ ] xn Xk Xn x k N
Time Bandwidth Product Example.4..8 x(t) 4 3.5 3. 4.. 8 z(t)=x(½t).6.5. 6.4.. 4. -T T Time t -3 - - 3 X j sin T ω ( ω= ) ( ω ).5.5 -.5 - - -5 - -5 5 5 -T T Time t -3 - - 3 ωt Zj sin sint ½ ω/½ ½ ω π π tx ω X = T = 4π tz ω Z = 4T = 4π T T ( ω= ) = ( ω) General rule T d () t x t = () x t dt dt B w ω X ω dω ( ) = X ( ω) dω B w T d
Correlation Functions Continuous signals: Discrete signals: Auto correlation : FT () F( jω) f t ff FT * ( τ ) = ( ) ( τ) ( ω) ( ω ) = ( ω) R f t f t dt F j F j F j FT FT () ( ω) () ( ω) f t F j g t G j fg Cross correlation : FT * ( τ ) = ( ) ( τ) ( ω) ( ω) R f t g t dt F j G j Auto correlation : DTFT jω [ ] F( e ) f n ff DTFT * jω jω jω [ ] = [ ] [ ] ( ) ( ) = ( ) R m f n f n m F e F e F e n= Cross correlation : DTFT jω DTFT jω [ ] ( ) [ ] ( ) f n F e g n G e fg DTFT * jω jω [ ] = [ ] [ ] ( ) ( ) R m f n g n m F e G e n=
Signal Processing Part 3.8 Technical Applications of Fourier representations Magnus Danielsen
Technical Applications of Fourier representations Radar spectrum Filters Accelerometers Geophones Gauss Pulse AM radio
Radar Measurements Spectrum of RF Pulse Train p(t) T T TT t s(t) t x(t) [ ] Pk = e ( ) jkt ω sin ktω kπ S k k 5 k 5 j j [ ] = δ [ ] δ [ ] t ( ω ) jktω sin kt X[ k] = S[ k] P[ k] = δ [ k 5] δ[ k 5] e j j kπ ( ω ) ( ω ) sin (k 5)T sin (k 5)T = e e j (k 5) π j (k 5) π j(k 5)T ω j(k 5)T ω Hint: [ k k ] Z[ k] [ k' k ] Z[ k k' ] Z[ k k ] δ = δ =
Filters LP= Low-pass filter HP= High-pass filter BP= Band-pass filter Analogue filter H(jω) -W W H(jω) -W W H(jω) -W -W W W ω ω ω Digital filter H(e jω ) Ω -π - π -W W π π H(e jω ) Ω -π - π -W W π π H(e jω ) Ω -π - π W W π π BS= Band-stopp filter -W W H(jω) W W ω H(e jω ) -π - π W W π π Ω
The Accelerometer Equation and the Geophone Equation k f m u y d y(t) = v(t) dt α v(t) = voltage in geophone coil u(t) = d u(t) dt u(t) u H G ( j ) dy(t) ωn dy(t) ω ny(t) = dt Q dt H Accelerometer: A ( j ) u (t) dv(t) ω dv(t) d dt Q dt dt n ω nv(t) =α ( ) ( ) ( ω) ( jω) Y j ω = = U ω (j ω ) jωω Q Geophone: ( ) ( ) n n u (t) V jω Y j ω (j ω) α(j ω) ω = = = U jω U j ω /(j ω) ω (j ω ) jωω Q n n
Accelerometer Characteristics -5 - -5-5 - -5 Q=5.5.33 Q=5.5.33 dy(t) ωn dy(t) ω ny(t) = dt Q dt H A ( j ) ω = = Y U ( jω) ( jω) u(t) (j ω ) ω Q jω ω n n u(t) = acceleration to be measured y(t) = displacement -
Geophone Fjøður Geofon húsi Spoli av kopartráði Permanent Magnet A. Barzilai, T Van Zandt, T. Pike, S. Manion, T. Kenny, Stanford University and Jet Propulsion Laboratory, AGU 998)
Geophone Characteristics - - -3-4 -5 5 5 Q=5.5.33 Q=5.5.33 d v(t) ωn dv(t) d u (t) ω nv(t) = dt Q dt dt H G ( j ) ω = = V U ( jω) ( jω) α(j ω) ω (j ω ) jω ω Q n n u (t) = velocity to be measured v(t) = measured coil voltage Quality factor: Q Damping constant: ξ = Q
Gauss Pulse.4.35.3.5..5..5 g(t) = e σ π t/e = σ -5 5 t σ FT g(t) G(j ω) t d t g(t) = e = t g t jω G jω dt π d jt g t ω dω FT () ( ) FT () G( j ) d Differential equation : G j G j dω ( ω ) = ω ( ω) G( ω ) = c e ω.9.8 G( ω ) =σe σ ω g(t) dt = = G( j ω) dω c = π.7.6.5.4 ω /e = σ t σω = ω =σ σ π σ FT General Gauss pulse : g(t) e G( ) e.3.. Uncertainty relation for Gauss pulse: t/e ω /e = σ = 8 σ -5 5
Amplitude Modulated Radio System AM Source Transmitter Channel Receiver x(t) Source coding m(t) r(t)=m(t) cos(ω c t) q(t) LP-filter y(t) cos(ω c t) cos(ω c t) Usually applied AM mode : m(t) = m x(t) where x(t) is the source signal Transmitted signal : r t m t cos t m t e e R( jω ) = M j( ω ω c) M j ωωc jω () () ( ) ()( ) ct jωct = ω c = ( ) ( ) ( ) Received signal: q t r t cos t FT = ωc ( ) ( ( )) Q( jω ) = R( j( ω ω )) ( ( )) c R j ωωc = M j( ω ω c) M jω M j( ω ωc) 4 4 ( ) ( ) ( )
AM Radio - Spectrum FT () ( ) x ( t) X ( jω) Source signal x t and spectrum X jω : () ( ) Source - coded signal m t spectrum M jω : FT AM ( ) = ( ) ( ω ) =δ( ω) ( ) FT DSB () = () ( ω ) = ( ) FT odulation SSB : m() t = x () t jxˆ () t M ( jω ) = X ( jω) sgn ( jω) X ( jω) () () Amplitude modulation : m t m x t M j j m X jω Double-sideband modulation : m t x t M j X jω Single-sideband m where xˆ t is the Hilbert transform of x t. AM, DSB, and SSB are all amplitude modulations, but frequently only AM is named amplidtude modulation. SSB requires more sophisticated modulation method than sketched here. ( ) ( ) ( ω ) = δ( ω ) ( ω) Usually applied AM mode: m t = m x t m ( j ) ( ( ) ) c mx j c j c mx j c for positive frequencies M j j mx j Transmitted signalspectrum : R ( jω ) = M ( j( ω ω c) ) M ( j( ωωc) ) = δ( ( ω ω )) ( ( ω ω )) δ( ωω ) ( ( ωω )) for negativ frequencies
AM Radio Signals and Spectra Time signal (m=½) Sine signal Square signal Sawtooth signal x(t).5.5.5 -.5 -.5 -.5 -...3.4.5 -...3.4.5 -...3.4.5 r(t) - - - -...3.4.5.5 5 5.5 5 5 -...3.4.5 Spectrum (positive frequencies,and m=½ ) X ( jf ) R( jf).5 5 5.5 5 5.4. -...3.4.5 5 5.5 5 5
Signal Processing Part 4. Sampling of Signals Magnus Danielsen
Sampling and Reconstruction of Analogue Signals Sampling Relations between FT, FS, DTFT & DTFS Impulse sampling method Spectral properties of sampled signal Aliasing Examples of aliasing Reconstruction of continuous-time signals Applications
Sampling x() t T t Frequency property of x t : x t X jω () FT ( ) ( ) Sampling at times t = nt: x ( nt) = x[ n] Frequency property of x n : x n [ ] [ ] DTFT ( j X e Ω ) Practical sampling requires that: x(t) is described by a number of discrete values x[n] at discrete times t=nt s Number of samples N is finite x[n] can be periodised, and described by DTFS resulting in a discrete spectrum X[k] x(t) has a spectrum described by X(jω) The spectrum of x(t) is obtained by 4 relations between FT, FS, DTFT, and DTFS
FT to FS Relation FS ( ) X[ k] FT πδ ( ω) ω πδ ( ω ω ) x t jk t FT e k FS for e jk ω t FT for e jk ω t k π ω k kω = ω = π δ ω ω x t X k e X j X k k () [ ] jk ω ( ) [ ] ( ) t FT k= k=
DTFT to DTFS Relation DTFS [ ] X[ k] DTFT πδ( Ω) x n for ( Ω k ) jkωn DTFT e m m= π< Ω < π π δ Ω π DTFS for e jk Ω n DTFT for e jk Ω n...... N N k k N k N k...... π π k Ω π Ω kω π kω N jkω [ ] [ ] ( ) n DTFT jω = = π [ ] δω ( kω πm) xn Xke Xe Xk k= k= m=
n= () FT to DTFT Relation DTFT [ ] ( jω X e ) x n FT δ() t FT ω s ( t nts ) e ( ) δ j T n Ω =ωt xδ t = Xδ jω = FT x[ n] δ( t nts ) X e = x n e Ω=ωTs n= x[ n] ( jω ) ω s [ ] DTFT : s Sampling interval: T j T n ( j ) X e Ω s π = ω...... n...... π π Ω x δ () t FT : X j δ ( ω)...... T s t...... π T s π T s ω
... N DTFS [ ] Xk [ ] xn jkω [ ] [ ] ( ) n DTFT jω = = π [ ] δ( Ω Ω ) x n X k e X e X k k k= k= FT () ( jω) ( jω ) δ = x t X e X e δ N x x[ n] δ () t FT to DTFS Relation Ω=ωT = π δ ω X[ k] T s( k ) k= Ts n N... n s Ω Ω =ωt s Sampling interval: T Xk [ ]...... N X δ ( jω) N s π = ω k... NT s NT s... t...... π T s π T s k
Sampling Impulse Sampling Method x() t T s t Frequency property of x t : x t X jω () FT ( ) ( ) Sampled signal at times t = nt : x nt = x n Frequency property of x n : x n s ( ) [ ] [ ] [ ] DTFT ( j X e Ω ) s Impulse sampled signal : Spectrum of impulse sampled signal : () = δ( ) pt t nt n= () = [ ] δ( ) = δ( ) ( ) ( ) n= Xδ jω = X jω P jω π ( ) ( ) ( ) s x t x n t nt x(nt) t nt =x t p t δ s s s n=
... Spectrum for Sampled Signal () () x t T s p () t xδ ( t) = x( t) p( t)... t T s t Xδ jω = X jω P jω π ( ) ( ) ( ) FS = δ s n= Ts () ( ) p t t nt = T δ = T [ ] () jkωt P k t e dt FT π π π p() t = δ( t nts ) P(j ω ) = π P[ k] δ ω k = δ ω k n= k= Ts Ts k= Ts Xδ ( jω ) = X( jω) P( jω) π π π π = ω δ ω = ω T T T T X( j ) k X k π s k= s s k= s s Ts s
Spectrum for Sampled Signal () x() t xδ ( t) = x( t) p( t) X(jω) T s t -W W ω p () t P ( jω)...... t T s X δ (jω)... ω = s π T s... ω...... ω s ω s -W W π ω s = T π Xδ ( jω ) = X( jω) P( jω ) = X ω k T T π s k= s s ωs ω
Sampling with Rectangular Pulses () x() t Frequency property of x t : x t X jω () FT ( ) ( )... T s p () t τ... T t s τ T s s ( ) = ( ) ( ) x t x t p t x( t) t t s () [ ] jk ω = t FS [ ] p t c k e c k k= ( ) Frequency property of x t : jkωst () = () () = [ ] () x t p t x t c k e x t ωs [ ] () [ ] () k= FT jωt Xs( jω ) = xs( t) e dt k= k= jk t jωt c k e x t e dt = ( ω ω ) j k s t c k x t e dt s = = c k X( ω k ω ) k= [ ] s
Spectrum for Rectangular Pulse Sampled Signal X(jω) x t X jω ( ) FT ( ) -W W X s (jω) ω s c[k]=c[ω=kω s ] ( ) [ ] X jω = c k X( ω k ω ) k= s...... ω ω s -W W π ω ω s s The distribution of X s (jω) on the ω-axis is the same as for the ideally sampled signal ω = s T s
Signal Processing Part 4. Aliasing and Reconstruction of Sampled Signals Magnus Danielsen
Sampling with no aliasing error Aliasing X δ (jω)...... s ω s ω s Sampling on the limit to aliasing error -W W X δ (jω) π ω s = T s ωs ω W < ω...... ω 3 s ω Sampling with aliasing error s ω s -W W X δ (jω) π ω s = T s ωs 3ω s ω ω W = s...... ω 3 ω Nyquist Sampling Theorem: s ω s -W W s The condition for reconstruction of a sampled signal x(t) is that the maximum bandwidth W of the sampled signal x(t) shall be less than half of the sampling frequency, or W < ½ ω s = π/t s. ω s is called the Nyquist cyclic frequency, and f s = ω s /π is the Nyquist sampling frequency. (Geophysisists name f s = ω s /π the Nyquist frequency) s π ω = T s ωs 3ωs ω ω W > s
DTFT of Sampled Signal Spectrum A sampled signal having the frequency spectrum X δ(j ω) corresponds to the time signal x (t). Therefore the sampling values are DTFT jω [ ] ( ) xn Xe = X(j ω) 4π π δ δ ω= Ω T j X( e Ω )...... s -WT s WT s π 4π...... 4π π j X( e Ω ) -WT s WT s π 4π Ω Ω WT s < π WT s = π j X( e Ω )...... WT s >π 4π π-wt s WT s π 4π Ω
Example: Sampling a Sinusoidal Signal Signal: x () t = cos( πt) Sampling time: Ts. 8. 6 x () t X(j ω). 4. -. -.4 -.6 8π 4π π π 4π 8π ω -.8 -. 8. 6. 4. -. -.4 -.6 -.8 -. 8. 6. 4. -. -.4 -.6 -.8 -. 8. 6. 4. -. -.4 -.6 -.8 - -4-3 - - 3 4 () t -4-3 - - 3 4 x () t -4-3 - - 3 4-4 -3 - - 3 4 x x () t 8π 4π 8π 4π 8π 4π π π π X(j δ ω) π X(j δ ω) X(j δ ω) 4π π 4π ω = π π 4π ω = π s 8 8π ω = π...... s...... 4 s 3 8π 8π ω ω ω Ts = 4 Ts = 3 Ts =
Aliasing of Moving Wheel in Movies Sampling time: T s ω (rad/s) ω (rad/s) ϕ=ωt s <π ϕ =ωt s >π No aliasing error: Correct apparent rotation direction and angle frequency ω a = ω Aliasing error : Wrong apparent rotation direction and wrong apparent angle frequency ω a = (π - ϕ)/t s = π/t s - ω
Reconstruction of Continuous-time Signal () X(jω) Sampling with no aliasing error ω s ω s -W W X δ (jω)...... s -W W H(jω) π ω s = T s ω ωs ω W< B< s ω W < ω B B ω
FT FT () ( ω ) hr( t) Hr( jω) x t X j δ Reconstruction of Continuous-time Signal () δ Filter with bandwidth B = ω s / FT ( ) Y( jω) y t H r Ts for ω< jω = for ω> ( ) ωs ω s T () s ωs ωs hr t = sin t = sinc t πt π y t = h t x t = h t x n δ t nt = x n h t nt () () () () [ ] ( ) [ ] ( ) r δ r s r s ω = [ ] π s x n sinc (t nt s)
Reconstruction of Continuous-time Signal (3) 5 4 3 - - -4-3 - - 3
Practical Reconstruction Zero-order Hold Zero-order hold Anti-imaging filter y[ n ] y [ n] yt ( ) xt ( ) yt () y[ n] yn [ ]
Multipath Communication Channel - Reflections from Environment () Two-path communication channel Discrete-time model DTFT j [ ] Xe ( Ω ) xn FT () X( jω) x t jω ( ) jω ( ) FT () H( jω) h t FT j [ ] He ( Ω ) hn Y e jω H( e ) = = a e X e ( ω) ( ω) Y j H( jω ) = = αe X j jω ( ) s ω j T ( diff ) () ( ) ( ) y t x t x t T FT = α diff j Tdiff ( ω ) = ( ω )( α ) Y j X j e ω [ ] [ ] [ ] yn xn axn DTFT = j ( Ω j j ) = ( Ω )( Ω ) Y e X e a e π /Ts Ts MSE H j H j d a min π/t ( ) ( ) ( ) δ = ω ω ω= αγ α γ π ( ) MSE =α γ for a =αγ j j Ts ( ω ) = ( Ω ) = ( ) H j H e a e ω δ Ω=ωT s
j T ( ω ) = ( α diff ) H j e ω Multipath Communication Channel Reflections from Environment () j T ( ) ( s ) H j a e ω δ ω = π /Ts T s MSE H ( j ) Hδ ( j ) d π π/t s s π /Ts T s = α ω π = ω ω ω π/t jωtdiff jωts e a e d.7.6.5 γ =α a αa* γ α*a γ* ( ) = a αγ α γ.4.3 π/t s Ts ω j (Tdiff T s ) Tdiff T s γ= e d sinc ω= T π π/t s s.. min ( ) MSE =α γ for a =αγ.5.5 T diff /T s
Basic Discrete-time Signal Processing System for Analogue Signals x( t ) x ( t ) xn [ ] yn [ ] y ( t ) y( t) Antialiasing filter a Sampling at interv.t s. Discretetime processing Sample and hold Antiimaging filter x( t ) y( t) Equivalent continuous-time system G(jω)
Signal Processing Part 5. Discrete Fourier Transform (DTF) for nnumerical Evaluation Magnus Danielsen
Discret Forier Transform (DTF) and Fast Fourier Transform (FFT) DTFS is the only Fourier representation capable of exact numerical evaluation DTFT related to DTFS FS related to DTFS FT related to DTFS DFT = Discrete Fourier Transform definition and reasons FFT = Fast Fourier Transform = efficient algorithms for calculating DTFS FFT with decimation in time FFT with decimation in frequency FFT and IFFT use nearly same algoritme
Periodicing of Finite Signal Duration Finite duration signal : xn [ ] M- N n [ ] xn [ ] xn for n< M = for n< n M M N M DTFT j jωn [ ] ( Ω ) = [ ] xn Xe xne n= = N n= [ ] xne Ω j n xn [ ] period M- N N n Periodiced signal : [ ] = [ ] = [ ] xn xn xn mn periodised m= N xn Xk xne N DTFS jkω [ ] [ ] = [ ] n= n
[ ] DTFT Related to DTFS Finite duration signal : x n [ ] x n for n < N = for n < n N π [ ] ( ) DTFT x n = X e e dω X( e ) = x[ n] e π π N jω jωn jω jωn Periodiced signal : n= Some relations : dω=ω = Ω= kω π N [ ] = [ ] = [ ] xn xn xn mn periodised m= N xn Xk xne N DTFS jkω [ ] [ ] = [ ] n= X k X e X e N N [ ] ( jω ) ( jkω ) = Ω= kω = n π N N jω k jω kn jω kn jω jωn x[ n] = X( e ) e dω X( e ) e = X [ k] e π N π k= k=
Periodic continuous signal : FS Related to DTFS N jkωt jkωnts FS () ( ) [ ] () [ ] = = T x t x t T X k x t e dt x n e T s T T n= Some relations : T = NT ω T = π ω T = π ω = Nω ω T = Ω = s s s s s π N Discrete periodic signal (sampled signal) : N xdisc n = x nts Xdisc k = x n e N DTFS jkω [ ] ( ) [ ] [ ] disc [ ] = [ ] n= X k X k π ω Ts=Ω = N n
FT Related to DTFS Finite duration signal : () x t () x t for t < T = for t < t T T jωt x t X j x t e dt FT () ( ) () ω = Periodiced signal : () = () = ( ) x t x t x t mt periodised T m= jkωt x t X k x t e dt FS () [ ] = () T Discrete periodic signal (sampled signal) : N xdisc n = x nts Xdisc k = x n e N DTFS jkω [ ] ( ) [ ] [ ] n= n Some relations : T = NT ω T = π ω T = π ω = Nω ω T = Ω = s s s s s π N ω [ ] [ ] [ ] s Xdisc k = X k π = X k = X jk T NT N ω Ts=Ω = N s
Discrete Fourier Transform (DFT) Definition and Reasons DTFS is the only Fourier representation capable of exact numerical evaluation DTFS (period N) relates directly to DTFT (finite time interval N) DTFT represents (nonperiodic) energy signals DTFS represents (periodic) power signals Nonperiodic signals restrictet to a time interval N, and correspondingly periodiced signals with period N, energy E and power P are proportional (E=P N). Correspondingly X DTFT =N X DTFS Resonably Discrete Fourier Transform (DFT) for a finite interval (N) signal is defined as a transform of an energy signal as N times the DTFS Consequently DFT is a numerical discrete method to calculate the DTFT for an energy signal.
DFT Formulation for Calculation of DTFT Finite duration signal, and DTFT : π [ ] ( ) DTFT x n = X e e dω X( e ) = x[ n] e π π Periodiced signal, and DTFS : N jω jωn jω jωn DTFS xn [ ] = Xke [ ] Xk [ ] = xne [ ] N N N jkω n jkω n k= n= n= Discrete Fourier Transform(DFT) formulation for calculation of DTFT of finite duration signal : DFT xn [ ] = Xke [ ] Xk [ ] = xne [ ] N N N jkω n jkω n k= n=
[ ] Matrix Formulation of DFT () DFT x[ n] = X[ k] e X[ k] = x[ n] e N N N jkω n jkω n k= n= X...... x Ω j jω j3ω jkω j(n ) Ω [] e e e... e... e X x [] jω j4ω j6ω jkω j(n ) Ω X[ ] e e e... e... e x[ ] [ ] j3ω j6ω j9ωn j3kω j3(n ) Ω X 3 e e e... e... e x3 [ ] =.............................. jkω jkω j3kω jnkω j(n )kω X[ k] e e e... e... e x[ n].............................. [ ] X N- j(n ) Ω j(n ) Ω j3(n ) Ω jn(n ) Ω j(n ) Ω e e e... e... e x[ N ] x[ ]...... X[ ] jω jω j3ω jkω j(n ) Ω x [] e e e... e... e [] X jω j4ω j6ω jkω j(n ) Ω x[ ] e e e... e... e X[ ] j3ω j6ω j9ωn j3kω j3(n ) Ω x[ 3] e e e... e... e [ ] X 3 =... N........................... jnω jnω jn3ω jnkω jn(n ) Ω x[ n] e e e... e... e X[ k].............................. x[ N ] j(n ) Ω j(n )Ω j(n )3Ω j(n )kω j(n ) Ω e e e... e... e [ ] X N- [ ]
Matrix Formulation of DFT () DFT [ ] X[ k] x n X= W x N x= WN X N W W = U N N N N = unity matrix W N =...... e e e... e... e e e e... e... e e e e... e... e........................ jkω jkω j3kω jnkω e e e... e... e........................ e e e... e... e W N Ω j jω j3ω jkω j(n ) Ω jω j4ω j6ω jkω j(n ) Ω j3ω j6ω j9ω n j3kω j3(n ) Ω j(n )kω j(n ) Ω j(n ) Ω j3(n ) Ω jn(n ) Ω j(n ) Ω...... e e e... e... e e e e... e... e e e e... e... e =........................ e e e... e... e........................ j( N ) j( N ) j( N )3 j( N )k j( N ) e e e... e... e jω jω j3ω jkω j(n ) Ω jω j4ω j6ω jkω j(n ) Ω j3ω j6ω j9ω n j3kω j3(n ) Ω jnω jnω jn3ω jnkω jn(n ) Ω Ω Ω Ω Ω Ω
Matrix Formulation of DFT (3) N N N N jkωn kn DFT jkωn x[ n] = X[ ke ] = X[ kw ] X[ k] = x[ ne ] = x[ nw ] N N w= e = e Ω j k= k= n= n= π j N [ ] [] [ ] [ ] [ ] [] [ ] [ ] X...... x X X w w w... w... w x[ ] 3 6 9 3n 3(N ) X 3 w w w... w... w [ ] x 3 =.............................. k k k 3 k n k(n ) X[ k] w w w... w... w x[ n].............................. [ ] (N ) (N ) (N )3 (N ) n (N ) X N- w w w... w... w x[ N ] 3 n (N ) w w w... w... w [] x 4 6 n (N ) x...... X 3 k ( N ) x w w w... w... w X [] 4 6 k (N ) x w w w... w... w X[ ] 3 6 9 3k 3(N ) x3 w w w... w... w X[ 3]... = N........................... n n n3 n k n(n ) x[ n] w w w... w... w Xk [ ].............................. x[ N ] ( N ) (N ) (N )3 (N ) k (N ) w w w... w... w [ ] X N- [ ] [ ] kn
Matrix Formulation of DFT (4) DFT [ ] X[ k] x n X= W x N x= WN X N W N =...... w w w... w... w w w w... w... w w w w... w... w........................ w w w... w... w........................ w w w... w... w 3 k (N ) 4 6 k (N ) 3 6 9 3k 3(N ) n n n 3 n k n(n ) (N ) (N ) (N )3 (N ) k (N ) W W N N N = U = N unity matrix W N =...... 3 k w w w... w... w w w w... w... w w w w... w... w........................ w w w... w... w........................ ( ) w w w... w... w ( N ) 4 6 k (N ) 3 6 9 3k 3(N ) n n n3 nk n(n ) N (N ) (N ) 3 (N )k (N )
Signal Processing Part 5. Fast Fourier Transform (FFT) an Efficient Algorithm for Numerical Evaluation of DFT Magnus Danielsen
Number of Addition and Multiplications DFT x[ n] = X[ k] e X[ k] = x[ n] e N N N jkω n jkω n k= n= Using DTFS directly Number of complex multiplication = (N-) Number of complex additions = N(N ) Using FFT algorithms : Number of complex multiplication = (N/) log (N/) Number of complex additions = N log (N)
Ω j w = w = e = e x N/ x N N FFT Algorithm Decimation in Time [ ] [] [ ] [ ] π j N Wpn N N w = wn = X... x 3 (N ) w w w... w X x [] 4 6 (N ) X w w w... w x[ ] 3 6 9 3(N ) Ω w w w... w X 3 x [ 3]..................... =... ( N/ ) ( N/ ) ( N/ ) 3 ( N/ )(N ) X[ N/-] w w w w x[ N/-]... ( N/) ( N/) ( N/) 3 ( N/ )(N ) [ ] X N/ w w w w x[ N/]........................ X[ N-] ( N ) (N ) (N )3 (N ) w w w... w x[ N-] = w pn [ ] W W W = X W N/ W x N d W N/ odd index X N/ d N/ x N/ evenindex π j N/ N/ = = N = w e w w W d... wn/... wn/... = 3 w N/..................... ( N/ )... w N/
k = FFT Algorithme Decimation in Time Fourier Transform X[k] for N=8 n = x[] X[] x[4] x[] x[6] x[] x[5] x[3] x[7] w N/ w N/ w N/ w N/ w N w N w N 3 w N X[] X[] X[3] X[4] X[5] X[6] X[7]
FFT Algorithm Decimation in Frequency π j N pn N N W N pn = w w = wn = X [ ]... x [ ] (N/ ) N/ (N ) [] w w w... w X x [] (N/ ) N/ (N ) X [ ] w w w... w x [ ] x 3 3(N/ ) 3N/ 3(N ) N/ [ ] w w w... w X3 [ 3] =........................... ( N/ ) ( N/ ) (N/ ) X½N- [ ] ( N/ ) N/ ( N/ )(N ) w w w w x½n- [ ]... ( N/) X[ ½N] w ( N/ ) (N/ ) ( N/ ) (N/) ( N/ )(N ) w w w x½n [ ] x........................ N XN- [ ] (N ) (N )(N/ ) (N ) N/ (N ) w w w... w xn- [ ] Ω j w = w = e = e W W W X = X odd inde x W N/ WN/ W x d N N/ N/ d evenindex xn/ π j N/ N/ = = N = w e w w... w... =.................. ( N/ )... w N/ N/ wn/... Wd w 3 N/...
k = FFT Algorithme Decimation in Frequency Fourier Transform X[k] for N=8 n = x[] X[] x[] x[] x[3] x[4] x[5] x[6] w N w N w N X[4] X[] X[6] X[] X[5] X[3] X[7] x[7] 3 w N w N/ w N/ w N/ w N/
IFFT Algorithm Decimation in Frequency Ω j w = w = e = e N [ ] [] [ ] [ ] π j N x... X 3 (N ) w w w... w x X [] 4 6 (N ) x x w w w... w X[ ] N / 3 6 9 j3(n ) Ω x3 w w w... w X[ 3]..................... =... N ( N/ ) ( N/ ) ( N/ ) 3 x[ N/ ] ( N/ )(N ) w w w w X[ N/-]... ( N/) ( N/) ( N/) 3 x[ N/] ( N/ )(N ) w w w w X [ N/ ] x N........................ x[ N ] (N ) (N ) (N )3 (N ) w w w... w [ ] X N- W W W N/ d N/ x N / Xevenin dex = xn N WN/ Wd W Xoddindex N/ π j N/ N/ = = N = w e w w Wpn W = d w pn N N w = wn = [ ]... wn/... wn/... = 3 w N/..................... ( N/ )... wn/
k = IFFT Algorithme Decimation in Frequency Time Function x[n] for N=8 n = X[] x[] X[4] X[] X[6] X[] X[5] X[3] X[7] w N/ w N/ w N/ w N/ w N w N w N 3 w N N N N N N N N N x[] x[] x[3] x[4] x[5] x[6] x[7]
Ω j w = w = e = e [ ] [] [ ] [ 3] N x x x x... = x½n [ ] x½ [ N]... x[ N ] IFFT Algorithm Decimation in Time π j N Wpn = w... w w w... w w w w... w w w w... w..................... N ( N/ w ) ( ) ( ) w w w... ( N/) ( ) ( ) ( ) w w w w.................. w w w... w pn (N/ ) N/ (N ) (N/ ) N/ (N ) 3 3(N/ ) 3N/ 3(N ) ( ) N/ (N/ ) N/ N/ N/ (N ) N/ (N/ ) N/ (N/) N/ (N ) (N ) (N )(N/ ) (N ) N/ (N ) N N w = wn = [ ] [] [ ] [ ] X X X X3... X½N- [ ] X½N [ ]... XN- [ ] X N/ X N W W W = x N X N/ N/ d x evenindex XN/ oddindex W N/ WN/ W N d π j N/ N/ = = N = w e w w W d... wn/... wn/... = 3 w N/..................... ( N/ )... wn/
k = IFFT Algorithme Decimation in Time Time Function x[n] for N=8 n = X[] x[] X[] X[] X[3] X[4] X[5] X[6] X[7] w N w N w N 3 w N w N/ w N/ w N/ w N/ N N N N N N N N x[4] x[] x[6] x[] x[5] x[3] x[7]
Matlab for Calculation of DFT (FFT) Matlab Fourier representation is based on DTF (FFT) calculations Spectrum calculation of x(t): Define sampling interval T s Define t-range T for sampling (e.g. t=[:t s :T]) Number of samples N=T/T s Define corresponding frequency range (e.g. f=[:/t:/t s ] (or cyclic frequency ω=πf) Matlab command X=fft(x) calculates N DFT-samples Spectrum of x is obtained: Magnitude spectrum: plot(f,abs(x)) Phase spectrum: plot(f,angle(x)) Time function calculation of X(f): Matlab command x=ifft(x) calculates N samples of IDTF x is generally a complex number, but usually very near real, when x(t) represents a physical quantity Time function is therefore found by x(t)=real(x) A measure of approximation error is the imaginary part denoted by imag(x) Example of fft calculation: Ts=.; T=; N=T/Ts; t=:ts:t; f=:/t:/ts; w=*pi*f; x=exp(-t); X=fft(x); subplot(,,); plot(f(:5),abs(x(:5))); subplot(,,); plot(f(:5),angle(x(:5)));
Useful Matlab Commands For vectors of sampled values x and y of time dependent physical functions x(t) and y(t) we can calculate: Convolution: x y=conv(x,y) Crosscorrelation: R xy =xcorr(x,y) Autocorrelation: R xx =xcorr(x,x) p-multiple zero padding when FFT: fft(x,p) p-multiple zero padding when IFFT: ifft(x,p) Performing DTFS: x[n]=n ifft(x) X[k]=/N fft(x)
Signal Processing Part 6. Laplace Transform Principles Magnus Danielsen
Laplace Transform st Bilateral (double sided) : x t X s x t e dt L () ( ) = () st Unilateral (single sided) x t X s x t e dt Inverse Laplace Transform x t L () ( ) = () σ j () ( ) = σ j st X s e dt s-plane jω s=σjω σ σ Integration loop for evaluation of inverse Laplace transform Fourier transform: s = jω X(s) = X(jω)
Eigenvalue Property of e st st ( ) = e ( ) ( ) xt H { } st ( ) y t = H x t = e H s Operator formulation : y t ( ) = H x ( t) () () { } { } () () () ( ) Convolution : y t = H x t = h t x t = h τ x t τ dτ st ( τ) st s st h e d e h e d e H s ( ) τ s Transfer function eigenvalue : H s h e d () Eigenfunction : x t = e Eigenvalue : H(s) st () () τ ( ) ( ) = τ τ= τ τ= = = τ τ
Region of Convergence - ROC L st Causalsignal : x(t) = x () t X ( s ) x () t e dt t< = jω s-plane σ ROC: Re(s)>σ Example: Causal exponential signal: x t e at u t e at u t e st dt = = s L () () () ROC : Re(s) > a a L () ( ) () Anti causalsignal : x(t) x t X s x t e st dt t> = = jω ROC: Re(s)<σ s-plane σ Example: Anti-causal exponential signal: at at st L x( t) = e u( t) e u( t) e dt = s a ROC : Re(s) < a
Unilateral Laplace Transforms Relations for Causal Signals Given Laplace transforms : L () X() s L () Y() s x t y t L ( ) ( ) ( ) ( ) Linearity ax t by t ax s by s ( ) Scaling x at s a a L X L as ( ) ( ) st L () ( ) L () () () () Time shift x t a e X s s-domain shift e x t X s s Convolution x t y t X s Y s L d Differentiation in s-domain t x () t X () s ds d L Differentiation in time x t s X s x dt t - s () () ( ) Integration x t dt X s s L () () () ( ) Initial value theorem lim (s X s ) = x Final value theorem lim (s X s ) = x s () ( )
Some Basic Transform Pairs and use of Integral Relation Delta function Step function L : δ(t) t L = δ - ( ) () : u(t) t dt t L = - () Ramp function : t u(t) u t dt t L = - s s t u(t) t u() t dt 3 s n- t L u(t) n n-! s
Inverse Laplace Transforms of a Rational Function Commonly occuring Laplace transform in engineering is of the form of a rational function with real coefficients a and b : X(s) X(s) has: Decomposition of X(s) ( s ck ) ( ) M M M m M M m k= N N n N N N n k= k b s b s... b s b = = a s a s... a s a s d N ' k N ' k M N bs k k k M N bs = k k= k k= k N k k= k N as k k s d = k= k X(s) = α s = α s M N k R N P k ks = r= k= = α M real or complex zeros c, where the nominator is zero with real and complex poles into a sum of simpler function: e k,r ( s d ) The inverse Laplace transform x(t) of X(s) k r ( ) where R is the multiplicity (order) of the poles. is obtained using inverse Laplace transform for each of these simpler terms k N real or complex poles d k, where the denominator is zero Complex poles and zeros occur in complex pair when present k k
Alternative Decomposition With Complex Pol-pairs Present Decomposition of X(s) with real and complex poles, into a sum of simpler function The complex poles are paired giving quadric forms in the denominator. N ' k M N bs k k= k M N k= k N k k= as k= k X(s) = α s = α s R M N k k,r k,r k,r s k= r= k= ( s dk ) r= k= ( s γ ksζk) = α k k N ' k bs k= k ( s dk) ( s γ ksζk) real poles R e f s g complex pole pairs k r r and real poles only and complex pole pairs only where R is the multiplicity (order) of the poles. Th e inverse Laplace transform of X(s) is obtained using inverse Laplace transform for each of these simpler terms
Laplace Transform Pairs of some Basic Functions Single pole,real or complex = d : e dt L u(t) - multiple pole = d : dt L t e u(t) n - multiple pole = d : ( s d) n t dt L e u(t) ( n )! ( s d) Complex pole pair = ±jω : sin ( t) ω s cos( t) s s Complex pole pair = -a ± jω : L ω ω L ω ω ( ) at L e sin ωt ω ( ) s d n ( s a) ( s a) ( s a) at L e cos ωt ω ω - multiple complex pole pair = ±jω : ( ) ( ) ( t) L ω ( ) L ω -a t L e t sin ωt -a t L e t cos ωt -a t t sin t cos t ωs ( s ω ) s ( s ω ) L ω t cos( ωt) sin( ωt) ω ω ( s ) -multiple complex pole pair = -a ± jω : e ω ω ω ( s a) (( s a) ω ) ( s a) ω (( s a) ω ) ( ) ( ) L t cos ωt sin ωt ω (( s a) ω )
Examples of Decomposition of Laplace Transforms: 3s 5 Three single real poles: X(s) = = ( s )( s )( s 3) ( s ) ( s ) ( s 3) t t 3t () = x t e e e Multiple real poles : 3s X(s) = = () ( s )( s 4) ( s ) ( s 4) ( s 4) x t = e e t e t 4t 4t real pole and complex pole - pair : ( ) ( ) ( ) ( ) t ½t () ( ) ½t = ( ) s s X(s) = = ( s )( s s ) ( s ) ( s s ) ( ) ( ) 3 s ½ s ½ ¾ = = 3 ( s ) s ½ ¾ s s ½ ¾ s ½ ¾ x t e e cos ¾t e sin ¾t ( ) (( ) )
Solving Differential Equations with Initial Conditions.7.6.5.4.3...5 -.5 -.5 - x(t) R=k C= µ - y(t) - -.5.5.5 - - x(t) y(t) - - -.5.5.5 3 t L 3 x() t = e 5 5s τ= RC = k µ ( ) y = d y() t y() t = x() t dt RC RC d y () t 5y () t = 5x () t dt sy s y 5Y s 5X s () ( ) () = () 3 5 5X(s) y( ) Y() s = = 5s s 5 s 5 s 3 = = ( s 5)( s ) ( s ) ( s 5) t 5t () = () y t (e 3e )u t
Laplace Transforms in Circuit Analysis - Impedance and Initial Generators Resistance Capacitance Initial voltage = V C ( - ) Inductance Initial current = I L ( - ) V R (s) I R (s) R V C (s) I C (s) sc I L (s) sl v C( ) s V L (s) LI L( ) V C (s) I C (s) C v ( ) sc V L (s) I L (s) V R (s) I R (s) C i() L s sl R
Example of Laplace Transformed Circuit (Low-pass Filter) sl I L( ) L =. L () V s = s sc R R v C ( ).5 v C = ( ).3 = s s s s sc V R (s)
Bilateral Laplace Transform Properties Definition: x(t) for < t < ROC must be given for the transform x(t) found from X(s) depends of given ROC Calculation rules same as for unilateral exept differentiation, where x( - ) does not appear: dx(t)/dt has the transform sx(s) Care must be taken to ROC.
Example of Bilateral Laplace Transform and Inverted Time Function Laplace transform :X(s) Region of convergence( ROC): < Re(s) < = = 3 4s 6s ( s )( s 3 ) ( s ) ( s ) ( s 3) ( s 3) x = poles ROC s-plane x x x x -3-3 Inverted Laplace transform time function : t t 3t 3t x(t) e = u(t) e u( t) e u(t) e u( t) First and third term are causal Second and forth term are anti-causal
Signal Processing Part 6. The Laplace Transform Transfer Functions Magnus Danielsen
Transfer Function Definition of transfer function H(s)=Y(s)/X(s), where Y(s) and X(s) are output and input signals respectively Initial conditions are zero Causality unilateral transforms Stability all poles are in negative half of s-plane Minimum phase all zeros are in negative halfplane Inverse system transfer function H - (s) of H(s) such that H - (s) H(s)= Frequency response determined by poles and zeros Bode diagrammes Decibel definition: A= log H,where H is a transfer function. A= log(p /P ), where P and P are the output and input powers respectively.
Transfer Function of System Definition and Differential Equation x(t) L X(s) H(s) y(t) L Y(s) Differential equation : M M N N d d d d d d M M M M N N N N () () () () = () () () () b y t b y t... b y t b y t a x t a x t... a x t a x t dt dt dt dt dt dt Initial conditions : M N N d d d d d M () N N For t= it applies that: y =... = y = y t = and x = x =... = x = x = dt dt dt dt dt Laplace transform of differential equation : () () () () = () () () () b s Y s b s Y s... bsy s b Y s a s X s a s X s... a sx s a X s M M N N M M N N Definition of transferfunction : ( s ck ) ( ) M M M m M M m k= K N N n N N N n k= k Y(s) b s b s... b s b H(s) = = = X(s) a s a s... a s a s d
Transfer Function and Impulse Response x(t) L X(s) L ( ) Hs ( ) ht y(t) L Y(s) Laplace transformof output signal : Output signal time function : Impulse response h(t) : ( ) = H( s) X( s) L () = () () () () () =δ() () = () δ () = () Y s y t h t x t,where h t H s x t t y t h t t h t Example on impulse response : H () s = s a x t t X s L () =δ() () = () = () () = () () = () = ( ) Y s H s X s H s y t h t exp at
Stability of a System For a transfer function H(s) with impulse response h(t) holds Stable systems: H(s) contains poles in negative half s-plane only h(t) contains only terms decaying exponentially with time * The system is stable Oscillating unstable systems: H(s) contains poles on the imaginary axis of the s-plane h(t) contains oscillating terms versus time t The system is oscillating unstable Unstable systems: H(s) contains poles in positive half s-plane h(t) contains exponentially increasing terms versus time t The system is unstable ( * impulses can also be present)
Transfer Function - Inverted Transfer Function x t X s () L () h t H s ( ) L ( ) y t Y s ( ) L ( ) d d All initial values are zero for x(t), y(t), and their derivatives N k M k ak y k () t = k k bk x k () t d L k d L k k= dt k= dt y k () t s Y() s x k () t s X() s dt dt Transfer function: () H s () () M M k bs k s ck k= k= K N N k as k s dk k= k= Y s = = = X s ( ) ( ) Inverted transfer function: H N N k as k s dk X() s k = k= () s = = = M M Y() s k K bks s ck k= k= ( ) ( ) The inverted transfer function H - (s) has: Poles equal to zeros of the transfer function H(s) Zeros equal to poles of the transfer function H(s)
Inversion, Example x t X s () L () h t H s ( ) L ( ) y t Y s ( ) L ( ) d d d dt dt dt ( ) () Y s s s 4 Transfer function : H () s = = = s X s s 3 s 3 d Impulse response: h t t t 4e u t dt Inverse transfer function : H 3t () = δ() δ () () () s ( ) () Impulse response : h (t) = u(t)e u(t)e two poles : s =, Inverse system is unstable. () () = () () () y t 3y t x t x t x t t t X s s 3 = = = Y s s s s s
Inversion, Example x t X s () L () h t H s ( ) L ( ) y t Y s ( ) L ( ) Transfer function : H s ( ) () () 3t t () = () () Impulse response: h t e u t e u t ( ) () X s (s 3)(s ) 5 () = = = Y s s 7 s 7 Inverse Transfer function : H s s 8 () = δ () δ () () - 7t Impulse response: h t t 8 t 5e u t d dt Y s s 7 = = = X s s 3 s (s 3)(s )
Magnitude Response (Amplitude Characteristics) Phase Response (Phase Characteristics) x t X s () L () h t H s ( ) L ( ) y t Y s ( ) L ( ) We apply for usually occuring systems M N M M s () ( s ck ) Y s k k c = = k Factorised transfer function : H () s = = K = K ' N N X() s s ( s dk ) k= k= d k Definition of magnitude response : M M jω A = log H( jω ) = log K' log log c k= k k= jω d k Definition of phase response : ( ( )) ( ) Im H jω M N ω ω ϕ= H( jω ) = arctan = K ' arctan arctan Re( H j ) ω k= ck k= dk
Bode Diagram of First-order Real Pole Factor Magnitude response A(ω) (db) Phase response ϕ(ω) (radian) -5 - -5 - -5-3 -35-4 - - -.5 - -.5 - -.5-3 Normalized cyclic frequency ω/ω n -π/ -π Negative real pole -3.5 - - Normalized cyclic frequency ω/ω n Magnitude response A(ω) (db) Phase response ϕ(ω) (radian) -5 - -5 - -5-3 -35-4 - - -.5 - -.5 - -.5-3 Positive real pole (unstable H) Normalized cyclic frequency ω/ω n -π/ -π -3.5 - - Normalized cyclic frequency ω/ω n
Bode Diagram of First-order Real Zero Factor Magnitude response A(ω) (db) 4 35 3 5 5 5 Negative real zero - - Normalized cyclic frequency ω/ω n Magnitude response A(ω) (db) 4 35 3 5 5 5 Positive real zero - - Normalized cyclic frequency ω/ω n Phase response ϕ(ω) (radian) 3.5 3.5.5.5 π π/ - - Normalized cyclic frequency ω/ω n Phase response ϕ(ω) (radian) 3.5 3.5.5.5 π π/ - - Normalized cyclic frequency ω/ω n
Example on a Transfer Function () x t X s () L () h t d d d dt dt dt H s ( ) L ( ) () () () = () () y t y t y t x t x t y t Y s ( ) L ( ) () H s ( ) () ( ) Y s s s = = = X s s s s Frequency response: s = jω ( ω ) ω ω ( ω ) ( ω ) ω ( ω ) Y j j j( / ) H ( jω ) = H ( s) = = = s= jω X j j j j Amplitude characteristics: A ( ) log H( j ) ω = ω = ( ( ) ) ( ) ( ) ½ ½ ½ log log ω / log ω log ω Phase characteristics: ϕ= H( ω ) = arctan ( ω/ ) arctan( ω) arctan( ω)
Example on a Transfer Function() ( ω) = lo ( ) Amplitude characteristics : A g H jω = (( ) ) ½ ( ) ½ ( ω log log ) ½ log log / ω ω A( ω) (db) log 3 ω 3 4
Example on a Transfer Function(3) Phase characteristics ϕ= H ω = arctan ω/ arctan ω arctan ω ( ) ( ) ( ) ( ) π ϕ = H ( ω) 3 ω π π
Example on Transfer Function with Frequency response: s = jω Ys () Hs () = = Xs () s s ζ ωn ωn Amplitude characteristics: Complex Poles ( ) () Ys H( jω ) = Hs ( ) = Hs () = = s=ω j Xs jω jω ζ ωn ωn ω ω A( ω ) = log H( jω ) = log 4ζ ω n ω n Phase characteristics: ω ζ ω n ϕ= H( jω ) = H ( s) = arctan s=ω j ω ωn
Bode Diagram of Second-order Pole Factor Complex pole-pair with negative real value ζ =. ζ =. Magnitude response A(ω) (db) - -4-6 -8..5. Phase response ϕ (ω) (radian) -.5 - -.5 - -.5-3..5. - - -3.5 - Normalized cyclic frequency ω/ω n Normalized cyclic frequency ω/ω n
Bode Diagram of Second-order Zero Factor Phase characteristics: 3.5 Amplitude (db) Amplitude characteristics: 8 6 4 A( ω) ζ =..5.. - - Normalized cyclic frequency ω/ω n Complex zeros-pair in either left half or right half of the s-plane results in same amplitude characteristics Phase (radian) Phase (radian) 3.5.5.5 ϕ ( ω) ζ =...5. Complex zeros-pair in left half of the s-plane - -.5 -.5 - -.5-3 Normalized cyclic frequency ω/ω n Phase characteristics: Complex zeros-pair in - right half of the s-plane ζ = -. -.5 -. -. -3.5 - Normalized cyclic frequency ω/ω n
Minimum, Maximum and Mixed Phase Systems Transfer functions H(s) with zeros in right and left half s-plane with identical real parts results in: Identical maginitude response H(s) Different phase response H(s) Different impulse response h(t) Minimum phase systems: Zeros in negative half s-plane only Narrowest impulse respons h(t) Inverse system H - (s) containes poles in negative half s-plane only Inverse system is stable Maximum phase systems: Zeros in positive half s-plane only Impulse respons h(t) is not the narrowest possible Inverse system H - (s) containes poles in positive half s-plane only Inverse system is unstable Mixed phase systems: Zeros in positive and negative half s-plane Impulse respons h(t) is not the narrowest possible Inverse system H - (s) containes poles in positive half s-plane Inverse system is unstable
Minimum and Maximum Phase Analogue Signals Zero: s = α ϕ s=jω s-plane s=jω s-plane ϕ ϕ ϕ Zero: s = α Minimum phase: zero in s < When ω : - ϕ ϕ= (jω α) π/ Maximum phase: zero in s > When ω : π/ ϕ= (jω α) π ϕ
Maximum phase : H Maximum and Minimum Phase Example on Analogue Signal = s 3 ( s 4)( s 5) H = π arctan(ω/3) arctan(ω/4) arctan(ω/4) Maximum phase impulse response : 5t 4t h(t) 8e 7e = Phase (radian) Phase (radian) 4-3 4 5 cyclic frequency (rad/sec) Minimum phase -.5 - Minimum phase : H Maximum phase -.5 3 4 5 cyclic frequency (rad/sec) = s 3 ( s 4)( s 5) impulsresponse (arb.units) impulsresponse (arb.units) Maximum phase.5 -.5.5.5.5 time (sec) Minimum phase.5 -.5.5.5.5 time (sec) Minimum phase impulse response : 5t 4t h(t) e e = H = arctan(ω/3) arctan(ω/4) arctan(ω/4)
Signal Processing Part 7. Digital Filters Overview and z-transforms Magnus Danielsen
Introductory Remarks FIR filters: requires finite numbers of terms in a DFTF IIR filters: requires infinite numbers of terms in a DFTF Equalization: requires inverted transfer functions Generalized method for construction of digital transfer function constructions: z transforms a generalisation of DTFT z transform properties z transform applications
Elementary FIR Filter: x[n] X(e jω ) FIR filter h[n] H(e jω ) y[n] Y(e jω ) Desired filter. h d [n]=.5 Ω c /π sinc[(ω/π(n-m/)]. h d [n] H d (e jω ).4..8 H d (e jω )=e jmω/ for Ω Ω c = for Ω >Ω c.5.6.4. -.5-3 - - 3 Approximated filter of M=3th order. h[n] = h.5 d [n] for n 6 = for n >6. - -.5.5.5 3 3.5 log H d (db).5-3 -4-5 -.5-4 -3 - - 3 4-6 3 4 5 6 7
Infinite Impulse Response or IIR Filters Transfer function is a DTFT corresponding to an infinite impulse response series Realisation requires feedback in the block diagram Best realized by generalization of DTFT by introduction of z transform Method for filter construction will be based on bilinear transform, and converting of analogue transfer functions to digital transfer functions
z Transform Definition jω Define a complex number: z r e r cos jr sin = = Ω Ω = = Ω± Ω ± n ± n ± n ± jnω ± n ± n Specifically for z we obtain : z r e r cos n jr sin n [ ] For a discrete signal: x n we define z-transform: X z ± [ ] [ ] n x n z = n= [ ] z z transformation : x n X ( z ) = x [ n] z [ ] ( ) [ ] n= jω DTFT transformation for comparison, replacing zbye : DTFT jω jnω x n X e = x n e n= n
Inverse z Transform z-plane [ ] z ( ) [ ] z-transform: x n X z = x p z jω dz rd je z jd = Ω = Ω z = j re Ω p= ( ) [ ] [ ] n p j(n p) [ ] [ ] p n Determine the integral X z z dz c p= p= c p n n p xpz z dz xp z z jd = = Ω c p= = jx p r e dω= jx n π c [ ] ( ) n Inverse z-transform: x n = X z z dz π j c
Convergence - ROC n n n X z = x n z converges when x n z x n r < ( ) [ ] [ ] [ ] n= n= n= n= Definition for region of convergence = ROC = area in z plane, where sum converges n n [ ] n [ ] Example with exponential discrete signal x n = α u n α> : α r < ROC: z = r >α
Unit Circle in z Plane is Transformed into the Frequency Axis for DTFT z-plane r z = j re Ω unit circle : j z r and z e Ω = = = Ω X z = x n z ( ) [ ] z= e jω n n= z= e jω [ ] jnω jω = xne = Xe n= Example comparing z transform and DTFT [ ] = [ ] x n...... ( ) z transform : X z = z z z ( ) DTFT transform : X e = e e e jω jω jω jω
Difference Equation and z Transform Time shift: Linearity: N z [ ] ( ) [ ] x n X z = x n z n= z n (n n ) n [ ] [ ] = [ ] = ( ) x n-n x n-n z x n z z X z n= n n= z z [ ] ( ) [ ] ( ) z a x[ n] b y[ n] a X( z) b Y( z) xn Xz yn Yz Difference equation: z-transformed equation: a y[n k] = b x[n k] M k k= k= k N M k ( ) = ( ) a Y z z k k= k= b X z z k k Transfer Function : ( ) H z ( ) ( ) Y z = = X z M k= N k= bz k az k k k
Transfer Function Poles and Zeros x[n] z y[n] hn [ ] Hz ( ) X( z ) Y( z) Transfer Function : ( ) H z ( ) ( ) Y z = = X z = M k= N k= bz k a z k k k b bz... b z a a z... a z b = a M M N N M ( c kz ) k= N ( d kz ) k= Poles: d k Zeros: c k where k=... N where k=... M
Causality and Anticausality Two Examples Im(z) Causal expon ential signal: =α = α = > α [ ] [ ] z ( ) n n xn un Xz z n ROC:z n= αz α Re(z) ROC Im(z) Anticausal exponential signal: α Re(z) n n n [ ] [ ] z ( ) xn= α u n X z = α z n= n n = α z = α z = ROC: z < α n= α z αz ROC
Two sided Signal Example xn= u n un [ ] [ ] [ ] ( ) n z X z = z ROC: z < z ROC: z > 3 z z X( z) = ( z) z ROC : < z < Im(z) ½ ROC Re(z)
Signal Processing Part 7. The z-transform and its Properties Magnus Danielsen
Properties of Region of Convergence (ROC) ROC contains no poles Finite duration signal x[n]: ROC = tot. z-plane, except z =,z = Causal x[n]: X(z) N -n x[n]z n= -n has only a pole in z = = Anticausal x[n]: X(z) = x[n]z has only a pole in z = n= N Infinite duration signal x[n]: ROC = anular region in z-plane ( ) -n -n -n X z = x[n]z = x[n]z x[n]z = I I n= n= n= Im(z) Im(z) Im(z) Re(z) Re(z) Re(z) ROC of I ROC of X(z) ROC of I Causal signal part Anticausal signal part Two-sided signal
Examples of Two-sided ROC Ex. n z x[ n] = u[ n] u[ n] X( z) = 4 n n n n n z z = 4 z ROC: z < z 4 ROC: z > 4 ROC : < z < 4 Ex. n z y[ n] = u[ n] u[ n] Y( z) = 4 n Ex. 3 n n n n z z = 4 z z 4 n n ROC: z > ROC: z > 4 z w[ n] = u[ n] u[ n] W ( z) = 4 n n n n z z = 4 z ROC: z < 4z ROC: z < 4 ROC : z > ROC : z < 4
Definition of ROC ROC, named R is defined by r < z < r x ROC, named is defined by < z < R r r x ROC of a right-sided signal is of the form z > r causal signal ROC of a left-sided signal is of the form z < r anti causal signal ROC of a two-sided signal is of the form: r < z < r non causal signal = mixed causal and anti causalsignal
Properties and Calculation Rules z z [ ] ( ) [ ] ( ) x n X z ROC : R y n Y z ROC : R x z [ ] [ ] ( ) ( ) Linearity : ax n by n ax z by z ROC: R R z R [ ] z Time reversal : x n X ROC: z n [ ] ( ) Time shift : x n n z X z ROC: R x [ ] z α n z Multiplication exp. sequence: α x n X ROC: α Rx [ ] [ ] ( ) ( ) z Convolution : x n y n X z Y z ROC: R R z d Differentiation in z domain: nx[ n] z X( z) ROC: R dz y x x x x y y
Example: Application of Calculation Rules n 4 [ ] [ ] yn [ ] wn [ ] = n un [ ] yn [ ] = u[ n] xn=wn n n z z u[ n] z n z z d z w[ n] = n u[ n] z = dz z z n z = 4 yn [ ] u[ n] 4 z 4 ROC z < 4 ROC z > z [ ] [ ] [ ] z 4 x n w n y n X[ z] = = z z 4 ROC Rx= R w R y: < z < 4
Examples on Basic z Transforms () Discrete step signal : = n = = z ROC z > z [ ] [ ] ( ) x n u n X z z Discrete impulse signal (the only function with ROC = total z z [ ] [ ] ( ) xn=δ n Xz = ROC total z plane plane): Discrete impulse signal : z [ ] [ ] ( ) k xn=δ n k Xz = z ROC z > Exponential signal : n n n z [ ] [ ] ( ) xn= aun Xz = az = ( az ) ROC z> a
Examples on Basic z Transforms () Damped cosine function n n jωn n jωn z x[ n] = a cos( Ω n)u[ n] = a e a e u[ n] ( ) = = ( jω ) ( ) jω ae z ae z - - acosω z X( z) = = ( jω )( ) jω - - ae z ae z -a cosω z a z n jωn n n jωn n X z a e z a e z j j Ω Ω ae z ae z Damped sine function ROC z n n jωn n jωn z x[ n] = a sin( Ω n)u[ n] = a e a e u[ n] j j ( ) ( Ω j ) ( ) jω ae z ae z - a sinω z X( z) = = ( jω )( ) jω j - - ae z ae z -a cosω z a z ROC z > a n jωn n n jωn n X z = a e z a e z j j j j = Ω Ω j ae z ae z > a
Inversion of z Transforms Partial Fraction Method ( ) X z M ( ) k bz k M M N B z k= b bz... bmz k = = = = f N N kz ( ) k N k= az k k= M N N k k fz k k= k= dkz = ( ) ( ) B z A z a a z... a z A z A (nomultiplepoles) Causal solution ROC z z A > d : A d u[ n] n k k k k dkz z A Anti causalsolution ROC z < d : A d u[ n ] n k k k k dkz
Example : Inversion of z Transforms Partial Fraction Method z z X( z) = with ROC< z< ( )( z z z ) A A A3 X( z) = ( ) ( ) z z z A = z X( z) = = z ( )( = ) Similarily : A = A = n 3 xn un u n un n [ ] = [ ] [ ] [ ] ROC of X(z) Im(z) Poles and ROC ½ Re(z)
( ) Example : Inversion of z Transforms 3 z z 4z 4 X z = z z 4 z z 4z 4z = z z 3 3 z 4z 4z z Partial Fraction Method = z z z 5z = z 3 z z z 3 z = = z z ( ) z 3 W z n n [ ] = δ[ ] δ[ ] ( ) [ ] 3 u[ n ] wn n 3 n u n 3 xn n n n n [ ] = δ [ ] δ [ ] ( ) u[ n ] 3 u[ n ] Im(z) - ROC of X(z) Poles and ROC: z < Re(z)
Inversion of z Transforms Power Series Expansion Method Example : ( ) ( ) X z z ROC z = > z z 3 X z = = z z z... z x[ n] = δ [ n] δ[ n ] δ[ n ] δ[ n 3 ]... ( ) z Example : X z = e ROC z ( ) X z = e = z = z k= k! n= k= n neven! for n> or n odd xn [ ] = for n and n even n! z k n
Signal Processing Part 7.3 The z-transform Transfer Functions Magnus Danielsen
Transfer Function Definition of transfer function: H(z)=Y(z)/X(z), where Y(z) and X(z) are output and input signals respectively Initial conditions are zero Causality unilateral transforms Stability all poles are inside the unit circle of the z-plane Minimum phase all zeros are inside the unit circle of the z-plane Inverse system transfer function H - (z) of H(z) such that H - (z) H(z)= Frequency response is determined by poles and zeros Decibel definition: A= log H,where H is a transfer function. A= log(p /P ), where P and P are the output and input powers respectively.
Transfer Function Example on a transfer function x[n] z y[n] hn [ ] Hz ( ) X( z ) Y( z) Transfer Function : n ( ) H z ( ) ( ) Y z = = X z M k= N k= bz k az z x[ n] = u[ n] X( z) = ROC R z > z 3 x 3 3 n n z 3 y[ n] = 3( ) u[ n] u[ n] Y( z) = 3 z z 3 4 = ROC R y z > ( z ) z 3 4 z Y( z) 3 H(z) = = ROC Ry = Rx R y : z > X( z) ( z ) z 3 k k k
Transfer Function and Impulse Response z z [ ] X( z) yn [ ] Yz ( ) x n z [ ] Hz ( ) hn Z transform of output signal : Output signal time function : Impulse response h(t) : ( ) = H( z) X( z) L [ ] = [ ] [ ] [ ] ( ) [ ] =δ[ ] [ ] = [ ] δ [ ] = [ ] Y z y n h n x n,where h n H z x n n y n h n n h n Example on impulse response : H [ z] = az x n n X z z [ ] = δ[ ] ( ) = ( ) = ( ) ( ) = ( ) n [ ] = [ ] = [ ] Y z H z X z H z y n h n a u n
Causal System Causality requires that h[n]= for n< This requires rightsided transfer function Stability for a Causal Signal A pole d k < inside the unit circle, gives an exponentially decaying term A pole d k > outside the unit circle, gives an exponentially increasing term A pole d k = on the unit circle, gives an complex sinusoid term (i.e. Constant ampl.)
Anti-causal System Anti-causality requires that h[n]= for n This requires leftsided transfer function Stability for a Anti-causal Signal A pole d k < side the unit circle, gives an exponentially decaying term for n A pole d k > outside the unit circle, gives an exponentially increasing term for n - A pole d k = on the unit circle, gives an complex sinusoid term (i.e. Constant ampl.)
Example on Causality and Stability 3 H( z) = z.9e z.9e z The system shall be either stabel or causal. Solution : π π j j 4 4 π π j j 4 4 Poles z =.9e z =.9e z = n π π Stable system : h n.9e u n.9e u n 3 u n n π n = 4.9 ( ) cos n un [ ] 3( ) u[ n ] 4 j j n [ ] = 4 [ ] 4 [ ] ( ) [ ] n π π Causal system : h n.9e u n.9e u n 3 u n n π n = 4.9 ( ) cos n un [ ] 3( ) un [ ] 4 j j n [ ] = 4 [ ] 4 [ ] ( ) [ ] n n
Inverse Systems x[n] z y[n] inv z inv hn [ ] Hz ( ) h [ n] H ( z) X( z ) Y( z) x ' n = x n requires that [ ] [ ] [ ] [ ] =δ[ ] inv h n h n n inv H z H z = ( ) ( ) x [n] X' ( z) H inv z ( ) = H z ( ) Poles in H z are converted to zeros in H ( ) inv ( ) Zeros in H z are converted to poles in H ( ) inv ( ) z z
Example on a Stable and Causal Inverse System x[n] z y[n] hn [ ] Hz ( ) X( z ) Y( z) z inv [ ] ( ) inv h n H z x [n] X' ( z) Difference equation : y[n] y[n ] y[n ] = x[n] x[n ] x[n ] 4 4 8 Y( z) z z ( z )( z ) Transfer function : H( z) = = 4 8 = 4 X( z) z z ( z ) 4 Zeros for H ( z ): z = and z = Polesfor H ( z ): z = (double pole) 4 inv Y( z) ( z ) Inverse Transfer function : H ( z) = = X( z) ( z )( z ) 4 inv inv Zeros for H ( z ): z = (double zero) Polesfor H ( z ): z = and z = 4 Both poles are inside unit circle stableinverted system Both zeroes are inside unit circle minimum phase inverted system
Example on Multipath Communication System Transmitter Direct signal Reflected signal Receiver Mountain Sampling time = T s Time difference between direct and reflected signal: T=kT s Difference equation : y[n] = x[n] ax[n k] Transfer function : Zeros for H z : ( ) Hz= az k π r phase(a) j k ( ) z = ( a) k= a ke where r =,3,...,k No polesfor H( z) Inverse Transfer function : H inv ( z) ( ) ( ) Y z = = X z az π r phase(a) j inv Poles for H z : No zeros for H z k k inv ( ) z = ( a) k = a k e where r =,3,..., k ( ) All poles are inside unit circle if a < stable inverted system
Unilateral z Transform used for Causal Systems [ ] Definition : x n is defined for < n < [ ] z u n unilateral z transform : x n x[ n] z, n= n z [ ] [ ] and bilateralz transform : x n x n z n= [ ] are identicalfor causal signals, i.e. if x n = for n < [ ] z u n u xnz [ ] [ ] [ ] [ ] [ ] xn n= z n n xn- xn-z = x- z xnz n= n= z n k k n u [ ] [ ] [ ] [ ] [ ] [ ] x n-k x n-k z = x -k x -k z...x - z z x n z n= n=
Difference Equation with Initial Condition Difference equation: N a y[n k] = b x[n k] M k k= k= Initial conditions for y[n]: y[-], y[-], y[-3], y[-4],..., y[-n] Initial conditions for x[n]:,,,... i.e. X[n] is taken to be causal z-transformed equation: k A z ( ) N k = akz Bz ( ) k= M k bz N N = ( ) [ ] k = k k= m= k= m C z a y k m z k A( z) Y( z) C( z) = B( z) X( z)
Signal Processing Part 7.4 The z-transform Transfer Functions Frequency Response and Block Diagrammes Magnus Danielsen
Frequency Response Transfer Function : ( ) H z ( ) ( ) M k bz k M k= M N N k a N kz k= Y z b b z... b z = = = X z a a z... a z M M ( c kz ) (z c k) k= N M k= K z N N ( d kz ) (z d k) k= k= = K = ( ) jω Transfer Function with z = e : H z = K e z= e jω M jω (e c k) jω( N M) k = N jω (e d k) k= jω Illustration of the factor : e - g g jω e jω e -g Ω
Example: Amplitude and Phase Characteristics Transfer function : ( ) H z z z = =.9e z.9e z (.9 z.8z ) π π j j 4 4 4 H 8 Amplitude characteristic : ( ) H z = jω Ω j e =.9 e.8e z= e Ω j jω cosω (.9 cosω.8cos Ω ) (.9 sin Ω.8sin Ω) Phase characteristic : ( ) H z = z= e jω ( ) ( ) π π sin ( Ω) sin( Ω ) sin( Ω ) arctan arctan 4 arctan 4 cos( Ω) π π cos Ω cos Ω 4 4 sin Ω.9 sin Ω.8sin Ω = arctan arctan cos Ω.9 cosω.8cosω 6 4.5.5.5 -.5 - -.5-4 -3 - - 3 4 - H Ω -.5-4 -3 - - 3 4 Ω
Minimum, Maximum and Mixed Phase Systems Transfer functions H(z) with zeros inside the unit-circle and outside the unitcircle in the z-plane with reciprocal values result in: Identical maginitude response H(z) Different phase response H(z) Different impulse response h[n] Minimum phase systems: Zeros inside the unit circle in the z-plane only Narrowest impulse respons h[n] Inverse system H - (z) containes poles inside the unit circle in the z-plane only Inverse system is stable Maximum phase systems: Zeros outside the unit circle in the z-plane only Impulse respons h[n] is not the narrowest possible Inverse system H - (s) containes poles outside the unit circle in the z-plane only Inverse system is unstable Mixed phase systems: Zeros inside and outside the unit circle in the z-plane Impulse respons h[n] is not the narrowest possible Inverse system H - (s) containes poles outside the unit circle in the z-plane Inverse system is unstable
Minimum and Maximum Phase Discrete Signals j ( ) = = = H z az Zero: z a a e ϕ z-plane ϕ z-plane z=ae -jω ϕ ae -jω z=ae -jω ae -jω ϕ ϕ z=a - Ω - Ω z=a z=e -jω z=e -jω Minimum phase: Zero z=a inside unit circle z < When π Ω π: - Arcsin a ϕ= (-az - ) Arcsin a Maximum phase: Zero z=a outside unit circle z > When π Ω π: π ϕ= (-az - ) π
Phase (radian) 4 3 - - -3 Maximum phase -4-4 - 4 cyclic frequency (rad/sec) Maximum and Minimum Phase Example on Discrete Signal Maximum phase : H z = z z 3 4 impulsresponse.5 -.5 Maximum phase impulse response : - n h n u n u n 3 4 [ ] = [ ] [ ] Maximum phase n Phase (radian) 4 3 - - -3 Minimum phase -4-4 - 4 cyclic frequency (rad/sec) Minimum phase : H z = z z 3 4 impulsresponse -.5-4 6 8 n Minimum phase.5.5 -.5-4 6 8 n Minimum phase impulse response : n h n 4 u n 6 u n 3 4 [ ] = [ ] [ ] n
Difference Equations N a y[n k] = b x[n k] M k k= k= k Recursive formula for y[n] M N = k k k= k= y[n] b x[n k] a y[n k] z-transform Y(z) for y[n] M Y z = b z X z a z Y z k ( ) k ( ) k ( ) N k k= k=
Block Diagram Discrete nd order y[n] = b x[n] b x[n-] b x[n-] - a y[n-] a y[n-] w Y(z) = b X(z) b z - X(z) b z - X(z) - a z - Y(z) a z - Y(z) W(z) ( ) H z = ( ) ( ) Y z X z X(z) b W(z) Y(z) X(z) b Y(z) X(z) b Y(z) z - z - z - z - z - b -a b -a -a b z - z - z - z - z - b -a b -a -a b
Block Diagram Discrete N th order y[n] = b x[n] b x[n-] b x[n-]... b M x[n-m] a y[n-] a y[n-]... a N y[n-n] w Y(z) = b X(z) b z - X(z) b z - X(z)... b M X(z) a z - Y(z) a z - Y(z)... a N z - Y(z) X(z) b W(z) Y(z) -a z - z - b ( ) Transfer function : H z ( ) ( ) Y z = = X z M k= N k= b z k az k k k -a b -a N z - b M
Cascade-form Implementation X(z) b W(z) b Y(z) z - z - -a b -a b z - z - -a b -a b ( ) ( ) ( ) ( ) ( ) ( ) Y z W z Y z H( z) = = = H z H z X z X z W z ( ) ( )
Example: Cascade-form Implementation ( ) H z ( jz )( jz )( z ) = = π π π π j j j j 4 4 3 8 3 8 e z e z e z e z 4 4 H H H ( z) ( ) ( ) z W z = = π X Z cos z z 4 4 X(z) W(z) Y(z) z - z - H ( z) ( z ) Y( z) = = π cos z z 8 6 ( ) 3 9 W z cos(π/4) z - -/4 3/4 cos(π/8) z - -9/6
Parallel-form Implementation X(z) b Y (z) -a z - b X(z) Y(z)=Y (z)y (z) =[H (z)h (z)]x(z) z - -a b X(z) b Y (z) z - -a b z - -a b
Signal Processing Part 8. Analogue Filters Magnus Danielsen
Filter Types Ideal filters: Constant amplitude in passband Linearly varying phase versus frequency Low-pass filters (LP) High-pass filters (HP) Band-pass filters (BP) Band-stop filters (BS) Characteristics (amplitude and phase): Butterworth filters Chebyshev filters Frequency transformations LP to HP transformation LP to BP transformation LP to BS transformation Analogue filters Passive Active filters Electronic circuits designed filters Digital filters FIR IIR Processor based designed filters
Distortion free Ideal Transmission of Analogue Signal x() t h t H s ( ) L ( ) y( t) = Cx(t t ) Y(s) CX(s)e st = Y(s) H(j ω ) = H() s = = Ce s=ω j X(s) h(t) = Cδ t t ( ) s=ω j jωt Amplitude characteristics Phase characteristics H(jω) C ϕ= {H(jω)} ω ω dϕ/d ω= - t Ideal transmission: constant amplitude amplification C, and group delay t for all frequencies composing the input signal x(t)
x t () Ideal Low-pass Filters h t H s ( ) L ( ) y t ( ) ω j t e for H(j ω ) = for ω ω ω>ω H(jω) C ω c c c ω j t jωt h(t) e e d ( ω ) ω j ω(t t ) e = ω= π π j(t t ) ω c sin (t t ) ω ω sinc (t t ) π(t t ) π π c c c = =.35.3.5. h(t) ω c ω c ω c ω c ω c ϕ= {H(jω)} ω c ω.5..5 -.5 -. -3 - - 3 t
Transmission of Rectangular Time Pulse x( t) for t x(t) = for t > Gibbs Phenomenon T T h t H s ( ) L ( ) T sin ( ωc(t t τ) ) y(t) x( ) h( t ) d d T π(t t τ) = τ τ τ= τ T T = Si ωc(t t ) Si ωc(t t ) π ( ) y t Rectangular input pulse: Ideal low-pass filter impulse response : Output pulse response: ( ) sin ω (t t ) ω ω = = c c c h(t) sinc (t t ) π(t t ) π π ( λ) u sin Si(u) = dλ λ
Sine Integral Function Si(u) Si(u) u sin ( λ) = dλ λ.5 π / Sine integral.5 Si(u) -.5 Si(u) max π.79 - -.5 π / - -4-3 - - 3 4 u (radian)
Gibbs Phenomenon Rectangular Pulse filtred in Ideal Bandpass Filter.4.. y max Output signal.8.6.4 ω c T = Output signal.8.6.4 ω c T =4.. -. -.5.5.5 Time (sec). T T ymax y.9 max -. -.5.5.5 Time (sec). ymax Output signal.8.6.4 ω c T = Output signal.8.6.4 ω c T =.. -. -.5.5.5 Time (sec) T -. -.5.5.5 Time (sec) T
Design of Filters H(jω) ε = γ Amplitude characteristic δ ω p ω s Passband Prescription of frequency response of amplitude and phase characteristics Function selected must be causal and stable Realization of approximating transfer function by a physical system Analogue approach Analogue to digital approach Direct digital approach Transition band Stoppband ω
Fundamental Filter Parameters Definition of filter passband parameters: Passband tolerance parameter ε Passband maximum attenuation α p = log( ε) db Passband cutoff cyclic frequency ω p radian/sec Stopband cutoff frequency f p = ω p /(π) Hz Definition of filter passband parameters: Stopband tolerance parameter δ Stopband minimum attenuation α s = log(δ) db Stopband cutoff cyclic frequency ω s radian/sec Stopband cutoff frequency f s Hz
Approximating Functions Maximally flat response d k H(jω) /dω k = for ω= and ω= : Butterworth filter characteristics Equiripple magnitude response In passband, Chebyshev I filter characteristics In stopband, Chebyshev II filter characteristics In both passband and stopband, Elliptic filter characteristics
Magnitude Response Description for Low-pass Filters Transfer function for analogue filter: H s Magnitude response: H s () () H ( j ) s j F ( ) =ω = ω = ω Functions to be selected for filter design: n ω Butterworth filters F( ω ) = maximally flat filter ωc ω Chebyshev I filters F( ω ) = γt n equiripple filter in passband: ωc Tn isthe Chebyshev polynomium Chebyshev II filters F( ω ) = equiripple filter in stopband : ω c γtn ω Elliptic filters F( ω ) = R ω equiripple filter in both passband and stopband: R is the elliptic function n ( ) n
Digital Filters used for Analogue Signals Signal is samples with sampling time T s Transfer function is described by H(e jω ), where -π < Ω < π Normalized cyclic frequency = Ω Cyclic frequency ω = Ω/T s Transfer function in cyclic frequency domain: H = H(e jωt s ) where -π/t s < ω < π/t s H(e jωt s ) is matemathically periodic in ω
Signal Processing Part 8. Analogue Butterworth Filters Magnus Danielsen
Butterworth Filters H jω = ( ) K ω ωc K is an integer number H(jω) -ε δ ω p ω s Passband Transition band Amplitude characteristic Stoppband ω ω p =ωc ω s =ωc ε ε δ δ K K α p = log( ε) db α s = log(δ) db
Butterworth Transfer Function () ( ) ( ) H s H s = H jω = () ( s) H s H s=ω j = s j ωc K jω j ωc K c c ( ) ( ) Poles of H s H s : (k ) jπ K K c s= j ω ( ) = jωe (k ) j π ( ) K =ω e, where k =,,...,K Poles of H(s) H(-s) are distributed with equal angular distance on a circle with radius = ω : c ω c Stability for H(s) requires the poles of H(s) to be placed in left half-plane
Butterworth Transfer Function () ( s) = K H s H s jωc K=3 Poles for H(s) Poles for H(-s) c c (k ) j π ( ) K ( ) ( ) Poles of H s H s : (k ) jπ K K c s= j ω ( ) = jωe = ω e,where k =,,...,K K= 4 Poles for H(s) Poles for H(-s) s = ω ω c e c π ± j 3 s = ω ω c e c π ± j 3 s ω = ω c c e e 5π ± j 8 7π ± j 8 ω ce s = ω ce π ± j 8 3π ± j 8 Prototype transfer functions are defined by ω c =
Design of Buttereworth LP-Filters Design a Butterworth (prototype) LP-filter with ω c =, and K=3 Poles: s=, s=e -jπ/3 =-½j½ 3 and s=e -jπ/3 =-½-j½ 3 H s () = = 3 3 ( s ) s s 3 s s s Hs Change of bandwidth from ω c = to ω c = ω c : Substitution of s by s/ω c results in: = = s s 3 s 3 s s s ω ω ω ω ω ω () 3 c c c c c c
Butterworth Filter Prototype Transfer Functions (ω c =) K = : H() s = s () K = : H s = () K = 3: H s = () K = 4: H s = () K = 5: H s = () K = 6: H s = s s 3 s s s 4 3 s.63s 3.44s.63s 5 4 3 s 3.36s 5.36s 5.36s 3.36s 6 5 4 3 s 3.8637s 7.464s 9.46s 7.464s 3.8637s
Butterworth Polynomials (denominator of H(s)) Even polynomials of K th order: General Formulas K/ B K (s) = s scos n= K π Examples on odd Butterworth polynomials: B = s B 3 = (s) (s s cos(4/6 π) ) B 5 = (s) (s s cos(6/ π) ) (s s cos(8/ π) ) B 7 = (s) (s s cos(8/4 π) ) (s s cos(/4 π) ) (s s cos(/4 π) ) ( ) ( ) n K Examples on even Butterworth polynomials: B = s s cos(3/4 π) B 4 = (s s cos(5/8 π) ) (s s cos(7/8 π) ) B 6 = (s s cos(7/ π) ) (s s cos(9/ π) ) (s s cos(/ π) ) B 6 = (s s cos(7/3 π) ) (s s cos(9/3 π) ) (s s cos(/3 π) ) (s s cos(3/3 π) ) (s s cos(5/3 π) ) (s s cos(7/3 π) ) (s s cos(9/3 π) ) (s s cos(3/3 π) ) Odd polynomials of K th order: K/ B(s) K = s s scos π n= K n K
Butterworth Amplitude Characteristics for LP-filter - Slope = K db/decade K = -4-6 3-8 4-5 - - 6 ω/ω c
Butterworth Phase Characteristics for 4 LP-filter 3 Phase (radian) - - -3 K = 3 4 5 6-4 - ω/ω c
Design of Butterworth LP-filters ( ) K Amplitude characteristics : A = log H jω = log Parameters K, εδ, s p p s ω ωc Requirements: passband ω ω A α = log( ε) db stopband ω ω A α = log δ db K ((. α ) (.α )) s p log / ( ω ω ) log / s p ω = ω p c ( α ). p K. K ( α ) s ω s = ωc
Example: Butterworth LP filter () Given: Passband attenuation: α p = db for < f < f p = 8 khz Stopband attenuation: α p = 5 db for f s = 8 khz < f < (( ) (.α )) ( s p) ( ) ( ) ( ). s p.5. log α / log / K = = 4.88 5 log ω / ω log /8 f f = = p c ( α ). p K 8.44 khz s ( ) c. K ( α ) s f = f ω = π = π = c () = 5 4 3 H s 3 3 fp 8.44 53. rad / sec s s s s s 3.36 5.36 5.36 3.36 3 3 3 3 3 53 53 53 53 53
Example: Butterworth LP filter () K=5 f c = 8.44 khz Phase (degrees) Magnitue (db) - -4-6 -8 - - - - - -3-4 K 9 o =45 o Frequency (khz) -5 - Frequency (khz) Slope = K db/dec - db/dec
Signal Processing Part 8.3 Analogue Chebyshev Filters and Frequency Transformations of Filters Magnus Danielsen
Chebyshev-I Filters H jω = ( ) ω γ TK ωp K is an integer number H(jω) -ε Amplitude characteristic ------ for odd K δ ω for even K ω p ω s Passband Transition band Stoppband
Chebyshev Polynomials K K ( ) ( ) ( ) ( ) ( ) ( ) T ω = T ω =ω T ω = ω 3 T3 ω = 4 3 ω ω 4 T4 ω = 8ω 8ω ω = ω ω ω 5 3 T5 6 5 ( ) ( ) T ω = cos Kcos ω ω ( ) ( ) T ω = cosh Kcosh ω ω Recursion (generation) formula: ( ω ) = ω ( ω) ( ω) T T T K K K
Design of Chebyshev-I LP filters ( ω ) = H j ω γ TK ωp () ( s) H s H Parameters K, ε, δ = K is an integer number s γ TK j ωp Requirements: passband A α = log ε db stopband A α = log δ db p s K ((.α ) (.α )) cosh s / p ( ω ω ) cosh / s p
Chebyshev Polynomials and Chebyshev-I Amplitude Characteristics 5 Chebyshev polynomium T K (ω/ω p ) - -4 Chebyshev ampl.char. K=,,3,4,5, and 6-6 K=,,3,4,5, and 6-8 ε=.6, and γ=.5 5 - - - -4 A(ω/ω p )= - log (γ T K (ω/ω p )) -5-6 -8 - -.5 - -.5.5.5 ω/ω c - -.5 - -.5.5.5 ω/ω c
Poles of Chebyshev-I LP-filter () ( s) H s H = Definition of parameter : ( ) ( s) Poles for H s H T γ K jωc : s = jcos(sin j ηθ ) = ηsinθ j η cosθ ωc (r ) where θ r = π where r =,..., K K s ( ) ( ) Poles of H s H s will be found from : ( ) ( ) ( ) K γ T ω = and T ω = cos K cos ω K sinh sinh or sinh K sinh K γ γ ( ) η = = η r r r Poles of H(s) H( s) are placed on an ellipse with the axes ηand η : Stability for H(s) requires the poles of H(s) to be placed in left half-plane η η
Chebyshev-I Prototype LP Transfer Function () H s = C K r= ( ) s [ ηsinθ r j η cos θr] C must be determined from H(j ω) for ω in passband Prototype transfer functions are defined by ω c = Hs () = for s= C=.5 K = 3 γ =.5 η =.5 ω c = ωc Poles for H(s).97j 4 s = 4.97j Poles for H(-s).97j 4 s = ωc 4 ().97j Prototype LP transfer function ω = : Hs.5 = s s.97j s.97j 4 4 c
Chebyshev I Transfer Function K=4 γ=.5 ω c = η= = η = K γ sinh sinh.3688.658 Hs () = for s= C=.5 Poles for H(s) Poles for H(-s) s.4 j.9847.347 j.479 =.347 j.479 ω c.4 j.9847 s.4 j.9847.347 j.479 =.347 j.479 ω c.4 j.9847 Pr ototype LP transfer function ω=ω c Hs () = C s.4 j.9847 s.347 j.479 s.347 j.479 s.4 j.9847 ( )( )( )( )
Example: Chebyshev I LP Filter Given: Passband attenuation: α p = db for < f < f p = 8 khz Stopband attenuation: α p = 5 db for f s = khz < f < (.α ) (.α ) ( ωs ωp) ( ) ( ) s p cosh / cosh.5 /. K = =.77 3 cosh / ( ) cosh / 8 f = f = 8 khz c c p ω = π f = π 8 = p 3 5 rad / sec 3 Resulting stopband frequency:.77 s f s ' = fp cosh cosh =.37 3 f p f () ω= c = s s s.97j.97j 3 3 3 LP transfer function 5 : H s C 5 5 4 5 4
Example: Chebyshev I LP Filter K=3 f c = 8 khz Phase (degrees) Magnitue (db) - -4-6 -8-5 - -5 - -5 K 9 o =7 o f c Frequency (khz) -3 Frequency (khz) Slope = K db/dec - 6 db/dec
Example: Chebyshev I LP Filter K=4 f c = 8 khz Phase (degrees) Magnitue (db) - -4-6 -8 - f c - - -3 K 9 o =36 o Frequency (khz) -4 Frequency (khz) Slope = K db/dec - 8 db/dec
Frequency Transformations: Low-pass Prototype to Low-pass (shift of cut-off frequency) Low-pass prototype to low-pass transformation: s d s ω c d s s ω c Example : Butterworth filter : s H H (s) = ( s )( s s ) LP,prot s ω 3 c LP (s) = = c ( s c)( s cs c ) s s s ω ω ω ω c ωc ω c ω
Frequency Transformations: Low-pass Prototype to High-pass Low-pass to high-pass transformation: s s = d s d ωc ω d s s d c ω s c ω s H LP,prot (s) = H (s) = = s s s s c Example : Butterworth filter : s, ω c = ( )( ) HP s s s ( s )( s s ) 3
Frequency Transformations: Low-pass Prototype to Band-pass Low-pass to band-pass transformation: s s ω ω s ω = Bs B ω s Bs = s d ω s ω s p s p d B s ω ½Bd ( ½Bd) ω p, = ½Bd ( ½Bd) ω ( )( )
Example: Butterworth Band-pass Filter Prototype filter: H (s) ω s Transformation : s B ω = ( s )( s s ) LP,prot ω s with 3-dB cut-off frequency ω=ω c =, where log( H LP,prototype ) = 3dB Band pass filter : H BP (s) = with 3-dB cut-off frequencies found from putting =, ( ) ω s ω ω s ω ω s ω B ω s B ω s B ω s ( ) giving 4 solutions ω = ± ½B ½B The 3 db bandwidth ω ω = B ω ω B s ω ω s s=jω,twoofthempositive.
Frequency Transformations: Low-pass Prototype to Stop-band Low-pass to stop-band transformation: s ω ω s B s = Bs ω ω s s ω ω ω s ω s z s z = = ( )( ) ( )( ) s d B s ω Bd ω Bd s p s ω s p d B s s ω ω ω d Poles : p, ( ½Bd ½Bd ) = ½Bd ( ½Bd ) ω ω Zeros : z, jω = j ω
LP and BP Butterworth Filter H (s) = s s s ω c ωc ω c LP H BP (s) = ω s ω ω s ω ω s ω B ω s B ω s B ω s Phase (degrees) Magnitue (db) - - -3-4 -5-6 -7-5 - -5 - -5 LP: K=3 f c =ω/π= 8kHz BP : K=3 f c =ω/π= 8kHz f = =B/π khz -3 Frequency (khz) Phase (degrees) Magnitue (db) - -4-6 -8 - - - - -3-4 -5-6 -7 Frequency (khz)
LP and BS Butterworth Filter LP: H (s) = s s s ω c ωc ω c LP K=3 f c =ω/π= 8kHz H (s) = B s ω B s ω B s ω ω ω s ω ω s ω ω s BS BS : K=3 f =ω/π= 8kHz f = =B/π khz Phase (degrees) Magnitue (db) - - -3-4 -5-6 -7-5 - -5 - -5-3 Frequency (khz) Phase (degrees) Magnitue (db) - -4-6 -8 - - -4 - - -3-4 -5-6 -7-8 Frequency (khz)
Signal Processing Part 8.4 Analogue Filters Practical Constructions Magnus Danielsen
Passive Butterworth LP-Filter of Third Order V Node equations : sc sl E R sl V = R Vout sc sl sl R
Passive Butterworth LP-Filter of Third Order () V out sl = sc sc sl R sl R sl sl E R c c c Vout = E RLCC 3 s s s RC RC LC LC LCC R = 3 3 RLCC s s ω c sω c ωc = K 3 s s s ω ω ω ω = ω = ω = K = = RC RC LC LC LCCR RLCC 3 c c c 3 ωc Example : R = 5Ω fc = 59 Hz ω c = rad/sec L = 5 mh C = 68.3 uf C =.7 uf
Butterworth LP-filter Characteristics of 3rd Order Amplitude characteristics Phase characteristics
Passive Butterworth BP-Filter of 3 rd Order LP-prototype filter: V ω s ω ωc Lωω c Inductances: sl Lω c = s L sl' B s B = ω B s sc' ω B = = = B Lωω ωl' c Serial coupling of L' and C' L' L C' = s s s out 3 ω s Prototype Low-pass to band-pass transformation: s B ω Low-pass to band-pass transformation cutoff frequency = ω : s ω s ω ω s ω or s ω c ωc B ω s B ω s c c ω s ω ωc Cωω c Capitances: sc Cω c = s C sc'' B s B = ω B s sl'' ωc B Parallel coupling of C'' and L'' C'' = C L'' = = B Cωω ωc'' ω s c Center frequency: f = ω /(π) Band width: f = B/(π)
Passive Butterworth BP Filter of 3rd Order Phase characteristics f = 8 Hz f = Hz Amplitude characteristics
Active LP-filter Single Real Pole H(s) sc V R out R = = = V R R sr C in 3 3 Real pole: s = RC
Active LP-filter Single Real Pole Frequency Response Magnitude response Phase response
Example: LP to BP Transformation Prototype LP-filter: H(s) ω = B=. ω s ω = B ω s s s ( ) (s ) Bandpass filter : H(s) = s = =.s (s ) s Poles : s =.5 ± j.998.5 ± j Zero : s = s.s
Transfer Function of BP-filter -5 - - 5 Amplitude characteristics H(s) =.s s.s - - 5-3 -3 5-4 - Phase characteristics.5.5 -.5 - -.5 - -
Active BP-filter Two Complex Poles, and a Zero Transfer function : H(s) V V out = = L sc R R sl in 3 = R 3 L slc s R s Complex poles : s = ± j RC LC RC Zero : s =
Active BP-filter Two Complex Poles, and a Zero Magnitude and Phase Phase Characteristic Amplitude Characterlistic H(s) = Center frequency: f L R 3 L slc s R = = 7 Hz π LC s
Signal Processing Part 8.5 Digital FIR Filter Magnus Danielsen
FIR-Filter Properties and Applications Impulse response: h[n] has finite length Transfer function: H(z) has finite number of terms: H(z)=a z a z - a z -... a M z -M Difference equation: y[n]=a x[n] a x[n-] a x[n-]...a M x[n-m] Linear phase group (signal) delay is constant Desired freq. Response: H d (e jω ) Practical freq. response: H(e jω ) Realization: Mean-square error Window functions Implementation of FIR filters with block diagrammes Applications Discrete time differentiator Types of filters Practical examples of filters
Desired Filter and Mean Square Error Desired impulse response Practical impulse response [ ] h n < n< d for n < hn [ ] = hd [ n] for n M for M < n < Mean square error : E = Hd e H e dω= h n h n π π π ( jω) ( jω) d[ ] [ ] [ ] [ ] h n h n d M d
[ ] = [ ] [ ] h n w n h n ( ) d Window Functions Practical truncated impulse response : Transfer function : ( jω) ( jω) ( jω) ( jλ) ( j( Ω Λ) H e = W e H ) d e = W e Hd e dλ π for n< Rectangular Window : w[ n] = wrec [ n] = for n M for M < n< n= ( Ω ) sin ( Ω / ) M jω jnω sin (M ) / jm Ω/ W e = e = e π<ω π Hamming window : n.54.46cos π for n M whamming,m [ n] = M for n < and n > M π π
Example: Rectangular and Hamming Windows.9.8.7 Rectangular window.6.5.4.3 M= db Rectangular window.. 5 5 5 n - - Hamming window.9.8.7.6.5.4.3 Hamming window M= -3-4 -5-6.. 5 5 5 n -7.5.5.5 3 Ω
Implementation of FIR Filters with Rectangular Window() Desired frequency response M j Ω e H for d e Ω Ω h n for Ω c < Ω π : ( jω ) DTFT = [ ] c d Desired impulse response π for n < : Ω M jω jnω Ω c Ωc c jn Ω M [ ] ( ) hd n = Hd e e dω= e dω= sinc n π π π π π Ω c Frequency response with rectangular window for n < M Ω Ω = = π π [ ] w [ n] [ ] c c h n rect, M hd n sinc n and otherwise. M :
M= Implementation of FIR Filters with Rectangular Window()..5. h d db - H d.5 - -3 -.5 5 5 5 3 35 4 45 5-4 3 4 5 6 7.8.6.4 w rec db 3 - W rec. - 5 5 5 3 35 4 45 5-3 3 4 5 6 7..5. h db - H.5-4 -6 -.5 5 5 5 3 35 4 45 5 n -8 3 4 5 6 7 Ω
Implementation of FIR Filters with Desired frequency response Hamming Window() M j Ω e H for d e Ω Ω h n for <Ω π ( jω ) DTFT = c [ ] d Desired impulse response : Ω Ω M jnω Ωc Ωc c M c j Ω jn Ω M c for n< : h [ ] d n = e e dω= e dω= sinc n π π π π Ω Frequency response with Hamming window Ω c for n < M n Ωc Ωc M hn [ ] = whammi ng,m [ n] hd [ n] =.54.46cos π sinc n M π π and otherwise. :
M=. Implementation of FIR Filters with Hamming Window().5. h d - H d.5 - -3 -.5 5 5 5 3 35 4 45 5-4 3 4 5 6 7.8.6.4 w Ham - W ham. -4 5 5 5 3 35 4 45 5-6 3 4 5 6 7..5 h - H. -4.5-6 -8 -.5 5 5 5 3 35 4 45 5-3 4 5 6 7
FIR Filter Block Diagram Implementation Impulse response: h[n] = [... h[] h[] h[]... h[m]...] Input signal: x[n] Output signal: y[n] = h[n] x[n] = h[]x[n] h[]x[n-] h[]x[n-]... h[m]x[n-m] z-transformed output signal Y(z)= h[] z X(z) h[] z - X(z) h[] z - X(z)...h[n] z -M X(z) X(z) z - z - z - h[] h[] h[] h[m-] h[m] Y(z)
Discrete Time Differentiator x h H Differentiator in analogue system : d s y() t = x() t Y() s = H() s X() s = sx() s H() s = s = jω dt Differentiator in digital system : y n h n x n Y z H z X z z [ ] = [ ] [ ] ( ) = ( ) ( ) ( ) st j ω T j Ω H z Ω = jω= j z= e = e = e T Normalized digital differentiator filter Mth order : π M j Ω jnω hd [ n] j e e d π d M j Ω j Ω ( ) Desired transfer function : H e = jωe π<ω π Desired impulse response : M M cos π n sin n π = Ω Ω= for n < M n M πs n y
Windowed Discrete Time Differentiator Windowed digital differentiator filter Mth order : Windowed impulse response : Windowed transfer function : Rectangular Window Hamming Window [ ] wn [ ] = [ ] [ ] hn wnh n ( j Ω ) ( j ) ( j = Ω Ω ) d H e W e H e for n M = for n < and for M < n < M M cos π n sin n π hn [ ] = for n< M M n M πs n [ ] wn n.54.46cos π for n M = M for n < and for M < n < M M cos π n sin n π n h[ n] =.54.46cos for n M M π < M M n πs n d
.5 M= Discrete Time Differentiator Rectangular Window Rectangular Window [ ] wn for n M = for n < and for M < n < M M cos π n sin n π hn [ ] = for n< M M n M πs n 3.5 h[n] 3 H(e jω ).5.5.5 -.5 - - -5 - -5 5 5 n.5 3 4 5 6 7 π π Ω
.8.6 Hamming Window Discrete Time Differentiator Hamming Window [ ] wn n.54.46cos π for n M = M for n < and for M < n < M M cos π n sin n π n h[ n] =.54.46cos for n M M π < M M n πs n M= h[n].5 H(e jω ).4..5 -. -.4 -.6 -.8 - - -5 - -5 5 5 n.5 π π 3 4 5 6 7 Ω
Filtering of Speech Signals Speech must be processed by precise time alignement FIR-filters with w[n], n M, symmetric or antisymmetric around M/ or (M)/ have linear characteristics Length M of FIR is usually large (fx~) Time delay T signal =½MT s (group delay) LP used to remove high frequency noise LP used to freq.band limit signal HP used to remove low frequency noise BP used to limit frequency range, used in speech processing equipment (fx. telephone 3 < f < 3Hz) BS used to remove noise at specific frequencies (fx. 5Hz)
Typical Examples on FIR-filter Characteristics for Filtering of Speech Signals LP [ ] filter h n = πn cos n M (Hanning or raised cosine window, M [ ] otherwise with symmetric h n ) BP [ ] filter h n = M π(n ) sin n M (with antisymmetric h[n]) M otherwise cos( πn) n M (with antisymmetric h[n]) HP filter h [ n] = otherwise d d Time delay (= group delay), defined by Tg = ϕ = Ts ϕ dω dω for phase linear FIR filters = T = T = ½MT g signal s
M= LP FIR filter, An Example.9.8.7.6.5.4.3.. h[n] H(e jω ) 6 5 4 3 - -5 - -5 5 5 n 3 4 5 6 7 Ω [ ] hn = πn cos n M M otherwise
BP FIR filter, An Example.8.6.4. -. -.4 -.6 -.8 M= 7 h[n] 6 H(e jω ) 5 4 3 - - -5 - -5 5 5 3 4 5 6 7 [ ] h n = M π(n ) sin n M M otherwise
Signal Processing Part 8.6 Digital IIR Filter Lowpass and Highpass Filters Magnus Danielsen
IIR-Filter Properties and Applications Difference equation: y[n]a y[n-]... a N y[n] =b x[n] b x[n-]... b M x[n-m] Impulse response: h[n]=h[], h[], h[],..., h[n],... has infinite length Transfer function: H(z)=h[]z h[]z -... h[n]z -n... has infinite no. of terms Causality: h[n]= for n< usually applied Construction of filters by bilinear transform Butterworth characteristics Chebyshev characteristics Elliptic characteristics LP-filters HP-filters BP-filters BS-filters Linear distortion transfer function dependence on frequency Amplidtude distortion Phase distortion - non-linear phase non-constant group (signal) delay Equivalizers Implementation of IIR filters with block diagrammes
Difference Equation for IIR Filters Transfer Function and Infinite Impulse Response Difference equation: y[n]a y[n-]... a N y[n] =b x[n] b x[n-]... b M x[n-m] z-transformed difference equation: Y(z)a z - Y(z)... a N z -N Y(z) =b X(z) b z - X(z)... b M z -M X(z) Transfer function : Impulse response : ( ) H z = b b z b z... b z M M M M a a z a z... a z = n h[] h[]z h[]z... h[n]z... [ ] [ ] [ ] [ ] [ ] [ ] h n =... h h h h 3... h n...
Bilinear Transform Definitions : Sampling time : T s π π = = ω ω samp jω st Relation between z and s : z = re = e s =σ jω Cyclic frequency : ω Frequency f = ω/( π) Normalized cyclic frequency : s Ω= T ω Analogue filter characteristic: H(s) Wanted digital filter characteristic: H(z) H(s) and H(z) shall have approximately the same properties Bilinear transform : z- s=σ j ω λ = = Σ'jΩ' = = tanh z sts e - sts sts e s s ω samp is often and will be written as ω which however can be confused with the stopband cyclic frequency s
Transformation of s plane z plane λ-plane jω ½ω s σ r = Im(z) z = Ω j e Ω Re(z) j Ω' Σ' ½ω s s s-plane =σ jω z-plane jω st s z = re = e λ-plane sts λ=σ ' j Ω ' = tanh Negative s-plane strip: σ<, -½ω s <ω< ½ω s is immaged in interiour of z = circle, and negative λ-plane The frequency axis s=jω interval: σ=, -½ω s < ω<½ω s is immaged on the z = circle and the imaginary λ-axis Positiv s-plane strip: σ>, -½ω s < ω <½ω s is immaged in exteriour of z = circle, and positive λ-plane
Frequency Axis - Transform jωt s s = j ω λ =Σ ' j Ω ' = tanh = jtan ωt The bilinear transformed frequency axis : ωt s ω Ω Ω ' = tan = tan π = tan ωs Ω π Trigonometric relations : sinh j x = j sin x sin j x = j sinh x ( ) ( ) cosh j x = cosx cos j x = cosh x ( ) ( ) tanh j x = j tan x tan j x = j tanh x ( ) ( ) s Ω Ω
IIR LP-filter with Butterworth Response Analogue LP-filter: Prototype filter is defined as LP-filter with ω c = Digital IIR LP-filter: Prototype filter is defined as LP-filter with Ω c = H K ((. α ) (.α )) s p log / ( ω ω ) log / r Hs () = θ K r =π r=,,3,...,k s K jexp(j θr) r= ωc ( Ω ') = K H j ( jω ) = K ω ω c Ω' ' Ω c K r H ( λ ) = θ K r =π r =,,3,...,K λ K jexp( j θ r) r= Ω' c z z λ= = z z s ((. α ) (.α )) s p log / p ( Ω Ω ) log ' / ' s p
Transfer Function of LP IIR-filter with Butterworth Response r H ( λ ) = θ K r = π r =,,3,..., K λ K jexp( j θ r ) r= Ω' c z z λ= = z z ω T ω Ω ' = tan = tan π c c s c ωs r H ( z) = θ K r = π r =,,3,..., K z K jexp(j θ r ) r= Ω ' c z = ( z ) jexp( j ) jexp( j ) z K θr θr r= Ω' c Ω' c K
Poles and Zeros Butterworth LP IIR-filters ( ) K z r H ( z) = θ r = π r =,,3,..., K K K jexp( j θr) jexp( j θr) z r= Ω' c Ω' c Im(z) jexp( j θr ) Ω ' j c Poles : zpole = for r =,,...,K z = e Ω jexp( j θr ) Ω ' r = Zeros : c zzero = K-multiple zero 5 multpl.zero Ω 5poles Re(z) Example : K = 5 Ω ' =. c z-plane
Butterworth LP IIR-filter K=5 f c = Hz f s = Hz - - -3 A(f)=log H ( ) = H z 5 r= z Ω ' c z jexp( j θr ) r 3 5 7 9 θ r =π =π, π, π, π, π K ω T f Ω = = π = c s c ' c tan tan.77 fs -4-5 -6-7 -8-9 - 4 6 8 4 3 ϕ(f)= H Frequency f - - -3-4 4 6 8 Frequency f
Block Diagram IIR Butterworth Filter Analogue LP filter: with ω =.349 () H s = = s ωc s s ω c ω c.343 ( s 3. 49)( s.349s.56) c X(z).8 Y(z) z - z - T s =.93 sec.5953.55 z - ( ) H z = ( ) (.8 z z ) ( )(.5953z.55z.5457z ) -.5457
LP IIR-filter with Chebyshev Response Analogue LPfilter: Prototype filter is defined as LP-filter with ω c = ( ω ) = H j () H s = C T ω γ K ω c K r= K ( ) s [ ηsinθ r j η cos θr] (( ) (. )).α α s p cosh / ( ωs ωp) cosh / For Chebyshev filter: ω c = ω p Digital LP-filter: Prototype filter is defined as LP-filter with Ω c = ( Ω ') = H j T Ω' γ K Ω' c K (( ) (. )).α α s p cosh / ( Ω s Ω p) cosh ' / ' For Chebyshev filter: Ω c =Ω p r H( λ ) = C θ K r =π r =,,3,...,K K λ η θ η θ r= ( ) [ sin r j cos r]
Poles and Zeros of Chebyshev LP IIR-filter Definition of parameter η : sinh sinh or sinh K sinh K γ γ ( ) η= = η Poles: λ = ηθ Ω ' z c jcos(sin j r ), (r ) = ηsin θr j η cos θr where θ r = π K λ sin r j cos sin r j cos η θ η θ = = λ η θ η θ Zeros : λ= λ z = = is a K-multiple zero λ r r
LP Butterworth IIR Filter ωt ' tan s Ω Ω = = tan ( Ω ') = K H j Ω' ' Ω c K ((. α ) (.α )) s p log / ( Ω Ω ) log ' / ' s p r H ( λ ) = θ K r =π r =,,3,...,K λ K jexp( j θ r) r= Ω' c Ω ' Ω ' = = p s c (.α ) (. ) K α p Ω ' s K z λ= z
T s ω Ω Ω= ' tan = tan HP Butterworth IIR Filter: Frequency transformation : ( Ω ') = K H j λ Ω' c Ω' Ω' c Ω' λ Ω' Ω' c Ω' Ω' c K c. ( α ) (.α ) ( ) s p log / ( Ω p Ω s) log ' / ' r H ( λ ) = θ K r =π r =,,3,...,K Ω' c K jexp( j θr ) r= λ z λ= z (.α ) K (.α ) Ω =Ω =Ω p s ' ' ' c p s K LP-filtur HP-filtur Poles HP =Poles LP * (i.e. same poles) Zeros HP : λ= z= (K-multiple)
Butterworth HP IIR Filter K=5 f c = Hz f s = Hz - - -3 A(f)=log H ( ) = H z 5 r= z Ω' c jexp(j θ r) z r 3 5 7 9 θ r =π =π, π, π, π, π K ω T f Ω = = π = c s c ' c tan tan.77 fs -4-5 -6-7 -8-9 - 4 6 8 4 3 ϕ(f)= H ½f s Frequency f - - -3-4 4 6 8 ½f s Frequency f
T s ω Ω Ω= ' tan = tan HP Chebyshev IIR Filter: Frequency transformation : For Chebyshev filters Ω ' =Ω' c λ Ω' c Ω' Ω' c Ω' λ Ω' Ω' ( Ω ') = Ω' c H j c T γ K p K z λ= z c.α ( ) (.α ) s ( ) p cosh / ( Ω p Ω s) cosh ' / ' r H( λ ) = C θ K r =π r =,,3,...,K Ω' c K η [ sinθ r j ηcos θr] r= λ Ω' LP-filtur HP-filtur Poles HP =Poles LP * (i.e. same poles) Zeros HP : λ= z= (K-multiple)
LP and HP Chebyshev Filters of Order K=5 f p = Hz f s = Hz α p = 3dB γ = η =.775 Phase (radian) Magnitude (db) - -4-6 -8-3 4 5 6 7 8 9 4 3 - - -3 LP filter -4 3 4 5 6 7 8 9 Frequency (Hz) Magnitude (db) Phase (radian) - -4-6 -8-3 4 5 6 7 8 9 4 3 - - -3 HP filter -4 3 4 5 6 7 8 9 Frequency (Hz)
Signal Processing Part 8.7 Digital IIR Filter Bandpass, and Bandstop Filters Magnus Danielsen
Bandpass IIR Filter Frequency Transformation λ Ω' λ Ω' Ω' Ω' Ω' Ω' Frequency transformation : Ω' c B' Ω' λ Ω' c B' Ω' Ω' ωt λ= = = = Ω = = z z jωts jω s Ω z e e ' tan tan z z ω T ω T Ω ' p = tan Ω ' = tan p s p s p LP-filtur BP-filtur ω T ω T Ω ' s = tan Ω ' = tan s s s s s B' = Ω' Ω' p ω T Ω ' = tan = Ω' Ω' p s p p Ω' Ω' Ω' Ω' H j H j Ω' c B' Ω' Ω' Ω ' p Ω' s Ω ' Ω' s Ω' p Ω' p Ω' s Ω' λ Ω' λ Ω' H H Ω' c B Ω' λ
BP Butterworth IIR Filter ( Ω ) = K H j ' r H ( λ ) = θ r = π r =,,3,..., K K Ω' K λ Ω' jexp( j θ r ) r= B' Ω' λ ( ) H z λ Ω' λ Ω' Ω' Ω' Ω' Ω' z z λ = = Ω' c B' Ω' λ Ω' c B' Ω' Ω ' z z = K r= Ω ' Ω ' Ω ' B' Ω ' Ω ' K ( z ) ( z ) ( Ω' ) ( Ω' ) ( Ω' ) jexp( j θ r ) z z jexp( j θr ) B' B' B' B' B' B' K LP-filtur BP-filtur K. ( α ) (.α ) ( ) s p log / Ω' Ω' Ω' Ω' log / Ω' Ω' Ω' Ω' s, p, s, p,
Bandpass IIR Butterworth Filter of Order K=5 f p =5 Hz f p =5 Hz f s = Hz α p =3dB z λ=λ ( z) = z 5 ( ) ( ) ( ) H z = H λ z = ( z) r= Ω' λ Ω' jexp( j θr ) B' Ω' λ( z) r 3 5 7 9 θ r =π =π, π, π, π, π K ω T ω T Ω ' p = tan Ω ' = tan B' =Ω' Ω' p p s p s p p Ω ' = Ω' Ω' p p Phase (radian) Magnitude (db) - - -3-4 -5-6 -7-8 -9-3 4 5 6 7 8 9 5-5 - -8π/ -5 - -5 π/ -7π/ -9π/ -3 3 4 5 6 7 8 9 ½f s ½f s Frequency f (Hz)
Bandpass IIR Chebyshev I Filter of Order K=5 α p =3dB f p =5 Hz f p =5 Hz f s = Hz α p =3dB z λ=λ ( z) = z 5 ( ) ( ) ( ) H z = H λ z = ( z) r= Ω' λ Ω' jexp( j θr ) B' Ω' λ( z) r 3 5 7 9 θ r =π =π, π, π, π, π K ω T ω T Ω ' p = tan Ω ' = tan B' =Ω' Ω' p p s p s p p Ω ' = Ω' Ω' p p Phase (radian) Magnitude (db) - - -3-4 -5-6 -7-8 -9-3 4 5 6 7 8 9 -π/ -5 - -9π/ -π/ -5 - -5 -π/ -3 3 4 5 6 7 8 9 ½f s ½f s Frequency f (Hz)
Frequency transformation : Bandstop IIR Filter Frequency Transformation λ B' λ Ω' Ω' B' Ω' Ω' Ω' c Ω' Ω' λ Ω' c Ω' Ω' Ω' ωt λ= = = = Ω = = z z jωts jω s Ω z e e ' tan tan z z ωpts ωpts ωsts ωsts Ω ' p = tan Ω ' p = tan Ω ' B' = Ω' p Ω' s = tan Ω ' s = tan p LP-filtur BS-filtur ω T Ω ' = tan = Ω' Ω' s p p Ω' B' Ω' Ω ' H j H j Ω' c Ω' Ω' Ω' Ω ' p Ω' s Ω' Ω ' p Ω' s Ω' s Ω' p Ω' λ B' λ Ω ' H H Ω' c Ω' Ω' λ
Band Stop (BS) Butterworth IIR Filter ( Ω ') = K H j λ B' λ Ω' Ω' B' Ω' Ω' z z λ = = Ω' c Ω' Ω' λ Ω' c Ω' Ω' Ω ' z z r H ( λ ) = θ r = π r =,,3,..., K K B' λ Ω ' K jexp(j θr ) r= Ω' Ω' λ B' Ω ' Ω ' Ω' Ω' Ω' ( ) H z Ω ' Ω' z Ω ' z K Ω' Ω' Ω' Ω' = B' K ( Ω' ) ( Ω' ) ( Ω' ) jexp( j θ r) z jexp( j θr) z jexp( j θr) r= B' B' B' B' B' B' LP-filtur BS-filtur K K. ( α ) (.α ) ( ) s p log / Ω' Ω' Ω' Ω' log / Ω' Ω' Ω' Ω' p, s, p, s,
Bandstop IIR Butterworth Filter of Order K=5 f p =5 Hz f p =5 Hz f samp = Hz α p =3dB z λ=λ ( z) = z 5 ( ) ( ) ( ) H z = H λ z = r= B' λ Ω' Ω' λ jexp( j ) Ω ' θr r 3 5 7 9 θ r =π =π, π, π, π, π K ω T ω T Ω ' s = tan Ω ' = tan B' =Ω' Ω' s s s s s s s Ω ' = Ω' Ω' s s Phase (radian) Magnitude (db) - - -3-4 -5-6 -7-8 -9-3 4 5 6 7 8 9-5 - -5 - -5-3π/ -5π/ -4π -3 3 4 5 6 7 8 9 ½f s ½f s Frequency f (Hz)
Bandstop IIR Chebyshev I Filter of Order K=5 f s =5 Hz f s =5 Hz f samp = Hz α p =3dB z λ=λ ( z) = z 5 ( ) ( ) ( ) H z = H λ z = r= B' λ Ω' Ω' λ jexp( j ) Ω ' θr r 3 5 7 9 θ r =π =π, π, π, π, π K ω T ω T Ω ' s = tan Ω ' = tan B' =Ω' Ω' s s s s s s s Ω ' = Ω' Ω' s s Phase (radian) Magnitude (db) - - -3-4 -5-6 -7-8 -9-3 4 5 6 7 8 9 5-5 - -5 - π -π/ -3π/ -3π -5 3 4 5 6 7 8 9 ½f s ½f s Frequency f (Hz)
Poles and Zeros IIR Filters of Order K LP filter: K complex poles K-multiple zero z = - HP filter: K complex poles K-multiple zero z = BP filter: K complex poles K-multiple zero z = - K-multiple zero z = BS filter: K complex poles K-multiple complex zero pairs
Resumé: IIR responses of filters of K th order for LP-, HP-, BP-, and BS-filters Same transformations for the LP-, HP-, BP-, and BS- filters are used for Butterworth type response and Chebyshev type response. Same transformations are used for other filter types transfer functions as well Used variables in: LP filter: λ/ω c HP filter: Ω c / λ BP filter: Ω /B (λ/ω Ω / λ) B =Ω p - Ω p = transformed bandwidth of passband BS filter: B /Ω (λ/ω Ω /λ) - B =Ω p - Ω p =transformed bandwidth of stopband
Equalizers H c (jω) H eq (jω) h (t) h t H jω H jω = () FT ( ) ( ) eq d eq d e H c jωt jω ( ) ( ) FT δ,d = d δ s n= h (t) h (t) t nt H jω = h nt e h nt e = H jω M ( ) ( ) jnωt ( ) ( ) s jnωts δ,d d s d s δ,eq n= n= ( ) [ ] DTFT ( jω) [ ] jnω d s = d d, δ = d Ω=ω s n= h nt h n H e h n e T M [ ] [ ] [ ] DTFT ( jω) [ ] jnω eq = d d,eq = d Ω=ω s n= h n w n h n H e h n e T
Signal Processing Part 9.: Acoustic Spectrogramme Example Magnus Danielsen
Speech Production Mechanism J.R.Deller Jr,J.G.Proakis, J.H.L.Hansen: Discrete-Time Processing of Speech Signals, Prentice Hall, New Jersey, 987
Windowing of Speech Signal Speech: Continuous: f(t) Discrete: f[n] Window function: Continuous: w(t-t ) Discrete: w[n-n ] Windowed speech: Continuous: f(t)w(t-t ) Discrete: f[n] w[n-n ] 5-5...3.4.5.6.7.5...3.4.5.6.7 5-5...3.4.5.6.7 Time (s) Spectrum : FT jωt Continuous : f (t) w(t t ) F( ω) W( ω)e [ ] [ ] [ ] [ ] FT jω jω jωn Discrete DTFT : f n w n n F(e ) W(e )e DFT jω jω jωn Discrete DFT : f n w n n F(e ) W(e )e t t n = n = ω= k N Ts Ts Ts Ω π Ω= k N
Measurement System for Audio and Speech Spectrogrammes Microphone Small voltage Amplified voltage LP analogue Ampl. filter. B = f s / Filtred voltage Sampl. Freq.= f s Sampled values Quant. Sampl. data f[n] (numbers) Discrete time generator n Data logger memory n t = n /f s f[n] w[n-n ] w[n-n ] Frequency 35 Frequency 3 5 5 5 Display FFT N = nfft.5..5..5.3.35.4.45 Time F(e jω,n ) Ω F F* f = f s Ω /(π) f Power to color or intensity transformation
Spectrum Spectrogramme: specgram(mtlb,5,fs,kaiser(5,5),475) 35 3 5 Frequency 5 5.5..5..5.3.35.4.45 Time Number of samples: 4 Sampling frequency: 748 Hz Overlap: 475 Window: Kaiser(5,5) FFT length: 5.8.6.4. 3 4 5 4 3 - - Signal -3.5..5..5.3.35.4.45.5 Time (s)
Influence of Overlap No overlap Overlap: 475.5..5..5.......5..5..5...... FFT length = 55, Kaiser window, window lenth = 5, β=5 specgram(mtlb,5,fs,kaiser(5,5),) 35 3 5 specgram(mtlb,5,fs,kaiser(5,5),475) 35 3 5 Frequency 5 Frequency 5 5 5...3.4.5 Time.5..5..5.3.35.4.45 Time
Influence of Length of Window 35 3 5 specgram(mtlb,5,fs,kaiser(5,5),475) Window length = 5 ~.634 sec FFT length = 5 Frequency 5 Window length = ~.696 sec FFT length = 5 5 specgram(mtlb,5,fs,kaiser(,5),75).5..5..5.3.35.4.45 Time Window length = ~.87 sec FFT length = 4 specgram(mtlb,4,fs,kaiser(,5),975) 35 35 3 3 5 5 Frequency 5 Frequency 5 5 5...3.4.5 Time.5..5..5.3.35.4 Time
Influence of Window Shape Window length=5 35 specgram(mtlb,5,fs,kaiser(5,),475) Rect.window = kaiser(5,).4..8 Frequency 3 5 5.6.4. 5-3 4 5 6.5..5..5.3.35.4.45 Time specgram(mtlb,5,fs,kaiser(5,5),475) 35 Kaiser.window = kaiser(5,5).4..8 Frequency 3 5 5.6.4. - 3 4 5 6 5.5..5..5.3.35.4.45 Time
Influence of Window Shape specgram(mtlb,5,fs,kaiser(5,5),475) 35 3.8.6.4 specgram(mtlb,5,fs,kaiser(5,),475) 35 3 Frequency 5 5. 3 4 5 Frequency 5 5 5.5..5..5.3.35.4.45 Time.8.6.4. 3 4 5 5.5..5..5.3.35.4.45 Time specgram(mtlb,5,fs,hanning(5),475) 35 3.8.6.4 specgram(mtlb,5,fs,hamming(5),475) 35 3 Frequency 5 5 5.5..5..5.3.35.4.45 Time. 3 4 5.8.6.4. 3 4 5 Frequency 5 5 5.5..5..5.3.35.4.45 Time
Signal Processing Part 9.: Delays in Systems Magnus Danielsen
Delay in Transmission Systems x phys (t) System No magnitude distortion Transfer function H(ω) y phys (t) Definition of system: Type of system, e.g. Communication system Measurement system Audio Hi-Fi system Television system Input signal: x phys (t) Output signal: y phys (t) Group delay = signal delay: T gr Phase delay: T ph No magnitude distortion in the transmission band
Group Delay and Phase Delay Signal magnitude (arb.units) Input signal :.8.6.4. -. -.4 -.6 -.8 T gr - -3 - - 3 T ph Time (arb.units) () = () ( ω ) = ½x() t exp( jω t) ½x() t exp( jωt) = Re ( x() t exp ( jωt )) () = () ( ω ) x t x t cos j t phys x t x t exp j t x (t) x (t-t gr ) y phys (t) x phys (t) Output signal = delayed input signal : () = ( ) ( ω ) y t x t T cos j (t T ) phys gr ph
Definition of System Transfer Function and Input Signal Envelope : Input signal : FT x() t X( ω) FT () = () ( ω ) ( ω ω ) x t x t exp j t X Transfer function with no magnitude distortion : ( ) ( ) ( ) H ω = H exp jψ ω H = constant Phase - first order Taylor approx. around ω gives the linear frequency variation: ( ) dψ ω Ψ( ω ) =Ψ ω ω =Ψ Ψ ω ω dω ( ) ' ( ) ω=ω
Definition of Group Delay and Phase Delay Output signal Fourier transform : ( ) ( ) ( ) ( ) ( ( ( ))) = H exp j ( Ψ Ψ ' ω ) Y ω = H jω X(j ω ) = H exp jψ ω X ( ω ω ) y X(jω) = H exp j Ψ Ψ ' ω ω X ( ω ω ) Output signal : ( ) X( ω ω)exp ( j Ψ' ω) H(jω) ( Ψ Ψ ω ) x(t Ψ')exp ( j ω(t Ψ ') () t = H exp j( ' ) = H x(t Ψ') exp ( j ω(t Ψ / ω )) () t = H x(t Ψ ') ( ω t Ψ / ω )) y cos ( phys Y(jω) Group delay : T dψ = Ψ ' = d ω gr ω=ω Phase delay : T ph Ψ = ω
Phase and Group Delay Based on Transfer Function Transfer function in Fourier transform formulation : ( ) ( ω ) = H exp jψ( ω) ( ω ) = ( ω ) Ψ( ω) H j ln H j ln H j j ( ) ( ) ( ) = ½ln H jω ½ln H jω jψ ω ( ) ( ) ( ) = ½ln H jω ½ln H jω jψ ω Phase : Group delay : ( ) ( ω) ( ω) j H j Ψ( ω ) = ln H j ( ω) ( ) dψ ω d H j Tgr ( ω ) = = ½ ln dω d( jω) H jω
Simulation of Group Delay of Pulse in 4th Order All-pass Filter by Simulink Sine Wave - envelope Pulse Generator Sine Wave Product Time Product XY Graph Buffered FFT Scope s -3*^4s^ s 3*^4s^ Transfer Fcn Spectrum of input pulse s -3*^4s^ s 3*^4s^ Transfer Fcn 4th order all-pass filter XY Graph Input pulse magnitude Y Axis Output pulse magnitude Y Axis.8.6.4. -. -.4 -.6 -.8 -.5.5 t =.5ms Time X Axis(sec) x -3.8.6.4. -. -.4 -.6 X Y Plot X Y Plot Group delay= t -t =.57ms -.8 -.5 X Axis.5 x -3 t =.757 ms Time (sec)
4th Order All-pass Filter Transfer function : () H s 4 s 3 s = 4 s 3 s Poles and zeros : Double complex pole-pairs: s.5 ± j 4 5 Double complex zero-pairs: s.5 ± j ω=.489 5 rad/sec 4 5 Phase : 4 3 ω ϕ= 4 Arctan ω Group delay for ω= 5 rad/sec: (4π)/ ω =.57 ms Phase (radian) - -4-6 -8 - π Phase delay for ω= 5 rad/sec: (π)/ω =.68 ms - 4π -4.5.5.5 3 3.5 x 5 Cyclic frequency (rad/sec)
Delay in AM-system Simulink Simulation Sine Wave - envelope Constant Sum Product y(t) s -3*^4s^ s 3*^4s^ Transfer Fcn s -3*^4s^ s 3*^4s^ Transfer Fcn y(t T gr ) 3 Constant Sum Mux Mux Scope Amplitude modulated signal : () = ( ω ) y t ( m x(t)) cos t Sine Wave x(t) = cos ( ωt) Buffered FFT Scope T gr =.5 ms 5 Spectrum of AMmodulated signal y(t T gr ) 4 Magnitude 3 y(t) 5 5 Frequency (rad/sec) x 4 Time s
Signal Processing Part 9.3: Seismic Example Magnus Danielsen
B K Galloway and S L Klemperer (Dept.Geoph. Stanford Univ., CA); J R Childs (Menlo Park, CA); Bering-Chukchi Working Group (Inst.of the Lithosphere and Inst.of Oceanology, Russian Academy of Sciences, Western Washington University, Lamont-Doherty Earth Observatory, Columbia University) Seismic Ship and Streamer Configuration Wing-kei Yu, Rice University, Houston, Texas
Seismic Source - Airgun
Hydrophones Hydrophone cable