Design a PID Controller for a DC Motor

Çağlayan Şerbetçi
3 min readDec 3, 2018

--

Suppose that you have DC Motor with the following open loop transfer function. The input of the transfer function is voltage applied to motor. The output is the angular velocity of the shaft of the motor.

The open loop transfer function of the sample DC Motor
The plant transfer function is Gn(s).

Now, we will design a PID controller with unity feedback in order to achieve zero steady state tracking error, a settling time of less than 1 second, and a maximum overshoot of 5%.

Before that we investigate the closed loop transfer function without controller. First, I will find the steady state error of the closed loop transfer function. With step input, the output graph will be

As you can see the output graph, closed loop system with unity feedback has 1 second rise time and 62.4% steady state error.

As you know that PID controller’s I component is used for reducing steady state error in the system. D component and P component are used to control over the rise time and the maximum overshoot.

Desired Transfer Function Calculation

To standard form of the second order transfer function is:

To design a PID controller with a settling time of less than 1 second, and a maximum overshoot of 5%, the following control equation will be for settling time and maximum peak.

Then desired transfer function becomes:

Step response of Ho(s)

Closed-loop transfer function with Controller

The controller’s transfer function and plant’s transfer function play very important role to design a PID Controller.

After the necessary calculation, closed-loop transfer function of this specific plant with controller becomes the following equation.

Finding Ki, Kp and Kd

If we ignore the effects of the zeros, desired transfer function’s characteristics and H(s) must be equal. Than we should solve the following equations.

After calculations

As you seen, Kd component equals to zero. So, to achieve desired controlling specs of this system, PI controller is enough.

Thanks for reading.

--

--