Skip to content

A Signal Sampling and Reconstruction Studio for analyzing signal sampling interactively. Users can load or compose a signal, sample it with a chosen sampling frequency, and visualize it's reconstruction using Whittaker-Shannon interpolation, Cubic Spline, or a Fourier low-pass filter with linear interpolation.

Notifications You must be signed in to change notification settings

Ahmed-Hajhamed/Signal-Sampling-and-Reconstruction-Studio

Repository files navigation

Signal Sampling and Recovery Desktop Application

Introduction

Sampling an analog signal is a crucial step in any digital signal processing system. The Nyquist–Shannon sampling theorem guarantees full recovery of the signal when sampling at a frequency greater than or equal to the signal's bandwidth (or double the maximum frequency for real signals). This project demonstrates the principles of signal sampling and recovery while validating the Nyquist rate.

Features

1. Sample & Recover

  • Visualization: Load and visualize signal or either compose a signal in real-time.
  • Sampling: Sample the signal at different frequencies (ranging from 0×fmax to 4×fmax).
  • Recovery: Reconstruct the original signal using the Whittaker–Shannon Interpolation formula, Cubuc Spline Interpolation or a Fourier Low-Pass Filter.
  • Graphical Outputs: Four graphs to display:
    1. Original signal with sampled points marked.
    2. Reconstructed signal.
    3. Difference between the original and reconstructed signals.
    4. Frequency domain visualization to detect aliasing.
  • User Interface: Arrange the graphs conveniently to ensure ease of use. Screenshot 2025-01-06 192614

2. Load & Compose

  • Signal Loading: Load signals from a file or create them using an integrated signal mixer.
  • Signal Mixer: Add and combine multiple sinusoidal signals with different frequencies and magnitudes.
  • Editable Components: Allow removal of individual components while preparing the mixed signal.
  • Default Values: Ensure the interface is never empty and provides default signals for immediate use. Screenshot 2025-01-06 192756

3. Additive Noise

  • Noise Control: Add noise to the signal with adjustable Signal-to-Noise Ratio (SNR).
  • Noise Analysis: Display how noise effects depend on the signal frequency. Screenshot 2025-01-06 193045

4. Real-time Updates

  • Perform sampling and recovery in real time as the user interacts with the application.
  • Eliminate the need for manual updates or refresh buttons.

5. Multiple Reconstruction Methods

  • Whittaker–Shannon, spline interpolation, and Fourier.:

    • Whittaker–Shannon Screenshot 2025-01-06 192756
    • Cubic Spline i Interpolation Screenshot 2025-01-06 192614
    • Low-Pass Filter Screenshot 2025-01-06 192647
  • Customization: Users can select the reconstruction method using a combobox.

re

5. Detetct Aliasing:

Screenshot 2025-01-06 192909

Technologies Used

  • Programming Language: Python
  • Framework: PyQt or PySide for GUI development
  • Visualization: Matplotlib or PyQtGraph for dynamic graphing
  • Signal Processing: NumPy and SciPy libraries

Installation

  1. Clone this repository:
    git clone https://github.com/Ahmed-Hajhamed/Signal-Sampling-and-Reconstruction-Studio.git
  2. Install the required dependencies:
    pip install -r requirements.txt
  3. Run the application:
    python main.py

Usage

  1. Launch the application.
  2. Load or compose a signal using the interface.
  3. Adjust sampling frequency and observe real-time changes in recovery and aliasing.
  4. Add noise and experiment with different SNR values.
  5. Compare reconstruction methods to explore their pros and cons.

References

About

A Signal Sampling and Reconstruction Studio for analyzing signal sampling interactively. Users can load or compose a signal, sample it with a chosen sampling frequency, and visualize it's reconstruction using Whittaker-Shannon interpolation, Cubic Spline, or a Fourier low-pass filter with linear interpolation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages