0% found this document useful (0 votes)
390 views

An Introducion of PLECS

http://ieeexplore.ieee.org/xpl/articleDetails.jsp?tp=&arnumber=6143372&queryText%3DZigBee+for+building+control

Uploaded by

VoVi Phap Danh
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
390 views

An Introducion of PLECS

http://ieeexplore.ieee.org/xpl/articleDetails.jsp?tp=&arnumber=6143372&queryText%3DZigBee+for+building+control

Uploaded by

VoVi Phap Danh
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

4/22/2013

An Introduction to PLECS
Introducing Plexim

An Introduction to

Key Features of PLECS Modeling, Simulation and the Operation of PLECS Thermal modeling Special Features of PLECS Solvers

electrical engineering software


2

WHO IS PLEXIM?
Independent company Spin-off from ETH Zurich Privately owned by founders Software PLECS sold since December 2002

Introducing PLEXIM

Now in Release 3.2 September 2011 PLECS Blockset or PLECS Standalone

Customers in more than 40 countries

4/22/2013

SOME OF OUR CUSTOMERS TODAY


Aerospace:
Goodrich Saab GE Aviation US Air Force

Academia:
Aachen Aalborg Nottingham Virginia Tech

Automation & Drives:


Danfoss Hilti Rockwell Woodward SEG

Automotive:
Bosch Chrysler Opel Skoda

Key Features of PLECS

Electronics:
Infineon Panasonic Philips Tyco
5

High Power:
ABB Bombardier GE Energy Siemens
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

FAST AND EFFICIENT SIMULATION


Instantaneous switching

Analysis tools

4/22/2013

SIMPLE TO USE
Drag and drop components

OPEN COMPONENT LIBRARY


Models are open for customization

10

THERMAL MODELING
Look-up table approach for speed

PLECS SCOPE
Cursors RMS, Mean, Max, Min, Absolute Max Delta, THD, Fourier Analysis X-Y plot Export to .bmp, .pdf, .csv Copy to Clipboard: Traces and Data

DTC_scope.plecs

11

12

4/22/2013

PLECS SCOPE Curve Tracer


X-Y Plot of Solar Panel
PV_model_1.plecs PV_model_2.plecs

PLECS BLOCKSET/STANDALONE
Available as Standalone or as a toolbox in Simulink

Current characteristic of a single BP365 PV module.

Plot of 22 series-connected BP365 PV modules

13

14

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

IMPORT FROM BLOCKSET INTO STANDALONE


Blockset Standalone

Faster than PLECS Blockset!

15

16

4/22/2013

IMPORT FROM BLOCKSET INTO STANDALONE


Blockset Standalone

EXPORT FROM BLOCKSET INTO STANDALONE


Standalone Blockset

17

18

BLOCKSET AND STANDALONE MODEL COMPATIBILITY

Blockset

Standalone

Simulink Solver & Control blocks

PLECS Solver

MATLAB/Simulink

PLECS Control blocks Circuit editor Scope

PLECS Control blocks Circuit editor Scope

Modeling, Simulation and the Operation of PLECS

Analysis tools and M/L Script editor

Analysis tools and Script editor

19

20

4/22/2013

MODELING, SIMULATION AND THE OPERATION OF PLECS


Modeling, Simulation, Emulation The Challenges and the Different Simulation Types Ideal Switches Basic Solver Types

FAILURE TO DO QUALIFIED SYSTEM MODELING ...

... results in tragedy


correct modeling correct simulation
system thermal

Basic PLECS Operation Behavioral Models in PLECS

behavioral

(Thorough real-time controls testing (HIL))

21

22

MODELING VERSUS SIMULATION


Modeling
Find 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

CHALLENGES WITH NUMERICAL SIMULATION


Power semiconductors introduce extreme non-linearity
program must be able to handle switching

user

Time constants differ by several orders of magnitude


e.g. in electrical drives small simulation time steps long simulation times

Simulation

PLECS

Transforming the model into mathematical equations Solving the equations with specified tolerances Providing numerical results

