GA opimization for kinetic parameter estimation of ODEs system

10 views (last 30 days)
Jinsu Kim
Jinsu Kim on 31 May 2021
Commented: Star Strider on 31 May 2021
I want to find kinetic parameter to explain experimental data set.
So I made function blocks to find the kinetic parameters as below:
(1) GA file: handing GA options such as PopSz, LB, UB etc.
(2) Evaluation file: Calculating cost as a function of parameters to be estimated
(3) Others: Describing physics of the system
I have two questions:
Question 1. Is it important to scaling of the parameters to be estimated?
I have 24 parameters to be estimated, and the range of parameters are quite differed.
#1 ~ #12 : 1e5 ~ 1e9
#13 ~ #24: 0 ~ 200
In this case do I have to rescale the parameters (#1 ~ #12)?
Question 2. After a few generations, GA do not create generations. I don't know the reason.
This was a sceenshot of gaplotbestf, and as you can see, it does not proceed.
Do I have to set population size more bigger? Actually in my system, numerous parameter sets does could not solve the ODEs because it was too stiff. Thats why I include exception handling code in evaluation file.
(1) ODPC_GA.m
% Parameter to be estimated
% 1 ~ 9 : k_0, Unit: ( 1 / s)
% 10 ~ 18: Ea, Unit: J / ( mol * K)
% GA Optimization
fitness = @ODPC_eval ;
parameter = 24 ;
PopSz = 400 ;
ticz
% frequency factor, k_0 [Unit: 1/s]
k_0_lower = 1e5 ;
k_0_upper = 1e9 ;
% Activation energy, Ea [KJ/mole]
Ea_lower = 0 ;
Ea_upper = 200 ;
LB = [ k_0_lower * ones(1,12), Ea_lower * ones(1,12) ] ;
UB = [ k_0_upper * ones(1,12), Ea_upper * ones(1,12) ] ;
options = optimoptions('ga', 'PopulationSize', PopSz, 'MaxGenerations', 200, 'PlotFcn', @gaplotbestf );%, 'UseParallel', true) ;
[x, fval] = ga (fitness, parameter, [], [], [], [], LB, UB , [], options ) ;
toc
(2) ODPC_rxn.m
function del_PP = ODPC_rxn(PP, Op_temp, theta, parameter, No_Components)
R_2 = 8.314 ; % Unit: J / (K * mole)
% Arrhenius relation
k = zeros(12, 1) ;
for i = 1 : 12
k(i) = parameter(i) .* exp(-parameter(i+12)*10^3 / ( R_2 * Op_temp ) ) ;
end
% Reaction kinetics ( F: Foward reaction, R: Reverse reaction)
% Unit: atm/s
R_1_F = k(1) * k(2) * PP(1) * PP (2) * ( 1 - theta(2) ) / ( k(1) * PP(1) + k(2) * PP(2) ) ;
R_1_R = k(3) * PP(3) * PP(4) * PP(7) ;
R_2_F = k(4) * PP(1) ;
R_2_R = k(5) * PP(7) * PP(5) ;
R_3 = k(6) * PP(1) * PP(2)^3 ;
R_4 = k(7) * PP(1) * PP(2)^2 ;
R_5 = k(8) * PP(1) ;
R_6 = k(9) * PP(1) * PP(5) ;
R_7 = k(10) * PP(1) * PP(5)^2 ;
R_8_F = k(11) * PP(2) * PP(5) ;
R_8_R = k(12) * PP(3) * PP(4) ;
% Stoichometric (net reaction)
R_net = zeros(No_Components , 1) ;
R_net(1) = ( - R_1_F + R_1_R ) + ( - R_2_F + R_2_R ) - ( R_3 + R_4 + R_5 + R_6 + R_7 ) ;
R_net(2) = ( - R_1_F + R_1_R ) - ( 3*R_3 + 2*R_4 ) + ( - R_8_F + R_8_R ) ;
R_net(3) = ( + R_1_F - R_1_R ) + ( 6*R_3 + 2*R_4 ) + ( + R_8_F - R_8_R ) ;
R_net(4) = ( + R_1_F - R_1_R ) + ( 2*R_4 + R_8_F - R_8_R ) ;
R_net(5) = ( R_2 + 4*R_3 ) - ( R_6 + 2*R_7 - R_8_F + R_8_R ) ;
R_net(6) = ( 3*R_4 + R_5 ) ;
R_net(7) = ( + R_1_F - R_1_R ) + ( + R_2_F - R_2_R ) ;
R_net(8) = ( R_5 + R_6 + 3*R_7) ;
R_net(9) = R_6 ;
% Net reaction (Unit: atm/s)
del_PP = R_net ;
end
(3) ODPC_eval.m
function fitness = ODPC_eval(parameter)
%% Run simualation
No_Components = 9 ; % Number of component
% Experimental condition
t_step = 10^(-1) ; % Unit: s
time_span = ( 0 : t_step : 74.7 ) ; % Unit: s
Op_pres = 1.0 ; % Unit: atm
Op_temp = 273.15 + [ 550, 575, 600 ] ; % Unit: K
Feed_ratio = [ 1.0 , 3.0 , (1/3) ] ; % Unit: Propane / CO2 [mole/mole]
% Assumed parameter
theta = [ 0.3, 0.3, 0.4 ] ; % Active site of x, y, and emtpy
% Initial condition
PP_0_P1C1 = ODPC_IC(Op_pres, Feed_ratio(1), No_Components) ;
PP_0_P3C1 = ODPC_IC(Op_pres, Feed_ratio(2), No_Components) ;
PP_0_P1C3 = ODPC_IC(Op_pres, Feed_ratio(3), No_Components) ;
% Stiffness solver
try
[~, PP_T550_P1C1] = ode15s( @(t,PP) ODPC_rxn(PP, Op_temp(1), theta, parameter, No_Components), time_span, PP_0_P1C1 ) ;
[~, PP_T575_P1C1] = ode15s( @(t,PP) ODPC_rxn(PP, Op_temp(2), theta, parameter, No_Components), time_span, PP_0_P1C1 ) ;
[~, PP_T600_P1C1] = ode15s( @(t,PP) ODPC_rxn(PP, Op_temp(3), theta, parameter, No_Components), time_span, PP_0_P1C1 ) ;
[~, PP_T550_P3C1] = ode15s( @(t,PP) ODPC_rxn(PP, Op_temp(1), theta, parameter, No_Components), time_span, PP_0_P3C1 ) ;
[~, PP_T575_P3C1] = ode15s( @(t,PP) ODPC_rxn(PP, Op_temp(2), theta, parameter, No_Components), time_span, PP_0_P3C1 ) ;
[~, PP_T600_P3C1] = ode15s( @(t,PP) ODPC_rxn(PP, Op_temp(3), theta, parameter, No_Components), time_span, PP_0_P3C1 ) ;
[~, PP_T550_P1C3] = ode15s( @(t,PP) ODPC_rxn(PP, Op_temp(1), theta, parameter, No_Components), time_span, PP_0_P1C3 ) ;
[~, PP_T575_P1C3] = ode15s( @(t,PP) ODPC_rxn(PP, Op_temp(2), theta, parameter, No_Components), time_span, PP_0_P1C3 ) ;
[~, PP_T600_P1C3] = ode15s( @(t,PP) ODPC_rxn(PP, Op_temp(3), theta, parameter, No_Components), time_span, PP_0_P1C3 ) ;
%% Fitness
% Ex. data
% 9 x 4 time = 3.64 6.125 18.375 74.74576
Data_T550_P1C1 = [ 0.474183603 0.463242309 0.44038303 0.402739677
0.480995287 0.474039978 0.466685984 0.449733127
0.01646031 0.023416189 0.038117164 0.061883515
0.000875524 0.001316507 0.00200982 0.003631809
0.000232176 0.000385564 0.000481883 0.000676615
0.000582263 0.000803596 0.001242881 0.002377175
0.010483427 0.01385013 0.013633993 0.018136528
0.005703984 0.009095597 0.02381125 0.042685027
0.010483427 0.01385013 0.013633993 0.018136528 ] ;
Data_T575_P1C1 = [ 0.46363465 0.453765883 0.442858197 0.359217832
0.48392733 0.469007409 0.450171927 0.42023891
0.023116884 0.029189587 0.036062879 0.08945085
0.00128469 0.001918654 0.002328152 0.005146914
0.000314796 0.000526233 0.00049503 0.000985803
0.000901654 0.001250883 0.001664068 0.003628331
0.004063401 0.015772357 0.0309646 0.033221499
0.018693193 0.012796638 0.004490547 0.054888362
0.004063401 0.015772357 0.0309646 0.033221499 ] ;
Data_T600_P1C1 = [ 0.458075116 0.436605236 0.425427266 0.360056834
0.478363291 0.463397574 0.450025216 0.414873813
0.02585111 0.038434304 0.045919616 0.088424715
0.002338088 0.004380486 0.004222075 0.005337531
0.000501215 0.001137345 0.000830102 0.000794424
0.001744039 0.003021357 0.003199328 0.0042834
0.007839134 0.015874595 0.025415312 0.038772129
0.017448871 0.021274508 0.019545772 0.048685025
0.007839134 0.015874595 0.025415312 0.038772129 ] ;
Data_T550_P3C1 = [ 0.705642688 0.699254516 0.61906626 0.560660924
0.2350736 0.235453895 0.211062957 0.200759119
0.024296302 0.027701727 0.071461328 0.10320133
0.001289935 0.00158386 0.004576115 0.006760623
0.000396039 0.000470564 0.00168954 0.002221422
0.000808079 0.001006446 0.002276247 0.003531006
0.008650304 0.007369062 0.020502649 0.022557796
0.015192747 0.019790868 0.048862255 0.077749982
0.008650304 0.007369062 0.020502649 0.022557796 ] ;
Data_T575_P3C1 = [ 0.691657669 0.669310047 0.598899023 0.530336435
0.233863305 0.225938189 0.20785543 0.192890537
0.031568488 0.043438025 0.082066618 0.119330531
0.002108183 0.003288841 0.005441113 0.00789704
0.000609911 0.00102506 0.001900334 0.002401684
0.001403394 0.002042652 0.003108566 0.00466
0.007893724 0.012691642 0.020850774 0.02611183
0.023001601 0.029573903 0.059027368 0.090260113
0.007893724 0.012691642 0.020850774 0.02611183 ] ;
Data_T600_P3C1 = [ 0.681281483 0.658299167 0.572123274 0.502371315
0.229269137 0.226708209 0.200322019 0.18202331
0.035249107 0.046977027 0.095106403 0.1332578
0.004671496 0.006339431 0.008079327 0.009975829
0.001116783 0.001614733 0.002569379 0.002665598
0.003339454 0.00444805 0.004965524 0.00658249
0.011083723 0.010435521 0.02466 0.033016618
0.022905095 0.034742341 0.067514075 0.097090423
0.011083723 0.010435521 0.02466 0.033016618 ] ;
Data_T550_P1C3 = [ 0.241140469 0.235464276 0.221868616 0.19531854
0.744511448 0.736871079 0.722384116 0.694211396
0.006826576 0.011184779 0.021528244 0.041572475
0.000266069 0.000479993 0.001160899 0.002690462
5.55261E-05 0.000105872 0.000270094 0.000540943
0.000218841 0.000353642 0.00071351 0.001591001
0.00020449 0.004475105 0.01093457 0.023415997
0.006572091 0.006590148 0.010205383 0.017243189
0.00020449 0.004475105 0.01093457 0.023415997 ] ;
Data_T575_P1C3 = [ 0.239123529 0.235881126 0.222710731 0.185476374
0.741506013 0.73348986 0.716580724 0.684520407
0.008324021 0.010725348 0.020645445 0.048958749
0.000382193 0.000591495 0.001301235 0.003038027
6.29391E-05 0.000110799 0.000278513 0.000567642
0.00032955 0.000481264 0.000941502 0.002109912
0.002003809 0.008105181 0.017229066 0.027178097
0.006264137 0.002509747 0.003083719 0.020972695
0.002003809 0.008105181 0.017229066 0.027178097 ] ;
Data_T600_P1C3 = [ 0.236117187 0.230482182 0.218752764 0.179867842
0.735582267 0.730202756 0.710389727 0.672945358
0.01041518 0.014486419 0.023120215 0.052955287
0.000708865 0.001172063 0.001995426 0.003381175
0.000102332 0.000198273 0.000367152 0.00055573
0.000610177 0.000967554 0.001567698 0.002662369
0.006148715 0.008206765 0.021094338 0.035341401
0.004166562 0.006077224 0.001618342 0.016949438
0.006148715 0.008206765 0.021094338 0.035341401 ] ;
fitness = zeros(9,1) ;
fitness(1) = abs( PP_T550_P1C1(36, 1) - Data_T550_P1C1(1,1) ) +...
abs( PP_T550_P1C1(36, 2) - Data_T550_P1C1(2,1) ) +...
abs( PP_T550_P1C1(36, 3) - Data_T550_P1C1(7,1) ) +...
abs( PP_T550_P1C1(36, 4) - Data_T550_P1C1(9,1) ) +...
abs( PP_T550_P1C1(36, 5) - Data_T550_P1C1(8,1) ) +...
abs( PP_T550_P1C1(36, 6) - Data_T550_P1C1(6,1) ) +...
abs( PP_T550_P1C1(36, 7) - Data_T550_P1C1(3,1) ) +...
abs( PP_T550_P1C1(36, 8) - Data_T550_P1C1(4,1) ) +...
abs( PP_T550_P1C1(36, 9) - Data_T550_P1C1(5,1) ) +...
abs( PP_T550_P1C1(61, 1) - Data_T550_P1C1(1,2) ) +...
abs( PP_T550_P1C1(61, 2) - Data_T550_P1C1(2,2) ) +...
abs( PP_T550_P1C1(61, 3) - Data_T550_P1C1(7,2) ) +...
abs( PP_T550_P1C1(61, 4) - Data_T550_P1C1(9,2) ) +...
abs( PP_T550_P1C1(61, 5) - Data_T550_P1C1(8,2) ) +...
abs( PP_T550_P1C1(61, 6) - Data_T550_P1C1(6,2) ) +...
abs( PP_T550_P1C1(61, 7) - Data_T550_P1C1(3,2) ) +...
abs( PP_T550_P1C1(61, 8) - Data_T550_P1C1(4,2) ) +...
abs( PP_T550_P1C1(61, 9) - Data_T550_P1C1(5,2) ) +...
abs( PP_T550_P1C1(183, 1) - Data_T550_P1C1(1,3) ) +...
abs( PP_T550_P1C1(183, 2) - Data_T550_P1C1(2,3) ) +...
abs( PP_T550_P1C1(183, 3) - Data_T550_P1C1(7,3) ) +...
abs( PP_T550_P1C1(183, 4) - Data_T550_P1C1(9,3) ) +...
abs( PP_T550_P1C1(183, 5) - Data_T550_P1C1(8,3) ) +...
abs( PP_T550_P1C1(183, 6) - Data_T550_P1C1(6,3) ) +...
abs( PP_T550_P1C1(183, 7) - Data_T550_P1C1(3,3) ) +...
abs( PP_T550_P1C1(183, 8) - Data_T550_P1C1(4,3) ) +...
abs( PP_T550_P1C1(183, 9) - Data_T550_P1C1(5,3) ) +...
abs( PP_T550_P1C1(747, 1) - Data_T550_P1C1(1,4) ) +...
abs( PP_T550_P1C1(747, 2) - Data_T550_P1C1(2,4) ) +...
abs( PP_T550_P1C1(747, 3) - Data_T550_P1C1(7,4) ) +...
abs( PP_T550_P1C1(747, 4) - Data_T550_P1C1(9,4) ) +...
abs( PP_T550_P1C1(747, 5) - Data_T550_P1C1(8,4) ) +...
abs( PP_T550_P1C1(747, 6) - Data_T550_P1C1(6,4) ) +...
abs( PP_T550_P1C1(747, 7) - Data_T550_P1C1(3,4) ) +...
abs( PP_T550_P1C1(747, 8) - Data_T550_P1C1(4,4) ) +...
abs( PP_T550_P1C1(747, 9) - Data_T550_P1C1(5,4) ) ;
fitness(2) = abs( PP_T575_P1C1(36, 1) - Data_T575_P1C1(1,1) ) +...
abs( PP_T575_P1C1(36, 2) - Data_T575_P1C1(2,1) ) +...
abs( PP_T575_P1C1(36, 3) - Data_T575_P1C1(7,1) ) +...
abs( PP_T575_P1C1(36, 4) - Data_T575_P1C1(9,1) ) +...
abs( PP_T575_P1C1(36, 5) - Data_T575_P1C1(8,1) ) +...
abs( PP_T575_P1C1(36, 6) - Data_T575_P1C1(6,1) ) +...
abs( PP_T575_P1C1(36, 7) - Data_T575_P1C1(3,1) ) +...
abs( PP_T575_P1C1(36, 8) - Data_T575_P1C1(4,1) ) +...
abs( PP_T575_P1C1(36, 9) - Data_T575_P1C1(5,1) ) +...
abs( PP_T575_P1C1(61, 1) - Data_T575_P1C1(1,2) ) +...
abs( PP_T575_P1C1(61, 2) - Data_T575_P1C1(2,2) ) +...
abs( PP_T575_P1C1(61, 3) - Data_T575_P1C1(7,2) ) +...
abs( PP_T575_P1C1(61, 4) - Data_T575_P1C1(9,2) ) +...
abs( PP_T575_P1C1(61, 5) - Data_T575_P1C1(8,2) ) +...
abs( PP_T575_P1C1(61, 6) - Data_T575_P1C1(6,2) ) +...
abs( PP_T575_P1C1(61, 7) - Data_T575_P1C1(3,2) ) +...
abs( PP_T575_P1C1(61, 8) - Data_T575_P1C1(4,2) ) +...
abs( PP_T575_P1C1(61, 9) - Data_T575_P1C1(5,2) ) +...
abs( PP_T575_P1C1(183, 1) - Data_T575_P1C1(1,3) ) +...
abs( PP_T575_P1C1(183, 2) - Data_T575_P1C1(2,3) ) +...
abs( PP_T575_P1C1(183, 3) - Data_T575_P1C1(7,3) ) +...
abs( PP_T575_P1C1(183, 4) - Data_T575_P1C1(9,3) ) +...
abs( PP_T575_P1C1(183, 5) - Data_T575_P1C1(8,3) ) +...
abs( PP_T575_P1C1(183, 6) - Data_T575_P1C1(6,3) ) +...
abs( PP_T575_P1C1(183, 7) - Data_T575_P1C1(3,3) ) +...
abs( PP_T575_P1C1(183, 8) - Data_T575_P1C1(4,3) ) +...
abs( PP_T575_P1C1(183, 9) - Data_T575_P1C1(5,3) ) +...
abs( PP_T575_P1C1(747, 1) - Data_T575_P1C1(1,4) ) +...
abs( PP_T575_P1C1(747, 2) - Data_T575_P1C1(2,4) ) +...
abs( PP_T575_P1C1(747, 3) - Data_T575_P1C1(7,4) ) +...
abs( PP_T575_P1C1(747, 4) - Data_T575_P1C1(9,4) ) +...
abs( PP_T575_P1C1(747, 5) - Data_T575_P1C1(8,4) ) +...
abs( PP_T575_P1C1(747, 6) - Data_T575_P1C1(6,4) ) +...
abs( PP_T575_P1C1(747, 7) - Data_T575_P1C1(3,4) ) +...
abs( PP_T575_P1C1(747, 8) - Data_T575_P1C1(4,4) ) +...
abs( PP_T575_P1C1(747, 9) - Data_T575_P1C1(5,4) ) ;
fitness(3) = abs( PP_T600_P1C1(36, 1) - Data_T600_P1C1(1,1) ) +...
abs( PP_T600_P1C1(36, 2) - Data_T600_P1C1(2,1) ) +...
abs( PP_T600_P1C1(36, 3) - Data_T600_P1C1(7,1) ) +...
abs( PP_T600_P1C1(36, 4) - Data_T600_P1C1(9,1) ) +...
abs( PP_T600_P1C1(36, 5) - Data_T600_P1C1(8,1) ) +...
abs( PP_T600_P1C1(36, 6) - Data_T600_P1C1(6,1) ) +...
abs( PP_T600_P1C1(36, 7) - Data_T600_P1C1(3,1) ) +...
abs( PP_T600_P1C1(36, 8) - Data_T600_P1C1(4,1) ) +...
abs( PP_T600_P1C1(36, 9) - Data_T600_P1C1(5,1) ) +...
abs( PP_T600_P1C1(61, 1) - Data_T600_P1C1(1,2) ) +...
abs( PP_T600_P1C1(61, 2) - Data_T600_P1C1(2,2) ) +...
abs( PP_T600_P1C1(61, 3) - Data_T600_P1C1(7,2) ) +...
abs( PP_T600_P1C1(61, 4) - Data_T600_P1C1(9,2) ) +...
abs( PP_T600_P1C1(61, 5) - Data_T600_P1C1(8,2) ) +...
abs( PP_T600_P1C1(61, 6) - Data_T600_P1C1(6,2) ) +...
abs( PP_T600_P1C1(61, 7) - Data_T600_P1C1(3,2) ) +...
abs( PP_T600_P1C1(61, 8) - Data_T600_P1C1(4,2) ) +...
abs( PP_T600_P1C1(61, 9) - Data_T600_P1C1(5,2) ) +...
abs( PP_T600_P1C1(183, 1) - Data_T600_P1C1(1,3) ) +...
abs( PP_T600_P1C1(183, 2) - Data_T600_P1C1(2,3) ) +...
abs( PP_T600_P1C1(183, 3) - Data_T600_P1C1(7,3) ) +...
abs( PP_T600_P1C1(183, 4) - Data_T600_P1C1(9,3) ) +...
abs( PP_T600_P1C1(183, 5) - Data_T600_P1C1(8,3) ) +...
abs( PP_T600_P1C1(183, 6) - Data_T600_P1C1(6,3) ) +...
abs( PP_T600_P1C1(183, 7) - Data_T600_P1C1(3,3) ) +...
abs( PP_T600_P1C1(183, 8) - Data_T600_P1C1(4,3) ) +...
abs( PP_T600_P1C1(183, 9) - Data_T600_P1C1(5,3) ) +...
abs( PP_T600_P1C1(747, 1) - Data_T600_P1C1(1,4) ) +...
abs( PP_T600_P1C1(747, 2) - Data_T600_P1C1(2,4) ) +...
abs( PP_T600_P1C1(747, 3) - Data_T600_P1C1(7,4) ) +...
abs( PP_T600_P1C1(747, 4) - Data_T600_P1C1(9,4) ) +...
abs( PP_T600_P1C1(747, 5) - Data_T600_P1C1(8,4) ) +...
abs( PP_T600_P1C1(747, 6) - Data_T600_P1C1(6,4) ) +...
abs( PP_T600_P1C1(747, 7) - Data_T600_P1C1(3,4) ) +...
abs( PP_T600_P1C1(747, 8) - Data_T600_P1C1(4,4) ) +...
abs( PP_T600_P1C1(747, 9) - Data_T600_P1C1(5,4) ) ;
fitness(4) = abs( PP_T550_P3C1(36, 1) - Data_T550_P3C1(1,1) ) +...
abs( PP_T550_P3C1(36, 2) - Data_T550_P3C1(2,1) ) +...
abs( PP_T550_P3C1(36, 3) - Data_T550_P3C1(7,1) ) +...
abs( PP_T550_P3C1(36, 4) - Data_T550_P3C1(9,1) ) +...
abs( PP_T550_P3C1(36, 5) - Data_T550_P3C1(8,1) ) +...
abs( PP_T550_P3C1(36, 6) - Data_T550_P3C1(6,1) ) +...
abs( PP_T550_P3C1(36, 7) - Data_T550_P3C1(3,1) ) +...
abs( PP_T550_P3C1(36, 8) - Data_T550_P3C1(4,1) ) +...
abs( PP_T550_P3C1(36, 9) - Data_T550_P3C1(5,1) ) +...
abs( PP_T550_P3C1(61, 1) - Data_T550_P3C1(1,2) ) +...
abs( PP_T550_P3C1(61, 2) - Data_T550_P3C1(2,2) ) +...
abs( PP_T550_P3C1(61, 3) - Data_T550_P3C1(7,2) ) +...
abs( PP_T550_P3C1(61, 4) - Data_T550_P3C1(9,2) ) +...
abs( PP_T550_P3C1(61, 5) - Data_T550_P3C1(8,2) ) +...
abs( PP_T550_P3C1(61, 6) - Data_T550_P3C1(6,2) ) +...
abs( PP_T550_P3C1(61, 7) - Data_T550_P3C1(3,2) ) +...
abs( PP_T550_P3C1(61, 8) - Data_T550_P3C1(4,2) ) +...
abs( PP_T550_P3C1(61, 9) - Data_T550_P3C1(5,2) ) +...
abs( PP_T550_P3C1(183, 1) - Data_T550_P3C1(1,3) ) +...
abs( PP_T550_P3C1(183, 2) - Data_T550_P3C1(2,3) ) +...
abs( PP_T550_P3C1(183, 3) - Data_T550_P3C1(7,3) ) +...
abs( PP_T550_P3C1(183, 4) - Data_T550_P3C1(9,3) ) +...
abs( PP_T550_P3C1(183, 5) - Data_T550_P3C1(8,3) ) +...
abs( PP_T550_P3C1(183, 6) - Data_T550_P3C1(6,3) ) +...
abs( PP_T550_P3C1(183, 7) - Data_T550_P3C1(3,3) ) +...
abs( PP_T550_P3C1(183, 8) - Data_T550_P3C1(4,3) ) +...
abs( PP_T550_P3C1(183, 9) - Data_T550_P3C1(5,3) ) +...
abs( PP_T550_P3C1(747, 1) - Data_T550_P3C1(1,4) ) +...
abs( PP_T550_P3C1(747, 2) - Data_T550_P3C1(2,4) ) +...
abs( PP_T550_P3C1(747, 3) - Data_T550_P3C1(7,4) ) +...
abs( PP_T550_P3C1(747, 4) - Data_T550_P3C1(9,4) ) +...
abs( PP_T550_P3C1(747, 5) - Data_T550_P3C1(8,4) ) +...
abs( PP_T550_P3C1(747, 6) - Data_T550_P3C1(6,4) ) +...
abs( PP_T550_P3C1(747, 7) - Data_T550_P3C1(3,4) ) +...
abs( PP_T550_P3C1(747, 8) - Data_T550_P3C1(4,4) ) +...
abs( PP_T550_P3C1(747, 9) - Data_T550_P3C1(5,4) ) ;
fitness(5) = abs( PP_T575_P3C1(36, 1) - Data_T575_P3C1(1,1) ) +...
abs( PP_T575_P3C1(36, 2) - Data_T575_P3C1(2,1) ) +...
abs( PP_T575_P3C1(36, 3) - Data_T575_P3C1(7,1) ) +...
abs( PP_T575_P3C1(36, 4) - Data_T575_P3C1(9,1) ) +...
abs( PP_T575_P3C1(36, 5) - Data_T575_P3C1(8,1) ) +...
abs( PP_T575_P3C1(36, 6) - Data_T575_P3C1(6,1) ) +...
abs( PP_T575_P3C1(36, 7) - Data_T575_P3C1(3,1) ) +...
abs( PP_T575_P3C1(36, 8) - Data_T575_P3C1(4,1) ) +...
abs( PP_T575_P3C1(36, 9) - Data_T575_P3C1(5,1) ) +...
abs( PP_T575_P3C1(61, 1) - Data_T575_P3C1(1,2) ) +...
abs( PP_T575_P3C1(61, 2) - Data_T575_P3C1(2,2) ) +...
abs( PP_T575_P3C1(61, 3) - Data_T575_P3C1(7,2) ) +...
abs( PP_T575_P3C1(61, 4) - Data_T575_P3C1(9,2) ) +...
abs( PP_T575_P3C1(61, 5) - Data_T575_P3C1(8,2) ) +...
abs( PP_T575_P3C1(61, 6) - Data_T575_P3C1(6,2) ) +...
abs( PP_T575_P3C1(61, 7) - Data_T575_P3C1(3,2) ) +...
abs( PP_T575_P3C1(61, 8) - Data_T575_P3C1(4,2) ) +...
abs( PP_T575_P3C1(61, 9) - Data_T575_P3C1(5,2) ) +...
abs( PP_T575_P3C1(183, 1) - Data_T575_P3C1(1,3) ) +...
abs( PP_T575_P3C1(183, 2) - Data_T575_P3C1(2,3) ) +...
abs( PP_T575_P3C1(183, 3) - Data_T575_P3C1(7,3) ) +...
abs( PP_T575_P3C1(183, 4) - Data_T575_P3C1(9,3) ) +...
abs( PP_T575_P3C1(183, 5) - Data_T575_P3C1(8,3) ) +...
abs( PP_T575_P3C1(183, 6) - Data_T575_P3C1(6,3) ) +...
abs( PP_T575_P3C1(183, 7) - Data_T575_P3C1(3,3) ) +...
abs( PP_T575_P3C1(183, 8) - Data_T575_P3C1(4,3) ) +...
abs( PP_T575_P3C1(183, 9) - Data_T575_P3C1(5,3) ) +...
abs( PP_T575_P3C1(747, 1) - Data_T575_P3C1(1,4) ) +...
abs( PP_T575_P3C1(747, 2) - Data_T575_P3C1(2,4) ) +...
abs( PP_T575_P3C1(747, 3) - Data_T575_P3C1(7,4) ) +...
abs( PP_T575_P3C1(747, 4) - Data_T575_P3C1(9,4) ) +...
abs( PP_T575_P3C1(747, 5) - Data_T575_P3C1(8,4) ) +...
abs( PP_T575_P3C1(747, 6) - Data_T575_P3C1(6,4) ) +...
abs( PP_T575_P3C1(747, 7) - Data_T575_P3C1(3,4) ) +...
abs( PP_T575_P3C1(747, 8) - Data_T575_P3C1(4,4) ) +...
abs( PP_T575_P3C1(747, 9) - Data_T575_P3C1(5,4) ) ;
fitness(6) = abs( PP_T600_P3C1(36, 1) - Data_T600_P3C1(1,1) ) +...
abs( PP_T600_P3C1(36, 2) - Data_T600_P3C1(2,1) ) +...
abs( PP_T600_P3C1(36, 3) - Data_T600_P3C1(7,1) ) +...
abs( PP_T600_P3C1(36, 4) - Data_T600_P3C1(9,1) ) +...
abs( PP_T600_P3C1(36, 5) - Data_T600_P3C1(8,1) ) +...
abs( PP_T600_P3C1(36, 6) - Data_T600_P3C1(6,1) ) +...
abs( PP_T600_P3C1(36, 7) - Data_T600_P3C1(3,1) ) +...
abs( PP_T600_P3C1(36, 8) - Data_T600_P3C1(4,1) ) +...
abs( PP_T600_P3C1(36, 9) - Data_T600_P3C1(5,1) ) +...
abs( PP_T600_P3C1(61, 1) - Data_T600_P3C1(1,2) ) +...
abs( PP_T600_P3C1(61, 2) - Data_T600_P3C1(2,2) ) +...
abs( PP_T600_P3C1(61, 3) - Data_T600_P3C1(7,2) ) +...
abs( PP_T600_P3C1(61, 4) - Data_T600_P3C1(9,2) ) +...
abs( PP_T600_P3C1(61, 5) - Data_T600_P3C1(8,2) ) +...
abs( PP_T600_P3C1(61, 6) - Data_T600_P3C1(6,2) ) +...
abs( PP_T600_P3C1(61, 7) - Data_T600_P3C1(3,2) ) +...
abs( PP_T600_P3C1(61, 8) - Data_T600_P3C1(4,2) ) +...
abs( PP_T600_P3C1(61, 9) - Data_T600_P3C1(5,2) ) +...
abs( PP_T600_P3C1(183, 1) - Data_T600_P3C1(1,3) ) +...
abs( PP_T600_P3C1(183, 2) - Data_T600_P3C1(2,3) ) +...
abs( PP_T600_P3C1(183, 3) - Data_T600_P3C1(7,3) ) +...
abs( PP_T600_P3C1(183, 4) - Data_T600_P3C1(9,3) ) +...
abs( PP_T600_P3C1(183, 5) - Data_T600_P3C1(8,3) ) +...
abs( PP_T600_P3C1(183, 6) - Data_T600_P3C1(6,3) ) +...
abs( PP_T600_P3C1(183, 7) - Data_T600_P3C1(3,3) ) +...
abs( PP_T600_P3C1(183, 8) - Data_T600_P3C1(4,3) ) +...
abs( PP_T600_P3C1(183, 9) - Data_T600_P3C1(5,3) ) +...
abs( PP_T600_P3C1(747, 1) - Data_T600_P3C1(1,4) ) +...
abs( PP_T600_P3C1(747, 2) - Data_T600_P3C1(2,4) ) +...
abs( PP_T600_P3C1(747, 3) - Data_T600_P3C1(7,4) ) +...
abs( PP_T600_P3C1(747, 4) - Data_T600_P3C1(9,4) ) +...
abs( PP_T600_P3C1(747, 5) - Data_T600_P3C1(8,4) ) +...
abs( PP_T600_P3C1(747, 6) - Data_T600_P3C1(6,4) ) +...
abs( PP_T600_P3C1(747, 7) - Data_T600_P3C1(3,4) ) +...
abs( PP_T600_P3C1(747, 8) - Data_T600_P3C1(4,4) ) +...
abs( PP_T600_P3C1(747, 9) - Data_T600_P3C1(5,4) ) ;
fitness(7) = abs( PP_T550_P1C3(36, 1) - Data_T550_P1C3(1,1) ) +...
abs( PP_T550_P1C3(36, 2) - Data_T550_P1C3(2,1) ) +...
abs( PP_T550_P1C3(36, 3) - Data_T550_P1C3(7,1) ) +...
abs( PP_T550_P1C3(36, 4) - Data_T550_P1C3(9,1) ) +...
abs( PP_T550_P1C3(36, 5) - Data_T550_P1C3(8,1) ) +...
abs( PP_T550_P1C3(36, 6) - Data_T550_P1C3(6,1) ) +...
abs( PP_T550_P1C3(36, 7) - Data_T550_P1C3(3,1) ) +...
abs( PP_T550_P1C3(36, 8) - Data_T550_P1C3(4,1) ) +...
abs( PP_T550_P1C3(36, 9) - Data_T550_P1C3(5,1) ) +...
abs( PP_T550_P1C3(61, 1) - Data_T550_P1C3(1,2) ) +...
abs( PP_T550_P1C3(61, 2) - Data_T550_P1C3(2,2) ) +...
abs( PP_T550_P1C3(61, 3) - Data_T550_P1C3(7,2) ) +...
abs( PP_T550_P1C3(61, 4) - Data_T550_P1C3(9,2) ) +...
abs( PP_T550_P1C3(61, 5) - Data_T550_P1C3(8,2) ) +...
abs( PP_T550_P1C3(61, 6) - Data_T550_P1C3(6,2) ) +...
abs( PP_T550_P1C3(61, 7) - Data_T550_P1C3(3,2) ) +...
abs( PP_T550_P1C3(61, 8) - Data_T550_P1C3(4,2) ) +...
abs( PP_T550_P1C3(61, 9) - Data_T550_P1C3(5,2) ) +...
abs( PP_T550_P1C3(183, 1) - Data_T550_P1C3(1,3) ) +...
abs( PP_T550_P1C3(183, 2) - Data_T550_P1C3(2,3) ) +...
abs( PP_T550_P1C3(183, 3) - Data_T550_P1C3(7,3) ) +...
abs( PP_T550_P1C3(183, 4) - Data_T550_P1C3(9,3) ) +...
abs( PP_T550_P1C3(183, 5) - Data_T550_P1C3(8,3) ) +...
abs( PP_T550_P1C3(183, 6) - Data_T550_P1C3(6,3) ) +...
abs( PP_T550_P1C3(183, 7) - Data_T550_P1C3(3,3) ) +...
abs( PP_T550_P1C3(183, 8) - Data_T550_P1C3(4,3) ) +...
abs( PP_T550_P1C3(183, 9) - Data_T550_P1C3(5,3) ) +...
abs( PP_T550_P1C3(747, 1) - Data_T550_P1C3(1,4) ) +...
abs( PP_T550_P1C3(747, 2) - Data_T550_P1C3(2,4) ) +...
abs( PP_T550_P1C3(747, 3) - Data_T550_P1C3(7,4) ) +...
abs( PP_T550_P1C3(747, 4) - Data_T550_P1C3(9,4) ) +...
abs( PP_T550_P1C3(747, 5) - Data_T550_P1C3(8,4) ) +...
abs( PP_T550_P1C3(747, 6) - Data_T550_P1C3(6,4) ) +...
abs( PP_T550_P1C3(747, 7) - Data_T550_P1C3(3,4) ) +...
abs( PP_T550_P1C3(747, 8) - Data_T550_P1C3(4,4) ) +...
abs( PP_T550_P1C3(747, 9) - Data_T550_P1C3(5,4) ) ;
fitness(8) = abs( PP_T575_P1C3(36, 1) - Data_T575_P1C3(1,1) ) +...
abs( PP_T575_P1C3(36, 2) - Data_T575_P1C3(2,1) ) +...
abs( PP_T575_P1C3(36, 3) - Data_T575_P1C3(7,1) ) +...
abs( PP_T575_P1C3(36, 4) - Data_T575_P1C3(9,1) ) +...
abs( PP_T575_P1C3(36, 5) - Data_T575_P1C3(8,1) ) +...
abs( PP_T575_P1C3(36, 6) - Data_T575_P1C3(6,1) ) +...
abs( PP_T575_P1C3(36, 7) - Data_T575_P1C3(3,1) ) +...
abs( PP_T575_P1C3(36, 8) - Data_T575_P1C3(4,1) ) +...
abs( PP_T575_P1C3(36, 9) - Data_T575_P1C3(5,1) ) +...
abs( PP_T575_P1C3(61, 1) - Data_T575_P1C3(1,2) ) +...
abs( PP_T575_P1C3(61, 2) - Data_T575_P1C3(2,2) ) +...
abs( PP_T575_P1C3(61, 3) - Data_T575_P1C3(7,2) ) +...
abs( PP_T575_P1C3(61, 4) - Data_T575_P1C3(9,2) ) +...
abs( PP_T575_P1C3(61, 5) - Data_T575_P1C3(8,2) ) +...
abs( PP_T575_P1C3(61, 6) - Data_T575_P1C3(6,2) ) +...
abs( PP_T575_P1C3(61, 7) - Data_T575_P1C3(3,2) ) +...
abs( PP_T575_P1C3(61, 8) - Data_T575_P1C3(4,2) ) +...
abs( PP_T575_P1C3(61, 9) - Data_T575_P1C3(5,2) ) +...
abs( PP_T575_P1C3(183, 1) - Data_T575_P1C3(1,3) ) +...
abs( PP_T575_P1C3(183, 2) - Data_T575_P1C3(2,3) ) +...
abs( PP_T575_P1C3(183, 3) - Data_T575_P1C3(7,3) ) +...
abs( PP_T575_P1C3(183, 4) - Data_T575_P1C3(9,3) ) +...
abs( PP_T575_P1C3(183, 5) - Data_T575_P1C3(8,3) ) +...
abs( PP_T575_P1C3(183, 6) - Data_T575_P1C3(6,3) ) +...
abs( PP_T575_P1C3(183, 7) - Data_T575_P1C3(3,3) ) +...
abs( PP_T575_P1C3(183, 8) - Data_T575_P1C3(4,3) ) +...
abs( PP_T575_P1C3(183, 9) - Data_T575_P1C3(5,3) ) +...
abs( PP_T575_P1C3(747, 1) - Data_T575_P1C3(1,4) ) +...
abs( PP_T575_P1C3(747, 2) - Data_T575_P1C3(2,4) ) +...
abs( PP_T575_P1C3(747, 3) - Data_T575_P1C3(7,4) ) +...
abs( PP_T575_P1C3(747, 4) - Data_T575_P1C3(9,4) ) +...
abs( PP_T575_P1C3(747, 5) - Data_T575_P1C3(8,4) ) +...
abs( PP_T575_P1C3(747, 6) - Data_T575_P1C3(6,4) ) +...
abs( PP_T575_P1C3(747, 7) - Data_T575_P1C3(3,4) ) +...
abs( PP_T575_P1C3(747, 8) - Data_T575_P1C3(4,4) ) +...
abs( PP_T575_P1C3(747, 9) - Data_T575_P1C3(5,4) ) ;
fitness(9) = abs( PP_T600_P1C3(36, 1) - Data_T600_P1C3(1,1) ) +...
abs( PP_T600_P1C3(36, 2) - Data_T600_P1C3(2,1) ) +...
abs( PP_T600_P1C3(36, 3) - Data_T600_P1C3(7,1) ) +...
abs( PP_T600_P1C3(36, 4) - Data_T600_P1C3(9,1) ) +...
abs( PP_T600_P1C3(36, 5) - Data_T600_P1C3(8,1) ) +...
abs( PP_T600_P1C3(36, 6) - Data_T600_P1C3(6,1) ) +...
abs( PP_T600_P1C3(36, 7) - Data_T600_P1C3(3,1) ) +...
abs( PP_T600_P1C3(36, 8) - Data_T600_P1C3(4,1) ) +...
abs( PP_T600_P1C3(36, 9) - Data_T600_P1C3(5,1) ) +...
abs( PP_T600_P1C3(61, 1) - Data_T600_P1C3(1,2) ) +...
abs( PP_T600_P1C3(61, 2) - Data_T600_P1C3(2,2) ) +...
abs( PP_T600_P1C3(61, 3) - Data_T600_P1C3(7,2) ) +...
abs( PP_T600_P1C3(61, 4) - Data_T600_P1C3(9,2) ) +...
abs( PP_T600_P1C3(61, 5) - Data_T600_P1C3(8,2) ) +...
abs( PP_T600_P1C3(61, 6) - Data_T600_P1C3(6,2) ) +...
abs( PP_T600_P1C3(61, 7) - Data_T600_P1C3(3,2) ) +...
abs( PP_T600_P1C3(61, 8) - Data_T600_P1C3(4,2) ) +...
abs( PP_T600_P1C3(61, 9) - Data_T600_P1C3(5,2) ) +...
abs( PP_T600_P1C3(183, 1) - Data_T600_P1C3(1,3) ) +...
abs( PP_T600_P1C3(183, 2) - Data_T600_P1C3(2,3) ) +...
abs( PP_T600_P1C3(183, 3) - Data_T600_P1C3(7,3) ) +...
abs( PP_T600_P1C3(183, 4) - Data_T600_P1C3(9,3) ) +...
abs( PP_T600_P1C3(183, 5) - Data_T600_P1C3(8,3) ) +...
abs( PP_T600_P1C3(183, 6) - Data_T600_P1C3(6,3) ) +...
abs( PP_T600_P1C3(183, 7) - Data_T600_P1C3(3,3) ) +...
abs( PP_T600_P1C3(183, 8) - Data_T600_P1C3(4,3) ) +...
abs( PP_T600_P1C3(183, 9) - Data_T600_P1C3(5,3) ) +...
abs( PP_T600_P1C3(747, 1) - Data_T600_P1C3(1,4) ) +...
abs( PP_T600_P1C3(747, 2) - Data_T600_P1C3(2,4) ) +...
abs( PP_T600_P1C3(747, 3) - Data_T600_P1C3(7,4) ) +...
abs( PP_T600_P1C3(747, 4) - Data_T600_P1C3(9,4) ) +...
abs( PP_T600_P1C3(747, 5) - Data_T600_P1C3(8,4) ) +...
abs( PP_T600_P1C3(747, 6) - Data_T600_P1C3(6,4) ) +...
abs( PP_T600_P1C3(747, 7) - Data_T600_P1C3(3,4) ) +...
abs( PP_T600_P1C3(747, 8) - Data_T600_P1C3(4,4) ) +...
abs( PP_T600_P1C3(747, 9) - Data_T600_P1C3(5,4) ) ;
fitness = sum (fitness ) ;
catch
fitness = 10^6 ;
end
end
(4) ODPC_IC.m
function [PP] = ODPC_IC(Op_pres, Feed_ratio, No_Components)
PP = zeros(1, No_Components) ; % Pre-allocation of Initial Condition
PP(1) = Op_pres * Feed_ratio / (1 + Feed_ratio ) ;
PP(2) = Op_pres * 1 / (1 + Feed_ratio ) ;
end
Besides the above, any useful comments are welcomed :D
Thanks,

Accepted Answer

Star Strider
Star Strider on 31 May 2021
  4 Comments

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by