Please Login / Register to use the tool

About the Tool

The tool DC-13 determines the gains of a PID feedback controller, plots the time responses of the designed closed-loop system to impulse, step and ramp inputs, and presents the transfer function of the closed-loop system, and its poles and zeros. Four design methods are installed: manual tuning, Ziegler-Nichols tuning method, zero placement method, and manual tuning with a first-order noise filter for derivative feedback. The tool is also applicable to design of PI and PD controllers.

In addition, a tutorial on how to use the tool in PID control system design is provided and a subject review on control system formulation and gain tuning for PID controllers is presented.


Example: PID Control

The input in the tool is

After clicking "Run", the results will be shown in another page. The time responses of the closed-loop system are

The analysis results are also shown as follows.

Type of Feedback Controller: PID

KP = 1

Ki = 1

KD = 1.2

Controller Transfer Function

Gc(s) = 1 + (1)/s + (1.2)*s

Closed-Loop Transfer Function

T(s) = (GcGp)/(1+GcGp) = N(s)/D(s)

N(s) = (0.23076923) * s3 + (0.42307692) * s2 + (0.38461538) * s + (0.19230769)

D(s) = (1) * s3 + (1.19230769) * s2 + (0.57692308) * s + (0.19230769)

Closed-Loop Zeros and Poles

Zeros =
-0.41666667 + i (0.81223286),
-0.41666667 + i (-0.81223286)

Poles =
-0.2126426 + i (0.45332426),
-0.2126426 + i (-0.45332426),


The system is stable.

Steady State

Step Response

yss = 1

ess = 0

Ramp Response

ess = 1

Subject Review

Fig. 1 A unity feedback control system

PID Control System

PID (proportional-integral-derivative) controllers are widely used form of feedback in control engineering, especially in industrial process control applications. To demonstrate how PID control works, consider a unity feedback control system in Fig. 1. The transfer function for a PID controller is

relating the error signal e to the control input u (to the plant) by

where KP, Ki, Kd are the proportional, integral and derivative gains of the controller, respectively; Ti is the integral time constant and Td the derivative time constant.

The effects of proportional, integral and derivative gains can be summarized in Table 1. In general, proportional control action is added to improve rise time, integral control action is added to eliminate steady-state error, and derivative control action is added to improve overshoot or stability margin. Note that the effects of these control gains interfere with each other. Thus, Table 1 only provides a reference for initial design of PID controller; fine tuning of control gains may be needed.

Table 1 Effects of gains of a PID controller on closed-loop response

Proportional, integral and derivative actions do not have to be all in each and every feedback control design. The following two control algorithms are also commonly used:

It is seen that proportional action appears in all the control algorithms given by Eqs. (1) and (4).

Denote the plant transfer function by

The transfer function of the closed-loop system with the PID controller is

The characteristic equation of the closed-loop system then is

Differentiation in D (derivative) control action is sensitive to noise, especially to high-frequency noise. Because of this, in engineering practice, a first-order filter is often added to control algorithms involved with D action:

where Tf is the time constant of the filter, which is usually much smaller than the time constants of the plant and derivative time constant Kd.

Gain Tuning

There are various methods for determining the gains of a PID controller. This tool facilitates the following four methods.

Method 1: Manual Tuning

This is a trial and error method. In gain tuning, the user can use Table 1 as a reference, and needs to pay attention to both performance and stability of the control system.

Method 2:Ziegler-Nichols tuning method

The Ziegler–Nichols tuning method is a heuristic method for tuning PID controllers. Several variations of the Ziegler-Nichols method are available: some are based on open-loop response, and others depend on closed-loop response. In this tool, the ultimate-cycle method of Ziegler and Nichols using the step response of a closed-loop system is implanted. The ultimate-cycle method takes the following three steps, which can be undertaken in either simulations or experiments.

Step 1. Set the integral gain Ki and derivative gain Kd to zero and consider the response of the closed-loop system subject to a step input. This can be mathematically expressed as

where r0 is the amplitude of the step input and L-1 is the inverse Laplace transform operator.

Step 2. Starting from a small value, gradually increase the proportional gain Kp until the system response shows sustained oscillations with constant amplitude, in which case the closed-loop system becomes marginally stable. The period of the oscillations is called the ultimate period, and is denoted by Tu. Under the circumstances, the proportional gain is called the ultimate gain, and is denoted by

Analytically, the ultimate gain and ultimate period satisfy the closed-loop characteristic equation

which can be solved by the root locus method (refer to the tool DC-15).

Step 3. With the determined ultimate gain and ultimate period, the gains of a PID controller are given by Table 2, where P control, PI control and PD control are also considered.

Table 2 Ziegler-Nichols gain tuning using the ultimate cycle method

Method 3: Zero placement method

In this method, a PID controller is written as

In terms of root locus, the PID controller adds one open-loop pole at the origin of the complex plane, and two open-loop zeros z1 and z2. The added zeros either are all real or form a complex conjugate pair. For the stability and performance of the closed-loop system, the added zeros must have negative real parts. Comparison of Eqs. (1) and (12) gives

The gain tuning process has two steps: (a) locate the open-loop zeros; and (b) properly tune the parameter K such that the closed-loop poles are in the desired regions on the complex plane for stability and performance. In this process, the root locus method can be naturally used and try and error is usually needed.

The above gain tuning process is also applicable to PI and PD controllers. A PI controller places an open-loop pole at the origin of the complex plane and an open-loop zero on the negative real axis:

A PD control, on the other hand, simply places one open-loop zero on the negative real axis:

Method 4: Manual tuning with filter

In this method, one may first get the control gains by one of Methods 1 to 3, and then determine the filter time constant in Eq. (8) by

where N is a number that typically is between 8 and 20. If needed, iterative tuning of the control gains and the filter time constant can be performed.


1. R.C. Dorf and R.H. Bishop, 2010, Modern Control Systems, 12th edition, Prentice Hall.

2. K. Ogata, 2009, Modern Control Engineering, 5th Edition, Prentice Hall.

3. K.J. Åström and Richard M. Murray, Feedback Systems: An Introduction for Scientists and Engineers, Princeton University Press, 2008.