Theory

Sampling is the process of converting a continuous-time signal into a discrete-time signal. It is a fundamental operation in digital signal processing and communication systems.

According to the Nyquist-Shannon sampling theorem, a continuous-time signal can be completely represented in its samples and recovered back if the sampling frequency is greater than twice the maximum frequency component of the signal.

Ideal Sampling

Multiplication of the continuous-time signal by a train of ideal impulses (Dirac delta functions).

Natural Sampling

Multiplication of the continuous-time signal by a periodic pulse train with finite width.

Flat-Top Sampling

The sampled signal amplitude is held constant during the sampling period using a sample-and-hold circuit.

Nyquist-Shannon Sampling Theorem

If a continuous-time signal contains no frequency components higher than W hertz, then it can be completely determined by uniform samples taken at a rate fs ≥ 2W samples per second.

Mathematically, if x(t) is a band-limited signal with X(f) = 0 for |f| ≥ fm, then x(t) can be uniquely determined from its samples x(nT) when:

fs ≥ 2fm

Where fs = 1/T is the sampling frequency and fm is the maximum frequency component in the signal.

Types of Sampling Techniques

1. Ideal Sampling (Impulse Sampling)

In ideal sampling, the continuous-time signal is multiplied by a train of ideal impulses spaced at the sampling interval T. The sampled signal is given by:

xs(t) = x(t) · δT(t) = Σ x(nT) δ(t - nT)

2. Natural Sampling (Gating)

In natural sampling, the continuous-time signal is multiplied by a periodic pulse train p(t) with finite pulse width τ. The sampled signal is:

xs(t) = x(t) · p(t)

3. Flat-Top Sampling

In flat-top sampling, the sample value is held constant during the sampling period. This is implemented using a sample-and-hold circuit and is represented as:

xs(t) = Σ x(nT) · h(t - nT)

where h(t) is a rectangular pulse of width τ ≤ T.

Simulation

Adjust the parameters below to visualize different sampling techniques on a sinusoidal signal.

2.0
2.0 Hz
10 Hz
Warning: Sampling frequency is below the Nyquist rate (2× signal frequency). Aliasing may occur!

Original Signal: x(t) = A sin(2πft)

Ideal Sampling (Impulse Sampling)

Natural Sampling (Gating)

Flat-Top Sampling (Sample & Hold)

Procedure

  1. Understand the theoretical concepts of sampling techniques from the theory section.
  2. Adjust the signal parameters (amplitude and frequency) using the sliders.
  3. Set the sampling frequency. Observe the effect of changing sampling frequency relative to the Nyquist rate (2× signal frequency).
  4. Click "Run Experiment" to visualize the three sampling techniques on the signal.
  5. Observe and compare the waveforms for ideal, natural, and flat-top sampling.
  6. Try sampling below the Nyquist rate (fs < 2f) to observe aliasing effects.
  7. For natural sampling, observe how pulse width affects the sampled waveform.
  8. For flat-top sampling, note how the amplitude is held constant between samples.
  9. Record your observations for different parameter combinations.
  10. Write a comprehensive lab report following the guidelines provided.

Report Writing Guidelines

A well-structured lab report should include the following sections:

  • Title Page: Experiment title, your name, course information, date, and lab section.
  • Abstract: Brief summary of objectives, methods, and key findings.
  • Introduction: Theory of sampling, Nyquist theorem, and types of sampling techniques.
  • Objectives: Clear statement of experiment goals.
  • Methodology: Description of the virtual experiment procedure.
  • Results: Screenshots of waveforms for different parameter settings with proper labels.
  • Analysis: Comparison of the three sampling techniques, effect of changing parameters, observation of aliasing when fs < 2f.
  • Discussion: Interpretation of results, practical applications of each sampling technique, advantages and disadvantages.
  • Conclusion: Summary of key findings and learning outcomes.
  • References: Cite relevant textbooks and resources.

Note: Include mathematical equations, waveform diagrams, and tables where appropriate. Discuss the practical implications of sampling in communication systems.