필터 지우기
필터 지우기

How can I calculate value of a signal (using MATLAB Function block of Simulink) between two time instants i.e. between 5.04 s to 5.25 s?

조회 수: 4 (최근 30일)
Actually I have a signal (figure attached) which is a frequency signal and that signal would be input to the " MATLAB Function block of Simulink" . So this input signal is not a vector, it is just a one dimension signal of 50Hz value and the value changes at 5 seconds because there is a disturbance event at 5 seconds. So eventually , I want to find the value between 5.04s to 5.25s (which is actually the rate of change of this signal between 5.04s to 5.25s). Also I don't know how many samples do I need to take between 5.04s to 5.25s in order to have accurate rate of change of this signal. Can anyone please guide or anyone have any idea how to do this using MATLAB Function block of the Simulink?
  댓글 수: 1
Mathieu NOE
Mathieu NOE 2023년 1월 2일
hello
why not using a buffer block to store the samples (for a duration of 0.2 s) then use the math block with mean(diff(u))
NB : your solver must use fixed time steps dt
the output of the math block then needs to be divided by dt to get the average slope of the frequency signal
a simpler alternative (IMHO) is to use a first order high pass filter (used as a frequency limited derivator).

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

답변 (0개)

카테고리

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

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by