Understanding Signal Conversion and Sampling

Sep 29, 2024

Notes on Analog to Digital Signal Conversion

Introduction

  • Focus on converting analog signals to digital signals.
  • Starting with the simplest periodic analog signal: the sine wave.

Sine Wave Characteristics

  • Sine wave is a 1-dimensional function.
  • Represented visually on a 2D plane but is a single-valued spatial point over time.
  • Continuous function: infinitely many unique values over time.
  • No breaks or loss of resolution in the sine wave.

Challenges in Digital Representation

  • Storing a sine wave requires capturing enough unique values.
  • Infinite values make it impractical to store all.
  • Need to convert the continuous signal into a discrete signal by sampling.

Sampling Process

  • Sampling converts analog signals by measuring at specific intervals.
  • Example: 30 samples in 1 second for a 1Hz sine wave.
  • Sampling rates can vary (e.g., 2Hz, 8Hz, 44100Hz).

Nyquist Shannon Sampling Theorem

  • Governs the conversion between continuous and discrete signals.
  • Key points of the theorem:
    1. Sample at least twice the highest frequency component to accurately represent the signal.
    2. The analog signal must be band-limited to the highest frequency present.
  • For a 1Hz sine wave, minimum sampling rate is 3Hz.

Misconceptions about Sampling Rates

  • Higher sampling rates do not necessarily equate to better audio quality.
  • Both 3Hz and 40Hz sampled waveforms can produce indistinguishable output signals when reconverted to analog, if band-limited.

Low Pass Filters

  • Low pass filters allow frequencies below a certain threshold to pass while blocking higher frequencies.
  • Practical filters smooth the transition instead of cutting off abruptly.

Demonstration with Audacity

  • Use Audacity to explore sampling rates:
    • Set a low sample rate (e.g., 8000Hz).
    • Generate sine waves and observe limitations based on Nyquist.
  • Experiment with different frequencies to observe aliasing and beating effects.

Aliasing and Frequency Response

  • Aliasing occurs when high frequencies fold back into the signal spectrum, causing distortion.
  • Amplitude modulation observed is a result of aliasing effects.
  • Importance of a buffer between the maximum frequency and Nyquist frequency to avoid aliasing.

Engineering Nyquist Theorem

  • Modify the sampling theorem: sample at 2.5 times the highest frequency to accommodate practical electronic limitations.

Conclusion

  • Introduction to sampling offers insights on selecting sample rates for audio processing.
  • Next steps include exploring commonly used sample rates and their effects in audio fidelity.