Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Plexim GmbH
Outline
Variable-step simulation
Ideal switches
Piecewise linear simulation
Non-stiff, stiff solvers
Stability domain
Event detection
2
Different Degrees of Simulation Detail
1. Power circuit modeled as linear transfer function
Small signal behavior
No switching, no harmonics
! Controller design
2. Power circuit modeled with ideal components
Large signal behavior, voltage and current waveforms
Overall system performance
! Circuit design and controller verification
3. Power circuit with manufacturer specific components
Parasitic effects (magnetic hysteresis)
Switching transitions (diode reverse recovery)
Component stress (electrical or thermal) Power input Power output
Power Load
!! Choice of components vi ii converter io vo
Control
signals Measurement
Controller Reference
4
High Speed Simulations with Ideal Switches
Simulation steps:
1160 " 153
Computation time:
0.6s " 0.08s
6
State Space Model: Buck Converter
Transistor conducts
Diode blocks
8
Variable Time-Step Simulation: Buck Converter
Transistor opens
Impulsive voltage across
inductor
10
Variable Time-Step Simulation: Buck Converter
Transistor open
Diode conducts
11
12
Variable Time-Step Simulation: Buck Converter
Zero-Crossing Detection:
Time-step is reduced
Diode opens exactly at
the zero-crossing
13
y
u
B A C
Switch manager
D
g
PLECS S-function
14
Solver Overview
Continuous solvers
Taylor series polynomial
Step size control
Acceptable error
Relative, absolute tolerance
Output refining
Discrete solvers
Trapezoidal rule
Step size selection
15
Approximate a continuous
function with a higher order 1st order
polynomial
The higher the order, the 5th order
16
Continuous Solver Operation
'()" !&#$%
!"#$% '(
*( *()"
$
$( $()"
17
Solver Settings
18
Acceptable Error
Local error
Difference between 4th and 5th order solutions
Acceptable error
Defines the local error limit
Determined by tolrel except for small state values
19
20
Tolerances
Relative tolerance
Determines acceptable error limit when x > 0
Start with 10-3 (0.1%)
Numerical limit is 10-16
Absolute tolerance
Best to set to auto
21
Example LC circuit
Analytical solution:
22
Example LC circuit
Analytical solution:
23
24
Solver Families
Non-stiff
Inherently more efficient (no iteration required)
Smaller stability domain
Forward Euler - 1st order
ode45/Dopri - 5th order
Stiff
Less efficient (iteration required)
Larger stability domain
Backward Euler - 1st order
Radau/ode23tb - 5th order
25
Forward Euler
Explicit integration
algorithm
26
Numerical Experiment
Scalar system
Analytical solution
Forward Euler
27
Stability Analysis
Analytical solution
Analytically stable if
28
Stability Domain of Forward Euler
Integration algorithm
29
30
Floating Point Arithmetic
0.299999999999999989
- 0.200000000000000011
- 0.100000000000000006
= -0.000000000000000028
31
+ b
+ c
= a+b+c
32
Backward Euler
Implicit integration
algorithm
33
Scalar system
Analytical solution
Backward Euler
34
Stability Domain of Backward Euler
Integration algorithm
35
Stability Domain
Dopri
Tustin
Radau
36
Higher Order Integration Methods
37
Event Detection
38
Missed Events - Problem
B
0
Output
39
B
0
1
Output
40
PWM Generation
41
Trapezoidal Rule
"&'(
"&
"#$%
!
$
$& $&'(
42
Time Step Selection
43
Simulated current
Discrete: ts = 50μs
44
Conclusion
45
Plexim GmbH
46
Introduction
The problem
Large simulation models can become slow
Many states, detailed component models
Speeding up the simulation
Model simplification
Model tuning
Real-time accelerator
Averaged modeling
Efficient PWM generation
Example - Three phase inverter
47
48
Diode PV Cell Model
Reference:
49
Simplified implementation
Voltage-controlled current source
Capacitor included to add a state and avoid an algebraic
loop
Precalculated PV data
50
Model Tuning
Simulation settings.
Choose the correct solver.
Blockset Standalone
Non-stiff ode45 Dopri
Stiff ode23tb/ode15s Radau
51
52
Averaged Converter Modeling
53
54
Inverter Leg
d.T
Vdc
d.Vdc
ia
d.ia
d=0.3
55
56
Averaged Inverter Model
57
58
Overmodulation
Reference: Vector Control of a Double-Sided PWM Converter and Induction Machine Drive, R. Ottersten
59
Algebraic Loops
What?
Multiple direct feedthrough blocks connected in a loop.
PLECS continuous inputs appear as a direct feedthrough system to
Simulink.
In feedback control systems, this will cause an algebraic loop.
Problem: Algebraic loops must be solved iteratively
The simulation time of each step is increased
60
Breaking Algebraic Loops
61
62
Simplification of Current Controlled Converters
63
64
Example - Three Phase Boost Rectifier
Control aims
Sinusoidal input currents
Regulated dc bus voltage
65
Block Diagram
PWM
•Stiff system
•Simulated for 0.2 s in PLECS Blockset & Standalone
66
Results - PLECS Blockset
Controls in Simulink
67
68
Conclusion
69
Plexim GmbH
70
Why Thermal Simulation?
71
Passive components
Resistive power loss: ploss(t) = vR(t) iR(t)
Loads e.g. break resistors
Filters
Winding resistance
Power semiconductors
Conduction loss
Switching loss
72
Semiconductor Losses
Gate signal
Switching loss
Conduction loss
73
Switching Losses
74
Example IGCT Turn-off: Varying Stray Inductance
kV kA
4.5 300 nH (10.5 Ws) 3.0
VPK = 3800V 800 nH (12 Ws)
1500 nH (13.5 Ws)
3.0 2.0
VDC = 2 kV
1.5 1.0
TJ = 125°C
0.0 0.0
5 10 15 µs
Courtesy ABB tf ! 2.5µs, ttail ! 7µs
75
76
Lookup Table Approach for Switching Losses
77
78
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 loss
Negligible - low leakage current
79
80
Combined Electrical-Thermal Simulation
81
!!
!!
!!
!" !! !! #
82
Verification of Lookup Table Approach
83
Simulation results
"t = 1.4℃
"t = 1.4℃
Experimental results
84
A combined electrical-thermal model
85
Thermal Domain
86
A complete electrical-thermal model
87
Heatsink
Dual IGBT
module
88
Different Thermal Equivalent Networks
89
90
Foster Network Pitfalls
Reference: M. März and P. Nance, “Thermal modeling of power electronic systems,” www.iisb.fraunhofer.de
91
92
Solution 2 - Use a Constant-Temperature Heatsink
Set Cheatsink to 0
Set heatsink temperature with a const temperature source
Foster network can be used for junction thermal impedance
93
Concept
Calculate total switching
and conduction energy lost
during a sw cycle
Output as an average
power pulse during the
next cycle
Implementation
Based on a C-Script block
Conduction and switching losses measure with a Probe
94
Challenge: Large Thermal Time Constants
Example
95
Iterative solution
96
Newton Raphson: Convergence
97
98
Thermal Loss Feedback 1
P1,Pi=100W Po=100W
P2=95W
Efficiency:
99
Efficiency:
100
Thermal Loss Feedback 3
Thermal feedback:
Efficiency:
101
102
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)
103
Conclusion
104
Advanced PLECS Tools
Plexim GmbH
105
Advanced Tools
C-Script block
Control design tools
Steady-state analysis
AC sweep
Impulse response analysis
Loop gain analysis
Other
Subsystem - custom components
106
Small Signal Analysis Tools
Gain/phase
margins met?
107
Frequency Sweep
Algorithm:
For each frequency:
1. Run steady-state analysis
2. Apply sinusoidal perturbation
3. Extract system response using Fourier analysis
Caveats:
Period length: least common multiple of system period and
perturbation period
Computationally expensive
108
Impulse Response Analysis
Impulse response
of a buck converter
Transfer function:
109
110
Buck Converter: Transfer Function
111
Stability Verification
Loop Gain
Use Loop Gain Analysis Tool (Blockset)
AC Sweep (Standalone), or
Calculate using plbode function
Measure gain and phase margins to check stability
112
Custom Components
Why?
Support the top-down design approach
Easy to reuse, configure and measure
Custom component features
Formed using the subsystem
User defined parameter, icon, initialisation commands and
probe signals
! All machines in PLECS are custom components
113
3.5
2.5
Current (A)
0
1
0.5
5 0
0 15 10
25 20
Insolation (kW/m2)
Voltage (V)
114
Masked Subsystem Implementation
115
C-script Block
Plexim GmbH
116
What can it do?
117
118
Function calls in C-script block
Main loop
Always executed
Output() called at least once
Update() called after Output if discrete state variables exist
Integration loop
Executed if continuous states defined in settings
Used for solving continuous differential equations
Continuous states used for declaring DEs
Event detection loop
Executed if a zero crossing signal defined in settings
For detecting the exact instant of a discontinuity
119
120
Code editor window
121
Discrete
Value: +ve
Fixed sample time
Continuous
Value: 0
Inherited from solver
Variable
Value: -2
At each time step the NextSampleHit must be specified.
122
Hybrid fixed and variable step setting
123
124
Macros
125
126
Control Strategy
127
C-script block2
C-script block1
128
Efficient sequence generation
129
130
Efficient state machine implementation
Event driven
Useful for controller mode sequencing.
Example: Startup, overload, shutdown.
Relational operator
- generates major step
if (IsMajorStep)
test_input(v1,i1);
update_state_machine();
131
Conclusion
132