The following example creates a phase-lead compensator for the Type 1 plant
G(s) = 4/s(s+2)
with the specifications that the system should have a phase margin of 50 degrees, and a velocity error constant Kv= 20 sec^-1.
The compensator has a transfer function of the form
G(s) = K(Ts+1)/(aTs+1)
where the parameters a and T are to be found. The example
finds the gain K to meet the error specification,
determines the phase margin with this value of K,
finds the additional phase lead to meet the phase margin specification,
finds the value of a (alpha) to meet this spec,
uses the gain of the compensator to estimate the new
gain crossover frequency, and
adjusts T to set the maximum phase-lead to this frequency.