How make an equivalent function of unit delay in matlab

4 ビュー (過去 30 日間)
Baptiste Giroud
Baptiste Giroud 2018 年 4 月 16 日
コメント済み: Baptiste Giroud 2018 年 4 月 16 日
Hello,
I want to realise a average filter in simulink
The solution below work good, but the delay (5) is not a constant. it can be 10 or 20.
So i tried to make a matlab function in order to have this capability, but i cant find a proper delay function.
Have you got any ideas to perform this calculation?
Thanks a lot

回答 (1 件)

Birdman
Birdman 2018 年 4 月 16 日

Delay block comes with its Input Port choice within the mask in its Source. Check the attached figures.

  3 件のコメント
Birdman
Birdman 2018 年 4 月 16 日
Well, I did not understand clearly what you tried to do. I thought you want to continuously change the delay order throughout the simulation?
Baptiste Giroud
Baptiste Giroud 2018 年 4 月 16 日
Ok i sum up.
i need to set a delay paramaters ( for ex : 180ms). Once the delay is set, i need to know the states @ z^-180 to z^-1
Then, i need to sum all this values and divide the results by the delay (180)
It's what i did on the simulink at the begining of the topic. It's work but the delay is a parameter. One time it can be 180ms and the other time it can be 30ms, and i need an adaptative calculation. I dont want to set a simulink with 180 delay block and next time 30 delay block...
I hope it is more understanding for you.

サインインしてコメントする。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by