Circuits and Systems Expositions Analysis of Linear Networks with Inconsistent Initial Conditions

This paper presents a new method to analyze time-invariant linear networks allowing the existence of inconsistent initial conditions. This method is based on the use of distributions and state equations. Any time-invariant linear network can be analyzed. The network can involve any kind of pure or controlled sources. Also, the transferences of energy that occur at t=O are determined, and the concept of connection energy is introduced. The algorithms are easily implemented in a computer program.


I. INTRODUCTION
NITIAL conditions may be inconsistent when there occurs I a change in the network topology, as when two capacitors with different initial voltages are connected in parallel to form a new network.
The instant when a network forms a new topology will be t = 0. Initial conditions at 0-will be called initial conditions simply, while the values immediately after switching are the initial conditions at O+.This paper will show an efficient and simple method to analyze an electric network knowing the initial conditions at 0-.
Voltage and current values at O+ and 0-are related by charge conservation in capacitive cutsets and flux conservation in inductive loops.Nevertheless, the application of these laws does not always suffice for obtaining the initial values at O+ from initial values at 0-: in the network of the second example of Section VIII, there is only one inductor, and its flux at 0- is different from its flux at Of.
Consider the two capacitors again.If initial voltages are different, the total energy stored in capacitors at O+ is smaller than the energy at 0-because at t = 0, the capacitors have transformed part of their energy stored in their electric field into electric energy, which is not zero if initial conditions are inconsistent.This energy, which we call the connection energy, is analyzed in detail in this paper.
The problem of determining initial values at O+ has been studied before.However, the analysis of the electric energy absorbed in the network connection is a little studied subject that this paper treats in detail.
Dervisoglu [3] developed an algorithm to calculate initial values at Of using a state variable approach.His method does not involve distributions directly, but introduces the Dirac impulse S and its derivatives in the analysis.Murakami [4] proposed another way of determining the response of a network with inconsistent initial conditions.However, his method does not allow the existence of dependent sources and pure current sources.His analysis is based on the state equation and the use of distributions, although the application of distributions is not as interesting as in our new formulation.Recently, Opal and Vlach [5] proposed a new method to calculate initial values at O+ without introducing state equations.They use a numerical Laplace transform inversion, exact for impulses and its derivatives.In their algorithm, it is necessary to integrate a system of equations in a time interval At tending to zero.This fact introduces numerical errors difficult to measure.
The problem of conservation of energy when initial conditions are inconsistent has been studied by Goknar [12].He considers networks consisting of capacitors or inductors only, without sources.He demonstrates that in those networks, the difference of the energy stored in capacitors (or inductors) from 0-to O+ is always positive, and that this difference equals the energy consumed in the interval [0, +cc[ by some resistors properly included into the network.However, he does not explain why the principle of conservation of energy seems to be violated.
Our approach is based on currents and voltages defined as distributions.The method is simple: first, equations of the network (Kirchhoff's laws and Ohm's law) are stated for currents and voltages defined as distributions.Then, we obtain a singular system of differential equations of distributions.This system is similar to classic singular systems of differential equations for functions, which can be written as d dt where the matrix T may be singular.Next, this equation is transformed into the following pair of equations:

S Y ( t ) + T -Y ( t ) = E ( t )
Switches are not considered as elements of the network.
Instead, we assume that the network topology for t 2 0 is different from the topology for t < 0.
Our approach to the problem of energy is very different from [12].Our analysis is valid for any linear time-invariant network, including controlled and uncontrolled sources.We will study the transferences of energy, and we will find out why the total energy stored in inductors and capacitors at 0- is different from that of O+.

PRELIMINARIES
In our analysis, the matrix B need not be constant, although there always exists a state equation where B is constant.This is derived immediately from the theory of polynomial matrices and the Kronecker form exposed by Gantmacher [ 1 11, which Verghese [lo] uses in his analysis of singular systems.
However, sometimes the computation of B in this formulation is very difficult.
To illustrate these different choices for the matrix B, consider Fig. 1, with L2 = L3 = M23 = L (the coupling is perfect and the order of the circuit is one).We derive The concept of distribution [6] generalizes the concept of function.A distribution is defined as a continuous linear map from the space of all C" real functions with compact support into CG.Locally integrable functions can be considered as a particular case of distributions.Any distribution is infinitely derivable.The set of distributions is a vector space which is denoted by D'.
If we choose I2 + I3 as the state variable, the state equation is Therefore, the distributions U , I , and E corresponding to voltages, currents, and values of independent sources, respectively, will be written as follows: Then, A is zero and B depends on d l d t .
state equation when the matrix B is allowed to be not constant.
Further, in this case, some physical magnitudes such as currents in inductors and voltages in capacitors can be chosen as state variables.In the Appendix, we explain an algorithm for determining a state equation with these characteristics, which is simpler and easier to program than the existing ones.Generally, the matrix C of (2) also depends on d / d t , even if the state equation is derived from the Kronecker form.In fact, Kronecker form is equal to the nilpotency index of S + A T minus 1. invariant element of first order: zero impedances and admittances, pure current and voltage sources, any controlled source, network can be not connected.
We assume that Ohm's law is valid for any instant of time, while Kirchhoff s laws are applicable only if t 2 0. The instant and perfect couplings are analyzed by this method.Also, the E = E -+ E + Replacing these expressions in (9), we obtain = E -. (6) where U and I are vectors of branch voltages and currents, respectively, and E is a vector whose elements correspond to independent sources in the network.
where A is the incidence matrix and B is the loop matrix.These equations are equivalent to where I; is the vector whose components are link currents and V$ is the vector of node voltages (it is not necessary to choose a normal tree: any tree is suitable in this formulation).Equation ( 6) is also true if all distributions are restricted to t < 0: Equation ( 6) is equivalent to From the last two equations, we get the equation shown in (10) at the bottom of this page.Equations (7), (8), and (10) determine U+ and I+.So we have a system of algebraic and differential equations in the algebra of distributions with support contained in R+, that is to say, in the convolution algebra Vl [6], [7].

Iv. DETERMINATION OF THE STATE EQUATION
We denote the following expression by K(O-): From Section 111, we derive this equation:

F I
If we denote the vector whose components are V$ and I; by Y + and the other matrices of the first member by S and T , we obtain All distributions that appear in this equation are functions If the network is the polynomial det ( S + X T ) Tf 0.
which can be extended by as distributions.

M{Ult<O) + N{Ilt<o)+ p to
In this case, it is easy to find matrices F ( X ) and D such that where D is an invertible matrix, F ( A) is a unimodular matrix, and Id,, Idb are identity matrices of orders a and b.The the Appendix or any other method.
= { E ~~< ~} .(9) matrices F(X) and D can be calculated using the algorithm in (3 Equation ( 15) is the network state equation for distributions.
The components of X+ are the state variables.The derivatives which appear in (15) and (16) are in the sense of distributions.
It is also interesting to observe that E+ can be any distribution, not only a continuous function.For instance, E+ can include any impulses ~( " 1 , n 2 0.

v . SOLUTION OF THE STATE EQUATION
The state equation is equivalent to the following system of convolution equations in the algebra D:: (the symbol * stands for the convolution of distributions).This result is due to the fact that for any distribution f, That is to say, Then, the initial values of state variables at O+ are 2)

A. Multiplication of Distributions
Electric power is equal to the product of current and voltage.If currents and voltages are defined by distributions, their product is not possible in general (only the product of a distribution and a C" function is well defined).Due to this fact, power and energy cannot be analyzed in the space of distributions.
To multiply distributions, it is necessary to introduce another space where multiplication is possible.Such a space is the space G of generalized functions defined by Colombeau [8].
In this formulation, a distribution is a particular case of generalized function.So the space 2)' of distributions is a subspace of 6 .
The product of two generalized functions always exists in G, in particular if these generalized functions are distributions.For example, the square of the Dirac impulse 6 is the generalized function fi2, which is not a distribution.
Electric energy is defined as the definite integral of power, which is a generalized function that depends on time.The definite integral of a generalized function in an interval [a, b] is introduced in [8] too.It is always defined and is equal to a generalized number (the set of generalized real numbers is an extension of R).Obviously, if a generalized function is defined by a continuous function, its definite integral as a generalized function coincides with its usual definite integral as a function.
We assume that the space 2)' of distributions is included in the space G of generalized functions, where power and energy can be analyzed correctly.

B. Energy Analysis
The.electric power absorbed by a network branch "i" is the generalized function defined by the product of branch current and branch voltage (we suppose that the current leaves the positive node and arrives at the negative node): Wiis the electric energy absorbed by the branch '5'' in the interval ] a , O[. W: is the electric energy absorbed by the branch ''i" in the interval [0, b[.W, C is an electric energy absorbed by the branch ''i" due to the topology change.We define W, C as the connection energy of the branch "i."Then, we have

We also define
The energy W+ is equal to zero provided that The electric energy Wi absorbed by a network branch "2" in the time interval [a, b] is the following generalized number: Replacing this expression in (19), we obtain  is also zero if we assume that there exists an initial network topology in the interval ] -E , 0[ (in general, this topology is different from the final topology).However, this assumption is not necessary in our analysis since we only require the existence of a network topology for t 2 0.
The energy W" is not zero in general.We define W" as the network connection energy.This electric energy is absorbed by the network in t = 0 as a consequence of the topology change.
Consider the energy W: again.We can observe that the total energy absorbed by the branch ''i" in t = 0 is not only W:, but the addition of W: and the part of W, ' corresponding to t = 0, which we will denote as W,".
However, the part of the energy absorbed by the whole network in t = 0 corresponding to W+, which we denote as WO, is zero [this is derived immediately from (21)].Therefore, the total energy absorbed by the network in t = 0 is equal to W".
Let us assume that there exists an interval 10, E'[ where the restrictions of distributions I;' and U, ' are continuous functions with limit at O+.Then, operating as in Section 11, we obtain In the analysis of the connection energy, the distributions Iand Uare as essential as I+ and U+.In other formulations of network analysis with inconsistent initial conditions [3]- [5], the existence of Iand Uis not analyzed.This is one of the reasons why the energy transferences cannot be understood in those formulations.
In an RLCM network, no derivatives of the Dirac distribution 6 appear in voltages and currents if E ( t ) is derivable enough.Therefore, the connection energy can be calculated using (24), and the generalized number that defines the connection energy is a classical real number.
In other circuits which include impulses 6("), 7~ 2 1, the connection energy is calculated using (25).This integral has a mathematical sense as a generalized number.In fact, following Colombeau' s theory, the generalized number defined by (25) is "like an infinite real number."Similarly, the value of the generalized function S at 0 is a generalized number with a mathematical sense which we can consider as an infinite real number.So in networks with impulses S(n), n 2 1, transferences of energy are defined by generalized numbers which can be different from classical real numbers.

VIII. EXAMPLES
Example I : In the network of Fig. 2, the switch S is closed for t < 0 and open for t 2 0. In the new topology, the currents 11 and -12 must be equal.Because of this sudden change of currents, voltage impulses appear in the network.
The network connection energy is Thus, W" is equal to the increment of the energy stored in the magnetic field created by both inductors.From (26), we derive that this increment is always 5 0.

[$] = h(t)etd [
The matrix A is obtained immediately from (30).From this result, it is easily derived that AQ3 is equal to the charge increment in the capacitor C3 between the instants 0-and O+.
(22), we can derive that the network connection energy is

b) Analysis of the Network Connection Energy: Applying
The total connection energy of both capacitors is which is equal to the increment of the energy stored in the electric field created by both capacitors.where AQ is the charge increment of the capacitor: The connection energy for each branch is So the network connection energy is 2 Now, we are going to give a physical interpretation for the energy W" in this circuit.To make the example simpler, we suppose that El(t) is a constant function.Then, in this circuit, -W" is equal to the limit of the energy consumed in the resistor of the network of Fig. 4(b) when R3 + 0 in the interval [0, t] for any t such that 0 < t < +m: It is easy to verify that the resistor current for t 2 0 is It is clear that the limit of this expression when R3 -+ 0 is -W".
Given any value of R3, the above expression shows that the energy absorbed by the resistor R3 in [0, +m[ is -Wc too.This result is similar to the interpretation given by Goknar C circuits without sources.However, if &(t) is not a constant function, the energy consumed by R3 in [0, +CO[ is generally different from -W" (for example, if El(t) is sinusoidal, the energy consumed by R3 is +m).On the other hand, it can be checked that our first interpretation of -W" as the limit of the energy consumed by R3 when R3 + 0 in the finite interval [0, t] can be extended to not constant functions E1 ( t ) if El (t) is derivable enough.Therefore, we think that our interpretation of -W" is better than Goknar's.It should be investigated if our hypothesis is true for any RLCM circuit.However, this is a difficult problem since it involves singular perturbations in singular systems.

APPENDIX
Given a pencil of square matrices S + AT, we are going to explain an algorithm to calculate a unimodular matrix F ( A ) and an invertible matrix D such that (13) holds.The matrices F(A) and D will be calculated using elementary row and column transformations.Our algorithm is purely algebraic, such as the algorithm given by Fettweis [9].
The concept of elementary row and column transformations of polynomial matrices can be found in [I 11.If these transformations do not depend on A, they are said to be strict.If one matrix is obtained from another by elementary transformations, these matrices are equivalent.If all the transformations are strict, then they are strictly equivalent.
The concept of the row echelon of a matrix is introduced by Campbell [13].He gives this definition: a rectangular m x n matrix A which has rank T is said to be in row echelon form if A is of the form where the elements c;j of C (= C,,,) satisfy the following conditions: 1) cij = 0 if i > j.
2) The first nonzero entry in each row of C is 1.
3) If cij = 1 is the first nonzero entry of the ith column, then the jth column of C is the unit vector e; whose only nonzero entry is in the ith position.This column is said to be a "distinguished" column.For example, the following matrix is in row echelon form: It is easy to program an algorithm to obtain the row echelon matrix of any matrix by elementary row transformations.We have the following properties: Any rectangular matrix B can always be row reduced to row echelon form by elementary row operations.That is to say, there always exists an invertible matrix G such that GB = A, where A is in row echelon form.The rank of the matrix B equals the rank of its row echelon form A and is equal to the number of distinguished columns of A.
included in the time interval where the network has a new topology.So voltage and current impulses are consistent in the new topology.These assumptions agree with the control theory approach to singular systems [lo].There are simple and efficient algorithms to determine a distribution whose support is contained in [O, +ea[.This fact the degree of the polynomial matrix C(A) derived from the Our formulation allows the presence of any linear time- Authorized licensed use limited to: Universitat de Barcelona.Downloaded on February 13, 2009 at 07:29 from IEEE Xplore.Restrictions apply.Then, (12) is equivalent to [W] [ $ I with the following change of variables: and the matrix F(d/dt) has been written as F -So the system (12) is equivalent to z+=c -(E+fSK(O-)).

6 W
Thus, the total electric energy consumed by the network in the time interval[a, b]  is = 2Wi = Pdt.i=l In the interval [a, b], -6 < a < 0 < b, W; canbe written as w i = 1"U2Ii dt = l b ( U : + U J ( I ?+ I T ) d t b = U:I: dt + l b U ; I ; dt + lbU:I; d t + lbU;I: dt.Similarly, we derive W = [ b U f t I + d t + ['U-'I-dt J a J a Let us define b W: = lbU:I:dt, W; = l UTI; d t

w+ = 0 .
Therefore, W = W -+ W". interval ] a , 0[, while W + is the electric energy absorbed in the time interval [0, b[.W + is null, as we have derived.W -The electric power absorbed by the network is n n Wis the electric energy absorbed by the network in the P = C P i = C U J ; = P I .i=l i=l Authorized licensed use limited to: Universitat de Barcelona.Downloaded on February 13, 2009 at 07:29 from IEEE Xplore.Restrictions apply.

Example 2 :+-c 3 U3
Given the network of Fig. 3, let us suppose that we interconnect its branches in t = 0.If capacitors C, and C, have different initial voltages, a current impulse is produced in the loop formed by both capacitors.This current impulse is converted into a voltage impulse by the controlled voltage 12(o-)).(28) source E l .Due to this voltage impulse, the flux of inductor LZ is not conserved and 12(0+) # 12(O-).L1+ L2 Authorized licensed use limited to: Universitat de Barcelona.Downloaded on February 13, 2009 at 07:29 from IEEE Xplore.Restrictions apply.a ) Time-Domain Analysis with the State Equation: From Ohm's law and Kirchhoff s laws, we derive 0 (0-) -c 4 U 4 (0 -)After some row and column elementary transformations, we obtain the following state equation:

[
12], although Goknar's interpretation was stated only for L or Authorized licensed use limited to: Universitat de Barcelona.Downloaded on February 13, 2009 at 07:29 from IEEE Xplore.Restrictions apply.

c r x n [
o ( m -r ) x n ] The algorithm to obtain(13)  is shown in the following example.Let us consider the nonsingular polynomial matrix S + AT(1): Through strict elementary row transformations in the polynomial matrix S + AT, the matrix T is transformed in its row echelon form.The resulting matrix is If the rank of T equals the dimensions of S + AT(1), then we have finished, since the submatrix T,(;) must be equal to the identity matrix and the submatrices S ~~' y S ~~) cannot exist.By means of strict elementary row transformations in S(l) + AT(1) we derive the row echelon form of the submatrix Therefore, the pencil S(l) + XT(l)is transformed into The rank of the submatrix equals its number of rows, since det (S + AT) # 0. Thus, exchanging some columns in S2 + AT2we obtain 1 Id22 J (the columns of the submatrix Ida2are the distinguished ).If the submatrices of S(3) + AT(3) Si;) + AT,(:), S i ; ) + AT;;) do not exist (due to the fact that S + ATis a unimodular matrix), then we have finished too.Though (not strict) elementary row transformations, the pencil S(3) + AT(3)is transformed into : Id22 J Due to the fact that det ( S i ; ' + AT(4)ll) # 0. Authorized licensed use limited to: Universitat de Barcelona.Downloaded on February 13, 2009 at 07:29 from IEEE Xplore.Restrictions apply.

define f+ = f -f-and verify that the support of f -f-is contained in io, +CO[. f+ is unique because f-is unique.
zero and 23 is constant.On the other hand, if I2 is At t = 0, all branches are connected to form a new network topology.Currents and voltages are determined by Ohm's law and Kirchhoff s laws.Ohm's law is assumed to be valid in the whole interval ] -E , +CO[.The equation is expressed as d where U -, I -, and Eare voltages, currents, and values of independent sources in the interval ]t, O[ and U+, I+, and E+ are voltages, currents, and independent sources in the interval [0, +CO[.Values corresponding to t = 0 are included in U+, I+, and E+.For example, if there are Dirac impulses in U , I , or E in t = 0, they are included in U+, I+, or E+.Let us consider a network in the time interval ]t, +CO[.
The elements of vectors and E are distributions dependent on time.M , N , P , and Q are constant square matrices.Their dimension is equal to the number of network branches.Equation (6) is a very general expression: it allows the presence of any linear time-invariant element of first order in the network.The restriction of distributions U and I to the interval (5) O[ is supposed to be defined by C' functions and the restriction of E by a continuous function.We also assume that the limits U(0-), (d/dt)U(O-), (d/dt)I(O-), and E(O-) exist and are finite.Therefore, U , I , and E can be written as in(3), (4), and(5).Kirchhoffs laws can be applied to U+ and I+ only: If the matrix B does not depend on d/dt, from (17) we by a function E ( t ) continuous in the interval ] -E , +m[.
(17)VI.SOLUTION FOR INDEPENDENT SOURCES DEFINED AS FUNCTIONSGiven a solvable network, let us suppose that E is defined 1) and Iare generalized functions.The following results are derived from the formulation given by Colombeau [8].If a < 0 < b and if f is a continuous function in ]t, 0[ and 10, E [ and the limits f ( 0 -) and f ( 0 + ) exist, then On the other hand, the integral is a generalized number, but not a classical real number.If n = I, it can be considered as the product +m(f(0-) -f ( 0 -t ) ) .To illustrate the use of these equations, let us consider a circuit where the voltage in the branch "i" is the impulse IC6 is a continuous function in ] -t, 0[ and is zero in [O, +m[.= 0 if initial conditions are consistent since there are no impulses in the network and U: and I: are equal to zero.Also, W: = 0 if initial values at 0are null.With similar assumptions, we have where U+0 and I+' are the restriction of distributions U+ and I+ to the open interval 10, +cm[ extended by zero and U', I o U, ' = U," + u, ' o I;' = I," + I;o where U, " and IT0 are the restriction of distributions U, ' and I, ' to the open interval 30, +CO[ extended by zero and U,", I," are distributions with support in (0) (this is always possible if the vector E of independent sources is defined by a piecewise C" function).From [8], we deriveC.Determination of the Connection EnergyTo calculate the integrals of (23), we must take into account that U', Io, U -, and the current in t = 0 is finite.From (22), we obtainWe can use (24) to calculate this integral, provided that It:are distributions with support in (0).We derive