ELEN 50 Projects - Santa Clara University

advertisement
1
Electric Circuits I
Aleksandar I. Zečević
Dept. of Electrical Engineering
Santa Clara University
Project 1: Optimal Power Delivery
In the circuit below the objective is to deliver power to resistors R9 and R10 .
R3
R2
Vg
±
R10
R4
R1
R5
R6
R7
R8
R9
Fig. 1. A power distribution network.
All resistors except R9 should be chosen randomly, and Vg is assumed to be 12 V .
Problem 1. Find a Thevenin equivalent with respect to R9 . Use this result to determine
conditions under which R9 absorbs maximal power.
Problem 2. Create an m-file in Matlab that will compute powers P9 , P10 and the efficiency
coefficient
(P9 + P10 )
η=
(1)
PG
for different values of R9 . Plot P9 (R9 ) and P10 (R9 ) on one graph and η(R9 ) on another using a
logarithmic scale for R9 .
NOTE: Your plot for P9 (R9 ) should be consistent with the results obtained in Problem 1.
Problem 3. Based on the plots obtained in Problem 2, select R9 so that η is maximized with
the following additional constraint:
0.7 ≤ P9 /P10 ≤ 1.3
(2)
2
Problem 4. Assemble the circuit in Fig. 1 and measure P9 , P10 and η over an appropriate
range of values for R9 . Plot the measured values in Matlab and compare with your simulation
results. Have the requirements for P9 , P10 and η been satisfied with the choice of R9 obtained
in Problem 3?
NOTE: Think about how you are going to measure the generated power PG before you come
to lab!
1
Electric Circuits I
Aleksandar I. Zečević
Dept. of Electrical Engineering
Santa Clara University
Project 2: Basic Filter Design
The circuit below
C
R1
R2
−
+
Vg
±
RL
Fig. 1. A simple low-pass filter.
it driven by a sinusoidal voltage source of the form vg (t) = cos ωt.
Problem 1. Derive an expression for the amplitude of the output voltage as a function of
R1 , R2 , C and ω (in the following we will refer to this amplitude as A(ω)).
Problem 2. Based on the results of Problem 1, design a low-pass filter that satisfies the
following requirements:
1) For ω = 0 (which corresponds to DC), the amplitude must be A(0) = 1.
2) For ω = 1, 000 rad/s, the amplitude must be A(1, 000) = 0.7.
3) Your element values must be physically realistic.
Problem 3. Write an m-file that solves the circuit in Fig. 1 for different frequencies. Use it
to plot 20 log A(ω) for the values chosen in Problem 2, and verify that the design requirements
are satisfied.
Problem 4. Repeat Problem 1 for the circuit shown in Fig. 2.
2
C2
C1
R2
−
R1
+
Vg ±
RL
Fig. 2. An alternative circuit for filter design.
Problem 5. Choose physically realistic values for R1 , R2 , C1 and C2 so that A(ω) = 10 for
all values of ω (this would correspond to an all-pass filter).
Problem 6. Choose physically realistic values for R1 , R2 , C1 and C2 so that the following
two requirements are met:
1) For ω = 0 the amplitude must be A(0) = 0.01.
2) For ω = 10, 000 rad/s, the amplitude must be A(10, 000) = 0.9.
What kind of filter is this? Explain.
Problem 7. Write an m-file that solves the circuit in Fig. 2 for different frequencies, and plot
20 log A(ω) for the values chosen in Problems 5 and 6. Use these plots to verify the two designs.
Problem 8. Assemble the circuits in Figs. 1 and 2 with the element values obtained in
Problems 2, 5 and 6. In all three cases measure A(ω) for a range of relevant frequencies, and
use the data to plot 20 log A(ω) (do this in Matlab). Compare the measurements with your
simulation results.
1
Project Tutorial for ELEN 50
Aleksandar I. Zečević
Dept. of Electrical Engineering
Santa Clara University
Project 1: Optimal Power Delivery
Consider the following circuit
R1
Vg
±
R3
R2
R5
R4
Fig. 1. A simple power transmission system.
in which R1 = 500 Ω, R2 = 1, 000 Ω, R3 = 500 Ω, R5 = 400 Ω and Vg = 12 V are given. If we view resistors R1 , R2
and R3 as transmission lines and R4 and R5 as loads to which energy must be supplied, this circuit looks very
much like a simple power system model. In such a model, loads are used to represent a wide variety of power
consuming entities, ranging from simple appliances to industrial plants and even entire cities. This diversity
suggests that some of the loads in the system can be controlled, while others can not. To reflect this fact, we will
assume that resistance R4 is controllable, and our objective will be to choose its value so that power is delivered
to both loads in the most efficient manner possible.
Before proceeding, it is important to understand that the analogy between the circuit in Fig. 1 and a realistic
power system should not be taken too far. There are a number of very important differences, two of which are
singled out below:
(i) The circuit in Fig. 1 is a DC circuit, while a power system is characterized by sinusoidal currents and
voltages.
(ii) Loads and transmission lines in a realistic power system cannot be adequately modeled by resistors. A
proper representation requires inductors and capacitors as well (you will learn much more about this in ELEN
105).
In order to get a sense for the practical issues that arise in the process of power delivery, we will examine two
possible strategies for selecting resistor R4 .
Design Strategy 1. Choose R4 so that the power absorbed by this resistor is maximized (this type of
requirement is common in communication systems).
The implementation of this strategy is best understood by considering the simple circuit in Fig. 2, in which
Vg and RS are fixed and RL can be adjusted. Since the current through RL is given as
i=
Vg
RS + RL
(1)
2
the power absorbed by this resistor can be expressed as
PRL = RL i2 =
RL
V2
(RS + RL )2 g
(2)
It is easily verified that this power is maximal when
dPRL
=0
dRL
which occurs for RL = RS . Such a choice for RL produces
(3)
1 Vg2
4 RS
which is the largest amount of power that this resistor can absorb.
Pmax =
(4)
RS
Vg
±
RL
Fig. 2. A simplified circuit for studying maximal power delivery.
The above result can be easily extended to the circuit in Fig. 1 if we compute a Thevenin equivalent with
respect to resistor R4 . In that case our problem reduces to the circuit in Fig. 2, in which Vg and RS are
replaced by Vth and Rth , respectively. For the given element values, it is easily verified that Rth = 305.5 Ω and
Vth = 8.67 V , so the optimal value for R4 is 306 Ω.
Maximizing the power absorbed by load R4 is not always the best design strategy. In fact, in many cases it
is more important to minimize the energy that is lost in the course of transmission (such a requirement is very
common in power systems). From that standpoint, it would be appropriate to maximize the so-called efficiency
ratio, which is defined as
Total load power
η=
(5)
Total generated power
In our circuit, this ratio can be expressed as
η=
(PR4 + PR5 )
PG
(6)
To evaluate η for Design Strategy 1, we must first solve the circuit in Fig. 1 with R4 = 306 Ω. The KCL
equations for this circuit are
iR1 = (V1 − V2 )/R1
1) ig + iR1 + iR2 = 0
2) −iR1 + iR3 + iR4 = 0
3) −iR2 − iR3 + iR5 = 0
iR2 = (V1 − V3 )/R2
iR3 = (V2 − V3 )/R3
iR4 = V2 /R4
iR5 = V3 /R5
ig = ?
(7)
3
Equations (7) can be rewritten in matrix form as

