Error compiling Simscape network for model Loss_BuckConverter

2 views (last 30 days)
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 Comment
Philipe Pereira
Philipe Pereira on 6 Sep 2024
In the tab "variables", change Temperature unit in both masses to Kelvin, and sum 273 to Tinit

Sign in to comment.

Answers (1)

Kothuri
Kothuri on 21 Oct 2024
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.

Categories

Find more on Trimming and Linearization in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!