plot ebers-moll equations of input current versus input voltage as function of six fixed values of output voltage for a common emitter bjt in matlab

main.m
% Given parameters and constants
Is = 1e-15; % saturation current
Vt = 25e-3; % thermal voltage
beta = 100; % current gain
Vbe = linspace(0, 1, 100); % input voltage range

% Fixed output voltages
Vce_values = [1, 2, 3, 4, 5, 6]; 

figure;
hold on;

for Vce = Vce_values
    Ic = Is * (exp(Vbe/Vt) - 1); % Collector Current
    Ib = Ic/beta; % Base Current
    Vb = Vbe;
    Ie = Ic + Ib; % Emitter current
    Re = 1000; % Emitter resistance
    
    Iin = Ib + (Ie*(1+Re)) - (Vce*(1+Re)/Re);
    
    plot(Vbe, Iin, 'DisplayName', ['Vce = ', num2str(Vce)]);
end

xlabel('Input Voltage (Vbe)'); 
ylabel('Input Current (Iin)');
title('Input Current vs Input Voltage for Common Emitter BJT');
legend('show');
grid on;

hold off;
728 chars
32 lines

This code snippet calculates and plots the input current versus the input voltage for a common emitter BJT using the Ebers-Moll equations, with the plotted graph showing six fixed values of output voltage.

main.m
0 chars
1 lines

gistlibby LogSnag