Introduction to Simulation - Lecture 2 and Karen Veroy Equation Formulation Methods

advertisement
Introduction to Simulation - Lecture 2
Equation Formulation Methods
Jacob White
Thanks to Deepak Ramaswamy, Michal Rewienski,
and Karen Veroy
1
Outline
• Formulating Equations from Schematics
– Struts and Joints Example
• Matrix Construction From Schematics
– “Stamping Procedure”
• Two Formulation Approaches
– Node-Branch – More general but less efficient
– Nodal – Derivable from Node-Branch
2
Formulating Equations
from Schematics
Struts Example
Identifying Unknowns
x1 , y1
Y
x2 , y2
X
0, 0
1, 0
hinged
Assign each joint an X,Y position, with one
joint as zero.
SMA-HPC ©2003 MIT
Given a schematic for the struts, the problem is to determine the joint positions and
the strut forces.
Recall the joints in the struts problem correspond physically to the location where
steel beams are bolted together. The joints are also analogous to the nodes in the
circuit, but there is an important difference. The joint position is a vector because
one needs two (X,Y) (three (X,Y,Z)) coordinates to specify a joint position in two
(three) dimensions.
The joint positions are labeled x1,y1,x2,y2,…..xj,yj where j is the number of joints
whose positions are unknown. Like in circuits, in struts and joints there is also an
issue about position reference. The position of a joint is usually specified with
respect to a reference joint.
Note also the symbol
This symbol is used to denote a fixed structure ( like a concrete wall, for example).
Joints on such a wall have their positions fixed and usually one such joint is selected
as the reference joint. The reference joint has the position 0,0
( 0,0,0 in three dimensions).
3
Formulating Equations
from Schematics
3
fx , f y
1
fx , f y
Struts Example
Identifying Unknowns
3
1
4
2
fx ,
fy
fx , f y
4
f lo a d
2
Assign each strut an X and Y force component.
SMA-HPC ©2003 MIT
The second set of unknowns are the strut forces. Like the currents in the circuit
examples, these forces can be considered “branch” quantities. There is again a
complication due to the two dimensional nature of the problem, there is an x and a y
1
1
s
s
component to the force. The strut forces are labeled
f , f ,..., f , f
x
y
x
y
where s is the number of struts.
4
Formulating Equations
from Schematics
Y
Struts Example
Aside on Strut Forces
f = EAc
fx
f
(0, 0)
L
x1 , y1
fy
L0 − L
= ε ( L0 − L )
L0
x1
f
L
y
= 1 f
L
fx =
X
fy
L =
x12 + y12
SMA-HPC ©2003 MIT
The force, f, in a stretched strut always acts along the direction of the strut, as
shown in the figure. However, it will be necessary to sum the forces at a joint,
individual struts connected to a joint will not all be in the same direction. So, to sum
such forces, it is necessary to compute the components of the forces in the X and Y
direction. Since one must have selected the directions for the X and Y axis once for
a given problem, such axes are referred to as the “global” coordinate system. Then,
one can think of the process of computing fx, fy shown in the figure as mapping from
a local to a global coordinate system.
The formulas for determining fx and fy from f follow easily from the geometry
depicted in the figure, one is imply projecting the vector force onto coordinate axes.
5
Formulating Equations
from Schematics
1
2
3
1
y
2
3
fx + fx + fx = 0
f + fy + fy = 0
f
x1 , y1
Struts Example
Conservation Law
f3
1
x2 , y2
fx4 − fx3 + floadx = 0
f4
f y4 − f y3 + floady = 0
f2
0,0
f lo a d
1,0
Force Equilibrium
Sum of X-directed forces at a joint = 0
Sum of Y-directed forces at a joint = 0
SMA-HPC ©2003 MIT
The conservation law for struts is usually referred to as requiring force equilibrium.
There are some subtleties about signs, however. To begin, consider that the sum of
X-diirected forces at a joint must sum to zero otherwise the joint will accelerate in
the X-direction. The Y-directed forces must also sum to zero to avoid joint
acceleration in the Y direction.
To see the subtlety about signs, consider a single strut aligned with the X axis as
shown below
x1,0
x 2,0
, then the strut will exert force in attempt to contract, as
If the strut is stretched by ∆
shown below
x 2 + ∆,0
x1,0
fa
fb
6
The forces fa and fb , are equal in magnitude but opposite in sign. This is because fa
points in the positive X direction and fb in the negative X direction.
If one examines the force equilibrium equation for the left-hand joint in the figure,
then that equation will be of the form
Other forces + fa = 0
whereas the equilibrium equation for the right-hand joint will be
Other forces + fb = Other forces- fa = 0
In setting up a system of equations for the strut, one need not include both fa and fb
as separate variables in the system of equations. Instead, one can select either force
and implicitly exploit the relationship between the forces on opposite sides of the
strut.
As an example, consider that for strut 3 between joint 1 and joint 2 on the slide, we
have selected to represent the force on the joint 1 side of the strut and labeled that
force f3. Therefore, for the conservation law associated with joint 1, force f3 appears
with a positive sign, but for the conservation law associated with joint 2, we need
the opposite side force, - f3. Although the physical mechanism seems quite different,
this trick of representing the equations using only the force on one side of the strut
as a variable makes an algebraic analogy with the circuit sum of currents law. That
is, it appears as if a strut’s force “leaves” one joint and “enters” another.
7
Formulating Equations from
Schematics
1
f 1 x = Fx ( x1 − 0, y1 − 0)
f 1 y = Fy ( x1 − 0, y1 − 0)
f1 f2
Struts Example
Conservation Law
f 3x = Fx ( x1 − x 2, y1 − y 2)
f 3 y = Fy ( x1 − x 2, y1 − y 2)
2
f3
f load
f 2 x = Fx ( x1 − 1, y1 − 0)
f 2 y = Fy ( x1 − 1, y1 − 0)
0
f4
f 4 x = Fx ( x2 − 1, y2 − 0)
1,0
f 4 y = Fy ( x2 − 1, y2 − 0)
Use Constitutive Equations to relate strut forces to joint positions.
It is worth examining how the signs of the force are determined.
Again consider a single strut aligned with the X axis.
x1,0
f
x 2,0
The -X axis alignment can be used to simplify the relation between the force on the
x1 side and x1 and x2 to
fx =
L − | x1 − x2 |
x1 − x2
∈ 0
| x1 − x2 |
L0
Note that there are two ways to make fx negative and point in the negative x
direction. Either x1- x2 > 0, which corresponds to flipping the strut, or |x2- x1| < L0
which corresponds to compressing the strut.
8
Formulating Equations
from Schematics
Struts Example
Summary
Unknowns for the Strut Example
Joint positions (except for a reference or
fixed joints)
Strut forces
Equations for the Strut Example
One set of conservation equations for each
joint.
One set of constitutive equations for each
strut.
Note that the # equations = # unknowns
SMA-HPC ©2003 MIT
9
Strut Example To Demonstrate
Sign convention
Two Struts Aligned with the X axis
f1
f2
x1 , y1 = 0
fL
x2 , y2 = 0
Conservation Law
At node 1: f1x + f 2 x = 0
At node 2: -f 2 x + f L = 0
SMA-HPC ©2003 MIT
10
Strut Example To Demonstrate
Sign convention
Two Struts Aligned with the X axis
f1
f2
fL
x2 , y 2 = 0
x1 , y1 = 0
Constitutive Equations
x −0
f1x = 1
ε ( L0 − x1 − 0 )
x1 − 0
f2 x =
x1 − x2
ε ( L0 − x1 − x2
x1 − x2
)
SMA-HPC ©2003 MIT
11
Strut Example To Demonstrate
Sign convention
Two Struts Aligned with the X axis
Reduced (Nodal) Equations
x1
x −x
ε ( L0 − x1 ) + 1 2 ε ( L0 − x1 − x2 ) = 0
x1
x1 − x2
f2 x
−
x1 − x2
ε ( L0 − x1 − x2 ) + f L = 0
x1 − x2
− f2 x
SMA-HPC ©2003 MIT
12
Strut Example To Demonstrate
Sign convention
Two Struts Aligned with the X axis
f1
f2
x1 , y1 = 0
fL
x2 , y 2 = 0
Solution of Nodal Equations
f L = 10 (force in positive x direction)
10
10
x1 = L0 +
x2 = x1 + L0 +
ε
ε
SMA-HPC ©2003 MIT
13
Strut Example To Demonstrate
Sign convention
Two Struts Aligned with the X axis
f1
f2
x1 , y1 = 0
fL
x2 , y 2 = 0
Notice the signs of the forces
f 2 x = 10 (force in positive x direction)
f1x = −10 (force in negative x direction)
SMA-HPC ©2003 MIT
14
Formulating Equations from
Schematics
Examples from last time
x1, y1
0
1
x2, y2
2
0,0
4
Circuit Modeling VLSI
Power Distribution
3
Struts and Joints
Modeling a Space Frame
SMA-HPC ©2003 MIT
15
Formulating Equations from
Schematics
• Two Types of Unknowns
– Circuit - Node voltages, element currents
– Struts - Joint positions, strut forces
• Two Types of Equations
– Conservation Law
• Circuit - Sum of Currents at each node = 0
• Struts - Sum of Forces at each joint = 0
– Constitutive Relations
• Circuit – branch (element) current proportional to branch
(element) voltage
• Struts - branch (strut) force proportional to branch (strut)
displacement
16
Generating Matrices from
Schematics
Assume Linear Constitutive Equations...
Circuit Example
One Matrix column for each unknown
N columns for the Node voltage
B columns for the Branch currents
One Matrix row for each equation
N rows for KCL
B rows for element constitutive equations
(linear !)
SMA-HPC ©2003 MIT
17
Generating Matrices from
Schematics
Assume Linear Constitutive Equations
Struts Example in 2-D
One pair of Matrix columns for each unknown
J pairs of columns for the Joint positions
S pairs of columns for the Strut forces
One pair of Matrix rows for each equation
J pairs of rows for the Force Equilibrium
equations
S pairs of rows for element constitutive
equations (linear !)
SMA-HPC ©2003 MIT
18
Generating Matrices from
Schematics
Circuit Example
Conservation Equation
i5
0
R5
V1
R1
i1
i2
is1
is 2
is 3
R3
R4
i4
V2
R2
V4
i3
V3
SMA-HPC ©2003 MIT
To generate a matrix equation for the circuit, we begin by writing the KCL equation
at each node in terms of the branch currents and the source currents. In particular,
we write
∑ signed branch currents = ∑ signed source currents
where the sign of a branch current in the equation is positive if the current is leaving
the node and negative otherwise. The sign of the source current in the equation is
positive if the current is entering the node and negative otherwise.
19
Generating Matrices from
Schematics
i5
0
i1
is 2
is 3
R3
R4
SMA-HPC ©2003 MIT
V2
R2
i2
is 1
i4
Conservation Equation
R5
V1
R1
Circuit Example
V4
i3
V3
− i1 + i 2 = −is1
− i 2 − i 5 = −i s 2 − i s 3
i 3 = is 3
−i3 + i4 = is1 + is2
20
Generating Matrices from
Schematics
Circuit Example
Conservation Equation
Matrix Form for the Equations
A
One
Row
for
each
KCL
Equation
1
N
2
3
4
⎡ −1 1
⎢
−1
⎢
1
⎢
⎢
−1
⎣
B
⎤
−1⎥
⎥
⎥
⎥
1 ⎦
⎡i1 ⎤
⎢i 2 ⎥
⎢ ⎥
⎢i 3 ⎥
⎢ ⎥
⎢i 4 ⎥
⎢⎣i 5 ⎥⎦
=
One column for each branch
current
The matrix A is usually not square
⎡ −is1
⎤
⎢
⎥
−
−
i
i
s
s
⎢ 2
3⎥
⎢ i
⎥
s3
⎢
⎥
⎢⎣is1 + is2 ⎥⎦
Right Hand
Side for
Source
Currents
SMA-HPC ©2003 MIT
21
Generating Matrices from
Schematics
Circuit Example
Conservation Equation
How each resistor contributes to the matrix
n1
n2
k
⎡
⎢
⎢
⎢
⎢
⎢
⎢⎣
⎤
⎥
⎥
⎥
⎥
⎥
⎥⎦
1
−1
n1
KCL at n1
ik
n2
Rk
∑ iother + ik = ∑ is
KCL at n 2
∑ iother − ik = ∑ is
A
A has no more than two nonzeros per column
SMA-HPC ©2003 MIT
What happens to the matrix when one end of a resistor is connected to the reference
( or the zero node).
n1
ik
0
In that case, there is only one contribution to the kth column of the matrix, as shown
below
k
n1
⎡
⎢
⎢
⎢
⎢
⎣
1
⎤
⎥
⎥
⎥
⎥
⎦
22
Generating Matrices from
Schematics
Circuit Example
Conservation Equation
How each current source contributes to the
Right Hand Side
⎤
⎡
⎥
⎢
n1 ⎢ ∑ isother + isb ⎥
⎥
⎢
⎥
⎢
n 2 ⎢ ∑ isother − isb ⎥
⎥
⎢
⎦
⎣
RHS
isb n2
n1
KCL at n1
∑ ib 's =
∑ isother + isb
KCL at n2
∑ ib 's =
∑ isother − isb
SMA-HPC ©2003 MIT
23
Generating Matrices from
Schematics
Circuit Example
Conservation Equation
Conservation Matrix Equation Generation Algorithm
n1
For each resistor
ik
n2
if (n1 > 0) A(n1, b) = 1
if (n 2 > 0) A(n 2, b) = −1
Set Is = zero vector
For each current source
n1
i sb n 2
if (n1 > 0) Is (n1) = Is (n1) − isb
if (n 2 > 0) Is (n 2) = Is (n1) + isb
SMA-HPC ©2003 MIT
24
Generating Matrices from
Schematics
R
i5
Circuit Example
Conservation Equation
5
0
R1
1
i1
R2
i2
is1
is 2
i3
R4
i4
2
R3
4
1
2
3
4
is 3
⎡− 1 1
⎢ −1
⎢
1
⎢
⎢
−1
⎣
i1 i 2 i 3
3
A
1
⎤
⎥
−1
⎥
⎥
⎥
⎦
i4 i5
⎡ i1 ⎤
⎡ − is 1 ⎤
⎢i 2⎥
⎢
⎢ ⎥
−is 2 −is 3⎥⎥
⎢i 3 ⎥ = ⎢
⎥
⎢ is 3
⎢ ⎥
4
i
⎥
⎢
⎢ ⎥
⎣ is1 +is2 ⎦
⎢⎣ i 5 ⎥⎦
SMA-HPC ©2003 MIT
25
Generating Matrices from
Schematics
i5
i1
1 i2
Circuit Example
Constitutive Equation
i5 =
2
0
i1 =
i2 =
1
1
Vb1 = (0 − V 1)
R1
R1
i4
i4 =
1
1
Vb 5 = (0 − V 2)
R5
R5
1
1
Vb2 = (V 3 −V 4)
R2
R2
i3
4
1
1
Vb 4 =
(V 4 − 0)
R4
R4
i3 =
3
1
1
Vb 3 = (V 3 − V 4)
R3
R3
First determine Voltages across resistors (Branch Voltages)
Second relate Branch currents to Branch Voltages
SMA-HPC ©2003 MIT
The current through a resistor is related to the voltage across the resistor, which in
turn is related to the node voltages. Consider the resistor below.
V1
i1
V2
R1
The voltage across the resistor is V1-V2 and the current through the resistor is
i1 =
1
(V 1 − V 2)
R1
Notice the sign, i , is positive if V1 > V2.
In order to construct a matrix representation of the constitutive equations, the first
step is to relate the node voltages to the voltages across resistors, the branch
voltages.
26
Generating Matrices from
Schematics
Circuit Example
Constitutive Equation
i5
0
i1
i5 =
1
i2
2
i2 =
1
1
i1 =
V b1 =
( 0 − V 1)
R1
R1
i4
Examine
Matrix
Construction
1
1
Vb 2 =
(V 1 − V 2)
R2
R2
i3
4
1
1
i4 =
Vb4 =
(V 4 − 0 )
R4
R4
⎡V b 1 ⎤ ⎡ − 1
⎢V b 2 ⎥ ⎢
⎢ ⎥ ⎢ 1
⎢V b 3 ⎥ = ⎢
⎢ ⎥ ⎢
⎢V b 4 ⎥ ⎢
⎢⎣V b 5 ⎥⎦ ⎢⎣
1
1
Vb5 =
(0 − V 2)
R5
R5
3
1
1
i3 =
Vb3 =
(V 3 − V 4 )
R3
R3
−1
−1
1
⎤
⎥
⎥
− 1⎥
⎥
1⎥
⎥⎦
⎡V 1 ⎤
⎢V 2 ⎥
⎢ ⎥
⎢V 3 ⎥
⎢ ⎥
⎣V 4 ⎦
SMA-HPC ©2003 MIT
To generate a matrix equation that relates the node voltages to the branch voltages,
one notes that the voltage across a branch is just the difference between the node
voltages at the ends of the branch. The sign is determined by the direction of the
current, which points from the positive node to the negative node.
Since there are B branch voltages and N node voltages, the matrix relating the two
has B rows and N columns.
27
Generating Matrices from
Schematics
Circuit Example
Constitutive Equation
Node to Branch Relation
KCL Equations
⎡− 1 1
⎤
⎢
−1
− 1⎥⎥
⎢
⎢
⎥
1
⎢
⎥
−1 1
⎣
⎦
A
⎡Vb1 ⎤
⎤
⎡− 1
⎢Vb 2 ⎥
⎥ ⎡V 1 ⎤
⎢ 1 −1
⎢ ⎥
⎥ ⎢V 2 ⎥
⎢
⎢
1 − 1⎥ ⎢ ⎥ = ⎢Vb 3 ⎥
⎢ ⎥
⎥ ⎢V 3 ⎥
⎢
1⎥ ⎢ ⎥
⎢Vb 4 ⎥
⎢
V 4⎦
⎣
⎢⎣Vb 5 ⎥⎦
⎥⎦
⎢⎣
−1
⎡i1 ⎤ ⎡ ⎤
⎢i 2 ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥
⎢i 3 ⎥ = ⎢ Is ⎥
⎢ ⎥ ⎢ ⎥
⎢i 4 ⎥ ⎢ ⎥
⎢⎣i 5 ⎥⎦ ⎢⎣ ⎥⎦
AT
The node-to-Branch matrix is the transpose of the KCL Matrix
SMA-HPC ©2003 MIT
A relation exists between the matrix associated with the conservation law (KCL)
and the matrix associated with the node to branch relation. To see this, examine a
single resistor.
k
Vl
i
Rk
Vm
For the conservation law, branch k contributes two non- zeros to the kth column of
A as in
k
l
m
⎡
⎢
⎢
⎢
⎢
⎢
⎢⎣
1
−1
⎤
⎥
⎥
⎥
⎥
⎥
⎥⎦
⎡ I 1⎤
⎢ : ⎥
⎢ ⎥
⎢ : ⎥
⎢ ⎥
⎢ : ⎥
⎢⎣ I B ⎥⎦
=
⎡ ⎤
⎢ ⎥
⎢ ⎥
⎢ Is ⎥
⎢ ⎥
⎢ ⎥
⎢⎣ ⎥⎦
A
Note that the voltage across branch k is Vl -Vm, so the kth branch contributes two
non-zeros to the kth row of the node- branch relation as in
28
k
⎡
⎢
⎢
⎢
⎢
⎢
⎢⎣
l
m
1
−1
⎤
⎥
⎥
⎥
⎥
⎥
⎥⎦
⎡V 1 ⎤
⎢ : ⎥
⎢
⎥
⎢ : ⎥
⎢
⎥
⎢ : ⎥
⎢⎣ V N ⎥⎦
=
⎡V b 1 ⎤
⎢
⎥
⎢
⎥
⎢
⎥
⎢
⎥
⎢
⎥
⎢⎣ V b B ⎥⎦
It is easy to see that each branch element will contribute a column to the incidence
matrix A, and will contribute the transpose of that column, a row, to the node-tobranch relation.
29
Generating Matrices from
Schematics
i5
0
R1
2
is 2
i3
R4
i4
α
R2
i2
is1
Constitutive Equation
R5
1
i1
Circuit Example
is 3
R3
4
The kth resistor contributes
3
⎡ i1 ⎤
⎡
⎢i 2 ⎥
⎢
⎢ ⎥
⎢
⎢i 3 ⎥ = ⎢
⎢ ⎥
⎢
⎢i 4 ⎥
⎢
⎢⎣i 5 ⎥⎦
⎢⎣
1
R1
1
R2 1
R3
1
R4
1
R5
⎤
⎥
⎥
⎥
⎥
⎥
⎥⎦
⎡Vb1 ⎤
⎢Vb 2 ⎥
⎢ ⎥
⎢Vb 3⎥
⎢ ⎥
⎢Vb 4 ⎥
⎢⎣Vb 5 ⎥⎦
1
to α ( k , k )
Rk
The matrix α relates branch voltages to branch currents.
- One row for each unknown current.
- One column for each associated branch voltage.
The matrix α is square and diagonal.
SMA-HPC ©2003 MIT
30
Generating Matrices from
Schematics
i5
0
R1
2
is 2
i3
R4
i4
R2
i2
is1
Constitutive Equation
R5
1
i1
Circuit Example
is 3
R3
3
⎡ i1 ⎤
⎢i 2 ⎥
⎢ ⎥
⎢i 3 ⎥ − α AT
⎢ ⎥
⎢i 4 ⎥
⎢⎣i 5 ⎥⎦
4
⎡0⎤
⎡V 1 ⎤
⎢0⎥
⎢V 2 ⎥
⎢ ⎥
⎢ ⎥ = ⎢0⎥
⎢V 3 ⎥
⎢ ⎥
⎢ ⎥
⎢0⎥
⎣V 4 ⎦
⎢⎣ 0 ⎥⎦
VS
The node voltages can be related to branch currents.
- AT relates node voltages to branch voltages.
-
α relates branch voltages to branch currents.
SMA-HPC ©2003 MIT
31
Generating Matrices from
Schematics
B
N
⎡I
⎢
⎢
⎢A
⎣
−α AT
B
N
0
Circuit Example
Node-Branch Form
⎤
⎥
⎥
⎥
⎦
⎡ Ib ⎤
⎡0 ⎤
⎢ ⎥ = ⎢ ⎥
⎢ ⎥
⎢ ⎥
⎢⎣VN ⎥⎦
⎢⎣ Is ⎥⎦
N = Number of Nodes with unknown voltages
B = Number of Branches with unknown currents
Ib −α AT VN = 0
A Ib = I s
Constitutive Relation
Conservation Law
32
Generating Matrices from
Schematics
Struts Example
In 2-D
One pair of columns for each unknown
- J pairs of columns for the Joint positions
- S pairs of columns for the Strut positions
One pair of Matrix Rows for each Equation
- J pairs of rows for the force equilibrium
equations
- S pairs of rows for the Linearized constitutive
relations.
33
Generating Matrices from
Schematics
Struts Example
Follow Approach Parallel to Circuits
1) Form an “Incidence Matrix”, A, from
Conservation Law.
2) Determine strut deformation using AT.
3) Use linearized constitutive equations to relate
strut deformation
4) Combine (1),(2), and (3) to generate a
node-branch form.
34
Generating Matrices from
Schematics
x1, y1
f1
Struts Example
Conservation Equation
f3
x2, y 2
f4
f2
fl
0,0
1,0
f 1x + f 2 x + f 3 x = 0
f 1y + f 2 y + f 3y = 0
− f 3 x + f 4 x = − fl x
− f 3 y + f 4 y = − fl y
SMA-HPC ©2003 MIT
As a reminder, the conservation equation for struts is naturally divided in pairs. At
each joint the sum of X-directed forces = 0 and the sum of Y-directed forces = 0.
Note that the load force is known, so it appears on the right hand side of the
equation.
35
Generating Matrices from
Schematics
x1, y1
f1
Struts Example
Conservation Equation
f3
x2, y 2
Stamping Approach
f4
f2
fl
0,0
Load pair of columns per strut
Load right side for load
1,0
f 1x f 1 y f 2 x f 2 y f 3x f 3 y f 4 x f 4 y
x1 ⎡ 1
y1 ⎢
1
⎢
x2 ⎢
y 2 ⎢⎣
1
⎤
⎥
⎥
⎥
1 ⎥⎦
1
1
1
−1
1
−1
A
SMA-HPC ©2003 MIT
⎡ f 1x ⎤
⎢ f 1y ⎥
⎢ ⎥
⎢ f 2x ⎥
⎡ ⎤
⎢ ⎥
⎢ ⎥
⎢ f 2 y⎥ = ⎢ ⎥
⎢ f 3x ⎥
⎢− fl x⎥
⎢ ⎥
⎢ ⎥
⎣− fl y⎦
⎢ f 3y ⎥
⎢ f 4x ⎥
FL
⎢ ⎥
⎢⎣ f 4 y ⎥⎦
Note that the incidence matrix, A, for the strut problem is very similar to the
incidence matrix for the circuit problem, except the two dimensional forces and
positions generate 2x2 blocks in the incidence matrix. Consider a single strut
x j 1, y j 1
fs
xj 2, yj 2
The force equilibrium equations for the two joints at the ends of the strut are
At joint j1
∑f
+ fsx = − ∑ flx
∑f
+ fsy = − ∑ fly
xother
j1
At joint j2
j1
yother
j1
j1
∑f
− fsx = − ∑ flx
∑f
−
xother
j2
yother
j2
j2
fsy = − ∑ fly
j2
36
Examining what goes in the matrix leads to a picture
fsx
xj1
yj1
xj 2
yj 2
⎡
⎢
⎢
⎢
⎢
⎢
⎢
⎢
⎢
⎢
⎣⎢
⎡1
⎢
⎣
fsy
⎤
1 ⎥⎦
⎡− 1
⎤
⎢
⎥
1
−
⎣
⎦
⎤
⎥
⎥
⎥
⎥
⎥
⎥
⎥
⎥
⎥
⎦⎥
Note that the matrix entries are 2x2 blocks. Therefore, the individual entries in the
matrix block for strut S’s contribution to j1’s conservation equation need specific
indices and we use j1x, j1y to indicate the two rows and Sx, Sy to indicate the two
columns.
37
Generating Matrices from
Schematics
Struts Example
Conservation Equation
Conservation Matrix Generation Algorithm
For each strut
If ( j1 is not fixed)
A( j1 x, bx ) = 1 A( j1 y , by ) = 1
If ( j2 is not fixed)
A( j 2 x, bx ) = −1 A( j 2 y , by ) = −1
xj 1, yj 1
For each load
fload
If ( j1 is not fixed)
FL ( j1x ) = FL ( j1x ) − f load x
FL ( j1 y ) = FL ( j1x ) − fload y
A has at most 2 non-zeros / column
38
Generating Matrices from
Schematics
Struts Example
Constitutive Equation
Y
f
x 1, y 1
L
X
First linearize the
constitutive relation
(0, 0)
If x1, y1 are close to some x0, y0, x02 + y02 = L02
⎡ ∂Fx
( x 0, y 0)
⎡ fx ⎤ ⎢ ∂x
⎢ ⎥=⎢
⎣ fy ⎦ ⎢ ∂Fy ( x 0, y 0)
⎢ ∂x
⎣
∂Fx
( x 0, y 0)
∂y
∂Fy
( x 0, y 0 )
∂y
⎤
⎥ ⎡ ux ⎤
⎥⎢ ⎥
⎥ ⎣ uy ⎦
⎥
⎦
ux 1 = x 1 − x 0
uy 1 = y 1 − y 0
SMA-HPC ©2003 MIT
As shown before, the force through a strut is
x
ε ( L0 − L )
L
y
f y = Fy ( x, y ) = ε ( L0 − L )
L
f x = Fx ( x , y ) =
where
L = x2 + y2
and x, y are as in
y
L
X
If x and y are perturbed a small amount from some x0, y0 such that x02 + y02 = L02,
then since Fx(x0,y0) = 0
∂Fx
∂Fx
fx
( x 0, y 0) ( x1 − x 0) +
( x 0, y 0) ( y1 − y 0)
∂x
∂y
and a similar expression holds for y.
One should note that rotating the strut, even without stretching it, will violate the
small perturbation conditions. The Taylor series expression will not give good
approximate forces, because they will point in an incorrect direction.
39
Generating Matrices from
Schematics
ux1, uy1
f1
Struts Example
Constitutive Equation
f3
ux2, uy 2
f2
f4
fl
0,0
1,0
⎡ f 1x ⎤
⎢ f 1y ⎥
⎢ ⎥
⎢ f 2x ⎥
⎢ ⎥
⎢ f 2y⎥ −
⎢ f 3x ⎥
⎢ ⎥
⎢ f 3y ⎥
⎢ f 4x ⎥
⎢ ⎥
⎣⎢ f 4 y ⎦⎥
⎡ α11
⎢
α 22
⎢
α 33
⎢
⎢⎣
α 44
α
⎤
⎥
⎥
⎥
⎥⎦
⎡0⎤
⎢0⎥
⎢ ⎥
⎡ux1 ⎤ ⎢0⎥
⎢ ⎥ ⎢0⎥
T ⎢uy1 ⎥
=⎢ ⎥
A
⎢ux 2 ⎥ ⎢0⎥
⎢ ⎥ ⎢ ⎥
⎣uy 2 ⎦ ⎢0⎥
⎢0⎥
⎢ ⎥
⎣⎢0⎦⎥
SMA-HPC ©2003 MIT
40
Generating Matrices from
Schematics
Struts Example
Constitutive Equation
The α ( s, s ) block
ux1, uy 1 fs
Initial position
x 10 , y 10
⎡ ∂F x
⎢ ∂x ( x 20 − x 10 , y 20 − y 10 )
⎢
α ( s, s ) = ⎢
⎢ ∂F y
⎢
( x 20 − x 10 , y 20 − y 10 )
⎣⎢ ∂x
ux 2 , uy 2
Initial position
x 20 , y 20
∂F x
⎤
( x 2 0 − x 1 0 , y 20 − y 1 0 ) ⎥
∂y
⎥
⎥
⎥
∂F y
( x 20 − x 10 , y 20 − y 10 ) ⎥
∂y
⎦⎥
SMA-HPC ©2003 MIT
41
Generating Matrices from
Schematics
2⋅ S
2⋅ J
⎡I
⎢
⎢
⎢A
⎣
Struts Example
Node-Branch From
−α AT ⎤ ⎡ fs⎤ ⎡0 ⎤
⎥ ⎢ ⎥ ⎢ ⎥
⎥ ⎢ ⎥ =⎢ ⎥
⎥ ⎢⎣u ⎥⎦ ⎢⎣ fL⎥⎦
0
⎦
2⋅ J
2⋅ S
S =Number of Struts
J = Number of unfixed Joints
fs = α AT u = 0 Constitutive Equation
A fs = 0 Conservation Law
42
Generating Matrices from
Schematics
2⋅ S
2⋅ J
⎡I
⎢
⎢
⎢A
⎣
2⋅ S
B
N
⎡I
⎢
⎢
⎢A
⎣
B
Struts Example
Comparison
−α AT ⎤ ⎡ fs⎤ ⎡0 ⎤
⎥ ⎢ ⎥ ⎢ ⎥
⎥ ⎢ ⎥ =⎢ ⎥
⎥ ⎢⎣u ⎥⎦ ⎢⎣ fL⎥⎦
0
⎦
2⋅ J
−α AT ⎤ ⎡Ib ⎤ ⎡Vs⎤
⎥ ⎢ ⎥ ⎢ ⎥
⎥ ⎢ ⎥ =⎢ ⎥
⎥ ⎢⎣VN ⎥⎦ ⎢⎣Is ⎥⎦
0
⎦
N
43
Generating Matrices
Nodal Formulation
is1 +
R5
1
1
V1 + (V1 − V2 ) = 0
R1
R2
V1
0
R1
R4
−is1 − is2 +
Circuit Example
is1
V4
V2
is 2
is2 + is3 +
R2
1
1
(V2 − V1 ) + V2 = 0
R2
R5
is 3
R3
V3
1
1
V4 + (V4 −V3 ) = 0
R4
R3
1) Number the nodes with one node as 0.
2) Write a conservation law at each node.
except (0) in terms of the node voltages !
SMA-HPC ©2003 MIT
44
Generating Matrices
Nodal Formulation
i5
0
i1
i
⎡
⎢
⎢
⎢
⎢
⎣
R5
V1
R1
Circuit Example
V2
R2
i2
is1
One row per node, one
column per node.
is 3
For each resistor
is 2
i3
4 R4
1
1
1
+
−
R1 R 2
R2
1
1
1
−
+
R2
R 2 R5
R3
V4
1
R3
1
−
R3
1
R3
1
1
+
R3 R 4
−
⎤
⎥
⎥
⎥
⎥
⎦
n1
V3
⎡ v1 ⎤
⎡ − is1
⎢v ⎥
⎢
⎢ 2 ⎥ = ⎢−is2 −is3
⎢ v3 ⎥
⎢ is3
⎢ ⎥
⎢
⎢⎣ v4 ⎥⎦
⎣ is1 + is2
R
n2
⎤
⎥
⎥
⎥
⎥
⎦
Is
G
SMA-HPC ©2003 MIT
Examining the nodal equations one sees that a resistor contributes a current to two
equations, and its current is dependent on two voltages.
ik
V n1
Vn2
Rk
1
(Vn1 − Vn 2) = −is
Rk
1
KCL at node n 2 ∑ iothers − (Vn1 − Vn 2 ) = is
Rk
So, the matrix entries associated with Rk are
KCL at node n1
∑i
others
+
n1
⎡
⎢
n1 ⎢
⎢
⎢
n2 ⎢
⎢
⎢⎣
n2
1
1
−
Rk
Rk
1
1
−
Rk
Rk
⎤
⎥
⎥
⎥
⎥
⎥
⎥
⎥⎦
45
Generating Matrices
Nodal Formulation
Circuit Example
Nodal Matrix Generation Algorithm
if (n1 > 0) & (n 2 > 0)
1
1
, G(n 2, n1) = G(n 2, n1) −
R
R
1
1
G(n1, n1) = G(n1, n1) +
, G(n 2, n 2) = G(n 2, n 2) +
R
R
G(n1, n 2) = G(n1, n 2) −
else if (n1 > 0)
G(n1, n1) = G(n1, n1) +
1
R
else
G(n 2, n 2) = G(n 2, n 2) +
1
R
SMA-HPC ©2003 MIT
46
Nodal Formulation
N
2⋅ J
Generating Matrices
G Vn = Is
↔
N
G uj = FL
↔
(Resistor Networks)
(Struts and Joints)
2⋅ J
47
Nodal Formulation
Comparing to Node-Branch form
Node-Branch Matrix
Constitutive
Conservation
Law
⎡I −α AT
⎢
⎢⎣A
0
⎤ ⎡Ib ⎤ ⎡0 ⎤
⎥ ⎢ ⎥ =⎢ ⎥
⎥⎦ ⎢⎣VN⎥⎦ ⎢⎣Is⎥⎦
Nodal Matrix
[ G ][VN ] = [Is ]
48
Nodal Formulation
Diagonally Dominant ….
G matrix properties
Gii ≥ ∑ Gij
j ≠i
Symmetric ……………..
Smaller …..
Gij = Gji
N × N << ( N + B ) × ( N + B )
2 J × 2 J << ( 2 J + 2 S ) × ( 2 J + 2 S )
49
Node-Branch form
Nodal Formulation
Node-Branch formulation
⎡I
⎢
⎢
⎢A
⎣
−α AT
0
M
⎤
⎥
⎥
⎥
⎦
⎡ Ib ⎤
⎡0 ⎤
⎢ ⎥ = ⎢ ⎥
⎢ ⎥
⎢ ⎥
⎢⎣Vn ⎥⎦
⎢⎣ I s ⎥⎦
b
x
• Not Symmetric or Diagonally Dominant
• Matrix is (n+b) x (n+b)
SMA-HPC ©2003 MIT
50
Deriving Formulation From NodeBranch
Nodal Formulation
Ib − α AT VN = 0
A ⋅ ( Ib − α AT VN ) = A ⋅ 0
A Ib = Is
⇒ Aα AT VN = Is
G
51
Problem element
Nodal Formulation
Voltage Source
is
Voltage source
Vn 1
Vs
+
Vn 2
Constitutive Equation
0 ⋅ is + V n 1 − V n 2 = V s
SMA-HPC ©2003 MIT
52
Problem Element
Nodal Formulation
Voltage Source
Can form Node-Branch Constitutive Equation with
Voltage Sources
R
i5
5
5
i6
Vs
R1
1
i1
2
i2
+
i3
R4
0
R2
i4
R3
3
4
α
0
⎡1
⎤ ⎡i1⎤
⎡V1⎤ ⎡⎢0 ⎤⎥
⎢ 1
⎥ ⎢i2⎥
V2
1
⎢
⎥ ⎢i3⎥ −α AT ⎢⎢V 3⎥⎥ = ⎢0 ⎥
1
⎢
⎥ ⎢i4⎥
⎢V 4⎥ ⎢⎢0 ⎥⎥
⎢
1 ⎥ ⎢i5⎥
⎢⎣V 5⎥⎦ ⎢0 ⎥
⎢⎣
0⎥⎦ ⎢⎣i6⎥⎦
⎣−Vs⎦
Vs
⎡ 1
⎢
1
⎢ R1
R2 1
⎢
= ⎢
R3 1
⎢
R4 1
⎢
R5
⎢
⎣⎢
1
⎤
⎥
⎥
⎥
⎥
⎥
⎥
⎥
⎦⎥
SMA-HPC ©2003 MIT
53
Problem Element
Nodal Formulation
Voltage Source
Cannot Derive Nodal Formulation
⎡ I bR ⎤
T
⎢ 0 ⎥ − α A VN = 0 (Constitutive Equation)
⎣ ⎦
⎡ I bR ⎤
A ⋅ ⎢ ⎥ − Aα ATVN = 0 (Multiply by A)
⎣0 ⎦
Resistor currents
Voltage source
currents
missing
A ⋅ Ib = Is
(Conservation Law)
Ib
Cannot Eliminate Ai ⎡⎢ ⎤⎥ !
R
⎣0 ⎦
Nodal Formulation requires Constitutive relations
in the form
Conserved Quantity = F ( Node Voltages) !
SMA-HPC ©2003 MIT
54
Problem Element
Nodal Formulation
Rigid rod
Rigid Rod
x1, y1
x 2, y 2
L
⎡ 0
⎢( y1 − y2 )
⎣
0 ⎤ ⎡ fx⎤ ⎡ (x1 − x2)2+ ( y1 − y2)2 ⎤ ⎡L⎤
+⎢
⎥ =⎢ ⎥
( x1 − x2)⎥⎦ ⎢⎣ fy⎥⎦ ⎢⎣
0
⎥⎦ ⎣0⎦
SMA-HPC ©2003 MIT
55
Comparing Matrix Sparsity
Nodal Formulation
Example Problem
Resistor Grid
V1
V2
V 101
V 901
V 102
V 902
V3
V 103
V 903
V4
V 99
V 100
V 200
V 1000
SMA-HPC ©2003 MIT
56
Comparing Matrix Sparsity
Nodal Formulation
Example Problem
Matrix non-zero locations for 100 x 10 Resistor Grid
Node-Branch
Nodal
57
Summary of key points…...
• Developed algorithms for automatically
constructing matrix equations from schematics
using conservation law + constitutive equations.
• Looked at two node-branch and nodal forms.
58
Summary of key points
• Node-branch
– General constitutive equations
– Large sparser system
– No diagonal dominance
• Nodal
– Conserved quantity must be a function of node
variables
– Smaller denser system.
– Diagonally dominant & symmetric.
59
Download