我被困在绘制表面电位(shy_s)Vs栅极电压(vgb)的图表上。 我只需要解决下面的这个等式,找到每次迭代的根
vgb=vfb+shy_s+gama.*sqrt(shy_s+shy_t.*exp((shy_s-2.*shy_f)/shy_t))哪里
shy_f=0.347; %shy_f=shy_t*ln(Na/ni) shy_t=0.0259; %Thermal voltage = KT/e ; where 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] and t_ox=550 A q=1.6*10^-19; vfb=0; gama=(sqrt(2*q*es*Na)/cox);在这里,我必须找到不同的shy_s(surface potential)值vgb(gate voltage)的shy_s(surface potential)的值。
所以我尝试了不同的方法来解决它,比如
a=zeros(1,100); b=zeros(1,100); for vgb=0:0.1:10 shy_s=0; % Say p=shy_s; % And 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 for shy_s=0:0.1:30; D=p-j; if D<0 a=shy_s; break end end elseif D<0 for 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)以这种方式出现以下错误:
??? 下标索引必须是实数正整数或逻辑。
错误= =>> shy_s_vs_vgb_latest2 at 78 b(1,vgb)= a;
我再次尝试使用相当简单的技术 -
vgb=fzero(@(shy_s)vfb+shy_s+gama.*sqrt(shy_s+shy_t.*exp((shy_s-(2.*shy_f))/shy_t)),2)但它说 -
退出fzero:中止搜索包含符号更改的间隔,因为搜索期间遇到复杂的函数值。 (-0.56处的功能值为-0.56 + 62.1585i。)检查功能或使用不同的起始值重试。
vgb =
为NaN
另一种关系可用于相同的目的
(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)I am stuck on plotting a graph of surface potential(shy_s) Vs Gate voltage(vgb). I just have to solve this equation below and find the root for 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 ; where 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] and t_ox=550 A q=1.6*10^-19; vfb=0; gama=(sqrt(2*q*es*Na)/cox);Here I have to find the value of shy_s(surface potential) for different values of vgb(gate voltage).
So I tried different methods to solve it, such as
a=zeros(1,100); b=zeros(1,100); for vgb=0:0.1:10 shy_s=0; % Say p=shy_s; % And 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 for shy_s=0:0.1:30; D=p-j; if D<0 a=shy_s; break end end elseif D<0 for 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 this manner the following error shows up:
??? Subscript indices must either be real positive integers or logicals.
Error in ==> shy_s_vs_vgb_latest2 at 78 b(1,vgb)=a;
Again I tried to use rather a 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 it says-
Exiting fzero: aborting search for an interval containing a sign change because complex function value encountered during search. (Function value at -0.56 is -0.56+62.1585i.) Check function or try again with a different starting value.
vgb =
NaN
Another relation can be used for the 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)最满意答案
虽然不太可能是最好的解决方案,但以下是一个快速而肮脏的技巧:
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);VAL是您希望找到的逆数。
Here how to use the function fzero for a simple iteration with out doing much -
for i=1:length(vgb)
c=@(shy_s)((vgb(i)-vfb-shy_s)/gama)-sqrt(abs(shy_s+shy_t.*exp((shy_s-2.*shy_f)/shy_t)));
shy_s=fzero(c,[-3 10])
a(i)=shy_s
end
'a' gives the correct iterated value!更多推荐
发布评论