how to stimulate the effect of shading partial shading on I-V and P-V characteristics?
    9 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
Hi
I have matlab code to plot I-V and P-V curve. this code run correctly. now i should show effect of shading partial  on I-V and P-V curve. I don't know how to add shading partial to this code and which command I shoud use. I have ten module in series which nine of them have full irradiance (S=1,1000W/m2) and one of them has (S=0.5,500w/m2).this is my matlab code. how to add these ten module to this code?
I will appreciate if you could help me.
clear all;close all;clc
%% Characterization Of Photovoltaic Panel Using Single Diode Model
it=input('Enter the number of curves you aim to plot: 1,2...N: ');
for N=1:it;
%% PV Module DATA
T=input('Enter the value of T en C: ');                    % Temperature of the celle en C
G=input('Enter the value of solar irradiance en W/m2: ');  % Solar Irradiance en W/m2
ai=0.034/100;                     % Current Tmperature coefficient(ki)
av=-0.34/100;                     % Voltage Tmperature coefficient(kv)
Isc_r=5.3;                        % Short-circuit current
Voc_r=44.2;                       % Opent circuit voltage
Vm=36;                            % Maximum voltage @ STC
Im=4.87;                          % Maximum current @ STC
Pm=175;                           % Maximum power   @ STC
Ns=72;                            % nomber of Cells   
n=1.3;                            % Diode ideality factor
%% Internal parameters%%%%%%%%%%%%%
Gr=1000;                          % reference irradiance
T=T+273.6;                        % 
Tr= 25 +273.6;                    % Temperature reference
dT=T-Tr;
Isc=Isc_r+ai*dT;                  % variation of Isc with T
Voc=Voc_r+av*dT;                  % variation de Vco with T
q=1.60217646*power(10,-19);       % charge constant
K=1.3806503*power(10,-23);        % Boltzmann constant
Vt=(Ns*n*K*T/q);                  % Thermal voltage 
Eg=1.12;                          % gap energy
Iph=Isc*(G/Gr);                   % photo-current
Iss=(Isc)/(   exp( Voc/Vt )-1 );  % saturation current
Is=Iss*( (T/Tr)^3 ) * exp ( ( (q*Eg)/(n*K) )*((1/Tr)-(1/T)) );%saturation current
Rs=0.2;                           % series resistance 
Rp=230;                           % parallele resistance
%%
I=Iph;             % initial codition
V=0:(Voc/100):Voc; % input voltage array
for n1=1:length(V) 
    for n2=1:20                          % Newton-Raphson loop for calculating output current
    Vd= (V(n1)+Rs*I);                    % Diode Voltage
    Id=Is*( exp(Vd/Vt) -1);              % Diode current
    Ip=Vd/Rp;                            % Parallele resistance Current
    f=Iph-I-Id-Ip;                       % f(I)=0
    df=-1-(Is*Rs/Vt)*exp(Vd/Vt)-(Rs/Rp); % f'(I)=0
    I=I-f/df;% Newton-Raphson formula
    end % end of Newton-Raphson
    if I<0
        I=0;
    end
    Ipv(n1)=I;                           % Accumulation of output currant 
end 
%%
P=Ipv.*V;% Output power
figure(1)
hold on
plot(V,Ipv,'linewidth',N)%  
grid on
figure(2)
plot(V,P,'linewidth',N)% 
hold on
grid on
end
0 comentarios
Respuestas (1)
  Ruchika
    
 el 17 de Ag. de 2023
        Hi, to add shading to your MATLAB code, you can modify the existing code by introducing a condition that checks whether the module is shaded or not. Here's how you can modify your code to include shading for one module:
clear all; close all; clc
%% Characterization Of Photovoltaic Panel Using Single Diode Model
it = input('Enter the number of curves you aim to plot: 1, 2...N: ');
for N = 1:it
    %% PV Module DATA
    T = input('Enter the value of T in C: ');                      % Temperature of the cell in C
    G = input('Enter the value of solar irradiance in W/m2: ');    % Solar Irradiance in W/m2
    ai = 0.034 / 100;     % Current Temperature coefficient (ki)
    av = -0.34 / 100;     % Voltage Temperature coefficient (kv)
    Isc_r = 5.3;          % Short-circuit current
    Voc_r = 44.2;         % Open circuit voltage
    Vm = 36;              % Maximum voltage @ STC
    Im = 4.87;            % Maximum current @ STC
    Pm = 175;             % Maximum power @ STC
    Ns = 72;              % Number of cells
    n = 1.3;              % Diode ideality factor
    %% Internal parameters
    Gr = 1000;            % Reference irradiance
    T = T + 273.6;
    Tr = 25 + 273.6;      % Temperature reference
    dT = T - Tr;
    Isc = Isc_r + ai * dT;  % Variation of Isc with T
    Voc = Voc_r + av * dT;  % Variation of Vco with T
    q = 1.60217646 * power(10, -19);   % Charge constant
    K = 1.3806503 * power(10, -23);    % Boltzmann constant
    Vt = (Ns * n * K * T / q);         % Thermal voltage
    Eg = 1.12;                         % Gap energy
    Iph = Isc * (G / Gr);              % Photo-current
    Iss = (Isc) / (exp(Voc / Vt) - 1); % Saturation current
    Is = Iss * ((T / Tr) ^ 3) * exp(((q * Eg) / (n * K)) * ((1 / Tr) - (1 / T))); % Saturation current
    Rs = 0.2;                          % Series resistance
    Rp = 230;                          % Parallel resistance
    %% Shading configuration
    shading = ones(1, 10);     % Initialize shading configuration for 10 modules
    shading(10) = 0.5;         % Set the shading factor for the 10th module to 0.5 (50% irradiance)
    I = Iph;                   % Initial condition
    V = 0:(Voc / 100):Voc;     % Input voltage array
    for n1 = 1:length(V)
        for n2 = 1:20                          % Newton-Raphson loop for calculating output current
            Vd = (V(n1) + Rs * I);              % Diode Voltage
            Id = Is * (exp(Vd / Vt) - 1);       % Diode current
            Ip = Vd / Rp;                       % Parallel resistance Current
            f = Iph * shading(N) - I - Id - Ip; % f(I) = 0
            df = -1 - (Is * Rs / Vt) * exp(Vd / Vt) - (Rs / Rp); % f'(I) = 0
            I = I - f / df; % Newton-Raphson formula
        end % end of Newton-Raphson
        if I < 0
            I = 0;
        end
        Ipv(n1) = I; % Accumulation of output current
    end
    P = Ipv .* V; % Output power
    figure(1)
    hold on
    plot(V, Ipv, 'linewidth', N)
    grid on
    figure(2)
    plot(V, P, 'linewidth', N)
    hold on
    grid on
end
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

