HomeUse:[26304x1 double array] RawData:[26304x4 double array] atmp:[26304x1 double array] srad:[26304x1 double array] @:[1x XXXXXXXXXXuint8 array] %% Clear Everything clear clc close all %% Step 1:...

1 answer below »
The project information is attatched


HomeUse:[26304x1 double array] RawData:[26304x4 double array] atmp:[26304x1 double array] srad:[26304x1 double array] @:[1x211432 uint8 array] %% Clear Everything clear clc close all %% Step 1: Load in the raw data load('IndividualProjectData.mat') %already done for you... you're welcome :) %% Step 2: Calculate “r” at each time % hint: needs a for loop with an embedded if statement r = r_baseline; if atmp>25 r = r_baseline - (atmp - 25) * 0.0038; end %% Step 3: Calculate & plot the Energy output “E” of the system at each time H = 0.001 * srad * 3600; %solar radiation(kWh /m^2) E = array_area * H * r * pr;% Energy output(kWh) %% Step 4: Calculate & plot the amount of energy in the system’s battery in each time step %% Step 5: Calculate & plot how much energy you will need to get from the energy company to keep your house running at each time step. %% Step 6: Calculate how much money you would save over the hypothetical 3-year period by having the solar panels. %% Step 7: Make a final determination as to how long it would take to pay off your initial investment in solar panels. EGR 102 – Final Individual Project Home Solar Panels Problem Statement: Suppose you want to install a home solar system (they are all the rage after all). There are a number of questions you might start asking yourself. Such as… ● How would you know how much energy you would get from your solar panels? ● Should I buy a battery? If so, how big? ● Will I still need to buy energy from my electric company? ● How much money will I save and how long will it take to pay this off? These are all fantastic questions, but not always simple to answer. Background: First, we need to know a little bit about how solar setups work in most homes. Solar energy hitting the solar arrays/panels will generate a direct current (DC). That current is managed by something called a charge controller. The controller will decide if the energy should go to your home or to a battery based on your home’s needs. It will also ensure that the battery doesn’t overload. If the electricity is directed to your home, it must first be converted to an alternating current (AC) at the right frequency and voltage (standard American homes require 120 Volts at 60 Hertz). This is done with a machine called an inverter. After the electricity is appropriately conditioned it can be used by your home appliances. The reason we care about these intermediate steps, is that with each energy transformation, we incur losses due to some inefficiency, so we cannot assume we’ll be able to use all of the energy we get from the sun. In general, those inefficiencies can be described with the following equation: E = A * H * r * PR (Equation 1: Solar panel usable energy output) E = Energy (kWh) A = Total solar panel Area (m2) H = Solar radiation hitting the panels (kWh/m2) r = solar panel yield or efficiency(%) PR = Performance ratio (efficiency of the system of controller, inverter, and connecting cables) The problem is, we know many of these values will change radically with time. Solar radiation (H) will obviously change throughout the day, and by season as well. Additionally, the solar panel yield (r) will vary with air temperature. It usually hovers around 15% but will decrease if the panels get too hot. Because of this, it would be incredibly helpful to have some time series data to make calculations, maybe even a few years’ worth, to be able to capture the effect of the seasons. Fortunately, we have data for that! Methods: Data Collection (Already done by instructors): For this problem, we’ve aggregated 3 years’ worth of hourly data on 3 parameters we need to solve this problem. 1. The solar energy/solar flux hitting our home (H). This is actual data provided by MSU’s enviroweather station in East Lansing. Our thanks to Steve Marquie and the team at Enviroweather. 2. Air temperature also via Enviroweather. 3. Standard home energy use data in the Lansing area. Data courtesy of the National Renewable Energy Laboratory via Open EI. These datasets have been aggregated into a single .mat file for you to load into Matlab. The variable names and units are listed below. Value Name Unit Home Energy Use HomeUse kWh Air Temperature atmp Deg C Solar Flux srad W/m2 � Watch those units! Time Time Matlab Datetime Format Assumptions (Already done by instructors): To move the project forward, we will make a few assumptions about constant values. These are listed below: Variable/Constant Value Note Array Area (A) 40 m^2 Approximately 40 rooftop pannels PR 0.86 Accounts for invertor and line losses r_baseline 15% Baseline efficiency, we’ll need to adjust for temp to find the true “r” at each time Battery Capacity 14 kWh Based on Tesla home battery Price of Electricity $0.16/kWh Current average residential price in Michigan Total System Cost $20,000 Rough estimate. Includes all components and installation fees https://openei.org/datasets/dataset/commercial-and-residential-hourly-load-profiles-for-all-tmy3-locations-in-the-united-states/resource/cd6704ba-3f53-4632-8d08-c9597842fde3 Calculations & Coding Based off all of these assumptions and research we would like you to make the following calculations using a Matlab Script. Step 1: Load in the raw data Simply load in the given .mat file. This should load the 4 variables listed in table 1. Step 2: Calculate “r” at each time This will require a simple algorithm to be applied. Most r values will be equal to r_baseline (Table 2). However, if the air temperature is above 25 oC you need to apply the following equation: r = r_baseline-(atmp-25)*.0038 (Equation 2: Finding temperature adjusted r values) Step 3: Calculate & plot the Energy output “E” of the system at each time After you’ve calculated r for each time-step, this can be calculated using equation 1. Step 4: Calculate & plot the amount of energy in the system’s battery in each time step This will require you to create your own algorithm to determine what will happen to battery storage at each time step. Will it increase because you have surplus energy being produced? Will it be depleted because you aren’t producing enough energy for your home? I would recommend charting this out using a logic diagram before coding. Any such diagram would be a HIGHLY encouraged addition to your report. Step 5: Calculate & plot how much energy you will need to get from the energy company to keep your house running at each time step. It’s very possible at some times you won’t have enough energy from your battery and solar panels combined to run your home. In this case, you’ll need to buy some from the power company. Calculate at each time step if you need to buy electricity and if so, how much. Hint: this will likely require another (simple) algorithm. Step 6: Calculate how much money you would save over the hypothetical 3-year period by having the solar panels. For this piece we will assume that total energy costs are just the sum of all energy purchases (in kWh) multiplied by the assumed 16 cents/kWh value given in table 2. Do this for your solar panel scenario you’ve just built as well as a scenario in which you just bought all of your electricity from the grid. Step 7: Make a final determination as to how long it would take to pay off your initial investment in solar panels. This will just be a simple payback period calculation. Total investment divided by money saved per year. Deliverables (Due 1pm 7/1): 1. A published Matlab script that performs the above tasks. 2. A completed problem solving rubric for this problem Problem Statement: Background: Methods: Data Collection (Already done by instructors): Assumptions (Already done by instructors): Calculations & Coding Step 1: Load in the raw data Step 2: Calculate “r” at each time Step 3: Calculate & plot the Energy output “E” of the system at each time Step 4: Calculate & plot the amount of energy in the system’s battery in each time step Step 5: Calculate & plot how much energy you will need to get from the energy company to keep your house running at each time step. Step 6: Calculate how much money you would save over the hypothetical 3-year period by having the solar panels. Step 7: Make a final determination as to how long it would take to pay off your initial investment in solar panels. Deliverables (Due 1pm 7/1):
Answered Same DayJun 29, 2021

