Theory:
Impulse Invariance Method:
Using the impulse invariance method,
H(z) is directly generated from
H(s) using a mapping that depends on the sampling period and the locations of the poles of
H(s).
Because the input is an impulse, the system transfer function
H(s) is the same as the Laplace transform of the response
y(t).
The method starts by expressing the Laplace transfer function
H(s) in partial form
$$ H(s) = \sum_{i=1}^{N}\frac{A_i}{(s-p_i)} \tag{1}$$
where
N is the order of the system, poles are located at the points
pi.
Then the discrete system can be written as
$$ H(z) = \sum_{i=1}^{N}\frac{T A_i}{(1-z^{-1} e^{Tp_i})} \tag{2}$$
where
T is the sampling period for the analog system. This formula applies when the poles
pi are all distinct.
In the case of a pole of order two, which pertains to the damping ratio ζ=1,
$$ H(z) = \sum_{i=1}^{N}\frac{T z e^{Tp_i}}{(e^{Tp_i}-z)^2} \tag{3}$$
Bilinear Transform Method:
The bilinear transform is used in digital control theory and digital signal processing to transform continuous-time system representation to discrete-time and vice-versa.
The bilinear transform is often used to convert a transfer function
Ha(s) of a linear time-invariant (LTI) in the continuous-time domain to
a transfer function
Hd(z) of a linear shift-invariant in the discrete time domain.
The bilinear transform is a first-order pade approximation of the natural logrithm function that is an exact mapping of the
z-plane to the
s-plane. When the Laplace transform is performed on a discrete-time signal,
the result is precisely the
z-transform of the discrete-time sequence with the substitute of
z = esT
$$ z = e^{sT} $$
$$ \approx \frac{e^{sT/2}}{e^{-sT/2}}\ $$
$$ \approx \frac{1+\frac{sT}{2}}{1- \frac {sT}{2}}\tag{4} $$
where
T is the numerical integration step size of the trapezoidal rule used in the bilinear transformation derivation
or
T is the sampling period.