# Noise is not showing in FFT

The below is a graph my designed constant current source.

You can clearly see that there are some noise in the values.

But when I take the FFT, the noise is not actually showing in graph.

Could some tell me why is it so? I am newbie here. Please spare me if I am wrong.

Below is my python code for FFT.

<

import numpy as np
import pandas as pd

import matplotlib.pyplot as plt
from scipy.fft import fft, fftfreq

file_path ="location"

# Extract the current values
current = data['Current (mA)'].values

# Compute the FFT for real-valued data
yf = fft(current)

# Compute the corresponding frequency values
N = len(current)
SAMPLE_RATE = 200 # Sampling rate based on 0.005 s sampling interval

xf = fftfreq(N, 1 / SAMPLE_RATE)

# Plot the frequency domain representation
plt.plot(xf, np.abs(yf))

plt.xlabel('Frequency (Hz)')
plt.ylabel('Magnitude')
plt.title('Frequency Domain Representation')
plt.show()


Mean graph. Subtracted the mean from values

• Your Y-axis is hard to read. What exactly does "+2.106e1" at the top mean ? Chances are this is a huge DC offset or bias. Aug 10, 2023 at 12:26
• @Hilmar: It is the output of a constant current circuit designed for 21mA. So the values is around 21.061mA to 21.068mA Aug 10, 2023 at 12:29
• So yes: you have a HUGE DC signal with a tiny little bit of noise on top. You need to subtract the bias out before doing the FFT Aug 10, 2023 at 13:37
• It would also help if you could plot your spectrum logarithmically in dB. Than you can easily see where the DC drift ends and the noise starts in frequency. Make sure that your frequency axis is correct as well. It certainly isn't in the first graph Aug 10, 2023 at 13:41