13 views (last 30 days)

Show older comments

I am trying to plot current density vs voltage for the schottky diode.

This is my code so far:

clc

clear all

n = 1.02; %Ideality factor

A = 33.65; %Richardson constant

q = 1.602*10^-19; % electron charge

K = 1.38*10^-23; %Boltzmann constant

T = 300; % Absolute temperature

phi_b = 0.28; %Barrier Height

V = 0:0.2:2;

J_0 = A* (T* T)* exp((-q* phi_b)./(K* T));

J = J_0 * exp((q* V)./(n* K* T))* (1 - (exp(-q* V)./(K* T)));

plot(V, log(J ./(1 - exp(-q* V)/(k *T))))

Srijith Kasaragod
on 2 Sep 2021

Edited: Srijith Kasaragod
on 7 Sep 2021

Assuming correctness of parameters and equations, error exists only in final 2 lines of code. Multiplication to compute J must be elementwise multiplication rather than matrix multiplication. Also Botzmann constant is saved as variable 'K' and not 'k'. Making these two changes generates the plot.

J = J_0* exp((q* V)./(n* K* T)).* (1 - (exp(-q* V)./(K* T)));

plot(V, log(J ./(1 - exp(-q* V)/(K *T))));

Srijith Kasaragod
on 3 Sep 2021

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

Start Hunting!