What are the major differences between using an IEC 61400-27 DLL in Modelica Model Type (TypMdl) and DSL Model Type (BlkDef)?

Category:
Dynamic Simulation
Answer

Onwards PowerFactory 2022, an IEC 61400-27 DLL (defined in IEC 61400-27-2 Edition 1 Annex G) can be used in Modelica Model Type (TypMdl) in addition to DSL Model Type (BlkDef). It is recommended that these DLLs be used in the TypMdl objects. The differences between using the DLL in TypMdl or BlkDef are listed in the following table,

  TypMdl/ElmMdl BlkDef/ElmDsl
Snapshot supported not available
Parameter event (EvtParam)

Not supported

Workaround: Instead of changing the input signals directly via parameter events (which is not supported), apply the event indirectly by connecting the input signals to the outputs of another DSL model. Then, apply the event to the inputs or parameters of this DSL model. This approach allows the changes to propagate through the signal connection, indirectly modifying the original input signal.

If parameters need to be modified, convert them into input signals and follow the same method: connect them to another DSL model's output and apply the event to the DSL model's inputs or parameters.

Supported for parameters. Note that as the standard does not describe how a parameter change during simulation should be handled, it is not recommended to apply to EvtParam.
Simulation solver interaction The solver will call respective interface functions at the exact sample time instants.
  • In the source code the field “GeneralInformation” of the structure “StaticExtSimEnvCapi” contains the text “-PFPrecise”: the solver will call respective interface functions at the exact sample time instants.
  • In the source code field “GeneralInformation” of the structure “StaticExtSimEnvCapi” does not contain the text “-PFPrecise”: the solver will call respective interface functions at the closest possible time instant with respect to the sample time, without generating an interrupt event.
Note that the text “-PFPrecise” is a PowerFactory specific.
Output and input vector signal naming
Names of the vector signals remain the same

Vector signals are converted to scalar signals and names are updated as follows,

  • if size of the variable is 1 (a scalar) then the signal name (as utilised in a PowerFactory Composite Model Frame) is the same as the DLL model variable field ...PortsInfo.name
  • if size of variable is 2 (an array variable) then two scalar signals are automatically created with signal names “variablename_r” and “variablename_i”, where variablename is the variable name defined in the DLL model variable field ...PortsInfo.name of the array variable.
  • if size of array is 3 (an array variable) then three scalar signals are automatically created with signal names “variablename_a”, “variablename_b” and “variablename_c”, where variablename is the variable name defined in the DLL model variable field ...PortsInfo.name of the array variable.
  • if size of array is n with (n > 3) (an array variable) then n scalar signals are automatically created with signal names “variablename_1”, “variablename_2”, .., “variablename_-n”, where variablename is the variable name defined in the DLL model variable field ...PortsInfo.name of the array variable.
Interpretation of dot within naming of parameters Names will be considered as tree structures, so it is not recommended to use dots in the names. Note that the IEC standard does not specify any variable naming convention.

Not supported

 

Back