Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 4: Sampling and Reconstruction

Similar presentations


Presentation on theme: "Lecture 4: Sampling and Reconstruction"โ€” Presentation transcript:

1 Lecture 4: Sampling and Reconstruction
Data Reconstruction (Hold) Reading: Chapter 3 of the textbook TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAAAAAAAAAAA

2 A Typical Digital Control System
Sampling Reconstruction continuous-time signal discrete-time system continuous-time system ๐‘‡ ๐‘Ÿ(๐‘ก) A/D Computer D/A Data Hold Plant ๐‘ฆ(๐‘ก) _ ๐‘’(๐‘ก) discrete-time signal digital signal discrete-time signal continuous-time signal Sensor Sampling and data reconstruction needed to interface the digital computer with the physical world Sampling Continuous-time Signals Discrete-time Signals Data reconstruction

3 Sampler A sampler obtains from a continuous-time signal a discrete-time signal by sampling every ๐‘‡ seconds Input is a continuous-time signal ๐‘’ ๐‘ก , ๐‘กโ‰ฅ0 Output is a discrete-time signal ๐‘’(๐‘˜๐‘‡), ๐‘˜=0,1,โ€ฆ Both signals have identical values at sampling moments Not a lossless procedure Not a time-invariant procedure ๐‘’(๐‘ก) ๐‘’(๐‘˜๐‘‡) ๐‘‡ ๐‘’(๐‘ก) ๐‘’(๐‘˜๐‘‡) โ‹ฏ ๐‘‡ 2๐‘‡ 3๐‘‡ 4๐‘‡ ๐‘ก

4 A/D Converter (ADC) (From Wikipedia: 4-channel stereo multiplexed analog-to-digital converter WM8775SEDS made by Wolfson Microelectronics placed on a X-Fi Fatal1ty) Pro sound card.

5 Reconstruction: Zero-Order Hold
Data reconstruction needed to convert digital controller output into a continuous-time signal to drive the plant Ideally both signals should agree at the sampling moment: 0, ๐‘‡, 2๐‘‡, โ€ฆ The simplest data reconstruction is zero-order hold Given a discrete time signal ๐‘’(๐‘˜๐‘‡), ๐‘˜=0,1,โ€ฆ A continuous-time signal ๐‘’ ๐‘ก , ๐‘กโ‰ฅ0, is reconstructed whose value at any time ๐‘ก is equal to the value of ๐‘’(๐‘˜๐‘‡) in the closest sampling moment preceding ๐‘ก:

