필터 지우기
필터 지우기

peak to peak amplitude comparison

조회 수: 11 (최근 30일)
gigi
gigi 2019년 10월 7일
댓글: Daniel M 2019년 10월 7일
My system measures the speeds of two shafts with quarature encoders. As you can see from the below graph their speeds are fluctuating (I also upload the measurement data).
Capture.JPG
I need to compare the peak to peak amplitudes of these two shaft speeds in a Simulink model (in Real-time).
I tried to find max and the min values, so I used "Find Extrama" block but it gaves error as "o find a peak the input must have three or more samples per channel".
Same error is also seen when I used findpeaks command in Matlab Function block.
Thanks in advance for any help.

채택된 답변

Daniel M
Daniel M 2019년 10월 7일
You can't find the peak of a single data point. It is telling you to provide more data points in order for the function to work. You can use the buffer block in simulink to build-up some data points. I suggest 1 period of the oscillation, so it can capture both the max and min of the signal. Note however, that this adds a latency to your real-time model (not that it isn't still real-time in terms of throughput). I'm not familiar enough with Simulink to provide another solution.
  댓글 수: 4
gigi
gigi 2019년 10월 7일
편집: gigi 2019년 10월 7일
as you know, my main aim is to calculate the amplitudes and whenever l succeed with this suggestion l will accept it for sure.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Scopes and Data Logging에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by