python nyquist zones upgrade in fft sampling

Status
Not open for further replies.

yefj

Advanced Member level 5
Joined
Sep 12, 2019
Messages
1,516
Helped
1
Reputation
2
Reaction score
5
Trophy points
38
Activity points
9,145
Hello,using python I have sampled a signal and made FFT to see the spectral picture of the time domain signal. the plot bellow shows only 1st and 2nd nyquist zone. I want to expend the spectral image and see the 3rd and 4th nyquist zones.

i have tried to double number of samples but it only expand the previos image two times. where did i go wrong recreating addional nyquist zones? Thanks.


Code:
Fs=200e3;#Hz
Ts=1/Fs;
dt=np.arange(0,1,Ts)
f1=10e3;
f2=20e3;
f3=30e3;
y=5*np.sin(2*pi*f1*dt)+5*np.sin(2*pi*f2*dt)+10*np.sin(2*pi*f3*dt)
L=np.size(y)
freq_vec=Fs*np.arange(0,1,Ts)
X=fft(y,L)
plt.plot(freq_vec,abs(X)/(0.5*L))
z=abs(X)


 

fft delivers fundamental range 0 to fs by design. But you can repeat the cyclical spectrum endlessly, it doesn't contain more information than the fundamental range shows.
 
Reactions: yefj

    yefj

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…