Menu

Example

Dirk Krause

   Home       Installation       Example       Reference       Change log   

How to use the electronics package

The problem

transistor amplifier

A given transistor T1 is used in a transistor amplifier.

The recommended BIAS is:
 UCE=5V  UBE=0.6V  IC=2mA  IB=10μA
 
H parameters for the BIAS are as follows:
 h11=hi=2.7   h12=hb=1.5·10-4   h21=hf=200   h22=ho=18μS 
 
Some further constaints are known:
URE=0.6V  DC voltage on BIAS stabilization resistor RE
RS=3  Signal generator impedance
RA=3  Next stage input impedance
UB=12V  DC power supply

Our task is to find values from the E24 series for R1, R2, RC, and RE to set up the BIAS and to calculate voltage gain vu, amplifiers input impedance Rin, and amplifiers output impedance Rout.

To have a cut-off frequenzy fc=60Hz we choose a maximum attenuation of 1.5 dB for coupling connections.
Capacitors are choosen from the E6 series (20% tolerance).

The solution

Assign symbols to voltages and currents

transistor amplifier

First we assign symbols to some voltages and currents, either already known or easily to calculate.

For IQ some books recommend 35IB, others recommend 510IB. Larger IQ results in a more stable circuit, particularly with regard to manufacturing tolerances.
So we use IQ=10IB here.

Resistors to set up BIAS

URC=UB-UCE-URE  Voltage on RC
RC=URCIC  Calculated RC value
R1=UB-UBE-URE  Voltage on R1
IR1=IQ+IB=11IB  Current through R1
R1=UR1IR1  Calculated R1 value
UR2=UBE+URE  Voltage on R2
IQ=10IB  Current through R2
R2=UR2IQ  Calculated R2 value

AC equivalent circuit

AC equivalent circuit

The AC equivalent circuit shown above can be reduced to the circuit below using

RG=RS||R1||R2  Generator impedance
RL=RC||RA  Load impedance / load resistor

AC equivalent circuit

Summarized two-gate circuit

AC equivalent circuit

Next we want to reduce the two two-gate circuits for transistor and RE (gray dashed lines) to one large two-gate circuit (red dashed line).
The small two-gate circuits are serial-serial connected, so we have to add the Z parameters of these circuits to find the Z parameters of the resulting two-gate circuit.

ZTr = 1 h22 ( deth h12 -h21 1 ) ZRE = ( RE RE RE RE ) Z = ZTr+ZRE vu = RL Z21 detZ+RLZ11 ri = detZ + RLZ11 Z22 + RL r o = RG Z22 + det Z Z11 + RG vi = - Z 21 Z22 + RL

Using GNU Octave for calculations

Load “electronics” package.

pkg load electronics;

Enter given values

rs=3e3;     # Signal voltage source impedance
ra=3e3;     # Load resistor
b=200;      # Transistors I_C / I_B relation
ube=0.6;    # BIAS base to emitter voltage
uce=5;      # BIAS collector to emitter voltage
ic=2e-3;    # BIAS collector current
ure=0.6;    # Voltage on feedback resistor R_E
ub=12;      # DC power supply voltage

# h parameters in BIAS
htr = [ 2.7e3 , 1.5e-4 ; 200 , 18e-6 ];

Calculate the resistors

rc = (ub - uce - ure) / ic;
re = ure / (ic * (1 + 1/b));
ib = ic / b;
iq = 10*ib;
r2 = (ube + ure) / iq;
r1 = (ub - ube - ure) / (iq + ib);

Show calculated resistor values

printf("R1 (exact calculation): %g\n", r1);
printf("R2 (exact calculation): %g\n", r2);
printf("RC (exact calculation): %g\n", rc);
printf("RE (exact calculation): %g\n", re);

Find resistor values from E24 series

r1 = E24_value(r1);
r2 = E24_value(r2);
rc = E24_value(rc);
re = E24_value(re);

Show selected values

printf("R1 (E24 series):        %g\n", r1);
printf("R2 (E24 series):        %g\n", r2);
printf("RC (E24 series):        %g\n", rc);
printf("RE (E24 series):        %g\n", re);

Combine parallel resistors

rg = parallel_impedance(rs, r1, r2);
rl = parallel_impedance(rc, ra);

Convert transistors H parameters to Z parameters

ztr = h_params_to_z(htr);

Find Z parameters for RE

zre = z_params_resistor_vertical(re);

Sum of Z parameters for serial connection of transistor and RE

z = ztr + zre;

Calculate operational characteristics

[vu, ri, ro, vi] = z_params_op_characteristics(z, rg, rl);

Calculate amplifiers input and output impedance

Rin = parallel_impedance(r1, r2, ri);
Rout = parallel_impedance(ro, rc);

Calculate coupling capacitors

Cin = coupling_capacitor(rs, Rin, 60.0, 1.5);
Cin = E6_value_up( increase_for_tolerance(Cin, 20.0) );

Cout = coupling_capacitor(Rout, ra, 60.0, 1.5);
Cout = E6_value_up( increase_for_tolerance(Cout, 20.0) );

The value returned by coupling_capacitor() is the minimum required to reach the specified maximum attenuation. We want to use capacitors having a tolerance of 20 %, so we have to ensure the capacitor value with tolerance applied does not fall below that calculated value. When selecting an E6 series value we must select a value not less than the calculated value.

Show results

printf("v_u   = %g\n", round_leading_digits(3, vu));
printf("v_i   = %g\n", round_leading_digits(3, vi));
printf("r_i   = %g\n", round_leading_digits(3, ri));
printf("r_o   = %g\n", round_leading_digits(3, ro));
printf("R_in  = %g\n", round_leading_digits(3, Rin));
printf("R_out = %g\n", round_leading_digits(3, Rout));
printf("Two-gate circuit:\n");
printf("v_u    = %g\n", round_leading_digits(3, vu));
printf("v_i    = %g\n", round_leading_digits(3, vi));
printf("r_i    = %g\n", round_leading_digits(3, ri));
printf("r_o    = %g\n", round_leading_digits(3, ro));
printf("Entire amplifier:\n");
printf("R_in   = %g\n", round_leading_digits(3, Rin));
printf("R_out  = %g\n", round_leading_digits(3, Rout));
printf("Coupling capacitors:\n");
printf("CK1    = %g\n", CK1);
printf("CK2    = %g\n", CK2);

Output from the example-with-electronics-package.m file

R1 (exact calculation): 98181.8
R2 (exact calculation): 12000
RC (exact calculation): 3200
RE (exact calculation): 298.507
R1 (E24 series): 100000
R2 (E24 series): 12000
RC (E24 series): 3300
RE (E24 series): 300
Two-gate circuit:
v_u = -4.99
v_i = 193
r_i = 61000
r_o = 988000
Entire amplifier:
R_in = 9110
R_out = 3290
Coupling capacitors:
CK1 = 4.7e-07
CK2 = 1e-06


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.