How can I integrate PDE tools [for 2D heat transfer] into a Simulink model?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am currently attempting to integrate a Simulink battery model, with a heat transfer model generated in the pdetool, to understand the heat profile of a battery cell with varying input current.
My approach was to combine the code into Simulink using a 'Matlab function' block, however this results in the Matlab code [from pdetool] attempting to create a new mesh being at each time step, which ultimately leads to model failure.
Does a more suitable approach exist to this problem?
Many Thanks
0 comentarios
Respuestas (1)
Deepak Ramaswamy
el 28 de Oct. de 2013
Editada: Deepak Ramaswamy
el 28 de Oct. de 2013
Wasim,
Assuming that your heat transfer model is LTI, I would recommend extracting system matrices from your PDE model and converting them into ABCD matrices i.e. a state-space form. The question then becomes how to take this state-space representation into Simulink. If you own the Control Systems toolbox you can use the "ss" function in it to convert into a state-space block. I find this approach easy but there are other approaches as well such as using the ABCD block from Simulink or wrapping the SS model using a level-2 S-function.
The advantage of the approach is that it is efficient since the mesh is same and you avoid matrix assembly time. However as a first pass, you might just try creating your mesh once and saving it and perform the rest of operations as you are currently doing.
I find it curious that the mesh is different at each step since the only thing that you're changing is the input. The floating point arithmetic should exactly reproduce the mesh each time. Are you sure you are not changing any geometry parameters?
If you need more info on any of the above steps let me know
Deepak
0 comentarios
Ver también
Categorías
Más información sobre Geometry and Mesh en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!