Pour la documentation en FRANÇAIS, utilisez l’outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.


This article describes the requirements for creating a circuit model to simulate with the eHS Solver.

  1. Consider using an existing circuit model from the Examples section as a starting point.
  2. Open MathWorks Simulink to use the Simscape Electrical Specialized Power Systems Simulink Blockset.  See Supported Circuit Editors for more information.
  3. Add a powergui block to the Simulink model.
  4. Optional: Double click the powergui block and navigate to the Solver tab.  Configure the parameters as shown below:

    Simulation typeDiscrete
    Solver typeBackward Euler
    Sample time (s)1e-6
  5. 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).

    The parameters configured in steps 4 and 5 do not affect the eHS solver; they are used only if the model is executed directly in Simulink (offline mode).  Offline simulation is typically done for model validation purposes, and to generate benchmark data to compare against the results from the eHS Solver.  The Discrete Backward Euler solver generates offline results most similar to those of the eHS solver.

  6. Build the circuit using only supported components.
  7. Add Current and Voltage Measurement blocks at locations of interest.  The eHS solver will output these measurements during the simulation.
  8. 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.
  9. Add a Ground block to the circuit.  This is required.
  10. 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.
  11. 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.

How to Add a Circuit Model to the System Definition

How to Simulate a Three Phase Voltage Source using Sinewave Generators

How to Simulate a Drive with a Machine

  • No labels