LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create a series of Band Pass Filters

Hello all,

 

I am writing this topic because I want to know if someone can help me with something related with some measurements on LabVIEW.

 

I have a PXI system with PXIe 5105 and I am trying to program a VI that works as a sprectrum analyser.

 

My problem is to create a series of a band-pass filter (see the ilustrative image on attachment) on LabVIEW. I don't understand how I can do this "moving band-pass filter".

The 3dB-Bandwith is specified on the standard, so my problem is how to create this filter that takes the 3dB Bandwith and moves it between Start Frequency and Stop Frequency.

 

(Question: Do I need to use an array to store data?)

If you know some topic related to this, you can post it here for help too.

 

Thanks in advance

 

0 Kudos
Message 1 of 10
(2,924 Views)

Hello all,

 

I am writing this topic because I want to know if someone can help me with something related with some measurements on LabVIEW.

 

I have a PXI system with PXIe 5105 and I am trying to program a VI that works as a sprectrum analyser.

 

My problem is to create a series of a band-pass filter (see the ilustrative image on attachment) on LabVIEW. I don't understand how I can do this "moving band-pass filter".

The 3dB-Bandwith is specified on the standard, so my problem is how to create this filter that takes the 3dB Bandwith and moves it between Start Frequency and Stop Frequency.

 

(Question: Do I need to use an array to store data?)

If you know some topic related to this, you can post it here for help too.

 

Thanks in advance

0 Kudos
Message 2 of 10
(2,914 Views)

I have no idea how much you know about LabVIEW, Spectrum Analyzers, Signals, Signal Analysis, etc.  Why don't you Google "LabVIEW Spectrum Analyzer" and pick for yourself a few Tutorials that seem appropriate to your level of knowledge?  You may have to put some effort into it ...

 

Bob Schor

0 Kudos
Message 3 of 10
(2,901 Views)

Thanks Bob for your reply. Regarding your notes, I give you my answer.
I am not a rookie and expert either, but I have made several LabView VI's for professional and academic purpouses.


I have done that research already, but none of those tutorials tell me one aproach to make a "series of BandPass filters".

The normal behaviour of a spectrum analyser is to make a sweep from the start frequency and stop frequency, with a stipulated bandwith. If we program a filter on that, every bandwith record will be affected by that filter.

However, PXIe 5105 is a osciloscope card, and not really a spectrum analyser so the programming of it is different.

Thus, my problem isn't how to create a spectrum analyser from LabView, but how can I make one series of BandPass Filters from one Start Frequency to one Stop Frequency.
I will give an example:

 

Take this in account: 

-Start Frequency: 27 kHz
-Stop Frequency: 52 kHz

-Filter order: Butterworth 4th order
-3 dB bandwith - 300 Hz
-20% overlap

-Integration Time: 1 ms

My request for help is for someone who can help me to develop a serie of bandpass filters that start at 27 kHz, with a bandwith of 300 Hz, and it stop at 52 kHz (see image attached). (What occurs in my mind is to store it on an array, but my data is continuously acquiring, and I think that is a problem).

0 Kudos
Message 4 of 10
(2,892 Views)

Sorry, I was not responding to the question posed by the title of your Post (which is clearly how to make a series of Band-Pass Filters to simulate a Spectrum Analyzer).  It's probably my short-coming, as I am not an engineer.  Rather, I thought the real question is "I have a signal, and I want to know its spectrum" (a slightly different, possibly totally-irrelevant, question).

 

However, just for the sake of (my) curiosity, can you describe your signal?  How long does it last?  How fast do you sample it?  What frequency range do you think it contains (and do you hope to analyze)?  Over the period when you are sampling it, do you think its spectrum is changing in any significant way?  [An example of the latter would be speech, as opposed to vibration of a motor on a test stand running at a constant velocity].

 

Bob Schor

0 Kudos
Message 5 of 10
(2,873 Views)

Well, my goal is to perform tests as described in an European Standard (EN 50592 - Testing of rolling stock for electromagnetic compatibility with axle counters). As it says, I want to perform EMC test at railways rolling stock to evaluate the compatibility with axle counters working.

 

