ORDINARY DIFFERENTIAL EQUATIONS POWERTOOL
Unit 21 -- Application: Electrical Circuit
Industrial Mathematics Institute
Columbia, SC 29208
URL: http://www.math.sc.edu/~meade/
E-mail: meade@math.sc.edu
Copyright © 2001 by Douglas B. Meade
All rights reserved
-------------------------------------------------------------------
>
Outline of Unit 21
>
Initialization
> restart;
> with( DEtools ):
> with( plots ):
> with( linalg ):
Warning, the name changecoords has been redefined
Warning, the name adjoint has been redefined
Warning, the protected names norm and trace have been redefined and unprotected
>
21.A-1 Model for a General RLC Circuit
Consider an RLC series circuit with resistance
(ohm), inductance
(henry), and capacitance
(farad). Denote the electric charge by
(coulomb). The current in the circuit is the instantaneous rate of change of the charge:
> charge := i(t) = diff( q(t), t );
>
The unit for current is ampere. One of Kirchoff's Laws states that the sum of the instantaneous voltage drops (changes in potential) around a closed circuit must be zero. That is,
> KirchoffLaw := E[R] + E[L] + E[C] - E[emf] = 0;
>
where
,
, and
are the voltage drops across the resistor, inductor, and capacitor, respectively, and
is the voltage drop produced by an attached electromotive force.
According to Ohm's Law, the voltage drop across a resistor is proportional to the current with constant of proportionality
:
> E[R] := R*i(t);
>
Faraday's Law states that the voltage drop across the inductor is proportional to the instantaneous rate of chage of the current, with
as the proportionality constant:
> E[L] := L*diff(i(t),t);
>
The voltage drop across a capacitor is proportional to the electric charge on the capacitor, with constant of proportionality
:
> E[C] := 1/C * q(t);
>
21.A-2 Solution for the General RLC Circuit
When the modeling assumptions for the potential drop across each component in the circuit are inserted into Kirchoff's Law, the resulting ODE is
> KirchoffLaw;
>
To put this into the form of a second-order ODE for the charge
> odeQ := eval( KirchoffLaw, {charge,E[emf]=e(t)} );
>
The corresponding initial conditions are
> icQ := q(0)=q0, D(q)(0)=i0;
>
The solution to this generic IVP is
> infolevel[dsolve] := 3:
> solQ := dsolve( { odeQ, icQ }, q(t) );
> infolevel[dsolve] := 0:
Methods for second order ODEs:
Trying to isolate the derivative d^2q/dt^2...
Successful isolation of d^2q/dt^2
-> Trying classification methods
trying a quadrature
trying high order exact linear fully integrable
trying differential order: 2; linear nonhomogeneous with symmetry [0,1]
trying 2nd order linear exact nonhomogeneous
trying a double symmetry of the form [xi=0, eta=F(x)]
trying linear constant coefficient
linear constant coefficient successful
>
The current can be found by differentiation:
> solI := eval( charge, solQ );
>
The same expressions for the charge and current can be derived as the solution to the first-order system of ODEs formed by Kirchoff's Law and the constitutive relation between current and charge. The appropriate first-order IVP is
> sysQI := odeQ, charge;
> icQI := q(0)=q0, i(0)=i0;
>
with solution
> solQI := dsolve( { sysQI, icQI }, { q(t), i(t) } );
>
That the two forms of the solutions are the same is a little difficult to verify with Maple:
> simplify( eval( q(t), solQ ) - eval( q(t), solQI ) );
>
> collect( simplify( eval( i(t), solI ) - eval( i(t), solQI ) ), {R,C,L} );
>
As partial verification of the equivalence of the solutions, note that the charge obtained from the first-order system satisfies the appropriate second-order ODE:
> odetest( op(select( has, solQI, q(t) )), odeQ );
21.A-3 Special Case #1: LC Circuit
If the circuit does not have a resistor,
, then the solutions "simplify" to
> LCsolQI := simplify( eval( solQI, R=0 ) );
>
Note that
>
and
>
imply that the exponentials in this problem all involve imaginary exponents, the real-valued solutions will involve sine and cosine. In particular, there is no transient solution for an LC circuit. Given that the second-order ODE for the charge in an LC circuit reduces to
> eval( odeQ, R=0 );
>
which is equivalent to an undamped oscillator, this is not surprising.
>
21.A-4 Special Case #2: RC Circuit
If the circuit does not have an inductor,
, it is not possible to obtain the solutions by simply inserting
into the general solution to the RLC circuit
> simplify( eval( solQI, L=0 ) );
Error, (in eval/_definite) division by zero
>
The problem is that when
the ODE for the charge is no longer of second order.
> RCodeQ := eval( odeQ, L=0 );
>
The solution is
> RCsolQ := expand( dsolve( { RCodeQ, q(0)=q0 }, q(t) ) );
> RCsolI := i(t) = expand( diff( rhs(RCsolQ), t ) );
>
Here, because
>
, the denominators all tend to
as
->
. This means that the initial charge in the system has no bearing on the long-time behavior of the solution. If the exponentially growing term in the integrand for the particular solution survives in a form that exactly cancels the exponential growth in the denominator, then the steady-state solution for the charge will be nontrivial. For example,
> collect( value( eval( { RCsolQ, RCsolI }, e=1 ) ), exp );
>
21.A-5 Special Case #3: RL Circuit
If the circuit does not have a capacitor,
, it is possible to obtain the charge on the circuit by simply taking a limit of the general solution to the RLC circuit
> RLsolQ := simplify( map( limit, solQ, C=infinity ), symbolic );
>
This substitution works because the ODE for the charge is still of second-order, with two distinct eigenvalues:
> RLodeQ := limit( odeQ, C=infinity );
>
Note that while the formal substitution
yields the same ODE
> eval( odeQ, C=infinity );
>
this substitution cannot be used directly on the solution
> eval( solQ, C=infinity );
>
but the charge in an LR circuit can be obtained as the limit of the generic solution for an RLC circuit as
->
:
> simplify( map( limit, solQ, C=infinity ), symbolic );
>
The corresponding current is
> RLsolI := i(t) = expand( diff( rhs(RLsolQ), t ) );
>
Careful inspection of the expression for the charge in the circuit verifies that this solution is obtained from a second-order ODE with eigenvalues
and
. The presence of a zero eigenvalue implies that the initial charge and current in the circuit impact the solution for all time. Moreover, because
> 0, only the portion of the general solution to the homogeneous term corresponding to the negative exponential is guaranteed to be transient.
>
[Back to ODE Powertool Table of Contents]
>