PWM Generator
Generate pulse width modulated signal or waveform
Libraries:
      Simscape / 
      Electrical / 
      Control / 
      Pulse Width Modulation
   
Description
The PWM Generator block implements a PWM generator. The pulse width modulation technique controls power transfer from one electrical component to another by quickly switching between full power transfer and no power transfer.
Working Principle
The PWM generator block outputs either 1 when the duty cycle is
                greater than the carrier counter value, or 0 otherwise. You can
                set the period of each cycle by specifying the timer period Tper.
                You can change the initial output, or phase, of the PWM output by specifying one of
                three types of carrier counters: 
- Up counter — The PWM output signal initializes at the start of the - oncycle. This graphic shows the carrier counter signal and the corresponding PWM output. 
- Down counter — The PWM output signal initializes at the start of the - offcycle. This graphic shows the carrier counter signal and the corresponding PWM output. 
- Up-down counter — The PWM output signal initializes halfway through the - oncycle. This graphic shows the carrier counter signal and the corresponding PWM output. 
Examples
Ports
Input
Output
Parameters
Extended Capabilities
Version History
Introduced in R2017b





