From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Life Science

cancel
Showing results for 
Search instead for 
Did you mean: 

Spectral analysis and low frequencies

I am trying to use the Spectral Analysis (FFT) express VI to analyze frequency responses of signals. When I am using frequencies from 1 Hz to 25 Hz the resolution is pretty bad. I was hoping for a nice spike right at the input frequency (shame on me for hoping on the theoretical response), instead I am getting a "triangle" spike. This is not good enough for the low frequencies I am going to analyze....when I autoscale the graph it basically shows a line heading upwards.

Technically this is correct, but I am hoping for a better picture using the S.A. express VI for low frequencies. Is there a better option?
0 Kudos
Message 1 of 27
(10,350 Views)
I assume that you are using a graphic indicator to display the FFT results. Have you tried selecting a bargraph for the display. Perhaps what you seeing as the "triangle" is a line graph display (generic default for many graphic indicators) with interpolation on.
0 Kudos
Message 2 of 27
(10,327 Views)
Hi King Cosmos,

I don't want to give a FFT lesson, but there are a lot of math behind the scene and you cannot do anything. It goes like this :

your signal is evenly sampled at dt intervals.
The maximum observable frequency, the Nyquist frequency is Fn=0.5/dt.
The frequency interval (distance in hertz between to points in your fft graph)is df=Fn/N, where N is your number of points.

So the x value of the first point beeing 0, the second is Fn/N, third is 2Fn/N etc.
So to get a better resolution, you have to INCREASE N, the number of points, or to reduce dt to reduce Fn, or both.

Hope this helps.
Pls rate if appreciated.

Doc-Doc
Doc-Doc
http://www.machinevision.ch
http://visionindustrielle.ch
Please take time to rate this answer
Message 3 of 27
(10,317 Views)
Quote From NI information

Well with FFT's they only get interesting with the math but here goes...

Baseband FFT

The baseband FFT is the simplest option. Like all FFTs, the baseband FFT requires a time-domain input and returns an output in the frequency domain. The “Number of Lines” defines how many frequency components are present in the spectrum. The baseband FFT will always produce a number of lines equal to n/2, where n is the number of time-domain samples passed to the FFT. The width or “frequency resolution” of each line is equal to (Fs / n), where Fs denotes the sampling frequency and n denotes the number of time-domain points. Alternately, the frequency resolution can be written as (1 / acquisition time). The frequency range of a baseband FFT spectrum is always DC to (Fs / 2).
. Don't forget that there are other issues with FFT's as well but no mat

Thus perhaps what you need to do is increase the number of lines i.e. samples into the FFT and thus the spectoral resolution.

The problem that one finds with low frequency work is often the update rate, at this point people start looking at tecniques such as zoom FFT's.

Comments appreciated
Message 4 of 27
(10,284 Views)
Thank you both for your help. I have not done what was suggested and have received better results. On a separate note, I will do a search for any topics about EEG measurements via a microcontroller. This is what my group project is doing. If there is anything else that you can think that could help me, I would appreciate it.
0 Kudos
Message 5 of 27
(10,250 Views)
You might be interested in the material at www.zengar.com...
0 Kudos
Message 6 of 27
(10,246 Views)
Actually, I take that back. I HAVE done what was suggested and received better results. I meant to say that I have not done an extensive test of my VI but all seems good! Shame on me for not proof reading! And I will also check out the link provided. Thank you very much.
0 Kudos
Message 7 of 27
(10,245 Views)
There is a treatment on ECG processing with a simulation in the book
Labview Signal Processing
ISBN 0-13-972449-4

In essence there are two issues:-
1) Safety
2) Signal processing

Well we will assume that there is now way you would connect anyone to a computer?

So to the signal processing
You need to filter the data such that you remove interference from electrical activity and muscle activity. This is done by a couple of filters. The book has a nice example which I believe includes a simulation as well.
Message 8 of 27
(10,236 Views)
I do have another question using the spectral analysis. I posted this in another forum, but it is probably buried by now.

I want to be able to acquire a signal from the simulate signal.vi on a LabView server and send it over to a LabView client via TCP/IP. I was told I need to use the get waveform components to get the time stamp and Y values. I then use a flatten to string.vi on both strings and attempt to send each of them using a two separate TCP writes for each string (one TCP write to determine the length and the other TCP write to actually write it). I have no idea if this is correct or not.

Now, on the client side, I set the amount of bytes to read on two TCP reads and the other two TCP reads actually read the data. This data is passed to unflatten string.vi and then finally into a build waveform.vi. The problem is, only one type of data (in my case, the Y values) are being sent over the TCP connection properly and are properly reconstructed. It seems I am losing my time stamp values over the connection.

What am I doing wrong?

I have attatched my VI's for reference.
0 Kudos
Message 9 of 27
(10,225 Views)
Here is the "server" part of my project.
0 Kudos
Message 10 of 27
(10,223 Views)