资源描述:
《基于某Matlab的PV模型仿真小实验.doc》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、Name:Yang,Vorname:YingStudentID:359144PVAssignment1Exercise1Code:%Exercise1closeallclearall%defineinputvaluesDOY=172;TZ=2;lambda_g=13.2;fi_g=52.3;LT=6:1:20;%callfunctionsundatatogetsunenevationandazimuth[Am,Ys,SAz]=sundata(lambda_g,fi_g,TZ,DOY,LT);plot(SAz,Ys);xlabel('AzimuthindegreesAs');yla
2、bel('AltitudePositionindegreesYs');title('Berlin(13.2,52.3)on21.06.2013(172/365)');gridon;Functionsundata:function[Am,Ys,SAz]=sundata(lambda_g,fi_g,TZ,DOY,LT)%UNTITLEDSummaryofthisfunctiongoeshere%DetailedexplanationgoeshereJ=360*DOY/365;TEQ=0.0066+7.3525*cos((J+85.9)*pi/180)+9.9359*cos((2*J+
3、108.9)*pi/180)+0.3387*cos((3*J+105.2)*pi/180);delta=0.3948-23.2559*cos((J+9.1)*pi/180)-0.3915*cos((2*J+5.4)*pi/180)-0.176*cos((3*J+26)*pi/180);%deltaunits->degreefork=1:1:15TLT(k)=LT(k)-TZ+(4*lambda_g+TEQ)/60;W(k)=(12-TLT(k))*15;Ys(k)=asin(cos(W(k)*pi/180)*cos(fi_g*pi/180)*cos(delta*pi/180)+s
4、in(fi_g*pi/180)*sin(delta*pi/180))*180/pi;SunA(k)=acos((sin(Ys(k)*pi/180)*sin(fi_g*pi/180)-sin(delta*pi/180))/(cos(Ys(k)*pi/180)*cos(fi_g*pi/180)))*180/pi;ifLT(k)<=12SAz(k)=180-SunA(k);elseSAz(k)=180+SunA(k);endAm(k)=1./sin(Ys(k)*pi/180);endendFigure1:Exercise2Code:%Exercise2closeall;clearall
5、;%defineV,G,TtocallfunctionV=0:0.01:44.8;G=1000;T=25;P=zeros(1,4481);%callfunctionPVmodtogetI[I]=PVmod(V,G,T);subplot(2,1,1);plot(V,I);xlabel('Voltage(V)');ylabel('Current(A)');gridon;fori=1:1:4481P(i)=I(i)*V(i);endsubplot(2,1,2);plot(V,P);xlabel('Voltage(V)');ylabel('Power(W)');gridon;Functi
6、onPVmod:function[I]=PVmod(V,G,T)%UNTITLED3Summaryofthisfunctiongoeshere%Detailedexplanationgoeshere%Definationsofconstants:k=1.38*10^(-23);q=1.60*10^(-19);Vg=1.12;Voc=44.8;Isc=5.5;Tstc=25+273;Tk=T+273;Ko=0.00065;Rs=0.002;Rsh=800;[a,b]=size(V);n=1.6;U=zeros();IL=zeros();Is1=zeros();Is=zeros();
7、C=zeros();I=zeros();Voc_1=(Voc-(0.16*(T-25)))/72;%VocforeachcellatanyTempIsc_1=Isc*(1+Ko*(T-25));%IscforcellatanyTempfori=1:1:bU(i)=V(i)/72;ifV(i)==0IL(i)=Isc_1;elseIL(i)=Isc_1*(G/1000)*(1+Ko*(Tk-Tstc));endIs1(i)=IL(i)/(exp(q*Voc_1/(n*k*Tstc)