LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to determine some points?

Hallo,

i need to calculate the bandwidth of a filter. so i need to determine the point (nr1) and then the corresponding point (nr2) to determine the bandwidth.

How can i find firstly the value of the point (nr1) and then the corresponding point (nr2) as it shown in the attached file?

thanks

0 Kudos
Message 1 of 9
(3,820 Views)

Hi Oliver2000,

 

If you are passing this value in as an array, I would have thought that you could mathematically evaluate this point by looking at the array it has originated from. Am I correct in saying you are looking for a -3 dB/decade corner frequency? If this is the point you are looking for, I would evaluate the array by taking two elements at a time, working out the gradient between the two points and determing which of these most closely approximates to -3dB. Could you possibly provide your code so I could advise better? 

 

Thanks,

Andrew McLennan
Applications Engineer
National Instruments
0 Kudos
Message 2 of 9
(3,812 Views)
You should be able to find that value using Interpolate 1D function.
0 Kudos
Message 3 of 9
(3,801 Views)

Well, the problem is that your x-axis is lograrithmic and the values are not equally spaced.

 

 I assume you want the point where the line first drops below a certain db and then get the x-value there.

 

I would multiply the Y data by -1 and take the log of x and use threshold 1D array. For the array input make an array of clusters, each element containing [-Y, log(x)]. Search for "(-1)* threshold" and youl'll get the corresponding log(x) from which you can calculate the desired x.

 

Check the online help for "threshold array" for the allowed inputs.

Please attach some data if you want more detailed help.

 

(If you have significanlty more noise, you might want to fit the data to a mathematical model using e.g. levenberg-Marquardt.)

 

 

0 Kudos
Message 4 of 9
(3,794 Views)

Hallo,

Thanks for the useful advices.

 yes exactly. I am looking for a -3 dB/decade corner frequency. So i want the point where the line first drops below a certain dB and then get the x value.

i attached the code. that may help to see my problem.

 

 

0 Kudos
Message 5 of 9
(3,762 Views)

Hi Oliver2000,

 

I have attached a VI that will look through an array and calculate the gradient between each of the points. You could then pass this output array through a "In range and Coerce" function to determine which of the gradients is in the correct range. 

 

You should be able to do use any of the suggestions mentioned on this thread to find the -3 dB point. 

 

Thanks,

Andrew McLennan
Applications Engineer
National Instruments
0 Kudos
Message 6 of 9
(3,746 Views)

Oliver2000 wrote:

i attached the code. that may help to see my problem.


Could you modify your code as follows:

  1. Run the VI so it contains real data in the controls. (currently, they are all empty)
  2. Make current values default. (or change the controls to diagram constants)
  3. Save and attach again.
0 Kudos
Message 7 of 9
(3,725 Views)

Hallo,

 

Here is the complete code with default data. The interesting part is "calculate bandwidth? " where i can see how the bandwidth changes when i change the time "or the frames", But my problem as said is how to calculate this bandwidth. for example, what is the bandwidth when the time is 200.. or what is the bandwidth when the time is 400.

 

thanks in advance 

0 Kudos
Message 8 of 9
(3,710 Views)

and here is the "load file" file which is probably needed to use the "ppp.vi"..

0 Kudos
Message 9 of 9
(3,702 Views)