Rapid Design, Prototyping and Test solution from PSIM and Typhoon HIL

3
Bodo´s Power Systems ® May 2014 www.bodospower.com 90 The growing complexity of power electronics (PE) systems, intensify- ing competition, rapidly shrinking product development cycles, and exploding test and quality assurance costs are forcing power electronics industry to accelerate the adoption of advanced tools for design, test, and verication. This trend is particularly evident in power electronics embedded control software whose size, complexity and importance is rapidly increasing. This is only to be expected because power electronics control software: Provides large value added to the product via increased functionality and new features; • Provides an opportunity to quickly develop new products based on existing hardware platforms; (i.e. using solar inverter power hardware for grid storage power hardware) Provides the opportunity for newcomers to offer competitive solutions in different verticals thanks to the availability of modularized hardware. If automotive industry can be taken as an indication of how the power electronics is going to develop, we should brace ourselves for a software dominated power electronics. For example, today’s car has between 20 and 70 processors with 100 million lines of embedded code amounting to approximately 1GByte of embedded code [1]. Less than 20 years ago cars had one or no processors. Testing automotive embedded software then was much simpler. Manual testing was acceptable, as it is still the standard practice in most of the power electronics industry today. But times are rapidly changing. In addition, power electronics industry is currently undergoing a power semiconductor revolution with the development of new wide-bandgap semiconductor devices, i.e. SiC, GaN, which are imposing more demanding design requirement specications for controllers which in turn require a new set of tools for automated design, test, and verication. Product Development Process Here we propose a model based process for power electronics embedded controller development - described with “V diagram” - as shown in Figure 1. A new design project starts with high level speci- cation and system level models with high level of abstraction. Once the system level model is simulated and performance is satisfactory, design seamlessly moves on to rapid prototyping (via automatic code generation) to hardware-in-the-loop (HIL) system with the rapid control prototyping hardware. After this step, design moves to control code targeting, production of the nal code for the nal controller platform - followed with testing of the nal controller on the HIL. In the nal development stage, controller is interfaced with real converter and tested in the laboratory, only this time in only a limited number of operating points, just what is needed to verify the power and controller hardware. Depending on applications, some converters will be further tested in large system conguration, such as parallel converter con- guration, micro-grid conguration or similar. This last step can also be done in both HIL and real hardware setups. DESIGN AND SIMULATION Rapidly Design, Prototype, and Test your DSP Controller with PSIM and Typhoon HIL By Ivan Celanovic and Nikola Celanovic Typhoon HIL Inc., USA; Hua Jin, Powersim, Inc, USA and Simone Castellan, University of Trieste, Italy Figure 1: Power electronics model based design process depicted with “V diagram”.

description

 

Transcript of Rapid Design, Prototyping and Test solution from PSIM and Typhoon HIL

Bodo´s Power Systems® May 2014 www.bodospower.com90

CONTENT

The growing complexity of power electronics (PE) systems, intensify-ing competition, rapidly shrinking product development cycles, and exploding test and quality assurance costs are forcing power electronics industry to accelerate the adoption of advanced tools for design, test, and verifi cation. This trend is particularly evident in power electronics embedded control software whose size, complexity and importance is rapidly increasing. This is only to be expected because power electronics control software:

• Provides large value added to the product via increased functionality and new features;

• Provides an opportunity to quickly develop new products based on existing hardware platforms; (i.e. using solar inverter power hardware for grid storage power hardware)

• Provides the opportunity for newcomers to offer competitive solutions in different verticals thanks to the availability of modularized hardware.

If automotive industry can be taken as an indication of how the power electronics is going to develop, we should brace ourselves for a software dominated power electronics. For example, today’s car has between 20 and 70 processors with 100 million lines of embedded code amounting to approximately 1GByte of embedded code [1]. Less than 20 years ago cars had one or no processors. Testing automotive embedded software then was much simpler. Manual testing was acceptable, as it is still the standard practice in most of the power electronics industry today. But times are rapidly changing.

