www.pudn.com > Reliabilitypv.rar > Reliabilitypv.m, change:2012-12-23,size:2016b


clear all
% this program is used to caculate the reliability of Photovoltaic system connected to utility grid 
format long g
RI=.9
Np=20
Ns=1
Lamba=16e-6*30
Rm=exp(-Lamba)
Ri=Rm^Ns
Ra=0
f=Ri^Np
%x=r 0:2
for x=1:2
    xx=x-1
    z1(x)=prod(1:Np)/(prod(1:(Np-xx))*prod(1:xx))
    
Ra=Ra+(z1(x)*((1-Ri)/Ri)^xx)*Ri^Np
  RA1(x)=Ra      
end
RA=Ra
%Compenent of PV
lambB=3e-6;
lambC=1e-6;
lambD=1e-6;
lambE=3e-6;

%lambF=200e-6;    % Transformer
lambF=.5e-6;    % Transformer
lambJ=3e-6;
lambK=3e-6;
lambL=.50e-6;
lambM=3e-6;
lambN=3e-6;
%lambO=200e-6;    % Transformer
lambO=.5e-6;    % Transformer
%lambH=146.16e-6;
lambH=20e-6;

%lambV=200e-6;    % Regulator
lambV=70e-6;    % Regulator
lambS=.8e-6;
lambG=50e-6;
lamba=3e-6;
%lambb=200e-6;   % Tansformer
lambb=.5e-6;   % Tansformer
lambc=3e-6;
lambd=.5e-6;
lambe=3e-6;
%lambt=200e-6;  % Transformer
lambt=.5e-6;  % Transformer
lambh=3e-6;
lambz=1e-6;
lamby=.2e-6;






t=30;
RB=exp(-lambB*t);
RC=exp(-lambC*t);
RD=exp(-lambD*t);
RE=exp(-lambE*t);
RF=exp(-lambF*t);
RJ=exp(-lambJ*t);
RK=exp(-lambK*t);
RL=exp(-lambL*t);
RM=exp(-lambM*t);
RN=exp(-lambN*t);
RO=exp(-lambO*t);
RH=exp(-lambH*t);


RV=exp(-lambV*t);
RS=exp(-lambS*t);
RG=exp(-lambG*t);
Ra=exp(-lamba*t);
Rb=exp(-lambb*t);
Rc=exp(-lambc*t);
Rd=exp(-lambd*t);

Re=exp(-lambe*t);
Rt=exp(-lambt*t);
Rh=exp(-lambh*t);
Rz=exp(-lambz*t);
Ry=exp(-lamby*t);
[RB,RC,RD,RE,RF,RJ,RK,RL,RM,RN,RO,RH]';


% Reliability of PVPS
Rpvps=RI*RA*RB*RC*RD*RE*RF*RJ*RK*RL*RM*RN*RO*RH
R1=RI*RA*RB;
R2=RI*RA*RB*RV*RS;
R3=RC*RD*RE*RF*RJ*RK*RL*RM*RN*RO*RH;

Rpvps_BS=(1-(1-R1)*(1-R2))*R3


% Reliability of PVPS with UG
R1g=RG*Ra*Rb*Rc*Rd*Re*Rt*Rh*Rz*Ry;
R2g=RI*RA*RB*RC*RD*RE*RF*RJ
R3g=RK*RL*RM*RN*RO*RH
Rpvps_ug=(1-(1-R1g)*(1-R2g))*R3g;
% Reliability of UG
R_eu=R1g*R3g;



% Relaibility of PV/EU/BS
R3B=RC*RD*RE*RF*RJ;
R4=RK*RL*RM*RN*RO*RH;
RpvpsBSEU=(1-(1-R1)*(1-R2))*R3B;

Rpvps_BS_EU=(1-(1-RpvpsBSEU)*(1-R1g))*R4

[Rpvps,Rpvps_BS,Rpvps_ug,Rpvps_BS_EU]'
 
(Rpvps_BS_EU-Rpvps_BS)/Rpvps_BS

(Rpvps_BS_EU-Rpvps_ug)/Rpvps_ug