我有一个具有多个频率的信号,其中两个重叠,其中一个是我的主频率。
是否有任何技术可以分离几乎重叠的两个频率?我可以提高采样率,但不能提高窗口大小
我已经尝试过 SVD、PCA、ICA,但没有一种方法能够分解这两个频率。
N=200
x = np.zeros(N)
y = np.zeros(N)
z = np.zeros(N)
k = np.zeros(N)
x[0] = np.cos(2*np.pi)*np.cos(2*np.pi*0.1)
y[0] = np.cos(2*np.pi)*np.sin(2*np.pi*0.1)
z[0] = np.sin(2*np.pi)*np.cos(2*np.pi*0.1)
k[0] = np.sin(2*np.pi)*np.sin(2*np.pi*0.1)
for i in range(1,N):
x0=x[i-1]
y0=y[i-1]
z0=z[i-1]
k0=k[i-1]
x[i] = x0*np.cos(2*np.pi*0.31) - y0*np.sin(2*np.pi*0.31)
y[i] = x0* np.sin(2*np.pi*0.31)+ y0*np.cos(2*np.pi*0.31)
z[i] = z0* np.cos(2*np.pi*0.32)- k0*np.sin(2*np.pi*0.32)
k[i] = z0* np.sin(2*np.pi*0.32)+ k0*np.cos(2*np.pi*0.32)
y[i]+=0.3*(x[i]**2-z[i]**2)
k[i]+=0.3*(x[i]*z[i])
jet= plt.get_cmap('jet')
colors = iter(jet(np.linspace(0,1,30)))
plt.figure(0)
w=30
for i in range(1,30):
fourier = np.fft.rfft(x[i:i+w])
freqs =np.fft.rfftfreq(len(x[i:i+w]))
color=next(colors)
plt.plot(freqs,abs(fourier), c=color)
plt.figure(1)
fourier = np.fft.rfft(x)
freqs =np.fft.rfftfreq(len(x))
plt.plot(freqs,abs(fourier), c='k')
plt.show()