Answer To: HomeUse:[26304x1 double array] RawData:[26304x4 double array] atmp:[26304x1 double array]...

Mithun answered on Jun 30 2021
131 Votes
%% Clear Everything
clear
clc
close all
%% Step 1: Load in the raw data
load('IndividualProjectData.mat') %alre
ady done for you... you're welcome :)
array_area=40; %Array area
pr=0.86; %Accounts for invertor and line losses
r_baseline=0.15; %Baseline efficiency, we’ll need to adjust for temp to find the true “r” at each time
Battery_Capacity=14; %kWh Based on Tesla home battery
Price_of_Electricity=0.16; %/kWh Current average residential price in Michigan
Total_System_Cost=2000; %Total investment for solar panel
E= zeros(1,size(atmp,1)); %Variable initialization
%% Step 2: Calculate “r” at each time
% hint: needs a for loop with an embedded if statement
for i=1:size(atmp,1)
r = r_baseline;
if atmp(i)>25
r = r_baseline - (atmp(i) - 25) * 0.0038;
end
%% Step 3: Calculate & plot the Energy output “E” of the system at each time
H = 0.001 * srad(i) * 3600; %solar radiation(kWh /m^2)
E(i) = array_area * H * r * pr; % Energy output(kWh)
end
%Plot The energy "E" of the sytem at each time
figure
plot(Time, E)
title('The Energy output “E” of the system at each time')
xlabel('Time')
ylabel('Energy E(kWh)')
%% Step 4:...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here