# PD Control Sampled Second Order Type 1 Root Locus

Cuthbert Nyack
This Applet compares 2 methods of obtaining a sampled type 1 second order system with PD control.
The first method combines the transfer functions of the controller Gc(s) and system Gs(s) with a sampler and ZOH to obtain a forward transfer function:-
G(z) = (1 - z-1)Z{Gc(s)Gs(s)/S}
The closed loop transfer function is then:-
Gcs(z) = G(z)/(1 + G(z).

The second method digitises the controller to get D(z) using the back difference approximation to the derivative and combines the result with Gs(z) = (1 - z-1)Z{Gs(s)/S} to get a forward transfer function G(z) = D(z)Gs(z) and a closed loop transfer function Gd(z) = G(z)/(1 + G(z))

The Applet shows the closed loop pole locations and the step response of the 2 methods.

eg parameters (5.0, 1.0, 0.1, 0.1, 1.0), (5.0, 1.0, 0.1, 0.04, 0.5). These shows good correspondence between the 2 approaches.
eg parameters (5.0, 1.0, 1.0, 0.1, 0.5). Here there are significant differences in the pole locations and the second method reaches its final value sooner.
eg parameters (15.0, 1.0, 1.0, 0.13, 1.0). Here the first method is on the verge of becoming unstable at 1/2 the sampling frequency, while the second has become unstable at close to 1/4 of the sampling frequency.
eg parameters (K, 1.0, 0.5, 0.3, 1.0). The second method is stable for K < 9.9, while the first is stable for K < 13.3.
eg parameters (K, 2.0, 0.1, 0.4, 1.0). The second method is stable for K < 8.1(osc at 0.13ws), while the first is stable for K < 10.8(osc at 0.145ws).

Gif image below show how the applet should appear.