Question
MATLAB The power output of a solar cell varies with the voltage it supplies and the temperature it operates at. The following model relates the
MATLAB
The power output of a solar cell varies with the voltage it supplies and the temperature it operates at. The following model relates the Voltage at which a solar cell produces maximum power (V_mp) to the operating temperature (T) and the open circuit voltage (V_OC), which is characteristic of a particular cell.
The parameters q and k_B are the charge on an electron (q = 1.6022E-19 Coulombs) and the Boltzmann constant (k_B = 1.3806E-23 Joules/Kelvin). Write a function that outputs the Voltage(s) for maximum power output (V_mp) given an input vector of one or more temperatures and the open circuit voltage of the solar cell. The function should accept the following inputs (in order):
1. A vector of one or more operating temperatures (T) in degrees Kelvin.
2. The open circuit voltage (V_OC) in Volts.
3. An initial guess for the numerical solution of V_mp in Volts.
4. A stopping criterion for the numerical solution.
Your function should use fzero along with the input initial guess and stopping criterion to solve for V_mp corresponding to each value in the input vector of temperatures. Your function should have two outputs (in order):
1. A column vector of V_mp values corresponding to the input vector of operating temperatures.
2. A column vector of residual values associated with the numerical solution for each value of V_mp.
Has to start like this:
function [V_mp, V_mp_residual] = student_solution(T, V_OC, V_mp_guess, es)
Please copy and paste your code.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started