Iterations of an indirect equation using MATLAB -


i stuck on plotting graph of surface potential(shy_s) vs gate voltage(vgb). have solve equation below , find root every iterations

vgb=vfb+shy_s+gama.*sqrt(shy_s+shy_t.*exp((shy_s-2.*shy_f)/shy_t)) 

where

shy_f=0.347; %shy_f=shy_t*ln(na/ni)  shy_t=0.0259;   %thermal voltage = kt/e ; k = 1.3806*10^-23 @ 300 k         es=11.7*8.85*10^-12;   na=10^10; %[unit]=[m^-3)  cox=6.93*10^-12; %[unit]=[f/m^2] , t_ox=550  q=1.6*10^-19;  vfb=0;  gama=(sqrt(2*q*es*na)/cox); 

here have find value of shy_s(surface potential) different values of vgb(gate voltage).

so tried different methods solve it, such as

a=zeros(1,100);  b=zeros(1,100);  vgb=0:0.1:10  shy_s=0;  %   p=shy_s;  % ,  j=vgb-vfb-((sqrt(2*q*es*10^10))/cox).*sqrt(shy_s+shy_t.*exp((shy_s-2.*shy_f)/shy_t));  d=p-j;  if d>0     shy_s=0:0.1:30;      d=p-j;      if d<0          a=shy_s;          break      end    end  elseif d<0    shy_s=0:0.1:30      d=p-j;      if d>0          a=shy_s;          break      end    end  end  b(1,vgb)=a;  end  plot(vgb,b) 

at manner following error shows up:

??? subscript indices must either real positive integers or logicals.

error in ==> shy_s_vs_vgb_latest2 @ 78 b(1,vgb)=a;

again tried use rather simpler technique-

vgb=fzero(@(shy_s)vfb+shy_s+gama.*sqrt(shy_s+shy_t.*exp((shy_s-(2.*shy_f))/shy_t)),2) 

but says-

exiting fzero: aborting search interval containing sign change because complex function value encountered during search. (function value @ -0.56 -0.56+62.1585i.) check function or try again different starting value.

vgb =

nan

another relation can used same purpose

(vgb-vfb-shy_s)/gama)^2 = shy_s+shy_t.*(exp((shy_s-2*shy_f)/shy_y))+shy_t.*(exp(-shy_s/shy_t)-1)  

although not best solution, quick , dirty trick following:

opt = optimset('tolfun',1e-8); vgb=@(shy_s) vfb+shy_s+gama.*sqrt(shy_s+shy_t.*exp((shy_s-2.*shy_f)/shy_t)); b = fminsearch(@(shy_s) abs(vgb(shy_s)-val),10,opt); 

with val being number wish find inverse for.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

c# - SharpSVN - How to get the previous revision? -

php cli reading files and how to fix it? -