Chapter 1

Circuit Theory

Ohm's law, Kirchhoff's laws, and network theorems.

Circuit Theory

Circuit theory forms the foundation of electrical engineering, providing the mathematical framework for analyzing and designing electrical systems. Understanding circuit behavior is essential for everything from simple electronic devices to complex power grids.

Fundamental Laws

Ohm's Law

The relationship between voltage, current, and resistance:

V=IRV = IR

Where:

  • VV is voltage (volts)
  • II is current (amperes)
  • RR is resistance (ohms)

Power and Energy

Electrical Power

P=VI=I2R=V2RP = VI = I^2R = \frac{V^2}{R}

Energy

W=Pdt=VIt=I2Rt=V2tRW = \int P \, dt = VIt = I^2Rt = \frac{V^2t}{R}

Resistance and Resistivity

R=ρLAR = \rho \frac{L}{A}

Where:

  • ρ\rho is resistivity (Ω·m)
  • LL is length
  • AA is cross-sectional area

Kirchhoff's Laws

Kirchhoff's Current Law (KCL)

At any node (junction):

Iin=Iout\sum I_{in} = \sum I_{out}

Or equivalently:

I=0\sum I = 0

This is a consequence of conservation of charge.

Kirchhoff's Voltage Law (KVL)

Around any closed loop:

V=0\sum V = 0

This is a consequence of conservation of energy and the conservative nature of electric fields in circuits.

Network Analysis Methods

Nodal Analysis

Steps:

  1. Select reference node (ground)
  2. Assign node voltages to remaining nodes
  3. Apply KCL at each non-reference node
  4. Solve resulting equations

For a circuit with nn nodes:

  • (n1)(n-1) unknown node voltages
  • (n1)(n-1) KCL equations

Mesh Analysis

Steps:

  1. Identify meshes (loops with no other loops within)
  2. Assign mesh currents
  3. Apply KVL around each mesh
  4. Solve resulting equations

For a circuit with mm meshes:

  • mm unknown mesh currents
  • mm KVL equations

Series and Parallel Combinations

Series Resistors

Req=R1+R2++RnR_{eq} = R_1 + R_2 + \ldots + R_n

Parallel Resistors

1Req=1R1+1R2++1Rn\frac{1}{R_{eq}} = \frac{1}{R_1} + \frac{1}{R_2} + \ldots + \frac{1}{R_n}

For two parallel resistors:

Req=R1R2R1+R2R_{eq} = \frac{R_1R_2}{R_1 + R_2}

Voltage Divider Rule

Vx=VtotalRxRtotalV_x = V_{total} \cdot \frac{R_x}{R_{total}}

Current Divider Rule

Ix=ItotalRparallelRx+RparallelI_x = I_{total} \cdot \frac{R_{parallel}}{R_x + R_{parallel}}

Network Theorems

Thevenin's Theorem

Any linear circuit can be replaced by:

  • A voltage source VthV_{th} (open-circuit voltage)
  • A series resistor RthR_{th} (equivalent resistance with sources deactivated)
Vth=Voc,Rth=VocIscV_{th} = V_{oc}, \quad R_{th} = \frac{V_{oc}}{I_{sc}}

Norton's Theorem

Any linear circuit can be replaced by:

  • A current source INI_N (short-circuit current)
  • A parallel resistor RN=RthR_N = R_{th}
IN=Isc,RN=RthI_N = I_{sc}, \quad R_N = R_{th}

Superposition Theorem

In a linear circuit with multiple independent sources:

Itotal=I1+I2++InI_{total} = I_1 + I_2 + \ldots + I_n

Where IiI_i is the contribution due to the ii-th source alone (with other sources deactivated).

Maximum Power Transfer Theorem

Maximum power is transferred to a load when:

RL=RthR_L = R_{th}

The maximum power transferred is:

Pmax=Vth24RthP_{max} = \frac{V_{th}^2}{4R_{th}}

AC Circuit Analysis

Complex Impedance

Resistance (R)

ZR=RZ_R = R

Inductance (L)

ZL=jωL=j2πfLZ_L = j\omega L = j2\pi fL

Capacitance (C)

ZC=1jωC=1j2πfCZ_C = \frac{1}{j\omega C} = \frac{1}{j2\pi fC}

Series and Parallel AC Combinations

Series Impedance

