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.
- 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:
- Original signal with sampled points marked.
- Reconstructed signal.
- Difference between the original and reconstructed signals.
- Frequency domain visualization to detect aliasing.
- User Interface: Arrange the graphs conveniently to ensure ease of use.
- 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.
- 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.
- Perform sampling and recovery in real time as the user interacts with the application.
- Eliminate the need for manual updates or refresh buttons.
-
Whittaker–Shannon, spline interpolation, and Fourier.:
-
Customization: Users can select the reconstruction method using a combobox.
- Programming Language: Python
- Framework: PyQt or PySide for GUI development
- Visualization: Matplotlib or PyQtGraph for dynamic graphing
- Signal Processing: NumPy and SciPy libraries
- Clone this repository:
git clone https://github.com/Ahmed-Hajhamed/Signal-Sampling-and-Reconstruction-Studio.git
- Install the required dependencies:
pip install -r requirements.txt
- Run the application:
python main.py
- Launch the application.
- Load or compose a signal using the interface.
- Adjust sampling frequency and observe real-time changes in recovery and aliasing.
- Add noise and experiment with different SNR values.
- Compare reconstruction methods to explore their pros and cons.