- HOME

July 2, 2015 page compiled on July 2, 2015 at 5:23pm

Let us consider a closed loop control system with proportional controller and with plant transfer function given by standard second order mass-spring-damper system where is the mass and is the damping coeﬃcient and is the stiﬀness coeﬃcient of the spring. In block diagram, the system is

The error is where is the reference input that we want the output to track. We are now interested in ﬁnding how adding the controller and closing the loop changes the dynamics of the plant by viewing the changes in the diﬀerential equation of the new system. Without the controller and the closed loop, the system was

In time domain this is represented by the diﬀerential equation where is the Laplace transform of . We now ask, how does this diﬀerential equation changes by adding the controller and closing the loop? From the ﬁrst diagram, or , hence the plant now appears as

Hence

And in time domain, the diﬀerential equation now becomes

Considering the case where the reference signal is a unit step (with amplitude that has units of distance or length), then and the above reduces to

| (1) |

We see now that the eﬀect of adding a proportional controller is to increase the stiﬀness of the plant by an amount and also forcing the plant with constant force (actuating force). Increasing the eﬀective stiﬀness also means the natural frequency of the plant will increase, since and the mass remained the same. A note on the units: The controller has units of Newton per unit length in this case (stiﬀness coeﬃcient units) and the force will have units of Newton only (since we multiplied it by the unit step reference single which had units of length). Even though the term appears as stiﬀness on the left side and as force in the right side, it represents only the magnitude, and the units will depend on the context.

It is easy to verify the above. We can connect the system, view the output of the closed loop for a unit step input , and compare it the solution of the diﬀerential equation as given by (1). The diﬀerential equation is solved using zero initial conditions. We see below that the same result shows up.

m = 1; c = 1; k = 20; kp = 400;

plant = TransferFunctionModel[1/(m s^2 + c s + k), s];

controller = TransferFunctionModel[kp, s];

sys = SystemsModelSeriesConnect[plant, controller];

sys = SystemsModelFeedbackConnect[sys];

o = OutputResponse[sys, UnitStep[t], {t, 0, 6}];

p1 = Plot[o, {t, 0, 6}, Frame -> True, PlotRange -> All,

FrameLabel -> {{"y(t)", None}, {"t (sec)",

"response of closed loop system"}}, BaseStyle -> 14, ImageSize -> 350,

Epilog -> {Red, Line[{{0, 1}, {10, 1}}]}];

sol = First@DSolve[{m y''[t] + c y'[t] + (k + kp) y[t] == kp,

y[0] == 0, y'[0] == 0}, y, t];

p2 = Plot[Evaluate[y[t] /. sol], {t, 0, 6}, Frame -> True,

PlotRange -> All, FrameLabel -> {{"y(t)", None},

{"t (sec)", "solution of closed loop differential equation"}},

BaseStyle -> 14, ImageSize -> 350];

Grid[{{p1, p2}}]

plant = TransferFunctionModel[1/(m s^2 + c s + k), s];

controller = TransferFunctionModel[kp, s];

sys = SystemsModelSeriesConnect[plant, controller];

sys = SystemsModelFeedbackConnect[sys];

o = OutputResponse[sys, UnitStep[t], {t, 0, 6}];

p1 = Plot[o, {t, 0, 6}, Frame -> True, PlotRange -> All,

FrameLabel -> {{"y(t)", None}, {"t (sec)",

"response of closed loop system"}}, BaseStyle -> 14, ImageSize -> 350,

Epilog -> {Red, Line[{{0, 1}, {10, 1}}]}];

sol = First@DSolve[{m y''[t] + c y'[t] + (k + kp) y[t] == kp,

y[0] == 0, y'[0] == 0}, y, t];

p2 = Plot[Evaluate[y[t] /. sol], {t, 0, 6}, Frame -> True,

PlotRange -> All, FrameLabel -> {{"y(t)", None},

{"t (sec)", "solution of closed loop differential equation"}},

BaseStyle -> 14, ImageSize -> 350];

Grid[{{p1, p2}}]

The diﬀerential equation given by (1) has an analytical solution when the force is constant and assuming the damping ratio is (under-damped), where . The analytical solution is given by

Where is the damped natural frequency and is the undamped natural frequency . We see now that as and hence the steady state solution will never reach unity (which is the reference signal in this example) but will get closer to it as is made larger and larger. This is the reason why response to a unit step using a proportional controller will always have a steady state error given by where is the controller gain and is the plant original stiﬀness coeﬃcient. The term is called the static deﬂection. The ﬁnal steady state can also be found in Laplace domain using ﬁnal value theorem as follows.

Assuming is unit step, then

And using ﬁnal value theorem

Which is the static deﬂection from the analytical solution of the diﬀerential equation found above.

Let us now look at the dynamics of the plant when the controller is a PID given by . The block diagram of the system is

The error is where is the reference input that we want the output to track. As was done for the case of the proportional controller, the plant now appears as

Hence

And in time domain, the diﬀerential equation now becomes

For the special case when the reference signal is a unit step

The term is the integral of the error . When is unit step the above becomes

Therefore, using a PID controller has the eﬀect of making the system more damped, since the eﬀective damping coeﬃcient has now become compared to just before, and making the system more stiﬀ by adding to the stiﬀness coeﬃcient. The actuating force has two components (for the special case of unit step reference), which is constant force of and a force which is proportional to the error: .

PID controller allows the steady state to become zero. This can be seen by using ﬁnal value theorem in Laplace domain as follows. The transfer function is

be found in Laplace domain using ﬁnal value theorem as follows.

Assuming is unit step, then

And using ﬁnal value theorem

Hence is a unit step. So using PID controller it was possible to achieve the same value as the desired tracking signal. Hence the steady state error is zero.

Plot of the step response of the above is given below. was made large to force the steady state error to go to zero in about 6 seconds.

m = 1; c = 1; k = 20; kp = 400; kd = 1; ki = 200;

plant = TransferFunctionModel[1/(m s^2 + c s + k), s];

controller = TransferFunctionModel[kp + kd s + ki 1/s, s];

sys = SystemsModelSeriesConnect[plant, controller];

sys = SystemsModelFeedbackConnect[sys];

o = OutputResponse[sys, UnitStep[t], {t, 0, 6}];

p1 = Plot[o, {t, 0, 6}, Frame -> True, PlotRange -> All,

FrameLabel -> {{"y(t)", None}, {"t (sec)",

"response of closed loop system, PID controller"}},

BaseStyle -> 14, ImageSize -> 400,

Epilog -> {Red, Line[{{0, 1}, {10, 1}}]}]

plant = TransferFunctionModel[1/(m s^2 + c s + k), s];

controller = TransferFunctionModel[kp + kd s + ki 1/s, s];

sys = SystemsModelSeriesConnect[plant, controller];

sys = SystemsModelFeedbackConnect[sys];

o = OutputResponse[sys, UnitStep[t], {t, 0, 6}];

p1 = Plot[o, {t, 0, 6}, Frame -> True, PlotRange -> All,

FrameLabel -> {{"y(t)", None}, {"t (sec)",

"response of closed loop system, PID controller"}},

BaseStyle -> 14, ImageSize -> 400,

Epilog -> {Red, Line[{{0, 1}, {10, 1}}]}]