Programming Homework Help

Programming Homework Help. Application of the Compute Energy Function Project

I’m working on a mathlab project and need an explanation to help me understand better.

This question is two parts midterm and a final. I have completed the midterm part and the final is based on the midterm. You will need to review the midterm solution and make changes to make it solve the final.

MIDTERM QUESTION: (This question is solved and the solution is attached)

On March 16th, 2021, CNBC reported that the Solar Energy Industries Association and Wood Mackenzie found that the solar industry added a record 19.2 gigawatts of new capacity during 2020, a 43% jump from 2019. This drastic increase in the use of solar panel technology is creating ample opportunities for engineers to evaluate the cost and efficiency of residential and commercial solar power systems.

1. Write a function named computeEnergy that takes in as input the number of panels and computes 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 (a picture of the formula is attached), where t is an array of values from 1 to 24 hours.

2. After your computeEnergy function calculates how much energy is produced per day, it should call another user-defined function named weatherVariance. The weatherVariance function should create a 24×7 dimension matrix of random numbers between 0.8 and 1. This represents 24 hours of varying weather conditions that affect the solar production of the panel for seven days. Using matrix multiplication with the appropriate dimensions, (you will need to create another 24×7 matrix containing a week’s worth of daily energy production), multiply the energy production by the weather variance matrix element-wise to simulate weather.

3. The data for the weekly energy usage by the home is provided (I will send a link to download this file). (we will use this see if we produce enough energy). In your main function, define a variable to store the number of solar panels. Keep track of the total energy produced by the solar panel(s) in a week, starting with one panel. After the week, if the generated solar energy is less than the energy usage of the home, then increase the number of panels by one, run the computeEnergy function again, compare with the energy used and decide if more panels need to be added. This should be done in a while loop. The usage data is formatted in a 24×7 dimension matrix, corresponding to seven days worth of 24 hours of hourly energy use in kilo-Watt-hours.

4. Produce a 4×2 subplot of solar energy produced and used per day for the week. The eighth plot should be the daily difference between energy produced and energy used for the week. Label all plots appropriately.

5. Report to the user how many panels are required to fulfill the energy needs for the home.

FINAL QUESTION: (You will need to modify the midterm solution to make it solve this question)

Introduction

To build upon the Solar Energy Midterm Project, we will be synthesizing what we have learned in the previous modules to develop an electrical engineering software tool for a typical residential home in Southern California.

Guidelines and Deliverables

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 computeEnergy 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(t12)21.52πf(t)=e(t12)21.52π (I have attached a picture of this equation so you can see it better)

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 (Links to an external site.)

Turn-in Instructions

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.


Programming Homework Help

 
"Our Prices Start at $11.99. As Our First Client, Use Coupon Code GET15 to claim 15% Discount This Month!!"