5 equations with 5 unknowns

33 visualizzazioni (ultimi 30 giorni)
Asliddin Komilov
Asliddin Komilov il 19 Dic 2019
Commentato: Alex Sha il 11 Feb 2020
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 Commenti
Dimitris Kalogiros
Dimitris Kalogiros il 19 Dic 2019
I rewrote into a more clear form :
clearvars
syms Vmp Voc Isc mp k q T
syms I0 IL n Rs Rp
Vmp=0.57
Voc=0.66
Isc=0.0067
Imp=0.0062
k=1.38e-23
q=1.6e-19
T=300
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))
[I0,IL,n,Rs,Rp]=solve( eq1, eq2, eq3, eq4, eq5);
There is still a problem at eq4. first of all , there is no definition for RS0. Is it a parameter, an unkknown or a value has to be given to it ? (The same holdsa for Rp0)
Also, you have to check if eq4 is written into the desired form.
Asliddin Komilov
Asliddin Komilov il 19 Dic 2019
sorry my bad,
Rp0=-0.0032
Rs0=-0.1535

Accedi per commentare.

Risposta accettata

Dimitris Kalogiros
Dimitris Kalogiros il 19 Dic 2019
Modificato: Dimitris Kalogiros il 19 Dic 2019
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 Commenti
Asliddin Komilov
Asliddin Komilov il 20 Dic 2019
thanks, I have changed 2 equations
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)
but the answers are still way out of range. At least , I know how to do it now.
Alex Sha
Alex Sha il 11 Feb 2020
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

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Symbolic Math Toolbox in Help Center e File Exchange

Tag

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by