Error compiling Simscape network for model Loss_BuckConverter
3 ビュー (過去 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!