ENGN3227 Analogue Electronics Problem Sets V1.0 Dr. Salman

advertisement
ENGN3227 Analogue Electronics
Problem Sets
V1.0
Dr. Salman Durrani
November 2006
c 2006 by Salman Durrani.
Copyright Problem Set List
1. Op-amp Circuits
2. Differential Amplifiers
3. Comparator Circuits
4. Digital to Analog Converters
5. Op-amp Frequency Response
6. Active Filter Circuits
7. Filter Design
8. 555 Timer Circuits
9. Oscillator Circuits
10. Instrumentation Amplifier
11. Integrator and Differentiator
12. Matlab Circuits
3
ANU
ENGN 3227
AUSTRALIAN NATIONAL UNIVERSITY
Department of Engineering
ENGN 3227 Analogue Electronics
Problem Set #01 Operational Amplifier Circuits
Q1
Consider the circuit shown in Figure 1. Assume Aol = 2 × 105 , Rout = 75 Ω, Rin = 2 MΩ, fT = 1 MHz, SR =
0.5 V/µs, R1 = 10 kΩ, R2 = 220 kΩ, RL = 10 kΩ.
(a) Derive an expression for closed-loop gain Acl . Express Acl in standard form. What is Acl for the special
case when Aol → ∞.
(b) Find the optimum value of Rc .
(c) Find the values of closed loop gain, closed loop input resistance and closed loop output resistance.
(d) Examine the stability of Acl if Aol increases from 2 × 105 to 5 × 105 .
(e) Find the maximum frequency of a 0.1V peak sine-wave input that can be amplified without distortion.
Rc
vin
vout
R1
RL
R2
Figure 1: The circuit for Question 1.
Q2
Repeat Q1 (c),(e) for a buffer amplifier.
Q3
Consider the circuit shown in Figure 2. Assume Aol = 2 × 105 , Rout = 75 Ω, Rin = 2 MΩ, fT = 1 MHz, SR =
0.5 V/µs, R1 = 1 kΩ, R2 = 100 kΩ, RL = 10 kΩ.
(a) Derive an expression for closed-loop gain Acl . Express Acl in standard form. What is Acl for the special
case when Aol → ∞.
(b) Find the optimum value of Rc .
(c) Find the values of closed loop gain, closed loop input resistance and closed loop output resistance.
(d) Examine the stability of Acl if Aol increases from 2 × 105 to 5 × 105 .
(e) Find the maximum frequency of a 0.1V peak sine-wave input that can be amplified without distortion.
R2
vin
R1
vout
Rc
RL
Figure 2: The circuit for Question 3.
Problem Set #01
page 1
ANU
ENGN 3227
Q4
Consider the difference amplifier circuit shown in Figure 3.
(a) Derive an expression for output voltage vout . What is vout for the special case when Aol → ∞.
(b) Design the difference amplifier circuit to produce output vout = 0.5(v1 − v2 ).
R2
v1
R1
v2
R1
vout
R2
RL
Figure 3: The circuit for Question 4.
Problem Set #01
page 2
ANU
ENGN 3227
AUSTRALIAN NATIONAL UNIVERSITY
Department of Engineering
ENGN 3227 Analogue Electronics
Problem Set #01 Solution
Q1
Complete Solution
The given circuit is
Rc
vin
vout
R1
R2
RL
The given data is
Aol = 2 × 105 , Rout = 75 Ω, Rin = 2 MΩ, fT = 1 MHz, SR = 0.5 V/µs, R1 = 1 kΩ, R2 = 100 kΩ, RL = 10 kΩ.
(a)
Acl
Acl
Acl
Aol (R1 + R2 )
R1 + R2 + Aol R1
R2
(when Aol → ∞)
= 1+
R1
Aol
R1
=
(where feedback ratio B =
)
1 + Aol B
R1 + R2
=
See Lecture 04 for complete derivation steps.
(b)
The optimum value of bias-current compensating resistor is
Rc
= R1 ||R2
= 220k||10k = 9.56 kΩ
(c)
The closed loop gain is given by
B =
=
Acl
=
=
R1
R1 + R2
10k
1
=
10k + 220k 23
Aol
1 + Aol B
2 × 105
5 = 22.997
1 + 2×10
23
Problem Set #01
page 3
ANU
ENGN 3227
The closed loop input and output resistances are given by
Rin(cl)
= Rin (1 + BAol )
= 2 × 106 (1 +
Ro(cl)
=
=
2 × 105
) = 17.393 GΩ
23
Ro
(1 + BAol )
75
5 = 8.624 mΩ
1 + 2×10
23
(d)
For A1(ol) = 2 × 105 , A1(cl) = 22.997.
For A2(ol) = 5 × 105 , A1(cl) =
5×105
5
1+ 5×10
23
= 22.998.
% change in Aol is
A2(ol) − A1(ol)
× 100
∆Aol =
A1(ol)
5 × 105 − 2 × 105
=
× 100 = 150%
2 × 105
% change in Acl is
A2(cl) − A1(cl)
∆Acl =
× 100
A1(cl)
22.998 − 22.997
=
× 100 = 0.00434%
22.997
We can see that a 150% increase in Aol results in only 0.00434% increase in Acl , i.e. Acl is a stable parameter.
(e)
From bandwidth limitation, the upper frequency limit is
fc(cl)
=
=
fT
Acl
1 × 106
= 43.48 kHz
22.997
From slew rate limitation, the upper frequency limit is
f
=
SR
2πVo(p)
=
0.5 × 106
= 34.59 kHz
2π(22.997)(0.1)
We see that in this case, the slew rate sets the upper limit. Hence the maximum frequency of 0.1V peak sine
wave that can be amplified without distortion is fmax = 34.59 kHz.
Problem Set #01
page 4
ANU
ENGN 3227
Q2
Complete Solution
The given circuit is
vin
vout
The given data is
Aol = 2 × 105 , Rout = 75 Ω, Rin = 2 MΩ, fT = 1 MHz, SR = 0.5 V/µs, RL = 10 kΩ.
(c)
For buffer amplifier, the closed loop gain is given by
B = 1
Acl
Aol
1 + Aol B
2 × 105
= 0.999995 ≈ 1
1 + (2 × 105 )(1)
=
=
The closed loop input and output resistances are given by
= Rin (1 + BAol )
Rin(cl)
= 26 [1 + (2 × 105 )(1)] = 400 GΩ
Ro
=
(1 + BAol )
75
=
= 0.375 mΩ
[1 + (2 × 105 )(1)]
Ro(cl)
Note: Compare these values with the answers in Q1(c) and Q3(c). We can see that buffer amplifier has highest
input resistance and lowest output resistance of the three op-amp configurations.
(e)
For buffer amplifier, from bandwidth limitation, the upper frequency limit is
fc(cl)
=
=
fT
Acl
1 × 106
= 1 MHz
1
From slew rate limitation, the upper frequency limit is
fSR
=
SR
2πVo(p)
=
0.5 × 106
= 34.59 kHz
2π(22.997)(0.1)
We see that in this case, the slew rate sets the upper limit. Hence the maximum frequency of 0.1V peak sine
wave that can be passed without distortion is fmax = 34.59 kHz.
Problem Set #01
page 5
ANU
ENGN 3227
Q3
Complete Solution
The given circuit is
R2
vin
R1
vout
Rc
RL
The given data is
Aol = 2 × 105 , Rout = 75 Ω, Rin = 2 MΩ, fT = 1 MHz, SR = 0.5 V/µs, R1 = 1 kΩ, R2 = 100 kΩ, RL = 10 kΩ.
(a)
Acl
Acl
Acl
Aol R2
R1 + R2 + Aol R1
R2
= −
(when Aol → ∞)
R1
R1
Aol
(where feedback ratio B = )
= −
1 + Aol B
R2
= −
See Lecture 04 for complete derivation steps.
(b)
The optimum value of bias-current compensating resistor is
Rc
= R1 ||R2
= 1k||100k = 990.01 Ω
(c)
The closed loop gain is given by
R1
B =
R2
1k
1
=
=
100k 100
Aol
Acl = −
1 + Aol B
2 × 105
= −
5 = −99.95
1 + 2×10
100
The closed loop input and output resistances are given by
Rin(cl)
Ro(cl)
= R1
= 1 kΩ
Ro
=
(1 + BAol )
75
=
5 = 37.48 mΩ
1 + 2×10
100
Problem Set #01
page 6
ANU
ENGN 3227
(d)
For A1(ol) = 2 × 105 , A1(cl) = −99.95.
For A2(ol) = 5 × 105 , A1(cl) = −
5×105
5
1+ 5×10
100
= −99.98.
% change in Aol is
A2(ol) − A1(ol)
× 100
∆Aol =
A1(ol)
5 × 105 − 2 × 105
=
× 100 = 150%
2 × 105
% change in Acl is
A2(cl) − A1(cl)
∆Acl =
× 100
A1(cl)
−99.98 + 99.95
=
× 100 = 0.03%
−99.95
We can see that a 150% increase in Aol results in only 0.03% increase in Acl , i.e. Acl is a stable parameter.
(e)
From bandwidth limitation, the upper frequency limit is
fc(cl)
=
fT
|Acl |
=
1 × 106
= 10.005 kHz
99.95
From slew rate limitation, the upper frequency limit is
f
=
SR
2πVo(p)
=
0.5 × 106
= 7.96 kHz
2π(| − 99.95|)(0.1)
We see that in this case, the slew rate sets the upper limit. Hence the maximum frequency of 0.1V peak sine
wave that can be amplified without distortion is fmax = 7.96 kHz.
Note: Compare these values with the answers in Q1(e). We see that higher the closed loop gain, more strict
the frequency limitations.
Problem Set #01
page 7
ANU
ENGN 3227
Q4
Partial Solution
The given circuit is
R2
v1
R1
v2
R1
vout
R2
RL
(a)
v+
v−
vin
vout
R2
v2
R1 + R2
R2
R1
=
v1 +
vout
R1 + R2
R1 + R2
= (v+ ) − (v− )
= Aol vin
=
The output voltage is
vout
=
vout
=
Aol R2
(v2 − v1 )
R1 + R2 + Aol R1
R2
(v2 − v1 )
(when Aol → ∞)
R1
(b)
vout = 0.5(v2 − v1 ).
RL = 10 kΩ (assume)
R1 = 10 kΩ (assume).
R2 = 5 kΩ (calculate from output voltage formula).
Problem Set #01
page 8
ANU
ENGN 3227
AUSTRALIAN NATIONAL UNIVERSITY
Department of Engineering
ENGN 3227 Analogue Electronics
Problem Set #02 Differential Amplifiers
Q1
Consider the circuit shown in Figure 1.
Assume RC = 2.2 kΩ, RE = 4.7 kΩ, +VCC = 10 V, −VEE = −10 V, β = 100, VBE = 0.7 V, VT = 26 mV.
(a) Derive an expression for differential voltage gain Ad of the amplifier.
(b) Determine the Q-point.
(c) What is the maximum peak to peak output voltage without clipping.
(d) Find the values of differential voltage gain, input resistance and output resistance.
(e) Determine the output voltage vout (t) if vin1 = 5 × 10−3 sin(2π1000t) and vin2 = 2 × 10−3 sin(2π1000t).
+VCC
RC RC
- +
vo1 vo2
vin1
vin2
RE
-VEE
Figure 1: The circuit for Question 1.
Q2
Consider the circuit shown in Figure 1.
Assume RC = 1.5 kΩ, RE = 4.7 kΩ, +VCC = 15 V, −VEE = −15 V, β = 100, VBE = 0.7 V, VT = 26 mV.
(a) Derive an expression for differential voltage gain Ad of the amplifier.
(b) Determine the Q-point.
(c) What is the maximum peak to peak output voltage without clipping.
(d) Find the values of differential voltage gain, input resistance and output resistance.
(e) Determine the output voltage vout (t) if vin1 = 5 × 10−3 sin(2π1000t) and vin2 = −5 × 10−3 sin(2π1000t).
Problem Set #02
page 1
ANU
ENGN 3227
AUSTRALIAN NATIONAL UNIVERSITY
Department of Engineering
ENGN 3227 Analogue Electronics
Problem Set #02 Solution
Q1
Complete Solution
The given circuit is
+VCC
RC RC
- +
vo1 vo2
vin1
vin2
RE
-VEE
The given data is
Assume RC = 2.2 kΩ, RE = 4.7 kΩ, +VCC = 10 V, −VEE = −10 V, β = 100, VBE = 0.7 V, VT = 26 mV.
(a)
Ad
RC
re
=
See Lecture 05 for complete derivation steps.
(b)
The find the Q-point, we have to determine values of ICQ and VCEQ .
ICQ
=
VCEQ
VEE −VBE
2RE
10 − 0.7
2(4.7k)
0.989 mA
VCC +VBE − RC ICQ
10 + 0.7 − (2.2k)(0.989m)
8.52 V
= IE =
=
=
=
=
Hence the Q-point is (0.989 mA, 8.52 V).
Problem Set #02
page 2
ANU
ENGN 3227
(c)
Each BJT can swing to a maximum collector voltage of +VCC at cutoff and a minimum voltage of approximately 0 V (dc level of the bases) at saturation. The output voltage is the difference of the two collector
voltages and the collector voltages moves in the opposite direction by an equal amount.
The voltage drop across each collector resistor is
VRC
= RC IC
= (2.2k)(0.989m)
= 2.17 V < VCE
This means that the maximum change in voltage across each collector resistor is ±(2.17) V or 4.35 V peak
to peak.
The maximum peak-to-peak output voltage without clipping is (2)(4.35) = 8.7 V.
See PSPICE: P02_Q01.sch.
(d)
The differential voltage gain is
re
=
=
=
Ad
=
=
=
VT
ICQ
26m
0.989m
26.29 Ω
RC
re
2.2k
26.29
83.68
The input and output resistances are
Rin1 = Rin2
Ro1 = Ro2
=
=
=
=
=
2(β + 1)re
2(101)(26.29)
5.31 kΩ
RC
2.2 kΩ
(e)
The output voltage is
vin1 (t) = 5 × 10−3 sin(2π1000t)
vin2 (t) = 2 × 10−3 sin(2π1000t)
vout (t) = Ad (vin1 − vin2 )
= 83.68(3 × 10−3 sin(2π1000t))
= 0.251 sin(2π1000t)
Note:
(i) The output is in phase with the differential input voltage.
(ii) no clipping will take place.
Problem Set #02
page 3
ANU
ENGN 3227
Q2
Partial Solution
The given circuit is
+VCC
RC RC
- +
vo1 vo2
vin1
vin2
RE
-VEE
The given data is
Assume RC = 1.5 kΩ, RE = 4.7 kΩ, +VCC = 15 V, −VEE = −15 V, β = 100, VBE = 0.7 V, VT = 26 mV.
(a)
See Lecture 05 for complete derivation steps.
(b)
ICQ
VCEQ
= 1.52 mA
= 13.42 V
(c)
Each BJT can swing to a maximum collector voltage of +VCC at cutoff and a minimum voltage of approximately 0 V (dc level of the bases) at saturation. The output voltage is the difference of the two collector
voltages and the collector voltages moves in the opposite direction by an equal amount.
The voltage drop across each collector resistor is
VRC
= RC IC
= (1.5k)(1.52m)
= 2.28 V < VCE
This means that the maximum change in voltage across each collector resistor is ±(2.28) V or 4.56 V peak
to peak.
The maximum peak-to-peak output voltage without clipping is (2)(4.56) = 9.12 V.
Verify using PSPICE.
Problem Set #02
page 4
ANU
ENGN 3227
(d)
re
Ad
Rin1 = Rin2
Ro1 = Ro2
=
=
=
=
17.1 Ω
87.72
3.45 kΩ
1.5 kΩ
(e)
vout (t) = 0.877 sin(2π1000t)
Problem Set #02
page 5
ANU
ENGN 3227
AUSTRALIAN NATIONAL UNIVERSITY
Department of Engineering
ENGN 3227 Analogue Electronics
Problem Set #03 Comparators
Q1
Consider the circuit shown in Figure 1.
Assume R1 = 50 kΩ, R2 = 50 kΩ, +VCC = 5 V, −VEE = −5 V, |Vout(max) | = power supply voltage.
(a) Derive expressions for upper and lower trigger points of the comparator.
(b) Sketch the output if vin = 5 sin(2π1000t).
vin
vout
R2
R1
Figure 1: The circuit for Question 2.
Q2
Consider the circuit shown in Figure 2.
Assume R1 = 50 kΩ, R2 = 50 kΩ, R3 = 100 kΩ, +VCC = 10 V, −VEE = −10 V, Vre f = 5 V, |Vout(max) | =
power supply voltage.
(a) Derive expressions for upper and lower trigger points of the comparator.
(b) Sketch the output if vin = 5 sin(2π1000t).
vin
vout
Vref
R2
R1
R3
Figure 2: The circuit for Question 3.
Problem Set #03
page 1
ANU
ENGN 3227
Q3
Consider the circuit shown in Figure 3.
Assume R1 = 50 kΩ, R2 = 50 kΩ, +VCC = 15 V, −VEE = −15 V, VZ = 4.7 V, VD = 0.7 V.
(a) Find the bounded maximum output voltages.
(b) Find values of upper and lower trigger points of the comparator.
(c) Sketch the output if vin = 6 sin(2π1000t).
Z1
Z2
Rc
vin
vout
R1
R2
Figure 3: The circuit for Question 3.
Q4
Consider the circuit shown in Figure 3.
Assume R1 = 10 kΩ, R2 = 47 kΩ, +VCC = 15 V, −VEE = −15 V, VZ = 4.7 V, VD = 0.7 V.
(a) Find the bounded maximum output voltages.
(b) Find values of upper and lower trigger points of the comparator.
(c) Sketch the output if vin = 3 sin(2π1000t).
Problem Set #03
page 2
ANU
ENGN 3227
AUSTRALIAN NATIONAL UNIVERSITY
Department of Engineering
ENGN 3227 Analogue Electronics
Problem Set #03 Solution
Q1
Partial Solution
The given circuit data is R1 = 50 kΩ, R2 = 50 kΩ, +VCC = 5 V, −VEE = −5 V, |Vout(max) | = power supply
voltage.
vin
vout
R1
R2
(a)
VUT P
VLT P
R1
V
R1 + R2 out(max)
R1
= −
V
R1 + R2 out(max)
=
See Lecture 06 for complete derivation steps.
(b)
VUT P
VLT P
= 2.5 V
= −2.5 V
Problem Set #03
page 3
ANU
ENGN 3227
The sketch of output voltage is shown below:
6
Input
Output
4
Voltage (V)
2
0
−2
−4
−6
0
0.5
1
Time (s)
1.5
2
−3
x 10
Figure 4: Comparator output voltage vout (t).
Note: the trigger points where output changes state are highlighted by a black dot.
SEE MATLAB: L06_Example03.m and PSPICE:L06_Example03.sch.
Problem Set #03
page 4
ANU
ENGN 3227
Q2
Solution
The given circuit data is R1 = 50 kΩ, R2 = 50 kΩ, R3 = 100 kΩ, +VCC = 10 V, −VEE = −10 V, Vre f = 5 V,
|Vout(max) | = power supply voltage.
vin
Vref
vout
R2
R1
R3
(a)
VUT P
=
VLT P
=
R
R
Vre f + Vout(max)
R2
R3
R
R
Vre f − Vout(max)
R2
R3
where R = R1 ||R2 ||R3 .
(b)
R = 20 kΩ
VUT P = 4 V
VLT P = 0 V
The sketch of output voltage is shown below:
10
Input
Output
Voltage (V)
5
0
−5
−10
0
0.5
1
Time (s)
1.5
2
−3
x 10
Figure 5: Comparator output voltage vout (t).
Verify using PSPICE P03_Q02.sch.
Problem Set #03
page 5
ANU
ENGN 3227
Q3
Partial Solution
The given circuit data is R1 = 50 kΩ, R2 = 50 kΩ, +VCC = 15 V, −VEE = −15 V, VZ = 4.3 V, VD = 0.7 V.
Z1
Z2
Rc
vin
vout
R1
R2
(a)
The circuit is a double-bounded Schmitt Trigger. One zener is always forward biased when the other one is
in breakdown. We have
Vout
v−
∴ Vout
= v− ± 5
(VZ +VD = 4.3 + 0.7 = 5)
= v+
(summing point constraint due to feedback arrangement)
= v+ ± 5
(1)
Apply KCL to non-inverting pin,
v+ −Vout v+ − 0
+
R2
R1
= 0
Vout
v+
=
v+
=
Vout
2
1 + RR21
(2)
Substituting in (1)
Vout
1
1−
Vout
2
Vout
=
Vout
±5
2
= ±5
=
±5
= ±10 V
0.5
Hence Vout(max) = ±10 V.
(b)
The trigger points are
VUT P
VLT P
R1
V
=5V
R1 + R2 out(max)
R1
= −
V
= −5 V
R1 + R2 out(max)
=
Problem Set #03
page 6
ANU
ENGN 3227
(c)
The sketch of output voltage is shown below:
10
Input
Output
Voltage (V)
5
0
−5
−10
0
0.5
1
Time (s)
1.5
2
−3
x 10
Figure 6: Output voltage vout (t).
Problem Set #03
page 7
ANU
ENGN 3227
Q4
Solution
The given circuit data is R1 = 10 kΩ, R2 = 47 kΩ, +VCC = 15 V, −VEE = −15 V, VZ = 4.7 V, VD = 0.7 V.
Z1
Z2
Rc
vin
vout
R1
Vout(max)
VUT P
VLT P
R2
= ±6.55 V
= 1.15 V
= −1.15 V
The sketch of output voltage is shown below:
10
Input
Output
6.55
Voltage (V)
5
1.15
0
−1.15
−5
−6.55
−10
0
0.5
1
Time (s)
1.5
2
−3
x 10
Figure 7: Output voltage vout (t).
Problem Set #03
page 8
ANU
ENGN 3227
AUSTRALIAN NATIONAL UNIVERSITY
Department of Engineering
ENGN 3227 Analogue Electronics
Problem Set #04 Digital to Analogue Converters
Q1
Consider the DAC circuit shown in Figure 1.
Assume RF = 10 kΩ, R = 5 kΩ, +VCC = 15 V, −VEE = −15 V, VH = 5 V, VL = 0 V.
(a) Determine the resolution of the DAC.
(b) Determine the full scale output voltage of the DAC.
(c) Determine the output voltage if binary code (0101)2 is applied at the input.
(d) Determine the output voltage if binary code (1001)2 is applied at the input.
D0
RF
8R
D1
4R
D2
2R
vout
D3
R
Figure 1: The circuit for Question 1.
Q2
Consider the circuit shown in Figure 2.
Assume R = 10 kΩ, +VCC = 18 V, −VEE = −18 V.
Determine the output voltage.
+10V
+5V
2R
2R
2R
R
2R
2R
R
RF=2R
R
vout
Figure 2: The circuit for Question 2.
Problem Set #04
page 1
ANU
ENGN 3227
Q3
Consider the circuit shown in Figure 3.
Assume R = 10 kΩ, +VCC = 18 V, −VEE = −18 V.
Determine the output voltage.
+5V
2R
-5V
2R
2R
2R
2R
R
R
RF=2R
R
vout
Figure 3: The circuit for Question 3.
Q4
Consider the DAC circuit shown in Figure 4.
Assume R = 10 kΩ, +VCC = 15 V, −VEE = −15 V, VH = 5 V, VL = 0 V.
(a) Determine the resolution of the DAC.
(b) Determine the full scale output voltage of the DAC.
(c) Using the DAC equation, determine the output voltage if binary code (0101)2 is applied at the input.
(d) Using the DAC equation, determine the output voltage if binary code (1001)2 is applied at the input.
D0
2R
2R
2R
R
D3
D2
D1
2R
2R
R
RF=2R
R
vout
Figure 4: The circuit for Question 4.
Problem Set #04
page 2
ANU
ENGN 3227
AUSTRALIAN NATIONAL UNIVERSITY
Department of Engineering
ENGN 3227 Analogue Electronics
Problem Set #04 Solution
Q1
Complete Solution
The given circuit data is RF = 5 kΩ, R = 10 kΩ, +VCC = 15 V, −VEE = −15 V, VH = 5 V, VL = 0 V.
D0
8R
RF
D1
4R
D2
2R
vout
D3
R
(a)
To find the DAC resolution, we find the output voltage when input binary code is 00012 i.e. D0 = 5V and
D1 = D2 = D3 = 0V.
The equivalent circuit for this case is
+5V
8R
RF
4R
2R
vout
R
Writing KCL equation,
v− − 5 v− − vout
+
+ i−
8R
RF
0 − 5 0 − vout
+
80k
5k
vout
= 0
= 0
= −0.3125 V
Hence the resolution = −0.3125 V/LSB.
Problem Set #04
page 3
ANU
ENGN 3227
(b)
To find the full scale output voltage of the DAC, we find the output voltage when input binary code is 11112
i.e. D0 = D1 = D2 = D3 = 5V.
The equivalent circuit for this case is
+5V
8R
RF
+5V
4R
+5V
2R
vout
+5V
R
Writing KCL equation,
v− − 5 v− − 5 v− − 5 v− − 5 v− − vout
+
+
+
+
+ i−
8R
4R
2R
R
RF
0 − 5 0 − 5 0 − 5 0 − 5 0 − vout
+
+
+
+
80k
40k
20k
10k
5k
vout
= 0
= 0
= −4.6875 V
Hence Vo(FS) = −4.6875 V.
Note: For DACs, once resolution is known, Vo(FS) can also be found using resolution =
Vo(FS)
2n −1 .
(c)
Using the DAC equation
(0101)2
vout
= 510 = D
= resolution × D
= (−0.3125)(5) = −1.5625 V
(d)
Using the DAC equation
(1001)2
vout
= 910 = D
= resolution × D
= (−0.3125)(9) = −2.8125 V
Modify PSPICE: L07_Example02.sch to check answer.
Problem Set #04
page 4
ANU
ENGN 3227
Q2
Complete Solution
The given circuit data is Assume R = 10 kΩ, +VCC = 18 V, −VEE = −18 V.
The equivalent circuit is
+10V
RF=2R
+5V
2R
R
R
R
2R
2R
2R
vout
2R
VT H
The equivalent circuit for determining Thevenin equivalent voltage is
Vx
R
R
Vy
VTH
+5V
2R
2R
2R
2R
Writing KCL equations, we have
Vx − 5 Vx − 0 Vx −Vy
+
+
2R
2R
R
Vy − 0 Vy −Vx Vy −VT H
+
+
2R
R
R
VT H − 0 VT H −Vy
+
2R
R
= 0
= 0
= 0
Simplifying,
4Vx − 2Vy
−2Vx + 5Vy − 2VT H
−2Vy + 3VT H
= 5
= 0
= 0
Converting to standard matrix form,


  
4 −2 0
Vx
5
 −2 5 −2   Vy  =  0 
