Documentation Home Page ◇ Power Electronics Add-On for NI VeriStand Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.
Circuit Model Scenarios
This example demonstrates the Scenarios feature and how it can be used to modify the characteristics of passive elements in the Circuit Model during the simulation. A simple voltage divider circuit is loaded and pre-configured with a set of Scenarios containing different resistance values for each the two resistors, R1 and R2. During the simulation, we can toggle between Scenarios to observe the effects of modifying R1 and R2. In a power electronics HIL application, Scenarios are often used to simulate fault conditions, such as the shorting of an IGBT in an inverter. Refer to this article How To Simulate IGBT-Level Faults in a Two-Level Inverter Using eHS for more information.
The example is available as two separate VeriStand projects, one providing support for the PXIe-7868R FPGA card and the other for the PXIe-7891 FPGA card. Both projects demonstrate the same concepts and behave almost identically.
Example Directory | <Public Documents>\National Instruments\<NI VeriStand 20xx>\Examples\OPAL-RT\Power Electronics Add-On\Circuit Model Scenarios |
---|---|
Project Path | <Circuit Model Scenarios>\Project\<NI PXIe-XXXX>\Circuit Model Scenarios.nivsprj |
Reference Documentation | How to Use the Scenarios Feature How To Simulate IGBT-Level Faults in a Two-Level Inverter Using eHS |
Circuit Model Scenarios in Real Time
The circuit model used in this example contains Measurements allowing us to monitor the input voltage (Vin), output voltage (Vout), and current (I) of the simulated voltage divider. Open Circuit Model Scenarios.nivsscr and observe the relationship between the Vout and Vin signals, as well as the Voltage Divider Current, I, displayed in the second graph.
Modify the Frequency, Amplitude, and Offset parameters of the Source Voltage to observe their effects on Vout and I.
The Scenario Resistances table in the grey box shows the R1 and R2 resistance values defined for each Scenario. Scroll through the Scenario Index values to observe the effects of the changing resistances on the output voltage of the circuit, Vout.
Comparing Offline Results
The circuit model file used in this example contains additional blocks not parsed by the eHS solver. They allow the model to be run directly in Simulink so that the offline results can be compared with those obtained in the Real Time simulation.
Open the circuit model file in Simulink and click Run to start the offline simulation. Double-click the grey Scope block to view the output signals Vin, Vout, and I. The source voltage parameters and the R1 and R2 resistance values used in the offline simulation are defined in the file ParameterInitialization.m. They can be modified directly in that file, or from the MATLAB Workspace.
Circuit Model File Path: <Circuit Model Scenarios>\Circuit Model\Voltage_Divider.slx
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