MATLAB Co-Simulation Tools For Power Supply Systems Design: V. Boscaino, G. Capponi
MATLAB Co-Simulation Tools For Power Supply Systems Design: V. Boscaino, G. Capponi
V. Boscaino, G. Capponi
University of Palermo Italy
1. Introduction
Modern electronic devices could be thought as the collection of elementary subsystems, each one requiring a regulated supply voltage in order to perform the desired function. Actually, in a system board you can find as many as ten separate voltage rails, each one rated for a maximum current and current slew-rate. However, the available energy source may not be suitable for the specific application. A power supply system is thus required to convert energy from the available input form to the desired output. Since power-up, power-down sequences and recovery from multiple fault conditions are usually offered, monitoring and sequencing the voltage rails is quite complex and a central power management controller is used. The design of the power management system is a key step for a successful conclusion of the overall design. The cost, size and volume of the electronic device are heavily affected by the power supply performances. Power supplies are classified in linear and switching. In a linear regulator the output voltage is controlled by the means of a pass element which is series connected between the unregulated input and the power load. The pass element operates in the linear region leading to lower efficiencies than switching converters. Moreover, the unregulated input of a linear regulator should be always higher than the output voltage. Such a condition could be not verified in most of cases. On the other hand, linear regulators offer lower quiescent currents and higher signal-to-noise ratio. The proliferation of switching converters throughout the electronic industry is a matter of fact. Unlike linear regulators, switching converters are suitable for both reducing and increasing the unregulated input voltage and efficiency can be as high as 97%. The feedback circuit acts on the duty-cycle of switching elements in order to control the output voltage. Classification of switching power supplies is mainly based on the available input energy form and the desired output: AC-AC cycle conversion: alternate input, alternate output; AC-DC rectification: alternate input, continuous output; DCAC inversion: continuous input, alternate output; DC-DC conversion: continuous input, continuous output. Several topologies are well suited to perform the required conversion. Independently of the specific topology, the architecture of a power supply system can be generalized as shown in Fig.1. A power section and a control section are highlighted. The switching converter is included in the power section while the feedback network and protection circuits for safe operation are collected in the control system. Mainly because of the growing interest in digital controllers, a power supply system can be modeled as a complex system, quite often involving both digital and analog subsystems. If compared to their analog counterparts, digital controllers offer lower power consumption, higher immunity to components aging and higher and higher design flexibility. The control algorithm is often described at a functional level using hardware description language, as VHDL or Verilog. ASICs or FPGA based controllers are usually integrated by the means of sophisticated simulation, synthesis and verification tools.
Fig.1. Power supply system architecture. Time to market can be heavily reduced by the means of powerful simulation environments and accurate system modeling techniques. Achieving high accuracy models for mixed-mode systems is quite difficult. Specific simulation tools are available on the market, each one oriented to a specific abstraction level. Circuit simulation software as Powersys PSIM and Orcad Pspice are the most common choice for circuit modeling. ASIC simulation and verification tools as Xilinx ISE/Modelsim or Aldec Active-HDL are available to implement the digital controller by the VHDL or VERILOG source code. Since the interaction between subsystems is the most common source of faults, testing separately analog and digital subsystems by the means of different verification tools is a severe mistake. Matlab is a powerful simulation environment well-suited for mixed mode systems modeling and simulation providing several tools for system co-simulation. The Matlab suite offers co-simulation tools for PSIM, Modelsim and Active-HDL simulation environments. Ideally, modeling the power converter by a circuit implementation in PSIM environment and the digital controller by the VHDL code in Xilix ISE or Active-HDL environment allows the designer to test the composite system in Matlab environment using co-simulation procedures. Unfortunately, the use of several co-simulation tools in the same Simulink model heavily reduces the processing speed. Authors experienced lower processing speed under Simulink/Modelsim than Simulink/Aldec co-simulation. Since Modelsim and Aldec feature the same options for digital controller design, authors suggest Simulink/Aldec co-simulation tool for complex systems. A brief introduction on PSIM
and Aldec co-simulation tools will be provided in the final chapter. As an example, in this chapter the Simulink model of a multiphase dc-dc converter for VRMs applications is described. The control system is described by VHDL language and the controller model is implemented in Active-HDL environment. For the highest processing speed, an alternative modeling technique for the power section is proposed by the means of elementary library blocks, avoiding PSIM cosimulation and not affecting the accuracy of behavioural simulations. As shown by simulation results, the high accuracy relies in the opportunity to match the system behaviour both within the switching event and during long-time events such as load transients and start-up. A laboratory prototype has been realized and tested. In the final chapter, the matching between simulation and experimental results will be discussed in order to show the efficiency of the proposed design approach.
3. MATLAB/Simulink model
The top level model is shown in Fig.2. The power section includes the Multiphase converter subsystem and the Currentsense subsystem. In the A/D converter subsystem, the Analog-to-Digital interface is modelled by elementary blocks available in Simulink libraries. The controller is modeled in Aldec ACTIVE-HDL environment. Each design unit is included in the Controller subsystem and the Active-HDL Co-Sim block is added to the top level model. In order to make VHDL design unit available in Simulink libraries, a specific co-simulation procedure should be activated. In Active-HDL workspace, right-clicking each device unit and selecting the option Generating Block Description for Simulink, MATLAB M-files are created. In Simulink Library browser, the Active-HDL Blockset library is now available. Adding the ActiveHDL Co-Sim block to the existing Simulink model allows the designer to set co-simulation parameters. In order to simulate a VHDL entity as an integral part of the current model, a HDL Black-Box block should be added and associated to the block description file generated for this unit. Running simulation from Simulink starts the co-simulation. Input and output waveforms can be analyzed both in Simulink and Aldec environment while internal signal waveforms can be analyzed in Aldec environment only.
3.1 The power section model The power section includes the multiphase converter and current-sense filters. A four-modules interleaved synchronous buck converter is connected to the power load. Since a Matlab/Aldec co-simulation tool is required for the digital controller, the power section is modeled by Simulink library elements in order to achieve the highest processing speed. The use of several co-simulation tools is avoided, keeping at the same time the highest accuracy. The dc-dc converter is modeled by the state-space averaging technique. Further details on multiphase converters and the proposed modelling technique will be provided in the final chapter. The Simulink converter model is shown in Fig.3. By the State-space block a subsystem is modeled by its own state-space equations. Matrix coefficients are introduced in the parameter box. Inductor current signals and the output voltage are the output vector components. Mux block collects scalar signals into the input vector and Demux block split the output vector into scalar signals.
Fig.3. Multiphase converter model Inductor current sense is achieved by RC filters which are modeled by their own Laplace transfer function using the Transfer Function block, as shown in Fig.4.
Fig.4. Current-sense filter 3.2 The digital controller model The digital controller is modelled as the collection of VHDL entities, each one is described by VHDL language in ActiveHDL environment. By the co-simulation procedure, each design unit is added to the Simulink model and simulated among the others. The VHDL entities are collected in the FPGA subsystem, shown in Fig.5. The co-simulation procedure allows the designer to test the VHDL code, including timing between entities. The digital controller is thus tested as closely as possible to the effective FPGA implementation. Each VHDL entity accomplishes a specific task of the digital controller: soft-start, protection circuits for safe operation, adaptive voltage positioning and the strictly-named controller implementing the sophisticated control algorithm. Note that each function is verified by behavioural simulation thanks to the proposed design approach. In the final chapter, further details on the control algorithm and supported functions will be provided, highlighting the high-accuracy of the proposed approach for power supply modelling.
Fig. 5. The Controller model 3.3 The A/D converter model The A/D converter section includes two A/D converters, each modelled as shown in Fig.6 by the means of elementary blocks available in Simulink libraries. The input signal is sampled at the clock frequency by the Zero-Order Hold block. Since in the Simulink library browser only an ideal symmetrical quantizer block is provided, a non-ideal A/D converter model is achieved by adding the horizontal shift and the conversion delay.
4. Simulation results
Simulation results are shown to test the high accuracy of the modelling approach. Steady-state waveforms under 115A load are shown in Fig.7. At the top the output voltage waveform, at the bottom the sum of inductor currents is shown. The proposed modelling approach allows the designer to simulate the system behaviour within the switching period achieving high accuracy results.
Fig. 7. Steady state waveforms under 115A load current. The system is tested under load current transients. The output voltage and the load current are shown in Fig.8. At the left, the system transient response to a 120A-0 load current step, at the right to a 0-120A load current step is shown. At the top the output voltage, at the bottom the sum of inductor currents are shown. Note that the proposed modelling approach ensures very high accuracy simulation results within the switching period as during load transients.
Fig. 8. Transient waveforms under a 120A-0 (at the left) and to a 0-120A load current step (at the right).