Zeq=Z1+Z2++ZnZ_{eq} = Z_1 + Z_2 + \ldots + Z_n

Parallel Admittance

Yeq=Y1+Y2++YnY_{eq} = Y_1 + Y_2 + \ldots + Y_n

Where Y=1ZY = \frac{1}{Z} is admittance.

AC Power

Instantaneous Power

p(t)=v(t)i(t)p(t) = v(t)i(t)

Average Power (Real Power)

P=1T0Tp(t)dt=VrmsIrmscosϕP = \frac{1}{T}\int_0^T p(t) \, dt = V_{rms}I_{rms}\cos\phi

Reactive Power

Q=VrmsIrmssinϕQ = V_{rms}I_{rms}\sin\phi

Complex Power

S=P+jQ=12VIS = P + jQ = \frac{1}{2}VI^*

Where ϕ\phi is the phase angle between voltage and current.

Power Factor

PF=cosϕ=PS=PP2+Q2PF = \cos\phi = \frac{P}{S} = \frac{P}{\sqrt{P^2 + Q^2}}

Transient Analysis

RC Circuits

Charging

vC(t)=Vs(1et/RC)v_C(t) = V_s(1 - e^{-t/RC}) i(t)=VsRet/RCi(t) = \frac{V_s}{R}e^{-t/RC}

Discharging

vC(t)=V0et/RCv_C(t) = V_0e^{-t/RC} i(t)=V0Ret/RCi(t) = -\frac{V_0}{R}e^{-t/RC}

RL Circuits

Current Buildup

iL(t)=VsR(1eRt/L)i_L(t) = \frac{V_s}{R}(1 - e^{-Rt/L}) vL(t)=VseRt/Lv_L(t) = V_s e^{-Rt/L}

Current Decay

iL(t)=I0eRt/Li_L(t) = I_0 e^{-Rt/L} vL(t)=I0ReRt/Lv_L(t) = -I_0 R e^{-Rt/L}

RLC Circuits

The general solution for series RLC circuit with DC source:

d2idt2+RLdidt+1LCi=0\frac{d^2i}{dt^2} + \frac{R}{L}\frac{di}{dt} + \frac{1}{LC}i = 0

The characteristic equation:

s2+2αs+ω02=0s^2 + 2\alpha s + \omega_0^2 = 0

Where α=R2L\alpha = \frac{R}{2L} and ω0=1LC\omega_0 = \frac{1}{\sqrt{LC}}.

Cases:

  1. Overdamped (α>ω0\alpha > \omega_0): i(t)=A1es1t+A2es2ti(t) = A_1e^{s_1t} + A_2e^{s_2t}
  2. Critically damped (α=ω0\alpha = \omega_0): i(t)=(A1+A2t)eαti(t) = (A_1 + A_2t)e^{-\alpha t}
  3. Underdamped (α<ω0\alpha < \omega_0): i(t)=eαt(A1cosωdt+A2sinωdt)i(t) = e^{-\alpha t}(A_1\cos\omega_d t + A_2\sin\omega_d t)

Where ωd=ω02α2\omega_d = \sqrt{\omega_0^2 - \alpha^2}.

Resonance

Series RLC Resonance

ω0=1LC,f0=12πLC\omega_0 = \frac{1}{\sqrt{LC}}, \quad f_0 = \frac{1}{2\pi\sqrt{LC}}

At resonance:

  • Zmin=RZ_{min} = R
  • ImaxI_{max} occurs
  • VL=VCV_L = V_C
  • Circuit is purely resistive

Parallel RLC Resonance

ω0=1LC,f0=12πLC\omega_0 = \frac{1}{\sqrt{LC}}, \quad f_0 = \frac{1}{2\pi\sqrt{LC}}

At resonance:

  • Zmax=LRCZ_{max} = \frac{L}{RC}
  • IminI_{min} occurs
  • Circuit is purely resistive

Bode Plots and Frequency Response

Transfer Function

H(jω)=Vout(jω)Vin(jω)H(j\omega) = \frac{V_{out}(j\omega)}{V_{in}(j\omega)}

Magnitude and Phase

