Presentation is loading. Please wait.

Presentation is loading. Please wait.

EE 102b: Signal Processing and Linear Systems II

Similar presentations


Presentation on theme: "EE 102b: Signal Processing and Linear Systems II"— Presentation transcript:

1 EE 102b: Signal Processing and Linear Systems II
Midterm Review Signals and Systems

2 Sampling and Reconstruction vs
Sampling and Reconstruction vs. Analog-to-Digital and Digital-to-Analog Conversion Sampling: converts a continuous-time signal to a continuous-time sampled signal Reconstruction: converts a sampled signal to a continuous-time signal. Analog-to-digital conversion: converts a continuous-time signal to a discrete-time quantized or unquantized signal Digital-to-analog conversion. Converts a discrete-time quantized or unquantized signal to a continuous-time signal. Ts 2Ts 3Ts 4Ts -3Ts -2Ts -Ts Ts 2Ts 3Ts 4Ts -3Ts -2Ts -Ts 1 2 3 4 -3 -2 -1 Each level can be represented by 0s and 1s 1 2 3 4 -3 -2 -1

3 Sampling Sampling (Time): =
Sampling (Frequency): x(t)p(t) X(jw)*P(jw)/(2p) Analog-to-Digital Conversation (ADC) Setting xd[n]=x(nTs) yields Xs(ejW) with W=wTs x(t) = p(t)=nd(t-nTs) xs(t) Ts 2Ts 3Ts 4Ts -3Ts -2Ts -Ts -3Ts -2Ts -Ts Ts 2Ts 3Ts 4Ts 𝟐𝝅 𝑻𝒔 X(jw) * = nd(w-(2pn/Ts)) Xs(jw) 1 1/Ts -2p Ts 2p Ts -2p Ts 2p Ts

4 Reconstruction Frequency Domain: low-pass filter (Ts=p/W)
Time Domain: sinc interpolation Digital-to-Analog Conversation (DAC) LPF applied to Xs(ejW) and then converted to continuous time (w=W/Ts) recovers sampled signal H(jw) Xs(jw) -2p Ts Xs(jw) 2p Xr(jw) H(jw) Ts -W W w w -2p Ts 2p Ts

5 Nyquist Sampling Theorem
A bandlimited signal [-W,W] radians is completely described by samples every Tsp/W secs. The minimum sampling rate for perfect reconstruction, called the Nyquist rate, is W/p samples/second If a bandlimited signal is sampled below its Nyquist rate, distortion (aliasing occurs) X(jw) X(jw) Xs(jw) -W W -2W W W 2W=2p/Ts

6 Quantization x(t) xQ(nTs) A … -A+kD -A+2D -A+D -A
Ts 2Ts … Divide amplitude range [-A,A] into 2N levels, {-A+kD}, k=0,…2N-1 Map x(t) amplitude at each Ts to closest level, yields xQ(nTs)=xQ[n] Convert k to its binary representation (N bits); converts xQ[n] to bits

7 Analog to Bits and Back Analog to Bits Bits to Analog ADC DAC
Bits to Analog DAC

8 Sampling with Zero-Order Hold
nd(t-nTs) xs(t) xd[n] (Ts=1) Ts 2Ts 3Ts 4Ts -3Ts -2Ts -Ts x(t) xs(t) h0(t) x0(t) x0(t) 1 Ts R1 R2 Ideal sampling not possible in practice In practice, ADC uses zero-order hold to produce xd[n] from x0(t) Reconstruction of x(t) from x0(t) removes h0(t) distortion Multiplication in frequency domain by P 𝝎 𝝎 𝒔 /H0(jw) Also use zero-order hold for reconstruction in practice xd[n]=x(nTs) h0(t) Discrete To Continuous xd(t) x0(t) Hr(jw) xr(t)=x(t) 1 Ts

9 Zero-order hold model  nd(t-nTs) x(t) xs(t) h0(t) x0(t) Hr(jw)
xr(t)=x(t) 1 T Ho(jw)Hr(jw)=T∙P 𝝎 𝝎 𝒔 Zero-order hold model X(jw) T |Hr(jw)| Xs(jw) |H0(jw)| |X0(jw)|

10 Discrete-Time Upsampling
w X(jw) W -W xd[n]=x(nTs) xe[n] Upsample By L (L) Inserts L-1 zeros between each xd[n] value to get upsampled signal xe[n] Compresses Xd(ejW) by L in W domain and repeats it every 2p/L; So Xe(ejW) is periodic every 2p/L Leads to less stringent reconstruction filter design than ideal LPF: zero-order hold often used 2p -2p W Xe(ejW) WW -WW p -p W Xd(ejW) WW -WW WW=WTs xd[n] xe[n] 1 2 3 4 -2p L L 2L 3L 4L 2p L L L

11 Reconstruction of Upsampled Signal
More stringent LPF than for Xd(ejW) Less stringent analog LPF than to reconstruct from xd[n] xd[n]=x(nTs) xe[n] Upsample By L x(t) DAC Reconstruct x(t) from xi[n] by passing it through a DAC =ẋe[n] xi[n]=ẋe[n]=x(nTs/L) if Ts<p/W xi[n] Hi(ejW) xr(t)≠x(t) xd[n] xi[n] Discrete To Cts Ha(jw) x(t) Pass through an ideal LPF Hi(ejW) to get xi[n] xi[n]=ẋe[n]=x(nTs/L) if x(t) originally sampled at Nyquist rate (Ts<p/W) Relaxes DAC filter requirements (approximate LPF/zero-order hold reconstructs x(t) from xi[n]); better filter to reconstruct from xd[n] needed) 2p -2p W Xe(ejW) WW -WW L 2L 3L 4L xi[n] Xi(ejW)  xi[n] Xi(ejW) Ha(ejW) xd[n]=x(nTs)Xd(ejW) Ha(ejW) 2p L -2p W p -p -WW WW L L xd[n] xe[n] 1 2 3 4 L 2L 3L 4L

12 Proof that xi[n]=ẋe[n]
Xi(ejW) =Xe(ejW) 2p -2p W Xd(ejW) W=wTs Ts w Xs(jw) X(jw) -W Ts/L 2p -2p W Xe(ejW) W=wTs/L w X(jw) -W 2pL Ts -2pL Xs(jw) . Xi(ejW)=Lrect[WL/(2p)] 2p -2p 2p/L -2p/L W Xe(ejW) =Xe(ejW) L 2L 3L 4L xe[n] 1 2 3 4 xd[n] 𝑥 𝑒 𝑛 ≜𝑥 𝑛 𝑇 𝑠 𝐿 𝑋 𝑠 𝑇𝑠 𝐿 𝑗𝜔 𝑋 𝑒 𝑒 𝑗Ω = 𝑋 𝑒 𝑒 𝑗𝜔𝑇𝑠/𝐿 = 𝑋 𝑒 𝑒 𝑗𝜔𝑇𝑠/𝐿 𝐿rect 𝜔𝑇𝑠𝐿 2𝜋 𝑋 𝑒 𝑒 𝑗𝜔𝑇𝑠/𝐿 𝐿rect 𝜔𝑇𝑠𝐿 2𝜋 = 𝑋 𝑑 𝑒 𝑗𝜔𝑇𝑠/𝐿 𝐿rect 𝜔𝑇𝑠𝐿 2𝜋 =𝑋𝑒 𝑒 𝑗𝜔𝑇𝑠 𝐿rect 𝜔𝑇𝑠𝐿 2𝜋 =𝑋𝑒 𝑒 𝑗Ω 𝐿rect Ω𝐿 2𝜋 =𝑋𝑖 𝑒 𝑗Ω xi[n]=ẋe[n]=x(nTs/L) if Ts<p/W

13 Digital Downsampling: Fourier Transform and Reconstruction
Removes samples of x(nTs) for n≠MTs Used under storage/comm. constraints Repeats Xd(ejW) every 2p/M and scales W axis by M This results in a periodic signal Xc(ejW) every 2p Introduces aliasing if Xd(ejW) bandwidth exceeds p/M Can prefilter Xd(ejW) by LPF with bandwith p/M prior to downsampling to avoid downsample aliasing 1 2 3 xd[n]=x(nTs) xc[n] Downsample By M 1 2 3 4 p/M -p/M W’ Xd(ejW’) p -p Xc(ejW) -2p 2p p/M -p/M W’ Xd(ejW’) p -p Xc(ejW) -2p 2p W=MW’ W=MW’

14 W=wTs W=wMTs Xs(jw) Xd(ejW) w W Xs(jw) Xc(ejW) W
2p -2p W Xd(ejW) W=wTs Ts w Xs(jw) X(jw) -W 𝑋𝑑 𝑒 𝑗Ω = 1 𝑇𝑠 𝑘=−∞ ∞ 𝑋 𝑗 Ω−2𝜋𝑘 𝑇𝑠 MTs 2p -2p W Xc(ejW) W=wMTs w X(jw) -W Xs(jw) 𝑋𝐶 𝑒 𝑗Ω = 1 𝑀𝑇𝑠 𝑙=−∞ ∞ 𝑋 𝑗 Ω−2𝜋𝑙 𝑀𝑇𝑠 𝑙=𝑘𝑀+𝑚: 𝑙=−∞ ∞ = 𝑚=0 𝑀−1 𝑘=−∞ ∞ 𝑋𝐶 𝑒 𝑗Ω = 1 𝑀𝑇𝑠 𝑙=−∞ ∞ 𝑋 𝑗 Ω−2𝜋𝑙 𝑀𝑇𝑠 = 1 𝑀 𝑚=0 𝑀−1 1 𝑇𝑠 𝑘=−∞ ∞ 𝑋 𝑗 Ω−2𝜋(𝑘𝑀+𝑚) 𝑀𝑇𝑠 = 1 𝑀 𝑚=0 𝑀−1 𝑋𝑑 𝑒 𝑗(Ω−2𝜋𝑚)/𝑀 (9) 𝑋𝑐 𝑒 𝑗Ω = 1 𝑀 𝑚=0 𝑀−1 𝑋𝑑 𝑒 𝑗(Ω−2𝜋𝑚)/𝑀 Repeats Xd(ejW) every 2p/M and scales W axis by M 1 2 3 4 xc[n]=xd[nM] 2p -2p p -p W Xc(ejW) xd[n] 1 2 3 2p -2p -p/M p/M W Xd(ejW)