Accurate models are not always available


e.g. semiconductor devices, magnetic components behavioral models with sufficient accuracy are required

Controller modeled along with electrical circuit


e.g. digital control mixed signal simulation

The accuracy of the simulation results depend on the model

23

24

4/22/2013

DIFFERENT DEGREES OF SIMULATION DETAIL


Power circuit modeled as linear transfer function
small signal behavior no switching, no harmonics controller design

DIFFERENT DEGREES OF SIMULATION DETAIL


Controls

PLECS Blockset & Simulink

Power circuit modeled with ideal components


large signal behavior, voltage and current waveforms overall system performance circuit design and controller verification

PLECS Standalone

Power circuit with manufacturer specific components


parasitic effects (magnetic hysteresis) switching transitions (diode reverse recovery) component stress (electrical or thermal) choice of components
Power input vi ii Power converter Control signals Controller Power output vo i
o

Circuit
Heat

Load

Component

Measurement

Reference
26

25

HIGH SPEED SIMULATIONS WITH IDEAL SWITCHES


Conventional continuous diode mode
arbitrary static and dynamic characteristic snubber often required

COMPARISON: DIODE RECTIFIER


Simulation with conventional and ideal switches

Ideal diode model in PLECS


instantaneous on/off characteristic optional on-resistance and forward voltage

Simulation steps:
1160 153

Computation time:
0.6s 0.08s

27

28

Saber & Spice

Simplorer

Psim

4/22/2013

STATE SPACE MODEL: BUCK CONVERTER

OPERATING PRINCIPLE OF PLECS


Circuit transformed into state-variable system One set of matrices per switch combination

Switch conducting

Diode conducting

29

30

VARIABLE VS FIXED TIME-STEP SIMULATION


Variable Time-Step
highest accuracy time-step automatically adapted to time constants can get slow for systems with many independently operating switches

VARIABLE TIME-STEP SIMULATION: BUCK CONVERTER


Transistor conducts Diode blocks

Fixed Time-Step
can speed up simulation for large systems hardware controls are often implemented in fixed time-step non-sampled switching events (diodes, thyristors) require special handling

31

32

4/22/2013

VARIABLE TIME-STEP SIMULATION: BUCK CONVERTER


Transistor opens Impulsive voltage across inductor

VARIABLE TIME-STEP SIMULATION: BUCK CONVERTER


Impulsive voltage closes diode

33

34

VARIABLE TIME-STEP SIMULATION: BUCK CONVERTER

VARIABLE TIME-STEP SIMULATION: BUCK CONVERTER


Switch timing Problem:
diode opens too late impulsive voltage across inductor

35

36

4/22/2013

VARIABLE TIME-STEP SIMULATION: BUCK CONVERTER


Zero-crossing detection:
Time-step is reduced Diode opens at the zero-crossing

HANDLING OF NON-SAMPLED SWITCHING EVENTS


Diode currents

zero-crossing zero-crossing Backward interpolation, Forward step Backward interpolation Forward step sync. with sampleBackward time interpolation, Forward step Backward interpolation, Forward step Diode 3 starts conducting Forward step sync. with sample Diode 2 stops conducting time

Non-sampled Non-sampled

Diode voltage

Non-sampled zero-crossing

35 37

38

DIFFERENT DIODE MODELS IN PLECS


Diode turn-off

DYNAMIC DIODE MODEL WITH REVERSE RECOVERY


Reverse recovery effect under different blocking conditions

39

40

10

4/22/2013

DYNAMIC IGBT MODEL WITH FINITE DI/DT

DIFFERENT LEVELS OF SIMULATION


System simulation
waveforms resolved up to switching frequency response times, controller behaviour dead times, currents and voltages (peak, RMS etc) harmonic content (Fourier, THD)

Thermal simulation
efficiency, junction & heat-sink temperatures

3_L_3Ph_IGCT.plecs

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.
Clamp_Rep_Real.plecs

41

42