In addition, power electronics industry is currently undergoing a power semiconductor revolution with the development of new wide-bandgap semiconductor devices, i.e. SiC, GaN, which are imposing more demanding design requirement specifi cations for controllers which in turn require a new set of tools for automated design, test, and verifi cation.

Product Development ProcessHere we propose a model based process for power electronics embedded controller development - described with “V diagram” - as shown in Figure 1. A new design project starts with high level speci-fi cation and system level models with high level of abstraction. Once the system level model is simulated and performance is satisfactory, design seamlessly moves on to rapid prototyping (via automatic code generation) to hardware-in-the-loop (HIL) system with the rapid control prototyping hardware. After this step, design moves to control code targeting, production of the fi nal code for the fi nal controller platform - followed with testing of the fi nal controller on the HIL. In the fi nal development stage, controller is interfaced with real converter and tested in the laboratory, only this time in only a limited number of operating points, just what is needed to verify the power and controller hardware. Depending on applications, some converters will be further tested in large system confi guration, such as parallel converter con-fi guration, micro-grid confi guration or similar. This last step can also be done in both HIL and real hardware setups.

DESIGN AND SIMULATION

Rapidly Design, Prototype, and Test your DSP Controller with PSIM and Typhoon HIL

By Ivan Celanovic and Nikola Celanovic Typhoon HIL Inc., USA;Hua Jin, Powersim, Inc, USA and Simone Castellan, University of Trieste, Italy

Figure 1: Power electronics model based design process depicted with “V diagram”.

www.bodospower.com May 2014 Bodo´s Power Systems® 91

CONTENTDESIGN AND SIMULATION

The key in this new, agile control development process is to be able to test after each step, and to test relentlessly. Testing after each step eliminates design problems early on in the process without waiting for the bugs to surface late in the design or deployment stage of the product. Indeed, model based design process where we can design and test each step of the way, as shown in Figure 1, shortens the design cycle, improves the controller quality and saves money. Fur-thermore, unifi ed model based design toolchain will enable stream-lined and effi cient communication of design specifi cation from the design phase all the way to product deployment across boundaries of the hardware, controls, software, and test departments.

The offl ine simulator PSIM and the Typhoon Hardware-in-the-Loop (HIL) real-time simulator, with their unique and dedicated focus on power electronics applications, provide the ideal toolset for the model based design process.

Design and SimulationThe key for shortening the design cycle (narrowing the “V” curve) in model based design is to begin with the embedded controller code development as early in the design cycle as possible and to start testing it as early as possible. The PSIM offl ine simulator enables engineers to simulate the power stage and the controller indepen-dent from the power and control hardware [2]. Another advantage of model based design is the code reuse and model reuse from previous designs. In addition, PSIM offers a variety of control design tools to help designers quickly evaluate and tune control algorithm. One example is the frequency response analysis to measure transfer functions of open loop or closed loop systems. This enables design engineers to evaluate performance, test the robustness, and check the feasibility of requirement specifi cation early in the design phase.

Rapid prototyping: Typhoon HIL + DSP Interface Board + PSIM Auto CoderAfter the design was simulated against various operating sce-narios and the control algorithm optimized and fi ne tuned to meet the design specifi cation, the control model is ready for rapid prototyping on a platform that interfaces with the real-time hardware-in-the-loop simulator.

Figure 2 shows the workfl ow of the rapid prototyping process. From the PSIM graphical representation of the control algorithm the control code is generated automatically and downloaded to the DSP located on the TI Controller Card which resides on the Typhoon HIL DSP In-

terface Board which is then connected to the HIL machine. The power stage is then compiled in the Typhoon HIL compiler to run on the HIL machine in real time. The result is rapid development of the execut-able specifi cation of controller and power hardware, independent from the control and power hardware.

Automated HIL TestingOwing to its ultra-high fi delity, and test automation features, Typhoon HIL system enables excellent test coverage, including fault conditions, of the fi nal control software that is fast, affordable and repeatable [3].