15 Communication System Block Diagram
Modulator (Transmitter) Demodulator (Receiver) Channel Modulator (Transmitter) converts message signal or bits into format appropriate for channel transmission (analog signal). Channel introduces distortion, noise, and interference. Demodulator (Receiver) decodes received signal back to message signal or bits. Focus on modulators with s(t) at a carrier frequency wc. Allows allocation of orthogonal frequency channels to different users

16 Amplitude Modulation DSBSC and SSB
Double sideband suppressed carrier (DSBSC) Modulated signal is s(t)=m(t)cos(wct) Signal bandwidth (bandwidth occupied in positive frequencies) is 2W Redundant information: can either transmit upper sidebands (USB) only or lower sidebands (LSB) only and recover m(t) Single sideband modulation (SSB); uses 50% less bandwidth (less $$$) Demodulator for DSBSC/SSB: multiply by cos(wct) and LPF W 2W USB LSB w -W W -wc w wc 2wc -2wc X cos(wct) s(t) wc -wc

17 AM Radio + + cos(wct) s(t)=[A+kam(t)]coswct ka A m(t)
1 W -W wc -wc m(t) + + X Broadcast AM has s(t)=[1+kam(t)]cos(wct) with [1+kam(t)]>0 Constant carrier cos(wct) carriers no information; wasteful of power Can recover m(t) with envelope detector (diode, resistors, capacitor) Modulated signal has twice bandwidth W of m(t), same as DSBSC 1/(2pwc)<<RC<<1/(2pW)

18 Quadrature Modulation
Sends two info. signals on the cosine and sine carriers DSBSC Demod m1(t) LPF m1(t)cos(wct)+ m2(t)sin(wct) cos(wct) -90o sin(wct) m2(t) DSBSC Demod LPF

19 Digital Communication System Block Diagram
Compressed Source Bits Encoded Bits Baseband Waveform m(t) Modulated Waveform s(t) Bits Digital Source Error-Correction Encoding Baseband Modulation Passband Modulation Bits Compression Analog Source ADC Removes redundancy introduces controlled redundancy binary or multi-level shifts waveform to carrier frequency converts continuous-time to bits propagates signal but adds distortion, noise & interference Channel compares waveform to thresholds to detect bits restores source redundancy corrects errors in detected bits shifts waveform to baseband Bits Digital Sink Error-Correction Decoding Baseband Demodulation Passband Demodulation Decompression Analog Sink DAC ŝ(t): Corrupted Copy of s(t) Decoded Compressed Source Bits Detected Encoded Bits Demodulated Waveform 𝑚 (t) converts bits to continuous-time Analog System Channel is a physical entity (wire, cable, wireless channel, string) Cannot send a complex signal over a physical channel: s(t) must be real S(jw)=S*(-jw): s(t) real/even  S(jw) real/even; s(t) real/odd  S(jw) imaginary/odd Often write s(t) in terms of in-phase/quadrature components: s(t)=sI(t)cos(wct)-sQ(t)sin(wct)

20 Baseband Digital Modulation
Baseband digital modulation converts bits into analog signals y(t) (bits encoded in amplitude) Pulse shaping (optional topic) Instead of the rect function, other pulse shapes used Improves bandwidth properties and timing recovery Explored in extra credit Matlab problem Polar On-Off A A m(t) Tb m(t) t t -A

21 Passband Digital Modulation
Changes amplitude (ASK), phase (PSK), or frequency (FSK, no covered) of carrier relative to bits We use baseband digital modulation as information signal m(t) to encode bits, i.e. m(t) is on-off or polar Passband digital modulation for ASK/PSK is a special case of DSBSC For m(t) on/off (ASK) or polar (PSK), modulated signal is

22 ASK and PSK Amplitude Shift Keying (ASK) Phase Shift Keying (PSK) A -A
A m(t) -A AM Modulation A m(t) -A AM Modulation Assumes carrier phase f=0, otherwise need phase recovery of f in receiver