6 D/A Converter (DAC) AK4396 DAC for Headphone Output
(from An 8-Digit DAC implemented by R/2R resistor network From Wikipedia: 8-channel digital-to-analog converter Cirrus Logic CS4382 as used in a soundcard.

7 Sampled-Data Control System
๐‘’(๐‘˜๐‘‡) ๐‘ข(๐‘˜๐‘‡) ๐‘ข(๐‘ก) ๐‘’(๐‘ก) Digital controller Plant ๐‘ฆ(๐‘ก) Sampler Data hold _ Does there exist a transfer function from ๐‘’(๐‘ก) to ๐‘ข(๐‘ก)? What about from ๐‘’(๐‘˜๐‘‡) to ๐‘ข(๐‘˜๐‘‡)? Let us start from the simplest case: digital controller does nothing ๐‘’(๐‘ก) ๐‘’ (๐‘ก) ๐‘’(๐‘˜๐‘‡) Sampler Data hold sampler and hold

8 Sampler and Zero-Order Hold
What is the effect of sampler and hold in frequency domain? ๐‘’(๐‘ก) ๐‘’ (๐‘ก) ๐‘’(๐‘˜๐‘‡) Sampler Data hold ๐ธ(๐‘ ) ๐ธ(๐‘ง) ๐ธ (๐‘ ) ๐‘’ (๐‘ก) ๐‘’(๐‘ก) โ‹ฏ ๐‘‡ 2๐‘‡ 3๐‘‡ 4๐‘‡

9 Sampler and Zero-Order Hold
Laplace transform of ๐‘’(๐‘ก): ๐ธ ๐‘  =โ„’[๐‘’ ๐‘ก ] ๐‘ง-transform of ๐‘’(๐‘˜๐‘‡): ๐ธ ๐‘ง = ๐‘˜=0 โˆž ๐‘’ ๐‘˜๐‘‡ ๐‘ง โˆ’๐‘˜ Laplace transform of ๐‘’ ๐‘ก : ๐‘’ ๐‘ก =๐‘’ 0 1 ๐‘ก โˆ’1 ๐‘กโˆ’๐‘‡ +๐‘’ ๐‘‡ 1 ๐‘กโˆ’๐‘‡ โˆ’1 1โˆ’2๐‘‡ +โ‹ฏ = ๐‘˜=0 โˆž ๐‘’ ๐‘˜๐‘‡ ๐‘’ โˆ’๐‘˜๐‘‡๐‘  โ‹… 1โˆ’ ๐‘’ โˆ’๐‘‡๐‘  ๐‘  Independent of signal ๐‘’(๐‘ก) ๐ธ โˆ— ๐‘  =๐ธ ๐‘ง โ€‹ ๐‘ง= ๐‘’ ๐‘‡๐‘  ๐‘’ (๐‘ก) ๐‘’(๐‘˜๐‘‡) โ‹ฏ ๐‘‡ 2๐‘‡ 3๐‘‡ 4๐‘‡

10 Sampler and Zero-Order Hold (cont.)
Sampler and zero-order hold can be broken up in two steps: ๐ธ ๐‘  ๐‘‡ ๐ธ โˆ— ๐‘  ๐ธ ๐‘  ๐บ โ„Ž0 ๐‘  = 1โˆ’ ๐‘’ โˆ’๐‘‡๐‘  ๐‘  Ideal sampler 0-th order data hold ๐ธ โˆ— ๐‘  =๐‘’ 0 +๐‘’ ๐‘‡ ๐‘’ โˆ’๐‘‡๐‘  +๐‘’ 2๐‘‡ ๐‘’ โˆ’2๐‘‡๐‘  +โ‹ฏ In time domain: ๐‘‡ ๐‘’ ๐‘ก ๐‘’ โˆ— ๐‘ก ๐‘’ ๐‘ก ๐‘‡ where ๐‘’ โˆ— ๐‘ก is a string of impulses whose amplitudes are modulated by ๐‘’(๐‘ก): ๐‘’ โˆ— ๐‘ก =๐‘’ 0 ๐›ฟ ๐‘ก +๐‘’ ๐‘‡ ๐›ฟ ๐‘กโˆ’๐‘‡ +๐‘’ 2๐‘‡ ๐›ฟ ๐‘กโˆ’2๐‘‡ +โ‹ฏ

11 Ideal Sampler ๐‘’ โˆ— ๐‘ก =๐‘’ 0 ๐›ฟ ๐‘ก +๐‘’ ๐‘‡ ๐›ฟ ๐‘กโˆ’๐‘‡ +๐‘’ 2๐‘‡ ๐›ฟ ๐‘กโˆ’2๐‘‡ +โ‹ฏ
๐‘’ ๐‘ก ๐‘’ โˆ— ๐‘ก ๐‘’ โˆ— ๐‘ก =๐‘’ 0 ๐›ฟ ๐‘ก +๐‘’ ๐‘‡ ๐›ฟ ๐‘กโˆ’๐‘‡ +๐‘’ 2๐‘‡ ๐›ฟ ๐‘กโˆ’2๐‘‡ +โ‹ฏ =๐‘’ ๐‘ก โ‹…[๐›ฟ ๐‘ก +๐›ฟ ๐‘กโˆ’๐‘‡ +๐›ฟ ๐‘กโˆ’2๐‘‡ +โ‹ฏ] ๐›ฟ ๐‘‡ ๐‘ก ๐›ฟ ๐‘‡ ๐‘ก ๐›ฟ ๐‘‡ ๐‘ก is a string of unit impulses T seconds apart: ๐›ฟ ๐‘‡ ๐‘ก ๐‘‡ 2๐‘‡ 3๐‘‡ 4๐‘‡ ๐‘’ ๐‘ก ๐‘’ โˆ— ๐‘ก Impulse Modulator

12 Remarks on Ideal Sampler
Not a physical entity (introduced for theoretical convenience) Linear but not time-invariant, cannot be modeled by a transfer function Can map different ๐‘’(๐‘ก) to the same ๐‘’ โˆ— (๐‘ก) If ๐‘’(๐‘ก) is discontinuous at a sampling time ๐‘˜๐‘‡, choose If ๐‘’(๐‘ก) has impulses at sampling times, then ๐‘’ โˆ— ๐‘ก is not well defined ๐‘’ โˆ— ๐‘ก =๐‘’ ๐›ฟ ๐‘ก +๐‘’ ๐‘‡ + ๐›ฟ ๐‘กโˆ’๐‘‡ +โ‹ฏ

13 Sampler and Hold: First Perspective
In the time domain: ๐‘‡ ๐‘’(๐‘ก) ๐‘’(๐‘˜๐‘‡) ๐‘’ (๐‘ก) Zero-Order Hold Sampler In the frequency domain (a mixture of z- and Laplace transforms): ๐‘‡ ๐ธ ๐‘  ๐ธ ๐‘ง ๐ธ ๐‘  Zero-Order Hold Sampler ๐ธ ๐‘ง = ๐‘˜=0 โˆž ๐‘’ ๐‘˜๐‘‡ ๐‘ง โˆ’๐‘˜ is called the z-transform of ๐ธ(๐‘ )

14 Sampler and Hold: Second Perspective
In the time domain: ๐‘‡ ๐‘’(๐‘ก) ๐‘’ โˆ— (๐‘ก) ๐‘’ (๐‘ก) Ideal sampler Data hold In the frequency domain: ๐‘‡ ๐ธ ๐‘  ๐ธ โˆ— ๐‘  ๐ธ ๐‘  ๐บ โ„Ž0 ๐‘  = 1โˆ’ ๐‘’ โˆ’๐‘‡๐‘  ๐‘  ๐ธ โˆ— ๐‘  = ๐‘˜=0 โˆž ๐‘’ ๐‘˜๐‘‡ ๐‘’ โˆ’๐‘˜๐‘‡๐‘  is called the star-transform of ๐ธ(๐‘ )

15 Relating the Two Perspectives
๐ธ(๐‘ง) sampler z-transform ๐ธ โˆ— ๐‘  =๐ธ ๐‘ง โ€‹ ๐‘ง= ๐‘’ ๐‘‡๐‘  ๐ธ(๐‘ ) ๐ธ (๐‘ ) Ideal sampler Zero-order hold star transform ๐บ โ„Ž0 ๐‘  = 1โˆ’ ๐‘’ โˆ’๐‘‡๐‘  ๐‘  ๐ธ โˆ— (๐‘ )

16 Finding Star-Transform of ๐ธ(๐‘ )
Given E(s), find Approach I: If ๐ธ ๐‘  is a rational function (and โ€ฆ), then where the summation is over all poles of E(ยธ) Approach II: (see Appendix III) where ๐œ” ๐‘  = 2๐œ‹ ๐‘‡ is called radian sampling frequency ๐ธ โˆ— ๐‘  = ๐‘˜=0 โˆž ๐‘’ ๐‘˜๐‘‡ ๐‘’ โˆ’๐‘˜๐‘‡๐‘  ๐ธ โˆ— ๐‘  = [๐‘Ÿ๐‘’๐‘ ๐‘–๐‘‘๐‘ข๐‘’ ๐‘œ๐‘“ ๐ธ ๐œ† 1 1โˆ’ ๐‘’ โˆ’๐‘‡(๐‘ โˆ’๐œ†) ] ๐ธ โˆ— ๐‘  = 1 ๐‘‡ ๐‘˜=โˆ’โˆž โˆž ๐ธ ๐‘ +๐‘—๐‘˜ ๐œ” ๐‘  + ๐‘’(0) 2

17 Finding ๐‘ง-Transform of ๐ธ(๐‘ )
Given E(s), find Approach I: If ๐ธ ๐‘  is a rational function (and โ€ฆ), then Approach II: find ๐ธ โˆ— (๐‘ ) first, then Approach III: consult the ๐‘ง-transform table on pp. 676 ๐ธ ๐‘ง = ๐‘˜=0 โˆž ๐‘’ ๐‘˜๐‘‡ ๐‘ง โˆ’๐‘˜ ๐ธ ๐‘ง = [๐‘Ÿ๐‘’๐‘ ๐‘–๐‘‘๐‘ข๐‘’ ๐‘œ๐‘“ ๐ธ ๐œ† 1 1โˆ’ ๐‘ง โˆ’1 ๐‘’ ๐‘‡๐œ† ] ๐ธ ๐‘ง = ๐ธ โˆ— ๐‘  โ€‹ ๐‘’ ๐‘‡๐‘  โ†’๐‘ง

18 Examples ๐ธ ๐‘  = 1 ๐‘  ๐ธ ๐‘  = 1 ๐‘ +2

19 Example ๐ธ ๐‘  = 1 ๐‘ +๐‘Ž 2 ๐ธ ๐‘ง = ๐‘‡๐‘ง ๐‘’ โˆ’๐‘Ž๐‘‡ ๐‘งโˆ’ ๐‘’ โˆ’๐‘Ž๐‘‡ 2 ๐ธ ๐‘  = 1 (๐‘ +1)(๐‘ +2)
๐ธ ๐‘  = 1 ๐‘ +๐‘Ž 2 ๐ธ ๐‘ง = ๐‘‡๐‘ง ๐‘’ โˆ’๐‘Ž๐‘‡ ๐‘งโˆ’ ๐‘’ โˆ’๐‘Ž๐‘‡ 2 ๐ธ ๐‘  = 1 (๐‘ +1)(๐‘ +2) ๐ธ ๐‘  = ๐œ” 2 ๐‘  2 + ๐œ” 2 ๐ธ โˆ— ๐‘  = ๐‘’ โˆ’๐‘‡๐‘  sin ๐œ”๐‘‡ 1โˆ’2 ๐‘’ โˆ’๐‘‡๐‘  cos ๐œ”๐‘‡ + ๐‘’ โˆ’2๐‘‡๐‘ 

20 Effect of Time Delay on Star-Transform
If ๐‘ก0=๐‘›๐‘‡ is an integer multiple of the sampling period ๐‘‡, then For general ๐‘ก0, the above is not true ๐ธ โˆ— ๐‘  = ๐‘’ โˆ’๐‘›๐‘‡๐‘  ๐ธ 1 โˆ— ๐‘ 

21 Periodicity Property of ๐ธ โˆ— (๐‘ )
๐ธ โˆ— (๐‘ ) is periodic in ๐‘  with period ๐‘— ๐œ” ๐‘  =๐‘— 2๐œ‹ ๐‘‡ ๐ธ โˆ— ๐‘ +๐‘—๐‘š ๐œ” ๐‘  = ๐ธ โˆ— (๐‘ ) for integer ๐‘š

22 Strings of Poles of ๐ธ โˆ— (๐‘ )
If ๐ธ(๐‘ ) has a pole at ๐‘, then ๐ธ โˆ— (๐‘ ) has poles at ๐‘ยฑ๐‘—๐‘š ๐œ” ๐‘  ๐ธ โˆ— (๐‘ ) ๐ธ(๐‘ ) ๐‘— ๐œ” ๐‘  2 ร— ร— ร— Primary strip โˆ’ ๐‘— ๐œ” ๐‘  2 ร—

23 Data Reconstruction

24 Sampler and Hold: Second Perspective
In the time domain: ๐‘‡ ๐‘’(๐‘ก) ๐‘’ โˆ— (๐‘ก) ๐‘’ (๐‘ก) Ideal sampler Data hold In the frequency domain: ๐‘‡ ๐ธ ๐‘  ๐ธ โˆ— ๐‘  ๐ธ ๐‘  ๐บ โ„Ž0 ๐‘  = 1โˆ’ ๐‘’ โˆ’๐‘‡๐‘  ๐‘ 

25 Data Reconstruction in Frequency Domain
๐‘’(๐‘ก) ๐‘’ โˆ— (๐‘ก) ๐‘’ (๐‘ก) ๐ธ(๐‘—๐œ”) ๐ธ โˆ— (๐‘—๐œ”) ๐ธ (๐‘—๐œ”) Ideal sampling Data reconstruction ๐ธ โˆ— ๐‘—๐œ” = 1 ๐‘‡ ๐‘˜=โˆ’โˆž โˆž ๐ธ ๐‘—๐œ”+๐‘—๐‘˜ ๐œ” ๐‘  + ๐‘’(0) 2 ๐ธ ๐‘—๐œ” = ๐บ โ„Ž0 ๐‘—๐œ” ๐ธ โˆ— (๐‘—๐œ”) (periodic extension in freq. domain) (data hold transfer function) Shannonโ€™s Sampling Theorem: ๐‘’(๐‘ก) can be uniquely reconstructed from ๐‘’ โˆ— (๐‘ก) if ๐ธ(๐‘—๐œ”) has no frequency component greater than ๐œ” ๐‘  2 = ๐œ‹ ๐‘‡ Need to sample at least twice as fast as the highest frequency in ๐ธ(๐‘—๐œ”) Perfect reconstruction by the ideal low pass filter (physically infeasible)

26 Zero-Order Hold A physically feasible (causal) data hold transfer function is Frequency (magnitude) response ๐บ โ„Ž0 ๐‘  = 1โˆ’ ๐‘’ โˆ’๐‘‡๐‘  ๐‘  1 with impulse response ๐‘‡ |๐บ โ„Ž0 ๐‘—๐œ” |= 1โˆ’ ๐‘’ โˆ’๐‘—๐œ”๐‘‡ ๐‘—๐œ” =๐‘‡ sin ๐œ‹๐œ” ๐œ” ๐‘  ๐œ‹๐œ” ๐œ” ๐‘ 

27 First-Order Hold Idea: Given the sampled data ๐‘’ ๐‘˜๐‘‡ , ๐‘˜=0,1,โ€ฆ, reconstruct the signal between sampling times by extrapolating two previous data ๐‘’ ๐‘ก =๐‘’ ๐‘˜๐‘‡ + ๐‘’ ๐‘˜๐‘‡ โˆ’๐‘’ ๐‘˜โˆ’1 ๐‘‡ ๐‘‡ ๐‘กโˆ’๐‘˜๐‘‡ , ๐‘˜๐‘‡โ‰ค๐‘ก< ๐‘˜+1 ๐‘‡ First-order hold is causal

28 Transfer Function of First-Order Hold
Impulse response 2 1 2๐‘‡ ๐‘‡ โˆ’1 โ„Ž ๐‘ก =1 ๐‘ก + ๐‘ก ๐‘‡ โ‹…1 ๐‘ก โˆ’2โ‹…1 ๐‘กโˆ’๐‘‡ โˆ’ 2 ๐‘กโˆ’๐‘‡ ๐‘‡ 1 ๐‘กโˆ’๐‘‡ +1 ๐‘กโˆ’2๐‘‡ + ๐‘กโˆ’2๐‘‡ ๐‘‡ โ‹…1 ๐‘กโˆ’2๐‘‡ โ‡’ ๐บ โ„Ž1 ๐‘  = 1+๐‘‡๐‘  ๐‘‡ 1โˆ’ ๐‘’ โˆ’๐‘‡๐‘  ๐‘  2

29 Fractional-Order Holds
๐‘’ ๐‘ก =๐‘’ ๐‘˜๐‘‡ +๐œ‚ ๐‘’ ๐‘˜๐‘‡ โˆ’๐‘’ ๐‘˜โˆ’1 ๐‘‡ ๐‘‡ ๐‘กโˆ’๐‘˜๐‘‡ , ๐‘˜๐‘‡โ‰ค๐‘ก< ๐‘˜+1 ๐‘‡ where the parameter ๐œ‚โˆˆ[0,1] Impulse response 2 1 2๐‘‡ ๐‘‡ โˆ’1 ๐บ โ„Ž๐œ‚ ๐‘  = 1โˆ’๐œ‚ ๐‘’ โˆ’๐‘‡๐‘  1โˆ’ ๐‘’ โˆ’๐‘‡๐‘  ๐‘  + ๐œ‚ ๐‘‡ ๐‘  โˆ’ ๐‘’ โˆ’๐‘‡๐‘  2


Download ppt "Lecture 4: Sampling and Reconstruction"

Similar presentations


Ads by Google