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.
How to Create a Circuit Model
Procedure
This article describes the requirements for creating a circuit model to simulate with the eHS Solver.
Consider using a Template Circuit as a starting point.
Open MathWorks Simulink to use the Simscape Electrical Specialized Power Systems Simulink Blockset. See Supported Circuit Editors for more information.
Add a powergui block to the Simulink model.
Optional: Double click the powergui block and navigate to the Solver tab. Configure the parameters as shown below:
Configuration Parameters | Value |
---|---|
Simulation type | Discrete |
Solver type | Backward Euler |
Sample time (s) | 1e-6 |
Optional: Navigate to Simulation >> Configuration Parameters >> Solver, and set the Solver Type to Fixed-Step. Under Additional Parameters, set the Fixed Step Size to 1e-6 (this value must match the one in the powergui block).
Build the circuit using only supported components.
Add Current and Voltage Measurement blocks at locations of interest. The eHS solver will output these measurements during the simulation.
Configure the parameters of each individual component and provide descriptive names. It is recommended, but not required, to start Source component names with the index UXX, Switch component names with SWXX, and Measurement component names with YXX.
Add a Ground block to the circuit. This is required.
Optional: Add Scope blocks and signal generators to the source components to allow the model to generate results offline. Note that these and any other components not supported by the eHS solver will be ignored during the FPGA simulation. They are for offline execution only.
Save the model and press Run to confirm that there are no errors. A model that does not run successfully cannot be loaded into eHS.
Figure 1. A Half-Wave Rectifier and Voltage Divider circuit model. In this model, the Sine Wave block (grey), Scope block (yellow), and Goto Tags exist for offline simulation purposes only, and will be ignored by the eHS Solver when the circuit is simulated on the FPGA.
Related Links
How to Add a Circuit Model to the System Definition
How to Simulate a Three Phase Voltage Source using Sinewave Generators
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