# Signals and Systems/Bode Plots
## Frequency Response Plots

The frequency response is a complex function of the radial frequency $\omega =2\pi \cdot f$
    $H(j\omega )={\frac {Y(j\omega )}{X(j\omega )}}$
or of the variable $s=i\omega$
    $H(s)={\frac {Y(s)}{X(s)}}$
These functions give the relation between the input and the output of a linear, time invariant system. A frequency response is found in the form of a ratio of two polynoms:
    $H(s)=k\cdot {\frac {b_{M}s^{M}+\dots +b_{2}s^{2}+b_{1}s+b_{0}}{a_{N}s^{N}+\dots +a_{2}s^{2}+a_{1}s+a_{0}}}$
The zeros of the numerator are called the zeroes of the transfer function. The zeros of the denominator are called the poles of the transfer function. Both zeroes and poles are either real or complex conjugates.
The transfer function of a system with only complex conjugate zeroes, $z_{i}$ and $z_{i}^{*}$, and poles $p_{i}$ and $p_{i}^{*}$, can be written as:
    $H(s)=k\cdot {\frac {\prod _{i=1}^{M/2}{(s-z_{i})(s-z_{i}^{*})}}{\prod _{i=1}^{N/2}{(s-p_{i})(s-p_{i}^{*})}}}$
If there is a real zero, $z_{r}$, and a real pole, $p_{r}$, the transfer function becomes:
    $H(s)=k\cdot {\frac {s-z_{r}}{s-p_{r}}}\cdot {\frac {\prod _{i=1}^{(M-1)/2}{(s-z_{i})(s-z_{i}^{*})}}{\prod _{i=1}^{(N-1)/2}{(s-p_{i})(s-p_{i}^{*})}}}$
The frequency response is usually represented as a combination of two plots: the amplitude response and the phase response.

## Bode Plots

Bode plots represent the amplitude and the phase responses with a logarithmic scale for both the frequency and the amplitude.
The frequency axis shows $\log _{10}(f)$. The span between two frequencies having a ratio of 10 is referred as a decade.
The amplitude axis shows $20\cdot \log _{10}(|H(j\omega )|)$ which is the amplitude in decibel.
This representation has the advantage that the effect of the real zeroes, real poles, conjugate zeroes pairs and conjugate pole pairs add-up in the representation.

### Example: 3rd Order Butterworth Filter

    Poles of a 3rd order Butterworth filter
A third order Butterworth filter has 3 poles: one real and two complex conjugates. All poles are regularly spaced on the left hand side of a circle.
The following amplitude plot shows in green:
* the response of the real pole which decays from the 1 Hz cutoff frequency with a slope of -20 dB/decade
* the response of the conjugate pole pair which decays with a slope of -40 dB/decade
The filter response is shown in blue. It decays with a slope of -60 dB/decade.
In the Bode plot, the overall amplitude response (in blue) can be drawn as the sum of all the amplitude responses of the real poles or conjugate pole pairs (in green).
The following phase plot shows in green:
* the phase response of the real pole which shifts of $\pi /2$ at the 1 Hz cutoff frequency
* the phase response of the conjugate pole pair which shifts of $\pi$
The filter phase response is shown in blue. It shifts of $3\pi /2$.
In the Bode plot, the overall phase response (in blue) can be drawn as the sum of all the phase responses of the real poles or conjugate pole pairs (in green).
So knowing the responses of each in individual real pole and complex conjugate pole pairs allows to draw the overall amplitude and phase responses.