DIGITAL FILTERING AND THE DFT Digital Linear Filters in the Receiver Discrete-time Linear System Tidbits DFT Tidbits Filter Design Tidbits idealized system Software Receiver Design Johnson/Sethares/Klein / 7
Digital Linear Filters in the Receiver Binary message sequence b w { 3,,, 3} Coding P(f) Pulse shaping Other FDM Transmitted signal users Noise Analog upconversion Channel Carrier specification Analog received signal Antenna Analog conversion to IF T s Input to the software receiver Digital down- conversion to baseband Downsampling Equalizer Decision Decoding Timing synchronization T m Carrier synchronization Q(m) { 3,,, 3} Pulse matched filter Source and Reconstructed error coding message frame synchronization There are a number of places in our PAM communication system receiver after the sampler where a digital linear filter is needed, including: lowpass filter in digital downconversion pulse-matched filter timing interpolator equalizer correlator for decoder frame synchronization Software Receiver Design Johnson/Sethares/Klein 2 / 7 b^
Discrete-time Linear Systems Tidbits Discrete-time impulse: δ[k] = { k = k Signal as weighted sum of delayed impulses: {w[k]} = {, 2,,...} w[k] = δ[k]+2δ[k ] δ[k 2]... Discrete-time linear system response: input: w[k] = δ[k] output: y[k] = h[k] input: w[k] = δ[k]+2δ[k ] = w[]δ[k]+w[]δ[k ] output:y[k] = w[]h[k]+w[]h[k ] input: w[k] = j= w[j] δ[k j] output:y[k] = j= w[j] h[k j] w[k] h[k] Software Receiver Design Johnson/Sethares/Klein 3 / 7
DFT Tidbits DFT: Given we define IDFT: Given we define {w[k]} = {w[], w[],..., w[n ]} W[n] = DFT({w[k]}) = N k= w[k]e j(2π/n)nk n =,,2,...,N {W[n]} = {W[], W[],..., W[N ]} w[k] = IDFT({W[n]}) = N N n= W[n]e j(2π/n)nk k =,,2,...,N Software Receiver Design Johnson/Sethares/Klein 4 / 7
DFT Tidbits (cont d) Define M = w = [w[] w[] w[2]... w[n ]] T... e j2π N e j4π N... e j2π(n ) N e j4π N e j8π N... e j4π(n ) N.... e j2(n )π N e j4(n )π N... e j2(n )2 π N W = [W[] W[] W[2]... W[N ]] T Then, for the IDFT and for the DFT w = ( ) M W N W = NMw Software Receiver Design Johnson/Sethares/Klein 5 / 7
DFT Tidbits (cont d) Nw = W[] +W[]. e j2π/n e j4π/n. e j2π(n )/N +...+W[N ] = W[] C +W[] C +...+W[N ] C N = N n= W[n]C n w is a linear combination of the columns C n. e j2(n )π/n e j4(n )π/n. e j2(n )2 π/n Software Receiver Design Johnson/Sethares/Klein 6 / 7
DFT Tidbits (cont d) The all ones C is a vector of samples of a zero frequency sinusoid. The entries of C maintain the same (unit) magnitude but have an angle that increases from to 2π(N )/N, i.e. traversing one period over the data record length. The entries of C 2 traverse the full unit circle twice in the positive (counterclockwise) direction. The DFT re-expresses the time vector as a linear combination of sinusoids with periods equal to the data record length, half this length, one-third this length, and so forth up to (/(N ))th of this length. Software Receiver Design Johnson/Sethares/Klein 7 / 7
DFT Tidbits (cont d) The key factors in a DFT based frequency analysis are: The sampling interval T s is the time resolution, the shortest time over which any event can be observed. The sampling rate is f s = T s. As the sample rate increases, the time resolution decreases. The total time is T = NT s where N is the number of samples in the analysis. The frequency resolution is T = NT s = fs N. Sinusoids closer together (in frequency) than this value are indistinguishable. As the time resolution increases, the frequency resolution decreases, and vice versa. Software Receiver Design Johnson/Sethares/Klein 8 / 7
DFT Tidbits (cont d) Example: In specgong.m sampling interval: T s = 44 number of samples: N = 2 6 total time: NT s =.48 seconds frequency resolution: NT s =.67 Hz Amplitude.5.5.5 Time in seconds.5 4 Magnitude 3 2.5.5 2 2.5 Frequency in Hertz 4 4 Magnitude 3 2 4 6 65 7 75 45 5 8 55 85 Frequency in Hertz Software Receiver Design Johnson/Sethares/Klein 9 / 7
Filter Design Tidbits Types: 7: Digital Filtering and the DFT lowpass filter high pass filter bandpass filter bandstop (notch) filter Bandpass filter spectra specification: H(f ) Transition region Passband Stopband f Lower H(f ) band edge Upper band edge f Software Receiver Design Johnson/Sethares/Klein / 7
Filter Design Tidbits (cont d) From help firpm: FIRPM performs Parks-McClellan optimal equiripple FIR filter design. i.e. a linear phase (real, symmetric coefficients) FIR filter which has the best approximation to the desired frequency response in the minimax sense. b = firpm(fl,fbe,damps) b is the output vector containing the impulse response of the designed filter. fl is (one less than) the number of terms in b. fl fit to design specs improves fl computational costs increase fl throughput delay increases Software Receiver Design Johnson/Sethares/Klein / 7
Filter Design Tidbits (cont d) fbe is a vector of frequency band edge values as a fraction of the prevailing Nyquist frequency. For a basic bandpass filter: bottom of stopband (presumably zero) top edge of lower stopband (which is also the lower edge of the lower transition band) lower edge of passband upper edge of passband lower edge of upper stopband upper edge of upper stopband (generally the last value will be ). damps is the vector of desired amplitudes of the frequency response at each band edge. Software Receiver Design Johnson/Sethares/Klein 2 / 7
Filter Design Tidbits (cont d) From bandex with fbe=[.24.26.74.76 ] damps=[ ] fl=3 b=firpm(fl,fbe,damps); freqz(b) produces 2 Magnitude Response (db) 2 4 6 8..2.3.4.5.6.7.8.9 Normalized frequency (Nyquist ) 5 Phase (degrees) 5 5..2.3.4.5.6.7.8.9 Normalized frequency (Nyquist ) Software Receiver Design Johnson/Sethares/Klein 3 / 7
Filter Design Tidbits (cont d) To demonstrate criteria fit impact of filter length, repeat preceding example with fl halved and doubled. fl=5 2 Magnitude Response (db) 2 4 6 8..2.3.4.5.6.7.8.9 Normalized frequency (Nyquist == ) 2 Phase (degrees) 2 4 6 8..2.3.4.5.6.7.8.9 Normalized frequency (Nyquist == ) Software Receiver Design Johnson/Sethares/Klein 4 / 7
Filter Design Tidbits (cont d) fl=6 2 Magnitude Response (db) 2 4 6 8..2.3.4.5.6.7.8.9 Normalized frequency (Nyquist == ) 5 Phase (degrees) 5 5 2 25 3..2.3.4.5.6.7.8.9 Normalized frequency (Nyquist == ) Note improved fit to design specifications with increase in filter length (fl). Software Receiver Design Johnson/Sethares/Klein 5 / 7
Filter Design Tidbits (cont d) Adding an in-band notch with fbe=[.24.26.59.595.65.6.74.76 ] damps=[ ] fl=6 Magnitude Response (db) 2 3 4 5 6..2.3.4.5.6.7.8.9 Normalized frequency (Nyquist == ) Phase (degrees) 2 3 4..2.3.4.5.6.7.8.9 Normalized frequency (Nyquist == ) Desired notch (at normalized frequency =.6) is barely perceptible. Software Receiver Design Johnson/Sethares/Klein 6 / 7
Filter Design Tidbits (cont d) fl=2 Magnitude Response (db) 2 3 4 5..2.3.4.5.6.7.8.9 Normalized frequency (Nyquist == ) Phase (degrees) 2 3 4 5 6..2.3.4.5.6.7.8.9 Normalized frequency (Nyquist == ) Note improved fit to design specifications with increase in filter length (fl). Desired notch (at normalized frequency =.6) is quite pronounced. NEXT... We discuss the conversion of bits to symbols to pulse-amplitude modulated signals and the reversal with correlation used to locate the frame break. Software Receiver Design Johnson/Sethares/Klein 7 / 7