LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Signal detection

Solved!
Go to solution

Hi ! 

It is my first "complex" program which should help me analyze electric signal. 
Im aware of that i made it with bad practics and it jhave a lot of mistakes ;/ So any criticism will be more than welcome.


Referring to the problem. When the signal is read, it does not detect any further imupls after first one. As I noted in the picture and divided, it should detect 4  pulses, each of them  consists of pulse cycle time (duration and pause time ) . So table shoud have filles 4 rows.

I can detect only one Ipeak (probably the first one) during the program's operation, and the appropriate times. The rest of the pulses are not detected.

I thought it might be   issue of setting the signal detection paramaters, but I could not get the right parameters. Now I came up with the idea of splitting the signal into 4 parts (the signal is in .lvm format) and loading it, but unfortunately I do not know how to implement it and whether this method  would work.
Does anyone have any ideas how to detect the remaining imupls?


When i tested my program with other signal which sould be " ideal". Progam detected all impulses and and he behaved as i wanted.

forum dobry.pngforum.pngfoum blokwoy.PNG

 

 

Download All
0 Kudos
Message 1 of 11
(4,541 Views)

The Pulse Measurements VI has an optional input for pulse number (or pulse index), so re-run the sub-VI multiple times while indexing that input parameter to get the results for the following pulses.

 PulseNumber.png

 

billede.png

0 Kudos
Message 2 of 11
(4,488 Views)

Thank you for your answer. 

I connected loop interations with pulse number in every block but it didnt change anything. 

I have more basic question. I changed signal for "nicer" one. Here we have graf for it. forum1.pngbut just Upeak for the highest value was detected. Other times and  UPeak  values was  not detected ;/  do you have any idea why it happend ? 
time.PNG

Download All
0 Kudos
Message 3 of 11
(4,465 Views)

The first pulse should be indexed as 1 but you are indexing directly from the while loop counter that starts at 0. Add 1 to your 'i' value.

 

This is btw. nicely reported by the Error cluster that states:

 

Possible reason(s):
Analysis:  The edge number, pulse number, or cycle parameter value must be greater than zero.

0 Kudos
Message 4 of 11
(4,459 Views)

Sorry, i send you older version. I was trying  also to increment loop iterantion by adding +1 but it didnt change results. 

0 Kudos
Message 5 of 11
(4,452 Views)

I worked for me when I tried it with your simulated signal.

 

billede.png

 

BTW... I would not recommend to make your signal 'nice' by reducing the sample rate. The calculation uses histogram and you may get inaccurate results if you don't have enough samples to work from.

0 Kudos
Message 6 of 11
(4,446 Views)

I send you pm.  If we will find solution we can post it here later for others wich may be interested in future. 

0 Kudos
Message 7 of 11
(4,438 Views)

Let's stay public if you don't mind...

 

The only thing I did was to remove various features that I could not run, incremented the loop counter by 1 and selected your simulated signal. See attached modified VI.

0 Kudos
Message 8 of 11
(4,435 Views)

Could you try with .lvm file which i attached ? 
For simulated signal it works for me also but i i have problem for  signal from measuring card ;/

You need to  choose other operating mode. This one please tryb pracy.PNG

 

0 Kudos
Message 9 of 11
(4,432 Views)
Solution
Accepted by topic author tomek.ukf

OK - Your file contains two signals. Channel 0 is a noisy signal with multiple levels, Channel 1 is mainly zero overlaid with some noise.

Forget about Channel 1 you won't get any valuable results out of it.

 

Channel 1 is ambivalent since it clearly shows three more or less stationary levels. The error message you get when running analysis with default parameters is:

-----------------------------------------

Possible reason(s):
Analysis:  The waveform did not cross the mid reference level enough times to perform this measurement. Check the signal length, reference levels, and ref level units.

------------------------------------------

What the error message tells you is that you need to help the measurement VI by telling it what you are looking for (which of the many pulses are the ones you want to analyze). To do so I selected the absolute reference levels with low/medium/high levels of resp. 4, 5 and 7 volts. These values fit all the 'wide' pulses that I assume you  are interested in.

 

See attached VI for more details. I am aware that with a signal as 'ugly' not all the pulses may be detected correctly, but it's up to you to fine tune the parameters and/or clean up your signal (filtering) before you analyze it. Analysis can do a lot, just not miracles.

 

Good luck!

Message 10 of 11
(4,418 Views)