Professional Documents
Culture Documents
fivelumpRB VRmodelParameter
fivelumpRB VRmodelParameter
........................................................................................................................................ 1
Initatiation of optimazation with lower and upper bounds. Here optimazation is done with Teacher
Learner Based optimazation method ....................................................................................... 1
Parameter settings ............................................................................................................... 1
Starting of optimazation ....................................................................................................... 1
Iteration ............................................................................................................................. 2
Teacher phase ..................................................................................................................... 2
Learner phase ..................................................................................................................... 2
Model pridicted values ......................................................................................................... 2
Concentration of lumps as weigth percent. .............................................................................. 3
Experimental Data input ....................................................................................................... 3
Data as predicted by Model .................................................................................................. 3
Plot between experimental data and model predicted data ........................................................... 4
parity chart ......................................................................................................................... 4
Goodness of fit i.e Coefficient of determination ....................................................................... 5
END ................................................................................................................................. 5
Parameter settings
Np=10; % number of populations
T=50; % number of iterations
Starting of optimazation
f=NaN(Np,1); % vector to store fitness of all initatial populations
D=length(lb);% number of decision varialbe i.e number of rate
constants to be optimized.
P=repmat(lb,Np,1)+repmat((ub-lb),Np,1).*rand(Np,D);
for p=1:Np
f(p)=prob(P(p,:)); % evaluating fitness of function for initial
population.
end
1
Iteration
for t=1:T
for i=1:Np
Teacher phase
Xmean=mean(P); % determine the mean of population
[~,ind]=min(f);% Determione location of teacher
Xbest=P(ind,:);% Copiny the solution as teacher
TF=randi([1,2],1,1);
Xnew=P(i,:)+rand(1,D).*(Xbest-TF*Xmean);
Xnew=min(ub,Xnew);
Xnew=max(lb,Xnew);
fnew=prob(Xnew);
if(fnew<f(i))
P(i,:)=Xnew;
f(i)=fnew;
end
Learner phase
p=randi([1 Np],1,1);
while i==p
p=randi([1 Np],1,1);
end
if f(i)<f(p)
Xnew=P(i,:)+rand(1,D).*(P(i,:)-P(p,:));
else
Xnew=P(i,:)-rand(1,D).*(P(i,:)-P(p,:));
end
Xnew=min(ub,Xnew);
Xnew=max(lb,Xnew);
fnew=prob(Xnew);
if (fnew<f(i))
P(i,:)=Xnew;
f(i)=fnew;
end
end
end
[bestfitness,ind]=min(f);
bestsol=P(ind,:); % Best values of fitted parameters.
2
alpha1=k12/(kB-kA);alpha2=(k13+alpha1*k23)/(kC-kA);
beta2=alpha1*k23/(kC-kB);alpha3=(k14+alpha1*k24+alpha2*k34)/(k45-
kA);beta3=(beta2*k34+alpha1*k24)/(k45-kB);
delta3=(beta2-alpha2)*k34/(k45-
kC);alpha4=(k15+alpha1*k25+alpha2*k35+alpha3*k45)/kA;
beta4=(alpha1*k25+beta2*k35+beta3*k45)/kB;
delta4=((beta2-alpha2)*k35+delta3*k45)/kC;
C10=1-0.2598;
t=[0 30 50 60]'; % cracking time in minute
0 0.7402 0 0 0 0
30 0.56881 0.0087509 0.064989 0.074828 0.022817
50 0.47722 0.012394 0.10076 0.11482 0.035012
60 0.43711 0.01371 0.1167 0.13233 0.040352
3
Plot between experimental data and model pre-
dicted data
plot(t,C1,'r')
hold on
plot(t,C2,'b')
plot(t,C3,'g')
plot(t,C4,'k')
plot(t,C5,'m')
plot(t,C1exp,'r*')
plot(t,C2exp,'b^')
plot(t,C3exp,'go')
plot(t,C4exp,'k*')
plot(t,C5exp,'m^')
xlabel('time(min)')
ylabel('weigth fraction of lumps')
legend('C1','C2','C3','C4','C5','C1exp','C2exp','C3exp','C4exp','C5exp')
grid on
title('Weigth fraction plot')
parity chart
figure()
plot(C1,C1exp,'*')
4
hold on
plot([0 1],[0 1])
plot(C2,C2exp,'g.')
plot(C3,C3exp,'b^')
plot(C4,C4exp,'ko')
plot(C5,C5exp,'r*')
xlabel('Model predicted values')
ylabel('Experimental values')
legend('C1','Diagonal line','C2','C3','C4','C5')
grid on
title('Parity plot')
END
Published with MATLAB® R2021a