Simulate recursive function in simulink

18 visualizaciones (últimos 30 días)
Gary
Gary el 20 de Sept. de 2024
Comentada: Aquatris el 23 de Sept. de 2024
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 comentarios
Walter Roberson
Walter Roberson el 20 de Sept. de 2024
I do not believe that Simulink can handle recursion, except that a MATLAB Function Block can potentially be coded recursively.
Paul
Paul el 20 de Sept. de 2024
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.

Iniciar sesión para comentar.

Respuestas (1)

Aquatris
Aquatris el 20 de Sept. de 2024
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 comentarios
Gary
Gary el 21 de Sept. de 2024
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 el 23 de Sept. de 2024
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.

Iniciar sesión para comentar.

Categorías

Más información sobre Naming Conventions en Help Center y File Exchange.

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by