[SciPy-User] frequency components of a signal buried in a noisy time domain signal
Ivo Maljevic
ivo.maljevic@gmail....
Fri Feb 26 15:38:36 CST 2010
Maybe you can try sigview (http://www.sigview.com/), if that is what you
need, or you can invest some time in learning more about
spectral analysis, and then write your own software that will be tied to
your particular application / requirement.
I cannot give you a short answer to your question regarding the noise
bandwidth, but I can give you a few pointers.
1. When you have sampled signal which consists of desired signal + noise,
usually it helps to know what is the bandwidth of the desired signal.
In most applications that is the case, unless you are analyzing a completely
unknown signal (military applications, SETI, etc). Then you can filter the
signal to remove as much noise as possible.
2. In real world applications, there will always be some wideband noise
(i.e., thermal noise), and you might also have some narrowband
noise/interference. White noise is the most common type of wideband noise
that you would encounter, even though it may be "coloured" noise if you are
analyzing a signal at the output of nonideal Rx filter (for example in radio
systems).
3. As long as power spectral density of the signal is higher then the power
spectral density of the noise (at least in some portions of the spectrum),
simple FFT or periodogram (do a google search) approach will suffice.
Cheers,
Ivo
On 26 February 2010 16:24, Nils Wagner <nwagner@iam.uni-stuttgart.de> wrote:
> On Fri, 26 Feb 2010 15:56:29 -0500
> Ivo Maljevic <ivo.maljevic@gmail.com> wrote:
> > Nils,
> > Yes, FFT can be used to visualize the frequency content
> >of a signal buried
> > in the noise, especially if it is is narrowband,
> > even though more advanced spectral analysis is required
> >for advanced
> > applications.
>
> Thank you very much for your reply.
>
> Are you aware of free software for advanced applications ?
> What could be done in case of broadband noise ?
>
>
> Nils
>
> >
> > I cannot help you with non-uniformly spaced samples
> >(some sort of
> > interpolation comes to mind), but next power of 2 should
> >be trivial. Without
> > checking for the argument type, you can implement the
> >function like this:
> >
> > def nextpow2(n):
> > m_f = np.log2(n)
> > m_i = np.ceil(m_f)
> > return 2**m_i
> >
> >
> > Hope it helps,
> > Ivo
> >
> > On 26 February 2010 14:05, Nils Wagner
> ><nwagner@iam.uni-stuttgart.de> wrote:
> >
> >> Hi all,
> >>
> >> A common use of Fourier transforms is to find the
> >> frequency components of a signal buried in a noisy time
> >> domain signal.
> >>
> >> I found a Matlab template at
> >>
> >> http://www.mathworks.com/access/helpdesk/help/techdoc/ref/fft.shtml
> >>
> >> Matlab has a function
> >>
> >> nextpow2(L)
> >>
> >> Is there a similar build-in function in numpy/scipy ?
> >>
> >> I tried to convert the m-file into a pythonic form.
> >> What is needed to obtain a similar figure of the
> >> single-sided amplitude spectrum using
> >> numpy/scipy/matplotlib ?
> >>
> >>
> >> from numpy import sin, linspace, pi
> >> from numpy.random import randn
> >> from pylab import plot, show, title, xlabel, ylabel
> >> from scipy.fft import fft
> >>
> >> Fs = 1000. # Sampling frequency
> >> T = 1./Fs # Sample time
> >> L = 1000 # length of signal
> >> t = arange(0,L)*T
> >> x = 0.7*sin(2*pi*50*t)+sin(2*pi*120*t)
> >> y = x + 2*randn(len(t))
> >> plot(Fs*t[:50],y[:50])
> >> title('Signal corrupted with zero-mean random noise')
> >> xlabel('Time (milliseconds)')
> >> #
> >> #
> >> #
> >> #NFFT = 2^nextpow2(L); # Next power of 2 from length of
> >>y
> >>
> >> Y = fft(y,NFFT)/L
> >> f = Fs/2*linspace(0,1,NFFT/2+1)
> >> plot(f,2*abs(Y[:NFFT/2+1]))
> >> title('Single-sided amplitude spectrum of y(t)')
> >> xlabel('Frequency (Hz)')
> >> ylabel('|Y(f)|')
> >> show()
> >>
> >>
> >> What can be done in case of nonequispaced data ?
> >>
> >> http://dx.doi.org/10.1137/0914081
> >>
> >> Thanks in advance
> >>
> >> Nils
> >> _______________________________________________
> >> SciPy-User mailing list
> >> SciPy-User@scipy.org
> >> http://mail.scipy.org/mailman/listinfo/scipy-user
> >>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20100226/97e2ad23/attachment-0001.html
More information about the SciPy-User
mailing list