Question: MATLAB FUNCTION SCRIPT The power output of a solar cell varies with the voltage it supplies and the temperature it operates at. The following model
MATLAB FUNCTION SCRIPT
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):
a. A column vector of V_mp values corresponding to the input vector of operating temperatures.
b. A column vector of residual values associated with the numerical solution for each value of V_mp.
qVoc mp kBT
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
