PWM Operations

The PWM module in the dsPIC30F and dsPIC33F offers versatility allowing power conversion designers to use one single dsPIC® to manage up to 10 different PWM output waveforms in various topologies without using multiple analog PWM controller chips. This saves system costs, development time and reduces time to market. This section focuses on the different PWM peripheral native mode operations demonstrating the dsPIC® Digital Signal Controllers (DSCs) capability for power conversion and monitoring applications.

dsPIC® DSC Power Conversion and Monitoring Features

  • 10-bit, 1 to 2.2 Msps A/D converter
  • Up to 8 sample/hold
  • A/D sampling synchronized to PWM cycle
  • 6 or 8 PWM output
  • Complementary or independent PWM
  • Center-aligned or edge-aligned PWM
  • 1 or 2 fault pins
  • 58.6 kHz PWM frequency at 10-bit resolution (at 30 MIPS)
  • Up to 2 programmable dead time settings
  • 28-, 40-, 64-, 80- and 100-pin variants
  • 5V native operation for noisy environments (dsPIC30F)

Power Conversion and Monitor Applications

  • Power and environment monitor in servers
  • Power management for equipment
  • Circuit breakers
  • Arc fault detection
  • Auxiliary power unit
  • Electric vehicles
  • AC to DC converters
  • DC to DC converters
  • Power factor correction
  • Inverters
  • Online UPS
  • Welding machines

PWM Peripheral Modes of Operations

To accommodate the wide range of power conversion and monitoring applications, the PWM module of the dsPIC® DSCs is able to generate different types of output waveform during PWM peripheral initialization. In the next several sections, the various native modes of operation of the PWM peripherals are covered.

Complementary Mode

Complementary PWM outputs can be used to drive FET Driver that drives the switch in power converter applications. The figure below shows an example of the dsPIC33FJ16GS504 Phase-Shift ZVT Converter application. In the ZVT operation, the stored energy in the inductor is transferred to the capacitor in parallel with the MOSFET. The PWM1, and PWM2 outputs of the dsPIC33FJ16GS504 are configured to operate in the complementary PWM mode driving the MOSFET drivers.


The duty cycle of these PWM signals is fixed at 50%. Dead time for the rising and falling edges is also inserted to prevent shoot-through, as shown below.


Reference: Dead Time Register


dsPIC33FJ32GS406 DTRx: PWM Dead-Time Register

Redundant Mode

In Redundant PWM Output mode, the high-speed PWM module has the ability to provide two copies of a single-ended PWM output signal per PWM pin pair (PWMxH, PWMxL). This mode uses the PDCx register to specify the duty cycle. In this output mode, the two PWM output pins will provide the same PWM signal unless the user application specifies an override value.


Reference: PDCx: PWM Generator Duty Cycle Register



Independent Mode

In True Independent PWM Output mode, the PWM outputs (PWMxH and PWMxL) can have different duty cycles and are phase shifted relative to each other, as shown in the figure below.


Application example: Power Factor Correction (PFC) Boost Converter

The control of the PFC Boost Converter is obtained by varying the duty cycle of the PWM signal. Only one pin of the PWM is utilized for the PFC control scheme. Therefore, the PWM module is configured for independent output mode. The frequency of the PWM is determined by the hardware design. The figure below shows the PFC Boost Converter Application diagram, using dsPIC33FJ16GS504.


Reference: PFC Control Scheme
The PFC Boost Converter uses an outer voltage loop and inner current loop control scheme. The output of the voltage error compensator is multiplied by a function of the rectified AC mains voltage to generate a sinusoidal current reference.

An additional feed-forward term is introduced, |VAC|MEAN, at the output of the voltage error compensator to make the control loop immune to fluctuations in the AC input voltage. This feed-forward term ensures that the PFC Boost Converter always delivers the correct output power for the entire input voltage range. The PFC voltage and current error compensators are both implemented as Proportional-Integral (PI) systems with excess error compensation. The compensator functions are math intensive routines and utilize the DSP engine of the dsPIC® DSC. The output of the PFC Current compensator modifies the PWM duty cycle to maintain a constant output voltage and also a sinusoidal input current waveform. Both the current and voltage compensators are executed in the ADC ISR. The current control loop is executed at a much faster rate compared to the voltage control loop.

Application Note: Power Factor Correction in Power Conversion Applications Using the dsPIC® DSC, AN1106


Push-Pull PWM Mode

The Push-Pull PWM mode alternately outputs the PWM signal on one of two PWM pins. In this mode, the complementary PWM output is not available. This mode is useful in synchronous rectifier topologies, and transformer-based power converter design that avoid the flow of direct current saturating their cores. The Push-Pull mode ensures that the duty cycle of the two phases is identical, thus yielding a net zero DC bias. The figure below shows an example of the Push-Pull PWM signals.


Multi-Phase PWM Mode

The Multi-Phase PWM uses phase shift values in the PHASEx registers to shift the PWM outputs with respect to the primary time base. Because the phase shift values are added to the primary time base, the phase shifted outputs occur earlier than a PWM signal that specifies zero phase shifts. In the Multi-Phase mode, the specified phase shift is set by the application design. Phase shift is available in all PWM modes that use the master time base. Multi-phase PWM is often used in DC-to-DC converters that handle fast load current transients, and need to meet smaller space requirements.

A multi-phase converter is essentially a parallel array of buck converters that are operated slightly out of phase with each other. The multiple phases create an effective switching speed equal to the sum of the individual converters. If a single phase is operating at a PWM frequency of 333 kHz, the effective switching frequency for the circuit is 1 MHz. This high switching frequency greatly reduces the input and output capacitor size requirements. It also improves the load transient response and ripple. Below is an example of multi-phase PWM output.


Application example: Multi-phase Synchronous Buck Converter
In some cases, the load current exceeds what an individual converter can handle. As a result, multiple converters are needed to deliver the desired load. The example below shows a Multi-Phase Synchronous Buck converter, connecting three converters in parallel. To optimize the input and output capacitors, all the parallel converters operate on the same time base and each converter starts switching after a fixed time/phase from the previous one.


The switching waveform of the above synchronous buck converter is shown below.


Variable Phase PWM Mode

Variable Phase PWM is useful in Zero Voltage Transition (ZVT) power converters. Here, the PWM duty cycle is always 50% and the power flow is controlled by varying the relative phase shift between the two PWM generators. Below is an example of the variable phase PWM outputs.


The Variable Phase PWM constantly changes the phase shift among PWM channels to control the flow of power, which is in contrast with most PWM circuits that vary the duty cycle of PWM signal to control power flow. The phase shift value is available to all PWM modes that use the master time base. In standard PWM methods, when a transistor switches between the conducting state and the non-conducting state, and vice versa, the transistor is exposed to the full current and voltage conditions during the transistor's ON or OFF time, and the power loss becomes apparent at high frequencies. The Zero Voltage Switching (ZVS) and Zero Current Switching (ZVC) circuit topologies use quasi-resonant techniques that shift either the voltage or the current waveforms relative to each other. This changes the value of the voltage or the current to zero when the transistor turns ON or OFF. If either the current or the voltage is zero, no switching loss occurs.

Application example: Full-Bridge ZVT Converter
A ZVT Full-Bridge converter is shown in the figure below. It is a standard Full-Bridge converter, with additional series resonant inductance, which limits the rise rate of current at switching transitions and can eliminate turn-off switching power dissipation in the MOSFETs. The stray leakage inductance of the transformer forms part of the series resonant inductor. In this particular design it is large enough to ensure quasi-resonant operation over 80% of the operating power range without the need for an additional inductor. The secondary-side high-frequency rectification is normally done by using ultrafast recovery rectifiers or Schottky diodes.


ZVT operation occurs when the stored energy in the inductor is transferred to the capacitor in parallel with the MOSFET. In this design, the stray output capacitance of the MOSFET is large enough to not require additional capacitors in parallel. The Variable-Phase Q1 to Q4 waveforms are shown in the figure below.


App Note: Phase-Shifted Full-Bridge (PSFB) Quarter Brick DC/DC Converter Reference Design Using a dsPIC® DSC, AN1335


The dsPIC® SMPS AC-DC Reference Design provides an easy method to evaluate the power and features of SMPS dsPIC® Digital Signal Controllers for high wattage AC - DC conversion application. Discover the many benefits of digital power control implementation in this reference design. The SMPS AC - DC Reference Design unit works with universal input voltage range and produces multiple DC outputs. The design is based on a modular structure which features three major power stages; the input stage, intermediate stage, and the third stage, a Point of Load. The input stage is a PFC Boost Converter, the intermediate stage is a Phase-Shifted Zero Voltage Transition (ZVT) Converter, which includes ZVT Full Bridge Converter and Synchronous Rectification, and the third stage is Single-phase and Multi-phase Buck Converters. This reference design uses two dsPIC33F16GS504 devices; one used for the PFC Boost Converter and ZVT Full Bridge Converter, while the other dsPIC® DSC is used for Single-phase and Multi-phase Buck Converters.


© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.