Contenido principal

PWM Timing and Waveform Generator (Four-phase, Two-level)

Generate four-phase, two-level gating time information

Since R2026a

  • PWM Timing and Waveform Generator (Four-phase, Two-level) block icon

Libraries:
Simscape / Electrical / Control / Pulse Width Modulation

Description

The PWM Timing and Waveform Generator (Four-phase, Two-level) block controls the switching behavior for a four-phase, two-level power converter. The block calculates on-gating and off-gating times and modulation waves based on these block inputs:

  • Four sinusoidal reference voltages

  • A DC-link voltage

You can use this block together with average converters to speed up the simulation.

Continuous PWM

The block only provides continuous pulse width modulation (PWM). The figure shows the general difference between continuous sinusoidal pulse width modulation (SPWM) and continuous space vector modulation (SVM) waveforms.

Two plots compare continuous sinusoidal PWM and continuous space vector modulation. The top plot shows a smooth sinusoidal waveform above a dashed reference line. The bottom plot shows the corresponding SVM waveform, which follows the same general shape but with flattened segments near the peaks and troughs. Both waveforms share similar amplitude and frequency for comparison.

Sampling Mode

This block allows you to choose natural, symmetric, or asymmetric sampling of the modulation wave.

The PWM Timing and Waveform Generator (Four-phase, Two-level) block does not perform carrier-based PWM. Instead, the block uses input signals to calculate the gating times.

Carrier-based PWM is, however, useful for showing how the sampling mode that you select relates to the switch-on and switch-off behavior of the pulses that the block generates. A generator that uses a two-level, carrier-based PWM method:

  1. Samples a reference wave

  2. Compares the sample to a triangle carrier wave

  3. Generates a switch-on pulse if a sample is higher than the carrier signal or a switch-off pulse if a sample is lower than the carrier wave

To determine switch-on and switch-off pulse behavior, a two-level carrier-based PWM generator uses these methods to sample the triangle wave:

  • Natural — The sampling and comparison occur at the intersection points of the modulation wave and the carrier wave.

    A sine modulation wave is plotted over a high‑frequency triangle carrier wave. Sampling points appear at each intersection between the sine wave and the carrier wave. These points generate a corresponding PWM pulse train shown below the plot.

  • Asymmetric — Sampling occurs at the upper and lower boundaries of the carrier wave. The comparison occurs at the intersection that follows the sampling.

    A sine modulation wave is overlaid on a high‑frequency triangle carrier wave. Sampling occurs at both the upper and lower peaks of the carrier wave, marked with points. Comparison points appear at these intersections between the sine wave and the carrier, producing a PWM pulse train displayed below the plot.

  • Symmetric — Sampling occurs at only the upper boundary of the carrier wave. The comparison occurs at the intersection that follows the sampling.

    A sine modulation wave is overlaid on a high‑frequency triangle carrier wave. Sampling points appear only at the upper peaks of the carrier wave, with comparison taken at the next intersection between the modulation and carrier waves. A PWM pulse train generated from these events is displayed below the plot.

Ports

Input

expand all

Sinusoidal voltages that you want the attached converter to output, specified as a vector of four elements, with one element for each phase.

Positive real number for the DC-link voltage of the converter, specified as a scalar.

Output

expand all

Switch-on gating time, returned as a vector of four elements, with one element for each phase.

Switch-off gating time, returned as a vector of four elements, with one element for each phase.

Modulation waves, returned as a vector of four elements, with one element for each phase.

Parameters

expand all

Continuous PWM method.

Wave-sampling method. The sampling mode determines whether the block samples the modulation waveform when the waves intersect or when the carrier wave is at one or both of its boundary conditions.

Rate at which the switches in the power converter switch, in Hz.

Extended Capabilities

expand all

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2026a