From charlesreid1

Background

Setup of basic equation describing a simple inductor circuit - how does an inductor work, what is an inductor used for, how can we model the inductor

Inductor coil in electrical circuit: solving the differential equation for current

Setting up the use of Simpson's Rule to implement Euler's Method and integrate Right Hand side, with Delta x instead of Delta t.

Electrical circuit

Solving a differential equation

Different right-hand sides, different time steps

Content

Introduction

Today we will be using a spreadsheet program to implement Euler’s Method and solve a differential equation. Euler’s Method ties together the concepts of numerical integration and differential equations. We will implement Euler’s Method to solve for the current in the following circuit:

Circuit.png

This circuit is described in Example 4 of Section 9.5 of the Stewart Calculus textbook.

Would be nice to have just a little bit more motivation on what inductors can be used to do. What role do they play in power transformers and rectifier circuits?

Euler's Method

We can use Euler’s Method to solve a differential equation of the general form:

We start by chopping up the time domain into a set of steps of size . We will evaluate the solution, and the right‐hand side of the equation, at each timestep.

Start by turning the derivative on the left‐hand side into a finite difference quotient:

Next, using the fact that , we can write a relationship between the solution at a given time step , denoted , and the solution at the next timestep , denoted :

This is the equation you will be implementing in a spreadsheet.

The sequence of timesteps begins at some initial time corresponding to an initial state of the system . This initial condition yields an estimate of the solution after the first timestep:

This yields an estimate of the solution at the next timesteps,

and so on.

The Circuit Differential Equation

The Circuit Components

On the right is a circuit containing four components: a battery (which is a source of electric current), a resistor R, an inductor L, and a switch to turn the circuit on and off.

We are looking for the current as a function of time. However, current is not conserved – we have to start with something that’s conserved. In this circuit, voltage is conserved. The voltage supplied by the battery will match the voltage drops across the components.

The current - that's what we're solving for - is denoted .

Battery

The voltage supplied by the battery is constant with time (this is a battery providing direct current, which means it is constant with time - interesting things happen when we run the same circuit with alternating current).

The voltage supplied by the battery is denoted and is a constant function:

Resistor

Using Ohm's Law E = I R, we can find the voltage drop across a resistor - the voltage drop E is a linear function of current I and resistance R.

Across the resistor, the voltage drops by an amount proportional to the resistance and the current:

Inductor

Inductors are interesting electrical parts. They resist changes in electrical current (useful in converting AC to DC power), and can electrically lengthen circuits without physically lengthening them (useful for antennas). Physically, they are simply coils - to make an inductor, you simply coil up some wire. The electrical symbol for an inductor is:

Inductor.png

Here is an example of an inductor:

LargeInductor.jpg

Inductors are also found in everyday office electronics, like wall warts:

WallWart.gif

The inductor works by storing energy in the form of a magnetic field inside of the coil while current flows through the inductor. That magnetic field creates an electromotive force (a voltage) for a given amount of current.

Inductors can also share magnetic cores, which allows current through one inductor to induce current transfer through another. This enables circuits to transfer power from one level of voltage and current to another level of voltage and current without being physically connected to it (useful safety feature for AC to DC transformers, like your laptop or phone charger).

Mathematically, inductors can be modeled by writing the voltage drop across the inductor as being linear to the rate of change of current:

The General Differential Equation

We are writing a differential equation for current I(t). But because current is not conserved, we have to write a balance equation for voltage, E, then write voltage in terms of current to get current as a function of time.

Balancing the supplied voltage with the voltage drops gives us our differential equation:

The Particular Differential Equation

Let us consider Stewart's Example 4 from Section 9.5, where he uses a circuit with an inductor of 4 Henries, a resistor of 12 Ohms, and a battery with a voltage of 60 Volts, corresponding to L = 4, R = 12, and E(t) = 60. Now we can solve for the current as a function of time.

For the implementation of Euler's Method to solve this circuit, Stewart selected a time step of 0.1 seconds, and a total time of 3 seconds. This makes the particular differential equation:

Worksheet Questions

Question 1: Find the particular differential equation corresponding to a circuit with the following components:

  • Inductor of 10 Henries, L = 10
  • Resistor of 20 Ohms, R = 20
  • Voltage of 120 V, E = 120

Question 2: Implement the solution to this differential equation in an Euler's Method spreadsheet program. When you are finished, you should have a column of values that give you the current as a function of time. What is the limiting value of current, ?

Question 3: Create a chart with values of current as a function of time. Add proper labels (with units) to your axes, and a title to your chart explaining what is shown.

Question 4: What affect does resistance have on the value of ? Implement Euler's Method for the three resistances shown below. Replicate your chart of current versus time for each resistor.

Part 4a: Resistor of 5 Ohms

Part 4b: Resistor of 50 Ohms

Part 4c: Resistor of 200 Ohms


References

Stewart Example 4 Section 9.5

Flags

Link to all worksheets idea list: Worksheets

Calc II:


Calc III: