I understand from your query that it is required to obtain a polynomial or logarithmic approach using the values of the output PV power as a function of temperature, humidity, radiation, etc. In Simulink, the variation power with temperature and radiation can be obtained. However, variation of power with humidity is not supported. The below-mentioned steps can be followed to obtain the result.
- Use the block PV Array (available at Simscape/Electrical/Specialized Power Systems/Sources) in Simulink to simulate the behavior of a PV array and connect it to the desired circuit model.
- Provide the desired waveform/values of irradiance "Ir" and temperature "T" as the input to the block.
- Connect the measurement port "m" to a "To File" block (available at Simulink/Sinks). Change the "Save format" field of the block as "Array". The measurement port output is a five-element vector. They can be found in the following PV Array documentation.
- Run the simulation.
- Load the ".mat" in MATLAB command window.
The array variable loaded in the workspace contains the values of "PV voltage," "PV current," "irradiance," and "temparature" in its 2nd, 3rd, 5th, and 6th rows, respectively, for each sample sample time stored in the 1st row of the array. The "PV voltage" and "PV current" can be extracted from the array and multiplied to obtain the power output ("y" variable) of the PV array. After obtaining the power, the relation with the temperature and irradiance ("x" variables) can be obtained using polynomial or logarithmic approach in the following way:
- Polynomial Approach: To obtain polynomial regression "polyfit" and "polyval" functions can be used like the following code snippet.
coefficients = polyfit(x, y, degree);
polynomial = polyval(coefficients, x);
- Logarithmic Approach: To obtain logarithmic regression "fittype" and "fit" functions can be used like the following code snippet.
logarithmicEquation = fittype('Desired function', 'Name', 'Value');
fitResult = fit(x_log, y_log, logarithmicEquation);\
Further informations on the above used blocks/functions can be found in the following MATLAB documentations:
Hope this answers the query.