1
 −1/R1
−1/R2
and their solution is


 
V1
0
0
Vg
  V2  =  0 
(1/R1 + 1/R3 + 1/R4 )
−1/R3
0
−1/R3
(1/R2 + 1/R3 + 1/R5 )
V3


 
V1
12.000 V
 V2  =  4.3365 V 
3.7587 V
V3
(8)
(9)
Based on these results, we can conclude that resistors R4 and R5 absorb PR4 = 0.0615 W and PR5 = 0.0353 W ,
respectively. Since the power delivered by the generator is PG = Vg ig , we also need to compute current ig . We
can do this using the first KCL equation, which implies
ig = −iR1 − iR2 = 0.0236 A
(10)
From (10) it follows that the generator delivers
PG = 0.2828 W
(11)
and that the corresponding efficiency coefficient is η = 0.3422.
The obtained result points to two potential weaknesses of Design Strategy 1:
(i) Only 34% of the generated power reaches the loads, while the rest is lost in the transmission system.
(ii) The power absorbed by resistor R4 is almost twice as large as the one absorbed by R5 . A more balanced
distribution would be preferable.
In order to resolve these problems, we will now consider an alternative strategy:
Design Strategy 2. Choose R4 to maximize the efficiency coefficient, while keeping the power distribution
reasonably balanced. In practial terms, the latter requirement can be expressed as an inequality constraint, such
as
0.8 ≤ PR4 /PR5 ≤ 1.2
(12)
or something similar.
This problem is much harder than the previous one, and has no analytic solutions (Thevenin equivalents can’t
help us here). One possible approach is to repeatedly solve system (8) for different values of R4 , and plot the
corresponding function η(R4 ). This is not difficult to do in Matlab if we rewrite equation (8) as
(G1 +
1
G2 )V = b
R4
(13)
where

and
1
G1 =  −1/R1
−1/R2

0
0

(1/R1 + 1/R3 )
−1/R3
−1/R3
(1/R2 + 1/R3 + 1/R5 )

