DSP-CIS Part-I / Chapter-2 : Signals & Systems Review Marc Moonen & Toon van Waterschoot Dept. E.E./ESAT-STADIUS, KU Leuven [email protected] www.esat.kuleuven.be/stadius/ Chapter-2 : Signals & Systems Review • Discrete-Time/Digital Signals (10 slides) Sampling, quantization, reconstruction • Discrete-Time Systems (13 slides) LTI, impulse response, convolution, z-transform, frequency response, frequency spectrum, IIR/FIR • Discrete Fourier Transform (4 slides) DFT-IDFT, FFT • Multi-Rate Systems (11 slides) DSP-CIS 2015 / Part-I / Chapter-2: Signals & Systems Review 2 / 40 Discrete-Time/Digital Signals 1/10 Jean-Baptiste Joseph Fourier (1768-1830) Analog signal processing Analog domain (continuous-time domain) Analog Signal Processing Circuit Analog IN u (t ) +¥ U( f ) = F{u(t)} = ò u(t).e - j 2 p . f .t dt Analog OUT y (t ) Y( f ) = F{y(t)} = -¥ +¥ ò y(t).e - j 2 p . f .t dt -¥ (Fourier Transform / spectrum, where f = frequency) DSP-CIS 2015 / Part-I / Chapter-2: Signals & Systems Review 3 / 40 Discrete-Time/Digital Signals 2/10 Digital signal processing Analog domain Analog IN Digital domain Analog-toDigital Conversion 011010 0101 100110 0010 DSP Digital IN sampling & quantization DSP-CIS 2015 / Part-I / Chapter-2: Signals & Systems Review Digital OUT Analog domain Digital-toAnalog Conversion Analog OUT reconstruction 4 / 40 Discrete-Time/Digital Signals 1. Sampling x[k ] x(k .Ts ) x(t ) amplitude 3/10 amplitude continuous-time signal discrete-time signal impulse train Ts continuous-time (t) 01234 It will turn out (p.24-25) that a spectrum can be computed from x[k] (=discrete-time), which (remarkably) will be equal to the spectrum (=Fourier transform) of the (continuous-time) sequence of impulses…... DSP-CIS 2015 / Part-I / Chapter-2: Signals & Systems Review discrete-time [k] xD (t ) x(t ). (t k .Ts ) k 5 / 40 Discrete-Time/Digital Signals 4/10 So what does this spectrum of xD(t) look like… • Spectrum replication – Time domain: +¥ xD (t) = x(t). å d (t - k.Ts ) k=-¥ – Frequency domain: X( f ) = F{x(t)} 1 +¥ k XD ( f ) = . å X( f - ) Ts k=-¥ Ts magnitude frequency (f) DSP-CIS 2015 / Part-I / Chapter-2: Signals & Systems Review XD ( f ) = F{xD (t)} magnitude frequency (f) 6 / 40 Discrete-Time/Digital Signals 5/10 • Sampling theorem – Analog signal spectrum X(f) has a bandwidth of fmax Hz – Spectrum replicas are separated by fs =1/Ts Hz magnitude frequency – No spectral overlap if and only if DSP-CIS 2015 / Part-I / Chapter-2: Signals & Systems Review fs > 2.fmax 7 / 40 Discrete-Time/Digital Signals 6/10 • Sampling theorem – Analog signal spectrum X(f) has a bandwidth of fmax Hz – Spectrum replicas are separated by fs =1/Ts Hz magnitude frequency – Spectral overlap (=‘folding’, ‘aliasing’) if DSP-CIS 2015 / Part-I / Chapter-2: Signals & Systems Review fs < 2.fmax 8 / 40 Discrete-Time/Digital Signals (*) – Terminology: • sampling frequency/rate fs • Nyquist frequency fs/2 • sampling interval/period Ts – E.g. CD audio: fs = 44,1 kHz Harry Nyquist (1889 –1976) • Sampling theorem 7/10 • Anti-aliasing prefilters – If then frequencies above the Nyquist frequency are ‘folded’ into lower frequencies (=aliasing) – To avoid aliasing, sampling is usually preceded by (analog-domain) low-pass (=anti-aliasing) filtering (*) An equivalent formulation is fs > fmax-(-fmax) = fmax-fmin = ‘bandwidth’…will use this in p.36 DSP-CIS 2015 / Part-I / Chapter-2: Signals & Systems Review 9 / 40 Discrete-Time/Digital Signals 2. B-bit quantization discrete-time signal amplitude 6dB per bit rule: Number of bits B = log2 ( 8/10 quantized discrete-time signal =discrete-amplitude&time signal =digital signal amplitude x[k ] xQ [k ] 3Q 2Q Q 0 -Q -2Q -3Q discrete time [k] R discrete time [k] range R +1) quantization step Q Signal-to-QuantizationNoise-Ratio = 20 log10 ( Ex: CD audio = 16bits ~ 96dB SNR range R ) = 6B dB (LP’s: 60dB SNR) quantization step Q DSP-CIS 2015 / Part-I / Chapter-2: Signals & Systems Review 10 / 40 Discrete-Time/Digital Signals 9/10 3. Reconstruction – Reconstruction = ‘fill the gaps’ between adjacent samples – Example: staircase reconstructor amplitude x[k ] discretetime/digital signal discrete time [k] amplitude xR (t ) reconstructed analog signal continuous time (t) – In a practical realization xD(t) is generated first as an intermediate signal by means of a D-to-A & sampler, which is then followed by (analog domain) filtering (details omitted) DSP-CIS 2015 / Part-I / Chapter-2: Signals & Systems Review 11 / 40 Discrete-Time/Digital Signals 10/10 • Complete scheme is… Analog IN Analog OUT antialiasing prefilter sampler antiimage postfilter quantizer DSP Digital IN DSP-CIS 2015 / Part-I / Chapter-2: Signals & Systems Review reconstructor Digital OUT 12 / 40 Discrete-Time Systems 1/13 Discrete-time system is `sampled data’ system u[k] y[k] Input signal u[k] is a sequence of samples (=numbers) ..,u[-2],u[-1] ,u[0], u[1],u[2],… System then produces a sequence of output samples y[k] ..,y[-2],y[-1] ,y[0], y[1],y[2],… Example: `DSP’ block in previous slide DSP-CIS 2015 / Part-I / Chapter-2: Signals & Systems Review 13 / 40 Discrete-Time Systems 2/13 Will consider linear time-invariant (LTI) systems u[k] y[k] Linear : input u1[k] -> output y1[k] input u2[k] -> output y2[k] hence a.u1[k]+b.u2[k]-> a.y1[k]+b.y2[k] Time-invariant (shift-invariant) input u[k] -> output y[k] hence input u[k-T] -> output y[k-T] DSP-CIS 2015 / Part-I / Chapter-2: Signals & Systems Review 14 / 40 Discrete-Time Systems 3/13 Causal systems iff for all input signals with u[k]=0,k<0 -> output y[k]=0,k<0 Impulse response K=0 input …,0,0, 1 ,0,0,0,...-> output …,0,0, h[0] ,h[1],h[2],h[3],... General input u[0],u[1],u[2],u[3] (cfr. linearity & shift-invariance!) 0 0 0 y[0] h[0] y[1] h[1] h[0] u[0] 0 0 y[2] h[2] h[1] h[0] 0 u[1] . h[2] h[1] h[0] u[2] y[3] 0 y[4] 0 0 h[2] h[1] u[3] 0 0 h[2] y[5] 0 DSP-CIS 2015 / Part-I / Chapter-2: Signals & Systems Review Otto Toeplitz (1881–1940) K=0 this is called a `Toeplitz’ matrix 15 / 40 Discrete-Time Systems 4/13 Convolution u[0],u[1],u[2],u[3] 0 0 y[0] h[0] 0 y[1] h[1] h[0] 0 u[0] 0 y[2] h[2] h[1] h[0] 0 u[1] . y[3] 0 h[2] h[1] h[0] u[2] y[4] 0 0 h[2] h[1] u[3] 0 0 h[2] y[5] 0 D y[k] = å h[k - k ].u[k ]= h[k]* u[k] k DSP-CIS 2015 / Part-I / Chapter-2: Signals & Systems Review y[0],y[1],... h[0],h[1],h[2],0,0,... = `convolution sum‘ (=more convenient than Toeplitz matrix notation when considering (infinitely) long input and impulse response sequences 16 / 40 Discrete-Time Systems 5/13 Z-Transform of system h[k] and signals u[k],y[k] Definition: D D H (z)= å h[k].z U(z)= å u[k].z k k -k -k D Y(z)= å y[k].z-k k Input/output relation: 0 0 0 y[0] h[0] y[1] h[1] h[0] u[0] 0 0 y[ 2] h[2] h[1] h[0] 0 u[1] 1 2 3 4 5 1 2 3 4 5 1 z z z z z . z z z z . 1 z . y [ 3 ] 0 h [ 2 ] h [ 1 ] h [ 0 ] u[ 2] y[ 4] 0 0 h[ 2] h[1] u[3] 0 0 h[ 2] y[5] 0 Y ( z) H ( z).1 z1 Y ( z ) H ( z ).U ( z ) DSP-CIS 2015 / Part-I / Chapter-2: Signals & Systems Review z2 z3 H(z) is `transfer function’ 17 / 40 Discrete-Time Systems 6/13 Z-Transform • Easy input-output relation: Y ( z ) H ( z ).U ( z ) • May be viewed as `shorthand’ notation (for convolution operation/Toeplitz-vector product) • Stability =bounded input u[k] leads to bounded output y[k] --iff h[k ] k --iff poles of H(z) inside the unit circle (now z=complex variable) (for causal,rational systems, see below) DSP-CIS 2015 / Part-I / Chapter-2: Signals & Systems Review 18 / 40 Discrete-Time Systems 7/13 Example-1 : `Delay operator’ K=0 u[k] Impulse response is …,0,0, 0 ,1,0,0,0,… Transfer function is H (z) = z-1 = Pole at z=0 1 z Example-2 : Delay + feedback K=0 Impulse response is …,0,0, 0 ,1,a,a^2,a^3… Transfer function is H ( z ) z 1 a.z 2 a 2 .z 3 a 3 .z 4 ... Pole at z=a y[k]=u[k-1] 1 H ( z ) a.z H ( z ) z 1 z 1 1 H ( z) 1 a.z 1 z a DSP-CIS 2015 / Part-I / Chapter-2: Signals & Systems Review u[k] + y[k] x a =simple rational function realized with a delay element, a multiplier and an adder 19 / 40 Discrete-Time Systems 8/13 Will consider only rational transfer functions: B(z) b0 zL + b1zL-1 +... + bL b0 + b1z-1 +... + bL z- L H (z) = = L = L-1 A(z) z + a1z +... + aL 1+ a1z-1 +... + aL z-L • L poles (zeros of A(z)) , L zeros (zeros of B(z)) • Corresponds to difference equation Y ( z ) H ( z ).U ( z ) A( z ).Y ( z ) B( z ).U ( z ) ... y[k] = b0.u[k]+ b1.u[k -1]+... + bL .u[k- L]- a1.y[k -1]-... - aL.y[k - L] • Hence rational H(z) can be realized with finite number of delay elements, multipliers and adders • In general, this is a `infinitely long impulse response’ (`IIR’) system (as in example-2) DSP-CIS 2015 / Part-I / Chapter-2: Signals & Systems Review 20 / 40 Discrete-Time Systems 9/13 Special case is B(z) -1 -L H (z) = L = b0 + b1z +... + bL z z • L poles at the origin z=0 (hence guaranteed stability) • L zeros (zeros of B(z)) = `all zero’ filter • Corresponds to difference equation Y(z) = H(z).U(z) Þ y[k] = b0.u[k]+ b1.u[k -1]+... + bL .u[k - L] =`moving average’ (MA) filter • Impulse response h[k] is 0, 0, 0, b0 , b1,..., bL-1, bL , 0, 0, 0,... = `finite impulse response’ (`FIR’) filter DSP-CIS 2015 / Part-I / Chapter-2: Signals & Systems Review 21 / 40 Discrete-Time Systems 10/13 H(z) & frequency response: • Given a system H(z) • Given an input signal = complex exponential u[k ] e jk Im u[2] k u[1] Re cos(k ) j. sin( k ) u[0]=1 (where ω=radial frequency) • Output signal : y[k] = å h[k ].u[k-k ] = å h[k ].ejw (k-k )=e jwk å h[k ].e- jwk = u[k].H(ejw ) k k j H (e ) k = `frequency response’ = complex function of radial frequency ω = H(z) evaluated on the unit circle DSP-CIS 2015 / Part-I / Chapter-2: Signals & Systems Review 22 / 40 Discrete-Time Systems 11/13 H(z) & frequency response: • Periodic with period = 2 j H (e ) • For a real-valued impulse response h[k] - magnitude response H (e j ) is even function - phase response is odd function j H (e ) • Example-1: Low-pass filter 1 0.5 Nyquist frequency e jk ...,1,1,1,1,1,... 0 -4 5 -2 0 2 -2 0 2 4 0 (=2 samples/period) -5 -4 • Example-2: All-pass filter H (e j ) 1 DSP-CIS 2015 / Part-I / Chapter-2: Signals & Systems Review 4 DC ej 0k =...,1,1,1,1,1,... 23 / 40 Discrete-Time Systems 12/13 • Z-Transform & Discrete-Time Fourier Transform z = ejw Y(z) = H(z).U(z) Y (e j ) H (e j ).U (e j ) – H (e j ) is frequency response of the LTI system – U(ejw ) is frequency spectrum (‘Discrete-Time Fourier Transform’) of input signal U(ejw ) = U(z) z=ejw = +¥ -k u[k].z å k=-¥ = z=ejw +¥ - jw .k u[k]. e å k=-¥ (compare to Fourier Transform, see p.3) jw – Y(e ) is frequency spectrum of the output signal DSP-CIS 2015 / Part-I / Chapter-2: Signals & Systems Review 24 / 40 Discrete-Time Systems 13/13 • Z-Transform & Fourier Transform It is proved that… j – The frequency response H (e ) of an LTI system is equal to the Fourier transform of the continuous-time impulse f e.g. f = s Þ w = p 2 sequence (see p.5) constructed with h[k] H (e ) = ... = F{hD (t)} = F{å h[k].d (t - k.Ts )} , w = 2p . jw k jw f fs jw – The frequency spectrum U(e ) or Y(e ) of a discrete-time signal is equal to the Fourier transform of the continuous-time impulse sequence constructed with u[k] or y[k] f U(e ) =... = F{uD (t)} = F{åu[k].d (t - k.Ts )} , w = 2p . fs k jw – F{yD (t)} = F{hD (t)}.F{uD (t)} corresponds to continuous-time Y( f ) = H( f ).U( f ) iff U( f ),Y( f ), H( f ) are bandlimited (no aliasing) DSP-CIS 2015 / Part-I / Chapter-2: Signals & Systems Review 25 / 40 Discrete/Fast Fourier Transform 1/4 • DFT definition: – The `Discrete-time Fourier Transform’ of a discrete-time system/signal x[k] is a (periodic) continuous function of the radial frequency ω (see p.28) X (e j ) x[k ]. z k k z e j – The `Discrete Fourier Transform’ (DFT) is a discretized version of this, obtained by sampling ω at N uniformly spaced frequencies wn = 2p .n / N (n=0,1,..,N-1) and by truncating x[k] to N samples (k=0,1,..,N-1) j X[e 2 p .n N N-1 -j ] = å x[k]. e 2 p .n k N k=0 DSP-CIS 2015 / Part-I / Chapter-2: Signals & Systems Review 26 / 40 Discrete/Fast Fourier Transform 2/4 • DFT & Inverse DFT (IDFT): – An N-point DFT sequence can be calculated from an N-point time sequence: j X[e 2 p .n N N-1 -j ] = å x[k]. e 2 p .n k N = DFT k=0 – Conversely, an N-point time sequence can be calculated from an N-point DFT sequence: j 1 N-1 x[k] = X[e å N n=0 2p .n N DSP-CIS 2015 / Part-I / Chapter-2: Signals & Systems Review j ]. e 2 p .n k N = IDFT 27 / 40 Discrete/Fast Fourier Transform 3/4 • DFT/IDFT in matrix form – Using shorthand notation.. – ..the DFT can be rewritten as X = F.x – ..the IDFT can be rewritten as x = F-1.X 1 = F *.X N DSP-CIS 2015 / Part-I / Chapter-2: Signals & Systems Review 28 / 40 Discrete/Fast Fourier Transform 4/4 • Fast Fourier Transform (FFT) (1805/1965) Split up N-point DFT in two N/2-point DFT’s Split up two N/2-point DFT’s in four N/4-point DFT’s … Split up N/2 2-point DFT’s in N 1-point DFT’s Calculate N 1-point DFT’s Rebuild N/2 2-point DFT’s from N 1-point DFT’s … Rebuild two N/2-point DFT’s from four N/4-point DFT’s Rebuild N-point DFT from two N/2-point DFT’s – DFT complexity of N2 multiplications is reduced to FFT complexity of O(N.log2(N)) multiplications James W. Cooley • • • • • • • • • John W.Tukey Carl Friedrich Gauss (1777-1855) – Divide-and-conquer approach: – Similar IFFT DSP-CIS 2015 / Part-I / Chapter-2: Signals & Systems Review 29 / 40 Multi-Rate Systems 1/11 • Decimation : decimator (=downsampler) u[0],u[1],u[2]... D u[0], u[N], u[2D]... Example : u[k]: 1,2,3,4,5,6,7,8,9,… 2-fold downsampling: 1,3,5,7,9,... • Interpolation : expander (=upsampler) u[0], u[1], u[2],... D u[0],0,..0,u[1],0,…,0,u[2]... Example : u[k]: 1,2,3,4,5,6,7,8,9,… 2-fold upsampling: 1,0,2,0,3,0,4,0,5,0... DSP-CIS 2015 / Part-I / Chapter-2: Signals & Systems Review 30 / 40 Multi-Rate Systems 2/11 • Z-transform & frequency domain analysis of expander u[0], u[1], u[2],... U (z ) D u[0],0,..0,u[1],0,…,0,u[2]... D U(zD ) `images’ z e j 3 xHz xHz `Expansion in time domain ~ compression in frequency domain’ DSP-CIS 2015 / Part-I / Chapter-2: Signals & Systems Review 31 / 40 Multi-Rate Systems 3/11 • Z-transform & frequency domain analysis of expander u[0], u[1], u[2],... D u[0],0,..0,u[1],0,…,0,u[2]... Expander mostly followed by `interpolation filter’ to remove images (and `interpolate the zeros’) `images’ 3 LP xHz xHz xHz Interpolation filter can be low-/band-/high-pass (see p.35-36 and Chapter-10) DSP-CIS 2015 / Part-I / Chapter-2: Signals & Systems Review 32 / 40 Multi-Rate Systems 4/11 • Z-transform & frequency domain analysis of decimator u[0],u[1],u[2]... U (z ) D u[0], u[D], u[2D]... 1 D-1 .åU(z1 D .e- j 2 p d D d=0 D d=2 D ) d=0 d=1 3 3 -3p -2p xHz 2p 3p xHz `Compression in time domain ~ expansion in frequency domain’ jw /D ) is periodic with period 2Dp PS: Note that U (e j ) is periodic with period 2 while U(e The summation with d=0…D-1 restores the periodicity with period 2 ! DSP-CIS 2015 / Part-I / Chapter-2: Signals & Systems Review 33 / 40 Multi-Rate Systems 5/11 • Z-transform & frequency domain analysis of decimator u[0],u[1],u[2]... D u[0], u[N], u[2D]... Decimation introduces ALIASING if input signal occupies frequency band larger than 2p D , hence mostly preceded by anti-aliasing (decimation) filter d=2 d=0 d=1 3 LP 3 xHz xHz Anti-aliasing filter can be low-/band-/high-pass (see p.35-36 and Chapter-10) DSP-CIS 2015 / Part-I / Chapter-2: Signals & Systems Review 34 / 40 Multi-Rate Systems 6/11 • Example: LP anti-aliasing / down / up / LP interpolation fmax LP 3 (*) 3 3 LP 3 Will be used in Part IV on ‘Filterbanks’ DSP-CIS 2015 / Part-I /toChapter-2: & Systems Review (*) Corresponds NyquistSignals theorem: 3-fold reduction fmax 3-fold reduction fs 3 35 / 40 Multi-Rate Systems 7/11 • Example: HP anti-aliasing / down / up / HP interpolation fmin fmax HP 3 (*) 3 3 HP 3 Will be used in Part IV on ‘Filterbanks’ 3p 3 3 DSP-CIS 2015 / Part-I / Chapter-2: Signals Systems Review / 40 ) (*) Corresponds to Nyquist theorem for &‘passband’ signals: fs > fmax-fmin (as in footnote p.9, now fmin ≠36 -fmax Multi-Rate Systems 8/10 • Interconnection of multi-rate building blocks D x D = x a u1[k] a D + = u2[k] u1[k] D x u2[k] = u1[k] D u2[k] D u1[k] D u2[k] D + x i.e. all filter operations can be performed at the lowest rate! Identities also hold if decimators are replaced by expanders DSP-CIS 2015 / Part-I / Chapter-2: Signals & Systems Review 37 / 40 Multi-Rate Systems 9/11 • `Noble identities‘(only for rational functions) u[k] y[k] D H(z ) D u[k] u[k] H (z ) D D = y[k] y[k] H (z ) u[k] = DSP-CIS 2015 / Part-I / Chapter-2: Signals & Systems Review y[k] D D H(z ) 38 / 40 Multi-Rate Systems 10/10 Application of `noble identities : efficient multi-rate realizations of FIR filters through… • Polyphase decomposition: Example : (2-fold decomposition) H ( z ) h[0] h[1]. z 1 h[2]. z 2 h[3]. z 3 h[4]. z 4 h[5]. z 5 h[6]. z 6 (h[0] h[2]. z 2 h[4]. z 4 h[6]. z 6 ) z 1.(h[1] h[3]. z 2 h[5]. z 4 ) E0 ( z 2 ) E1 ( z 2 ) Example : (3-fold decomposition) H ( z ) h[0] h[1]. z 1 h[ 2]. z 2 h[3]. z 3 h[4]. z 4 h[5]. z 5 h[6]. z 6 (h[0] h[3]. z 3 h[6]. z 6 ) z 1.( h[1] h[ 4]. z 3 ) z 2 .( h[ 2] h[5]. z 3 ) E0 ( z 3 ) E1 ( z 3 ) E2 ( z 3 ) General: (D-fold decomposition) H (z) = ¥ å h[k].z k=-¥ -k D-1 = å z .Ed (z ) -d D d=0 DSP-CIS 2015 / Part-I / Chapter-2: Signals & Systems Review , Ed (z) = ¥ å h[D.k + d].z -k k=-¥ 39 / 40 Multi-Rate Systems 11/11 • Polyphase decomposition: Example : efficient realization of FIR decimation/interpolation filter u[k] H(z) = 2 E0 ( z ) z 1 2 E1 ( z ) u[k] 2 E1 ( z 2 ) E0 ( z 2 ) + H(z) z 1 u[k] z 1 2 = + 2 E0 ( z ) 2 E1 ( z ) u[k] E1 ( z ) 2 E0 ( z ) 2 + z 1 + i.e. all filter operations can be performed at the lowest rate! DSP-CIS 2015 / Part-I / Chapter-2: Signals & Systems Review 40 / 40
© Copyright 2026 Paperzz