Title: VTB Model Builder Automatic Code Generation Tool
1VTB Model BuilderAutomatic Code Generation Tool
Jimena Bastos
2Topics
- RCM method
- Automatically building a RCM-based model
- New elements
- Input data types
- Model generation process
- Future trends
3The RCM method
- Device Definition
- Number of terminals
- Across variable
- Through variable
- Dynamic Equations for each terminal and internal
node
Either linear or non-linear
- Time discretization
- Mapping to a DC network
4Automatically building a RCM-model
- Desired design automation using RCM-based models.
Parameters
Terminals
Viewables
Model Name
Model Equations
Model DLL
Tool Model builder
Input
Output
5New elements
- Porting to the new VTB model format
- The description is fully embedded in the text
file (better project management) - Possibility of applying Transfer Function
description in Signal Coupling
6Input data types
- Circuit description
- Transfer Function (frequency domain)
- Set of first-order linear differential equations
- Set of first-order non-linear differential
equations
7Circuit description
- The model equations are mapped by the user to a
DC network provided a set of basic components. - Using SPICE-like circuit description, the user
writes the input .VTM file.
Resistance, Inductance, Capacitor Ideal Current
and Voltage Source Linear Controlled Sources
(VCVS, CCVS, VCCS, CCCS)
Differential Equations
VTM file
8An Example of Application
- The 3-phase induction motor
a11 (RsLr RrM2/Lr)/det L a31 MRr/Lr a13
M(Rr/Lr)/det L a33 Rr/Lr a14 ?M/det
L a34 ? det L LsLr M2 a42 a31 a22
a11 a43 a34 a23 a14 a44 a33 a24 a13
System of 5 dynamic equations
9Mapping equations to a DC circuit
pij are the elements of the Park Matrix
yij are the elements of the Inv. Park Matrix
10VTM file
- Accepts symbolic variables.
- Specifies model name, parameter and viewable
names, number of terminals (thus, number of
internal nodes)
11Using the tool for this example
Loads IndMotor3ph4.vtm
Loads Icon.hex Creates Conductance Matrix Creates
Through Vector
Generates IndMotor3ph.cpp Generates IndMotor3ph.h
Releases Model IndMotor3ph.vtm For VTB Library
12(No Transcript)
13Input data types
- Circuit description
- Transfer Function (frequency domain)
- Set of first-order linear differential equations
- Set of first-order non-linear differential
equations
The rest of the cases need an additional
step Map the equations to a circuit If we are
able to do this, we can create a .VTM Input file
from it (SPICE-like description)
14Transfer Function
- Behavioral modeling in the frequency domain
(Laplace Transform H(s)). - Map the TF to equivalent circuit structure.
- Generate .VTM Input File
15Block Diagram
Y(s)
bn-1
bn-2
b1
b0
Eout
U(s)
1/s
1/s
1/s
1/s
-
-
-
-
an-1
an-2
a1
a0
16TF equivalent circuit structure
(n3) nodes, n order of characteristic equation.
INPUT
1
3
Eout
U(t)
U(t)
-a0x1
-a1x2
-an-1xn
Rin
Rs 1
VCCS
OUTPUT
2
Y(t)
bmxn
bm-1xn-1
-b0x1
-b1x2
Rout 1
17TF equivalent circuit structure(cont)
xi
xi1
INTEGRATOR BLOCK
1/s
xn
x1
4
n3
Eout
Rn
Cn
x2
R1
C1
Ri 1 T? Ci 1 F
18Linear ODE
VTM file
19Non linear ODE
Taylor series
VTM file
20Model Generation Process
Input Data type?
Map to circuit
Circuit Description
Load .VTM Input File
Create icon using VIE
Load icon.hex
Create Conductance Matrix G And Through Vector B
Generate C Code
Compile C code
Release VTB Library object .vtm
21Future trends
- Enrich the list of available components
- Include non linear components (this is already
partly possible) - Include components with implicit characteristic.