THERMA L SIMULATIONS
Semiconductor Losses Ideal Switches vs Continuous Switches Look-up Tables

Thermal Modeling

Electrical-Thermal Simulation Thermal Equivalent Networks Steady-State Thermal Calculations

43

44

11

4/22/2013

SEMICONDUCTOR LOSSES
Switching Loss Conduction Loss
Gate signal

SWITCHING LOSSES
Switching energy loss dependent on:
blocking voltage, device current, junction temperature, gate drive EON = f(VCE, IC, TJ, RG)

Turn on
45 46

Turn off

EXAMPLE IGCT TURN-OFF: VARYING STRAY INDUCTANCE


kV 4.5
300 nH (10.5 Ws) 800 nH (12 Ws) 1500 nH (13.5 Ws)

SWITCHING LOSS CALCULATION FROM TRANSIENTS


kA 3.0

Accurate physical device models required


generally unavailable

VPK = 3800V

Physical parameters often unknown during design phase.


stray inductance of buss-bars

3.0

2.0

Small simulation steps required


large computation times

VDC = 2 kV 1.5 TJ = 125 C 1.0

0.0
Courtesy ABB 5 10 tf 2.5s, ttail 7s
47

0.0
15 s

48

12

4/22/2013

LOOKUP TABLE APPROACH FOR SWITCHING LOSSES


Instantaneous switching maintained for speed Switching losses are read from a database after switching event
Esw = F(TJ, VBLOCK, ION) (RG = constant)

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 documentation
5SNA 1500E330305_report.pdf

49

50

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)

SIMULATION OF AN ELECTRICAL-THERMAL MODEL

Off-state loss
negligible - low leakage current

51

52

13

4/22/2013

SEMICONDUCTOR THERMAL BEHAVIOR

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)

53

54

POINTS TO NOTE
Thermal and electrical domains not coupled
Semiconductor losses from lookup tables dont appear in the electrical circuit Energy conservation may be achieved with extra feedback

THERMAL DOMAIN
Thermal circuit analogous to electrical circuit Thermal and electrical circuits solved simultaneously

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-sheet values can you ask for help from your supplier ! Otherwise, if you are not respecting his data-sheet he wont be willing to discuss your problem!

55

56

14

4/22/2013

A COMPLETE ELECTRICAL-THERMAL MODEL


The heat-sink is the interface between the two domains
automatically absorbs component losses propagates temperature back to semiconductors

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

Thermal impedance modeled with RC elements

57

58

MEASURING AVERAGE DEVICE LOSSES


Concept
Calculate total switching and conduction energy lost during a switching cycle Output as an average power pulse during the next cycle Implementation: based on a C-Script block conduction and switching losses measured with a Probe

JUNCTION-CASE THERMAL IMPEDANCE


Define in semiconductor thermal description to observe junction temp fluctuations Foster coefficients usually given in data-sheet

Foster network coefficients

Example junction-case thermal impedance

59

60

15

4/22/2013

FOSTER NETWORK PITFALLS


Only accurate if reference point x is a constant temperature Cannot be arbitrarily extended beyond point x
TJ is immediately affected by temperature changes at x

SOLUTION 1 - USE FIRST ORDER CAUER NETWORK


Calculate from 63% R value C = /R

VC reaches 63.2% VFINAL after

61

62

COMBINED ELECTRICAL-THERMAL SIMULATION

CYCLE-AVERAGE LOSSES
Calculate average device losses for each device

Semiconductor losses dont appear in electrical circuit Conservation of energy can be maintained by subtracting thermal losses from electrical circuit
Average device losses

Apply to external resistive-only thermal circuit


Average device losses

63

64

16

4/22/2013

EXAMPLE IGBT CONDUCTION LOSSES

CALCULATING THE STEADY-STATE OPERATING POINT


Challenge: Large thermal time-constant of heat-sink - simulation can take hours! Newton-Raphson analysis
Instantaneous loss thermal capacitances left in circuit Jacobian matrix must first be calculated system must be periodic and all states must converge Cycle average loss

