Support : Knowledge base

Knowledge Base

Welcome to OPAL-RT’s Knowledge Base

OPAL-RT offers a repository of support information for optimal use of its technology.

Loading…

Please note that OPAL-RT knowledge base is not fully optimized for mobile platforms.

For optimal experience, use a desktop computer.

Reference Number: AA-01991// Views: AA-01991// Created: 2021-02-16 18:11:05// Last Updated: 2021-02-18 20:36:53
HowTo
How to Use a Custom eHSgen4 Firmware - SimPowerSystems Workflow

How to Use a Custom eHSgen4 Firmware - SimPowerSystems Workflow

Many eHSgen4 examples can be found in the eFPGAsim installation folder: C:\OPAL-RT\eFPGAsim\v2.x.x.xx\Examples\SimPowerSystems_Workflow

In the standard eHSgen4 firmware, the eHS sources control are: CPU Model, Analog Input and Sine Wave Generator. The eHS gates control are CPU Model, Digital Input and PWM. For a custom eHSgen4 firmware, the eHS sources control and the eHS gates control can pretty much be anything, depending on the custom firmware design.

Scenario 1: Custom eHSgen4 firmware purchased

For every purchased custom eHSgen4 firmware, there is a test model delivered with it. The best practice is to use this test model as a basis for any model the user plans on designing. This ensures that the eHSgen4 solver block is already properly parametrized. That means that the list of eHS sources control and the list of eHS gates control available to the user will be specific (and accurate) to the custom firmware being used.

Scenario 2: Custom eHSgen4 firmware designed by the user using the XILINX and RT-XSG tools

In the case where the user generates its own firmware, it is required to modify the eHSgen4 solver block accordingly. Here is how to proceed:

1)    In the eHS solver mask, select the Firmware Config tab and check the box Use a custom firmware configuration. The user now has to define the Custom input sources enumeration matrix and the Custom gate sources enumeration matrix. 

2)    The custom firmware configuration information is taken from the firmware model. In the following vector information, the first ‘index’ corresponds to the name that will show in the Inputs tab/Input source, the second corresponds to the input group index going in the eHS solver blackbox (see images below) and the third index corresponds to the dimensions of the signal:

Reference: {'name',eHS_input_group_index,dimension;'name',eHS_input_group_index,dimension; ... }

  

Here is the content of this example firmware for the input sources:

{'CPU Model',0,128;

'Sine Wave Generator',3,32;

'PMSM',2,8;

'IM',4,16;

'SRM',5,10;

'SFP0',6,32}

The same principle applies for the gate sources.

To recap, in the above example, the Custom input sources enumeration is: {'CPU Model',0,128;'Sine Wave Generator',3,32;'PMSM',2,8;'IM',4,16;'SRM',5,10;'SFP0',6,32}

And the Custom gate sources enumeration is: {'CPU Model',0,72;'Digital Inputs',2,32;'PWM',1,32}

3) Once set and the changes applied, in the Inputs tab, click on Configure Inputs. The new custom Input Sources will be selectable:


4) In the Gates tab, click on Configure Switch Gates. The new custom Gate Signal Sources will be selectable: