Sampling an analog signal is a crucial step for any digital signal processing system. The Nyquist–Shannon sampling theorem guarantees a full recovery of the signal when sampling with a frequency larger than or equal to the bandwidth of the signal (or double the maximum frequency in case of real signals).
This desktop application demonstrates the process of sampling and recovering a signal, showcasing the importance and validation of the Nyquist rate.
This feature allows users to load a mid-length signal, visualize it, sample it at different frequencies, and then recover the original signal using the Whittaker–Shannon interpolation formula. It provides a practical demonstration of the Nyquist–Shannon sampling theorem.
Users can load a signal from a file or compose one using a signal mixer. The signal mixer permits users to add multiple sinusoidal signals of different frequencies and magnitudes, enabling experimentation with various signal compositions.
This feature enables users to introduce noise to the loaded signal with a custom controllable Signal-to-Noise Ratio (SNR) level. Users can observe how noise affects the signal, and the application visually demonstrates the dependency of noise effects on signal frequency.
Sampling and recovery operations are performed in real-time, providing immediate feedback to users as they adjust parameters. This feature enhances the user experience by allowing for seamless interaction with the application.
The application's user interface is designed to be easily resizable without disruption. Users can adjust the size of the application window to suit their preferences without compromising usability.
The application includes at least three synthetic signals generated through the Composer, each addressing different testing scenarios. These scenarios provide users with opportunities to explore various signal characteristics and sampling conditions.
- Clone this repository to your local machine.
- Install the required dependencies (
numpy
,matplotlib
,scipy
). - Run the
main.py
file. - Use the application interface to load a signal, adjust sampling frequency, add noise, and visualize the sampled and recovered signals.
- Experiment with different scenarios and observe the effects on signal recovery.
- Python
- NumPy
- Matplotlib
- SciPy
Muhannad Abdallah |
Ali Badran |
Ahmed Ali |
Hassan Hussein |