Edit: The Octave script:

Code: Select all

`clear();`

Umax = 50; # V, max bus voltage to simulate

Z1 = 36; # V, zener breakdown voltage, also simulation start

R1 = 25; # Ω, value of power resistor

R2 = 820; # Ω, value of base resistor

# From BDX33C datasheet:

Q1_hFE = 750;

U_SOA = [ 1 7 25.0 100.0 ];

I_SOA = [ 10 10 2.5 0.1 ];

U_junc = 1.3; # Junction voltage drop

U = Z1-0.5:0.01:Umax;

Q1_Ibase = (U - Z1 - U_junc) / R2;

Q1_Ibase = max(Q1_Ibase, 0);

Q1_IEmax = Q1_Ibase * (Q1_hFE + 1);

R1_Imax = (U - U_junc) / R1;

R1_Imax = max(R1_Imax, 0);

I = min(Q1_IEmax, R1_Imax);

P_tot = U .* I;

R1_U = I * R1;

R1_P = R1_U .* I;

Q1_U = U - R1_U;

Q1_P = Q1_U .* I;

### Performance plot

figure(1);

ax = plotyy(U, I, U, P_tot);

grid off;

title("Energy dump performance");

xlabel("Bus voltage [V]");

ylabel(ax(1), "Sink current [A]");

ylabel(ax(2), "Total power dissipation [W]");

print("edump_performance.png", "-dpng", "-S480,480");

### Power dissipation plot

figure(2);

plot(U, Q1_P, U, R1_P);

legend("Q1", "R1");

xlim([Z1-0.5 Umax]);

grid off;

title("Component power dissipation");

xlabel("Bus voltage [V]");

ylabel("Power dissipation [W]");

print("edump_comp_dissipation.png", "-dpng", "-S480,480");

### SOA plot

figure(3);

loglog (Q1_U, I, U_SOA, I_SOA);

axis([1 200 0.1 20]);

set(gca, 'GridLineStyle', '-')

set(gca, 'MinorGridLineStyle', '-')

# Make the numbers readable by humans:

set(gca, 'XTickLabel', num2str(get(gca, 'XTick').'))

set(gca, 'YTickLabel', num2str(get(gca, 'YTick').'))

grid on;

title("BDX33C SOA plot");

xlabel("Vce [V]");

ylabel("Ic [A]");

print("edump_SOA_plot.png", "-dpng", "-S480,480");

### Print some useful values:

disp("Peak Q1 base current [A]:")

disp(max(Q1_Ibase))

disp("Peak base resistor (R2) power dissipation [W]:")

disp(max(Q1_Ibase)^2 * R2)

disp("Peak Q1 power dissipation [W]:")

disp(max(Q1_P))