How can I detect peaks in real time with using Simulink?

63 views (last 30 days)
ali ihsan taran
ali ihsan taran on 1 Feb 2018
Answered: Rodney Case on 12 Mar 2019
Hello I have really strong issue with this topic. I have searched and examined several articles about peak detection in real time with using simulink. However I couldn't find suitable algorithm etc. Actually I am asking that algorithm but it would be better if anyone has worked this with Simulink. By the way I know about Matlab Function in Simulink but my problem is I couldn't adapt that in real time. Any comments or ideas will be fine. Many thanks in advance.

Answers (2)

Rodney Case
Rodney Case on 12 Mar 2019
I had a similar problem. Here's how I approached it. I have a periodic signal where the fundamental frequency is known a priori. I want to output the peak-to-peak amplitude for the most recent period of the fundamental frequency as it evolves throughout my simulation. I used a Tapped Delay block in Simulink to sample the signal and output the most recent n samples. I chose the sample period for the block such that the block output will always contain slightly more than 1 full period at the fundamental frequency. Consequently, the Tapped Delay block contains n samples for 1 period of the fundamental frequency. Then, I used max and min blocks to get the highest and lowest values from the Tapped Delay. The difference between these two values is the peak-to-peak amplitude of the most recent fundamental period but I also have access to the most recent peak values. Sampling the peak-to-peak amplitude signal at the fundamental frequency provides a nice clean history of peak-to-peak values for plotting.

Abhishek Ballaney
Abhishek Ballaney on 5 Feb 2018
https://in.mathworks.com/help/dsp/ref/peakfinder.html
  1 Comment
ali ihsan taran
ali ihsan taran on 5 Feb 2018
Thank you for your respond. I expected algo but I will try that as soon as I can.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!