writing a function that contains iteration and differential equations

6 vues (au cours des 30 derniers jours)
Q Dong
Q Dong le 21 Nov 2017
Hello. I have some problems writing a function that contains iteration and differential equations. I want to simulate the resistance of a type of material that consists of 5 layers(5 material). There are 3 variables of each layer. Temperature. Resistance and Current. To get the Temperature of each layers, 5 differential equations are to be solved. The format of the equations are like this: dT1/dt= I1*R1+ aT1+ bT2 + c lower case abc represent constant. dT2/dt= I2*R2+ aT2+ bT3 + c dT3/dt= I3*R3+ aT3+ bT4 + c dT4/dt= I4*R4+ aT4+ bT3+ cT2 + d dT5/dt= I5*R5+ aT5 + c
And for Resistance. R1=aT1+b R2=aT2+b R3=aT3+b R4=aT4+b R5=aT5+b It is a linear function. for Current flowing through each layer I=I_outside/R_equivalent It is a inverse function that depends on Resistance. I_outside is the current from a current source model connected to the function.
I have tried to use persistent variable to define I R T or put a memory block between the output and input of my function block, but can't get the right result.
Does anyone have similar experience and could help me to solve it. my email is: sth_special@ 163.com
MANY THANKS!

Réponses (0)

Catégories

En savoir plus sur 一般应用领域 dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!