Cycle-average losses with resistive thermal circuit


thermal capacitances are removed losses are averaged, TJ = constant at steady-state Moving average (20ms) system can be non-periodic and have non-convergent states

65

66

THERMAL SIMULATIONS
Control Analysis Tools Newton-Raphson Analysis Magnetic Modeling

Special Features of PLECS

Custom Control Codes Simulation Scripting

67

68

17

4/22/2013

ANALYSIS TOOLS
Control analysis tools
AC sweep impulse response analysis loop gain 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)

Steady-state analysis

This is done iteratively in PLECS by the Newton-Raphson method: xk+1 = xk J-1f(xk) where J is the Jacobian (determinant) of the Jacobian matrix of the n state variables (requires n+1 simulation runs)

69

70

NEWTON-RAPHSON ITERATION DEMO

NEWTON-RAPHSON ITERATION DEMO GUESS X1

71

72

18

4/22/2013

NEWTON-RAPHSON ITERATION DEMO

NEWTON-RAPHSON ITERATION DEMO TANGENT AT F(X1)

73

74

NEWTON-RAPHSON ITERATION DEMO X2 FROM TANGENT

NEWTON-RAPHSON ITERATION DEMO

75

76

19

4/22/2013

NEWTON-RAPHSON ITERATION DEMO - SET X2 AS NEW ROOT

NEWTON-RAPHSON ITERATION DEMO TANGENT AT F(X2)

77

78

NEWTON-RAPHSON ITERATION DEMO X3 FROM TANGENT

NEWTON-RAPHSON ITERATION DEMO

79

80

20

4/22/2013

NEWTON-RAPHSON ITERATION DEMO SET X3 AS NEW ROOT

NEWTON-RAPHSON ITERATION DEMO - TANGENT AT F(X3)

81

82

NEWTON-RAPHSON ITERATION DEMO X4 FROM TANGENT

NEWTON-RAPHSON ITERATION DEMO

83

84

21

4/22/2013

NEWTON-RAPHSON ITERATION DEMO SET X4 AS NEW ROOT

NEWTON-RAPHSON ITERATION DEMO TANGENT AT F(X4)

85

86

NEWTON-RAPHSON ITERATION DEMO X5 FROM TANGENT

NEWTON-RAPHSON ITERATION DEMO CONVERGENCE!

87

88

22

4/22/2013

NEWTON RAPHSON: CONVERGENCE


Typically converges in less then 10 iterations

NEWTON RAPHSON: REQUIREMENTS FOR CONVERGENCE


The system must be convergent Example Problem:
PLL model angle is a ramp signal towards infinity

Solution:
create a periodic signal with a self-resetting integrator

2-level IGBT Inverter.plecs

89

90

MAGNETIC MODELING
Permeance-capacitance analogy

CUSTOM CONTROL CODE


Custom C-code External DLL

91

92

23

4/22/2013

SIMULATION SCRIPTING
Inbuilt scripting External scripting

Solvers

BuckParamSweep.plecs

93

94

OUTLINE
What are Solvers? Discrete Solvers
trapezoidal rule

SOLVERS
In a digital simulation, integration is numerically performed by starting with known initial conditions

Continuous solvers
Taylor series polynomial step-size control acceptable error tolerances: relative and absolute refining the display output

A time step is taken and some assumptions are made about the way a variable changes within this time step; the algorithm for doing this is called a Solver

Step-size selection for Discrete Solvers Solver Comparisons Conclusions

The simplest solver is one which assumes a linear change of conditions within a time step; this is a reasonable assumption for a small step. This type is known as a Discrete Solver and it builds the computed function from a series of trapezoidal blocks

95

96

24

4/22/2013

TRAPEZOIDAL RULE FOR DISCRETE SOLVER

CONTINUOUS SOLVER
We will see later that discrete solvers have limitations 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 sufficient number of simple mathematical functions (e.g. by sine waves, in the case of Fourier). Continuous Solvers, in fact, use the Taylor Series

