PWM Generator (Pulse Averaging)
Carrier-based PWM generator with pulse averaging
Simscape / Electrical / Specialized Power Systems / Power Electronics / Power Electronics Control
The PWM Generator (Pulse Averaging) block generates pulses, averaged over the sample time model, to use with these converter blocks when they have a switching function model selected:
Two-quadrant DC/DC Converter block
Full-Bridge Converter block
Two-Level Converter block
Three-Level NPC Converter block
To use an SPS interpolation technique or SPS switching function models, the SPS solver needs to know when a transition from high-to-low or low-to-high occurs within a sample time. The PWM Generator (Pulse Averaging) block can provide the timing for these transitions.
With this pulse-averaging generator (and the SPS switching function converter models), a much higher sample time can be used for the SPS model while maintaining a high-fidelity simulation. Consequently, this generator serves as a virtual FPGA.
This figure illustrates the operation of the generator for a specified carrier
frequency (Fc) of
2 KHz and a duty cycle (D) of
0.8. The model execution time (Ts) is
The generator outputs a pulse value using a naturally sampled, carrier-based
modulation technique. If a transition occurs within a sample time, the generator will
output a pulse value representing the time ratio (a value between 0 and 1) for the
on state over the sample time. For example, at the sample time
identified by the first blue arrow, the generator outputs a value of 0.25, which
represents that the pulse entered
on at 0.25*Ts seconds (it was
on during 25% of the model execution time). The offset is
represented by the red dashed area. Similarly, at the sample time identified by the
second blue arrow, the generator outputs a value of 0.75, which represents that the
pulse was on during 75% of the model execution time (it entered the off state 0.75*Ts
seconds after the previous sample time).
Vref — Reference voltage
three-phase vector | single-phase scalar
Reference voltage signal used to generate the output pulses, specified as a three-phase vector or a single-phase scalar. Connect this input to a single-phase sinusoidal signal to control a single-phase full-bridge converter, or to a three-phase sinusoidal signal to control a three-phase bridge converter. For linear operation of this block, the magnitude at Vref must be between −1 and +1
This port is visible only if Generator type is set to one of these values:
D — Duty cycle
Duty cycle of the PWM generator. The value must be between 0 and 1.
This port is visible only if Generator type is set to
P — Pulses
Output pulses, returned as a vector.
Generator type — PWM model
Two-level, three-phase (default) |
Full-bridge, single phase |
Type of generator to control. The number of pulses generated by the block is proportional to the number of bridge arms to fire.
Two-quadrantto fire the self-commutated devices of a two-quadrant converter. The duty cycle of the generator is specified by the input D, which determines the percentage of the pulse period that the pulse is on
Full-bridge, single-phaseto fire the self-commutated devices of a single-phase full-bridge converter. Four pulses are then generated. Pulses 1 and 3 fire the upper devices of the first and second arm. Pulses 2 and 4 fire the lower devices
Two-level, three-phase(default) to fire the self-commutated devices of a three-phase bridge converter. Pulses 1, 3, and 5 fire the upper devices of the first, second, and third arms. Pulses 2, 4, and 6 fire the lower devices.
Three-level, three-phaseto fire the self-commutated devices of a three-level three phase bridge. Pulses (1, 2), (5, 6), and (9, 10) fire the upper devices of the first, second, and third arms. Pulses (3, 4), (7, 8), and (11, 12) fire the lower devices of the three arms.
Carrier frequency (Hz) — Carrier signal frequency
Frequency, in Hz, of the triangular carrier signal. The value must be greater than
Carrier initial phase (deg) — Carrier signal initial phase
Carrier signal initial phase, in deg. A value of 90 degrees means that the triangle carrier initial position is set to midpoint between its minimum and maximum value and the slope is positive.
Sample time (s) — Block sample time
Sample time of the block, in s. The value must be positive and greater