Download State-Space Model Example

Document related concepts
no text concepts found
Transcript
Introduction to Model Order Reduction
I.2.a – Assembling Models from
MNA Modified Nodal Analysis
Luca Daniel
Thanks to Jacob White, Kin Sou, Deepak Ramaswamy, Michal
Rewienski, and Karen Veroy
1
Power Distribution for a VLSI Circuit
+ 3.3
v
Cache
ALU
Decoder
Power Supply
Main power wires
• Select topology and metal widths & lengths so that
a) Voltage across every function block > 3 volts
b) Minimize the area used for the metal wires
2
Heat Conducting Bar
Demonstration
Example
lamp power  u  t 
Lamp
T0  0
Select the shape (e.g. thickness) so that
a) The temperature does not get too high
b) Minimize the metal used.
Input of
Interest
Tend
Output of
Interest
3
Load Bearing Space Frame
Droop
Joint
Beam
Attachment to
the ground
Cargo
Vehicle
Select topology and Strut widths and lengths so that
a) Droop is small enough
b) Minimize the metal used.
4
Assembling Systems from MNA
• Formulating Equations
– Circuit Example
– Heat Conducting Bar Example
– Struts and Joints Example
• Modified Nodal Analysis Stamping Procedure
– Nodal Analysis (NA)
– Modified Nodal Analysis (MNA)
• From MNA to State Space Models
– e.g. circuits
– e.g. struts and joints
5
First Step - Analysis Tools
Lamp
Cache ALU
+3.
3
v
Droop
Decode
r
Given the topology and metal widths & lengths determine
a) the voltage across the ALU, Cache and Decoder
b) the temperature distribution in the engine block
c) the droop of the space frame under load.
6
Modeling VLSI circuit Power Distribution
+
3.3 v
Cache
ALU
Decoder
• Power supply provide current at a certain voltage.
• Functional blocks draw current.
• The wire resistance generates losses.
7
Supply becomes
Modeling the
Circuit
A Voltage Source
+
Power supply
I
current
V
+ Vs
V  Vs
+ Voltage
Physical
Symbol
Current element
Constitutive
Equation
8
Functional blocks become
Modeling the
Circuit
Current Sources
+
ALU
Physical
Symbol
V
-
I
Is
Circuit Element
I  Is
Constitutive
Equation
9
Metal lines become
Modeling the
Circuit
Resistors
I
Physical Symbol
+
V
-
IR  V  0
Circuit model
Constitutive Equation
(Ohm’s Law)
Length
R
 resistivity
Area
Design
Parameters
Material
Property
10
Modeling VLSI
Power Distribution
IALU
IC
Cache
Putting it all together
ID
ALU
Decoder
+
-
• Power Supply
voltage source
• Functional Blocks
current sources
• Wires become resistors
Result is a schematic
11
Formulating Equations Circuit Example
from Schematics
Step 1: Identifying
Unknowns
1
0
2
is1
is 2
is 3
3
4
Assign each node a voltage, with one node as 0
12
Formulating Equations Circuit Example
from Schematics
Step 1: Identifying
Unknowns
i5
i2
1
0
i1
is1
2
is 3
is 2
3
i4
4
i3
Assign each element a current
13
Formulating Equations Circuit Example
Step 2:
from Schematics
Conservation Laws
i5
i1  i 5  i 4  0
i2
1
0
i1
2
is 2  is 3  i 2  i 5  0
is1  i1  i 2  0
is1
is 3
is 2
3
i4
4
i 4  is1  is 2  i 3  0
i3
i 3  is3  0
Sum of currents = 0 (Kirchoff’s current law)
14
Formulating Equations Circuit Example
from Schematics
Step 3:
Constitutive Equations
R5 i 5  0  V 2
0
R1
R5
1
R2
2
R2 i 2  V 1  V 2
R1 i1  0  V 1
R4
R3
3
R4 i 4  V 4  0
4
R3 i 3  V 3  V 4
Use Constitutive Equations to relate branch
currents to node voltages
15
Assembling Systems from MNA
• Formulating Equations
– Circuit Example
– Heat Conducting Bar Example
– Struts and Joints Example
• Modified Nodal Analysis Stamping Procedure
– Nodal Analysis (NA)
– Modified Nodal Analysis (MNA)
• From MNA to State Space Models
– e.g. circuits
– e.g. struts and joints
16
Heat Conducting Bar
Demonstration
Example
lamp power  u  t 
Lamp
T0  0
Input of
Interest
Tend
Output of
Interest
17
Conservation Laws and
Constitutive Equations
Heat Flow
1-D Example
Incoming Heat
T (1)
T (0)
Near End
Temperature
Unit Length Rod
Far End
Temperature
Question: What is the temperature distribution along the bar
T
T (0)
T (1)
x
18
Conservation Laws and
Constitutive Equations
Heat Flow
Discrete Representation
1) Cut the bar into short sections
2) Assign each cut a temperature
T (1)
T (0)
T1
T2
TN 1 TN
19
Conservation Laws and
Constitutive Equations
Heat Flow
Constitutive Relation
Heat Flow through one section
x
Ti
Ti 1 hi 1,i
hi 1,i
Ti 1  Ti
 heat flow  
