Linear Circuit Components II

  • This lecture discusses the mathematical modeling of simple electrical linear circuits.
  • When modeling a circuit, one ends up with a set of implicitly formulated algebraic and differential equations (DAEs), which in the process of horizontal and vertical sorting are converted to a set of explicitly formulated algebraic and differential equations.
  • By eliminating the algebraic variables, it is possible to convert these DAEs to a state-space representation.

  September 3, 2003 Start of Presentation

  Electrical Circuits I

  • Components and their models
  • The circuit topology and its equations
  • An example
  • Horizontal sorting
  • Vertical sorting
  • State-space representation
  • Transformation to state-space form

  September 3, 2003 Start of Presentation

  Table of Contents

  Linear Circuit Components R i u = v – v a b v v

  • Resistors a b

  u = R·i u

  C i u = v – v a b v v a b

  • Capacitors

  du i = C· dt u

  L u = v – v i a b v v a b

  • Inductors

  di u = L· u dt

  September 3, 2003 Start of Presentation

  Linear Circuit Components II U i

  U = v – v b a v v + a | b

  • Voltage sources

  U = f(t) U

  I u = v – v

  I b a

  • Current sources

  v v a b

  I = f(t) u

  V V

  • Ground

  V = 0

  

V

  • September 3, 2003

  Start of Presentation

  Circuit Topology i i a b v = v = v a b c v v a b

  • Nodes

  i + i + i = 0 a b c i c v c u ab v v a b

  • Meshes u + u + u = 0

  ab bc ca u

bc

u ca v c

  September 3, 2003 Start of Presentation

  An Example I September 3, 2003

  Start of Presentation

  • The component and topology equations contain a certain degree of redundancy.
  • For example, it is possible to eliminate all potential variables (
  • The current node equation for the ground node is redundant and is not used.
  • The mesh equations are only used if the potential variables are being eliminated. If this is not the case, they are redundant.

  September 3, 2003 Start of Presentation

  Rules for Systems of Equations I

  v i ) without problems.

  • If the potential variables are eliminated, every circuit component defines two variables: the current (
  • >Consequently, we need two equations to compute values for these two variables.
  • One of the equations is the constituent equation of the element itself, the other comes from the topology.

  September 3, 2003 Start of Presentation

  Rules for Systems of Equations II

  i ) through the element and die Voltage ( u

  ) across the element.

  • + i
  • + i
  • + u
  • + u
    • The state variables (variables, which appear in differentiated form) may be assumed as known .

  • + i
  • + i
  • + i
  • + i

  • + u
  • + u

  u

  1

  · i

  1

  = R

  1

  u

  1

  = u

  L

  u

  2

  = u

  u

  C

  C

  1

  U = u

  C

  2

  = i

  1

  i

  L

  1

  /dt i = i

  L

  = L· di

  2

  2

  = R

  = i

  2

  1

  = u

  L

  u

  2

  = u

  C

  C u

  1

  U = u

  C

  2

  1

  · i

  i

  L

  1

  /dt i = i

  L

  = L· di

  L

  /dt u

  C

  = C· du

  C

  i

  2

  L

  /dt u

  C

  = L· di

  1

  i

  L

  1

  i = i

  

2

Node equations:

  · i

  2

  = R

  2

  /dt u

  L

  L

  = C· du

  u

  

1

  · i

  1

  = R

  1

  /dt u

  C

  = C· du

  C

  U = f(t) i

  An Example II Component equations:

  September 3, 2003 Start of Presentation

  = i

  2

  C Mesh equations:

  1

  C

  i

  2

  · i

  2

  = R

  2

  u

  1

  · i

  1

  = R

  U = f(t) u

  U = u

  Start of Presentation Rules for Horizontal Sorting I • The time t may be assumed as known .

  10 equations in 10 unknowns September 3, 2003

  2 The circuit contains 5 componentsWe require

  = u

  C

  u

  2

  1

  = u

  L

  u

  

C

  1

  • + u
  • + u

2 U = f(t)

  • Equations that contain only one unknown must be solved for it.
  • The solved variables are now known .
    • + i
    • + i
    • + i
    • + i
    • + u
    • + u

  • + u
  • + u

  /dt i = i

  1

  L

  i

  1

  = i

  2

  1

  C U = u

  C u

  C

  = u

  2

  u

  L

  = u

  L

  = L· di

  L

  2

  u

  1

  = R

  1

  · i

  1 u

  = R

  /dt u

  2

  · i

  2

  i

  C

  = C· du

  C

  1

  2

  U = f(t)

  1

  L

  i

  1

  = i

  2

  C U = u

  C u

  L /dt i = i

  C

  = u

  2

  u

  L

  = u

  1

  1

  = L· di

  u

  = R

  1

  = R

  

1

  · i

  1 u

  2

  

2

  L

  · i

  2

  i

  C

  = C· du

  C /dt

  u

  U = f(t)

  2 September 3, 2003 Start of Presentation

  Rules for Horizontal Sorting III

  = i

  L

  /dt i = i

  1

  L

  i

  1

  2

  L

  C

  U = u

  1

  C u

  C

  = u

  2

  = L· di

  /dt u

  1

  u

  September 3, 2003 Start of Presentation

  Rules for Horizontal Sorting II

  U = f(t)

  1

  1

  1

  2

  C

  = R

  2

  · i

  2

  i

  C

  = C· du

  u

  L

  = u

  C U = u

  1

  L

  i

  1

  = i

  2

  1

  1

  C u

  C

  = u

  2

  u

  L

  = u

  /dt i = i

  L

  = L· di

  = R

  2

  U = f(t)

  1

  

1

  1 u

  2

  

2

  L

  · i

  2

  i

  C

  = C· du

  C

  /dt u

  • Variables that show up in only one equation must be solved for using that equation.
    • + i
    • + i
    • + i
    • + i
    • + u
    • + u
    • + u
    • + u

  2

  • + i
  • + i
  • + u
  • + u
  • + u
  • + u
  • + i
  • + i
  • + i
  • + i

  2

  = R

  

1

  · i

  1 u

  2

  = R

  

2

  · i

  i

  U = f(t) u

  C

  = C· du

  C /dt u

  L

  = L· di

  L /dt i = i

  1

  L i

  1

  2

  = i

  2

  L

  = L· di

  L /dt i = i

  1

  L

  i

  1

  = i

  C U = u

  1

  1

  C u

  C

  = u

  2

  u

  L

  = u

  1

  2

  • + u
  • + u

  C U = u

  L

  = L· di

  L /dt i = i

  1

  L i

  1

  = i

  2

  1

  = C· du

  C u

  C

  = u

  2 u

  L

  = u

  1

  2

  C /dt u

  C

  C U = u

  2 U = f(t) u

  1

  C u

  C

  = u

  2 u

  L

  = u

  1

  1

  2 i

  = R

  

1

  · i

  1 u

  2

  = R

  

2

  · i

  u

  C /dt

  = C· du

  C

  L /dt i = i

  1

  L

  i = i + i

  U = u

  1

  C u

  = u

  L

  2

  u

  L

  = u

  1

  2

  U = f(t) u

  1

  = L· di

  u

  C

  · i

  September 3, 2003 Start of Presentation

  Rules for Horizontal Sorting IV • All rules may be used recursively.

  U = f(t)

  u

  1

  = R

  1

  1 u

  C /dt

  2

  = R

  2

  · i

  2

  i

  C

  = C· du

  = R

  

1

  · i

  = R

  u

  L

  = u

  1

  2 September 3, 2003 Start of Presentation

  U = f(t) u

  1

  1

  1 u

  · i

  1 u

  2

  = R

  2

  · i

  2

  i

  2

  = u

  C

  C u

  2

  = R

  

2

  · i

  2

  i

  C

  = C· du

  C /dt

  u

  L

  = L· di

  L /dt i = i

  1

  L

  i = i + i

  U = u

  1

  • + u
  • + u
  • + i

  The algorithm is applied, until every equation defines exactly one variable that is solves for.

  • + i
  • + u
  • + u

  Rules for Horizontal Sorting V

  • The horizontal sorting can now be performed using symbolic formula manipulation techniques.
    • + + i = i i i = i i

  U = f(t)

1 L U = f(t)

  1 L

  • - i = i i i = i i +

  u = R · i i = u /R

  1

  1

  1

  1

  

1

  1

  • + U = u u - u = U u

  u = R · i i = u /R

1 C

  1 C

  2

  2

  2

  2

  

