can i make a loop for mentioned equation?

조회 수: 1 (최근 30일)
Mamad Mamadi
Mamad Mamadi 2019년 11월 16일
댓글: Mamad Mamadi 2019년 11월 22일
hi everybody;
i want to find the value of (Pb_dis) from below equation and then make a loop to put (Pb_dis) value that i found from equation to (Pb1dis) to find (Pb_dis1) and to put the value of (Pb_dis1) to (Pb1dis) again to find (Pb_dis2) and so on . thank you very much i really appreciate it if you help me,
initial Pb1dis =3600 w
this is the equation:
Pb_dis= (Pb1dis*(1-sigma))-((Ppv/nu_i)-PL);
  댓글 수: 3
Mamad Mamadi
Mamad Mamadi 2019년 11월 16일
Thank you for your answer and spending your time ,
I share the entire equation with values. really appriciate it if you help me to solve this eq.
the original equation are:
Pb(t)= (Pb(t-1)*(1-sigma))-((Ppv(t)/nu_i)-PL(t)); %for li-ion battery discharging
Pb(t)= (Pb(t-1)*(1-sigma))+(Ppv(t)-(PL(t)/nu_i))*nu_b; %for li-ion battery Charging
Pb(t-1)= 3600 %SOC at the begining (Wh) >>watt hour
%Ppv(t) = 123.3 %Enegy of PV(photovoltaic ) (Wh)
%PL(t) = 60 %Load Demand (Wh)
sigma = 2 %Self_Discharge factor
nu_i = 0.9 %inverter effeciency
nu_b= 0.95 %battery effeciency
t=time
Mamad Mamadi
Mamad Mamadi 2019년 11월 22일
Please I need your help. I appriciate it if you can help me thanks.

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

답변 (2개)

JESUS DAVID ARIZA ROYETH
JESUS DAVID ARIZA ROYETH 2019년 11월 16일
It would be something like this :
Pb1dis =inf;
Pb_dis2=3600;
tol=0.0001;%tolerance
while abs(Pb_dis2-Pb_dis)>tol
Pb_dis=Pb1dis2;
Pb_dis2= (Pb1dis*(1-sigma))-((Ppv/nu_i)-PL);
end
disp(Pb_dis2)
  댓글 수: 2
Mamad Mamadi
Mamad Mamadi 2019년 11월 16일
Thank you for your answer and spending your time ,
I share the entire equation with values. really appriciate it if you help me to solve this eq.
the original equation is:
Pb(t)= (Pb(t-1)*(1-sigma))-((Ppv(t)/nu_i)-PL(t)); %for li-ion battery discharging
Pb(t)= (Pb(t-1)*(1-sigma))+(Ppv(t)-(PL(t)/nu_i))*nu_b; %for li-ion battery Charging
Pb(t-1)= 3600 %SOC at the begining (Wh) >>watt hour
%Ppv(t) = 123.3 %Enegy of PV(photovoltaic ) (Wh)
%PL(t) = 60 %Load Demand (Wh)
sigma = 2 %Self_Discharge factor
nu_i = 0.9 %inverter effeciency
nu_b= 0.95 %battery effeciency
t=time
Mamad Mamadi
Mamad Mamadi 2019년 11월 22일
could you please help me again. I used your codes but didnt work and shared it again completely. i really appricaite it if you help me. thanks

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


wang sir
wang sir 2019년 11월 16일
HI,dude,I'm sorry,I can't answer you the question because I don't know how to use this software.But I wish we can make friends!

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by