MMC Submodule Selection (mmcBalance)
Picks which submodules of an MMC arm to insert: how many from the insertion index m, which ones by sorting the capacitor voltages.
Group: Control · Kind: {"block":"mmcBalance","kind":"control"}
When to use it
The MMC Arm part already holds one. Use this block on its own when you build the submodules by hand, for example with MOSFETs or IGBTs and their losses, and need the nearest-level or phase-shifted modulation and the capacitor balance for them.
Pins
| Pin | Domain | Meaning |
|---|---|---|
m |
signal | Insertion index: 0 … 1, or −1 … 1 with bipolar 1 |
i |
signal | Arm current, positive when it charges an inserted capacitor |
v1 |
signal | Capacitor voltage of submodule 1 |
v2 |
signal | Capacitor voltage of submodule 2 (read when n is 2 or more) |
v3 |
signal | Capacitor voltage of submodule 3 (read when n is 3 or more) |
v4 |
signal | Capacitor voltage of submodule 4 (read when n is 4 or more) |
v5 |
signal | Capacitor voltage of submodule 5 (read when n is 5 or more) |
v6 |
signal | Capacitor voltage of submodule 6 (read when n is 6 or more) |
v7 |
signal | Capacitor voltage of submodule 7 (read when n is 7 or more) |
v8 |
signal | Capacitor voltage of submodule 8 (read when n is 8) |
g1 |
signal | Submodule 1: 1 inserted, 0 bypassed, −1 inserted reversed |
g2 |
signal | Submodule 2 |
g3 |
signal | Submodule 3 |
g4 |
signal | Submodule 4 |
g5 |
signal | Submodule 5 |
g6 |
signal | Submodule 6 |
g7 |
signal | Submodule 7 |
g8 |
signal | Submodule 8 |
Common parameters
n: Submodules selected, 1 to 8: inputs v1 … v<n>, outputs g1 … g<n> (Default: 4)fc: Carrier frequency of the phase-shifted PWM (n carriers shifted by 1/n of a period); 0 inserts the nearest level, round(m·n) (Default: 0)bipolar: Set to 1 for full-bridge submodules: m from −1 to 1, and a negative m inserts submodules reversed (g = −1) (Default: 0)
Parameters
| Key | Unit | Default | Typical range | Description |
|---|---|---|---|---|
n |
— | 4 | Submodules selected, 1 to 8: inputs v1 … v<n>, outputs g1 … g<n> | |
fc |
Hz | 0 | Carrier frequency of the phase-shifted PWM (n carriers shifted by 1/n of a period); 0 inserts the nearest level, round(m·n) | |
bipolar |
— | 0 | Set to 1 for full-bridge submodules: m from −1 to 1, and a negative m inserts submodules reversed (g = −1) | |
sorting |
— | 1 | Set to 0 to switch the sorting balance off: submodules go in by index, lowest first, and leave highest first |
Parameter descriptions are in English in both languages.
Model
How many: round(m·n) with fc = 0 (nearest level); with fc above 0, n triangle carriers from 0 to 1, carrier k shifted by k/n of a period, and the count is the number of carriers below |m|, which averages |m|·n over a carrier period. Which ones: while s·i is positive (s the insertion polarity) the capacitors charge, so the lowest are inserted; otherwise the highest. When the count rises only the new submodules are picked from the bypassed ones, and when it falls only the leaving ones from the inserted ones, so a submodule switches only when the level changes. Voltages within a billionth of the arm's largest count as equal and go to the lower index, so the solver's rounding never picks the submodule. With sorting 0 the order is fixed instead: the lowest index goes in first and leaves last, so the capacitor voltages drift apart; it shows what the sorting does. With bipolar 1 a negative count inserts submodules reversed, and a change of polarity sorts again from scratch. The block reports the carrier crossings so the solver lands on them.
Common mistakes
- The arm current must be measured in the direction that charges an inserted capacitor. With the sign reversed the sorting inserts the wrong submodules and the capacitor voltages drift apart.
- The selection changes only at a change of level. With m held still, the capacitors drift apart until the level moves again; that is the price of fewer switchings.
Datasheet and sources
There is no datasheet. Set n to the submodules in the arm and fc to the carrier frequency of each submodule.
Example
Open the example with the command file.openExample and the name demo:mmcBalance.
Generated by cargo xtask reference from the usage texts and parameter specs. Do not edit by hand.