Programming Homework Help
SDSU Estimating Daily Energy Production of Solar Panel in A Week MATLAB Project
As usual, create a script, include a comment at the top explaining the purpose of the script, your name, and the date it was created. The goal of this project is to estimate the daily energy production over a week of a typical residential solar panel, compare it to the energy usage of a home and determine how many solar panels are required to fulfill the energy needs of the residence.
1. For the midterm project, your compute Energy function took in as input the number of panels and computed the amount of energy produced in a typical day. The amount of energy produced by a panel depends on the time of day and can be modeled by the mathematical formula below, where t is an array of values from 1 to 24 hours.
f(t)=e?(t?12)21.52??f(t)=e?(t?12)21.52?
Update computeEnergy( ) to perform this task symbolically. Use the built in integral function, int( ) to find the kilo-Watt-hours produced in a day. Plot your integral function from 0 to 24 hours.
2. From the midterm project, you wrote code to calculate how many panels would be required to fulfill the energy needs for a home. Suppose an inverter device is needed for each panel in the array and is connected in parallel to one power source. The video below shows how to use linear algebra in MATLAB to solve for the current in each branch containing an inverter. Write a function called findCurrents( ) that takes in as input the number of panels you computed in the midterm project and returns a vector of currents in each branch. Let the source voltage, Vs, be 100V and the value of each resistance be 1500 ohms. Video: How to solve a system of linear equations corresponding to circuit currents in MATLAB
You will need to submit .m files for each function you define. Each .m file should include your name and function description in the comments