I have a working VI, but the only diference is that initially I just added one Filter VI defined as BandPass Filter between the frequencies that I wanted to analyse, which I thought it was enough.

Looking further on this European Standard I saw that one filter wasn't enough because I have to make a kind of series of bandpass filters as shown in the figure shown in previous post. This European Standard gives an overview how to make a series of bandpass filters, but unfortunately not on LabVIEW 😄

 

So we have 2 antennas (RSAH 5324 and RSAL 5340 - you can see on google), which output is dB, connected to PXIe-5105.

The type of signal that is suposed to see isn't known, but the only thing we know is that the signal that we measure can't go above the limits specified on the European Standard.

 

If it is better to you, I can send you the working VI that I have (with just one filter).

 

Regarding your questions:

Can you describe your signal: As I said in this post, I don't know that

How long does it last: It deppends the velocity of the rolling stock at test sites. On laboratory we can simulate the signal of course

How fast do you sample it: I am sampling rate from at list 300 kHz to 3 MHz

What frequency range do you think it contains: For this purpouse the frequency ranges are from 150 kHz to 1.250 MHz

Over the period...in significant way: I don't think so, that's why on my initial VI I just added one simple Filter VI, but looking over the EN 50592, it says I need a series of bandpass filters.

I know this is a "strange" topic, but I want to say thank you anyways.

0 Kudos
Message 6 of 10
(2,856 Views)

Hi pggoncalves,

 

The diagram you provided is a little short of detail regarding the filter specification.

 

Assuming that the diagram shows the filter shapes on a logarithmic frequency scale, the geometric mean of the lower and upper -3 dB frequencies gives the centre frequency, i.e. f_c = sqrt(f_l * f_u).  Of course, this does not have a unique solution for f_l and f_u.  The filter quality factor Q must also be defined (see here for a handy frequency calculator).

 

I would expect a European standard to define things like the filter bandwidth or quality factor.  If not, you may be able to work out the quality factor from the required 20 % overlap of consecutive filters at their -3 dB frequencies.

 

Once you have a method of calculating the -3 dB frequencies, it's just a case of defining each filter in turn and applying it to your time series.  The obvious way of doing it would be in a For loop indexed by an input array of centre frequencies.

 

Andy

0 Kudos
Message 7 of 10
(2,828 Views)

@pggoncalves,

     Thanks for your response.  Suppose you sample at 3 MHz for 3 msec.  You have a signal that can be represented by a series of sine waves from 1/.003 = 333 Hz to 3/2 = 1.5 MHz.  If you take a Fourier Transform of these data, you can get something called the Amplitude Spectrum, representing the gain and phase of sinusoids ranging from 333 to 1,500,000 Hz, which you can (if you wish) "band-average" to get the equivalent of your band-pass filter.

     You can also take, say, 1000 samples (which will take you 3 seconds of sampling), divide the sample into 1000 sub-samples, compute spectra for each of these sub-samples, and average the spectra, reducing the variability of the spectral estimates.

 

     Best of all, just over 50 years ago, James Cooley and John Tukey "rediscovered" a recursive algorithm published more than two centuries ago by Gauss that can compute such spectra very efficiently -- it goes by the name of the Fast Fourier Transform, often called the FFT.

 

     I recommend you learn about the FFT, and decide for yourself if this makes more sense for your task than trying a slower, more complex routine consisting of a series of band-pass filters.

 

Bob Schor

0 Kudos
Message 8 of 10
(2,821 Views)

@PsyenceFact / Andy

 

Thanks for your reply. Please see the image attached, I think it could help more about my problem.

 

Indeed, I was thinking about a For Loop, but my concern is the continuous acquisition. However, I can try this anyways, I have nothing to loose.

 

0 Kudos
Message 9 of 10
(2,815 Views)

Thanks Bob for your reply.

 

I agree with you. My VI actualy is performing a FFT analisys with a bandpass filter between 27 kHz and 52 kHz (see image attached above). For me this was the right thing to do. 
However the european standard says a "series of bandpass filters", and I think with PXIe-5105 board that will be hard.

I think I will stay with my "final version" of just one filter containing one start frequency and one stop frequency, resulting in one bandpass filter only.

0 Kudos
Message 10 of 10
(2,812 Views)