H(jω)=Re[H(jω)]2+Im[H(jω)]2|H(j\omega)| = \sqrt{\text{Re}[H(j\omega)]^2 + \text{Im}[H(j\omega)]^2} H(jω)=tan1(Im[H(jω)]Re[H(jω)])\angle H(j\omega) = \tan^{-1}\left(\frac{\text{Im}[H(j\omega)]}{\text{Re}[H(j\omega)]}\right)

Gain in Decibels

Gain (dB)=20log10H(jω)\text{Gain (dB)} = 20\log_{10}|H(j\omega)|

Real-World Application: Power Distribution Network

Power distribution networks must balance efficiency, reliability, and safety.

Power Transmission Analysis

# Power transmission line analysis
transmission_params = {
    'voltage_level': 230e3,    # 230 kV transmission
    'current_rating': 1000,     # Amperes
    'line_resistance': 0.05,    # Ohms per km
    'line_length': 100,         # km
    'power_factor': 0.95,       # Leading or lagging
    'frequency': 60             # Hz
}

# Calculate transmission parameters
line_resistance_total = transmission_params['line_resistance'] * transmission_params['line_length']
power_transmitted = transmission_params['voltage_level'] * transmission_params['current_rating'] * transmission_params['power_factor']
power_loss = transmission_params['current_rating']**2 * line_resistance_total
efficiency = (power_transmitted - power_loss) / power_transmitted

# Calculate voltage drop
load_current = transmission_params['current_rating']  # At rated current
power_factor_angle = math.acos(transmission_params['power_factor'])
# For simplified calculation: V_drop ≈ I(Rcosφ + Xsinφ)
# Assuming X ≈ 0.1*R for typical transmission line
reactance = 0.1 * line_resistance_total
voltage_drop = transmission_params['current_rating'] * (line_resistance_total * math.cos(power_factor_angle) + reactance * math.sin(power_factor_angle))

# Calculate power factor correction if needed
if transmission_params['power_factor'] < 0.98:
    required_reactive_power = power_transmitted * math.tan(power_factor_angle)
    # Capacitor needed to improve power factor to unity
    capacitance_required = required_reactive_power / (2 * math.pi * transmission_params['frequency'] * transmission_params['voltage_level']**2)
else:
    required_reactive_power = 0
    capacitance_required = 0

# Calculate optimal transmission voltage (Economical)
# The cost of transmission line includes both conductor cost and energy loss
# Generally, higher voltage reduces current and loss, but increases insulation costs
voltage_ratio = transmission_params['voltage_level'] / 11e3  # Relative to 11kV
loss_ratio = 1 / voltage_ratio**2  # Losses decrease with square of voltage increase

print(f"Power transmission analysis:")
print(f"  Voltage level: {transmission_params['voltage_level']/1000:.0f} kV")
print(f"  Current rating: {transmission_params['current_rating']} A")
print(f"  Line resistance: {line_resistance_total:.3f} Ω")
print(f"  Power transmitted: {power_transmitted/1e6:.2f} MW")
print(f"  Power loss: {power_loss/1000:.2f} kW")
print(f"  Efficiency: {efficiency*100:.2f}%")
print(f"  Voltage drop: {voltage_drop/1000:.2f} kV")
print(f"  Voltage drop percentage: {voltage_drop/transmission_params['voltage_level']*100:.2f}%")
print(f"  Economical voltage advantage: {loss_ratio:.2f}x reduction in losses vs 11kV system")

# Reliability considerations
if efficiency > 0.98:
    reliability_rating = "High - Minimal losses"
elif efficiency > 0.95:
    reliability_rating = "Good - Acceptable losses"
else:
    reliability_rating = "Low - Significant losses, reconsider design"
    
print(f"  Reliability rating: {reliability_rating}")

# If capacitor is required
if capacitance_required > 0:
    print(f"  Required compensation: {capacitance_required*1e6:.2f} μF")
    print(f"  Reactive power required: {required_reactive_power/1e6:.2f} MVAR")
else:
    print(f"  Power factor adequate - no compensation required")

Grid Stability Considerations

Calculating stability parameters for power distribution systems.


Your Challenge: Circuit Analysis and Design

Analyze and design a circuit to meet specific performance requirements.

Goal: Apply circuit analysis techniques to design a voltage regulator circuit with specified parameters.

Circuit Requirements

import math

