Jump to content
ASTDan

Algorithm for Counting AC Events

Recommended Posts

Hello,

 

I am trying to develop an algorithm that counts the amplitude of AC "events" (see attached screen shot)

 

post-8614-0-13693800-1377618980.png

 

In the graph there are 3 events.  Does anybody have any idea on how to detect this?

 

Thanks

 

Dan

Share this post


Link to post
Share on other sites

Here is one simple implementation using a Hilbert Transform and taking a derivative of the envelope. Here's some reading that covers way more about this transform than matters for this discussion, but has a nice picture at the bottom of page 8.

Something similar could be done with the ptbypt RMS suggestion you have on your dark side thread.. Take what you want from it.

hDFeuRR.png

  • Like 1

Share this post


Link to post
Share on other sites
Use the AC & DC Estimator VI to measure Vrms and just note when Vrms changes.

 

If you went this route you could replace the hilbert function with this implementation in what I sent you and still capture the transitions in a similar fashion.  Lots of options.

Share this post


Link to post
Share on other sites

This Hilbert code doesn't cope well with changing the amplitudes (try 3, 7, 10), nor with a different first and last amplitude.  

Share this post


Link to post
Share on other sites

Try adjusting the thresholds on the peak detection..  I debated including a graph of the derivative or not. It will behave differently than the RMS, and I'm not even suggesting it is the best option, but it can be useful.

Share this post


Link to post
Share on other sites
If you went this route you could replace the hilbert function with this implementation in what I sent you and still capture the transitions in a similar fashion.  Lots of options.

 

I wouldn't. I'd just take rate of change (dy/dx) of the Vrms and if it went outside a value, count the event (assuming it's a bit noisy and not zero when unchanging).

Share this post


Link to post
Share on other sites

I tried using a high pass filter and achieved some interesting results.  I will be using real data soon, I will let everyone know the results I get.

 

Thanks

Share this post


Link to post
Share on other sites

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.