Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

amplitude of a periodic signal

Hello, Henrik!

Thank for the vi., i played with it and decided to use a certain part which find peaks and valleys of the waveform , then computes the difference between them to find the resulting amplitude. it seems to be working but i for some reason get a zero output from a minimum of the array of valleys. There also is a minor problem that the FOR loop does not find any peaks and valleys although i can clearly see that they are there, for the resulting of max peak - min valley = amplitude, so since i get min valley = 0, the amplitude i get is a max peak. But the question is that when in your vi we find the width using initial frequency of a signal i, on the other hand, had to either get it with a extract single tone info but it makes the resulting frequency slightly change with every loop of while or to determine the width empirically, which seems to work better. But apart from that, i just have one question, if you need, i got my vi attached, why does it compute min value of valleys as zero? is it due to the width? or anything else? 

p.s. i also tried wiring the max value of valleys to compute the difference but it somehow is still zero 🙂 

 

Thanks a lot!

 

i also attach the picture which shows my pressure data and the amplitude analysis: initial filtered pressure data and the amplitude analysis.png

______________________________________
i've got a rebel heart
0 Kudos
Message 11 of 17
(1,882 Views)

Hope to hear from you very soon 🙂

______________________________________
i've got a rebel heart
0 Kudos
Message 12 of 17
(1,872 Views)

No access to LV,  back at the end of the month

 

for debugging :  use probes and wire a autostop if a zero is detected ..

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 13 of 17
(1,869 Views)

Hello, Henrik, i am now continuing working on signal anlysis here, after a month of paper work on a project, and when i got back to my hardware i still have no clue about why i get zero valleys here. i used probes as you suggested, and the problems ocur after any peak detection vi im using for valleys. by the way, if i double click on the vi for valleys, it says its detecting peaks anyway, but i probably shouldnt pay attention to it, since i set detection to valleys instead of peaks. so this is why i get amplitude equal to peak value, for in peak - valley = ampl, valley = 0 😞

______________________________________
i've got a rebel heart
0 Kudos
Message 14 of 17
(1,836 Views)

I also now have a question regarding the time span during which the extract single tone information vi detects the amplitude. it sets the dt value by default to 200 ms whenever i run the prgram, whereas i change it to 3 sec when double clicking on it. it has no possibility to change the value of dt by wiring anything to it, so i wonder, if there is any way i could elongate the period of time during which the amplitude is calculated. the vi seems to be working well but this dt feature prevents me from getting a value for around 3 sec time span. any help would be appreciated, thank you!

______________________________________
i've got a rebel heart
0 Kudos
Message 15 of 17
(1,833 Views)

some points I saw in your vi:

 

-like in the AO you should use the actual samplerate (or use the dt of the output waveform)

- instead of software timing (50ms) you should calculate (actual samplerate, exitation frequency) and wire the number of samples to read. 

- think of a producer consumer architecture 😉

- if you wire the wfrm to the tone detection, the samplerate is correct, and the number of periodes is defined by the number of samples and exitation frequency

 tone detection should have at least 5 periodes .... (better is >10, however I don't expect big differences in your application;) )

- shouldn'd you use the valleys minimum value?

 

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 16 of 17
(1,823 Views)

Hello, Henrik, now that i have tested numerous variants of wiring different amplitude measuring vis to the signal i have i can say i ran out of ideas. the single tone info extraction shows the max value of the voltage, and its not the amplitude at all. i have also tried writing a block of data from the signal, exctracting the data itself from the waveform, so to have a block of values, then to determine min and max to find the amplitude but that wouldnt be working either for the array is always rewriting itself with the initialised array of zero. i used the probes to find where the problem is born, so, when i use the waveform peak detection vi i get 0 right after the vi. the same with valleys. if you could help me out with this id much appreciate it thanks 🙂probes.png

______________________________________
i've got a rebel heart
0 Kudos
Message 17 of 17
(1,807 Views)