# Circuit specifications
circuit_specs = {
    'input_voltage': 12.0,      # Volts (available from source)
    'output_voltage': 9.0,      # Volts (required output)
    'load_current': 0.5,        # Amperes (required current to load)
    'tolerance': 0.1,           # Volts (allowed voltage variation)
    'efficiency_target': 0.85,  # 85% efficiency required
    'temperature_range': [-10, 60],  # Celsius operating range
    'safety_factor': 1.2        # For component ratings
}

# Design a voltage divider circuit
# Using two resistors in series with output tapped between them
input_voltage = circuit_specs['input_voltage']
output_voltage = circuit_specs['output_voltage']
load_current = circuit_specs['load_current']

# Calculate required resistances for unloaded voltage divider
# V_out = V_in * R2 / (R1 + R2)
# Solving for R1/R2 ratio: R2 / (R1 + R2) = V_out / V_in
voltage_ratio = output_voltage / input_voltage
# If R2 / (R1 + R2) = voltage_ratio, then R2 = voltage_ratio * (R1 + R2)
# R2 = voltage_ratio * R1 + voltage_ratio * R2
# R2 - voltage_ratio * R2 = voltage_ratio * R1
# R2(1 - voltage_ratio) = voltage_ratio * R1
# R1 = R2 * (1 - voltage_ratio) / voltage_ratio

# For loaded conditions, we need to consider the load resistance
load_resistance = output_voltage / load_current  # Ohm's law

# Using loaded voltage divider equation:
# V_out = V_in * (R2 || R_load) / (R1 + (R2 || R_load))
# Where R2 || R_load = (R2 * R_load) / (R2 + R_load)

# For a practical voltage divider with reasonable loading effect,
# Let's design with a loading effect of about 10% voltage drop
desired_output_under_load = output_voltage * 0.9  # Allow 10% drop under load

# Using voltage divider equations with load
# Let's solve for R1 and R2 considering the load
R2_parallel_load = desired_output_under_load * (circuit_specs['input_voltage'] - desired_output_under_load) / (circuit_specs['input_voltage'] - output_voltage)
R1 = (circuit_specs['input_voltage'] - desired_output_under_load) * R2_parallel_load / (output_voltage * 0.9)

# Calculate equivalent resistance of R2 in parallel with load
# R2_parallel_load = (R2 * R_load) / (R2 + R_load)
# Therefore: R2 = (R2_parallel_load * R_load) / (R_load - R2_parallel_load)
R_load = load_resistance
R2 = (R2_parallel_load * R_load) / (R_load - R2_parallel_load)

# Calculate actual loaded output voltage
R2_loaded = (R2 * R_load) / (R2 + R_load)
actual_output_voltage = circuit_specs['input_voltage'] * R2_loaded / (R1 + R2_loaded)

# Calculate power dissipation
total_current = circuit_specs['input_voltage'] / (R1 + R2_loaded)  # Total current from source
R1_power = total_current**2 * R1  # Power in R1
R2_power = (total_current - load_current)**2 * R2  # Power in R2
load_power = load_current**2 * R_load  # Power delivered to load

# Calculate efficiency
input_power = circuit_specs['input_voltage'] * total_current
output_power = actual_output_voltage * load_current
efficiency = output_power / input_current if input_power > 0 else 0

Design a voltage divider circuit that meets the specified requirements.

Hint:

  • Use voltage divider equations to calculate resistor values
  • Consider loading effects when output current is drawn
  • Balance efficiency with voltage regulation
  • Calculate power dissipation in components
# TODO: Calculate circuit design parameters
R1_value = 0           # Ohms (calculated value for resistor 1)
R2_value = 0           # Ohms (calculated value for resistor 2)  
actual_output_voltage = 0  # Volts (output voltage with load)
efficiency = 0         # Fraction (circuit efficiency)
power_dissipated_R1 = 0  # Watts (power in resistor 1)
power_dissipated_R2 = 0  # Watts (power in resistor 2)

# Calculate resistor values based on voltage divider formula
voltage_ratio = circuit_specs['output_voltage'] / circuit_specs['input_voltage']
# For unloaded voltage divider: R2 / (R1 + R2) = V_out / V_in
# This means R2 = (V_out / V_in) * (R1 + R2)
# R2 = (V_out / V_in) * R1 + (V_out / V_in) * R2
# R2 * (1 - V_out/V_in) = (V_out / V_in) * R1
# R1 = R2 * (V_in / V_out - 1)

