Exercises — ADC - DAC — resolution, sampling rate, Nyquist
5.5.4 · D4· Coding › Embedded Systems & Real-Time Software › ADC - DAC — resolution, sampling rate, Nyquist
Ek quick symbol reminder taaki koi line surprise na kare:
Recall Woh paanch symbols jo neeche har problem mein use hote hain
- ::: bits ki sankhya — converter ke paas kitne yes/no switches hain.
- ::: distinct output codes (levels) ki kul sankhya.
- ::: full-scale voltage span, jaise se V.
- ::: sabse chhota voltage step (amplitude ladder ki ek "rung").
- ::: sampling rate Hz mein; Nyquist frequency hai (sabse zyada honest frequency).
L1 — Recognition
Problem 1.1
Ek ADC ke paas bits hain. Yeh kitne distinct output codes produce kar sakta hai?
Recall Solution
KYA: har bit ek on/off switch hai. kyun: independent switches se tak count karte hain, jo alag values banti hain.
Problem 1.2
Kaun si quantity amplitude precision fix karti hai aur kaun si time precision: resolution ya sampling rate?
Recall Solution
- Resolution ( bits) → amplitude precision (voltage ko kitni baariqi se slice karte hain).
- Sampling rate () → time precision (kitni baar measure karte hain). Yeh dono independent knobs hain. Ek doosre ki help nahi karta.
Problem 1.3
Us signal ko perfectly reconstruct karne ke liye Nyquist criterion batao jis ki highest frequency hai.
Recall Solution
Inequality strict hai (sirf , nahi). Boundary hi Nyquist frequency hai.
L2 — Application
Problem 2.1
Ek 12-bit ADC ka V hai. LSB step size millivolts mein nikalo.
Recall Solution
KYA: sabse chhota voltage jo ADC distinguish kar sakta hai. kyun: span ko gaps ki sankhya se divide kiya jaata hai. mV se chhota koi bhi input change same code mein land karta hai aur invisible ho jaata hai.
Problem 2.2
Wahi 12-bit, V ADC. V ka input kaun sa code produce karta hai?
Recall Solution
Round kyun: ADC nearest level pe snap karta hai (mid-tread quantizer).
Problem 2.3
Hz ka ek tone Hz par sample kiya jaata hai. Kya yeh aliased hai? Agar nahi, toh kyun nahi?
Recall Solution
Nyquist frequency Hz. Kyunki , tone Nyquist ke upar hai, isliye yeh alias karta hai. 1.8 kHz tone ek fake 700 Hz tone ki tarah disguise ho jaata hai.
Problem 2.4
Ek 16-bit ADC ka ideal maximum SNR dB mein kya hai?
Recall Solution
Yeh formula kyun: har extra bit quantization step ko half kar deta hai, aur amplitude ko half karne par dB add hote hain.
L3 — Analysis
Problem 3.1
Ek signal mein do tones hain: Hz aur Hz. Tum Hz par bina anti-aliasing filter ke sample karte ho. Sampling ke baad, Nyquist ke neeche kaun si do frequencies appear hoti hain, aur kya tum unhe separate kar sakte ho?
Recall Solution
Hz.
- Hz Nyquist ke neeche hai → Hz par hi rehta hai.
- Hz Nyquist ke upar hai → Hz. Dono 300 Hz par land karte hain. Ab yeh indistinguishable hain — ek permanent, irreversible collision. Figure s01 dekho: fast wave fold hokar slow wave ke upar bilkul baithti hai.

Baad mein koi processing unhe un-mix nahi kar sakti. Yahi wajah hai ki anti-alias filter ADC se pehle hona zaroori hai.
Problem 3.2
Tumhare paas ek 12-bit ADC hai. Koi use 16 bits mein upgrade karta hai yeh sochke ki 3.1 mein dekha gaya aliasing remove ho jaayega. Kya isse help milegi? Har parameter kya control karta hai is hisaab se explain karo.
Recall Solution
Nahi. Bits amplitude precision control karte hain; aliasing ek time/frequency corruption hai. 16-bit part fake 300 Hz alias ko zyada precisely record karega — galat cheez ki sharp tasveer. Sirf yeh fixes hain: (a) ko Hz se upar raise karo, ya (b) sampling se pehle 1700 Hz tone ko low-pass filter kar do. Dekho Anti-Aliasing Filters.
Problem 3.3
Dikhao ki exactly par sampling kyun fail ho sakti hai. Hz, Hz lo, aur ko par sample karo.
Recall Solution
KYA compute karte hain: har instant par sample values. Har sample zero hai. Figure s02 mein dots bilkul zero-crossings par land karte hue dikhte hain.

