# Discrete-time realization for continuous time domain controller/filter?

Let us say I simply design a low pass filter like (1/s+1) with the cutoff frequency as 1 rad/sec, when I implement it in real software, do I have to do the discrete-time realization? If not, what issues will I have? How to design a discrete low pass filter that have the same cutoff frequency?

Do I have to do the discrete-time realization? If not, what issues will I have?

AFAIK, you cannot implement continuous time filters with digital processors which are inherently discrete time devices (since they execute instructions at discrete clock edges).

How to design a discrete low pass filter that have the same cutoff frequency?

Some methods to transform continuous time filters to discrete time are (from Wikipedia)

1. Bilinear transform This is probably what you need.
2. Impulse invariance
3. Matched Z transform
4. Discretisation of the continuous time derivative operation. (Euler ?)

The reference given in the Wikipedia article including this one will give you the properties of each of the above techniques.

How to design a discrete low pass filter that have the same cutoff frequency?

The cut off frequency is the usually not the property of the filter we are interested in. We are usually interested in properties like

1. gain in the pass band,

2. attenuation in the stop band,

3. bandwidth,

4. phase distortion (linear phase response),

5. ripple in the pass and stop band,

and as implmentation constraints,

6. order of the filter,

7. sensitivity to components or coefficients,

8. memory requirements,

9. computation time etc.

So rather than trying to get the cut off frequency to match exactly with the continuous time "parent" filter, check if the discrete time filter obtained by conversion meets the "real" requirements.

• Even if you could apply a continuous filter to a digital system (like circuits) theoretically it will kill the signal. since each step is an impulse (has very high frequency) that will be attenuated. e.g instantaneus change zero to one will be deleted by the continues filter decay. 1Hz cut frequency means, no change fastest than 1s is allowed. Aug 17 at 14:38

For a great many engineering uses, you can approximate your idealized s-plane filter, into a z-plane equivalent, by one of the transformations mentioned in AJN's answer, using closed-form "cookbook" methods.

If the upper frequency is comfortably below Nyquist freq. (including saving room for the transition band where the roll-off happens), there will be few problems. Just as in analog, neither ideal differentiators nor integrators are really possible, since both have infinite response (at low and high f, respectively).

Start with Bilinear transform. Look up how to do the adjustment for "frequency warping". For most day-to-day uses, that should get you there.

Other notes

• In some implementations, there may also be issues with arithmetic precision (for instance with very-low frequency dynamics) so be mindful of that
• Don't implement higher orders (e.g. 4-pole or 6-pole) directly, instead decompose into a series of "biquadratic" building blocks.
• If implementing "integrators", and data originates from an integer form (e.g. ADC), try to prevent accumulated rounding errors.

If you must get closer to Nyquist frequency, designing directly in the z-plane might be something to look at. Also check out the DSP StackExchange, there may be more questions of this type there.