writing a function that contains iteration and differential equations
8 views (last 30 days)
Show older comments
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!
0 Comments
Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!