Skip to content

Commit 948ed3d

Browse files
Merge pull request #1 from shachindra1980/master
R2023b Version
2 parents 224c2da + 3e05537 commit 948ed3d

14 files changed

+408
-36
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# For details about the syntax of this file, see
1010
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
1111

12-
# Copyright 2024 The MathWorks, Inc.
12+
# Copyright 2024-25 The MathWorks, Inc.
1313

1414
name: CI using MATLAB
1515

@@ -47,7 +47,7 @@ jobs:
4747
- name: Setup MATLAB
4848
uses: matlab-actions/setup-matlab@v1
4949
with:
50-
release: R2023a
50+
release: R2023b
5151

5252
- name: Run tests
5353
uses: matlab-actions/run-command@v1
-1.92 KB
Binary file not shown.
60 Bytes
Binary file not shown.

Overview/ResidentialBuildingTESandPVcell.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
%% Residential Building Heating with TES and PV
22
%
3-
% Copyright 2023 - 2024 The MathWorks, Inc.
3+
% Copyright 2023 - 2025 The MathWorks, Inc.
44

55
%% Model Overview
66
% The residential heating model comprises a rooftop photovoltaic (PV) panel

Overview/blockDescriptionTES.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
%
33
% <<maskIcon.png>>
44
%
5-
% Copyright 2023 - 2024 The MathWorks, Inc.
5+
% Copyright 2023 - 2025 The MathWorks, Inc.
66

77
%% Description
88
% The Sand Battery block models a thermal energy storage by using sand as the energy storage medium.

Overview/html/ResidentialBuildingTESandPVcell.html

Lines changed: 91 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1-
2-
<!DOCTYPE html
3-
PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4-
<html><head>
5-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6-
<!--
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2+
<html>
3+
<head>
4+
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
5+
<!--
76
This HTML was auto-generated from MATLAB code.
87
To make changes, update the MATLAB code and republish this document.
9-
--><title>Residential Building Heating with TES and PV</title><meta name="generator" content="MATLAB 9.14"><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.date" content="2024-11-26"><meta name="DC.source" content="ResidentialBuildingTESandPVcell.m"><style type="text/css">
8+
-->
9+
<title>Residential Building Heating with TES and PV</title>
10+
<meta name="generator" content="MATLAB 23.2">
11+
<link rel="schema.DC" href="http://purl.org/dc/elements/1.1/">
12+
<meta name="DC.date" content="2025-12-11">
13+
<meta name="DC.source" content="ResidentialBuildingTESandPVcell.m">
14+
<style type="text/css">
1015
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}:focus{outine:0}ins{text-decoration:none}del{text-decoration:line-through}table{border-collapse:collapse;border-spacing:0}
1116

1217
html { min-height:100%; margin-bottom:1px; }
@@ -67,11 +72,85 @@
6772

6873

6974