Ultra-high fi delity of the Typhoon HIL system enables the most realis-tic controller testing environment short of real converter setup. Such testing allows unsupervised verifi cation of the controller performance in all operating points (including hardware faults), at a rate that is at least three orders of magnitude higher than what can be achieved by manual testing.

User Case: Grid-Connected Inverter DesignThe model based design process was demonstrated in a user case study. In a project by University of Padova and University of Trieste, Italy, a team of researchers were to develop controller for a battery charger that can also supply grid with reactive power. The basic control concept was fi rst developed and implemented in PSIM. Using PSIM’s SimCoder Module and F2833x Target, DSP related elements, such as ADC and PWM, were added to the schematic. After the system is fully tested and simulated, DSP code was automatically generated and loaded to the TI DSP connected to Typhoon HIL600 emulator via the Typhoon HIL DSP Interface Board. The power stage of the system was created in Typhoon’s schematic editor, and a model for the power stage was compiled and uploaded to HIL600. A PSIM and Typhoon HIL setup, shown in Figure 3, depicts the computer that runs both PSIM and the Typhoon HIL software and is connected to both the DSP Interface Board and the Typhoon HIL600 emulator.

In a very short time, all the voltage and current loops were closed, and the control code was running with the power stage emulated in real-time in the hardware-in-the-loop setup.The team was able to focus on test scenarios that are very diffi cult to do in the real laboratory such as the investigation of the operation in the presence of grid voltage harmonics, unbalanced grid voltage, and load unbalance. The ease with which one can generate various grid conditions in the HIL and the write scripts to automate such tests is starting a new chapter in the history of power electronics controller software development and quality assurance.

Figure 2: Power electronics model based controller design and test-ing workfl ow starts with offl ine simulation in PSIM, followed by rapid control prototyping with Typhoon’s Hardware-in-the-Loop HIL600 real-time simulator and controller prototype (DSP Interface Board). Controller code is generated with PSIM’s SimCoder Module.

Figure 3: Full design, simulation, prototyping, testing, and verifi ca-tion of the controller is done from the comfort of the engineer´s desk. Grid-connected inverter is running in real-time in HIL confi guration, controlled with automatically generated code from PSIM.

www.bodospower.com May 2014 Bodo´s Power Systems® 93

CONTENT

Figure 4 shows the schematic diagram of the grid connected inverter power stage in Typhoon HIL Schematic Editor and HIL real-time waveforms . Waveforms show that, even with grid voltage unbalance and harmonics, the proposed controller can keep the grid voltage and current in phase, achieving reactive power compensation.

New Control Design ParadigmThe combination of the offl ine simulator PSIM and its auto code generation capability, coupled with the Typhoon HIL real-time emulator, offers a signifi cant advantage in the design, analysis, and testing of the overall power electronics system. It allows the control algorithm, control hardware, and power stage to be developed independently of each other. There is no doubt that the fi eld of power electronics need both hardware verifi cation and at the same time good coverage of operating points. Because the hardware used to be demanding enough in its own right, typically the software received reduced attention which resulted in high quality cost and fi eld problems.Fortunately, there is now the PSIM-Typhoon toolset available that makes it possible to design, test, and verify power electronics control software in a systematic, process driven and repeatable way laying the foundation for rapid development of new and improved power electronics solutions.

References[1] Ebert, C.; Jones, C., “Embedded Software: Facts, Figures, and

Future,” Computer, vol.42, no.4, pp.42,52, April 2009[2] PSIM User Manual, www.powersimtech.com[3] Typhool HIL User Manual, www.typhoon-hil.com

www.typhoon-hil.com

Figure 4: Schematic diagram of reactive power compensator simulated in real-time with 1μs time step in Typhoon HIL600 and controlled with Typhoon HIL DSP Interface board with TI DSP F28335 running the PSIM generated control code. Traces show grid voltage with harmonics (red), grid current (green trace) and load current (magenta trace).

DESIGN AND SIMULATION