Simulate recursive function in simulink

I want to solve the point kinetic equations in simulink as given below
where rho, beta, lamda are all constants. I need to know the method of simulating recursive functions in simulink

댓글 수: 4

Aquatris
Aquatris 2024년 9월 20일
This looks like a simple ODE. Which part do you think is the recursive function here?
Gary
Gary 2024년 9월 20일
The second equation is used in first , the value of Ci and n(t) from the first equation is used in second. btw i varies from 1 to 6.
I do not believe that Simulink can handle recursion, except that a MATLAB Function Block can potentially be coded recursively.
Paul
Paul 2024년 9월 20일
Agree with @Aquatris. This looks like an ODE with state variables n(t) and C_i(t), i = 1-6. Any instant in time the states are known and can be use to compute the state derivatives.

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

답변 (1개)

Aquatris
Aquatris 2024년 9월 20일

0 개 추천

I did not care about the dimensions at all while creating the simulink model so some adjustment might be necessary but this is one way to do it. Keep in mind you can represent [ sum of lamda_i * c_i ] as a matrix multiplication , i.e.,

댓글 수: 2

Gary
Gary 2024년 9월 21일
I was looking for physical implementation of this equation in some kind of hardware (not just behavioural one). I mean to have 6 groups of equations culminating in final generation of n(t). Is that possible in simulink?
Aquatris
Aquatris 2024년 9월 23일
It is possible with the Simulink model I shared. 6 equation means you will be doing matrix algebra, that is about the only difference in implementation between a single state model and multi-state model.

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

카테고리

도움말 센터File Exchange에서 General Applications에 대해 자세히 알아보기

제품

릴리스

R2019a

질문:

2024년 9월 20일

댓글:

2024년 9월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by