# First calculate load resistance
R_load = circuit_specs['output_voltage'] / circuit_specs['load_current']

# For loaded voltage divider with minimal loading effects, let's assume current through voltage divider
# should be 10x the load current for good regulation
divider_current = circuit_specs['load_current'] * 0.1  # 10% of load current through divider
R2_value = circuit_specs['output_voltage'] / divider_current
R1_value = (circuit_specs['input_voltage'] - circuit_specs['output_voltage']) / divider_current

# Calculate actual loaded voltage
# With load, the current splits between R2 and load resistance
R2_parallel_load = (R2_value * R_load) / (R2_value + R_load)
actual_output_voltage = circuit_specs['input_voltage'] * R2_parallel_load / (R1_value + R2_parallel_load)

# Calculate efficiency
input_power = circuit_specs['input_voltage'] * (circuit_specs['output_voltage'] / R2_parallel_load)
output_power = circuit_specs['output_voltage'] * circuit_specs['load_current']
efficiency = output_power / input_power if input_power > 0 else 0

# Calculate power dissipated in resistors
current_R1 = circuit_specs['input_voltage'] / (R1_value + R2_parallel_load)
current_R2 = (circuit_specs['input_voltage'] - actual_output_voltage) / R2_value
current_load = actual_output_voltage / R_load

power_dissipated_R1 = current_R1**2 * R1_value
power_dissipated_R2 = current_R2**2 * R2_value

# Print results
print(f"Circuit design results:")
print(f"  R1 value: {R1_value:.2f} Ω")
print(f"  R2 value: {R2_value:.2f} Ω")
print(f"  Actual output voltage: {actual_output_voltage:.3f} V")
print(f"  Circuit efficiency: {efficiency*100:.2f}%")
print(f"  Power dissipated in R1: {power_dissipated_R1:.3f} W")
print(f"  Power dissipated in R2: {power_dissipated_R2:.3f} W")

# Check if design meets specifications
voltage_tolerance_met = abs(actual_output_voltage - circuit_specs['output_voltage']) <= circuit_specs['tolerance']
efficiency_met = efficiency >= circuit_specs['efficiency_target']

print(f"  Voltage tolerance met: {voltage_tolerance_met}")
print(f"  Efficiency requirement met: {efficiency_met}")
print(f"  Design feasibility: {'Acceptable' if voltage_tolerance_met and efficiency_met else 'Not acceptable'}")

# Design recommendations
if efficiency < circuit_specs['efficiency_target']:
    recommendation = "Consider using a more efficient voltage regulation method (e.g., switching regulator)"
elif not voltage_tolerance_met:
    recommendation = "Adjust resistor values to meet voltage requirements"
else:
    recommendation = "Design meets all requirements"

print(f"  Recommendation: {recommendation}")

# Component selection considerations
max_operating_voltage = circuit_specs['input_voltage'] * circuit_specs['safety_factor']
max_power_dissipation = max(power_dissipated_R1, power_dissipated_R2) * circuit_specs['safety_factor']

print(f"  Required voltage rating: {max_operating_voltage:.2f} V")
print(f"  Required power rating: {max_power_dissipation:.3f} W")

How would you modify your circuit design to improve efficiency while maintaining the required output voltage and current specifications?

ELI10 Explanation

Simple analogy for better understanding

Think of circuit theory like learning the rules of how water flows through pipes. Just like water flows from high pressure to low pressure areas, electricity flows from high voltage to low voltage points. Ohm's Law is like saying 'the amount of water that flows depends on how hard you push it divided by how narrow the pipe is'. Kirchhoff's Laws are like saying 'the total water flowing into a junction equals the total water flowing out' and 'the total pressure changes around any complete loop add up to zero'. It's the basic math for understanding how electricity moves through components like resistors (which are like narrow pipes that restrict flow), batteries (which are like pumps that push electricity), and wires (which are like large pipes that let electricity flow freely). Once you master these basic rules, you can figure out how complex electrical systems work - from your phone's charging circuit to the power grid that brings electricity to your home.

Self-Examination

Q1.

How do Kirchhoff's voltage and current laws relate to conservation of energy and charge?

Q2.

What are the conditions for maximum power transfer in electrical networks?

Q3.

How do network theorems like Thevenin's and Norton's simplify circuit analysis?