Upload
vovi-phap-danh
View
159
Download
11
Tags:
Embed Size (px)
DESCRIPTION
http://ieeexplore.ieee.org/xpl/articleDetails.jsp?tp=&arnumber=6143372&queryText%3DZigBee+for+building+control
Citation preview
4/22/2013
1
electrical engineering software
An Introduction to
2
An Introduction to PLECS
Introducing Plexim
Key Features of PLECS
Modeling, Simulation and the Operation of PLECS
Thermal modeling
Special Features of PLECS
Solvers
Introducing PLEXIM
3 4
WHO IS PLEXIM?
Independent company
Spin-off from ETH Zurich
Privately owned by founders
Software PLECS sold since December 2002
Now in Release 3.2 September 2011
PLECS Blockset or PLECS Standalone
Customers in more than 40 countries
4/22/2013
2
5
Automation & Drives:Danfoss
Hilti
Rockwell
Woodward SEG
Electronics :Infineon
Panasonic
Philips
Tyco
SOME OF OUR CUSTOMERS TODAY
Aerospace: GoodrichSaabGE AviationUS Air Force
Automotive : Bosch
Chrysler
Opel
Skoda
High Power : ABB
Bombardier
GE Energy
Siemens
Academia : Aachen
Aalborg
Nottingham
Virginia Tech
Key Features of PLECS
6
KEY FEATURES OF PLECS
Fast and efficient simulation
Simple to use
Open component library
Accurate thermal modeling
The PLECS Scope
The two versions of PLECS:
PLECS Blockset
PLECS Standalone
Analysis tools
7 8
FAST AND EFFICIENT SIMULATION
Instantaneous switching
4/22/2013
3
9
SIMPLE TO USE
Drag and drop components
10
OPEN COMPONENT LIBRARY
Models are open for customization
11
THERMAL MODELING
Look-up table approach for speed
12
PLECS SCOPE
DTC_scope.plecs
CursorsRMS, Mean, Max, Min, Absolute MaxDelta,
THD, Fourier AnalysisX-Y plotExport to .bmp, .pdf, .csvCopy to Clipboard: Traces and Data
4/22/2013
4
13
PLECS SCOPE – Curve Tracer
X-Y Plot of Solar PanelPV_model_1.plecs
PV_model_2.plecs
Current characteristic of a single BP365 PV module.
Plot of 22 series-connected BP365 PV modules
14
PLECS BLOCKSET/STANDALONE
Available as Standalone or as a toolbox in Simulink
15
PLECS STANDALONE
An independent simulation tool.
Compatible with PLECS blockset
Key Features:
Control and circuit components
Faster simulation thanks to an optimized solver
Lower overall investment and maintenance cost
Faster than PLECS Blockset!
16
IMPORT FROM BLOCKSET INTO STANDALONE
Blockset Standalone
4/22/2013
5
17
IMPORT FROM BLOCKSET INTO STANDALONE
Blockset Standalone
18
EXPORT FROM BLOCKSET INTO STANDALONE
BlocksetStandalone
19
BLOCKSET AND STANDALONE MODEL COMPATIBILITY
MATLAB/Simulink
Standalone
PLECSControl blocksCircuit editor
Scope
PLECSSolver
Analysis tools and Script editor
PLECSControl blocksCircuit editor
Scope
Simulink Solver &Control blocks
Analysis tools and M/L Script editor
Blockset
Modeling, Simulation and the Operation of PLECS
20
4/22/2013
6
MODELING, SIMULATION AND THE OPERATION OF PLECS
Modeling, Simulation, Emulation
The Challenges and the Different Simulation Types
Ideal Switches
Basic Solver Types
Basic PLECS Operation
Behavioral Models in PLECS
21 22
FAILURE TO DO QUALIFIED SYSTEM MODELING ...
... results in tragedy
correct modeling
correct simulation
system
thermal
behavioral
(Thorough real-time controls testing (HIL))
23
MODELING VERSUS SIMULATION
ModelingFind essential functionality of target system
Describe components as simple as possible(model component details only as needed at this stage)
Enter the design using the modeling language
SimulationTransforming the model into mathematical equations
Solving the equations with specified tolerances
Providing numerical results
The accuracy of the simulation results depend on th e model
userP
LEC
S
24
CHALLENGES WITH NUMERICAL SIMULATION
Power semiconductors introduce extreme non-linearit yprogram must be able to handle switching
Time constants differ by several orders of magnitud ee.g. in electrical drives
small simulation time steps
long simulation times
Accurate models are not always availablee.g. semiconductor devices, magnetic components
behavioral models with sufficient accuracy are required
Controller modeled along with electrical circuite.g. digital control
mixed signal simulation
4/22/2013
7
25
DIFFERENT DEGREES OF SIMULATION DETAIL
Power circuit modeled as linear transfer functionsmall signal behavior
no switching, no harmonics
controller design
Power circuit modeled with ideal componentslarge signal behavior, voltage and current waveforms
overall system performance
circuit design and controller verification
Power circuit with manufacturer specific componentsparasitic effects (magnetic hysteresis)
switching transitions (diode reverse recovery)
component stress (electrical or thermal)
choice of componentsPower
converter
Controller
LoadPower input Power output
Controlsignals
Reference
Measurement
vi ii iovo
Heat
26
DIFFERENT DEGREES OF SIMULATION DETAIL
Controls
Circuit
Component
PLE
CS
Sta
ndal
one
Sab
er &
Spi
ce
Psi
m
Sim
plor
er
PLE
CS
Blo
ckse
t& S
imul
ink
27
HIGH SPEED SIMULATIONS WITH IDEAL SWITCHES
Conventional continuous diode modearbitrary static and dynamic characteristic
snubber often required
Ideal diode model in PLECSinstantaneous on/off characteristic
optional on-resistance and forward voltage
28
COMPARISON: DIODE RECTIFIER
Simulation with conventional and ideal switches
Simulation steps:1160 → 153
Computation time:0.6s → 0.08s
4/22/2013
8
29
STATE SPACE MODEL: BUCK CONVERTER
Switch conducting Diode conducting
30
OPERATING PRINCIPLE OF PLECS
Circuit transformed into state-variable system
One set of matrices per switch combination
31
VARIABLE VS FIXED TIME-STEP SIMULATION
Variable Time-Stephighest accuracy
time-step automatically adapted to time constants
can get slow for systems with many independently operating switches
Fixed Time-Stepcan speed up simulation for large systems
hardware controls are often implemented in fixed time-step
non-sampled switching events (diodes, thyristors) require special handling
32
VARIABLE TIME-STEP SIMULATION: BUCK CONVERTER
Transistor conducts
Diode blocks
4/22/2013
9
33
VARIABLE TIME-STEP SIMULATION: BUCK CONVERTER
Transistor opens
Impulsive voltage across inductor
34
VARIABLE TIME-STEP SIMULATION: BUCK CONVERTER
Impulsive voltage closes diode
35
VARIABLE TIME-STEP SIMULATION: BUCK CONVERTER
36
VARIABLE TIME-STEP SIMULATION: BUCK CONVERTER
Switch timing Problem:
diode opens too late
impulsive voltage across inductor
4/22/2013
10
37
VARIABLE TIME-STEP SIMULATION: BUCK CONVERTER
35
Zero-crossing detection:
Time-step is reduced
Diode opens at the zero-crossing
38
HANDLING OF NON-SAMPLED SWITCHING EVENTS
Dio
de c
urre
nts
Dio
de v
olta
ge
Forward step
Non-sampledzero-crossing
Forward step
Non-sampledzero-crossing
Backward interpolationDiode 3 starts conducting
Forward stepBackward interpolation,sync. with sample time
Non-sampledzero-crossing
Forward stepBackward interpolation,Diode 2 stops conducting
Non-sampledzero-crossing
Forward stepBackward interpolation,sync. with sample time
39
DIFFERENT DIODE MODELS IN PLECS
Diode turn-off
40
DYNAMIC DIODE MODEL WITH REVERSE RECOVERY
Reverse recovery effect under different blocking co nditions
4/22/2013
11
41
DYNAMIC IGBT MODEL WITH FINITE DI/DT DIFFERENT LEVELS OF SIMULATION
System simulationwaveforms resolved up to switching frequency
response times, controller behaviour
dead times, currents and voltages (peak, RMS etc)
harmonic content (Fourier, THD)
Thermal simulationefficiency, junction & heat-sink temperatures
semiconductor cooling, average and peak temperatures,temperature cycles, choice of devices, average power dissipation
Circuit simulation (single commutation cell)waveforms resolved to transient response
stray inductances and capacitances
common-mode currents
semiconductor tail-times, recovery times, spreading times.
42
3_L_3Ph_IGCT.plecs
Clamp_Rep_Real.plecs
Thermal Modeling
43
THERMA L SIMULATIONS
Semiconductor Losses
Ideal Switches vs “Continuous” Switches
Look-up Tables
Electrical-Thermal Simulation
Thermal Equivalent Networks
Steady-State Thermal Calculations
44
4/22/2013
12
45
SEMICONDUCTOR LOSSES
Switching Loss
Conduction Loss
Gate signal
46
SWITCHING LOSSES
Switching energy loss dependent on:
blocking voltage, device current, junction temperature, gate drive
EON = f(VCE, IC, TJ, RG)
Turn on Turn off
47
EXAMPLE IGCT TURN-OFF: VARYING STRAY INDUCTANCE
Courtesy ABB
0.0
1.5
3.0
4.5kV
0.0
1.0
2.0
3.0kA
VPK = 3800V
VDC = 2 kV
TJ = 125°C
5 10 15 µs
300 nH (10.5 Ws)
800 nH (12 Ws)
1500 nH (13.5 Ws)
tf ≈ 2.5µs, ttail ≈ 7µs
48
SWITCHING LOSS CALCULATION FROM TRANSIENTS
Accurate physical device models requiredgenerally unavailable
Physical parameters often unknown during design pha se.stray inductance of buss-bars
Small simulation steps requiredlarge computation times
4/22/2013
13
49
LOOKUP TABLE APPROACH FOR SWITCHING LOSSES
Instantaneous switching maintained for speed
Switching losses are read from a database after swi tching eventEsw = F(TJ, VBLOCK, ION) (RG = constant)
50
EXAMPLE LOOK-UP TABLE
Turn-off loss is a function of:
current before switching
voltage after switching
temperature at switching
RG is assumed constant
Exact loss found using interpolation
Note the voltage and current polarities!
Only data-sheet losses used in thermal calculations
Same procedure for EON, EREC and on-state
Report generation for reliable documentation5SNA 1500E330305_report.pdf
51
SEMICONDUCTOR CONDUCTION LOSSES
On-state loss
conduction profile is nonlinear:
vON = f(iON, TJ).
conduction profile stored in lookup table
exact voltage found using interpolation
conduction power loss:
PLOSS(t) = vON(t), iON(t)
Off-state lossnegligible - low leakage current
52
SIMULATION OF AN ELECTRICAL-THERMAL MODEL
4/22/2013
14
53
SEMICONDUCTOR THERMAL BEHAVIOR
54
OBTAINING SWITCHING LOSS DATA
Experimental measurements
switching losses highly dependent on gate drive circuit and stray parameters
use a switching loss setup to characterize loss dependency on voltage and current for two temperatures
Datasheets
given for a specific gate resistance and stray inductance
good approximations can be made by extrapolating manufacturers data (or asking for complete loss measurements)
55
POINTS TO NOTE
Thermal and electrical domains not coupled
Semiconductor losses from lookup tables don’t appear in the electrical circuit
Energy conservation may be achieved with extra feedback
The only ‘legal’ way is to use datasheet values !
Measurements only represent a few devices
Datasheets represent all devices over the lifetime of the component and over its production life
Transient simulations do not represent datasheet values
Only when you design your equipment using data-shee t values can you ask for help from your supplier ! Otherwise, if you are not respecting his data-sheet he won’t be willing to discuss your problem!
56
THERMAL DOMAIN
Thermal circuit analogous to electrical circuit
Thermal and electrical circuits solved simultaneous ly
4/22/2013
15
57
A COMPLETE ELECTRICAL-THERMAL MODEL
The heat-sink is the interface between the two doma insautomatically absorbs component losses
propagates temperature back to semiconductors
Thermal impedance modeled with RC elements
58
DIFFERENT THERMAL EQUIVALENT NETWORKS
Cauer equivalent
Physics based thermal equivalent circuit
Each Rth and Cth pair represents a physical layer in the thermal circuit
Foster equivalent
Curve fitting approach based on heating and cooling characteristics
No correspondence between Rth,n or Cth,n and the physical structure!
Any modification of the system requires recalculation of all values
59
MEASURING AVERAGE DEVICE LOSSES
ConceptCalculate total switching and conduction energy lost during a switching cycle
Output as an average power pulse during the next cycleImplementation:
based on a C-Script blockconduction and switching losses measured with a Probe
60
JUNCTION-CASE THERMAL IMPEDANCE
Define in semiconductor thermal description to obse rve junction temp fluctuations
Foster coefficients usually given in data-sheet
Example junction-case thermal impedance
Foster network coefficients
4/22/2013
16
61
FOSTER NETWORK PITFALLS
Only accurate if reference point x is a constant te mperature
Cannot be arbitrarily extended beyond point x
TJ is immediately affected by temperature changes at x
62
SOLUTION 1 - USE FIRST ORDER CAUER NETWORK
Calculate τ from 63% R value
C = τ/R
VC reaches 63.2% VFINAL after τ
63
COMBINED ELECTRICAL-THERMAL SIMULATION
Semiconductor losses don’t appear in electrical circuit
Conservation of energy can be maintained by subtracting thermal losses from electrical circuit
64
Calculate average device losses for each device
CYCLE-AVERAGE LOSSES
Average device losses
Average device losses
Apply to external resistive-only thermal circuit
4/22/2013
17
65
EXAMPLE IGBT CONDUCTION LOSSES
Instantaneous loss
Cycle average loss
Moving average (20ms)
66
CALCULATING THE STEADY-STATE OPERATING POINT
Challenge: Large thermal time-constant of heat-sink - simulation can take hours!
Newton-Raphson analysis
thermal capacitances left in circuit
Jacobian matrix must first be calculated
system must be periodic and all states must converge
Cycle-average losses with resistive thermal circuit
thermal capacitances are removed
losses are averaged, TJ = constant at steady-state
system can be non-periodic and have non-convergent states
Special Features of PLECS
67
THERMAL SIMULATIONS
Control Analysis Tools
Newton-Raphson Analysis
Magnetic Modeling
Custom Control Codes
Simulation Scripting
68
4/22/2013
18
69
ANALYSIS TOOLS
Control analysis tools
AC sweep
impulse response analysis
loop gain analysis
Steady-state analysis
BuckOpenLoop.plecs
NEWTON-RAPHSON ANALYSIS
Iterative method for finding the roots of an equation y = f(x):
If x is the initial state vector and
FT(x) is the final state vector after time T,
then to find the steady-state solution we must
find the roots of f(x) = x – FT(x)
This is done iteratively in PLECS by the Newton-Raphson method:
xk+1 = xk – J-1●f(xk) where J is the “Jacobian” (determinant) of the Jacobian matrix of the n state variables
(requires n+1 simulation runs)
70
NEWTON-RAPHSON ITERATION DEMO
71
NEWTON-RAPHSON ITERATION DEMO – GUESS X1
72
4/22/2013
19
NEWTON-RAPHSON ITERATION DEMO
73
NEWTON-RAPHSON ITERATION DEMO – TANGENT AT F(X1)
74
NEWTON-RAPHSON ITERATION DEMO – X2 FROM TANGENT
75
NEWTON-RAPHSON ITERATION DEMO
76
4/22/2013
20
NEWTON-RAPHSON ITERATION DEMO - SET X2 AS NEW ROOT
77
NEWTON-RAPHSON ITERATION DEMO – TANGENT AT F(X2)
78
NEWTON-RAPHSON ITERATION DEMO – X3 FROM TANGENT
79
NEWTON-RAPHSON ITERATION DEMO
80
4/22/2013
21
NEWTON-RAPHSON ITERATION DEMO – SET X3 AS NEW ROOT
81
NEWTON-RAPHSON ITERATION DEMO - TANGENT AT F(X3)
82
NEWTON-RAPHSON ITERATION DEMO – X4 FROM TANGENT
83
NEWTON-RAPHSON ITERATION DEMO
84
4/22/2013
22
NEWTON-RAPHSON ITERATION DEMO – SET X4 AS NEW ROOT
85
NEWTON-RAPHSON ITERATION DEMO – TANGENT AT F(X4)
86
NEWTON-RAPHSON ITERATION DEMO – X5 FROM TANGENT
87
NEWTON-RAPHSON ITERATION DEMO – CONVERGENCE!
88
4/22/2013
23
89
NEWTON RAPHSON: CONVERGENCE
Typically converges in less then 10 iterations
90
NEWTON RAPHSON: REQUIREMENTS FOR CONVERGENCE
The system must be convergent
ExampleProblem:PLL model
angle is a ramp signal towards infinity
Solution:create a periodic signal with a self-resetting integrator
2-level IGBT Inverter.plecs
91
MAGNETIC MODELING
Permeance-capacitance analogy
92
CUSTOM CONTROL CODE
Custom C-code
External DLL
4/22/2013
24
93
SIMULATION SCRIPTING
Inbuilt scripting
External scripting
BuckParamSweep.plecs
Solvers
94
95
OUTLINE
What are Solvers?
Discrete Solvers
trapezoidal rule
Continuous solversTaylor series polynomial
step-size control
acceptable error
tolerances: relative and absolute
refining the display output
Step-size selection for Discrete Solvers
Solver Comparisons
Conclusions
SOLVERS
In a digital simulation, integration is numerically performed by starting with known initial conditions
A time step is taken and some assumptions are made about the way a variable changes within this time step; the algorithm for do ing this is called a “Solver”
The simplest solver is one which assumes a linear c hange of conditions within a time step; this is a reasonable assumption for a sm all step. This type is known as a “Discrete Solver” and it builds the computed functi on from a series of trapezoidal blocks
96
4/22/2013
25
97
TRAPEZOIDAL RULE FOR DISCRETE SOLVER CONTINUOUS SOLVER
We will see later that discrete solvers have limita tions with regards to speed and accuracy.
A non-linear interpolation between two points might allow a larger time step, depending on how closely the interpolating function matches the real response.
Any waveform may be emulated by the sum of a suffic ient number of simple mathematical functions (e.g. by sine waves, in the case of Fourier).
Continuous Solvers, in fact, use the Taylor Series
98
99
TAYLOR SERIES EXPANSION
To perform a piece-wise simulation with a continuou s solver requires the approximation of a continuous function with a highe r order polynomial
The higher the order, the more accurate the solutio n
The Taylor series is of the form:
100
CONTINUOUS SOLVER OPERATION
If y(t) is the (unknown) function, it can be constructed in a piece-wise fashion from (known) points p1(t) and p2(t) from Taylor series polynomials.
A continuous solver determines the point yn+1 by calculating the equivalent Taylor series for p1(t).
An n th order solver has the same accuracy as an n th order Taylor series.
4/22/2013
26
REPRESENTATION OF EXPONENTIAL BY TAYLOR SERIES
Exponential
5th order Taylor series representation
At n = 8, “perfect” fit for -3 < x < 3
101
Source: Wikipedia
REPRESENTATION OF SINE-WAVE BY TAYLOR SERIES
102
1st order3rd order5th order7th order9th order11th order13th ordery = sin(x)
For -4 < x <4, a Taylor series to the 13th order is an accurate representation of y = sin(x)
Source: Wikipedia
103
CONTINUOUS SOLVER STEP-SIZE CONTROL
Step-size is automatically controlled by the solver (variable step) goal: keep the error within acceptable limits
advantages: accuracy directly specified by the user and fewer steps (faster simulation)
Step size, h, is calculated usingwhere:
ε is relative or “local” error
tolrel is relative tolerance
hold is previous time step
104
ACCEPTABLE ERROR
Local errordifference between 4th and 5th order solutions
Acceptable errordefines the local error limit
determined by tolrel except for small state values
Acceptable errorLocal error
Result is valid if:
4/22/2013
27
hold
STEP SIZE CONTROL
Step size automatically controlled by solver (variab le step) Goal: Keep error within acceptable error limits
Key advantage: Accuracy directly specified by the user
Step size calculated usingRelative error, ε (or “local error”)
Relative tolerance, tolrel
Previous time step, hold
105 106
TOLERANCES
Relative tolerance (tol rel) determines acceptable error limit when x approach es 0start with 10-3 (0.1%)
numerical limit is 10-16
Absolute tolerance (tol abs)best to set to “auto”
107
LC CIRCUIT - SCOPE OUTPUT
Display uses linear interpolation used between time-steps
Analytical solution:
Resonant LC circuit
VC(0) = 1 V
108
LC CIRCUIT - COMPARISON WITH ANALYTICAL SOLUTION
(tolrel = 1e-3)
Solver response
Analytical response
4/22/2013
28
109
LC CIRCUIT - SOLVER OUTPUT
Resonant LC circuit
VC(0) = 1 V
Calculated points for tolrel = 1e-3
110
OPTIONS FOR A FINER DISPLAY
Option 1: Reduce tol rel or time-stepsolver must recalculate polynomial coefficients at each time step
less efficient
Option 2: Increase refine factorsolver uses existing polynomial coefficients to calculate additional points.
more efficient
111
TRAPEZOIDAL RULE FOR DISCRETE SOLVER
112
FIXED SOLVER TIME-STEP SELECTION
Accuracy is indirectly determined by the time-stepto ensure accuracy, reduce the time-step and observe any changes in the output, or:
compare with a continuous simulation
Continuous waveformhighest transient frequency determines the sample time
set tsample < ttransient/10
for a ratio of 10, the integration error is approx -3% (underestimation)
Switched system switches must be turned on at sample instants
set tsample < tsw/100
4/22/2013
29
113
COMPARISON - CONTINUOUS AND DISCRETE SOLVERS
Simulated current
Time steps:
Continuous: tolrel = 10-6
Discrete: ts = 50µs
Underdamped RLC circuit
SUMMARY
Variable solvers are in general faster and more eff icientuse the Refine Factor for smoother displays rather than reducing tolrel or time-step
tolrel is typically set to 1e-3 to start with
tolabs is best set to auto
Fixed step solversdo not require tolerance inputs (set by step-size)
Refine Factor is always one (set by step-size)
114
Conclusions
115 116
CONCLUSIONS
Fast and efficient – ideal switches
Simple to use – Drag & Drop
Open component library customization of models
Thermal modeling – Look-up tables allow direct use o f semiconductor data-sheets
Magnetic modeling
Analysis tools – fast calculation of steady state an d frequency response
Custom control code – efficient controller design
Simulation scripting – fast performance analysis
PLECS Scope – high performance, user-friendly easy w aveform and data export
PLECS Blockset & PLECS Standalone – simple model exch ange (inter-company)
4/22/2013
30
117
electrical engineering software
Southeast-Asia Authorized Agents:Infomatic Pte. Ltd.Olivier WU 吳健銘
TEL: +65 3158 2943FAX: +65 3158 2190Mobile: +65 8478 0572Email: [email protected]: www.infomatic.com.sg
Vietnam Authorized Agents:Smart Green Solutions JSC27/35 Cong Hoa Street, Ward 4, District Tan BinhHo Chi Minh City, Vietnam.TEL: +84 8 38112941FAX: +84 8 38112941Email: [email protected]: www.sgs-jsc.com