LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SIGNAL REGONITION

Hi,

I want to make a vi that can detect a patern in a signal, it's quite a
simple pattern, but i don't know how to make it?

This is how the signal looks (example)

____3.5sec___
| |
| |
___| | ________
| |
| |
|_____|
0.5 sec

Does anyone know how to make this? It must give a position (index) where the
start point of the signal is.

Best regards,
Thijs
0 Kudos
Message 1 of 6
(3,319 Views)
If this is an analog signal, you can easily do this with some array operations.

With LabVIEW 6i and later, you can even have a pattern to match. There are examples of this with the samples that shipped with LabVIEW. I suggest these. If they won't work for whatever reason, then try some array operations. You will probably have a tough time trying to create the algorithm because of the length of time.

If you create a timing diagram, you will be able to better visualize the problem. Be sure to look at your time resolution, which should be about .05 seconds or so, to get good resolution. This means you will be looking for a high that lasts 35 samples, followed by a low that lasts for about 10. The higher the resolution you use, the better.
Message 2 of 6
(3,319 Views)
First of all, thanks for your reply! I don't know which example you mean?
I've searched voor pattern match but then i get the string match which i
don't need, Maybe i can tell more about the pattern it's sampled with 500Hz,
so it is 3.5 * 500 high and then 0.5 * 500 low and then 0 again.

Thanks again for your help!

Best regard,
Thijs

"Labviewguru" schreef in bericht
news:506500000005000000E7A00000-1031838699000@exchange.ni.com...
> If this is an analog signal, you can easily do this with some array
> operations.
>
> With LabVIEW 6i and later, you can even have a pattern to match.
> There are examples of this with the samples that shipped with LabVIEW.
> I suggest these. If they won't work for whatever reason, then try
> some array oper
ations. You will probably have a tough time trying to
> create the algorithm because of the length of time.
>
> If you create a timing diagram, you will be able to better visualize
> the problem. Be sure to look at your time resolution, which should be
> about .05 seconds or so, to get good resolution. This means you will
> be looking for a high that lasts 35 samples, followed by a low that
> lasts for about 10. The higher the resolution you use, the better.
0 Kudos
Message 3 of 6
(3,319 Views)
I don't actually know where this sample is either.

I saw this feature demonstrated when LabVIEW 6 came out.

I recommend getting in contact with NI to see if they can tell you where this sample is, or search the DAQ examples or waveform samples. It may have been digital, I cannot recall.

In the meantime, start working on your own patter recognition. Its fairly easy once you get the hang of it. It involves the use of shift registers, probably lots of them, to store 'triggers'.
Message 4 of 6
(3,319 Views)
If you're talking about the mask feature that was added in 6, then there's a VI called Limit Testing Example. I use masks all of the time on captured pulses to determine if they meet specifications. The function allowed me to eliminate some very expensive scopes and use much cheaper daq cards. Besides the above mentioned example, there used to be a program on NI's web about T1 parametric testing and used masks to determine a pass/fail condition. I can't seem to find it but I've attached what I think is the original. I should give you some ideas.
0 Kudos
Message 5 of 6
(3,319 Views)
I would recommend you take a look at convolution. First, you create a pattern that represents your desired signal. Subtract the average value and reverse the order of the array. Use the convolution vi to compare your pattern to your signal. You will get a large peak when it matches. You can locate the peak using Locate Peaks. To figure out how large the peak will be and where it is within the pattern, convolve the pattern with its original signal. This will give you a magnitude to search for and an offset between the beginning of the pattern and the peak.

Bruce
Bruce Ammons
Ammons Engineering
0 Kudos
Message 6 of 6
(3,319 Views)