990 likes | 1.76k Views
The Use of Real-Time Simulation Technologies: Applications to electric Drive, Power Electronic and Grid Systems. Federal University of Juiz de Fora December 9, 2009 Christian Dufour, Ph.D. Senior Simulation Specialist, Power Systems and Drives Market Development Manager, Brazil.
E N D
The Use of Real-Time Simulation Technologies: Applications to electric Drive, Power Electronic and Grid Systems. Federal University of Juiz de Fora December 9, 2009 Christian Dufour, Ph.D. Senior Simulation Specialist, Power Systems and Drives Market Development Manager, Brazil
Lecture Plan Considerations About Real-Time Simulation Real-Time Simulators and Model-Based Design Hardware Components of a Real Time Simulator Solver Components of a Real Time Simulator Test Automation and Sequencer Using RT-LAB to Run Real Time Simulations Interesting Test Cases run on multi-core RT-LAB Conclusions
About the importance of simulation Let’s consider the design of an aircraft. Cost Billions$ to design and manufacture. Can we wait until the first flight test to verify it actually fly? Consider now a large power grid Again, it can cost $billions to design Can we wait until commissioning to make sure it is stable and robust?
Classic facility for power grid simulation Hydro-Quebec’s Network Simulation Center • Motivation: Quebec power network is special: • power generation is very far away from city. • Many long lines. Requires a lot of active compensation. • Focus: Real-time electrical network simulation. • Needed to design new 765-kV line and specify the equipment (insulation co-ordination) using statistical technique • Needed to test REAL controllers for an unstable network • The real-network is not available (7 years to built) • Cannot disconnect the real power grid for test purpose!!! • Technical Challenges: • High bandwidth, Large I/O count • Complex model requiring massively-parallel hybrid computing
Real-Time Simulation : Introduction Free Running Simulation Faster than real-time Slower than real-time
Real-Time Simulation : Introduction Real-Time Simulation • Sine equa none conditions for real-time algorithms • Non-iterative • Fixed –step (disqualify Spice-type or Saber simulation algorithm for example)
Main Purpose of Real-Time Simulation • It is sometimes difficult to test a power systems device in its working environment or in real life condition. • Solution: One can connect a real network device (ex: a FACTS controller) to a simulated power grid • Other common applications: statistical testing, correlation testing Actuators MODEL OF POWER GRID Sensors
Evolution of Real-Time Simulator Technology 2009: 1 cabinet, 3 PC with 24 core in total For 350 3-ph buses32 to 64 cores would be required to simulate the detailed HQ networks RT-LAB COTS Sim-On-Chip Digital COTS Simulators 1975 30000 square feet Hybrid Simulator Digital Custom Simulators Hybrid (Analog/Digital) Simulators Analog Simulators Model Based Design 1960 1970 1980 1990 2000
What is Model-Based Design? • Model-Based Design is a methodology of design based on simulation models! • Obviously! It is so common these days. • Power grid designers were the first to use this approach philosophy, but 15 years ago and before, analog or hybrid simulator where used since computers were not fast enough • But It was not always the case for other industries like automobile and power electronic: • Before the advent of powerful computers and simulation tools, people used • To write specifications on paper and use this to work with subcontractors • Directly implement prototype on hardware • Directly integrate modules into an analog test bench of simplified or complete system before integrating the real hardware and software
About the concept of Model-Based Design (simplified) Model Design (Simulink Block Diagram) Correct Design Iteratively Generate Software from Model Test Upload Software to RT Platform
Model Based Design (MBD) & Hardware-In-the-Loop (HIL) Models becomes the method to pass Information across teams Maintenance Design Validate Model Off-line simulation Deployment Production Design & Implementation Integration & Testing Virtual Prototype HIL, RT simulation 3D visualization Integration & Test In-system commiss-ioning & calibration Control Prototype HIL, RT simulation, Physical Components Lab Testing with actual controller This implementation is made by the control team This implementation is made by the integration team Implementation Production CodePhysical Components This implementation is made by the software team
Advantages of Model-Based Design Advantages: • Making Design Tradeoffs Early • Reducing Development Cycle • Reducing Testing Cost • Better and More Tests Traditional Design Method Model Based Design Requirements Design & Build Release to Test Release to Field • Challenges: • Requires expertise and effort • Needs specialized tools • Model fidelity • Model management
Real-time simulation components Application Models Solvers Real-Time Platform Inputs/Outputs Communication Processing
Main components of a power system real-time simulator • The 2 most critical components of a real-time power system simulators are: • The hardware platform the capable to do these iteration fast enough • Running a real-time Operating System • With sufficient I/O capability • Simulation solvers capable to iterate the equations of the power system with • Accuracy • Stability
Main components of a power system real-time simulator • Other components • Automatic test sequencer • Because you want to run many tests automatically
Hardware of a real-time power system simulator • Two main approaches remains today • Custom Digital Simulator ++Optimized for power system problems -- Cost more, difficult to upgrade, less open, custom RTOS --- Not able to keep pace with new processing and communication technologies (3 to 5 years lagging behind the latest processors) • Modern commercial-Off-The-Shelf Digital Simulator ++ Lower cost driven by mass market requirements: mainly the game industry that continuously requires faster CPUs, easy to upgrade ++ Flexibility: can connect any PCI card ++ Openness: Standard Operating system and can be easily interface to 3rd party software ++ Compatible with the latest processors very quickly as they become available.
RT-LAB eMEGAsim Simulator Hardware Architecture • Host/Target Architecture • Windows • QNX & RT-Linux RTOS • SIMULINK/RTW based Simulink Model • Multi-core Processors • Shared-Memory • Multi-CPU board Single-, Dual-, or Quad-Core HILBox PC1 CPU Simulink Model Sh.Mem. PCI EXPRESS CPU PCI 20
RT-LAB eMEGAsim Simulator Hardware Architecture • Host/Target Architecture • Windows • QNX & RT-Linux RTOS • SIMULINK/RTW based Simulink Model Single-, Dual-, or Quad-Core • Multi-core Processors • Shared-Memory • Multi-CPU board HILBox PC1 CPU Simulink Model Sh.Mem. • PCI PCIe Extension • User has the possibility to add PCI cards to the simulator with standard Protocol like TCP/IP, UDP/IP, RS-232 • Or to develop and study its own protocols (IEC-61850, LoadRunner) PCI EXPRESS CPU PCI RS-232, CAN, TCP/IP IEC61850,LoadRunner 21
RT-LAB eMEGAsim Simulator Hardware Architecture 16 AO 16 DO 16 AO 16 DO 16 AI 16 AI 16 DI 16 DI Carrier w (op511x) Carrier w (op511x) Carrier (op5210) Carrier (op5210) • Host/Target Architecture • Windows • QNX & RT-Linux RTOS • SIMULINK/RTW based • Multi-core processors • Shared-Memory • Multi-CPU board HILBox PC1 CPU Sh.Mem. • Digital IO requirements • For power electronic applications, the Digital I/O card is critical • It must be capable of sampling Thyristor/ IGBT/GTO/MOSFET gate with great accuracy • The latency must also be very low so it does not to slow down the simulation (PCI Express) CU PCI EXPRESS FPGA (op5142) PCI Express FastCom 22
Sampling of fast PWM gate signals • For this purpose, PWM pulse are captured on the FPGA card by 100MHz counters • Normalized ratio (Time stamp) is send to the inverter models on the CPU • The model on the CPU use the Time Stamps to compute interpolated voltages
Effect of switch gate sampling and interpolation • RTeDRIVE inverter model use the time stamps to produce very accurate results • Example: a simple DC chopper (PWM=10kHz, Ts=10µs) • Bad sampling (like if we use regular SPS) causes important non-linearity in the input-output characteristic • But very linear caracteristic with RTeDrive TSB inverters SimPowerSystems TSB Tcarrier/Ts=10
Effect of switch gate sampling and interpolation • Preciseenough to takeintoaccountdeadtimeeffectsmallerthat the sample Time • Belowis the effect of dead time increment of 2 µs (with a sample time of 10µs!)
Hardware Architecture (FPGA models) 16 AO 16 DO 16 AO 16 DO 16 AI 16 DI 16 AI 16 DI Carrier w (op511x) Carrier w (op511x) Carrier (op5210) Carrier (op5210) • Host/Target Architecture • Windows • QNX & RT-Linux RTOS • SIMULINK/RTW based • Multi-core processors • Shared-Memory, Multi-CPU board Xilinx System Generator Blockset Model HILBox PC1 CPU Sh.Mem. • FPGA user programmabilityfor advanced model design • The FPGA card can be programmed by the user using Xilinx System Generator • No VHDL language skill required. It is a Simulink blockset CU PCI EXPRESS FPGA (op5142) PCI Express Xilinx SG model FastCom • Models with 10 ns sample rate can be coded on this card! 26
Simulator Hardware Architecture (Expandability) HILBox PC2 PCI 16 AO 16 DO 16 DO 16 AO 16 AI 16 DI 16 AI 16 DI Carrier (op5210) Carrier (op5210) Carrier w (op511x) Carrier w (op511x) Dolphin • Host/Target Architecture • Windows • QNX & RT-Linux RTOS • SIMULINK/RTW based • Multi-core processors • Shared-Memory • Multi-CPU board HILBox PC1 CPU Sh.Mem. • Expandability • FireWire • INFINIBAND switch • DOLPHIN SCI /PCIe(2 to 5 us latency) CU PCI EXPRESS FPGA (op5142) PCI Express Dolphin 27
Simulation solvers for power systems • Key characteristics of power systems • Contains a wide range of frequency modes • Requires ‘stiff’ fixed-step solvers. Stiff solver remains stable even with mode above the simulation Nyquist limit. • Contains a lot of PWM-driven power electronics • The simulator must avoid sampling effect when computing IGBT pulse ‘events’ internally or when reading PWM pulses from its I/Os
Stiff solvers methods for power system simulation • Simulation methods electric systems: • Nodal approach (EMTP, HYPERSIM) • State-Space (SimPowerSystems, PLECS) • Switching-function (inverter models only) • FPGA-based methods
Stiff solvers methods for power system simulation • Classic method ‘Nodal Approach’ • Each RLC branch is discretized with the trapezoidal rule of integration (stiff solver) • Example: inductor • S-domain equation: • Discretization by Trapeze( time step: T): • Hummmm….. Independs on vn, a priori unknown nodal voltage • Implicit problem, cannot iterate directly
Stiff solvers methods for power system simulation • ‘Nodal Approach’: solution to implicitness • All branches resistance ratio R=vn/in,are build into a nodal matrix • Known term Ih=in-1+(T/2L)vn-1 are built into a vector I • For all nodes, a global matrix of admittance is built: YV=I • Nodal voltages are found by solving this matrix problem, either by direct inversion or LU decomposition. • Re-solving of Y required if a switch change position Y V= I 2 3 Ih -R R R -R -Ih 4
Stiff solvers methods for power system simulation • State-Space approach • We can also find the exact state-space solution • With k, matrix set index for switch permutations • This can be discretized with the trapezoidal method like in SimPowerSystems for Simulink • Trapezoidal method: order 2. • It can also be discretized by higher order methods • Higher order methods (order 5) implemented in ARTEMiS, a solver package of eMEGAsim.
Stiff solvers methods for power system simulation • State-Space approach • Continuous time state-space expression • Solution for time step T: • How to compute the ‘matrix exponential’ eAT? • Trapezoidal method (order 2) • ARTEMiS art5 method (order 5) TALYOR EXPENSION
Effect of higher order discretization Simple case of RLC circuit energization Artemis ART5 solver more precise than Trapezoidal solver at 100 us
Numerical stability issues • Discretized systems is not guarantied to be stable • It depends on how Laplace poles are ‘mapped’ in the z domain. Ex: Forward Euler has poor stability • A-stability (Stiff stability) (ex: trapeze method) guaranty discrete stability (for linear systems) Laplace pole (s) mapping RLC network Euler T=0.01µs RLC network Trapeze T=100µs Im{l} y’=ly Trapeze Stability Region Re{l} -2/T Forward Euler Stability Region
Numerical stability issues with trapezoidal integration • Even if it is stable, the trapezoidal rule (tustin) is prone to numerical oscillations • The z-domain mapping is stable but oscillatory for high frequency Laplace poles
Numerical stability issues with trapezoidal integration • A-stable methods can be highly oscillatory • How are mapped high frequency poles? • It depends on the ‘stability function’ again ARTEMiS art5 (L-stable) Trapeze (A-stable) Laplace map Z- domain map Im{z} Im{l} y’=ly y(n+1)=zy(n) Re{l} X Re{z} X X -1 z mapping near -1 means oscillations
Other solver methods for power system simulation • Switching function approach • A special solver method for power electronic system using high-frequency PWM. • It is a ‘simple’ controlled voltage source! • Interpolation methods are used to obtain high accuracy in the Opal-RT RTeDRIVE package • High impedance mode can be implemented now. V+ ~V+ Gup V_load V_load ~0 Load * * * Glow 1 Gup Glow gate 0 * V_load for positive I_load
Interpolated switching functions: example case 1 HIL Simulation Physical System • Mitsubishi Electric Co • Japan, 2004 • ARTEMiS used for rectifier side • RTeDRIVEused for inverter PWM 2.25kHz MITSUBISHI © Opal-RT © Opal-RT PWM 4.5kHz PWM 9kHz 40
3-level STATCOM with 72 IGBT (Mitsubishi Electric) Interpolated switching functions: how high can you get? • 20 µs, 3 CPU with the controller • 1000 time faster than conventional simulation software • Actual diode/IGBT count: 10*6*3=180 Reference model In EMTP/RV (3us) vs Simulink/SPS/ RT-LAB (50 us) IPST 2009, Kyoto - Japan
Simulation On Chip (FPGA) • RT-LAB XSG permits to use Xilinx System Generator models inside RT-LAB frame work • Enables complex model to run on the FPGA of RT-LAB Examples: • PMSM motor • IGBT inverter, • PWM modulator • Power electronics
Simulation On Chip (FPGA) • No need to know VHDL language • But you need to know fixed-point arithmetic • Stiffness problem is resolved because of the very small time step used (10 nanoseconds)! A typical XSG model in RT-LAB
Simulation On Chip (FPGA) Example: PMSM Drive • Inverter and PMSM equation solved in FPGA • Back-EMF stored in the FPGA also • Inductance computed in CPU of the RT-LAB system at slower rate (40 µs) • Torque is computed on CPU at 40 µs also. This is fine because it is used to compute mechanical equations anyway. *C. Dufour et al. “Real-Time Simulation of Finite-Element Analysis Permanent Magnet Synchronous Machine Drives on a FPGA card”, Proceedings of 2007 European Conference on Power Electronics and Applications (EPE-07) , Aalborg, Danemark , Sept 2007
Advanced solvers: State-Space Nodal (SSN) approach For all user-defined groups or subsystems. one state-space equation is found with some unknown entries, the NODAL voltage For all nodes , Thevenin/Norton equivalent are computed Then the unknown nodal voltage are found 45
Advanced solvers: State-Space Nodal (SSN) approach State-Space • Advantages of the SSN approach • Fewer state-space iterations • Fewer switches per subsystems: precalculation is easier, which is important in RT-simulation • Possibility to make parallel computation of the state-space groups in SSN • Some similarities with • MATE (J. Marti) • GENE (K. Strunz) SSN 0 0 0 0
Advanced solvers: State-Space Nodal (SSN) approach Small distribution system for breaker test coordination with: short pi line and 22 equivalent switches • ADVANTAGES • NO DELAY between subsystem solution • Large number of switches allowed • IN DEVELOPPEMENT • Algorithm is tested in the the SPS environement using m-file S-function • Currently ported to ‘C’ • PERFECT MATCH WITH SPS Update March 2010 Now released In ARTEMiS 6.0 47
Advanced solvers: State-Space Nodal (SSN) approach • Open question • Is the SSN approach extendable to phasor-type (Transient Stability) simulation like MATE-type methods? 48
Comparison of solver methods Advantages Disadvantages
About the necessity for testing • Test sequencer