97

98

TAYLOR SERIES EXPANSION


To perform a piece-wise simulation with a continuous solver requires the approximation of a continuous function with a higher order polynomial

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 nth order solver has the same accuracy as an nth order Taylor series.

The higher the order, the more accurate the solution

The Taylor series is of the form:

99

100

25

4/22/2013

REPRESENTATION OF EXPONENTIAL BY TAYLOR SERIES

REPRESENTATION OF SINE-WAVE BY TAYLOR SERIES

Exponential 5th order Taylor series representation At n = 8, perfect fit for -3 < x < 3 For -4 < x <4, a Taylor series to the 13th order is an accurate representation of y = sin(x)

1st order 3rd order 5th order 7th order 9th order 11th order 13th order y = sin(x)

Source: Wikipedia Source: Wikipedia

101

102

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)

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

Step size, h, is calculated using where:

is relative or local error


tolrel is relative tolerance hold is previous time step

Result is valid if:

Local error

Acceptable error

103

104

26

4/22/2013

STEP SIZE CONTROL


Step size automatically controlled by solver (variable step)
Goal: Keep error within acceptable error limits Key advantage: Accuracy directly specified by the user

TOLERANCES
Relative tolerance (tolrel) determines acceptable error limit when x approaches 0
start with 10-3 (0.1%) numerical limit is 10-16

Step size calculated using


Relative error, (or local error) Relative tolerance, tolrel Previous time step, hold
hold

Absolute tolerance (tolabs)


best to set to auto

105

106

LC CIRCUIT - SCOPE OUTPUT


Analytical solution:

LC CIRCUIT - COMPARISON WITH ANALYTICAL SOLUTION


Analytical response

Display uses linear interpolation used between time-steps

Solver response
(tolrel = 1e-3)

Resonant LC circuit VC(0) = 1 V

107

108

27

4/22/2013

LC CIRCUIT - SOLVER OUTPUT

OPTIONS FOR A FINER DISPLAY

Resonant LC circuit VC(0) = 1 V


Calculated points for tolrel = 1e-3

Option 1: Reduce tolrel or time-step


solver must recalculate polynomial coefficients at each time step less efficient

Option 2: Increase refine factor


solver uses existing polynomial coefficients to calculate additional points. more efficient

109

110

TRAPEZOIDAL RULE FOR DISCRETE SOLVER

FIXED SOLVER TIME-STEP SELECTION

Accuracy is indirectly determined by the time-step


to ensure accuracy, reduce the time-step and observe any changes in the output, or: compare with a continuous simulation

Continuous waveform
highest 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

111

112

28

4/22/2013

COMPARISON - CONTINUOUS AND DISCRETE SOLVERS


Time steps: Underdamped RLC circuit
Continuous: tolrel = 10-6

SUMMARY
Variable solvers are in general faster and more efficient
use 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 solvers


do not require tolerance inputs (set by step-size)

Simulated current

Discrete: ts = 50s

Refine Factor is always one (set by step-size)

113

114

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 of semiconductor data-sheets

Conclusions

Magnetic modeling Analysis tools fast calculation of steady state and frequency response Custom control code efficient controller design Simulation scripting fast performance analysis PLECS Scope high performance, user-friendly easy waveform and data export PLECS Blockset & PLECS Standalone simple model exchange (inter-company)

115

116

29

4/22/2013

electrical engineering software

Southeast-Asia Authorized Agents: Infomatic Pte. Ltd. Olivier WU TEL: +65 3158 2943 FAX: +65 3158 2190 Mobile: +65 8478 0572 Email: olivier.wu@infomatic.com.sg Web: www.infomatic.com.sg
117

Vietnam Authorized Agents: Smart Green Solutions JSC 27/35 Cong Hoa Street, Ward 4, District Tan Binh Ho Chi Minh City, Vietnam. TEL: +84 8 38112941 FAX: +84 8 38112941 Email: info@sgs-jsc.com Web: www.sgs-jsc.com

30

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy