Appearance
PWM Generator
Pulse-width modulation source. Compares an internal triangle/sawtooth carrier (frequency f_sw) against an input duty signal to produce a 0/A switching waveform that drives an IGBT, MOSFET, or other power switch.
Category: Sources
Keywords: pulse width modulation, pulse-width modulation, switching, modulation, carrier, duty, duty cycle, f_sw
Ports
| Name | Direction | Value type | Notes |
|---|---|---|---|
duty | input | double | |
out | output | double |
Parameters
| Name | Label | Type | Default | Units | Description |
|---|---|---|---|---|---|
frequency | f_sw | double | 1000 | — | Switching (carrier) frequency in Hz |
amplitude | A | double | 1 | — | High-state output value (low state is 0) |
phase | φ | double | 0 | — | Carrier phase offset, normalised to one switching period (0..1) |
polarity | Polarity | enum (Active high / Inverted) | 0 | — | 0 = active high (out=A while duty>ramp), 1 = inverted |
Used in samples
Implemented in C++ class SimCompCtlPwm (components/control/CSim_comp_ctl_pwm/sim_comp_ctl_pwm.h).