x
1
Rthermal
Ti


x
hi 1,i
Ti 1
20
Conservation Laws and
Constitutive Equations
Heat Flow
Conservation Law
Net Heat Flow into Control Volume = 0
~
hi 1,i  hi ,i 1  hs x
~
Incoming Heat (hs )
“control volume”
Ti 1 hi ,i 1
Ti
Heat in
from left
Heat out
from right
Incoming
heat per
unit length
hi 1,i Ti 1
x
21
Conservation Laws and
Constitutive Equations
Heat Flow
Circuit Analogy
Temperature analogous to Voltage
Heat Flow analogous to Current
1 

R

x
T1
+
-
vs  T (0)
~
is  hs x
TN
+
-
vs  T (1)
22
Assembling Systems from MNA
• Formulating Equations
– Circuit Example
– Heat Conducting Bar Example
– Struts and Joints Example
• Modified Nodal Analysis Stamping Procedure
– Nodal Analysis (NA)
– Modified Nodal Analysis (MNA)
• From MNA to State Space Models
– e.g. circuits
– e.g. struts and joints
23
Application
Problems
Oscillations in a Space
Frame
• What is the oscillation amplitude?
24
Application
Problems
Oscillations in a Space
Frame
Simplified Structure
Bolts
Struts
Ground
Example Simplified for Illustration
Load
Application
Problems
Oscillations in a Space
Frame
Modeling with Struts, Joints and
Point Masses
Point Mass
Strut
Constructing the Model
• Replace Metal Beams with Struts.
• Replace cargo with point mass.
1:20
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
27
Strut Example To Demonstrate
Sign convention
Two Struts Aligned with the X axis
f1
f2
x1 , y1  0
fL
x2 , y2  0
Constitutive Equations
 * r *  r
* 
f   *   L0  r  r
r r


r  ( x, y )
*
r  ( x* , y * )

x1  0
f1x 
  L0  x1  0 
x1  0
x1  x2
f2 x 
  L0  x1  x2 
x1  x2
28
Strut Example To Demonstrate
Sign convention
Two Struts Aligned with the X axis
Reduced (Nodal) Equations
f1x  f 2 x  0
x1
x1  x2
  L0  x1  
  L0  x1  x2   0
x1
x1  x2
f2 x
 f2x  fL  0
x1  x2

  L0  x1  x2   f L  0
x1  x2
 f2 x
29
Strut Example To Demonstrate
Sign convention
Two Struts Aligned with the X axis
f1
f2
x1 , y1  0
e.g.
fL
x2 , y2  0

f L  10 eˆ1 (force in positive x direction)
Solution of Nodal Equations
x1  L0 
10

x2  x1  L0 
10

30
Strut Example To Demonstrate
Sign convention
Two Struts Aligned with the X axis
f1
f2
x1 , y1  0
fL
x2 , y2  0
Notice the signs of the forces
f 2 x  10 (force in positive x direction)
f1x  10 (force in negative x direction)
31
Formulating Equations
from Schematics
Step 1: Identifying
Unknowns
x1 , y1 
Y
Struts Example
x2 , y2 
X
0, 0
1, 0
hinged
Assign each joint an X,Y position, with one
joint as zero.
32
Formulating Equations
from Schematics
f
*
A, x
, f A*, y

f
*
C,x
, f C*, y
f
*
B, x
Struts Example
Step 1: Identifying
Unknowns

, f B*, y
 f
*
D, x
, f D*, y

f load
Assign each strut an X and Y force component.
33
Formulating Equations
from Schematics
f A*, x  f B*, x  f C*, x  0
f A*, y  f B*, y  f C*, y  0
f
*
A, x
,f
*
A, y

f
*
C,x
, f C*, y
f
*
B, x

,f
Struts Example
Step 2:
Conservation Laws
 f C*, x  f D*, x  f load, x  0
*
B, y
 f