0 0 0
G2 =  0 1 0 
0 0 0

(14)
(15)
4
are fixed matrices, V is the vector of unknown voltages, and

Vg
b= 0 
0

(16)
The Matlab program for this problem is provided in Appendix 1, and the simulation results are shown in Figs.
3 and 4.
0.5
0.45
0.4
Coefficient Eta
0.35
0.3
0.25
0.2
0.15
0.1
0.05
0
0
10
1
10
2
10
3
10
4
10
5
10
6
10
Resistance R4
Fig. 3. The efficiency coefficient η as a function of R4 .
0.08
0.07
Powers P4 and P5
0.06
0.05
0.04
0.03
0.02
0.01
0
0
10
1
10
2
10
3
10
4
10
5
10
6
10
Resistance R4
Fig. 4. Powers P4 and P5 (heavier line) as functions of R4 .
The plot in Fig. 3 suggests that R4 = 2, 000 Ω is the best choice from the standpoint of maximizing η,
producing η = 0.46. However, Fig. 4 shows that for such a choice the power PR5 is almost twice as large as PR4 .
A better balance is achieved by selecting R4 = 1, 000 Ω, in which case η is only slightly reduced (to η = 0.447),
but PR4 /PR5 = 0.85.
5
Project 2: Analysis of Basic Filters
In this section our objective will be to study basic filters and their applications. We begin with the following
simple circuit, in which the source has the form vg (t) = cos ωt.
R
vg(t) ±
C
Fig. 5. A simple RC filter.
Since we would like to use this circuit at different frequencies, it makes sense to leave ω unspecified in our analysis.
Taking the capacitor voltage as the output, we have
~0 =
V
1/(jωC) ~
1
Vg =
R + 1/(jωC)
1 + jωRC
(17)
~0 can be expressed as
~g = 1), and the magnitude and angle of V
(since V
and
1
~0 | ≡ A(ω) = p
|V
1 + (ωRC)2
~0 ≡ ϕ(ω) = − tan−1 (ωRC)
∠V
(18)
(19)
respectively. The corresponding output voltage in the time domain will have the form
v0 (t) = A(ω) cos(ωt + ϕ(ω))
(20)
It is important to recognize that both the amplitude and the angle of the output voltage (20) depend on the
frequency. To see what this means in practical terms, let us focus on three specific values of ω :
1) For ω = 0 (which corresponds to DC), we have A(0) = 1 and ϕ(0) = 0, and consequently
v0 (t) = 1
√
2) For ω = ω0 ≡ 1/RC, we have A(ω0 ) = 1/ 2 = 0.71 and ϕ(ω0 ) = −45◦ , and consequently
v0 (t) = 0.71 cos(ω0 t − 45◦ )
(21)
(22)
3) For ω = 20ω0 , we have A(20ω0 ) = 0.05 and ϕ(20ω0 ) = −87◦ , and consequently
v0 (t) = 0.05 cos(20ω0 t − 87◦ )
(23)
Since the amplitude of the output voltage becomes very small when ω À ω0 , we refer to this type of circuit as a
low-pass filter. The frequency ω0 at which the amplitude of v0 (t) is reduced to ≈ 70% of its initial value is an
important characteristic of the filter, and is known as the corner frequency.
6
For a more detailed analysis of this circuit, it is useful to obtain a plot of the function A(ω) given in (18).
Such a plot is shown in Fig. 6, for the case when R = 1KΩ and C = 1µF (the Matlab program that was used
to obtain it is provided in in Appendix 2).
0
-10
Amplitude (dB)
-20
-30
-40
-50
-60
0
10
1
2
10
3
10
4
10
10
5
10
6
10
Frequency (rad/s)
Fig. 6. Frequency response for the circuit in Fig. 5.
Several comments need to be made regarding this plot.
Remark 1. It is customary to plot 20 log A(ω) rather than A(ω) itself.
Remark 2. The x-axis is logarithmic, since the frequency ranges from 1 rad/s to 106 rad/s.
Remark 3. The corner frequency for this particular low-pass filter is ω0 = 1/RC = 1, 000 rad/s.
A Typical Application of Filters
Suppose you are receiving a signal which has an undesirable high frequency component (we refer to such a
component as “interference”). This type of situation occurs virtually every time information is transmitted over
a distance. A typical example of such a signal would be something like
vin (t) = cos 10t + 0.2 cos 300t
(24)
which corresponds to the function shown in Fig. 7.
The simple low-pass circuit in Fig. 5 can be used to “clean up” such a signal. To see this, let us pick R and
C so that ω0 = 1/RC = 20 rad/s, and use superposition to separate the responses. For the two components, the
expressions derived in (18) and (19) produce
A(10) = 0.894
and
ϕ(10) = −26◦
(25)
A(300) = 0.013
and
ϕ(300) = −86◦ ,
(26)
and
respectively. Combining the two responses, we obtain
v0 (t) = 0.894 cos(10t − 26◦ ) + 0.013 cos(300t − 86◦ )
which is graphically represented in Fig. 8.
(27)
7
1.5
1
0.5
0
-0.5
-1
-1.5
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
1.6
1.8
2
Time (seconds)
Fig. 7. A noisy sinusoid.
1
0.8
0.6
0.4
0.2
0
-0.2
-0.4
-0.6
-0.8
-1
0
0.2
0.4
0.6
0.8
1
1.2
1.4
Time (seconds)
Fig. 8. The sinusoid after filtering.
This plot clearly shows that the undesirable component has now been almost eliminated (at the expense of a
10% decrease in the amplitude of the output voltage).
The Design and Simulation of Active Filters
Although the circuit considered in Fig. 5 is a legitimate low-pass filter, it can satisfy only very basic design
requirements. For more sophisticated applications, it is necessary to use so-called active circuits, with one or
more operational amplifiers. A class of simple active filters corresponds to the circuit in Fig. 9.
This generic circuit can produce several different types of filters, depending on how we choose impedances Z1
and Z2 . To analyze it, let us first observe that the KCL equation at the inverting terminal of the op amp has
the form
−I~Z1 + I~Z2 = 0
(28)
8
Z2
Z1
−
+
Vg ±
RL
Fig. 9. A generic active filter.
Recalling that this input is virtually grounded, we have
~g
V
I~Z1 =
Z1
and
~0
V
I~Z2 = −
Z2
(29)
and therefore
~g .
~0 = − Z2 V
V
Z1
(30)
As an illustration of what this circuit can do, let us consider the scenario shown in Fig. 10, which corresponds
to Z1 = R1 + 1/jωC and Z2 = R2 .
R2
R1
C
−
+
Vg ±
RL
Fig. 10. A special case of the active filter circuit.
In this case (30) becomes
~0 = −
V
R2
~g = − jωCR2
V
R1 + 1/jωC
1 + jωCR1
(31)
and the amplitude of the output voltage is obtained as
ωCR2
A(ω) = p
1 + (ωCR1 )2
(32)
This function is shown in Fig. 11, for the case when R1 = R2 = 1KΩ and C = 1µF (the Matlab program used
9
to obtain it is provided in Appendix 3).
0
-10
Amplitude (dB)
-20
-30
-40
-50
-60
-70
0
10
1
2
10
3
10
4
10
10
5
6
10
10
Frequency (rad/s)
Fig. 11. The frequency response of the circuit in Fig. 10.
The plot suggests that the circuit in Fig. 10 is a high-pass filter, which produces meaningful output voltages for
sufficiently high frequencies.
For larger circuits, it is generally very difficult to obtain an explicit expression for A(ω) like the one in (32),
and it is necessary to resort to simulation. To illustrate how this process works, let us once again consider the
circuit in Fig. 10. The KCL equations for this circuit have the form
1) I~g + I~R1 = 0
⇒
2) −I~R1 + I~C = 0
~1 − V
~2 )/R1
I~R1 = (V
~1 = V
~g
V
~3 − V
~4 )/R2
I~R2 = (V
~4 /RL
I~RL = V
3) −I~C + I~R2 = 0
4) −I~R1 + I~x + I~RL = 0
⇒
~2 − V
~3 )
I~C = jωC(V
~3 = 0
V
(33)
I~g = ?
I~x = ?
It is not difficult to see that these equations can be rewritten in matrix form as

1
 −1/R1


0
0
 ~
V1
0
0
0
~
 V
(1/R1 + jωC)
−jωC
0
 2
~3
−jωC
(1/R2 + jωC) −1/R2   V
0
1
0
~4
V
Since ω is a variable, it is useful to further rewrite (34) as
~ =b
(G1 + jωG2 )V

~g
V
  0 

=
  0 
0


(34)
(35)
where

1
 −1/R1

G1 = 
0
0
0
1/R1
0
0
0
0
1/R2
1

0

0

−1/R2 
0
(36)
10
and

0
0
 0 C
G2 = 
 0 −C
0
0
0
−C
C
0

0
0 

0 
0
(37)
~ is the vector of unknown voltages, and
are fixed matrices, V

1
 0 

b=
 0 
0

(38)
~g = 1 for all problems of this type).
(note again that V
The Matlab function in Appendix 4 can be used to simulate the frequency response of this circuit, based on
repeated solutions of equation (35) for different values of ω. The frequency response obtained in this way is
identical to the one shown in Fig. 11.
Download