Circuit Analysis I With MATLAB Computing
Circuit Analysis I With MATLAB Computing
Orchard Publications
www.orchardpublications.com
Students and working professionals will find Circuit
Circuit Analysis I Analysis I with MATLAB® Computing and
with MATLAB® Computing and Simulink®/SimPowerSystems Modeling to be a con-
cise and easy-to-learn text. It provides complete,
Simulink®/SimPowerSystems Modeling clear, and detailed explanations of the principal elec-
trical engineering concepts, and these are illustrated
with numerous practical examples.
Steven T. Karris is the founder and president of Orchard Publications, has undergraduate and
graduate degrees in electrical engineering, and is a registered professional engineer in California
and Florida. He has more than 35 years of professional engineering experience and more than 30
years of teaching experience as an adjunct professor, most recently at UC Berkeley, California. His
area of interest is in The MathWorks, Inc. products and the publication of MATLAB® and
Simulink® based texts.
™
Orchard Publications
Visit us on the Internet
www.orchardpublications.com
or email us: [email protected]
ISBN-13: 978-1-934404-17-1
ISBN-10: 1-934404-17-9
$79.95 U.S.A.
Circuit Analysis I with MATLAB® Computing and Simulink® / SimPowerSystems® Modeling
Copyright 2009 Orchard Publications. All rights reserved. Printed in USA. No part of this publication may be
reproduced or distributed in any form or by any means, or stored in a data base or retrieval system, without the prior
written permission of the publisher.
Direct all inquiries to Orchard Publications, 39510 Paseo Padre Parkway, Fremont, California 94538, U.S.A.
URL: http://www.orchardpublications.com
Product and corporate names are trademarks or registered trademarks of the MathWorks, Inc., and Microsoft
Corporation. They are used only for identification and explanation, without intent to infringe.
ISBN10: 1934404179
ISBN13: 9781934404171
TX 5737590
Disclaimer
The author has made every effort to make this text as complete and accurate as possible, but no warranty is implied.
The author and publisher shall have neither liability nor responsibility to any person or entity with respect to any loss
or damages arising from the information contained in this text.
This text is an introduction to the basic principles of electrical engineering. It is the outgrowth of
lecture notes prepared by this author while employed by the electrical engineering and computer
engineering departments as adjunct instructor at various colleges and universities. Many of the
examples and problems are based on the author’s industrial experience. The text is an expansion
of our previous publication, Circuit Analysis I with MATLAB® Applications, ISBN 9780
970951120, and this text, in addition to MATLAB scripts for problem solution, includes
several Simulink® and SimPowerSystems® models. The pages where these models appear are
indicated n the Table of Contents.
The book is intended for students of college grade, both community colleges and universities. It
presumes knowledge of first year differential and integral calculus and physics. While some
knowledge of differential equations would be helpful, it is not absolutely necessary. Chapters 9 and
10 include stepbystep procedures for the solutions of simple differential equations used in the
derivation of the natural and forces responses. Appendices D and E provide a thorough review of
complex numbers and matrices respectively.
In addition to several problems provided at the end of each chapter, this text includes multiple-
choice questions to test and enhance the reader’s knowledge of this subject. Moreover, the
answers to these questions and detailed solutions of all problems are provided at the end of each
chapter. The rationale is to encourage the reader to solve all problems and check his effort for
correct solutions and appropriate steps in obtaining the correct solution. And since this text was
written to serve as a selfstudy, primary, or supplementary textbook, it provides the reader with a
resource to test the reader’s knowledge.
A previous knowledge of MATLAB® would be very helpful. However he material of this text can
be learned without MATLAB, Simulink and SimPowerSystems. This author highly recommends
that the reader studies this material in conjunction with the inexpensive Student Versions of The
MathWorks™ Inc., the developers of these outstanding products, available from:
The MathWorks, Inc.
3 Apple Hill Drive
Natick, MA, 01760
Phone: 508-647-7000,
www.mathworks.com
[email protected].
Appendix A of this text provides a practical introduction to MATLAB, Appendix B is an
introduction to Simulink, and Appendix C is an introduction to SimPowerSystems. These
packages will be invaluable in later studies such as the design of analog and digital filters.
Preface
Like any other new book, this text may contain some grammar and typographical errors;
accordingly, all feedback for errors, advice and comments will be most welcomed and greatly
appreciated.
Orchard Publications
39510 Paseo Padre Parkway
Suite 315
Fremont, California 94538
www.orchardpublications.com
[email protected]
Table of Contents
1 Basic Concepts and Definitions 11
1.1 The Coulomb ........................................................................................................11
1.2 Electric Current and Ampere ...............................................................................11
1.3 Two Terminal Devices .........................................................................................14
1.4 Voltage (Potential Difference) .............................................................................15
1.5 Power and Energy .................................................................................................18
1.6 Active and Passive Devices ................................................................................111
1.7 Circuits and Networks ........................................................................................113
1.8 Active and Passive Networks .............................................................................113
1.9 Necessary Conditions for Current Flow .............................................................113
1.10 International System of Units ............................................................................114
1.11 Sources of Energy ...............................................................................................117
1.12 Summary .............................................................................................................119
1.13 Exercises .............................................................................................................121
1.14 Answers / Solutions to EndofChapter Exercises ............................................124
MATLAB Computing: Pages 16 through 18
Circuit Analysis I with MATLAB Computing and Simulink / SimPowerSystems Modeling iii
Copyright © Orchard Publications
7.6 Phasor Diagrams ................................................................................................ 717
7.7 Electric Filters .................................................................................................... 722
7.8 Basic Analog Filters ........................................................................................... 723
7.9 Active Filter Analysis ........................................................................................ 728
7.10 Summary ............................................................................................................ 731
7.11 Exercises............................................................................................................. 732
7.12 Answers to EndofChapter Exercises.............................................................. 739
MATLAB Computing: Pages 7-4, 76, 78, 712, 713, 715, 717, 721, 730,
744, 745, 746, 748, 750, 751, 755, 756, 758
Simulink models: Pages 79, 710
T
his chapter begins with the basic definitions in electric circuit analysis. It introduces the
concepts and conventions used in introductory circuit analysis, the unit and quantities used
in circuit analysis, and includes several practical examples to illustrate these concepts.
Throughout this text, a left justified horizontal bar will denote the beginning of an example, and
a right justified horizontal bar will denote the end of the example. These bars will not be shown
whenever an example begins at the top of a page or at the bottom of a page. Also, when one
example follows immediately after a previous example, the right justified bar will be omitted.
q 1m q
Vacuum –7
F = 10 c 2 N
q=1 coulomb
The coulomb, abbreviated as C , is the fundamental unit of charge. In terms of this unit, the
– 19 18
charge of an electron is 1.6 10 C and one negative coulomb is equal to 6.24 10 electrons.
Charge, positive or negative, is denoted by the letter q or Q .
Circuit Analysis I with MATLAB Computing and Simulink / SimPowerSystems Modeling 11
Copyright © Orchard Publications
Chapter 1 Basic Concepts and Definitions
Example 1.4
It is assumed a 12volt automotive battery is completely discharged and at some reference time
t = 0 , is connected to a battery charger to trickle charge it for the next 8 hours. It is also assumed
that the charging rate is
8e – t 3600 A
it =
0 t 8 hr
0 otherwise
i(t)
(A)
8 – t § 3600
i = 8e
t (s)
28800
Figure 1.11. Decaying exponential for Example 1.4
Then,
a.
0 0
15000 28800 28800
15000 – t 3600 8 – t 3600
q = i dt = 8e dt = ---------------------- e
t=0 – 1 3600 0
–8
= – 8 3600 e – 1 28800 C or 28.8 kC
b.
i max = 8 A (occurs at t=0)
Therefore,
p max = vi max = 12 8 = 96 w
0 0
c.
28800 28800 28800
– t 3600 96 – t 3600
W = p dt = vi dt = 12 8e dt = ---------------------- e
– 1 3600 0
5 –8
= 3.456 10 1 – e 345.6 KJ.
110 Circuit Analysis I with MATLAB Computing and Simulink / SimPowerSystems Modeling
Copyright © Orchard Publications
Chapter 2
Analysis of Simple Circuits
T
his chapter defines constant and instantaneous values, Ohm’s law, and Kirchhoff’s Current
and Voltage laws. Series and parallel circuits are also defined and nodal, mesh, and loop
analyses are introduced. Combinations of voltage and current sources and resistance com-
binations are discussed, and the voltage and current division formulas are derived.
2.1 Conventions
We will use lower case letters such as v , i , and p to denote instantaneous values of voltage, cur-
rent, and power respectively, and we will use subscripts to denote specific voltages, currents,
resistances, etc. For example, v S and i S will be used to denote voltage and current sources
respectively. Notations like v R1 and i R2 will be used to denote the voltage across resistance R 1
and the current through resistance R 2 respectively. Other notations like v A or v 1 will represent
the voltage (potential difference) between point A or point 1 with respect to some arbitrarily cho-
sen reference point taken as “zero” volts or “ground”.
The designations v AB or v 12 will be used to denote the voltage between point A or point 1 with
respect to point B or 2 respectively. We will denote voltages as v t and i t whenever we wish
to emphasize that these quantities are time dependent. Thus, sinusoidal (AC) voltages and cur-
rents will be denoted as v t and i t respectively. Phasor quantities, to be introduced in Chapter
6, will be represented with bold capital letters, V for phasor voltage and I for phasor current.
The unit of resistance is the Ohm and its symbol is the Greek capital letter . One ohm is the
resistance of a conductor such that a constant current of one ampere through it produces a volt-
age of one volt between its ends. Thus,
Circuit Analysis I with MATLAB Computing and Simulink / SimPowerSystems Modeling 21
Copyright © Orchard Publications
Resistance and Conductance Combinations
RK
n
R eq = R 1 + R 2 + R 3 + + R n =
k=1
(2.36)
For Resistors in Series
Example 2.4
For the circuit of Figure 2.30, find the value of the current i after combining the voltage sources
to a single voltage source and the resistances to a single resistor.
4 64 V 6
v + R
+
v S1 + R v S3
1 S2 2
+ +
i
200 V R 4 + 80 V
R3 +
A 10 8
Figure 2.30. Circuit for Example 2.4
Solution:
We add the values of the voltage sources as indicated in Definitions 8 and 9, we add the resis-
tances in accordance with (2.36), and we apply Ohm’s law. Then,
v
i = ------- 200 – 64 + 80 56
- = -------------------------------------- = ------ = 2 A (2.37)
R 28 28
Next, we consider the case where n resistors are connected in parallel as shown in Figure 2.31.
R1
i1
iT iT
A i2 R2 B
in Rn
v AB
Figure 2.31. Addition of resistances in parallel
By KCL,
iT = i1 + i2 + + in (2.38)
Circuit Analysis I with MATLAB Computing and Simulink / SimPowerSystems Modeling 219
Copyright © Orchard Publications
Chapter 2 Analysis of Simple Circuits
R2
4 +
R1 iS
R3 5 v 12
i2 i1 3A
20
R4
Figure 2.41. Application of current division expressions for the circuit of Example 2.7
R1= 29 R2 = 12
CCS
s
-
-3 + -i + -i Continuous
+ -i CM 2 CM 3
Constant powergui
CM 1
226 Circuit Analysis I with MATLAB Computing and Simulink / SimPowerSystems Modeling
Copyright © Orchard Publications
Chapter 3
Nodal and Mesh Equations Circuit Theorems
T
his chapter begins with nodal, loop and mesh equations and how they are applied to the
solution of circuits containing two or more nodepairs and two or more loops or meshes.
Other topics included in this chapter are the voltagetocurrent source transformations
and vice versa, Thevenin’s and Norton’s theorems, the maximum power transfer theorem, linear-
ity, superposition, efficiency, and regulation.
Theorem 3.1
Let N = number of nodes in a circuit ; then N – 1 independent nodal equations are required to
completely describe that circuit. These equations are obtained by setting the algebraic sum of the
currents leaving each of the N – 1 nodes equal to zero.
Theorem 3.2
Let L = M = number of loops or meshes , B = number of branches , N = number of nodes
in a circuit; then L = M = B – N + 1 independent loop or mesh equations are required to com-
pletely describe that circuit. These equations are obtained by setting the algebraic sum of the
voltage drops around each of the L = M = B – N + 1 loops or meshes equal to zero.
Circuit Analysis I with MATLAB Computing and Simulink / SimPowerSystems Modeling 31
Copyright © Orchard Publications
Analysis with Nodal Equations
Example 3.2
For the circuit of Figure 3.4, write nodal equations in matrix form and solve for the unknowns
using matrix theory, Cramer’s rule, or Gauss’s elimination method. Verify your answers with
Excel or MATLAB. Please refer to Appendix A for procedures and examples. Then construct a
table showing the voltages across, the currents through and the power absorbed or delivered by
each device. Verify your answer with a Simulink / SimPowerSystems model.
+
8 10 V
+ 4 6
12 V 18 A 24 A
v 1 = 12 (3.8)
Circuit Analysis I with MATLAB Computing and Simulink / SimPowerSystems Modeling 35
Copyright © Orchard Publications
Analysis with Mesh or Loop Equations
Now, we can find the voltage drop across the 5 A current source by application of KVL around
Mesh 1 using the following relation:
2 3.3975 + 4 3.3975 + 1.6025 + v 5A + 10 3.3975 – 1.2315 – 12 = 0
This yields
v 5A = – 36.455
We can verify this value by application of KVL around Mesh 2 where beginning with the lower
end of the 6 w resistor and going counterclockwise we obtain
6 + 8 1.6025 – 36 + 4 3.3975 + 1.6025 – 36.455 + 16 1.6025 + 0.2737 = 0
With these values, we can also compute the power delivered or absorbed by each of the voltage
sources and the current source.
3.40 C VS 2 36
36 V
I1 K3
+ i s
- +
-
CM 1
2 8
+
C VS 1
12 V
4 6
s
-
-1.60
12 I2 i +
+
-
CCS 1
K1 -5 5A CM 2
s
-
K2
10 16
+
C VS 3
12 V1
R1=3 20
s
0.27
i +
I4 -
12 1.23 CM 4
C VS 4 24
K4 I3 24 V Continuous
i +
s K5
+
- - powergui
CM 3 18
Circuit Analysis I with MATLAB Computing and Simulink / SimPowerSystems Modeling 319
Copyright © Orchard Publications
Chapter 4
Introduction to Operational Amplifiers
T
his chapter is an introduction to amplifiers. It discusses amplifier gain in terms of decibels
(dB) and provides an overview of operational amplifiers, their characteristics and applica-
tions. Numerous formulas for the computation of the gain are derived and several practical
examples are provided.
4.1 Signals
A signal is any waveform that serves as a means of communication. It represents a fluctuating
electric quantity, such as voltage, current, electric or magnetic field strength, sound, image, or
any message transmitted or received in telegraphy, telephony, radio, television, or radar. A typical
signal which varies with time is shown in figure 4.1 where f t can be any physical quantity such
as voltage, current, temperature, pressure, and so on.
f t
t
Figure 4.1. A signal that changes with time
4.2 Amplifiers
An amplifier is an electronic circuit which increases the magnitude of the input signal. The sym-
bol of a typical amplifier is a triangle as shown in Figure 4.2.
vin
vout
Electronic Amplifier
Figure 4.2. Symbol for electronic amplifier
An electronic (or electric) circuit which produces an output that is smaller than the input is
called an attenuator. A resistive voltage divider is a typical attenuator.
Circuit Analysis I with MATLAB Computing and Simulink / SimPowerSystems Modeling 41
Copyright © Orchard Publications
An Overview of the Op Amp
120 K
20 K Rf
v in+ R in v out
+ +
R 120 K
G v = – -------f- = – -------------------- = – 6
R in 20 K
and the output voltage is
v out = G v v in = – 6 sin t = – 6 sin t mV
6
v (mv)
v out = – 6 sin t
4
v in = sin t
2
-2
-4
-6
0 2 4 6 8 10 12
Figure 4.13. Input and output waveforms for the circuit of Example 4.4
An op amp is said to be connected in the noninverting mode when an input signal is connected
to the noninverting () input through an external resistor R which serves as a current limiter,
and the inverting () input is grounded through an external resistor R in as shown in Figure 4.14.
In our subsequent discussion, the resistor R will represent the internal resistance of the applied
voltage v in .
Circuit Analysis I with MATLAB Computing and Simulink / SimPowerSystems Modeling 49
Copyright © Orchard Publications
Chapter 4 Introduction to Operational Amplifiers
- = – ------ R 4 + R 2 -----4- + 1
v out 1 R
G v = ---------
v in R1 R3
9.
Rf +
+ R in ------- v in v out
+ R in
v in
- Scope
CVS +v Bus
VM 1 - Continuous
Creator
s
-
Vin VM 2
Rin Product powergui
452 Circuit Analysis I with MATLAB Computing and Simulink / SimPowerSystems Modeling
Copyright © Orchard Publications
Chapter 5
Inductance and Capacitance
The effects of the inductance and capacitance properties can best be stated in simple differential
equations since they involve the changes in voltage or current with time. We will study induc-
tance first.
5.2 Inductance
Inductance is associated with the magnetic field which is always present when there is an electric
current. Thus, when current flows in an electric circuit the conductors (wires) connecting the
devices in the circuit are surrounded by a magnetic field. Figure 5.1 shows a simple loop of wire
and its magnetic field represented by the small loops.
The direction of the magnetic field (not shown) can be determined by the lefthand rule if con-
ventional current flow is assumed, or by the righthand rule if electron current flow is assumed.
The magnetic field loops are circular in form and are referred to as lines of magnetic flux. The unit
of magnetic flux is the weber (Wb).
Circuit Analysis I with MATLAB Computing and Simulink / SimPowerSystems Modeling 51
Copyright © Orchard Publications
Chapter 5 Inductance and Capacitance
vC t
(V)
1.00
0.75
0.50
0.25
0 t (ms)
0.25 1 2 3 4
0.50
0.75
1.00
Example 5.5 has illustrated the well known fact that the voltage across a capacitor cannot change
instantaneously. Referring to the current and voltage waveforms for this example, we observe
that the current through the capacitor can change instantaneously as shown by the discontinui-
ties at t = 1 2 3 and 4 ms in Figure 5.21. However, the voltage across the capacitor never
changes instantaneously, that is, it displays no discontinuities since its value is explicitly defined
at all instances of time as shown in Figure 5.24.
520 Circuit Analysis I with MATLAB Computing and Simulink / SimPowerSystems Modeling
Copyright © Orchard Publications
Chapter 6
Sinusoidal Circuit Analysis
T
his chapter is an introduction to circuits in which the applied voltage or current are sinu-
soidal. The time and frequency domains are defined and phasor relationships are developed
for resistive, inductive and capacitive circuits. Reactance, susceptance, impedance and
admittance are also defined. It is assumed that the reader is familiar with sinusoids and complex
numbers. If not, it is strongly recommended that Appendix B is reviewed thoroughly before read-
ing this chapter.
Example 6.1
For the circuit shown in Figure 6.1, derive an expression for v C t in terms of V p , R , C , and
Circuit Analysis I with MATLAB Computing and Simulink / SimPowerSystem Modeling 61
Copyright © Orchard Publications
Chapter 6 Sinusoidal Circuit Analysis
2 2
2 2
Also, for brevity, in our subsequent discussion we will designate resistive, inductive and capaci-
tive circuits as R , L , and C respectively.
vS t + VS +
iR t vR t IR
VR
v R t = Ri R t = V p cos t + V R = RI R
a t – domain network b j – domain phasor network
Figure 6.4. Voltage across a resistive load in t – domain and j – domain
We know from Ohm’s law that v R t = Ri R t where the resistance R is a constant. We will
show that this relationship also holds for the phasors V R and I R shown in circuit 6.4 (b), that
is, we will prove that
68 Circuit Analysis I with MATLAB Computing and Simulink / SimPowerSystems Modeling
Copyright © Orchard Publications
Chapter 6 Sinusoidal Circuit Analysis
VA VB
2 1
4 8
Vs +v +v Is
- -
1 VM 1 2 VM 2
Continuous
Scope1 Scope 2
Resistances in Ohms VB powergui
VA
Capacitors in microfarads
Inductor in millihenries
VM = Voltage Mezasurement
Scope 3
VA , VB
Subtract VA-VB
Bus
Creator
Figure 6.19. Simulink / SimPowerSystems model for the circuit in Example 6.13
622 Circuit Analysis I with MATLAB Computing and Simulink / SimPowerSystems Modeling
Copyright © Orchard Publications
Chapter 7
Phasor Circuit Analysis
T
his chapter begins with the application of nodal analysis, mesh analysis, superposition, and
Thevenin’s and Norton’s theorems in phasor circuits. Then, phasor diagrams are intro-
duced, and the inputoutput relationships for an RC lowpass filter and an RC highpass
filter are developed.
Example 7.1
Use nodal analysis to compute the phasor voltage V AB = V A – V B for the circuit of Figure 7.1.
VA VB
2 j3
4 8
5 0 A – j 6 – j 3
10 0 A
Z 1 = 4 – j6 = 7.211 – 56.3
Z 2 = 2 + j3 = 3.606 56.3
Z 3 = 8 – j3 = 8.544 – 20.6
Circuit Analysis I with MATLAB Computing and Simulink / SimPowerSystems Modeling 71
Copyright © Orchard Publications
Chapter 7 Phasor Circuit Analysis
– Z 1 I 1 + Z 1 + Z 2 + Z 3 I 2 – Z 3 I 3 = 0
– 4 – j6 I 1 + 14 – j6 I 2 – 8 – j3 I 3 = 0 (7.10)
1 0 0 I1 5
– 4 – j6 14 – j6 –– 8 – j3 I 2 = 0 (7.12)
0 0 1 I3 10
We observe that this is the same value as that of the voltage V B in the previous example.
Example 7.3
Use the superposition principle to find the phasor voltage across capacitor C 2 in the circuit of
Figure 7.5.
* As we experienced with Example 7.1, the computation of phasor voltages and currents becomes quite tedious. Accordingly,
in our subsequent discussion we will use MATLAB for the solution of simultaneous equations with complex coefficients.
76 Circuit Analysis I with MATLAB Computing and Simulink / SimPowerSystems Modeling
Copyright © Orchard Publications
Chapter 8
Average and RMS Values, Complex Power, and Instruments
T
his chapter defines average and effective values of voltages and currents, instantaneous and
average power, power factor, the power triangle, and complex power. It also discusses elec-
trical instruments that are used to measure current, voltage, resistance, power, and energy.
cos t cos t +
T T T T
T T T T
Other periodic functions of interest are the square and the triangular waveforms.
Circuit Analysis I with MATLAB Computing and Simulink / SimPowerSystems Modeling 81
Copyright © Orchard Publications
Chapter 8 Average and RMS Values, Complex Power, and Instruments
Thus, the total average power supplied by the current sources is equal to the total average power
absorbed by the resistors. The small difference is due to rounding of fractional numbers.
0 0 0 i R dt
T T T
1 1 v 2- 1 2
P ave = --- p dt = --- ----- dt = --- (8.35)
T T R T
Example 8.7
Compute the average power absorbed by a 5 resistor when the voltage across it is the half
wave rectification waveform shown in Figure 8.14.
Voltage (v)
10 sin t
1 2
t (ms)
Figure 8.14. Waveform for Example 8.7
Solution:
We first need to find the numerical value of . It is found as follows:
= 2------ = 10
–3 3
T = 2 ms = 2 10 s T = 2
T
and thus 3
10 sin t = 10 sin 10
0 0 10
Then,
–3 2 3 –3
1 T
v 2- 1 - 10 2
10 sin 10 -t + 2 10
P ave = --- ----- dt = -------------------
–3
--------------------------------- 0 dt
T R 2 10 5 –3
0 0 0
or
–3 –3 –3
100 10 1 10 10 3
P ave = ----------------------
- --- 1 – cos 2 10 3 t dt = 5 10 3 dt – cos 2 10 t dt
–3 2
10 10
–3
–3
= 5 10 t – ------------------------------ 10
10
3 3
3 sin 2 10 -t = 5 10 10
3 –3 sin 2 10
– ----------------------------------------------
3 3
2 10 2 10
0
814 Circuit Analysis I with MATLAB Computing and Simulink / SimPowerSystems Modeling
Copyright © Orchard Publications
Chapter 9
Natural Response
T
his chapter discusses the natural response of electric circuits.The term natural implies that
there is no excitation in the circuit, that is, the circuit is sourcefree, and we seek the cir-
cuit’s natural response. The natural response is also referred to as the transient response.
+
R L
+ i
Figure 9.1. Circuit for determining the natural response of a series RL circuit
Application of KVL yields
vL + vR = 0
or
di
L ----- + Ri = 0 (9.1)
dt
Here, we seek a value of i which satisfies the differential equation of (9.1), that is, we need to find
the natural response which in differential equations terminology is the complementary function. As
we know, two common methods are the separation of variables method and the assumed solution
method. We will consider both.
1. Separation of Variables Method
Next, integrating both sides and using the initial condition, we obtain
0
i1 t
--- di = – R
---- d
I i L 0
Circuit Analysis I with MATLAB Computing and Simulink / SimPowerSystems Modeling 91
Copyright © Orchard Publications
Natural Response of a Series RC Circuit
– 1 RC t
e
v C t V 0 = – 1 RC t + 1
Percent v C t V 0
36.8%
13.5%
5%
Time constants
Figure 9.11. Circuit for determining the natural response of a series RC circuit
From Figure 9.11 we observe that at t = 0 , v C V 0 = 1 , and i 0 as t
The initial rate (slope) of decay is found from the derivative of v C t V 0 evaluated at t = 0 ,
that is,
d- -----
vC
dt V 0
---- - 1 - e – 1 RC t
= – ------- 1-
= – -------
RC t=0
RC
t=0
and at t = , v C t V 0 = 0 . Then,
1
0 = – -------- + 1
RC
or
= RC
(9.13)
Time Cons tan t for R C Circuit
Circuit Analysis I with MATLAB Computing and Simulink / SimPowerSystems Modeling 911
Copyright © Orchard Publications
Chapter 10
Forced and Total Response in RL and RC Circuits
T
his chapter discusses the forced response of electric circuits.The term “forced” here implies
that the circuit is excited by a voltage or current source, and its response to that excitation
is analyzed. Then, the forced response is added to the natural response to form the total
response.
0
u0 t =
t0
1
(10.1)
t0
In the waveform of Figure 10.1, the unit step function u 0 t changes abruptly from 0 to 1 at
t = 0 . But if it changes at t = t 0 instead, its waveform and definition are as shown in Figure
10.2.
0 t t0
u0 t – t0 =
1
u0 t – t0
t 1 t t0
0 t0
Figure 10.2. Waveform and definition of u 0 t – t 0
* In some books, the unit step function is denoted as u t , that is, without the subscript 0. In this text we will reserve this des-
ignation for any input.
Circuit Analysis I with MATLAB Computing and Simulink / SimPowerSystems Modeling 101
Copyright © Orchard Publications
Delta Function
The proofs of (10.22) through (10.24) and additional properties of the delta function are beyond
the scope of this book. They are provided in Signals and Systems with MATLAB Computing and
Simulink Modeling, ISBN 9781934404119.
MATLAB has two builtin functions for the unit step and the delta functions. These are desig-
nated by the names of the mathematicians who used them in their work. The unit step u 0 t is
called Heavyside(t) and the delta function t is called Dirac(t). Shown below are examples of
how they are being used.
syms k a t
u=k*sym('Heaviside(ta)') % Create unit step function at t=a
u =
k*Heaviside(t-a)
d=diff(u) % Compute the derivative of the unit step function
d =
k*Dirac(t-a)
int(d) % Integrate the delta function
ans =
Heaviside(t-a)*k
Example 10.5
For the circuit shown in Figure 10.14, the inputs are applied at different times as indicated.
50 K
Rf
+ +
3 K 6 K
5 K v out
+ +
v in 1
i in
v in 2
v in 1 = 0.8u 0 t – 3 V
v in 2 = 0.5u 0 t – 1 V
i in = 0.14 u 0 t + 1 + u 0 t – 2 mA
Figure 10.14. Circuit for Example 10.5
Circuit Analysis I with MATLAB Computing and Simulink / SimPowerSystems Modeling 109
Copyright © Orchard Publications
Answers / Solutions to EndofChapter Exercises
R 1 + R 2
R1 R2
------------------
-
dv C
dt 1 – ----- 10- C
--------- + ------------------------------ v C = 0
R1
and thus
– 0.3125t
v C t = Ae
and with the given initial condition v C 0 = V 0 = A = 5 V we obtain
– 0.3125t
v C t = 5e
Then, using the relation
dv C
i C = C ---------
dt
we find that for t 0
– 0.3125t – 0.3125t
i C t = 1 – 0.3125 5e = – 1.5625e
and the minus () sign indicates that the i C t direction is opposite to that shown.
9.
Circuit Analysis I with MATLAB Computing and Simulink / SimPowerSystems Modeling 1051
Copyright © Orchard Publications
Appendix D
A Review of Complex Numbers
T
his appendix is a review of the algebra of complex numbers. The basic operations are
defined and illustrated by several examples. Applications using Euler’s identities are pre-
sented, and the exponential and polar forms are discussed and illustrated with examples.
y
jA
j j A = j2 A = –A A
x
j –j A = –j A = A
2
j –A = j 3 A = –j A
Figure D.1. The j operator
Also, another multiplication of the new vector jA by j will produce another 90 counterclock-
wise direction. In this case, the vector A has rotated 180 and its new value now is – A . When
this vector is rotated by another 90 for a total of 270 , its value becomes j – A = – j A . A
fourth 90 rotation returns the vector to its original position, and thus its value is again A .
2 3 4
Therefore, we conclude that j = – 1 , j = – j , and j = 1 .
Circuit Analysis I with MATLAB Computing and Simulink / SimPower Systems Modeling D1
Copyright © Orchard Publications
A Review of Complex Numbers
Example D.4
It is given that A = 3 + j 5 . Find A A
Solution:
A A = 3 + j 5 3 – j 5 = 3 + 5 = 9 + 25 = 34
2 2
Example D.5
It is given that A = 3 + j 4 , and B = 4 + j 3 . Find A B
Solution:
Using the procedure of (D.2), we obtain
A 3 + j 4 3 + j 4 4 – j 3 12 – j 9 + j 16 + 12 24 + j 7 24 7
---- = -------------- = -------------------------------------- = -------------------------------------------- = ----------------- = ------ + j ------ = 0.96 + j 0.28
B 4 + j3 4 + j34 – j3 4 +3
2 2 25 25 25
j
e = cos + j sin (D.3)
D4 Circuit Analysis I with MATLAB Computing and Simulink / SimPower Systems Modeling
Copyright © Orchard Publications
Appendix E
Matrices and Determinants
T
his appendix is an introduction to matrices and matrix operations. Determinants, Cramer’s
rule, and Gauss’s elimination method are reviewed. Some definitions and examples are not
applicable to the material presented in this text, but are included for subject continuity,
and academic interest. They are discussed in detail in matrix theory textbooks. These are
denoted with a dagger (†) and may be skipped.
1 3 1
2 3 7 or –2 1 –5
1 –1 5
4 –7 6
a 11 a 12 a 13 a 1 n
a 21 a 22 a 23 a 2 n
A = a 31 a 32 a 33 a 3 n (E.1)
a m 1 a m 2 a m 3 a mn
The numbers a ij are the elements of the matrix where the index i indicates the row, and j indi-
cates the column in which each element is positioned. For instance, a 43 indicates the element
positioned in the fourth row and third column.
A matrix of m rows and n columns is said to be of m n order matrix.
If m = n , the matrix is said to be a square matrix of order m (or n ). Thus, if a matrix has five
rows and five columns, it is said to be a square matrix of order 5.
Circuit Analysis I with MATLAB Computing and Simulink / SimPowerSystems Modeling E1
Copyright © Orchard Publications
Matrix Operations
A
3 5 3 Note: The elements of matrices
Constant 1
-1 3 9 A and B are specified in
MATLAB's Command prompt
B
Sum 1 Display 1 (A+B)
Constant 2
-1 -1 3
1 -1 -1
If k is any scalar (a positive or negative number), and not k which is a 1 1 matrix, then mul-
tiplication of a matrix A by the scalar k is the multiplication of every element of A by k .
Example E.2
Multiply the matrix
A = 1 –2
2 3
by
a. k 1 = 5
b. k 2 = – 3 + j2
Circuit Analysis I with MATLAB Computing and Simulink / SimPowerSystems Modeling E3
Copyright © Orchard Publications
Index
Symbols and Numerics complex excitation function 6-3, 6-23 delta function
complex number(s) defined 10-7
% (percent) symbol in MATLAB A-2 addition B-2 sampling property 10-8
3-dB down 4-4 conjugate A-3, B-3 sifting property 10-9
defined A-3, B-2 demos in MATLAB A-2
A division B-4 dependent source(s)
exponential form B-5 current 1-11, 3-38
abs(z) MATLAB function A-23 multiplication B-3 voltage 1-11, 3-38
admittance 6-17 polar form B-5 determinant C-9
ampere 1-2, 1-19 rectangular form B-5 device(s)
ampere capacity of wires 2-30 subtraction B-2 active 1-11, 1-20
amplifier 4-1, 4-32 complex power 8-16 passive 1-11, 1-20
buffer 4-20 conductance 2-2 dielectric 5-16, 5-29
unity gain 4-13, 4-20 conj(A) MATLAB function C-8 differential input amplifier 4-5
analog-to-digital converter 8-28, 8-33 conjugate of a complex number B-3 digital filter 7-21
angle(z) MATLAB function A-23 conv(a,b) MATLAB function A-6 diode(s) 1-12
attenuation 4-13, 4-33 conversion factors 1-16 Dirac function 10-9
attenuator 4-1 conductor sizes for interior wiring 2-33 direct current 1-4
average value 8-2, 8-31 coulomb 1-1, 1-19 discontinuous function 10-1
axis MATLAB command A-16 Cramer’s rule 3-2, C-16, C-17 disp(A) MATLAB function 7-19, A-32
critical frequency 4-13, 4-33 display formats in MATLAB A-31
B current 1-1 division in MATLAB A-18
current division expressions 2-25 dot multiplication operator in MATLAB A-20
bandwidth 4-4 current flow driving functions 6-1
box MATLAB command A-12 conventional 1-2 duality 6-18, 6-25
branch 2-5 electron 1-2
current gain 4-2 E
C current limiting devices 2-2
current ratings for editor window in MATLAB A-1
capacitance 5-1, 5-17 electronic equipment 2-30 editor/debugger in MATLAB A-1
capacitance combinations 5-24 current source effective (RMS) value of sinusoids 8-5
capacitor(s) 1-11, 1-20, 5-16 combinations 2-14 effective values 8-4
in parallel 5-25 ideal 1-11 efficiency 3-44
in series 5-24 independent 1-11 eight-to-three line encoder 8-29
chemical processes 1-17, 1-20 practical 3-21 electric field 5-16, 5-17, 5-29
circuit(s) cutoff frequency electric filters - see filters
defined 1-13, 1-20 band-elimination filter 4-15 energy dissipated in a resistor 2-4
analysis with loop equations 3-8 band-pass filter 4-15 energy stored in a capacitor 5-21
analysis with mesh equations 3-8 high-pass filter 4-14 energy stored in an inductor 5-12
analysis with nodal equations 3-1 low-pass filter 4-13 eps in MATLAB A-22
with non-linear devices 3-42 lower 4-4 Euler’s identities B-4
clc MATLAB command A-2 upper 4-4 excitations 6-1
clear MATLAB command A-2 exit MATLAB command A-2
combined mesh 3-17 D exponential form of complex numbers B-5
combined node 3-6 exponentiation in MATLAB A-18
command screen in MATLAB A-1 data points in MATLAB A-14 eye(n) in MATLAB C-7
command window in MATLAB A-1 DC (Direct Current) 1-4 eye(size(A)) in MATLAB C-7
commas in MATLAB A-8 decibel 4-2, A-13
comment line in MATLAB A-2 deconv(c,d) MATLAB function A-6, A-7 F
comparators 8-29 default color in MATLAB A-15
complementary function 9-1 default in MATLAB A-12 Farad 5-17, 5-29
complete response 10-16 default line in MATLAB A-15 Faraday’s law of
complex conjugate A-4, B-3 default marker in MATLAB A-15 electromagnetic induction 5-2
IN-1
feedback 4-4 imaginary M
negative 4-5 axis B-2
positive 4-5 number B-2 magnetic field 5-1, 5-16, 5-29
figure window in MATLAB A-13 impedance 6-14 magnetic flux 5-2, 5-29
filter inductance 5-2 matrix, matrices
active 4-13 inductive adjoint C-20
all-pass 7-22 reactance 6-15, 6-23 cofactor of C-12
analog 7-23 susceptance 6-18, 6-23 conformable for addition C-2
band-elimination 4-15, 4-33, 7-22 inductor(s) conformable for multiplication C-4
band-pass 4-14, 4-33, 7-22 defined 1-11, 1-20, 5-2 congugate of C-8
band-rejection 4-15, 4-33, 7-22 in parallel 5-15 defined C-1
band-stop 4-15, 4-33, 7-22 in series 5-14 diagonal of C-1, C-6
high-pass 4-14, 4-33, 7-22 initial condition 5-3 Hermitian C-9
low-pass 4-13, 4-33, 7-22 initial rate of decay 9-3, 9-11 identity C-6
passive 4-13, 7-23 instantaneous values 2-1 inverse of C-21
phase shift 7-22 int(f,a,b) MATLAB function 1-7 left division in MATLAB C-24
RC high-pass 7-25 International System of Units 1-14 lower triangular C-6
RC low-pass 7-23 minor of C-12
stop-band 4-15, 4-33, 7-22 J multiplication using MATLAB A-20
flash converter 8-28 non-singular C-21
flux linkage 5-2, 5-29 j operator B-1 singular C-21
fmax(f,x1,x2) MATLAB function A-29 scalar C-6
fmin(f,x1,x2) MATLAB function A-29 K skew-Hermitian C-9
forced response 6-4, 10-16, 10-22 skew-symmetric C-9
format command in MATLAB A-31 KCL 2-6 square C-1
format in MATLAB A-31 Kirchhoff’s Current Law 2-6 symmetric C-8
fplot MATLAB command A-27 Kirchhoff’s Voltage Law 2-7 theory 3-2
fplot(fcn,lims) KVL 2-7 trace of C-2
MATLAB command A-27 transpose C-7
fprintf(format,array) L upper triangular C-5
MATLAB command 7-19, A-32 zero C-2
frequency response A-12 left-hand rule 5-1 maximum power
frequency-domain to time-domain lims = MATLAB function A-27 transfer theorem 3-35, 7-35
transformation 6-6, 6-23 linear mechanical forms of energy 1-17, 1-20
full-wave rectification circuit 3-38 mesh
function file in MATLAB A-26 devices 1-11 combined 3-18
fzero(f,x) MATLAB function A-26 factor A-9 defined 2-6
inductor 5-2 equations 2-10, 3-1, 5-25, 7-5
G passive element 3-37 generalized 3-17
linearity 3-37 mesh(x,y,z) MATLAB function A-18
Gaussian elimination method C-19 lines of magnetic flux 5-1, 5-29 meshgrid(x,y) MATLAB function A-18
grid MATLAB command A-12 linspace(values) MATLAB command A-14 metric system 1-14, 1-20
ground ln (natural log) A-13 m-file in MATLAB A-1, A-26
defined 2-1, 2-14 load mho 2-2
virtual 4-17 capacitive 8-15, 8-32 Military Standards 2-27
gtext(‘string’) MATLAB function A-13 inductive 8-15, 8-32 MINVERSE in Excel C-26
lighting 2-33 MMULT in Excel C-26, C-27
H resistive 8-11 multiplication of complex numbers B-3
log (common log) A-13 multiplication in MATLAB A-18
half-power points 4-4 log(x) MATLAB function A-13 multirange ammeter/milliammeter 8-24
half-wave rectification 8-3 log10(x) MATLAB function A-13
Heavyside function 10-9 log2(x) MATLAB function A-13 N
Henry 5-3, 5-29 loglog(x,y) MATLAB function A-13
loop NaN in MATLAB A-26
I defined 2-5 National Electric Code (NEC) 2-30
equations 3-1, 3-13 natural response
imag(z) MATLAB function A-23 circuits with single 2-10 9-1, 9-9, 10-16, 10-22
IN-2
NEC 2-30 complex 8-16, 8-17 series connection 2-8, 2-16, 2-17
negative charge 5-16 gain 4-2 short circuit 2-2
network in a capacitor 5-22 SI Derived Units 1-17
active 1-13, 1-20 in an inductor 5-11 siemens 2-2
passive 1-13, 1-20 in a resistor 2-3, 2-4, 2-28 signal 4-1, 4-32
topology 3-1 instantaneous 8-4 single ended output amplifier 4-5
newton 1-1, 1-19 power factor 8-10 single node-pair parallel circuit 2-14
nodal analysis 2-14, 3-1, 7-1 defined 8-10 slope converter 8-28
node lagging 8-15 solar energy 1-17, 1-20
combined 3-6 leading 8-15 sources of energy 1-17, 1-20
defined 2-5 power factor correction 8-18 standard prefixes 1-15
generalized 3-6 power triangle 8-16 Standards for Electrical and
equations 2-14, 3-2, 5-25, 7-1 prefixes 1-15, 1-16 Electronic Devices 2-26
non-reference 3-1 principle of superposition 3-41 steady-state conditions 5-12
reference 3-1 string in MATLAB A-18
non-linear devices 1-11 Q subplot(m,n,p) MATLAB command A-18
Norton’s theorem 3-33, 7-10 substitution method of solving a system
nuclear energy 1-17, 1-20 quad MATLAB function 1-8 of simultaneous equations 3-2
quad(‘f’,a,b,tol) MATLAB function 1-8 supermesh 3-17
O quad8 MATLAB function 1-8 supernode 3-6
quadratic factors A-9 superposition principle 3-38, 7-6
Ohm 2-1 quit MATLAB command A-2 susceptance
Ohm’s law 2-1 capacitive 6-18, 6-25
Ohm’s law for AC circuits 6-14 R inductive 6-18, 6-25
Ohmmeter 8-26
parallel type 8-26 rational polynomials A-8 T
series type 8-26 reactance
shunt type 8-26 capacitive 6-15, 6-24 temperature scales equivalents 1-16
op amp 4-5 inductive 6-15, 6-24 text(x,y,’string’) MATLAB function A-14
inverting mode 4-6 real text(x,y,z,’string’) MATLAB function A-16
non-inverting mode 4-9 axis B-2 Thevenin’s theorem 3-23, 7-10
open circuit 2-2 number B-2 time constant 9-3, 9-11, 10-18, 10-24
operational amplifier - see op amp real(z) MATLAB function A-23 time-domain to frequency-domain
regulation 3-45 transformation 6-5, 6-23
P resistance 2-1 time-window converter 8-28
input 4-28 title(‘string’) MATLAB command A-12
parallel connection 2-8, 2-17, 2-18 negative 2-3 total response 10-1, 10-14
particular solution 6-4 output 4-28 tracking converter 8-28
passive sign convention 1-9, 1-19 resistive network 8-29 transient response 9-1
periodic functions of time 8-1 resistors 1-11, 2-2 transistors 1-11
phasor analysis in amplifier circuits 7-14 color code 2-27 trivial solution 9-2
phasor diagram 7-17 failure rate 2-27 two-terminal device 1-4, 1-19
plot(x,y) MATLAB command A-10, A-12 shunt (parallel) 8-22
plot3(x,y,z) MATLAB command A-15 tolerance 2-27 U
polar plot in MATLAB A-24 response 6-1, 6-23
polar(theta,r) MATLAB function A-23 right-hand rule 5-1 unit impulse function 10-7
poly(r) MATLAB function A-4 RMS value of sinusoids 8-5 unit ramp function 10-6
polyder(p) MATLAB function A-6 RMS values of sinusoids with unit step function 10-1
polynomial construction from different frequencies 8-7
known roots in MATLAB A-4 roots(p) MATLAB function A-3, A-8 V
polyval(p,x) MATLAB function A-6 round(n) MATLAB function A-24
potential difference 1-4 virtual ground 4-17
power S volt 1-5, 1-19
absorbed 1-8, 1-19 voltage
average 8-9, 8-14 script file in MATLAB A-26 defined 1-4
in capacitive loads 8-11 semicolons in MATLAB A-8 dividers 2-2
in inductive loads 8-11 semilogx(x,y) MATLAB command A-12 division expressions 2-22
in a resistive loads 8-11 semilogy(x,y) MATLAB command A-12 drop 1-5
IN-3
follower 4-20
gain 4-2
instantaneous 1-6
rise 1-5
voltage source
combinations 2-14
ideal 1-11
independent 1-11
practical 3-20
voltmeter 8-24
watt 1-8
watt-hour meter 8-28
wattage 2-4, 2-29
wattmeter 8-28
weber 5-1, 5-29
Wheatstone bridge 8-27, 8-32
IN-4