5.5.4 · D5 · HinglishEmbedded Systems & Real-Time Software
Question bank — ADC - DAC — resolution, sampling rate, Nyquist
5.5.4 · D5· Coding › Embedded Systems & Real-Time Software › ADC - DAC — resolution, sampling rate, Nyquist
Shuru karne se pehle, har woh symbol jo is page mein dobara use hoga, plain words mein define kiya gaya hai:
- resolution = kitni baareeki se amplitude (voltage height) ko slice kiya gaya hai → bits mein measure hota hai ().
- sampling rate = kitni baar time mein hum ek value uthate hain → Hz mein measure hota hai.
- = signal mein maujood highest frequency component — jo bhi tum ADC ko feed karo usme chhupa sabse tez wiggle. Nyquist isi number ke against state hota hai.
- = converter ka full-scale reference voltage — uski range ka top jo woh read kar sakta hai (jaise 3.3 V). 0 se tak koi bhi input ek code pe map hota hai.
- LSB (Least-Significant-Bit step) = sabse choti voltage step jo converter distinguish kar sakta hai, ladder ki ek seedi: .
- = quantization step size, jo bas ek LSB hai (ek rounding "bin" ki width) — noise formula mein use hota hai.
- aliasing = ek fast wave, under-sampled hone par, khud ko slow wave ke roop mein disguise kar leti hai.
True or false — justify
Sampling at exactly always lets you reconstruct the wave.
False. Bilkul double frequency par sample karne se tum zero crossings par land kar sakte ho aur padh sakte ho, isliye amplitude aur phase dono lost ho jaate hain. Criterion strict hai: .
A 16-bit ADC will always give a cleaner recording than a 12-bit one.
False. Zyada bits sirf amplitude precision improve karte hain. Agar tumhara signal ko under-sample karta hai, to extra bits galat (aliased) waveform ko faithfully record karte hain — cleaner garbage.
Doubling the number of bits doubles the SNR in dB.
False. Point per-bit hai: ek bit add karna (jo levels ki count ko ×2 karta hai) ~6 dB add karta hai, se. To SNR, bit count ke saath linearly badhta hai. Agar tum literally ko 8 se 16 kar dete ho to aath bits add hote hain → dB, na ki do ka factor. Poori derivation ke liye Quantization Noise & SNR dekho.
An anti-aliasing filter goes after the ADC.
False. Ye ADC se pehle (analog domain mein) hona chahiye. Ek baar jab sampling ke dauran koi frequency alias ho jaati hai to woh already real low-frequency content ke saath tangle ho chuki hoti hai aur digitally untan nahi ki ja sakti — ek low-pass filter high frequencies ko tab block karta hai jab woh abhi bhi analog hoti hain. Anti-Aliasing Filters dekho.
Nyquist guarantees reconstruction for any signal if is high enough.
False. Iske liye signal ka band-limited hona zaroori hai — se upar koi energy nahi. Unbounded frequency content wala signal (jaise ek perfect square wave) ka koi finite nahi hota aur use kabhi bhi aliasing ke bina sample nahi kiya ja sakta.
The Nyquist frequency is a property of the signal.
False. Ye sampler ki property hai — ye sirf par depend karta hai. Signal ka hota hai; sampler ka hota hai. Aliasing tab hoti hai jab signal ka , sampler ke se exceed karta hai.
Quantization error is truly random noise.
Mostly false — ye ek useful model hai. Error deterministic hai (ye input value par depend karta hai), lekin busy, large signals ke liye ye width (ek LSB) ke uniform noise ki tarah behave karta hai, isliye kaam karta hai. Slow DC input ke liye ye ek fixed offset hai, noise nahi.
A DAC reproduces the exact voltage that entered the original ADC.
False. Ye reproduce karta hai, jo quantized value hai — nearest ladder rung par rounded. Ek LSB se finer sab kuch throw away ho gaya aur wapas nahi aa sakta.
Using instead of is a mistake.
Half-true. Ye ek approximation hai: codes ke beech gaps hote hain, isliye exact step hai. form common hai aur bade ke liye iska error negligible hai — acceptable hai, "bilkul correct" nahi.
Spot the error
"To capture a 20 kHz tone I sample at 20 kHz."
Error: tumhe kHz chahiye (yahaan kHz). Signal frequency par sampling karne se ek point per cycle milta hai — ek constant reading, koi oscillation nazar nahi aata.
"My signal only has energy up to 5 kHz, so I don't need an anti-alias filter at kHz."
Error: noise aur interference (RF pickup, EMI, thermal) 5 kHz se upar bhi rehte hain. Filter ke bina, woh out-of-band junk tumhare 0–6 kHz band mein alias ho jaata hai. Band-limiting enforce ki jaani chahiye, assume nahi ki jaani chahiye.
"CD audio uses 44.1 kHz because humans hear up to 44.1 kHz."
Error: humans ~20 kHz tak sunते hain, isliye kHz, jisme kHz chahiye. Extra 4.1 kHz filter margin hai — real anti-alias filter ke gradual roll-off ke liye room, kyunki koi bhi filter perfect brick wall nahi hota.
"The reconstruction filter's job is to add back the bits we lost."
Error: ye staircase ke high-frequency images ko remove karta hai (zero-order hold se — figure mein flat steps), steps ko curve mein smooth karta hai. Ye quantization detail restore nahi kar sakta — woh information ADC par hi chali gayi thi. Zero-Order Hold & Reconstruction dekho.
"Increasing improves resolution."
Error: badhana codes rakhte hue full-scale span ko wider karta hai, isliye har LSB step bada ho jaata hai — resolution kharab hoti hai. kam karna (apne signal ki true range se match karne ke liye) step ko chhhota karta hai.
"Aliasing adds a new high frequency to my recording."
Error: aliasing high frequencies ko se neeche ek lower apparent frequency par fold down karta hai. Hz par 1800 Hz ka tone 200 Hz ke roop mein appear hota hai — ek fake low tone, koi naya high tone nahi.
Why questions
Why exactly two samples per period, not three or four?
Do points (ek per hump) ek sinusoid ki frequency aur amplitude fix karne ke liye theoretical minimum hain. Kam points ek oscillation ko ambiguous chhod dete hain; do woh mathematical floor hai jise Nyquist prove karta hai ki sufficient hai (strict sense mein).
Why does sampling make frequencies and indistinguishable?
Sampled values hain; andar add karne se milta hai, aur cosine -periodic hai isliye extra term vanish ho jaata hai. Identical samples ⇒ sampler literally unhe alag nahi bata sakta. Fourier Transform & Frequency Domain dekho.
Why is the quantization variance and not, say, ?
Kyunki ek uniform distribution ka variance denominator hai: width (ek LSB) par flat spread ke liye, variance . Ye rounding error ki spread reflect karta hai, uski maximum () nahi.
Why does each extra bit add ~6 dB of SNR, not some other number?
Ek extra bit step ko half kar deta hai, isliye noise power quarter tak drop hoti hai. Decibels mein quarter-power dB hai — mein constant.
Why can't a purely digital algorithm remove aliasing after sampling?
Ek baar fold hone ke baad, aliased frequency wohi bin occupy karti hai jisme legitimate low-frequency signal hai — woh algebraically sum hain aur indistinguishable hain. Koi bhi digital operation ek sum ko unknown parts mein alag nahi kar sakta.
Why does the DAC produce a staircase rather than a smooth curve on its own?
Ek basic DAC har code ki voltage ko constant rakhta hai jab tak next sample na aaye — zero-order hold (figure mein amber staircase). Ek level ko tak hold karne se flat steps bante hain, jinke sharp edges exactly woh high-frequency images hain jinhe smoothing filter erase karta hai.
Why does a filter with only "cut-off ≈ " leave margin for design?
Real filters gradually roll off karte hain, instantly nahi. Highest signal ko se kaafi neeche rakhna (jaise CD karta hai) transition band ko physical room deta hai, taaki unwanted energy genuinely Nyquist point tak attenuate ho jaaye. Anti-Aliasing Filters dekho.
Edge cases
What happens if a frequency sits exactly at ?
Tumhe do samples per cycle milte hain, lekin agar woh zero crossings par land karein to reconstructed amplitude zero padhti hai — boundary unreliable hai, isliye criterion equality ko exclude karta hai.
What does the ADC output for an input below 0 V or above ?
Ye lowest code (0) ya highest code () tak saturate (clip) karta hai. Range se bahar sab kuch rail par collapse ho jaata hai — ek hard, non-recoverable distortion, quantization ki tarah nahi.
What is the alias of a DC signal (0 Hz)?
DC kabhi alias nahi hoti — ye already har se neeche hai, aur trivially satisfy karta hai. Ye ek constant tak sample hoti hai, bilkul intended ki tarah.
For a perfectly noiseless, constant DC input, what is the "quantization noise"?
Ye ek fixed offset hai, noise nahi — input har baar ek nearest code par round hoti hai. noise model fail hota hai kyunki average out karne ke liye koi variation nahi hai.
What if (a signal with no time variation)?
Koi bhi , Nyquist satisfy karta hai kyunki hamesha hold karta hai. Ek truly static signal ko bina kisi aliasing ke arbitrarily slowly sample kiya ja sakta hai.
If is extremely high (massive over-sampling), is resolution automatically better?
Nahi — resolution bits se set hoti hai, se independent. Lekin over-sampling ko averaging ke zariye effective bits ke liye trade kiya ja sakta hai (sigma-delta converters ke peeche ka principle). Successive Approximation vs Sigma-Delta ADC dekho.
Connections
- ADC - DAC — resolution, sampling rate, Nyquist (index 5.5.4)
- Quantization Noise & SNR
- Anti-Aliasing Filters
- Zero-Order Hold & Reconstruction
- Fourier Transform & Frequency Domain
- Successive Approximation vs Sigma-Delta ADC