Instructions for Power Spectral Density (PSD) Simulator
- Step 1: Click on "Generate Input Signal" to generate the signal.
- Step 2: Select the base signal from the dropdown menu, and Enter the input signal frequency (in Hz), and the sampling frequency (Hz) in the parameters section.
- Step 3: Choose an operation (such as addition, multiplication, or convolution) from the "Operations" section.
- Step 4: Click the "Simulate" button to run the simulation.
- Step 5: Reset the simulator by clicking the "Reset Simulator" button.
Parameters
Base Signal
Input Signal
Operations
Magnitude Plot
Phase Plot
Mathematical Background
1. Discrete Fourier Transform (DFT)
The simulator converts the time-domain signal x[n] into the frequency domain using the Fast Fourier Transform (FFT). The DFT is defined as:
Where $N$ is the number of samples and $X[k]$ represents the complex frequency components.
2. Magnitude Spectrum
The magnitude represents the "strength" of each frequency component. It is calculated as the absolute value of the complex FFT output:
3. Power Spectral Density (PSD)
PSD describes how the power of a signal is distributed over frequency. To normalize the power relative to the sampling rate ($f_s$) and the number of points ($N$), we use:
4. Logarithmic Scale (dB/Hz)
Because signal power can span several orders of magnitude, it is standard to express PSD in decibels (dB) relative to 1 Hz of bandwidth:
Note: A floor of -100 dB is applied in this simulator to handle zero-magnitude components and prevent mathematical singularities.