Error compiling Simscape network for model Loss_BuckConverter
2 次查看(过去 30 天)
显示 更早的评论
I am getting the following error message while running 'Loss_BuckConverter' obtained from matlab file exchange, which was selected as the best pick that week. I would like to run the model. Could you please help in solving the error. Thank you.
Error compiling Simscape network for model Loss_BuckConverter.
Caused by:
['Loss_BuckConverter/Simscape Thermal Model/Thermal Mass (Case)']: Type mismatch for equation. The left hand side of the equation is {[1x1 double], 'C'} and the right hand side of the equation is {[1x1 double], 'K'}. In foundation.thermal.elements.mass (line 33)
T = {[1x1 double], 'C'}
M.T = {[1x1 double], 'K'}
1 个评论
Philipe Pereira
2024-9-6
In the tab "variables", change Temperature unit in both masses to Kelvin, and sum 273 to Tinit
回答(1 个)
Kothuri
2024-10-21
The error message you are encountering in the Loss_BuckConverter Simulink model is due to a unit mismatch in the thermal domain in the Simscape network. The issue arises because the temperature on one side of the equation is in degrees Celsius ('C'), while the other side is in Kelvin ('K').
You can follow the below steps:
- The error message points to the block 'Loss_BuckConverter/Simscape Thermal Model/Thermal Mass (Case)'. This block has a mismatch between the temperature units.
- Simscape expects consistent units across connected blocks. Here, the thermal mass block (representing the "Case") has a temperature defined in Celsius ('C'), but it is trying to interact with another block (or the system) that uses Kelvin ('K').
- To resolve this issue, you can use a unit conversion block to convert the temperature from Celsius to Kelvin.
- “Temperature Conversion” block and place it between the source and the thermal mass block. This block converts the temperature units from one unit to the desired unit.
You can refer the below link for more info on “Temperature Conversion” block
- You can modify the equation inside the block where the temperature mismatch occurs to handle the unit conversion manually. For Celsius to Kelvin, the conversion is T(K) = T(C) + 273.15.
- Open the 'Thermal Mass (Case)' block in the model. Check the parameter where the temperature is specified and ensure that the units are consistent with the rest of the model. If one part of the system is using Kelvin, you should set the thermal mass block to also use Kelvin.
In this way you can rectify the error.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Trimming and Linearization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!