Continuous From Discrete Transfer Functions 

Second order filters are usually implemented digitally by means of recurrence relations of the form 

_{} 

where the coefficients c_{j} are constants, and the values of x_{j} and y_{j} are the jth discrete samples of the input and output functions respectively. The computations are performed once per Dt seconds. Assuming the input and output functions are scaled equally, the coefficients must satisfy the identity 

_{} 

It is often of interest to know how much lag (or lead) such a filter introduces. One way of characterizing this lag is in terms of the asymptotic response to a ramp input. Since the input and output both have constant and equal rates (ultimately), the secondorder aspects of the filter drop out, and we effectively have just a firstorder leadlag. To determine the amount of lag, let us assign ramp values to the input and output as follows: 

_{} 

Inserting these into equation (1) we can solve for y_{n2}, and since x_{n2} = 0, the value of y_{n2} is the amount by which y differs from x at constant t. Furthermore, since the rate of change of the ramp is 1 unit per iteration, the value of y_{n2} also equals the number of iterations that y leads or lags the ramp input x. Hence if we multiply this by Dt we get the duration of the lag (if the quantity is positive) or lead (if the quantity is negative). Thus we have 

_{} 

For example, suppose we have a secondorder digital filter of the form (1) with the coefficients 

_{} 

(Note that these coefficients sum to 1, as required.) Assume the iteration rate of the filter is Dt = 50 msec. Inserting these values into the preceding equation, we find that the filter has a ramp lag of 0.783 seconds. 

A previous note on LeadLag algorithms described how to determine the recurrence coefficients c_{j} to best represent a continuous secondorder transfer function of the form 

_{} 

If, instead, we are given the recurrence coefficients and we wish to determine the coefficients of the corresponding continuous transfer function, we immediately have, for the parameters g and d from the previous note, g = c_{1} and d = c_{2}. Also, we can compute the denominator coefficients as 

_{} 

where 
_{} 

To determine the numerator coefficients, we solve the equations for the optimum secondorder recurrence coefficients for the parameters a and b to give 

_{} 

Then we have 
_{} 

Using the coefficients and iteration interval from the previous example, we get the continuous transfer function shown below. 

_{} 

Thus the filter has essentially no numerator dynamics, and we can confirm from the firstorder coefficient in the denominator that this continuous transfer function has a ramp lag of 0.783 seconds, in agreement with what we found earlier for the corresponding discrete digital filter. 

The characteristic roots of the denominator dynamics can be expressed in terms of the coefficients of the continuous transfer function or of the original recurrence relations as 

_{}_{} 

It’s convenient to define the parameters 

_{} 

which are called the natural frequency and the damping ratio respectively. In terms of these parameters the characteristic roots can be written as 

_{} 

Therefore, the solution y(t) for any fixed input x is of the form 

_{} 

where A, B, C are constants that can be determined from the initial conditions. This shows that the critical value of the damping ratio x is 1. For damping ratios greater than 1, the two real exponents are both negative (noting that the square root of x^{2} – 1 is necessarily smaller than x). Consequently the function y(t) monotonically approaches the fixed value of x. On the other hand, if the damping ratio is less than 1, then for a real solution we must have B = C, and we can express y(t) in terms of the cosine functions as 

_{} 

where 
_{} 

is the damped natural frequency. (We’ve assumed t is defined to give a zero phase angle.) For the numerical example discussed previously, the characteristic roots are 

_{} 

and the solution for any fixed input x is of the form 

_{} 

The exponential factor in the second term has a negative coefficient, so the term approaches zero as time increases. The cosine factor shows that one overshoot cycle lasts for 2p/1.275 = 4.9 units of time. 

We can also assess the frequency response of this filter by analyzing the corresponding differential equation 

_{} 

Inserting y(t) = Acos(wt) and x(t) = Bcos(wt + f) into this equation, and expanding the latter cosine by means of the angleaddition formula, we get 

_{} 

This implies the two relations 

_{} 

Dividing the second by the first gives the tangent of the phase shift 

_{} 

Also, solving for f and inserting into the second of the preceding equations, we can solve for the amplitude ratio A/B, giving 

_{} 

Hence if b_{1} is nonzero (meaning that the system has damping) the amplitude ratio is never infinite. For a critically damped system (i.e., with x = 1) the amplitude ratio is a Cauchy distribution 

_{} 

On the other hand, for a totally undamped system (b_{1} = x = 0), we get an infinite amplitude ratio when 

_{} 

which, as we’ve seen, is the system’s undamped “natural frequency”. For a damped system, i.e., a system with nonzero b_{1}, the maximum amplitude ratio (for a nonzero frequency) can be found by differentiating the general expression for A/B with respect to w and setting the result to zero. This gives 

_{} 

as the most responsive frequency. If the damping ratio exceeds _{} the responsiveness drops monotonically as the frequency increases, so there is no realvalued maximum (other than the one at w = 0). 
