Documentation Home Page MMC Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.

MMC Valves Low Level Control Block

Description

This block implements the low level control for the MMC Valves block.  The block can control up to 12 valves. Three different models are supported: CPU-based Average Model, CPU-based switched function model and FPGA-based switched function model.

As input, the block receives the high level control signals, i.e. the modulation index, for each valve and delivers the corresponding control orders according to the type of model. Figure 1 shows the simplified operation of the block for each type of model.

In the average model, the block converts the input vector into the correct formatting expected by the MMC Valves block.

In the CPU-based switched function model, the block implements different voltage balancing algorithms (Sorting or Vmin/Vmax method) and modulation schemes (Pulse Width Modulation PWM or Nearest Level Control NLC)  to generate the gating signals for each sub-module in the valves. The type of algorithm is selected on the MMC Valves Parameters Block. The available control algorithms are explained in Low Level Control methods for CPU-based models (New).

In the FPGA-based switched function model , the block sends the modulation index from the high-level control to the FPGA. The low level control is then implemented inside the FPGA. Note that in that case the algorithms are optimized for FPGA implementation and then they are different from the available options for CPU-based switched function model.

The MMC Valves Low Level Control block must be used together with the MMC Valves Parameters Block and MMC Valves blocks. The first one sets some of the parameters to the block while the second implements the valves model.

a) Configured to control MMC Valves in average model

b) Configured to control MMC Valves in CPU-based switched function model

c) Configured to control MMC Valves in FPGA-based switched function model

Figure 1. MMC Low Level Control block overview for the different type of models

Mask and Parameters

a) Mask configured for CPU-AVM model implementation.

b) Mask configured for CPU-SFM model implementation.

c) Mask configured for FPGA model implementation

Figure 2. MMC Low Level Control block mask visualization for different configurations

General Parameters

The following table presents the block parameters that are common for both CPU as well as FPGA implementations.

NameDescriptionUnitAdmissible Values
Model Type

Selects the type of implementation (inside CPU or FPGA). NB: This parameter must match the value set in the Model Type parameter on the corresponding MMC Valves block. 

N/A{CPU, FPGA}
Number of ValvesNumber of valves to be controlled.  NB: This parameter must match the value set on the corresponding MMC Valves block.N/Aintegers {1,2,3,.... , 12}
TsSimulation time step inside the CPU.seconds>=0

CPU Model Parameters

The following table presents the block parameters that are available when the CPU implementation is selected

NameDescriptionUnitAdmissible Values
CPU Model Type

Selects the type of model to be used in the CPU: Average Model (AVM)  or Switched Function Model (SFM). NB: This parameter must match the value set on the corresponding MMC Valves block. 

N/A{AVM, SFM}
Number of SMs per valveThis parameter is only available if the CPU model type is selected as "SFM". It indicates the number of SMs in each valve.  NB: The value of this parameter must match the value set on the corresponding MMC Valves block. N/A>=0
Number of capacitors per valve

This parameter is only available if the CPU model type is selected as "SFM".  It Specifies the number of capacitors for each valve.

In case of Half-Bridge and Full-Bridge sub-modules, this number is equal to the number of sub-modules per valve. For sub-modules with two capacitors (CD-SM for example) this parameter should be twice the number of sub-modules.  NB: The value of this parameter must match the value set on the corresponding MMC Valves block.

N/A>=0
Carrier Frequency [Hz]This parameter is only available if the CPU model type is selected as "SFM". It sets the carrier frequency for the PWM modulation inside the block.Hz

>0 and <1/(4Ts)

FPGA Model Parameters

The following table presents the block parameters that are available when the FPGA implementation is selected

N/A
NameDescriptionUnitAdmissible Values
OpCntrl / OpLnk blockSpecifies the OpCntrl or OpLnk block to be used to connect the FPGA with the CPU model. The data of the MMC Valves Low Level Control block will be exchanged with he FPGA specified by the selected OpCntrl /OpLnk block. 