Zeros ki ek flat line ek silent signal se indistinguishable hai — amplitude lost ho jaata hai. Yahi precise wajah hai ki Nyquist ek strict inequality hai, nahi.
L4 — Synthesis
Problem 4.1
Ek vibration sensor ke liye data-acquisition chain design karo jis ka useful signal kHz tak jaata hai. Tumhe chahiye (a) Nyquist minimum ke upar margin wali sampling rate, (b) kam se kam dB SNR, aur (c) V reference par mV se bada nahi LSB. aur choose karo, aur anti-alias filter cut-off batao.
Recall Solution
Step 1 — sampling rate. Nyquist minimum Hz hai. add karo: kHz choose karo (ya standard 22.05 kHz agar codec chip force kare).
Step 2 — SNR se bits. Chahiye :
Step 3 — LSB se bits. Chahiye mV, yaani , toh (kyunki ).
Step 4 — combine karo. Bada bit requirement lo: bits (ek real 16-bit part tak round up). 16 bits par LSB check karo: mV — mV se comfortably kam. ✓
Step 5 — filter. Anti-alias low-pass cut-off Nyquist kHz se bilkul neeche (8 kHz signal pass karo, 10 kHz ke upar sab kill karo). Matching DAC-side smoothing filter ke liye dekho Zero-Order Hold & Reconstruction.
Final design: kHz, bits (16-bit part), anti-alias cut-off – kHz.
Problem 4.2
Upar wali chain ke liye, DAC samples replay karta hai. Explain karo ki staircase frequency domain mein kya karta hai aur reconstruction filter ka cut-off kahaan jaata hai.
Recall Solution
DAC har sample ko s tak hold karta hai (zero-order hold), jo ek staircase banaata hai. Woh sharp steps spectral images inject karte hain — signal ki copies jo ke multiples ke centre par hoti hain (20 kHz, 40 kHz, ...). Cut-off kHz wala ek reconstruction low-pass filter steps ko erase karta hai, sirf original band rakhta hai. Hard edges = high-frequency content kyun hota hai yeh samajhne ke liye dekho Fourier Transform & Frequency Domain.
L5 — Mastery
Problem 5.1
Ek sensor kHz tone plus wideband noise kHz tak output karta hai. Tumhe kHz par sample karna hai. Design constraint: sampling ke baad, noise se koi bhi aliased energy interest ke – kHz band ke andar nahi girni chahiye. Agar kHz par noise ko signal se dB neeche push karna ho, aur filter kHz par roll karna start kare, toh tumhe low-pass filter roll-off (attenuation ke decades mein) ka kaun sa order chahiye? Aur yeh bhi batao ki kHz tone khud kahan end up hota hai (aliased hai ya nahi).
Recall Solution
Part A — kya 9 kHz tone safe hai? Nyquist kHz. Kyunki , tone Nyquist ke neeche hai → aliased nahi, yeh 9 kHz par hi rehta hai. ✓
Part B — noise fold. 10 kHz se upar ki har cheez 0–10 kHz mein fold hoti hai. 50 kHz par noise kHz tak alias karti hai — yeh bilkul band edge par land karta hai. Toh filter ko noise ko 10 kHz aur 50 kHz ke beech fold hone se pehle attenuate karna hoga.
Part C — filter roll-off. Filter ke corner kHz se worst noise kHz tak frequency ratio hai, yaani decades. Us span mein humein dB attenuation chahiye: Standard filter dB/decade per order () deta hai, toh: Ek 5th-order anti-alias filter. Dekho Anti-Aliasing Filters.
Problem 5.2
Tum 9 kHz tone ko 14-bit ADC ( V) se capture karte ho aur baad mein realize karte ho ki true signal amplitude sirf V swing karti hai (full scale ka use ho raha hai). Tumhara effective SNR kya hai, aur signal ko full scale tak amplify nahi karne se tumne kitne effective bits khoe?
Recall Solution
KYA: SNR is baat se scale hota hai ki signal full scale ka kitna hissa use karta hai. Kyun: quantization noise LSB se fix hoti hai (woh signal ke chhote hone par shrink nahi hoti), isliye chhote signal ka ratio worse hota hai.
14 bits par full-scale SNR: dB.
Signal swing V (yaani ka half) mein se V hai, yaani full scale ka fraction hai. Amplitude loss dB mein: Effective SNR: Bits lost: har dB bit, toh bits lost. Tumne ADC ko under-drive karke roughly 2.3 effective bits waste kar diye — 14-bit part -bit ki tarah behave kar raha hai. Fix: ADC se pehle gain add karo taaki range fill ho jaye. Dekho Sensor Interfacing on Microcontrollers.
Connections
- 5.5.04 ADC - DAC — resolution, sampling rate, Nyquist (Hinglish)
- Quantization Noise & SNR
- Anti-Aliasing Filters
- Zero-Order Hold & Reconstruction
- Fourier Transform & Frequency Domain
- Successive Approximation vs Sigma-Delta ADC
- Sensor Interfacing on Microcontrollers