Pulse Width Modulated (PWM) Control Signal

Snapshot of the front panel of the simulator:

Description of the system to be simulated

A control system with a pulse width modulated (PWM) control signal is simulated. The process being controlled is given by a transfer function model representing two time constants in series with a time delay. A process disturbance acts on the process (at the same place as the control signal).

The purpose of PWM is to obtain an approximately continuous or smooth control signal using a binary or on/off actuator or PWM elementet which typically is an SSR element (solid state relay). The principle of PWM is to keep the element in the on state (and in off state) so that the resulting average control signal is as specified. PWM elements operates with a given fixed period, Tp, e.g. 1 sec. The part of the period where the PWM element is in on-state is denoted the duty cycle (D), which is measured in percent. See Figure 1.

Figure 1

In general, the less PWM period Tp, the smoother control signal. PWM is not proper for mechanical actuators as valves because of excessive wear.


The aims of this simulator is to give an understanding of how pulse width modulation works, and to show how the control action works in a control system where the control signal is pulse width modulated.


PWM is an important control technique. It is frequently used for controlling transistor based switches, as SSR elements (solid state relays) for controlling motors or valves.


The normal operating point is defined as ym = 75 and v = 0.

  1. Set the controller in manual mode. The disturbance may be set to zero. The PWM periode may be set to 1 sec. Control the process with a control signal (u0) equal to 75%. Observe the PWM signal. Is the generated PWM signal 75% in average, as it should be?
  2. Set the controller in automatic mode. Set ySP to 75%. The controller can be a PI controller with gain Kp = 3.5 and Ti = 6.0 (tuned using the Ziegler-Nichols' closed loop method). Is the control system behaving satisfactory regarding stability and average control error?
  3. Now use a PID controller with settings Kp = 4.8, Ti = 3.5 and Td = 0.9 (according the Ziegler-Nichols' closed loop method). Set ySP = 75%. What is the average control error? How is the behaviour of the PWM control signal? Can you explain why the control signal u (from the controller) is more variable with the PID controller than with the PI controller?

[SimView] [TechTeach]

Updated 19. January 2008. Developed by Finn Haugen. E-mail: finn@techteach.no.