MATLAB Answers

5 equations with 5 unknowns

조회 수: 37(최근 30일)
Asliddin Komilov
Asliddin Komilov 2019년 12월 19일
댓글: Alex Sha 2020년 2월 11일
this is the code, and it says: Undefined function or variable 'Rp'.
Vmp=0.57
Voc=0.66
Isc=0.0067
Imp=0.0062
k=1.38e-23
q=1.6e-19
T=300
[I0,IL,n,Rs,Rp]=solve(Rp==Voc/(IL-I0*(exp(q/(n*k*T)*Voc)-1)),Isc==IL-I0*(exp(q/(n*k*T)*Rs*Isc)-1) ...
-Rs*Isc/Rp, Imp==IL-I0*(exp(q/(n*k*T)*(Vmp+Imp*Rs))-1)-(Vmp+Imp*Rs)/Rp, Rs0==-(q/(n*k*T)*I0*exp(q/(n*k*T)*Voc) ...
+1/Rs)/(1+Rs(q/(n*k*T)*I0*exp(q/(n*k*T)*Voc)+1/Rs)), Rp0==-(q/(n*k*T)*I0*exp(q/(n*k*T)*Rs*Isc)+1/Rs)/(1+ ...
Rs(q/(n*k*T)*I0*exp(q/(n*k*T)*Rs*Isc)+1/Rs)));
please help.
thanks
  댓글 수: 2
Asliddin Komilov
Asliddin Komilov 2019년 12월 19일
sorry my bad,
Rp0=-0.0032
Rs0=-0.1535

댓글을 달려면 로그인하십시오.

채택된 답변

Dimitris Kalogiros
Dimitris Kalogiros 2019년 12월 19일
편집: Dimitris Kalogiros 2019년 12월 19일
Run this and check if the equations are those that should be...
clearvars
syms Vmp Voc Isc mp k q T Rp0 Rs0 Imp
syms I0 IL n Rs Rp
eq1 = Rp==Voc/(IL-I0*(exp(q/(n*k*T)*Voc)-1))
eq2 = Isc==IL-I0*(exp(q/(n*k*T)*Rs*Isc)-1)-Rs*Isc/Rp
eq3 = Imp==IL-I0*(exp(q/(n*k*T)*(Vmp+Imp*Rs))-1)-(Vmp+Imp*Rs)/Rp
eq4 = Rs0==-(q/(n*k*T)*I0*exp(q/(n*k*T)*Voc)+1/Rs)/(1+Rs*(q/(n*k*T)*I0*exp(q/(n*k*T)*Voc)+1/Rs))
eq5 = Rp0==-(q/(n*k*T)*I0*exp(q/(n*k*T)*Rs*Isc)+1/Rs)/(1+Rs*(q/(n*k*T)*I0*exp(q/(n*k*T)*Rs*Isc)+1/Rs))
Vmp=0.57
Voc=0.66
Isc=0.0067
Imp=0.0062
k=1.38e-23
q=1.6e-19
T=300
Rp0=-0.0032
Rs0=-0.1535
eq1=subs(eq1); eq2=subs(eq2); eq3=subs(eq3); eq4=subs(eq4); eq5=subs(eq5);
[I0,IL,n,Rs,Rp]=vpasolve( [eq1, eq2, eq3, eq4, eq5], [I0,IL,n,Rs,Rp])
I replaced solve by vpasolve and a I filled in two multiplication signs on equations 4 and 5
You will get these results:
five_x_five.png
  댓글 수: 2
Alex Sha
Alex Sha 2020년 2월 11일
Hi, if:
eq4 = Rs0==-(q/(n*k*T)*I0*exp(q/(n*k*T)*Voc)+1/Rs)/(1+Rs*(q/(n*k*T)*I0*exp(q/(n*k*T)*Voc)+1/Rs))
eq5 = Rp0==-(q/(n*k*T)*I0*exp(q/(n*k*T)*Rs*Isc)+1/Rs)/(1+Rs*(q/(n*k*T)*I0*exp(q/(n*k*T)*Rs*Isc)+1/Rs))
there are three set of solutions:
Solution 1:
rp: 9.67005476606739
il: 0.0019111895620797
i0: 0.0688555189839256
n: -7.70651321610801
rs: 3.19045305874331
Fevl:
-1.77635683940025E-15
8.46545056276682E-15
-2.66566282935976E-14
6.53088694235748E-14
3.23005511226881E-15
Solution 2:
rp: -1.49360779371437
il: 0.0072122045072898
i0: 2.37140721633163
n: 147.073881601077
rs: -1.6176233218033
Fevl:
-1.77635683940025E-15
-1.48579065717414E-15
-2.61075883134509E-16
4.9960036108132E-16
-3.38704758684472E-16
Solution 3:
rp: 20.3838083602237
il: 0.0251477146445889
i0: -0.000424725708092707
n: 8.8206777615481
rs: 63.0599917773524
Fevl:
7.8159700933611E-14
1.86751655806283E-14
3.21574364359201E-14
2.3037127760972E-15
-1.91339999400242E-14
while, if:
eq4 = Rs0==(1+Rs*(q/(n*k*T)*I0*exp(q/(n*k*T)*Voc)+1/Rs))/(q/(n*k*T)*I0*exp(q/(n*k*T)*Voc)+1/Rs)
eq5 = Rp0==(1+Rs*(q/(n*k*T)*I0*exp(q/(n*k*T)*Rs*Isc)+1/Rs))/(q/(n*k*T)*I0*exp(q/(n*k*T)*Rs*Isc)+1/Rs)
There are two set of solutions:
Solution 1:
rp: -0.571379176675797
il: 0.00710162580334096
i0: 16.0349646962597
n: 364.529936246401
rs: -1.17904349440838
Fevl:
1.33226762955019E-15
1.93421667571414E-16
1.23772520010945E-15
-5.63438184997267E-15
-1.03133647455511E-14
Solution 2:
rp: 0.483417934884883
il: 0.00629375352778111
i0: 19.5585598654967
n: -354.194632801403
rs: 0.936208061845694
Fevl:
3.33066907387547E-16
-1.32706345912226E-16
6.82613687796874E-16
2.85882428840978E-15
1.65232411086791E-15

댓글을 달려면 로그인하십시오.

추가 답변(0개)

태그

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by