23 ASK/PSK Demodulation Similar to AM demodulation, but only need to choose between one of two values (need coherent detection) Decision device determines which of R0 or R1 that R(nTb) is closest to For ASK, R0=0, R1=A, For PSK, R0=-A, R1=A Noise immunity DN is half the distance between R0 and R1 Bit errors occur when noise exceeds this immunity Decision Device Integrator (LPF) nTb R1 r(nTb) r(nTb)+N “1” or “0” s(t) a0 DN r(nTb) R0 cos(wct+f)

24 Quadrature Digital Modulation: MQAM
Sends different bit streams on the sine and cosine carriers Baseband modulated signals can have L>2 levels More levels for the same TX power leads to smaller noise immunity and hence higher error probability: Sends 2log2(L)=M bits per symbol time Ts, Data rate is M/Ts bps Called MQAM modulation: 10 Gbps WiFi: 1024-QAM (10 bits/10-9 secs) L=32 levels Decision Device “1” or “0” R0 R1 a0 rI(nTb) +NI mi(t) m1(t)cos(wct)+ m2(t)sin(wct)+ n(t) X -90o cos(wct) sin(wct) A Ts A/3 t -A/3 -A Decision Device “1” or “0” R0 R1 a0 rQ(nTb) +NQ Data rate: log2L bits/Ts Ts is called the symbol time

25 Introduction to FIR Filter Design
Signal processing today done digitally Cheaper, more reliable, more energy-efficient, smaller Discrete time filters in practice must have a finite impulse response: h[n]=0, |n|>M/2 Otherwise processing takes infinite time FIR filter design typically entails approximating an ideal (IIR) filter with an FIR filter Ideal filters include low-pass, bandpass, high-pass Might also use to approximate continuous-time filter We focus on two approximation methods Impulse response and filter response matching Both lead to the same filter design

26 Impulse Response Matching
Given a desired (noncausal, IIR) filter response hd[n] Objective: Find FIR approximation ha[n]: ha[n]=0 for |n|>M/2 to minimize error of time impulse response By inspection, optimal (noncausal) approximation is Doesn’t depend on ha[n] W ( ) j a e H p - Exhibits Gibbs phenomenon from sharp time-windowing

27 Frequency Response Matching
Given a desired frequency response Hd(ejW) Objective: Find FIR approximation ha[n]: ha[n]=0 for |n|>M/2 that minimizes error of freq. response Set and By Parseval’s identity: Time-domain error and frequency-domain error equal Optimal filter same as in impulse response matching and

28 Causal Design and Group Delay
Can make ha[n] causal by adding delay of M/2 Leads to causal FIR filter design If Ha(ejW) constant, H(ejW) linear in W with slope -.5M Most filter implementations do not have linear phase, corresponding to a constant delay for all W. Group delay defined as Constant for linear phase filters Piecewise constant for piecewise linear phase filters Nonconstant group delay introduces phase distortion relative to an ideal filter

29 Art and Science of Windowing
Window design is created as an alternative to the sharp time-windowing in ha[n] Used to mitigate Gibbs phenomenon Window function (w[n]=0, |n|>M/2) given by Windowed noncausal FIR design: Frequency response smooths Gibbs in Ha(ejW) Design often trades “wiggles” in main vs. sidelobes Hamming smooths out wiggles from rectangular window Introduces more distortion at transition frequencies than rectangle

30 Typical Window Designs
0.5 1 1.5 2 2.5 3 -0.2 0.2 0.4 0.6 0.8 W ( e j ) M = 16 Boxcar Triangular Hamming Hanning

31 Summary of FIR Design We are given a desired response hd[n] which is generally noncausal and IIR Examples are ideal low-pass, bandpass, highpass filters May be derived from a continuous-time filter Choose a filter duration M+1 for M even Larger M entails more complexity/delay, less approximation error e Design a length M+1 window function w[n], real and even, to mitigate Gibbs while keeping good approximation to hd[n] Calculate the noncausal FIR approximation ha[n] Calculate the noncausal windowed FIR approximation hw[n] Add delay of M/2 to hw[n] to get the causal FIR filter h[n]

32 FIR Realization: Direct Form
Consists of M delay elements and M+1 multipliers Can introduce different delays at different freq. components of x[n] Will discuss more when we cover z transforms Efficient implementation using Discrete-Fourier Transform (DFT)

33 Main Points Sampling and reconstruction bridges analog and digital worlds Upsampling and downsampling ease implementation requirements Analog and digital communications allows transmission of information signals through the airwaves FIR filter design approximates perfect filters with a design tailored to a set of engineering tradeoffs.


Download ppt "EE 102b: Signal Processing and Linear Systems II"

Similar presentations


Ads by Google