Documentation Home Page ◇ eHS Toolbox Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.
v2.15 Boost and two-level inverter - SPS
Description
This model illustrates the use of the eHS solver to compute the outputs of a circuit simulating a boost converter followed by a two-level DC/AC converter. User defined switching characteristics of the switch of the boost and of the six switches of the inverter are controlled in real-time by the developer in the RT-LAB model.
Sim power systemS OP4510 OP5607 OP5707
Requirements
The RT-LAB, RT-EVENTS, SimPowerSystem and eFPGASIM toolboxes must be installed on the host and target computers in order to run this example model properly. Please refer to the product documentation for details on version compatibility.
The eHS solver requires an FPGA-based hardware board. This board will be configured with the attached binary file automatically when the model is loaded in the RT-LAB interface. This model uses an Avnet Kintex-7-based Mini-module Plus (MMPK7) as its active carrier board.
Setup an Connections
This model must be run with the Hardware Synchronized option, with the XHP mode enabled. It does not require any external I/O hardware except the active control card, which should be a Trenz Kintex-7-based card (TE0741) on OP4510 Chassis.
Please note that following set-up is required for all OP4510 models:
The configuration file (bitstream) generation must have been successfully configured during the model loading phase.
RT-LAB 10.6.6 or later in the case of the OP4510.
The OP4510 board ID must be set correctly in the OpCtrl block in the RT-LAB model SM_eHS subsystem.
The Simulink simulation step time is set to 20 microseconds as the variable Ts in the RT-LAB model "InitFcn" and "PostLoadFcn" callbacks. To modify it, double-click on the "Model Initialization" block in the root of the RT-LAB model and modify accordingly the definition of the variable "Ts".
Procedure
The following procedure will help the developer understand how to work with the eHS solver.
Click on "Run this demo" on the top of this page (if this page is displayed in the Matlab demo browser). The RT-LAB model using the eHS solver will open automatically, as well as the SimPowerSystem model describing the circuit to be solved.
Verify that the OP4510 board ID is set correctly in the OpCtrl block in the RT-LAB model SM_eHS subsystem. To get this information, select "Tools > Get I/O infos" on the target context menu in RT-LAB and find the index of your hardware.
Locate the "OpCtrl", inside the SM_eHS subsystem. This block manages the firmware of the hardware on which the eHS solver is executed. By default, it is configured for an OP4510 board. If your hardware is different, select the appropriate board type and bitstream file name. A bitstream for each of the supported board types is included in the model folder.
Observe the SimPowerSystem model. You will find in it a one-phase universal bridge implementing the boost converter, and a three-phase universal bridge implements the DC/AC converter. You will also see a RLE load on each phase, and various voltage and current measurement blocks.
The voltage of the DC source in input (Vdc) will be controlled from the RT-LAB console during the real-time simulation. The console also controls the PWM modulator and carrier frequency for the boost and two-level converters. Similarly, all eight voltage and current measurements are sent back to the RT-LAB model console. Open both the RT-LAB console and master subsystem in order to see how the six PWM signals controlling the two-level converter are generated from parameters in the console as three equally shifted sine modulations.
When the model is compiled in Simulink, the configuration of the eHS solver is generated according to the SimPowerSystem circuit characteristics. Elements are converted into matrices and stored into .mat files that are transferred into the solver when the model is run from the RT-LAB interface. To generate the matrices, the user can either open the "eHSx64 CommBlk" block parameter panel or select the "Generate matrices" check-box. This step is not mandatory, as matrices are regenerated during model compilation in RT-LAB.
To run a simulation including the eHS solver in real time, create a RT-LAB project and add the RT-LAB model of this example into the project. The SimPowerSystem model should not be added to the RT-LAB project, as it does not need to be transferred to the target computer for execution. Compile the model, then assign a target node to run it in real time, then load the model onto it.
Execute the real-time simulation and enjoy the results, changing the PWM modulator and carrier characteristics, and the voltage of the DC input to suit your interests. The following results has been obtained with the original model by setting the RT-LAB Probe control to acquire 2500 samples per signal for acquisition group #1.
The RT-EVENT blocks in the model have a maximum number of events per time step per channel set to 4. This is adequate for any simulation step step size up to twice the period of the PWM carrier. If the PWM carrier runs faster than half the simulation step size, more events per simulation steps are needed (twice the number of PWM periods that can be present in one single simulation step). All RT-EVENTS blocks and the eHSx64 CommBlk have to be configured accordingly.
OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323
Follow OPAL-RT: LinkedIn | Facebook | YouTube | X/Twitter