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.20 NPC Inverter - S-Function - eHS Gen4
Description
This project demonstrates the use of the eHS solver to compute the outputs of an FPGA-based NPC Inverter circuit created using the OPAL-RT Schematic Editor in real time. With this example project, the user is able to control the simulation parameters (inputs and gates values) in real-time via the RT-LAB console.
In S-Function workflow, example models support any chassis. You can contextualize your example model by selecting the chassis in the Chassis selection block.
SCHEMATIC EDITOR S-function OP4512 OP4610 OP5607 OP5707
Setup Parameters
The following parameters used for real-time simulation are editable by the user in the model
Ts: CPU Simulation time step - the default is 20µs.
Vdc_Source: Voltage input of the NPC circuit
BEMF_Amp PP: Amplitude of the Back-EMF
Ref_Freq: Frequency of the Back-EMF
PWM_Freq: Carrier frequency of the NPC PWM generator
PWM_Modulator: Duty cycle of the NPC PWM generator
Real-Time model
The RT model is composed of the following two main subsystems: the Console (SC) and the Master (SM).
The console subsystem, which runs on the host computer, manages the communication between the host computer and the target simulator. It is used as a user interface during the real time simulation to control the model and visualize the outputs of the eHS solver.
The master subsystem, which runs in real time on the target simulator, manages the communication between the CPU model and the eHS solver running on the FPGA. For example, gates and sources parameters sent from the console are processed in the PWM Generator and Back-EMF Generator subsystems and subsequently sent to the eHS solver.
Running the model
In order to run the example, follow the procedure below:
If eFPGASIM is installed, add the example project to RT-LAB by selecting File>>New>>RT-LAB Project>>eFPGASIM>Schematic_Editor_Workflow>>eHS Gen 4>>NPC_Inverter.
Compile the RT Model by clicking on Build in RT-LAB.
Once the model has been successfully built, Load and Execute the model in RT-LAB in order to begin the real-time simulation.
Once the real-time model and the eHS are running, observe the results of the eHS simulation by opening the measurements subsystem in the Simulink Console and double click on any of the scopes.
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