2

  2i = C· du /dt u = u du /dt = i /C u = u

  C

  2

  2 C C C C C u = u u + u = u u + u = L· di /dt L

  1 2 di /dt = u /L L

  1

  2 L L L L September 3, 2003

  Start of Presentation Rules for Vertical Sorting

  • By now, the equations have become assignment statements. They can be sorted vertically, such that no variable is being used before it has been defined .

  i = i i i + = u /R U = f(t)

  1 L U = f(t)

  2

  2

  2 i - - = i i i = i i

  • - i = u /R u = U u

  1

  1

  1 C

  1

  2

  1 C C

  1

  2

  • - u = U u u + = u u

  i = u /R i = u /R

  1 C L

  1

  2

  2

  2

  2

  1

  

1

  1u = u du /dt = i /C du /dt = i i + /C = i i

  2 C C C C C

  

1 L

  • + u = u u di /dt = u /L

  di /dt = u /L L

  1

2 u = u L L

L L

  2 C September 3, 2003

  Start of Presentation

  • Alternatively, it is possible to work with both potentials and Voltages.
  • In that case, additional equations for the node potentials must be found. These are the potential equations of the components and the potential equations of the topology. Those had been ignored before.
  • The mesh equations are in this case redundant and can be ignored.
    • – v u
    • – v

  • – v i
  • – v u
  • – v v = 0
    • + i
    • + i

  2

  = v

  2

  C

  = C· du

  

C

  /dt u

  C

  = v

  2

  L

  = L· di

  

L

  /dt u

  L

  = v

  1

  Node equations:

  i = i

  1

  L

  i

  1

  = i

  2

  u

  

2

  · i

  1

  September 3, 2003 Start of Presentation

  Rules for Systems of Equations III

  September 3, 2003 Start of Presentation

  An Example III v

  1 v

  2 v

  The circuit contains 5 components and 3 nodes.

  ⇒ We require 13 equations in 13 unknowns.

  Component equations:

  U = f(t) U = v

  1

  = R

  2

  1

  · i

  

1

  u

  1

  = v

  1

  2

  u

  2

  = R

  C

  Sorting The sorting algorithms are applied just like before. • The sorting algorithm has already been reduced to a • purely mathematical (informational) structure without any remaining knowledge of electrical circuit theory. Therefore, the overall modeling task can be reduced to • two sub-problems:

  1. Mapping of the physical topology to a system of implicitly formulated DAEs.

  2. Conversion of the DAE system into an executable program structure.

  September 3, 2003 Start of Presentation

  State-space Representation n × n

  ∈ ℜ A n

  • Linear systems:

  n × m ∈ ℜ ∈ ℜ x B m p × n

  ∈ ℜ ∈ ℜ d u x

  C = A · x + B · u ; x(t ) = x dt p p × m

  ∈ ℜ ∈ ℜ

y

D y = C · x + D · u x = State vector

  • Non-linear systems:

  u = Input vector d x y = Output vector

  = f(x,u,t) ; x(t ) = x dt y = g(x,u,t) n = Number of state variables m = Number of inputs p = Number of outputs

  September 3, 2003 Start of Presentation

  Conversion to State-space Form I du /dt = i /C

  C C i = u /R U = f(t)

  2

  2

  2

  • - = ( i i ) /C

  1

  2 i = - i i u = U - u

  C

  1

  2

1 C

  = i /C - i /C

  1

  2 u = + u u i = u /R

  L

  1

  2

  1

  1

  1

  = u /(R · C) – u /(R · C)

  1

  1

  2

  2 i = i i du /dt + = i /C

  C C

  1 L = ( U u - ) /(R · C) – u /(R · C)

  C

  1 C

  2 di /dt = u /L u = u L L

  2 C di /dt = u /L

  L L For each equation defining a state

  • + = ( u u

  ) /L

  1

  2 derivative, we substitute the

  = u /L + u /L

  1

  2 variables on the right-hand side by the equations defining them, until

  • - = ( U u ) /L + u /L

  C C the state derivatives depend only

  = U /L on state variables and inputs.

  September 3, 2003 Start of Presentation

  Conversion to State-space Form II . x = u

  1

  

1

  1 We let:

  1 C . . x = - x u

  1

  1 [ R · C R · C R · C ]

  x = i

  1

  

2

  1

  2 Lu = U .

  1 . u x = y = u

  2 C L y = x

1 September 3, 2003

  Start of Presentation

  An Example IV September 3, 2003

  September 3, 2003 Start of Presentation

  • Cellier, F.E. (1991), Continuous System Modeling , Springer-Verlag, New York, Chapter 3 .
  • Cellier, F.E. (2001), Matlab code of circuit example .

  Start of Presentation References