1
$\begingroup$

I have a signal with multiple frequencies, and two of them, one of which is my main frequency, overlap.

Are there any techniques that could separate two frequencies that almost overlap? I can increase my sampling rate but not my window size

I have already tried SVD,PCA,ICA but none of the methods managed to decompose those two frequencies.

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()

enter image description here

$\endgroup$
  • $\begingroup$ Frequencies can't overlap. Do you mean bandwidths? Your signal model is not explicit enough. $\endgroup$ – Marcus Müller Oct 16 '17 at 21:03
  • $\begingroup$ Have you tried spectrum analysis algorithms like MUSIC $\endgroup$ – MimSaad Oct 16 '17 at 22:26
  • $\begingroup$ are you asking an estimation question, as in what are the frequencies or a filtering question? $\endgroup$ – Stanley Pawlukiewicz Oct 17 '17 at 1:37
  • $\begingroup$ Time frequency uncertainty. Under a given S/N, to increase spectral frequency peak separation resolution, a longer window is needed. Otherwise, two or more close frequencies are statistically no different from one. $\endgroup$ – hotpaw2 Oct 17 '17 at 5:27
  • $\begingroup$ It is a filtering question, I would like to remove the second peak. Would it be more useful if I uploaded part of the code? $\endgroup$ – andromeda Oct 17 '17 at 5:46
0
$\begingroup$

In case your signal is fully stationary, just go ahead and use a "sinusoidal fitting" and take out the frequency that is not off your interest. Then you have a disturbance free signal. Although since these signals are, I guess, not multiple integers of each other, your main frequency will also be low pass filtered. You can also use a notch filter, which will have similar behavior.

Please update us if you found a good answer.

$\endgroup$
  • $\begingroup$ After some research I understood the following: (Picture attached). According to my initial phase (x, px in the picture are x,y in the code) I see an oscillation of my main frequency (named "tune" in the plot) in the sliding window of 30 turns. This is associated with the 2*fs from my non-linearity. So what I need is to either remove the 2*fs or, if possible, to minimize this interaction $\endgroup$ – andromeda Oct 18 '17 at 16:28
0
$\begingroup$

I just looked at your signal, if after the moving average with an appropriate window you got to the signal shown, you are dealing with a sinusoidal modulation, which makes your signal non-stationary in smaller windows (non-stationary means that your signal's frequency content changes over time). This is also the main reason you are seeing an overlapping frequency (just subtract the fundamental frequency from the overlapping frequency and that is your modulation frequency). Therefore, apply the filters might have limited success.

If your signal is lengthy enough (maybe 1000 periodical cycles), do the following (assume your signal is $x$ and the rotational frequency of your fundamental is $\omega_0$:

$p(t)=x \times sin(\omega_0t+\phi)$

$P(t)=\int_{0}^{T} p(t)/T$

If the $T$ window is large enough (for example 100 $T_0$ where $T_0$ is the cycle period for your main signal), $P(t)$ will be a constant value. Your fundamental signal simply will be $x_1(t)=P(t)\times sin(\omega_0 t|+\phi)$

But how to get to the parameter $\phi$ is the main issue. A heuristic approach would be, assuming the frequency component overlapping signal is smaller than your actual fundamental frequency, and that there is not disruption in signal, you can do a regression between your signal $x(t)$ and a sinusoidal signal with fundamental frequency of your interest $a\times sin(\omega_0t+\phi)$. Once you did the regression and achieved $\phi$, replace it in the formula above and you are good to go. As I said, this is heuristic and gives you a close estimate and depending on how accurate you would like to be could be useful.

And by the way, you are not dealing with non-linearity as they produce harmonics and harmonics are multiple integers of fundamental frequency. It seems you are dealing with a sinusoidal modulation and in smaller windows you can call this non-stationarity.

Hope it helped.

$\endgroup$
  • $\begingroup$ If I use 100T0 or in general a larger sliding window this modulation is averaged out. My problem is that I would like to keep the window as small as possible.I can increase my sampling rate my splitting the rotation into smaller parts, but I would like to keep the window size at 30 rotations. This is actually due to a non-linearity which produces the 2*fs. $\endgroup$ – andromeda Oct 19 '17 at 21:14
  • $\begingroup$ This is actually due to a non-linearity which produces the 2*fs. The kicks x^2-z^2 and xy are sextupolar kicks, I could go into more details but this would be more physics than signal processing and I would be off topic. Thank you very much for you help, I will post as soon as I have any news $\endgroup$ – andromeda Oct 19 '17 at 21:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.