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.

Two-level Inverter - SPS

Description


This model illustrates the use of the eHS solver to compute the outputs of a two-level DC/AC converter. User defined switching characteristics of the six switches of the inverter are controlled in real-time from CPU using in open loop control.

sim power systems OP4510 OP5607 OP5707

Table of Contents

Requirements


To run your model properly, the following software must be installed:

  • RT-LAB.

  • RT-EVENTS.

  • eFPGASIM.

  • SimPowerSystems.

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 either a VC707, TE0741 as its active carrier board (OP5607 / OP5700 or OP4510 simulators). Please refer to the product documentation for details on version compatibility.

Setup Parameters


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 can be either a VC707 or TE0741 (OP5607 / OP5700 or OP4510 simulators).

Please note that following setup:

  • The VC707/TE0741 kit must be connected to the target PCIe bus and detected through the RT-LAB interface "Tools > Get I/O Infos" procedure.

  • The Simulink simulation step time is set to 25 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 with SimPowerSystems


  1. Click on "Run this demo" on the top of this page (if this page is displayed in the Matlab demo browser). A popup window will let you select the platform on which the solver should be running. Select the appropriate platform according to your system documentation, then select OK. Go to SM_eHS\eHs\eHS CommBlk and select the name of SimPowerSystemss model in circuit file name section. The RT-LAB model using the eHS solver will open automatically, as well as the SimPowerSystems model describing the circuit to be solved. Note that depending on the platform selected, a different RT-LAB model is opened, with an appropriately configured OpCtrl block, but both versions refer to the same SimPowerSystems circuit.

  2. Verify that the ML605EX1, OP7161EX1, VC707 or OP4500 board ID is set correctly in the OpCtrl block in the RT-LAB model SM_Controller subsystem.

  3. You will find two SimPowerSystemss models for the same Circuit. In each model, you will find a three-phase bridge with IGBT/Diode switches that implements a DC/AC converter. You will also see a RL load on each phase, and various voltage and current measurement blocks. For more information on components supported by eHS, please consult section 3 of the eHS user guide.

  1. 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 frequency, as well as the PWM carrier frequency. Similarly, all eight voltage and current measurements will be sent back to the RT-LAB model console. Open both the RT-LAB console and master subsystem to see how the PWM signals are generated from parameters in the console as three equally .

  1. When the model is compiled in Simulink, the configuration of the eHS solver will be generated according to the SimPowerSystems circuit characteristics. Elements will be put into matrices and stored into .mat files that will be transferred into the solver when the model is run from the RT-LAB interface. To generate the matrices, go to SM_eHS\eHS\eHS Gen3 CommBlk and select "Update eHS matrices". This step is facultative, as matrices are regenerated during model compilation in RT-LAB.

  2. 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 SimPowerSystems 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

  3. Execute the real-time simulation, changing the PWM modulator and carrier characteristics, and the voltage of the DC input to suit your interests. The following results have been obtained from the original model by setting the RT-LAB Probe control to acquire 2000 samples per signal for acquisition group #1.

  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 the period of the PWM carrier. If the PWM carrier runs faster than 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 eHS 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