*
D, x
, f D*, y

 f C*, y  f D*, y  f load, y  0
f load
0,0
1,0
Force Equilibrium
Sum of X-directed forces at a joint = 0
Sum of Y-directed forces at a joint = 0
34
Formulating Equations
from Schematics
f
*
A, x
x
 1  LA, 0  LA 
LA
f A*, y 
0
y1
 LA, 0  LA 
LA
Struts Example
Step 3:
Constitutive Equations
f C*, x 
x2  x1   L

 y2  y1   L
x1 , y1  f
*
C,y
1
LC
C ,0
LC
C ,0
 LC 
 LC 
x2 , y2 
2
f B*, x 
x1
 LB , 0  LB 
LB
f B*, y 
y1
 LB , 0  LB 
LB

fload
f D*, x 
 x2
 LD , 0  LD 
LD
f D*, y 
 y2
 LD , 0  LD 
LD
1,0
Use Constitutive Equations to relate strut forces
to joint positions.
Formulating Equations from
Schematics
Vi 1
RA
Vi 1
RB
Vi
iA
iB
is
Comparing
Conservation Laws
i A  iB  is  0
Incoming Heat (~
hs )
~
 hi ,i 1  hi 1,i  hs x  0
Ti 1 hi ,i 1
Ti
hi 1,i Ti 1
x

fL
B
* * 
f A  fB  fL  0
36
Summary of key
points
Two Types of Unknowns
Circuit - Node voltages, element currents
Struts - Joint positions, strut forces
Bar – Node Temperatures, heat flows
Two Types of Equations
Conservation/Balance Laws
Circuit - Sum of Currents at each node = 0
Struts - Sum of Forces at each joint = 0
Bar - Sum of heat flows into control volume = 0
Constitutive Equation
Circuit – current-voltage relationship
Struts - force-displacement relationship
Bar - temperature drop-heat flow relationship
37
Assembling Systems from MNA
• Formulating Equations
– Heat Conducting Bar Example
– Circuit Example
– Struts and Joints Example
• Modified Nodal Analysis Stamping Procedure
– Nodal Analysis (NA)
– Modified Nodal Analysis (MNA)
• From MNA to State Space Models
– e.g. circuits
– e.g. struts and joints
38
Generating Matrices
Nodal Formulation
is1 
Circuit Example
1
1
V1  (V1  V2 )  0
R1
R2
R5
V1
0
R1
is 1
R4 V 4
is1  is2 
V2
is2  is3 
1
1
(V2  V1 )  V2  0
R2
R5
R2
is 2
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 !
39
Generating Matrices
Nodal Formulation
i5
0
i1
i
R5
V1
R1
V2
R2
is 3
i2
is1
is 2
4 R4
R3
i3
V4






1
1

R1 R 2
1

R2

1
R2
1
1

R 2 R5 1
R3
1

R3
G
Circuit Example

1
R3
1
R3




1

R
4
One row per node, one
column per node.
For each resistor
n1
R
n2
V3
v1 
 is1
v 
i
 2    s2 is3
v3 
 is3
 

v4 
 is1is2






Is
40
Nodal Formulation
Generating Matrices
Circuit Example
Nodal Matrix Generation Algorithm
1
G (n1, n1)  G (n1, n1) 
R
1
G (n1, n2)  G (n1, n2) 
R
1
G (n 2, n1)  G (n 2, n1) 
R
41
Sparse Matrices
Applications
Space Frame
Nodal Matrix
Space Frame
5
3
4
2
1
7
6
9
8
X
X
X



X







X
X X
X
X X
X X
X
Unknowns : Joint positions
Equations :  forces = 0
X
X
X
X
X
X
X
X
X
X
X
X
X X
X
X X
X X
X
X X
X

X= 

X
X
X
X









X

X
X
X 



2 x 2 block
42
Nodal
Formulation
Generating Matrices
N  G Vn  Is

N
2 J
G uj  FL

2 J
(Resistor Networks)
(Struts and Joints)
43
Applications
Sparse Matrices
1
m 1
2
3
m2
m3
(m  1) (m  1)
Resistor Grid
4
m 1
m
2m
m2
Unknowns : Node Voltages
Equations :  currents = 0
44
Sparse Matrices
Nodal Formulation
Applications
Resistor Grid
Matrix non-zero locations for 100 x 10 Resistor Grid
45
Sparse Matrices
Nodal Formulation
Applications
Temperature in a cube
Temperature known on surface, determine interior temperature
m2  1
m2  2
Circuit
Model
1
m 1
2
m2
46
Assembling Systems from MNA
• Formulating Equations
– Heat Conducting Bar Example
– Circuit Example
– Struts and Joints Example
• Modified Nodal Analysis Stamping Procedure
– Nodal Analysis (NA)
– Modified Nodal Analysis (MNA)
• From MNA to State Space Models
– e.g. circuits
– e.g. struts and joints
47
Nodal
Formulation
i5
5
Vs
i6
R1
R2
Can form Node-Branch
Constitutive Equation
with Voltage Sources
2
i2
R4
i3
0
i4
1  1
R R1
 R



