Download document () of 20
HVAC Automation Compass banner
Pulse Width Modulation in action: Temperature control   |   Zone control  

Pulse Width Modulation (PWM): Variable control

A nano programmable logic controller (PLC) can be used to control the electrical power supplied to an electrical heater in a furnace by using Pulse Width Modulation (PWM). 

A variable pulse of full power is supplied to the system. The bigger the difference between the setpoint and feedback from a device, the longer the percentage of time the pulse will be on. As the pulses are added together, average power is supplied to a heater.

Roof Top HVAC small
Pulse-width method of temperature control
Figure 1: Pulse-width method of temperature control 

How Pulse Width Modulation control works

PWM is a closed loop control algorithm that is used to produce a time-averaged signal by combining individual pulses of varied width together.

The widths of the pulses differ over the time period based on the difference between the setpoint and temperature feedback from a device. 

The larger the error, the larger percentage of time the pulse is on compared to off, also known as the duty cycle. Since the duty cycle changes quickly compared to the system reaction time, the function helps to prevent overshooting and undershooting.

Female warehouse worker
Theory of pulse-width modulation depicting the averaging of pulses over time
Figure 2: Theory of pulse-width modulation depicting the averaging of pulses over time

Using PWM to control the power provided to a system

The easyE4 nano programmable logic controller (PLC) can be used to implement PWM to control the power provided to electrical heaters. 

The setpoints can be input directly on the faceplate, set through pots, or sent to the easy from another PLC through Modbus TCP. 

Likewise, the temperature feedback from a device, such as a Resistance Temperature Detector (RTD), can be wired into the PLC via a temperature expansion unit. 

The colder the feedback is from the setpoint, the longer the electrical pulse to the heater will be on. Therefore, the average power supplied to the heater will be greater, causing the temperature to increase until it reaches the desired setpoint.

Pulse-width modulation for temperature control
Figure 3: Pulse Width Modulation for temperature control

Control two Pulse Width Modulated outputs simultaneously

The easyE4 nano PLC can control two pulse width modulated outputs simultaneously.

It is also important to note that the PWM function can only be used on the first two outputs of a base unit, so choosing the correct product is important because the transistor output unit is needed for faster switching times.

However, most heaters take some time to thermally react to a change in power, so a relay module works perfectly. In the following example we demonstrate how to create a PWM function with a time base of 10 seconds.

Here is the logic to create a PWM function with a time base of 10 seconds and a minimum duration of 0.5 seconds. The percentage of time that the output is on is controlled by the cutoff gain.

PWM function with a time base of 10 seconds and a minimum duration of 0.5 seconds
Figure 3: PWM function with a time base of 10 seconds and a minimum duration of 0.5 seconds

Achieving a proportion gain

The cutoff gain is essentially selected to be a scalar multiple of the error – or a proportional gain, when the setpoint is greater than the temperature feedback. If the temperature feedback from the system is higher than the setpoint, the cutoff gain is set to zero.  In this example both the temperature setpoint and feedback are set and read through analog input devices.

PWM cut of gain MW07
Figure 4: PWM cut of gain MW07
PWM cut of gain MW01
Figure 5: PWM cut of gain MW01
easyE4 Nano PLC small image 250 x 277

Explore PWM control capabilities of the easyE4 Nano PLC

OR
Next Step: