2.7. PROPORTIONAL-INTEGRAL-DERIVATIVE CONTROL 69
Figure 2.35. Step response withKp= 500andKd=10
Figure 2.36. Step response withKp= 500andKd= 100
There is no question that the response is critically damped. However, the
steady-state error is not within the acceptable tolerance of being less than 2%.
The answer lies in providing an appropriate amount of integral control that will
bring the error to within the acceptable tolerance. We can implement integral
control action as illustrated in the followingMatlabcode:
kp=500; %Proportional gain
ki=1; %Integral gain
kd=100; %Derivative gain
numc=[kd kp ki] %Define numerator polynomial of PID controller
denc=[1 0] %Define denominator polynomial of PID controller
den=conv(denc,densys);
%Convolve the denominator polynomials of system and controller
sysopenloop=tf(numc,den); %Obtain open-loop TF
sysfeedback=[1]; %Feedback TF