필터 지우기
필터 지우기

Sliding window on Simulink

조회 수: 3 (최근 30일)
Juan Diego Rios Penaloza
Juan Diego Rios Penaloza 2020년 1월 15일
Hello everybody.
I need to implement a sliding window in Simulink to obtain certain ammount of past data in a vectorial form. If we take as example the "Moving average" block in the sliding window mode, what I need is the vector of which the average is calculated.
In case you need more information, what I precisely need to do is the following. I have a (discrete) current of which I want to get the last 5 milliseconds at a certain precise instant of the simulation, when I get a pickup signal of an electrical protection. I need this current in Matlab while the simulation is running. By now, I'm doing so by reading the current (as input signal of an S-function) at each step time since the beginning of the simulation and I'm putting all the information in a vector. This is of course time-consuming. Instead of reading at each step time (the time step is 1e-6 s), I'd prefer to read just in one shot, the whole 5 last milliseconds current data (maybe in a vector or something) when the pickup signal gets activated.
I think there might be an easy way to do so.
Thank you.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Switches and Breakers에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by