Solving DC and AC Circuits By Example Using Matlab
Over 50 examples solving DC and AC circuits using MATLAB. Covers Ohm’s law, Kirchhoff’s law, circuit elements (resistors, capacitors, inductors), sinusoidal signals, phasors, RMS values, voltage dividers, current division, source transformation, op amps, mesh analysis, nodal analysis, superposition, Thevenin’s theorem, Norton’s theorem, maximum power transfer, average power, transformers, and DC motors. No differential equations required.
Preface
This book uses Matlab as an aid to learning and understanding basic circuit analysis. Most introductory texts on circuit theory introduce Ohm’s law and Kirchhoff’s law very quickly and are then off to the races. In this book we spend a fair amount of time in Chapter 1 putting these laws and other basic concepts in a historical perspective. This will provide you with the knowledge of where the basic ideas of electrical science come from.
Chapter 2 discusses circuit elements including resistors, capacitors, and inductors. Ohm’s law is covered in Chapter 2 and Kirchhoff’s law’s are described in Chapter 3. Sinusoidal signals and phasors are introduced in Chapter 4 where the concept of RMS values are described. This allows both DC and steady-state AC circuits to be solved in subsequent chapters. Examples involving voltage dividers, current division, and source transformation are given in Chapter 5. Circuits that include an ideal operational amplifier (op amp) are described in Chapter 6. Mesh and nodal analysis are covered in Chapter 7, while Chapter 8 covers superposition, Thevenin’s theorem, Norton’s theorem, and maximum power transfer. Average power and transformers are covered in Chapter 9 and the theory behind the operation of DC motors is given in Chapter 10. Basic material on vectors and matrices are included in the Appendices. By restricting the analysis of AC circuits to sinusoidal signals we do not require any knowledge of differential equations and we leave transient analysis to a later course.
All circuit problems in this book contain only independent voltage and current sources. All worked examples in the book show the calculations using Matlab. In most cases Matlab is used as a calculator and a good scientific calculator could be used to solve most of the examples. The use of Matlab clarifies all of the steps. However, we also use Matlab to create a variety of plots that will help you understand the material. PSpice is another computer-based tool that the electrical engineering student should learn. However, PSpice is a simulator that simulates the behavior of an electrical circuit. In PSpice you basically draw a schematic diagram of the circuit and push a button. It will show you the voltages and currents in the circuit and plot useful graphs. It is particularly useful in more complex circuits involving transistors and other non-linear elements. We don’t cover such circuits in this book and therefore the use of Matlab is preferred where you need to understand how to solve the problem before using Matlab to calculate numerical results. We show how to use Matlab to plot PSpice-like graphs.
Many colleagues and students have influenced the development of this book. Their stimulating discussions, probing questions, and critical comments are greatly appreciated. Special thanks go to Michael Polis and Wayne Morrell who have provided important contributions to many of the examples and topics described in this book.
Richard E. Haskell
Darrin M. Hanna
Table of Contents
1. History and Basic Concepts
1.1 Early History – Charge and Voltage
1.2 Current – Oersted, Ampere, Faraday, and Henry
A Note on Units
The First Electric Motor
Electromagnetic Induction
1.3 Electric Circuits – Ohm and Kirchhoff
Kirchhoff’s Current and Voltage Laws
1.4 Electric and Magnetic Fields – Maxwell, Hertz, and Einstein
The Discovery of Electromagnetic Waves
Electromagnetism and Relativity
1.5 Electrical Engineering in the Twentieth Century
Further Reading
Problems
2. Circuit Elements
2.1 Resistors and Ohm’s Law
Example 1 – Ohm’s law: voltage sources
Example 2 – Ohm’s law: current sources
2.2 Series and Parallel Resistors
Example 3 – Equivalent Resistances
2.3 Capacitors
Example 4 – Sinusoidal Voltage on a Capacitor
2.4 Capacitors in Series and Parallel
Example 5 – Capacitors in Series and Parallel
2.5 Inductors
Example 6 – Sinusoidal Voltage on an Inductor
2.6 Inductors in Series and Parallel
Example 7 – Inductors in Series and Parallel
Problems
3. Kirchhoff’s Laws
3.1 Circuit Topology
3.2 Kirchhoff’s Current Law
Example 8 – Kirchhoff’s Current Law
3.3 Kirchhoff’s Voltage Law
Example 9 – Kirchhoff’s Voltage Law
3.4 D/A Converter
Example 10 – D/A Converter
Problems
4. Sinusoidal Signals and Phasors
4.1 Sinusoidal Signals
Example 11 – Sinusoidal Signals
4.2 Root-Mean-Square (RMS) Values
Example 12 – RMS Voltage Example 13 – RMS Current
4.3 Complex Numbers and Phasors
Example 14 – Complex Numbers
Example 15 – Complex Number Arithmetic
4.4 Impedance and Admittance
Capacitor
Inductor
Example 16 – R-L Series Circuit
Example 17 – R-C Parallel Circuit
Problems
5. Basic Circuit Analysis
5.1 Voltage Divider
Example 18 – Voltage Divider
Example 19 – R-L Series Circuit
Example 20 – R-C Series Circuit
Example 21 – RLC Circuit
5.2 Wheatstone Bridge
Example 22 – Wheatstone Bridge
5.3 Current Division
Example 23 – Current Division
Example 24 – R-C Parallel Circuit
Example 25 – R-L Parallel Circuit
5.4 Source Transformation
Example 26 – DC Source Transformation
Example 27 – Source Transformation
Example 28 – AC Source Transformation
Problems
6. Operational Amplifiers (Op Amps)
6.1 Ideal Op Amp
6.2 Non-inverting Amplifier
Example 29 – Non-inverting Amplifier
6.3 Inverting Amplifier
Example 30 – Inverting Amplifier
6.4 Differential Amplifier
Example 31 – Differential Amplifier
Example 32 – Instrumentation Amplifier
6.5 Active Filters
Example 33 – Low-pass Filter
Example 34 – High-pass Filter
6.6 Current-to-Voltage Converter
Example 35 – Photodiode Circuit
Problems
7. Mesh and Nodal Analysis
7.1 Mesh Analysis
Example 36 – Mesh Analysis
7.2 Mesh Analysis by Inspection
Example 37 – Mesh Analysis by Inspection
Example 38 – AC Mesh Analysis by Inspection
7.3 Nodal Analysis
Example 39 – Nodal Analysis
7.4 Nodal Analysis by Inspection
Example 40 – Nodal Analysis by Inspection
Example 41 – AC Nodal Analysis by Inspection
7.5 Mesh Analysis with Voltage and Current Sources
Example 42 – Mesh Analysis with Voltage and Current Sources
Example 43 – AC Mesh with Voltage and Current Sources
7.6 Nodal Analysis with Current and Voltage Sources
Example 44 – Nodal Analysis with Voltage and Current Sources
Example 45 – AC Nodal with Voltage and Current Sources
Problems
8. Circuit Theorems
8.1 Superposition
Example 46 – Superposition
Example 47 – AC Superposition
8.2 Thevenin’s and Norton’s Theorems
Example 48 – Thevenin’s Theorem
Example 49 – Norton’s Theorem
Example 50 – AC Thevenin’s Theorem
8.3 Maximum Power Transfer
Example 51 – Maximum Power Transfer
Problems
9. Power and Transformers
9.1 Instantaneous and Average Power
Example 52 – Instantaneous and Average Power
Example 53 – Voltages and Average Power in Resonant Circuits
9.2 Ideal Transformer
Example 54 – Transformer Network
9.3 Complex Power Power Factor Correction
Example 55 – Power Factor Correction
Problems
10. DC Motors
10.1 Operation of a DC Motor
Back Emf
10.2 Motor Equations
Power and Torque
Example 56 – Motor Speed
Example 57 – Armature Current and Power
Problems
Appendix A –Addition and Subtraction of Vectors
A.1 Scalars and Vectors
A.2 Addition of Vectors
A.3 Subtraction of Vectors
A.4 Unit Vectors and Coordinate Systems
A.5 Addition of Vectors by Components
A.6 3-Diminsional Vectors
A.7 Direction Cosines
Examples
Problems
Appendix B – The Scalar or Dot Product
B.1 Definition of the Dot Product
B.2 Dot Product and Vector Components
B.3 Dot Product Properties
Examples
Problems
Appendix C – The Vector or Cross Product
C.1 Definition of the Cross Product
C.2 Distributive Law for the Cross Product
C.3 Cross Product and Vector Components
C.4 Associative Law
C.5 Cross Product Geometric Properties
C.6 Scalar Triple Product
Examples
Problems
Appendix D – Matrices
D.1 Solving Linear Equations
Matrices
Matrix Inverse
Examples
Problems