Jump to content

Find a waveform shape


Recommended Posts

Hi to ALL,

How can I determine a shape of a waveform? You know the waveforms could have different shapes, I mean sine, triangle, swatooth and so on. I know the input waveform and I want to build a function that return the shape (as a string or enum data) of the input waveform. How can I do that?

Take the FFT of the signal. It works out best if you take full periods rather than fractional periods. Then looking at the magnitude of the FFT, you can decipher what it is. Typically with some sort basic algorithm. A sine will have a single tone, a square will look like the sinc(x) funtion, etc.

Another option is a "matched" filter. Essentially make a filter that will cancel out the all signals except the one you are trying to detect. Typically this is done by finding the impulse response for each of your signals, then convolving them through one by one till you find your match. These work well if you know ahead of time what you are expecting.

Good luck.

Link to comment

I think his mean is how to display the name of the known input waveform, i.e, if the input waveform is a triangle, then there is a string(or enum) of "triangle" should be displayed on diaplay indicator.

If so, maybe you'll have to know first the unique features for each waveform and then distinguish them by these features.

Oh, Sorry, I didn't read GoGators's reply carefullyfrusty.gif , GoGators has given a solution to this problem. so please ignore this post.

Edited by Seraph
Link to comment

Thank you to all for your replies.

I resolved the problem inserting in the NI_ChannelName attribute the name of the waveform I had built with a specific function. I'm showing the NI_ChannelName that contain the name of the waveform shape into a string indicator on the FP. It works good.

Thanks again for your replies.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.