필터 지우기
필터 지우기

online signal peak detection

조회 수: 5 (최근 30일)
Rahim Yousefi
Rahim Yousefi 2021년 4월 15일
댓글: Rahim Yousefi 2021년 4월 15일
Hello,
I have a script for reading sensor data from a gas sensor. The sensors are connected to an Arduino, I read the data from Arduino through Matlab. Attached you can find my Matlab script. The sensor generates a signal which has a peak every 5 minutes. I want to detect the point where the signal starts to increase and the point where the signal starts to increase (the min and max value of the peak). I want to perform this online (real time). The method I perform for peak detection is: I check the last 6 values of the sensor and if there is a increase in the last three values, I detect a min value and if there is an increase of the last three values, I detect an max value (this part of the script starts from line 263). However this method is not accurate and doesn’t work well sometimes. Could anyone recommend a better way of peak detection?
I have also attached an excel file so you can see how the data of the sensor look like.
Thanks in advance

답변 (1개)

Ahmed Redissi
Ahmed Redissi 2021년 4월 15일
If you have the Signal Processing Toolbox, try using the function "findpeaks". Here's how to use it:
  댓글 수: 1
Rahim Yousefi
Rahim Yousefi 2021년 4월 15일
Thank you for your answer, but as I mentioned I want to perform an online (real time) peak detection. This is not possible with the Matlab signal processing toolbox.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by