1
Voltage Source
R5
1
i1
+
Problem Element
2
2
R3
3
4
1

R2
1
1

R 2 R5 1
R3
1

R3
  v1 
 is  VR
 v 

V
2

  is2 is3 R

1

  v3 
 i
R
s3
1
1 



R R  v4 
 is is
s
1
1
s
5
3
3
4
1
2






48
Problem Element
Nodal
Formulation
Rigid rod

r  ( x, y )
Rigid Rod
*
r  ( x* , y * )
 * r *  r
* 
f   *   L0  r  r
r r

x
*

2

 x  ( y *  y) 2  Lfixed
constitute
equation
The constitute equation does not contain forces!
49
Assembling Systems from MNA
• Formulating Equations
– Heat Conducting Bar Example
– Circuit Example
– Struts and Joints Example
• Modified Nodal Analysis Stamping Procedure
– Nodal Analysis (NA)
– Modified Nodal Analysis (MNA)
• From MNA to State Space Models
– e.g. circuits
– e.g. struts and joints
50
State-Space Models
• Linear system of ordinary differential equations
(ABCDE form)
State
Input
dx
 Ax(t )  Bu (t )
E
dt
Output
y (t )  Cx(t )  Du (t )
51
State-Space Model Example:
Interconnect Segment
• Step 1: Identify internal state variables
– Example : MNA uses node voltages & inductor current
v1
v2
v3
IL
52
State-Space Model Example:
Interconnect Segment
• Step 2: Identify inputs & outputs
– Example : For Z-parameter representation, choose port
currents inputs and port voltage outputs
v1
I1in

v1out

v2
v3
IL

v2out
I 2in

v1out  v1
v2out  v3
53
State-Space Model Example:
Interconnect Segment
• Step 3: Write state-space & I/O equations
– Example : KCL + inductor equation
dv1 v1  v2
C

 I1in  0
dt
R
I1in

v1out
v2  v1
 IL  0
R
IL

v2out


dI L
L
 v2  v3
dt
dv3
C
 I L  I 2in  0
dt
I 2in
v1out  v1
v2out  v3
54
State-Space Model Example:
Interconnect Segment
• Step 4: Identify state variables & matrices
 v1 
v 
2

x
 v3 
I 
 L
u
1
 I in

 2
 I in 
C

0
E
C



y
v1out 
 out 
 v2 




L 
 1 1

 R

R
 1

1
1
A   
 R R


1




1 1
1
0
B
0
0

0
1 0
C

0
0 0

1
0

D
0
0
0 0
1 0
0
0
55
State-Space Model:
circuits more in general
 iL (t ) 
 : 
x(t )  
c (t )
 : 


y (t )
LARGE!
dx
E
 Ax(t )  Bu (t )
dt
T
y (t )  c x(t )
KCL/KVL
u (t )
56
Assembling Systems from MNA
• Formulating Equations
– Heat Conducting Bar Example
– Circuit Example
– Struts and Joints Example
• Modified Nodal Analysis Stamping Procedure
– Nodal Analysis (NA)
– Modified Nodal Analysis (MNA)
• From MNA to State Space Models
– e.g. circuits
– e.g. struts and joints
57
Application
Problems
y  y0  u
Struts, Joints and point
mass example
A 2x2 Example
Constitutive
Equations
fs
fm
y  y0 EAc
f s  E Ac 

u
y0
y0
Conservation
Law
fs  fm  0
d 2u
fm  M 2
dt
Define v as velocity (du/dt) to yield a 2x2 System
M
0

 dv  
EAc 
0   dt  0 
v 

y0  
 

 u 
1   du 
0 
 dt  1
58 1:39
Summary MNA formulations
• Formulating Equations
– Heat Conducting Bar Example
– Circuit Example
– Struts and Joints Example
• Modified Nodal Analysis Stamping Procedure
– Nodal Analysis (NA)
– Modified Nodal Analysis (MNA)
• From MNA to State Space Models
– e.g. circuits
– e.g. struts and joints
59