Error compiling Simscape network for model Loss_BuckConverter

조회 수: 2 (최근 30일)
Shyam
Shyam 2021년 11월 5일
답변: Kothuri 2024년 10월 21일
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
Philipe Pereira 2024년 9월 6일
In the tab "variables", change Temperature unit in both masses to Kelvin, and sum 273 to Tinit

댓글을 달려면 로그인하십시오.

답변 (1개)

Kothuri
Kothuri 2024년 10월 21일
Hi Shyam,
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.

카테고리

Help CenterFile Exchange에서 Trimming and Linearization에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by