% ejemplo 9.8, Aström_Adaptive Control, pag. 409
% "pH control, critical gain"
% elaboro E.Quintero.M 21sep'09
%-------------------------------------------------
clear
% parametros
ca=0.001; q=1000; V=1000; cb=1; kw=1e-14;
pH=6; T=0.1; yy=[];
for i=1:4
   pH=pH+1;
   df=log10(exp(1))/(10^(pH-14)+10^(-pH));
   kc=2*q/(df*cb*T);
   yy=[yy; pH kc];
end
yy