To set this parameter the user should use one of the possible options in the list. The list is updated according to the OpCntrl or OpLnk blocks available in the same computation subsystem of the MMC Valves Low Level Control block. If there are no OpCntrl/OpLnk blocks in the same computation subsystem, the block will give an error/warning message to the user. The model can be still compiled but the block will be not connected to the FPGA so the model will not behave as expected. 
N/AThe list is updated according to the available OpCntrl / OpLnk blocks in the model
FPGA  Controller / Link Name

Shows the name used in the selected OpCntrl or OpLnk block. The parameter cannot be set manually, it is updated automatically when selecting a OpCntrl / OpLnk block from the list on the OpCntrl / OpLnk block parameter.

N/Astring
Maximum number of SMs per valve in FPGA license
This parameter must match the available number of SMs supported in the FPGA licenseN/Aintegers
Number of SMs to scopeThis option sets number of SMs per valve, of which measuring information (status and capacitor voltage) is sent from FPGA to the CPU. This data is available on the Scope output of the block. If value is N, the data of 2N SMs per valve are sent. This parameter must have the same value as the parameter Number of SMs to display in MMC Valves Parameters Block block Scope tab. Refer to MMC Valves Parameters Block for more details on how to send data from the SMs inside the FPGA to the CPU.

Gating signal dimension

Number of gating signals being sent to FPGA from CPU. This parameter is used when the gating signals for the SMs inside the FPGA are generated directly on the CPU instead of using the low level control inside the FPGA or an external controller. This can be useful for debugging purposes.

Since sending gating signals to FPGA takes CPU time, this parameter should have a minimum value to avoid sending unused gating signals.



CR discrepancy pattern numberThis parameter is used to generate differences in the  capacitor and shunt resistance parameters in the valve SMs. It determines the number of possible patterns to generate discrepancies in the SM parameters. This parameter should match the number of rows in the Parameter discrepancy data parameter in the MMC Valves Parameters Block block.

CR discrepancy data in one patternThis parameter is used to generate differences in the  capacitor and shunt resistance parameters in the valve SMs. It determines the number of SMs affected by each discrepancy pattern. It should match the number of columns in the Parameter discrepancy data parameter in the MMC Valves Parameters Block block CR discrepancy tab.


Valve group ID

Specifies in which logical group inside the FPGA the valves are simulated.

N/ADepending on FPGA firmware : integers {0,1} or integers {0,1,2,3}

Inputs

NameDescriptionUnitAdmissible Values
MMCParam

It is a bus signal that contains the parameters set coming from the MMC Valves Parameters Block block.

N/AN/A
Vref

It is a vector containing the high level control signals for the valves, i.e. the modulation index for each valve. The number of elements in the Vref input must be the same as selected in the Number of Valves parameter. The position in the vector indicates the valve being controlled, for example the first element in the vector refers to the modulation index of the first valve, while the 4th element refers to the modulation index of the 4th valve.

According to the type of SMs in the valve the modulation index can be in the range of [ 0 , 1 ] if the valve only contains unipolar SMs (Half Bridge for example) or in the range of [ -1 , 1 ] if the valve has bipolar SMs (Full-bridge for example). Going beyond these ranges could result in unexpected behavior.

in p.u.[-1,1] if bipolar SMs or [0,1] if monopolar SMs.
VlvmeasIt is a bus that contains the measurements (current and voltages) on each of the valves. This input can be connected directly with the meas output on the corresponding MMC Valves block. To see the signals inside the bus, please refer to the MMC Valves block documentation.[A], [V](-inf, inf)
Vcap

It is a bus signal that contains the valves capacitor voltages when the valves are simulated in the CPU-based switched function model. For average model or FPGA-based switched function model the signal is empty.

This port can be connected directly with the Vcap output on the corresponding MMC Valves block. To see the signals inside the bus, please refer to the MMC Valves block documentation. 

in p.u.[0,inf)

Outputs

NameDescriptionUnitAdmissible Values
VlvCtrlContains the control signals for the MMC Valves. This signal can be connected directly to the MMC Valves block. According to the type of model, the signal has different formatting and contents.

CPU implementation

Average Model

For an Average model in CPU, VlvCtrl is a bus signal containing the following signals:

  • v1, v2, v3, .... → each of this signals is a bus containing the modulation index for each valve. The signal v1 contains the modulation index for valve 1, the signal v2 the modulation index for valve 2 and so on.  The block takes the data from the Vref  input and organizes it in this bus format. Thus, the VlvCtrl output contains exactly the same contents as Vref but reorganized in a bus form.

Switched function model

For a switched function model implemented in the CPU, VlvCtrl is a bus signal containing the following signals:

  • v1, v2, v3, .... → each of this signals is a bus containing the control signals for all the SMs in each valve. The signal v1 contains the controls signals for valve 1, the signal v2 the control signals for valve 2 and so on.  The VlvCtrl input contains as much signals as the number of valves selected in the Number of Valves parameter. For example, if the number of valves is three only v1, v2 and v3 are created but if is 12 then the block creates 12 signals : v1, v2, v3 .... v12. To work properly the number of elements in the input Vref must match the Number of Valves parameter.

Each of the signals v1, v2, v3, ...  is also a bus containing the following signals:

  • g1, g2, g3, g4, g5 → each signal is a vector containing the gate signals for each SM switch. The number of elements in the g1 to g5 vectors is equal to the Number of SMs per valve parameter. The elements in each vector (g1 to g5), are organized based on the corresponding SM in each valve. For example, the first element on g1 refers to the control signal of the switch g1 of the first SM, while the 13th element on g4 refers to the control signal of the switch g4 on the 13th SM. For each signal, 1 means the corresponding switch is closed while 0 means that it is open. The SMs are counted from the positive terminal of the valve to the negative terminal, i.e. the first SM being the closest to the positive terminal.  Note that each valve control signal (v1, v2, v3, ... ) has always the five signals g1 to g5, even if the SM does not have all the switches (for example a Half-Bridge SM only has g1 and g2). Thus  for sub-modules with less than 5 switches, a zero is sent to the unneeded gating signals.

FPGA implementation

In the case of a model implementation in the FPGA, the VlvCtrl is an empty signal since the control signals are sent to the model inside the FPGA.

[A], [V]
(-inf, inf)
Vcap_ave

It is a vector signal that contains the average value of the SM capacitors on each valve, i.e. ΣVcap / Nsm. In the CPU model implementations, the block calculates this output taking into account the data in the Vlvmeas and Vcap inputs. In an FPGA implementation, the blocks extracts this data directly from the information sent from the FPGA.

The number of elements in Vcap_ave depends on the number of valves. The position in the vector represents the corresponding valve, i.e. the first element corresponds to the valve number 1, the second to the valve 2 and so on.

This output is given in per unit. For FPGA implementations the capacitor voltages are saturated at 4 p.u.

in p.u.[0,inf) for CPU implementations

[0,4] for FPGA implementations. 
Scope

This signal contains the individual data of some of the SMs inside the FPGA to be scoped.  Thus, in the CPU implementations this signal is empty.

The sctructure of the Scope output is two buses:

  • vlv1to6 → it is a bus signal that contains the data of SMs in valves 1 to 6.
  • vlv7to12 →  it is a bus signal that contains the data of SMs in valves 7 to 12. It is available only if Number of Valves is greater than 6. The signal format is the same as vlv1to6.

Note that the Scope output always gives information by groups of 6 valves (vlv1to6 and optionally vlv7to12), independently of the number of valves. For example if Number of Valves = 3, the Scope signal will provide data as if there was 6 valves. In that case only the data of valves 1 to 3 is meaningful. 



Examples

Limitations

  • The number of valves per block is limited to 12. Though, several MMC Valves Low Level Control blocks could be used in the same system for larger applications. However the number of valves per FPGA is limited to 12 in the current firmware versions.
  • All the valves are controlled with the same control approach (modulation and VBC). It is not possible to control some valves with one algorithm and others with another. For that case several MMC Valves Low Level Control blocks should be used
  • The frequency at which the VBC is executed cannot be controlled. For example to have a sorting VBC with a frequency several times lower than that dictated by the time step.

Version History

This block has been introduced in MMC 2.10.0

See Also

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