Na=Nd=10^16 cm^(-3),ni=1.5×10^10 cm^(-3),Dn=25cm^2/s,Dp=10cm^2/s,τp0=τn0=5×10^(-7) s,基于以上条件,写出y-x曲线的半对数图matlab和P-N结的I-V特性曲线matlab
时间: 2024-04-26 21:26:30 浏览: 155
以下是y-x曲线的半对数图matlab代码:
```
% 定义常数
Na = 1e16; % cm^-3
Nd = 1e16; % cm^-3
ni = 1.5e10; % cm^-3
Dn = 25; % cm^2/s
Dp = 10; % cm^2/s
tp0 = 5e-7; % s
tn0 = 5e-7; % s
k = 1.38e-23; % J/K
q = 1.6e-19; % C
% 定义x轴范围
x = logspace(0, 4, 100);
% 计算y值
y = zeros(size(x));
for i = 1:length(x)
n = Na + (ni^2) ./ Nd .* exp(x(i) / k);
p = Nd + (ni^2) ./ Na .* exp(-x(i) / k);
Tn = tp0 .* (n ./ ni).^(-2/3);
Tp = tn0 .* (p ./ ni).^(-2/3);
y(i) = sqrt(Dn .* Tn) + sqrt(Dp .* Tp);
end
% 画图
semilogx(x, y);
xlabel('log(x)');
ylabel('y');
title('y-x Curve');
```
以下是P-N结的I-V特性曲线matlab代码:
```
% 定义常数
Na = 1e16; % cm^-3
Nd = 1e16; % cm^-3
ni = 1.5e10; % cm^-3
Dn = 25; % cm^2/s
Dp = 10; % cm^2/s
tp0 = 5e-7; % s
tn0 = 5e-7; % s
k = 1.38e-23; % J/K
q = 1.6e-19; % C
% 定义x轴范围
V = linspace(-1, 1, 100);
% 计算I值
I = zeros(size(V));
for i = 1:length(V)
if V(i) <= 0
n = ni^2 ./ Na .* exp(V(i) / (k .* 0.0259));
p = Nd;
else
n = Na;
p = ni^2 ./ Nd .* exp(-V(i) / (k .* 0.0259));
end
Tn = tp0 .* (n ./ ni).^(-2/3);
Tp = tn0 .* (p ./ ni).^(-2/3);
Jn = q .* n .* sqrt(Dn .* Tn) .* exp(q .* V(i) / (k .* 0.0259 .* Tn));
Jp = q .* p .* sqrt(Dp .* Tp) .* exp(-q .* V(i) / (k .* 0.0259 .* Tp));
I(i) = Jn - Jp;
end
% 画图
plot(V, I);
xlabel('V');
ylabel('I');
title('P-N Junction I-V Characteristic');
```
需要注意的是,在计算P-N结的I-V特性曲线时,需要将温度换算为开尔文温度。因为在公式中,温度是以开尔文温度为单位的。
阅读全文