0 −2 3
VT H
0
Problem Set #04
page 5
ANU
ENGN 3227
Using Cramer’s rule,
4 −2 0 ∆ = −2 5 −2 0 −2 3 −2 −2
5 −2 − (−2) = (4) 0
3
−2 3 4 −2 5 −2 5 0 0 −2 0 20
VT H =
=
= 0.625 V
32
32
+ (0) −2 5
0 −2
= 32
RT H
The equivalent circuit for determining Thevenin equivalent resistance
R
R
2R
RTH
2R
2R
2R
Combining the resistances starting from far end (i.e. series and parallel combinations respectively) and moving back towards the Thevenin terminals,
RT H
= R
Overall Equivalent Circuit
The overall equivalent circuit for determining vout is
+10V
2R
R
RF=2R
v−
VTH
RTH
vout
Using KCL,
v− −VT H v− − 10 v− − vout
+
+
+ i−
RT H + R
2R
2R
vout
= 0
= −10.625 V
SEE PSPICE: P04_Q02.sch.
Problem Set #04
page 6
ANU
ENGN 3227
Q3
Partial Solution
The given circuit data is Assume R = 10 kΩ, +VCC = 18 V, −VEE = −18 V.
+5V
2R
-5V
2R
2R
R
RF=2R
2R
2R
R
R
vout
The resistors at the far end (left of +5V) can be combined to get
Req
= (2R||2R) + R = 2R
The equivalent circuit is
+5V
-5V
2R
R
RF=2R
2R
2R
R
vout
Req=2R
+5V
VT H
Vx
R
VTH
2R
Req=2R
2R
-5V
Vx − 5 Vx − 0 Vx −VT H
+
+
2R
2R
R
VT H − (−5) VT H −Vx
+
2R
R
Problem Set #04
= 0
= 0
page 7
ANU
ENGN 3227
4 −2
−2 3
∆ = VT H =
Vx
VT H
=
5
−5
4 −2 = 16
−2 3 4
5 −2 −5 −10
=
= −0.625 V
∆
16
RT H
R
2R
RTH
Req=2R
RT H
2R
= R
Overall Equivalent Circuit
RF=2R
R
v−
VTH
RTH
2R
vout
vout
= 1.25 V
SEE PSPICE: P04_Q03.sch.
Problem Set #04
page 8
ANU
ENGN 3227
Q4
Solution
The given circuit data R = 10 kΩ, +VCC = 15 V, −VEE = −15 V, VH = 5 V, VL = 0 V.
D0
2R
2R
2R
R
D3
D2
D1
2R
2R
R
RF=2R
R
vout
(a)
resolution = -0.625 V/LSB.
See Lecture 07 for complete derivation steps.
(b)
Using the DAC equation
n = 4
Vo(FS)
resolution =
2n − 1
Vo(FS) = (−0.625)(24 − 1) = −9.375 V
(c)
Using the DAC equation
(0101)2
vout
= 510 = D
= resolution × D
= (−0.625)(5) = −3.125 V
(d)
Using the DAC equation
(1001)2
vout
Problem Set #04
= 910 = D
= resolution × D
= (−0.625)(9) = −5.625 V
page 9
ANU
ENGN 3227
AUSTRALIAN NATIONAL UNIVERSITY
Department of Engineering
ENGN 3227 Analogue Electronics
Problem Set #05 Op-Amp Frequency Response
Q1
(a) Derive an expression for the op-amp open loop transfer function Aol ( f ).
(b) Derive an expression for the op-amp closed loop transfer function Acl ( f ).
Q2
Consider the circuit shown in Figure 1.
Assume Aol(mid) = 2 × 105 , Rout = 75 Ω, Rin = 2 MΩ, fT = 1 MHz, SR = 0.5 V/µs, R1 = 10 kΩ, R2 = 220 kΩ,
RL = 10 kΩ. (The data is same as in ProblemSet01: Q1)
(a) Find the closed loop transfer function Acl ( f )
(b) Find the closed loop cut-off frequency fc(cl) .
(c) Find Acl ( f ) for f = 0, 10, 100, 1k, 30k, fc(cl) , fT respectively.
(d) Find output voltage vout (t) if vin (t) = 0.1 sin(2π30000t).
Rc
vin
vout
R1
RL
R2
Figure 1: The circuit for Question 2.
Q3
Consider the circuit shown in Figure 2.
Assume Aol(mid) = 2 × 105 , Rout = 75 Ω, Rin = 2 MΩ, fT = 1 MHz, SR = 0.5 V/µs, R1 = 1 kΩ, R2 = 100 kΩ,
RL = 10 kΩ. (The data is same as in ProblemSet01: Q2)
(a) Find the closed loop transfer function Acl ( f )
(b) Find the closed loop cut-off frequency fc(cl) .
(c) Find Acl ( f ) for f = 0, 10, 100, 1k, fc(cl) , fT respectively.
(d) Find output voltage vout (t) if vin (t) = 0.1 sin(2π1000t).
R2
vin
R1
vout
Rc
RL
Figure 2: The circuit for Question 3.
Problem Set #05
page 1
ANU
ENGN 3227
Q4
Consider the circuit shown in Figure 3. Assume Aol(mid) = 2 × 105 , Rout = 75 Ω, Rin = 2 MΩ, fT = 1 MHz,
SR = 0.5 V/µs.
(a) Find the overall closed loop transfer function for the cascaded op-amps.
(b) Find output voltage vout if vin = 0.1 sin(2π10000t + 30◦ ).
R4=2 kΩ
vout1
vin
vin2 R3=1 kΩ
vout
R1=1 kΩ
R2=4 kΩ
Figure 3: The circuit for Question 4.
Problem Set #05
page 2
ANU
ENGN 3227
AUSTRALIAN NATIONAL UNIVERSITY
Department of Engineering
ENGN 3227 Analogue Electronics
Problem Set #05 Solution
Q1
Solution
(a)
Aol ( f ) =
Aol(mid)
1+ j f
f
c(ol)
See Lecture 09 for complete derivation steps.
(b)
Acl ( f ) =
Aol(mid)
1 + BAol(mid) + j f
f
c(ol)
See Lecture 09 for complete derivation steps.
Problem Set #05
page 3
ANU
ENGN 3227
Q2
Complete Solution
The given circuit data is Aol(mid) = 2×105 , Rout = 75 Ω, Rin = 2 MΩ, fT = 1 MHz, SR = 0.5 V/µs, R1 = 10 kΩ,
R2 = 220 kΩ, RL = 10 kΩ.
Rc
vin
vout
R1
R2
RL
(a)
The feedback ratio is
B =
=
R1
R1 + R2
1
10k
=
10k + 220k 23
The open loop cut-off frequency is
fc(ol)
=
=
fT
Aol
106
= 5 Hz
2 × 105
The closed loop transfer function is
Acl ( f ) =
=
=
Aol(mid)
1 + BAol(mid) + j f
f
c(ol)
2 × 105
1
1 + (2 × 105 )( 23
) + j 5f
2 × 105
8696.65 + j0.2 f
The above equation shows how closed loop gain varies with frequency.
At f = 0 Hz (i.e. DC), we have
Acl (0) =
=
=
Aol(mid)
1 + BAol(mid) + j f
0
c(ol)
Aol(mid)
1 + BAol(mid)
2 × 105
5
1 + 2×10
23
= 22.997
Compare with ProblemSet01: Q1.
Problem Set #05
page 4
ANU
ENGN 3227
(b)
The closed loop cut-off frequency can be calculated in two ways.
Using unity gain relationship and Acl (0), we have
fc(cl)
=
=
fT
Acl
1 × 106
= 43.48 kHz
22.997
Using the open loop cut-off frequency result, we have
fc(cl)
=
fc(ol) (1 + BAol(mid) )
= (5)(1 +
2 × 105
) = 43.48 kHz
23
Compare with ProblemSet01: Q1.
(c)
Acl ( f ) =
Acl (0) =
Acl (10) =
Acl (100) =
Acl (1k) =
Acl ( fc(cl) ) =
Acl ( fT ) =
2 × 105
8696.65 + j0.2 f
2 × 105
= 22.997 = 22.997∠0◦
8696.65
2 × 105
= 22.997 − j0.0053 = 22.997∠−0.013◦
8696.65 + j2
2 × 105
= 22.997 − j0.053 = 22.997∠−0.13◦
8696.65 + j20
2 × 105
= 22.997 − j0.53 = 22.991∠−1.32◦
8696.65 + j200
2 × 105
= 11.5 − j11.5 = 16.26∠−45◦
8696.65 + j8696.65
2 × 105
= 0.043 − j0.9981 = 0.999∠−87.51◦
8696.65 + j2 × 105
We can see that at closed loop cut-off frequency, |Acl ( fc(cl) )| = 16.26 =
Acl
√(0) .
2
Also at unity gain frequency, |Acl ( fT )| = 0.999 ≈ 1 (which follows from definition of unity gain frequency).
See MATLAB: P05_Q01.m
Problem Set #05
page 5
ANU
ENGN 3227
(d)
Given that
vin (t) = 0.1 sin(2π30000t)
f = 30 kHz
Converting to phasors, we have,
→
−
V in = 0.1∠0◦ = 0.1
Using definition of closed loop transfer function
→
−
V out
Acl ( f ) = →
−
V in
Substituting values
→
−
V out = (Acl (30000))(0.1∠0◦ )
= (0.1)(15.58 − j10.75)
= 1.558 − j1.075
= 1.893∠−34.60◦
Converting back to time domain,
vout (t) = 1.893 sin(2π1000t − 34.6◦ )
This is the equation of the output voltage waveform.
See PSPICE: P05_Q02.sch
In PSPICE, add trace 1.893*SIN(2*3.14*30000*TIME-34.6*3.14/180) to
compare simulation and predicted result.
Problem Set #05
page 6
ANU
ENGN 3227
Q3
Solution
The given circuit data is Aol(mid) = 2 × 105 , Rout = 75 Ω, Rin = 2 MΩ, fT = 1 MHz, SR = 0.5 V/µs, R1 = 1 kΩ,
R2 = 100 kΩ, RL = 10 kΩ.
R2
vin
R1
vout
Rc
RL
(a)
B =
fc(ol)
=
Acl ( f ) =
R1
1
=
R2
100
fT
= 5 Hz
Aol
−Aol(mid)
1 + BAol(mid) + j f
f
=
−2 × 105
2001 + j0.2 f
c(ol)
(b)
fc(cl)
=
fc(cl)
=
fT
= 10.005 kHz
Acl (0)
fc(ol) (1 + BAol(mid) ) = 10.005 kHz
(c)
Acl (0) =
Acl (10) =
Acl (100) =
Acl (1k) =
Acl ( fc(cl) ) =
Acl ( fT ) =
−2 × 105
= −99.95∠0◦
2001
−2 × 105
= −(99.95 − j0.099) = −(99.95∠−0.057◦ )
2001 + j2
−2 × 105
= −(99.94 − j0.998) = −(99.94∠−0.57◦ )
2001 + j20
−2 × 105
= −(98.96 − j9.98) = −(99.45∠−5.71◦ )
2001 + j200
−2 × 105
= −(49.975 − j49.975) = −(70.67∠−45◦ )
2001 + j2001
−2 × 105
= −(0.01 − j0.999) = −(0.999∠−89.42◦ )
2001 + j2 × 105
(d)
vin (t) = 0.1 sin(2π1000t)
vout (t) = −9.945 sin(2π1000t − 5.71◦ )
See PSPICE: P05_Q03.sch
In PSPICE, add trace -0.9945*SIN(2*3.14*1000*TIME-5.71*3.14/180) to
compare simulation and predicted result.
Problem Set #05
page 7
ANU
ENGN 3227
Q4
Partial Solution
The given circuit is
R4=2 kΩ
vout1
vin
vin2 R3=1 kΩ
vout
R1=1 kΩ
R2=4 kΩ
(a)
This is a cascaded two-stage op-amp circuit.
For 1st op-amp,
B =
=
fc1(ol)
Acl1 ( f ) =
R1
1
=
R1 + R2
5
fT
= 5 Hz
Aol
−Aol(mid)
1 + BAol(mid) + j f
f
=
2 × 105
40001 + j0.2 f
=
−2 × 105
100001 + j0.2 f
c1(ol)
For 2nd op-amp,
B =
=
fc2(ol)
Acl2 ( f ) =
R3
1
=
R4
2
fT
= 5 Hz
Aol
−Aol(mid)
1 + BAol(mid) + j f
f
c2(ol)
The overall closed loop transfer function is the product of the two individual closed loop transfer functions.
Acl ( f ) = Acl1 ( f )Acl2 ( f )
−4 × 1010
(4 × 109 − 0.04 f 2 ) + j14002 f
Acl ( f ) =
(b)
f
= 10 kHz
Acl (10k) =
−4 × 1010
= −(10∠−2◦ )
3.996 × 109 + j140.02 × 106
The output voltage is
vin (t) = 0.1 sin(2π10000t + 30◦ )
vout (t) = − sin(2π10000t + 28◦ )
See PSPICE: P05_Q04.sch
Problem Set #05
page 8
ANU
ENGN 3227
Appendix A: Useful Formulas
Notation
→
−
V = a + jb
(rectangular form)
→
−
→
−
◦
V = | V |∠θ
((polar form)
p
→
−
2
2
|V | =
a +b
b
θ = tan−1
± 180◦
a
(1)
(2)
(3)
(4)
Note: arctangent function is multivalued so an adjustment is needed obtain correct value of θ. Scientific calculators can, however, convert complex numbers from polar to rectangular and vice versa in single operation
and give correct value of θ automatically.
Practice with your scientific calculator to become proficient in using complex, Pol and Rec modes.
Complex Conjugate
→
−∗
V
= a − jb
(5)
i.e the conjugate of the complex number is formed by reversing the sign of the imaginary part. In polar form
→
−∗
→
−
V = | V |∠−θ◦ .
Multiplication by Complex Conjugate
→
−→
−
V V∗
= (a + jb)(a − jb) = a2 − jab + jab − j2 b2
= a2 + b2
(6)
Multiplication in Polar form
→
−
→
−
→
−
→
−
If V 1 = | V 1 |∠θ◦1 and V 2 = | V 2 |∠θ◦2
→
− →
−
V 1V 2
→
−
→
−
→
− →
−
= (| V 1 |∠θ◦1 )(| V 2 |∠θ◦2 ) = (| V 1 || V 2 |)∠(θ1 + θ2 )◦
(7)
i.e to multiply numbers in polar form, we multiply the magnitudes and add the angles.
Division in Polar form
→
−
→
−
If V 1 = |V1 |∠θ◦1 and V 2 = |V2 |∠θ◦2
→
−
V1
→
−
V2
→
−
→
−
| V 1 |∠θ◦1
| V 1|
◦
=
→
−
→
− ∠(θ1 − θ2 )
◦
| V 2 |∠θ2
| V 2|
=
(8)
i.e to divide numbers in polar form, we divide the magnitudes and subtract the angles.
Useful Identities
j
1
j
j2
=
√
−1
(9)
= −j
(10)
= −1
(11)
Problem Set #05
page 9
ANU
ENGN 3227
Appendix B: Complex Number Calculation Examples
Addition and Substraction
→
−
V1
→
−
V2
→
−
→
−
V 1+V 2
→
−
→
−
V 1−V 2
= 8 + j16
= 12 − j3
= 20 + j13
(using rectangular form)
= −4 + j19
(using rectangular form)
Note: If numbers to be added or subtracted are given in polar form, they must be first converted to rectangular
form.
Multiplication
→
−
V1
→
−
V2
→
− →
−
V 1V 2
→
−
V1
→
−
V2
→
− →
−
V 1V 2
= 8 + j10
= 5 − j4
= 40 − j32 + j50 + 40 = 80 + j18
(using rectangular form)
= 8 + j10 = 12.81∠51.34◦
= 5 − j4 = 6.4∠−38.66◦
= (12.81∠51.34◦ )(6.4∠−38.66◦ ) = 82∠12.68◦ = 80 + j18
(using polar form)
Division
→
−
V1
→
−
V2
→
−
V1
→
−
V2
→
−
V1
→
−
V2
→
−
V1
→
−
V2
= 6 + j3
= 3− j
6 + j3
3− j
6 + j3 3 + j
=
(multiply and divide by conjugate of denominator)
3− j 3+ j
18 + j6 + j9 − 3
=
9+1
= 1.5 + j1.5
(using rectangular form)
=
= 6 + j3 = 6.71∠26.57◦
= 3 − j = 3.16∠−18.43◦
=
Problem Set #05
6.71∠26.57◦
= 2.12∠45◦ = 1.5 + j1.5
3.16∠−18.43◦
(using polar form)
page 10
ANU
ENGN 3227
AUSTRALIAN NATIONAL UNIVERSITY
Department of Engineering
ENGN 3227 Analogue Electronics
Problem Set #06 Active Filters
Q1
Consider the circuit shown in Figure 1.
Assume R1 = 1 kΩ, R2 = 2 kΩ, C1 = 1 µF.
(a) Find the s-domain transfer function of the circuit in standard form.
(b) Write the set of M ATLAB commands (4 lines expected) to obtain the Bode plot.
vout(t)
vin(t)
C1
R2
R1
Figure 1: The circuit for Question 1.
Q2
Consider the circuit shown in Figure 2.
Assume R1 = 1 kΩ, C1 = 1 µF, C2 = 10 µF.
(a) Find the s-domain transfer function of the circuit in standard form.
(b) Write the set of M ATLAB commands (4 lines expected) to obtain the Bode plot.
vout(t)
vin(t)
C2
R1
C1
Figure 2: The circuit for Question 2.
Problem Set #06
page 1
ANU
ENGN 3227
Q3
Consider the Sallen-Key low-pass filter circuit shown in Figure 3.
Find the s-domain transfer function of the circuit in standard form.
C1
R1
R2
v+
vout (t)
vx
vin(t)
RF
C2
v−
RA
Figure 3: The circuit for Question 3.
Q4
Consider the Sallen-Key high-pass filter circuit shown in Figure 4.
Find the s-domain transfer function of the circuit in standard form.
R1
C1
vin(t)
C2
v+
vout (t)
vx
R2
RF
v−
RA
Figure 4: The circuit for Question 4.
Problem Set #06
page 2
ANU
ENGN 3227
AUSTRALIAN NATIONAL UNIVERSITY
Department of Engineering
ENGN 3227 Analogue Electronics
Problem Set #06 Solution
Q1
Complete Solution
The given circuit data is R1 = 1 kΩ, R2 = 2 kΩ, C1 = 1 µF.
Re-drawing the circuit in s-domain, we have
Vout(s)
Vin(s)
1/sC1
R2
R1
(a)
Applying KCL at -ve pin,
V− (s) − 0 V− (s) −Vout (s) V− (s) −Vout (s)
+
+
1
R2
R1
sC
= 0
1
Solving
Vout (s)
V− (s)
=
sC1 + R11 + R12
sC1 + R11
From circuit, Vin (s) = V+ (s). Applying op-amp assumption, V+ (s) = V− (s). Hence
Vout (s)
Vin (s)
=
sC1 + R11 + R12
sC1 + R11
Converting to standard form
1
1
1
s
+
+
C1 R1
R2
Vout (s)
=
1
Vin (s)
s + R1C1
(a)
Substituting the values, the transfer function is
H(s) =
s + 1500
s + 1000
Problem Set #06
page 3
ANU
ENGN 3227
The M ATLAB commands are:
>>
>>
>>
>>
num=[1 1500];
den=[1 1000];
H=tf(num,den);
bode(H);
From the shape of the magnitude bode plot, the given circuit provides 3.5 dB gain to low frequencies and
allows high frequencies to pass unchanged (0dB gain).
Q2
Partial Solution
The given circuit data is R1 = 1 kΩ, C1 = 1 µF, C2 = 10 µF.
The given circuit is
vout(t)
vin(t)
C2
R1
C1
(a)
In standard form
H(s) =
1
R1C2
s + R11C1
(b)
H(s) =
100
s + 1000
The M ATLAB commands are:
>>
>>
>>
>>
num=[100];
den=[1 1000];
H=tf(num,den);
bode(H);
From the shape of the magnitude bode plot, the given circuit is a low-pass filter with roll-off -20 dB/decade.
Problem Set #06
page 4
ANU
ENGN 3227
Q3
Partial Solution
Re-drawing the circuit in s-domain, we have
1/sC1
R1
R2
V+(s)
Vout (s)
Vx(s)
Vin(s)
1/sC2
RF
V−(s)
RA
Let
G = 1+
RA + RF
RF
=
RA
RA
Step 1: Apply KCL at -ve pin
V− (s) −Vout (s) V− (s) − 0
+
RF
RA
= 0
Solving, we have
V− (s) =
=
RA
Vout (s)
RA + RF
Vout (s)
G
Applying op-amp assumption, V+ (s) = V− (s). Hence
V+ (s) =
Vout (s)
G
Step 2: Apply KCL at +ve pin
V+ (s) −Vx (s) V+ (s) − 0
+
1
R2
sC
= 0
2
Substituting the value V+ (s) =
Vx (s) = (sC2 R2 + 1)
Vout (s)
G
and solving, we get
Vout (s)
G
Step 3: Apply KCL at node x
Vx (s) −V+ (s) Vx (s) −Vout (s) Vx (s) −Vin (s)
+
+
1
R2
R1
sC
= 0
Vx (s) − VoutG(s) Vx (s) −Vout (s) Vx (s) −Vin (s)
+
+
1
R2
R1
sC
= 0
1
1
Problem Set #06
page 5
ANU
ENGN 3227
Simplifying, we have
1
1
sC1 +
+
Vx (s) =
R1 R2
1
1
Vin (s) + sC1Vout (s) +
Vout (s)
R1
GR2
R1
(sC1 R1 R2 + R2 + R1 )Vx (s) = R2Vin (s) + sC1 R1 R2Vout (s) + Vout (s)
G
R1
Vout (s)
= R2Vin (s) + sC1 R1 R2Vout (s) + Vout (s)
(sC1 R1 R2 + R2 + R1 )(sC2 R2 + 1)
G
G
(sC1 R1 R2 + R2 + R1 )(sC2 R2 + 1)Vout (s) = GR2Vin (s) + sGC1 R1 R2Vout (s) + R1Vout (s)
(sC1 R1 R2 + R2 + R1 )(sC2 R2 + 1)Vout (s) − sGC1 R1 R2Vout (s) − R1Vout (s)
2
(sC1C2 R1 R2 + sC1 R1 R2 + sC2 R22 + R2 + sC2 R1 R2 + R1 )Vout (s) − sGC1 R1 R2Vout (s) − R1Vout (s)
(s2C1C2 R1 R22 + sC1 R1 R2 (1 − G) + sC2 R1 R2 + sC2 R22 + R2 )Vout (s)
(s2C1C2 R1 R2 + sC1 R1 (1 − G) + sC2 R1 + sC2 R2 + 1)Vout (s)
=
=
=
=
GR2Vin (s)
GR2Vin (s)
GR2Vin (s)
GVin (s)
Hence
Vout (s)
Vin (s)
G
s2C1C2 R1 R2 + sC1 R1 (1 − G) + sC2 R1 + sC2 R2 + 1
G
=
2
s C1C2 R1 R2 + [C1 R1 (1 − G) +C2 R1 +C2 R2 ]s + 1
Step 4: Convert transfer function to standard form.
=
Dividing numerator and denominator by C1C2 R1 R2
Vout (s)
Vin (s)
G
=
s2 +
h
1−G
C2 R2
1
C1C2 R1 R2
i
+ C11R2 + C11R1 s + C1C21R1 R2
Hence
G
H(s) =
s2 +
h
1−G
C2 R2
1
C1C2 R1 R2
i
+ C11R2 + C11R1 s + C1C21R1 R2
Q4
Solution
The given circuit is
R1
C1
vin(t)
C2
v+
vout (t)
vx
R2
RF
v−
RA
Gs2
H(s) =
s2 +
Problem Set #06
h
1−G
C1 R1
i
+ C11R2 + C21R2 s + C1C21R1 R2
page 6
ANU
ENGN 3227
AUSTRALIAN NATIONAL UNIVERSITY
Department of Engineering
ENGN 3227 Analogue Electronics
Problem Set #07 Filter Design
Q1
Consider the Sallen-Key biquad circuit shown in Figure 1.
(a) Design a second-order (n = 2) Butterworth lowpass filter, with cut-off frequency fc = 4 kHz using this
circuit.
(b) Write the set of M ATLAB commands (6 lines expected) to obtain the Magnitude Bode plot vs. frequency
for the filter.
(c) Design a second-order (n = 2) Butterworth highpass filter, with cut-off frequency fc = 4 kHz.
C1
R1
vin(t)
R2
v+
vout (t)
vx
C2
RF
v−
RA
Figure 1: The circuit for Question 1.
Q2
Design a fourth-order (n = 4) Butterworth lowpass filter, with cut-off frequency fc = 4 kHz, using Sallen-Key
biquads.
Q3
Consider the Sallen-Key biquad circuit shown in Figure 1.
(a) Design a second-order (n = 2) Bessel lowpass filter, with cut-off frequency fc = 4 kHz using this circuit.
(b) Write the set of M ATLAB commands (6 lines expected) to obtain the Phase (in degrees) plot vs. frequency
for the filter.
Problem Set #07
page 1
ANU
ENGN 3227
AUSTRALIAN NATIONAL UNIVERSITY
Department of Engineering
ENGN 3227 Analogue Electronics
Problem Set #07 Solution
Q1
Complete Solution
(a)
The given design specifications are: n = 2, Butterworth filter, fc = 4 kHz.
C1
R1
R2
v+
vout (t)
vx
vin(t)
C2
RF
v−
RA
The Sallen-Key lowpass filter transfer function in standard form is
G
H(s) =
s2 +
h
1−G
C2 R2
1
C1C2 R1 R2
i
+ C11R2 + C11R1 s + C1C21R1 R2
where
G = 1+
RF
RA + RF
=
RA
RA
Assuming C1 = C2 = C and R1 = R2 = R, we have
G 21 2
3−GRC
s2 + CR s + R21C2
H(s) =
The n = 2 lowpass Butterworth transfer function in standard form is
K
√
s2 + 2ωc s + ω2c
H(s) =
Comparing the constant term in the denominators, we have
ω2c
=
ωc
=
fc
=
1
R2C2
1
RC
1
2πRC
Problem Set #07
page 2
ANU
ENGN 3227
Comparing the coefficient of s terms in the denominators, we have
√
2ωc
3−G
RC
√ 1
3−G
2
=
RC
RC√
G = 3− 2
√
RF
1+
= 3− 2
RA
√
RF
= 2 − 2 = 0.5857
RA
=
Design
Let C = 0.01 µF. Then
fc
=
R =
1
2πRC
1
2πC fc
1
2π(0.01 × 10−6 )(4 × 103 )
= 3978.87 Ω
= 3.9 kΩ
(nearest standard value)
=
Let RA = 3.9 kΩ. Then
RF
RA
RF
= 0.5857
= 2.284 kΩ
= 2.2 kΩ
(nearest standard value)
The filter implementation is
C1=0.01µF
R1=3.9kΩ
R2=3.9kΩ
vout (t)
vin(t)
C2=0.01µF
RF =2.2kΩ
RA =3.9kΩ
See PSPICE: P07_Q01.sch
Problem Set #07
page 3
ANU
ENGN 3227
(b)
Substituting the component values,
H(s) =
1028338306.4448
s2 + 336817.883s + 657462195.9
The M ATLAB commands to generate Bode magnitude plot vs. frequency are:
>>
>>
>>
>>
>>
>>
num=[1028338306.4448];
den=[1 336817.883 657462195.9];
[h,w] = freqs(num,den);
f = w/(2*pi);
mag = 20*log10(abs(h));
semilogx(f,mag);
See also Matlab: P07_Q01.m
(c)
The position of Rs and Cs can be reversed in the lowpass biquad to create highpass biquad.
Thus a second-order (n = 2) Butterworth highpass filter, with cut-off frequency fc = 4 kHz using Sallen-Key
biquad is
R 1=3.9kΩ
C1=0.01µF
C2=0.01µF
vout (t)
vin(t)
R2=3.9kΩ
RF =2.2kΩ
RA =3.9kΩ
See PSPICE: P07_Q01_hp.sch
Problem Set #07
page 4
ANU
ENGN 3227
Q2
Partial Solution
The n = 4 lowpass Butterworth transfer function in standard form is
K
s4 + 2.61313ωc s3 + 3.14142ω2c s2 + 2.61313ω3c s + ω4c
K1
K2
=
s2 + 1.848ωc s + ω2c
s2 + 0.765ωc s + ω2c
H(s) =
Thus two lowpass Sallen-Key biquads are required.
1st Stage Design
K1
s2 + 1.848ωc s + ω2c
H1 (s) =
Assuming C1 = C2 = C and R1 = R2 = R,
G 21 2
3−GRC
s2 + CR s + R21C2
H(s) =
Comparing the constant term in the denominators, we have
ω2c
=
ωc
=
fc
=
1
R2C2
1
RC
1
2πRC
Comparing the coefficient of s terms in the denominators, we have
3−G
RC
G = 1.152
RF
= 0.152
RA
1.848ωc
=
Let C = 0.01 µF. Then
1
2πC fc
= 3978.87 Ω
= 3.9 kΩ
(nearest standard value)
R =
Let RA = 10 kΩ. Then
RF
= 1.52 kΩ
= 1.5 kΩ
Problem Set #07
(nearest standard value)
page 5
ANU
ENGN 3227
2nd Stage Design
K2
2
s + 0.765ω
H1 (s) =
2
c s + ωc
Comparing the coefficient of s terms in the denominators, we have
3−G
RC
G = 2.235
RF
= 1.235
RA
=
0.765ωc
C
R
RA
RF
=
=
=
=
0.01 µF
3.9 kΩ
22 kΩ
27 kΩ
(nearest standard value)
(nearest standard value)
The filter implementation is
C1=0.01µF
C1=0.01µF
R1=3.9kΩ
R2=3.9kΩ
R1=3.9kΩ
R2 =3.9kΩ
vin(t)
C2=0.01µF
vout(t)
RF =1.5kΩ
C2=0.01µF
RF =27kΩ
RA =10kΩ
RA =22kΩ
Simulate in PSPICE to verify.
Write the set of Matlab commands to obtain Magnitude Bode plot of filter.
SEE ALSO HLAB2: FIG25-2
Problem Set #07
page 6
ANU
ENGN 3227
Q3
Partial Solution
(a)
n = 2, Bessel filter, fc = 4 kHz.
Assuming C1 = C2 = C and R1 = R2 = R, the Sallen-Key lowpass filter transfer function in standard form is
H(s) =
G 21 2
3−GRC
s2 + CR s + R21C2
The n = 2 lowpass Bessel transfer function in standard form is
K
H(s) =
s2 + 3ωc s + 3ω2c
Comparing the constant term in the denominators, we have
1
3ω2c =
R2C2
1
ωc = √
3RC
1
√
fc =
2π 3RC
Comparing the coefficient of s terms in the denominators, we have
3−G
3ωc =
RC√
G = 3− 3
RF
= 0.2679
RA
The filter implementation is
C1=0.01µF
R1=3.9kΩ
R2=3.9kΩ
vout (t)
vin(t)
C2=0.01µF
RF =1kΩ
RA =3.9kΩ
Compare with Butterworth implementation in Q1.
(b)
>>
>>
>>
>>
>>
>>
num=[826042246.16];
den=[1 44707.43 657462195.92];
[h,w] = freqs(num,den);
f = w/(2*pi);
phase = angle(h)*180/pi;
semilogx(f,phase);
See also Matlab: P07_Q03.m
Problem Set #07
page 7
ANU
ENGN 3227
Appendix
n
1
2
3
4
Table 1: Butterworth Polynomials
Factored Form
Transfer Function H(s)
K
s + ωc
K
√
2
s + 2ωc s + ω2c
K
3
2
s + 2ωc s + 2ω2c s + ω3c
K
4
3
s + 2.61313ωc s + 3.14142ω2c s2 + 2.61313ω3c s + ω4c
n
1
2
3
4
K1
s + ωc
K2
2
2
s + ωc s +
ω
c
K1
2
s + 1.848ωc s + ω2c
K2
2
s + 0.765ωc s + ω2c
Table 2: Chebyshev Polynomials
Transfer Function H(s)
K
s + 1.9652ωc
K
s2 + 1.0977ωc s + 1.1025ω2c
K
s3 + 0.9883ωc s2 + 1.2384ω2c s + 0.4913ω3c
K
4
3
s + 0.9528ωc s + 1.4539ω2c s2 + 0.7426ω3c s + 0.2756ω4c
n
1
2
3
4
Table 3: Bessel Polynomials
Transfer Function H(s)
K
s + ωc
K
s2 + 3ωc s + 3ω2c
K
3
2
s + 6ωc s + 15ω2c s + 15ω3c
K
4
3
2
s + 10ωc s + 45ωc s2 + 105ω3c s + 105ω4c
The above tables can be obtained using Matlab butter, cheby1 and besself commands.
See also Matlab: L11_Example01.m
Problem Set #07
page 8
ANU
ENGN 3227
AUSTRALIAN NATIONAL UNIVERSITY
Department of Engineering
ENGN 3227 Analogue Electronics
Problem Set #08 555 Timer
Q1
Consider the 555 astable circuit shown in Figure 1. Assume R1 = 10 kΩ, R2 = 5 kΩ, C = 300 pF.
(a) Explain the working of the circuit. Sketch the voltage across capacitor C and output voltage.
(b) Derive the equations for the ON time TH (time the output is HIGH), OFF time TL (time the output is LOW)
and Duty cycle D.
(c) Find the values of TH , TL and D.
Figure 1: The circuit for Question 1.
Q2
Consider the 555 monostable circuit shown in Figure 2. Assume R = 12 kΩ, C = 0.025 µF.
(a) Explain the working of the circuit. Sketch the voltage across capacitor C and output voltage.
(b) Derive the equations for the pulse duration T (time the output is HIGH).
(c) Find the value of pulse duration T .
Figure 2: The circuit for Question 2.
Problem Set #08
page 1
ANU
ENGN 3227
Q3
Design a square waveform generator using 555 Timer with duty cycle D = 60% and oscillation frequency
f = 1 kHz.
Q4
Design a square waveform generator using 555 Timer with duty cycle D = 25% and oscillation frequency
f = 1 kHz.
Problem Set #08
page 2
ANU
ENGN 3227
AUSTRALIAN NATIONAL UNIVERSITY
Department of Engineering
ENGN 3227 Analogue Electronics
Problem Set #08 Solution
Q1
Partial Solution
The given circuit data is R1 = 10 kΩ, R2 = 5 kΩ, C = 300 pF.
(a)
See Lecture 12 for solution
(b)
= 0.693(R1 + R2 )C
= 0.693R2C
TH
R1 + R2
× 100% =
× 100%
Duty cycle =
TH + TL
R1 + 2R2
TH
TL
See Lecture 12 for derivation steps
(c)
= 0.693(R1 + R2 )C = 0.693(15k)(300p) = 3.1185 µs
= 0.693R2C = 0.693(5k)(300p) = 1.0395 µs
TH
3.1185
Duty cycle =
× 100% =
× 100% = 75%
TH + TL
3.1185 + 1.0395
TH
TL
Problem Set #08
page 3
ANU
ENGN 3227
Q2
Partial Solution
The given circuit data is R = 12 kΩ, C = 0.025 µF.
(a)
See Lecture 12 for solution
(b)
T
= 1.1RC
See Lecture 12 for derivation steps
(c)
T
= 1.1RC
= 1.1(12k)(0.025µ)
= 330 µs
Problem Set #08
page 4
ANU
ENGN 3227
Q3
Complete Solution
The design data is:
square waveform generator using 555 Timer
Duty cycle D = 60%
oscillation frequency f = 1 kHz.
As D > 50%, the 555 circuit is
From the time period, we have
T
TH + TL
1
f
= 1ms
=
From the duty cycle, we have
TH
Duty cycle =
× 100%
T
TH
0.6 =
T
TH = 0.6T
(1)
(2)
Solving (1) and (2), we have
TH
TL
= 0.6ms
= 0.4ms
We know for above 555 Timer,
TH
TL
= 0.693(R1 + R2 )C
= 0.693R2C
Design
Let C = 0.1 µF. Then
R2
R1
= 5.772kΩ
= 2.886 kΩ
See also Matlab: P08_Q03.m
Problem Set #08
page 5
ANU
ENGN 3227
Q4
Partial Solution
The design data is:
square waveform generator using 555 Timer
Duty cycle D = 25%
oscillation frequency f = 1 kHz.
As D < 50%, the 555 circuit is
From the time period, we have
T
TH + TL
1
f
= 1ms
=
(3)
From the duty cycle, we have
TH
× 100%
TH + TL
TH
0.25 =
T
TH = 0.25T
Duty cycle =
(4)
Solving (1) and (2), we have
TH
TL
= 0.25ms
= 0.75ms
We know for above 555 Timer,
TH
TL
= 0.693R1C
= 0.693R2C
Design
Let C = 0.1 µF. Then
R1
R2
= 3.607kΩ
= 10.822 kΩ
See also Matlab: P08_Q03.m
Problem Set #08
page 6
ANU
ENGN 3227
AUSTRALIAN NATIONAL UNIVERSITY
Department of Engineering
ENGN 3227 Analogue Electronics
Problem Set #09 Oscillators
Q1
Explain briefly, in words, the operation of the following:
(a) Wien-bridge oscillator.
(b) Phase-shift oscillator.
(c) Square-wave relaxation oscillator.
(d) Triangle-wave relaxation oscillator.
Q2
Consider the circuit shown in Figure 1. Assume R = 10000
2π Ω, C = 0.01 µF.
(a) Derive an expression for the transfer function H( f ) of the given circuit.
(b) Find the frequency fr for which H( f ) is real.
(c) Find output voltage vout (t) if vin (t) = sin(2π10000t).
(d) Find output voltage vout (t) if vin (t) = sin(2π1000t).
C
R
vout(t)
vin(t)
R
C
Figure 1: The circuit for Question 2.
Q3
√ Ω, C = 0.01 µF.
Consider the circuit shown in Figure 2. Assume R = 10000
2π 6
(a) Derive an expression for the transfer function H( f ) of the given circuit.
(b) Find the frequency fr for which H( f ) is real.
(c) Find output voltage vout (t) if vin (t) = 29 sin(2π10000t).
C
C
C
vout(t)
vin(t)
R
R
R
Figure 2: The circuit for Question 3.
Problem Set #09
page 1
ANU
ENGN 3227
AUSTRALIAN NATIONAL UNIVERSITY
Department of Engineering
ENGN 3227 Analogue Electronics
Problem Set #09 Solution
Q1
Solution
See Lecture 13: Oscillators and Textbook: Chapter 10.
Q2
Partial Solution
The given circuit data is R =
10000
2π
Ω, C = 0.01 µF.
R
C
vout(t)
vin(t)
R
C
(a)
Using phasors,
→
−
V out − 0
1
jωC
+
→
−
→
−
→
−
V out − 0 V out − V in
+
1
R
R + jωC
= 0
Solving,
→
−
V out
H( f ) = →
−
V in
=
ωRC
3ωRC − j(1 − ω2 R2C2 )
(b)
For real H( f ), the imaginary part must be 0. Hence
1 − ω2r R2C2
= 0
1
ωr =
RC
1
fr =
2πRC
1
H( fr ) =
3
Problem Set #09
page 2
ANU
ENGN 3227
(c)
vin (t) = sin(2π10000t)
f = 10 kHz
Using phasors,
→
−
V in
= 1∠0◦ = 1
1
H(10000) =
3
1
→
−
→
−
V out = H(10000) V in =
3
Converting back,
vout (t) =
1
sin(2π10000t)
3
(d)
vin (t) = sin(2π1000t)
f = 1 kHz
Using phasors,
→
−
V in
= 1∠0◦ = 1
0.1
H(1000) =
0.3 − j(1 − 0.01)
0.1
=
0.3 − j0.99
= 0.028 + j0.0925 = 0.0967∠73.16◦
→
−
→
−
V out = H(1000) V in = 0.0967∠73.16◦
Converting back,
vout (t) = 0.0967 sin(2π1000t + 73.16◦ )
See PSPICE: P09_Q02.sch
In PSPICE, add trace 0.0967*SIN(2*3.14*1000*TIME+73.16*3.14/180) to
compare simulation and predicted result.
Problem Set #09
page 3
ANU
ENGN 3227
Q3
Partial Solution
The given circuit data is R =
10000
√
2π 6
Ω, C = 0.01 µF.
C
C
C
vout(t)
vin(t)
R
R
R
(a)
Using phasors and writing node equation,
→
−
→
−
→
−
→
−
→
−
V y − V in V y − 0 V y − V x
+
+
= 0
1
1
R
jωC
jωC
→
−
→
−
→
−
→
−
→
−
V x − V y V x − 0 V x − V out
+
+
= 0
1
1
R
jωC
jωC
→
−
→
−
→
−
V out − V x V out − 0
+
= 0
1
R
jωC
Solving, using Cramer’s rule, we have
→
−
1
V out
H( f ) = →
− =
5
6
V in
1 − ω2 R2C2 − j ωRC
− ω3 R13C3
See also Lecture 13: Oscillators
(b)
For real H( f ), the imaginary part must be 0. Hence
6
1
−
ωr RC ω3r R3C3
= 0
1
√
6RC
1
√
fr =
2π 6RC
1
H( fr ) = −
29
ωr
Problem Set #09
=
page 4
ANU
ENGN 3227
(c)
vin (t) = 29 sin(2π10000t)
f = 10 kHz
Using phasors,
→
−
V in
= 29∠0◦ = 1
1
H(10000) = −
29
→
−
→
−
V out = H(10000) V in = −1 = 1∠180◦
Converting back,
vout (t) = sin(2π10000t + 180◦ )
See PSPICE: P09_Q03.sch
In PSPICE, add trace SIN(2*3.14*10000*TIME + 180*3.14/180) to
compare simulation and predicted result.
Problem Set #09
page 5
ANU
ENGN 3227
AUSTRALIAN NATIONAL UNIVERSITY
Department of Engineering
ENGN 3227 Analogue Electronics
Problem Set #10 Instrumentation Amplifiers
Q1
Consider the circuit shown in Figure 1.
(a) Derive an exact expression for the output voltage vout (t) in terms of input voltages v1 (t) and v2 (t) and
op-amp open loop gain Aol .
(b) Find an expression for the output voltage vout (t) when Aol → ∞.
(c) Find an expression for the output voltage vout (t) when Aol → ∞ and RR34 = RR21 .
(d) Find an expression for the output voltage vout (t) when Aol → ∞ and R4 = R3 = R2 = R1 = R.
R4
v1
R3
v2
R1
vout
RL
R2
Figure 1: The circuit for Question 1.
Q2
Consider the two op-amp instrumentation amplifier circuit shown in Figure 2.
(a) Derive an exact expression for the output voltage vout (t) in terms of input voltages v1 (t) and v2 (t) and
op-amp open loop gain Aol .
(b) Find an expression for the output voltage vout (t) when Aol → ∞.
(c) Find an expression for the output voltage vout (t) when Aol → ∞ and RR34 = RR12 .
(d) Find an expression for the output voltage vout (t) when Aol → ∞ and R4 = R3 = R2 = R1 = R.
R4
R3
vx
v1
vout
vout
R1
RL
R2
v2
Figure 2: The circuit for Question 2.
Problem Set #10
page 1
ANU
ENGN 3227
Q3
Consider the three op-amp instrumentation amplifier circuit shown in Figure 3.
(a) Derive an expression for the output voltage vout1 (t).
(b) Derive an expression for the output voltage vout2 (t).
(c) Assuming R4 = R3 = R2 = R1 = R, find the expression for output voltage vout (t) in terms of input voltages
v1 (t) and v2 (t).
vout1
R4
v1
R3
RG
v2
R
R
vout
R1
R2
RL
vout2
Figure 3: The circuit for Question 3.
Problem Set #10
page 2
ANU
ENGN 3227
AUSTRALIAN NATIONAL UNIVERSITY
Department of Engineering
ENGN 3227 Analogue Electronics
Problem Set #10 Solution
Q1
R4
Partial Solution
v1
R3
v2
R1
vout
RL
R2
(a)
Writing KCL equations,
v+
v−
vin
R2
v2
R1 + R2
R4
R3
=
v1 +
vout
R3 + R4
R3 + R4
= (v+ ) − (v− )
=
The output voltage is
vout
vout
vout
= Aol vin
R2 Aol
R4 Aol
R3 Aol
=
v2 −
v1 −
vout
R1 + R2
R3 + R4
R3 + R4
(R3 + R4 )Aol
R2
R4 Aol
=
v2 −
v1
R3 + R4 + R3 Aol R1 + R2
R3 + R4 + R3 Aol
(b)
When Aol → ∞,
vout
=
R3 + R4
R3 +R4
Aol + R3
=
R4
R3 + R4 R2
v2 − v1
R3 R1 + R2
R3
R2
v2 −
R1 + R2
R4
R3 +R4
Aol
+ R3
v1
(c)
Assuming Aol → ∞ and
vout
=
R4
R3
=
R2
R1 ,
R2
(v2 − v1 )
R1
(d)
Assuming Aol → ∞ and R4 = R3 = R2 = R1 = R,
vout
= v2 − v1
Problem Set #10
page 3
ANU
ENGN 3227
Q2
Partial Solution
The given circuit is
R4
R3
vx
v1
vout
vout
RL
R2
R1
v2
(a)
Writing KCL equations for non-inverting op-amp
v+
= v1
v−
=
vin
vx
vx
R1
vx
R1 + R2
= (v+ ) − (v− )
= Aol vin
(R1 + R2 )Aol
v1
=
R1 + R2 + R1 Aol
Writing KCL equations for inverting op-amp
v+
= v2
v−
=
vin
vout
vout
=
=
=
vout
=
R4
R3
vx +
vout
R3 + R4
R3 + R4
(v+ ) − (v− )
Aol vin
Aol v2 − Aol v−
(R3 + R4 )Aol
R4 Aol
(R1 + R2 )Aol
v2 −
v1
R3 + R4 + R3 Aol
R3 + R4 + R3 Aol R1 + R2 + R1 Aol
(b)
When Aol → ∞,
vout
=
R4
1+
R3
R4
v2 −
R3
R2
1+
R1
v1
(c)
Assuming Aol → ∞ and RR43 = RR21 ,
R4
vout =
1+
(v2 − v1 )
R3
(d)
Assuming Aol → ∞ and R4 = R3 = R2 = R1 = R,
vout
= 2(v2 − v1 )
Problem Set #10
page 4
ANU
ENGN 3227
Q3
Partial Solution
The given circuit is
vout1
R4
v1
R3
R
R
RG
v2
vout
R1
R2
RL
vout2
(a)
v1 − vout1 v1 − v2
+
R
RG
vout1
= 0
=
R1 + RG
R
v1 −
v2
RG
RG
(b)
v2 − vout2 v2 − v1
+
R
RG
vout2
= 0
=
R1 + RG
R
v2 −
v1
RG
RG
(c)
The third op-amp is a unity gain difference amplifier [using result of Q1 part (d)].
vout
= vout2 − vout1
2R
=
1+
(v2 − v1 )
RG
See PSPICE: L15_Example02.sch
See PSPICE: L15_Example02_CMRR.sch
Problem Set #10
page 5
ANU
ENGN 3227
AUSTRALIAN NATIONAL UNIVERSITY
Department of Engineering
ENGN 3227 Analogue Electronics
Problem Set #11 Integrator and Differentiator
Q1
Consider the circuit shown in Figure 1.
(a) Derive an expression for the output voltage vout (t) in terms of input voltage vin (t).
(b) Find an expression for the transfer function H( f ) of the circuit.
(c) Find an expression for the output voltage vout (t) when vin (t) = Vin(p) sin(ωt).
(d) Find an expression for peak output voltage Vo(p) when input voltage is a square wave with peak Vin(p) and
frequency f .
CI
RI
vin
vout
Figure 1: The circuit for Question 1.
Q2
Consider the circuit shown in Figure 2. Assume Aol = 2 × 105 , Rout = 75 Ω, Rin = 2 MΩ, fT = 1 MHz, SR =
0.5 V/µs.
(a) Design the circuit for an operating frequency of 2 kHz and a maximum gain of 20. Assume CI = 100 nF.
(b) Find and sketch the output voltage vout (t) when input voltage vin (t) = 0.1 sin(2π2000t).
(c) Find and sketch the output voltage vout (t) when input voltage is a square wave with ±2.5V peak and
frequency 2 kHz.
(d) Find the dc component in the output when there is a +50 mV dc input.
Rf
CI
RI
vin
vout
R2
Figure 2: The circuit for Question 2.
Problem Set #11
page 1
ANU
ENGN 3227
Q3
Consider the circuit shown in Figure 3.
(a) Derive an expression for the output voltage vout (t) in terms of input voltage vin (t).
(b) Find an expression for the transfer function H( f ) of the circuit.
(c) Find an expression for the output voltage vout (t) when vin (t) = Vin(p) sin(ωt).
(d) Find an expression for peak output voltage Vo(p) when input voltage is a square wave with peak Vin(p) and
frequency f .
RD
CD
vin
vout
Figure 3: The circuit for Question 3.
Q4
Consider the circuit shown in Figure 4. Assume Aol = 2 × 105 , Rout = 75 Ω, Rin = 2 MΩ, fT = 1 MHz, SR =
0.5 V/µs.
(a) Design the circuit for an operating frequency of 100 Hz. Assume CD = 0.1 µ F.
(b) Find and sketch the output voltage vout (t) when input voltage vin (t) = 0.1 sin(2π100t).
(c) Find and sketch the output voltage vout (t) when input voltage is a triangular wave with ±0.5V peak and
frequency 100 Hz.
CI
RD
CD
RI
vin
vout
R2
Figure 4: The circuit for Question 4.
Problem Set #11
page 2
ANU
ENGN 3227
AUSTRALIAN NATIONAL UNIVERSITY
Department of Engineering
ENGN 3227 Analogue Electronics
Problem Set #11 Solution
Q1
Solution
The given circuit is
CI
RI
vin
vout
(a)
0 − vin
dvC
+CI
RI
dt
= 0
vout (t) = −
1
RI CI
Z t
t0
vin (t)dt + vC (t0 )
(b)
→
−
V out
H( f ) = →
−
V in
= −
1
jωRI CI
(c)
vin (t) = Vin(p) sin(ωt)
Vin(p)
vout (t) =
cos(ωt)
ωRI CI
Vin(p)
Vo(p) =
ωRI CI
(d)
Vo(p)
=
Vin(p)
4 f RI CI
For detailed derivations, SEE: Lecture 15.
Problem Set #11
page 3
ANU
ENGN 3227
Q2
Partial Solution
The given circuit is
Rf
CI
RI
vin
vout
R2
The op-amp data is Aol = 2 × 105 , Rout = 75 Ω, Rin = 2 MΩ, fT = 1 MHz, SR = 0.5 V/µs.
(a)
Given that
fo = 2 kHz
|Av(max) | = 20
CI = 100 nF
Design:
fo
= 200 Hz
10
1
= 7.958 kΩ
2π fLCI
Rf
= 397.9 Ω
|Av(max) |
fL
=
Rf
=
RI
=
R2
= RI ||R f = 378.95 Ω
Check:
T
τI
= 500 µs
= 39.79 µs
We see that τI T . Hence condition of accurate integration is satisfied.
(b)
vin (t) = 0.1 sin(2π2000t)
vout (t) = 0.5 cos(2π2000t)
Check:
SR = 2π foVo(p) × 10−6 = 0.00628 V/µs < 0.5 V/µs
Problem Set #11
page 4
ANU
ENGN 3227
The input and output voltages are shown below:
0.5
input
output
0.4
0.3
0.2
Voltage
0.1
0
−0.1
−0.2
−0.3
−0.4
−0.5
0
250
500
Time (µs)
750
1000
See also PSPICE: P11_Q02_sine.sch
(c)
= 15.7 V
= 7.85 V
Vo(pp)
Vo(p)
Check:
SR =
Vo(pp)
= 0.0628 V/µs < 0.5 V/µs
T /2
The input and output voltages are shown below:
10
input
output
8
X: 0.0005
Y: 7.854
6
X: 0.000161
Y: 2.5
4
Voltage
2
0
−2
−4
−6
−8
−10
0
250
500
Time (µs)
750
1000
See also PSPICE: P11_Q02_square.sch
(d)
Vin
Vout
= 50 mV
Rf
= − Vin = 1 V
RI
Problem Set #11
page 5
ANU
ENGN 3227
Q3
Solution
The given circuit is
RD
CD
vin
vout
(a)
CD
dvC 0 − vout
+
dt
RD
= 0
vout (t) = −RDCD
d
vin (t)
dt
(b)
→
−
V out
H( f ) = →
−
V in
= − jωRDCD
(c)
vin (t) = Vin(p) sin(ωt)
vout (t) = −ωRDCDVin(p) cos(ωt)
Vo(p) = −ωRDCDVin(p)
(d)
Vo(p)
= 4 f RDCDVin(p)
For detailed derivations, SEE: Lecture 15.
Problem Set #11
page 6
ANU
ENGN 3227
Q4
Partial Solution
The given circuit is
CI
RD
CD
RI
vin
vout
R2
The op-amp data is Aol = 2 × 105 , Rout = 75 Ω, Rin = 2 MΩ, fT = 1 MHz, SR = 0.5 V/µs.
(a)
Given that
fo
CD
= 100 Hz
= 0.1 µF
Design:
fD
=
fID
=
RD
=
RI
=
CI
=
fI
=
fD
fD
≤
≤
fo
= 10 Hz
10
10 fo = 1 kHz
1
= 159.15 kΩ
2π fDCD
1
= 1.59 kΩ
2π fIDCD
1
= 1 nF
2π fID RD
1
= 100 kHz
2πCI RI
Check:
fID ≤ fI
fo ≤ fID
Problem Set #11
page 7
ANU
ENGN 3227
(b)
vin (t) = 0.1 sin(2π100t)
vout (t) = −1 cos(2π100t)
The input and output voltages are shown below:
1.5
input
output
1
Voltage
0.5
0
−0.5
−1
−1.5
0
5
10
Time (ms)
15
20
See also PSPICE: P11_Q04_sine.sch
(c)
Vo(p)
= 3.183 V
The input and output voltages are shown below:
5
input
output
4
3
X: 0.0022
Y: 3.183
2
X: 0
Y: 0.5
Voltage
1
0
−1
−2
−3
−4
−5
0
5
10
Time (ms)
15
20
See also PSPICE: P11_Q04_triang.sch
Problem Set #11
page 8
ENGN3227 Analogue Electronics
Matlab Scripts
Dr. Salman Durrani
November 2006
%% L 0 3 s i g n a l w a v e f o r m s
%% ======================
%%
%% S c r i p t t o g e n e r a t e d i f f e r e n t s i g n a l waveforms .
%% See ENGN3227 : L e c t u r e 0 3 S l i d e s 15−20
%%
%% C r e a t e d : 01 Aug 2006
%% M o d i f i e d : 01 Aug 2006
%%
%% MODIFICATION HISTORY
%% −−−−−−−−−−−−−−−−−−−−−
%% 01 Aug 0 6 : F i l e c r e a t e d
%%
%% C o p y r i g h t ( c ) 2006 Salman D u r r a n i .
%% −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
clc
clear a l l
close a l l
%% C r e a t e t i m e v e c t o r ( 2 0 ms )
t s t a r t = 0;
s t e p = 1e −6;
t s t o p = 20 e −3;
t = [ t s t a r t : step : tstop ] ;
%% A 100 Hz s i n e wave
f = 100;
Vpeak = 1 ;
p h a s e = 0∗ p i / 1 8 0 ;
V s i g n a l 1 = Vpeak ∗ s i n (2∗ p i ∗ f ∗ t + p h a s e ) ;
%% A 100 Hz s q u a r e wave
f = 100;
Vpeak = 5 ;
V s i g n a l 2 = Vpeak ∗ s q u a r e (2∗ p i ∗ f ∗ t ) ;
%% A 1000 Hz s i n e wave
f = 1000;
Vpeak = 1 ;
p h a s e = 0∗ p i / 1 8 0 ;
V s i g n a l 3 = Vpeak ∗ s i n (2∗ p i ∗ f ∗ t + p h a s e ) ;
%% A 1000 Hz s q u a r e wave
f = 1000;
Vpeak = 5 ;
V s i g n a l 4 = Vpeak ∗ s q u a r e (2∗ p i ∗ f ∗ t ) ;
2
%% P l o t v o l t a g e s
subplot ( 2 , 2 , 1 )
p l o t ( t , V s i g n a l 1 , ’ r− ’ )
y l a b e l ( ’ V o l t a g e (V) ’ )
x l a b e l ( ’ Time ( s ) ’ )
a x i s ( [ 0 20 e−3 −1 1 ] )
g r i d on
subplot ( 2 , 2 , 2 )
p l o t ( t , V s i g n a l 2 , ’ r− ’ )
y l a b e l ( ’ V o l t a g e (V) ’ )
x l a b e l ( ’ Time ( s ) ’ )
a x i s ( [ 0 20 e−3 −10 1 0 ] )
g r i d on
subplot ( 2 , 2 , 3 )
p l o t ( t , V s i g n a l 3 , ’ r− ’ )
y l a b e l ( ’ V o l t a g e (V) ’ )
x l a b e l ( ’ Time ( s ) ’ )
a x i s ( [ 0 20 e−3 −1 1 ] )
g r i d on
subplot ( 2 , 2 , 4 )
p l o t ( t , V s i g n a l 4 , ’ r− ’ )
y l a b e l ( ’ V o l t a g e (V) ’ )
x l a b e l ( ’ Time ( s ) ’ )
a x i s ( [ 0 20 e−3 −10 1 0 ] )
g r i d on
3
%% L 0 6 S c h m i t t T r i g g e r
%% ======================
%%
%% S c r i p t t o g e n e r a t e s i m u l a t e S c h m i t t T r i g g e r i n Matlab .
%% See ENGN3227 : L e c t u r e 0 6 Example 03
%%
%% C r e a t e d : 08 Aug 2006
%% M o d i f i e d : 08 Aug 2006
%%
%% MODIFICATION HISTORY
%% −−−−−−−−−−−−−−−−−−−−−
%% 08 Aug 0 6 : F i l e c r e a t e d
%%
%% C o p y r i g h t ( c ) 2006 Salman D u r r a n i .
%% −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
clc
clear a l l
close a l l
%% S c h m i t t T r i g g e r Data
V outmax = 1 0 ;
R 1 = 50 e3 ;
R 2 = 50 e3 ;
%% C r e a t e t i m e v e c t o r ( 2 ms )
t s t a r t = 0;
s t e p = 1e −6;
t s t o p = 2e −3;
t = [ t s t a r t : step : tstop ] ;
%% Vin i s 1kHz Hz s i n e wave
f = 1 e3 ;
Vpeak = 5 ;
p h a s e = 0∗ p i / 1 8 0 ;
Vin = Vpeak ∗ s i n (2∗ p i ∗ f ∗ t + p h a s e ) ;
%% S c h m i t t T r i g g e r R e f e r e n c e V o l t a g e s
% Vutp = ( ( R 1 ) / ( R 1+R 2 ) ) ∗ V outmax
% V l t p = ( ( R 1 ) / ( R 1+R 2 ))∗( − V outmax )
%% d e f i n e a r b i t r a r y
Vutp= 4
Vltp = 0;
%% Pre−a l l o c a t e S c h m i t t T r i g g e r o u t p u t
Vout = −V outmax . ∗ o n e s ( 1 , length ( Vin ) ) ;
%% c a l c u l a t e s l o p e o f i n p u t s i n e wave
4
g =g r a d i e n t ( Vin ) ;
%% mimic S c h m i t t T r i g g e r o p e r a t i o n
f o r k = 1 : 1 : length ( Vin )
i f ( ( Vin ( k ) <Vutp ) && ( Vin ( k ) > 0 ) && g ( k ) >0 )
Vout ( k ) = V outmax ;
e l s e i f ( Vin ( k ) < V l t p && g ( k ) < 0 )
Vout ( k ) = V outmax ;
e l s e i f ( Vin ( k ) < Vutp && g ( k ) >= 0 )
Vout ( k ) = V outmax ;
end
end
%% P l o t v o l t a g e s
eps openfig
p l o t ( t , Vin , ’ k−− ’ , ’ L i n e w i d t h ’ , 1 )
hold on
p l o t ( t , Vout , ’ k− ’ , ’ L i n e w i d t h ’ , 1 )
hold on
p l o t ( [ 0 max( t ) ] , [ Vutp Vutp ] , ’ k : ’ , ’ L i n e w i d t h ’ , 1 )
p l o t ( [ 0 max( t ) ] , [ V l t p V l t p ] , ’ k : ’ , ’ L i n e w i d t h ’ , 1 )
y l a b e l ( ’ V o l t a g e (V) ’ )
x l a b e l ( ’ Time ( s ) ’ )
a x i s ( [ 0 2e−3 −11 1 1 ] )
legend ( ’ I n p u t ’ , ’ Output ’ )
s e t ( gca , ’ XTick ’ , [ 0 : 0 . 5 e −3:2 e −3])
% s e t ( gca , ’ YTick ’ , [ −10 −6.55 −5 −1.15 0 1 . 1 5 5 6 . 5 5 1 0 ] )
5
%% L09 Example02
%% ==============
%% S c r i p t t o p l o t m a g n i t u d e and p h a s e f o r op−amp open l o o p t r a n s f e r f u n c t i o n
%%
%% C r e a t e d : 23 Aug 2006
%% M o d i f i e d : 23 Aug 2006
%%
%% C o p y r i g h t ( c ) 2006 Salman D u r r a n i .
%% −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
clc
clear a l l
close a l l
%% D e f i n e op−amp d a t a
fT =10ˆ6;
Aol = 2 ∗ 1 0 ˆ 5 ;
%% D e f i n e t h e f r e q u e n c y v e c t o r
f 1=l i n s p a c e ( 0 . 0 1 , 1 0 ˆ 2 , 1 0 ˆ 3 ) ;
f 2=l i n s p a c e ( 1 0 ˆ 2 , 1 0 ˆ 4 , 1 0 ˆ 3 ) ;
f 3=l i n s p a c e ( 1 0 ˆ 4 , fT , 1 0 ˆ 3 ) ;
f= [ f 1 f 2 f 3 ] ;
%% C a l c u l a t e opn l o o p cut−o f f f r e q u e n c y
f c o l = fT / Aol ;
%% C a l c u l a t e open l o o p t r a n s f e r f u n c t i o n
A o l f = Aol ./(1+ i . ∗ ( f . / f c o l ) ) ;
Magnitude = 20∗ log10 ( abs ( A o l f ) ) ;
Phase = angle ( A o l f )∗180/ p i ;
%% Magnitude r e s p o n s e
figure
semilogx ( f , Magnitude )
a x i s ([10ˆ −0 10ˆ6 0 1 1 0 ] )
y l a b e l ( ’ Magnitude ( dB ) ’ )
x l a b e l ( ’ F r e q u e n c y ( Hz ) ’ )
g r i d on
%% Phase r e s p o n s e
figure
semilogx ( f , Phase )
a x i s ([10ˆ −2 10ˆ6 −90 0 ] )
y l a b e l ( ’ Phase ( deg ) ’ )
x l a b e l ( ’ F r e q u e n c y ( Hz ) ’ )
g r i d on
%% −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
6
%% L10 Example02
%% ==============
%% S c r i p t t o p l o t bode p l o t f o r a c t i v e low−p a s s f i l t e r .
%% See L e c t u r e 1 0 : Example 02
%%
%% C r e a t e d : 30 Aug 2006
%% M o d i f i e d : 30 Aug 2006
%%
%% C o p y r i g h t ( c ) 2006 Salman D u r r a n i .
%% −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
clc
clear a l l
close a l l
%% D e f i n e c i r c u i t d a t a
C=1e −6;
R=1e3 ;
R2 = 9 e3 ;
R1 =1e3 ;
%% D e f i n e t h e t r a n s f e r f u n c t i o n
G = 1+(R2/R1 ) ;
num = [ G/ (R∗C ) ]
den = [ 1 1 / (R∗C ) ] ;
H=t f (num , den )
%% C a l c u l a t e bode p l o t
bode (H)
7
%% L11 Example02
%% ==============
%% S c r i p t t o a n a l y s e B u t t e r w o r t h f i l t e r d e s i g n .
%% See L e c t u r e 1 1 : B u t t e r w o r t h F i l t e r D e s i g n Example
%%
%% C r e a t e d : 18 Sep 2006
%% M o d i f i e d : 18 Sep 2006
%%
%% C o p y r i g h t ( c ) 2006 Salman D u r r a n i .
%% −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
clc
clear a l l
close a l l
%% C a l c u l a t e t h e o r e t i c a l B u t t e r w o r t h t r a n s f e r f u n c t i o n
n =2;
f c= 2 e3 ;
omegac = 2∗ p i ∗ f c ;
[ num , den ] = b u t t e r ( n , omegac , ’ low ’ , ’ s ’ ) ;
H th = t f ( num , den )
%% C a l c u l a t e s i m u l a t e d S a l l e n Key C i r c u i t t r a n s f e r f u n c t i o n
R = 8200;
C = 0 . 0 1 e −6;
RA = 3 9 0 0 ;
RF = 2 2 0 0 ;
G = 1+ RF/RA ;
num sk =[G/ ( ( R∗C ) ˆ 2 ) ] ;
d e n s k = [ 1 (3−G) / ( R∗C) ( 1 / (R∗C ) ) ˆ 2 ] ;
H sk = t f ( num sk , d e n s k )
%% P l o t s f o r s i m u l a t e d c i r c u i t
[ h , w ] = f r e q s ( num sk , d e n s k ) ;
f = w/(2∗ p i ) ;
mag = 20∗ log10 ( abs ( h ) ) ;
semilogx ( f , mag ) ;
8
%% P05 Q02
%% ========
%% S c r i p t t o c a l c u l a t e op−amp c l o s e d l o o p t r a n s f e r f u n c t i o n f o r
%% Problem S e t 0 5 : Q u e s t i o n 02
%%
%% C r e a t e d : 23 Aug 2006
%% M o d i f i e d : 23 Aug 2006
%%
%% C o p y r i g h t ( c ) 2006 Salman D u r r a n i .
%% −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
clc
clear a l l
close a l l
%% D e f i n e op−amp d a t a
fT =10ˆ6;
Aol = 2 ∗ 1 0 ˆ 5 ;
B = 1/23;
%% D e f i n e t h e f r e q u e n c y v e c t o r
f =[0 10 100 1 e3 30 e3 4 3 . 4 8 e3 1 e6 ] ’ ;
%% C a l c u l a t e open l o o p cut−o f f f r e q u e n c y
f c o l = fT / Aol ;
%% C a l c u l a t e c l o s e d l o o p t r a n s f e r f u n c t i o n
A c l f = Aol ./(1+ ( Aol ) . ∗ ( B)+ i . ∗ ( f . / f c o l ) )
Magnitude =(abs ( A c l f ) )
Phase = angle ( A c l f )∗180/ p i
9
%% P05 Q02
%% ========
%% S c r i p t t o c a l c u l a t e op−amp c l o s e d l o o p t r a n s f e r f u n c t i o n f o r
%% Problem S e t 0 5 : Q u e s t i o n 02
%%
%% C r e a t e d : 23 Aug 2006
%% M o d i f i e d : 23 Aug 2006
%%
%% C o p y r i g h t ( c ) 2006 Salman D u r r a n i .
%% −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
clc
clear a l l
close a l l
%% D e f i n e op−amp d a t a
fT =10ˆ6;
Aol = 2 ∗ 1 0 ˆ 5 ;
B = 1/100;
%% D e f i n e t h e f r e q u e n c y v e c t o r
f =[0 10 100 1 e3 10005 1 e6 ] ’ ;
%% C a l c u l a t e open l o o p cut−o f f f r e q u e n c y
f c o l = fT / Aol ;
%% C a l c u l a t e c l o s e d l o o p t r a n s f e r f u n c t i o n
A c l f = Aol ./(1+ ( Aol ) . ∗ ( B)+ i . ∗ ( f . / f c o l ) )
Magnitude =−(abs ( A c l f ) )
Phase = angle ( A c l f )∗180/ p i
10
%% P07 Q01
%% ==============
%% S c r i p t t o a n a l y s e B u t t e r w o r t h f i l t e r d e s i g n .
%% See L e c t u r e 1 1 : F i l t e r D e s i g n
%%
%% C r e a t e d : 18 Sep 2006
%% M o d i f i e d : 18 Sep 2006
%%
%% C o p y r i g h t ( c ) 2006 Salman D u r r a n i .
%% −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
clc
clear a l l
close a l l
%% C a l c u l a t e t h e o r e t i c a l B u t t e r w o r t h t r a n s f e r f u n c t i o n
n =2;
f c= 4 e3 ;
omegac = 2∗ p i ∗ f c ;
[ num , den ] = b u t t e r ( n , omegac , ’ low ’ , ’ s ’ ) ;
H th = t f ( num , den )
%% C a l c u l a t e s i m u l a t e d S a l l e n Key C i r c u i t t r a n s f e r f u n c t i o n
R = 3900;
C = 0 . 0 1 e −6;
RA = 3 9 0 0 ;
RF = 2 2 0 0 ;
G = 1+ RF/RA ;
num sk =[G/ ( ( R∗C ) ˆ 2 ) ] ;
d e n s k = [ 1 (3−G) / ( R∗C) ( 1 / (R∗C ) ) ˆ 2 ] ;
H sk = t f ( num sk , d e n s k )
%% P l o t s f o r s i m u l a t e d c i r c u i t
f = logspace ( 1 , 6 , 1 0 0 0 ) ;
[ h , w ] = f r e q s ( num sk , d e n s k , f ) ;
f = w/(2∗ p i ) ;
mag = 20∗ log10 ( abs ( h ) ) ;
p h a s e = angle ( h )∗180/ p i ;
figure
semilogx ( f , mag ) ;
figure
semilogx ( f , p h a s e ) ;
11
%% P07 Q03
%% ==============
%% S c r i p t t o a n a l y s e B e s s e l f i l t e r d e s i g n .
%% See L e c t u r e 1 1 : F i l t e r D e s i g n
%%
%% C r e a t e d : 18 Sep 2006
%% M o d i f i e d : 18 Sep 2006
%%
%% C o p y r i g h t ( c ) 2006 Salman D u r r a n i .
%% −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
clc
clear a l l
close a l l
%% C a l c u l a t e t h e o r e t i c a l B e s s e l t r a n s f e r f u n c t i o n
n =2;
f c= 4 e3 ;
omegac = 2∗ p i ∗ f c ;
[ num , den ] = b e s s e l f ( n , omegac ) ;
H th = t f ( num , den )
%% C a l c u l a t e s i m u l a t e d S a l l e n Key C i r c u i t t r a n s f e r f u n c t i o n
R = 3900;
C = 0 . 0 1 e −6;
RA = 3 9 0 0 ;
RF = 1 0 0 0 ;
G = 1+ RF/RA ;
num sk =[G/ ( ( R∗C ) ˆ 2 ) ] ;
d e n s k = [ 1 (3−G) / ( R∗C) ( 1 / (R∗C ) ) ˆ 2 ] ;
H sk = t f ( num sk , d e n s k )
%% P l o t s f o r s i m u l a t e d c i r c u i t
f = logspace ( 1 , 6 , 1 0 0 0 ) ;
[ h , w ] = f r e q s ( num sk , d e n s k , f ) ;
f = w/(2∗ p i ) ;
mag = 20∗ log10 ( abs ( h ) ) ;
p h a s e = angle ( h )∗180/ p i ;
figure
semilogx ( f , mag ) ;
figure
semilogx ( f , p h a s e ) ;
12
%% P08 Q03
%% ==============
%% S c r i p t t o d e s i g n 555 a s t a b l e c i r c u i t s .
%% See L e c t u r e 1 2 : 555 Timer C i r c u i t s
%%
%% C r e a t e d : 26 Sep 2006
%% M o d i f i e d : 26 Sep 2006
%%
%% C o p y r i g h t ( c ) 2006 Salman D u r r a n i .
%% −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
clc
clear a l l
close a l l
%% e n g i n e e r i n g f o r m a t
format s h o r t eng
%% D e s i g n d a t a
f =1e3 ;
D= 0 . 6
%% C a l c u l a t e ON and OFF t i m e
T = 1/ f ;
TH = D∗T ;
TL = (1−D)∗T ;
%% F i n d R1 , R2 and C
C = 0 . 1 e−6
i f (D
R2
R1
else
R2
R1
end
> 0.5)
= TL / ( 0 . 6 9 3 ∗ C)
= (TH/ ( 0 . 6 9 3 ∗ C))−R2
= TL / ( 0 . 6 9 3 ∗ C)
= (TH/ ( 0 . 6 9 3 ∗ C ) )
%% d e f a u l t f o r m a t
format
13
Download