70-
</style></head><body><div class="content"><h1>Residential Building Heating with TES and PV</h1><!--introduction--><!--/introduction--><h2>Contents</h2><div><ul><li><a href="#1">Model Overview</a></li><li><a href="#4">Model Subsystems</a></li><li><a href="#8">Set Model Parameters</a></li></ul></div><h2 id="1">Model Overview</h2><p>The residential heating model comprises a rooftop photovoltaic (PV) panel for charging the thermal battery, a thermal energy storage for storing renewable energy, a hot water tank for storing hot water, a heat exchanger (HEX) for heating the water, a pump for supplying hot water to the house, and an air blower for taking out the stored heat from the thermal battery.</p><p>To increase the efficiency of the system PV panels, the model recovers the heat by circulating the water through the channels below the PV panels. The Control subsystem controls the water pump and air blower pressure to achieve the set temperature of the hot water tank. The subsystem also operates the flow control valve. The flow control valve allows the water to flow towards the PV panels that are hotter than the tank temperature.</p><p><img vspace="5" hspace="5" src="thermalEnergyStorageDesignOverview_01.png" alt=""> </p><h2 id="4">Model Subsystems</h2><p><b>Photovoltaic Panel Subsystem</b></p><p>The Photovoltaic panel subsystem models the solar battery that converts the sunlight into electricity. The subsystem uses a Solar Cell block that allows you to choose a pre-parameterized PV component.</p><p><b>MPPT Converter Subsystem</b></p><p>The PV panel produces a power as a function of the load resistance that connects to the panel. To maximize the power that the PV panels produce when they connect to the heating coil network of a given resistance, you require an MPPT converter. This picture shows equivalent circuit of MPPT.</p><p><img vspace="5" hspace="5" src="MPPTcircuit.png" alt=""> </p><p>The MPPT Converter subsystem receives two inputs:</p><div><ul><li>The net heating coil resistance that connects to the PV panel <img src="ResidentialBuildingTESandPVcell_eq08783089781685090913.png" alt="$R_L$" style="width:17px;height:13px;"></li><li>The Voltage <img src="ResidentialBuildingTESandPVcell_eq10400070808277276123.png" alt="$V_m$" style="width:17px;height:13px;"> at which the PV panel produces the maximum power.</li></ul></div><p>PV panel suppliers provide the value of <img src="ResidentialBuildingTESandPVcell_eq10400070808277276123.png" alt="$V_m$" style="width:17px;height:13px;"> in the product datasheet. To maximize the PV power, the MPPT sets the voltage across the panel to <img src="ResidentialBuildingTESandPVcell_eq10400070808277276123.png" alt="$V_m$" style="width:17px;height:13px;">. If the current from the PV panel is <img src="ResidentialBuildingTESandPVcell_eq04234782492993571773.png" alt="$I_m$" style="width:15px;height:13px;">, then the power that the PV panel produces is equal to <img src="ResidentialBuildingTESandPVcell_eq14958545416380561496.png" alt="$V_m*I_m$" style="width:47px;height:13px;">.</p><p>The heater coil dissipates a power equal to <img src="ResidentialBuildingTESandPVcell_eq14440076464137941470.png" alt="$V_L^2/R_L$" style="width:43px;height:17px;">.</p><p>To calculate the MPPT terminal voltage, the MPPT Converter subsystem equates the two powers and solve for <img src="ResidentialBuildingTESandPVcell_eq13778725294678372914.png" alt="$V_L$" style="width:12px;height:11px;">:</p><p><img src="ResidentialBuildingTESandPVcell_eq05957124644736009177.png" alt="$V_L \ =\ \sqrt{V_m \times I_m \times R_L }$" style="width:147px;height:15px;">.</p><p><b>Residential Unit Subsystem</b></p><p>The Residential Unit subsystem comprises an electrical resistor to model the household power consumption and a thermal network to model the temperature variation of the rooms. Hot water radiators heat the rooms when the outside atmosphere temperature drops below the room set point temperature. The roof of the rooms thermally connects to the PV panel. The floor of the rooms thermally connects to the TES by using a Conductive Heat Transfer block.</p><p><b>Thermal Energy Storage Subsystem</b></p><p>To model the sand battery, the Thermal energy storage subsystem uses a Sand TES custom block. To learn more about the custom block, see <a href="matlab:web('blockDescriptionTES.html')">Sand Battery</a></p><h2 id="8">Set Model Parameters</h2><div><ul><li><a href="matlab:open('ThermalBatterySetParam.m')">Set Thermal Battery Parameters</a></li><li><a href="matlab:open('residentialUnitSetParam.m')">Set Residential Unit Parameters</a></li></ul></div><p class="footer">Copyright 2023 - 2024 The MathWorks, Inc.<br><a href="https://www.mathworks.com/products/matlab/">Published with MATLAB&reg; R2023a</a><br></p></div><!--
75+
</style>
76+
</head>
77+
<body>
78+
<div class="content">
79+
<h1>Residential Building Heating with TES and PV</h1>
80+
<!--introduction-->
81+
<!--/introduction-->
82+
<h2>Contents</h2>
83+
<div>
84+
<ul>
85+
<li>
86+
<a href="#1">Model Overview</a>
87+
</li>
88+
<li>
89+
<a href="#4">Model Subsystems</a>
90+
</li>
91+
<li>
92+
<a href="#8">Set Model Parameters</a>
93+
</li>
94+
</ul>
95+
</div>
96+
<h2 id="1">Model Overview</h2>
97+
<p>The residential heating model comprises a rooftop photovoltaic (PV) panel for charging the thermal battery, a thermal energy storage for storing renewable energy, a hot water tank for storing hot water, a heat exchanger (HEX) for heating the water, a pump for supplying hot water to the house, and an air blower for taking out the stored heat from the thermal battery.</p>
98+
<p>To increase the efficiency of the system PV panels, the model recovers the heat by circulating the water through the channels below the PV panels. The Control subsystem controls the water pump and air blower pressure to achieve the set temperature of the hot water tank. The subsystem also operates the flow control valve. The flow control valve allows the water to flow towards the PV panels that are hotter than the tank temperature.</p>
99+
<p>
100+
<img vspace="5" hspace="5" src="thermalEnergyStorageDesignOverview_01.png" alt=""> </p>
101+
<h2 id="4">Model Subsystems</h2>
102+
<p>
103+
<b>Photovoltaic Panel Subsystem</b>
104+
</p>
105+
<p>The Photovoltaic panel subsystem models the solar battery that converts the sunlight into electricity. The subsystem uses a Solar Cell block that allows you to choose a pre-parameterized PV component.</p>
106+
<p>
107+
<b>MPPT Converter Subsystem</b>
108+
</p>
109+
<p>The PV panel produces a power as a function of the load resistance that connects to the panel. To maximize the power that the PV panels produce when they connect to the heating coil network of a given resistance, you require an MPPT converter. This picture shows equivalent circuit of MPPT.</p>
110+
<p>
111+
<img vspace="5" hspace="5" src="MPPTcircuit.png" alt=""> </p>
112+
<p>The MPPT Converter subsystem receives two inputs:</p>
113+
<div>
114+
<ul>
115+
<li>The net heating coil resistance that connects to the PV panel <img src="ResidentialBuildingTESandPVcell_eq08783089781685090913.png" alt="$R_L$" style="width:17px;height:13px;"></li>
116+
<li>The Voltage <img src="ResidentialBuildingTESandPVcell_eq10400070808277276123.png" alt="$V_m$" style="width:17px;height:13px;"> at which the PV panel produces the maximum power.</li>
117+
</ul>
118+
</div>
119+
<p>PV panel suppliers provide the value of <img src="ResidentialBuildingTESandPVcell_eq10400070808277276123.png" alt="$V_m$" style="width:17px;height:13px;"> in the product datasheet. To maximize the PV power, the MPPT sets the voltage across the panel to <img src="ResidentialBuildingTESandPVcell_eq10400070808277276123.png" alt="$V_m$" style="width:17px;height:13px;">. If the current from the PV panel is <img src="ResidentialBuildingTESandPVcell_eq04234782492993571773.png" alt="$I_m$" style="width:15px;height:13px;">, then the power that the PV panel produces is equal to <img src="ResidentialBuildingTESandPVcell_eq14958545416380561496.png" alt="$V_m*I_m$" style="width:47px;height:13px;">.</p>
120+
<p>The heater coil dissipates a power equal to <img src="ResidentialBuildingTESandPVcell_eq14440076464137941470.png" alt="$V_L^2/R_L$" style="width:43px;height:17px;">.</p>
121+
<p>To calculate the MPPT terminal voltage, the MPPT Converter subsystem equates the two powers and solve for <img src="ResidentialBuildingTESandPVcell_eq13778725294678372914.png" alt="$V_L$" style="width:12px;height:11px;">:</p>
122+
<p>
123+
<img src="ResidentialBuildingTESandPVcell_eq05957124644736009177.png" alt="$V_L \ =\ \sqrt{V_m \times I_m \times R_L }$" style="width:147px;height:15px;">.</p>
124+
<p>
125+
<b>Residential Unit Subsystem</b>
126+
</p>
127+
<p>The Residential Unit subsystem comprises an electrical resistor to model the household power consumption and a thermal network to model the temperature variation of the rooms. Hot water radiators heat the rooms when the outside atmosphere temperature drops below the room set point temperature. The roof of the rooms thermally connects to the PV panel. The floor of the rooms thermally connects to the TES by using a Conductive Heat Transfer block.</p>
128+
<p>
129+
<b>Thermal Energy Storage Subsystem</b>
130+
</p>
131+
<p>To model the sand battery, the Thermal energy storage subsystem uses a Sand TES custom block. To learn more about the custom block, see <a href="matlab:web('blockDescriptionTES.html')">Sand Battery</a>
132+
</p>
133+
<h2 id="8">Set Model Parameters</h2>
134+
<div>
135+
<ul>
136+
<li>
137+
<a href="matlab:open('ThermalBatterySetParam.m')">Set Thermal Battery Parameters</a>
138+
</li>
139+
<li>
140+
<a href="matlab:open('residentialUnitSetParam.m')">Set Residential Unit Parameters</a>
141+
</li>
142+
</ul>
143+
</div>
144+
<p class="footer">Copyright 2023 - 2025 The MathWorks, Inc.<br>
145+
<a href="https://www.mathworks.com/products/matlab/">Published with MATLAB&reg; R2023b</a>
146+
<br>
147+
</p>
148+
</div>
149+
<!--
71150
##### SOURCE BEGIN #####
72151
%% Residential Building Heating with TES and PV
73152
%
74-
% Copyright 2023 - 2024 The MathWorks, Inc.
153+
% Copyright 2023 - 2025 The MathWorks, Inc.
75154
76155
%% Model Overview
77156
% The residential heating model comprises a rooftop photovoltaic (PV) panel
@@ -143,4 +222,6 @@
143222
% * <matlab:open('residentialUnitSetParam.m') Set Residential Unit Parameters>
144223
%
145224
##### SOURCE END #####
146-
--></body></html>
225+
-->
226+
</body>
227+
</html>

0 commit comments

Comments
 (0)