# A Generic Derivation of Magnitude and Phase Plots

How Magnitude and Phase Information are Separated

## Separation of Magnitude and Phase

Start with a transfer function with an mth order numerator and and nth order denominator

$$H(s) = C{{\prod\limits_{k = 1}^m {\left( {s + {z_k}} \right)} } \over {\prod\limits_{i = 1}^n {\left( {s + {p_i}} \right)} }}$$

The first step is to rewrite the function so that the poles and zeros are of the form (1+s/ω0).

$$H(s) = C{{\prod\limits_{k = 1}^m {{z_k}} } \over {\prod\limits_{i = 1}^n {{p_i}} }}{{\prod\limits_{k = 1}^m {\left( {1 + {s \over {{z_k}}}} \right)} } \over {\prod\limits_{i = 1}^n {\left( {1 + {s \over {{p_i}}}} \right)} }} = C'{{\prod\limits_{k = 1}^m {\left( {1 + {s \over {{z_k}}}} \right)} } \over {\prod\limits_{i = 1}^n {\left( {1 + {s \over {{p_i}}}} \right)} }}{\rm{, where }}\;C' = \;C{{\prod\limits_{k = 1}^m {{z_k}} } \over {\prod\limits_{i = 1}^n {{p_i}} }}$$

The function is now a quotient of products.  For easy hand manipulation, we'd prefer to use only addition and subtraction.  To do this, let's represent the transfer function (with s=jω) as a phasor.

$$H(j\omega ) = \left| {H(j\omega )} \right|\angle H(j\omega )$$

where

$$\left| {a + jb} \right| = \sqrt {{a^2} + {b^2}}$$

and

$$\angle \left( {a + jb} \right) = \arctan \left( {{b \over a}} \right)$$

### Calculation of magnitude

Calculation of the magnitude begins with the fact that

$$\left| {H(j\omega )} \right| = \left| {C'{{\prod\limits_{k = 1}^m {\left( {1 + {{j\omega } \over {{z_k}}}} \right)} } \over {\prod\limits_{i = 1}^n {\left( {1 + {{j\omega } \over {{p_i}}}} \right)} }}} \right| = \left| {C'} \right|{{\prod\limits_{k = 1}^m {\left| {1 + {{j\omega } \over {{z_k}}}} \right|} } \over {\prod\limits_{i = 1}^n {\left| {1 + {{j\omega } \over {{p_i}}}} \right|} }}$$

This is still a quotient of products.  To simplify we will express the result in deciBels which transforms multiplication and division to addition and subtraction.

\eqalign{ 20 \cdot {\log _{10}}\left( {\left| {H(j\omega )} \right|} \right) &= 20 \cdot {\log _{10}}\left( {\left| {{C'}} \right|{{\prod\limits_{k = 1}^m {\left| {1 + {{j\omega } \over {{z_k}}}} \right|} } \over {\prod\limits_{i = 1}^n {\left| {1 + {{j\omega } \over {{p_i}}}} \right|} }}} \right) \cr &= 20 \cdot {\log _{10}}\left( {\left| {{C'}} \right|} \right) + 20 \cdot {\log _{10}}\left( {\prod\limits_{k = 1}^m {\left| {1 + {{j\omega } \over {{z_k}}}} \right|} } \right) + 20 \cdot {\log _{10}}\left( {{1 \over {\prod\limits_{i = 1}^n {\left| {1 + {{j\omega } \over {{p_i}}}} \right|} }}} \right) \cr &= 20 \cdot {\log _{10}}\left( {\left| {{C'}} \right|} \right) + 20 \cdot {\log _{10}}\left( {\prod\limits_{k = 1}^m {\left| {1 + {{j\omega } \over {{z_k}}}} \right|} } \right) - 20 \cdot {\log _{10}}\left( {\prod\limits_{i = 1}^n {\left| {1 + {{j\omega } \over {{p_i}}}} \right|} } \right) \cr &= 20 \cdot {\log _{10}}\left( {\left| {{C'}} \right|} \right) + \sum\limits_{k = 1}^m {20 \cdot {{\log }_{10}}\left( {\left| {1 + {{j\omega } \over {{z_k}}}} \right|} \right)} - \sum\limits_{i = 1}^n {20 \cdot {{\log }_{10}}\left( {\left| {1 + {{j\omega } \over {{p_i}}}} \right|} \right)} \cr}

Voilà!  We have changed the products and quotients into addition and subtraction.  As a bonus (which comes from the first step of rewriting the function), there are only two types of terms: the constant term and the simple zeros and poles (which are added and subtracted, respectively).

### Calculation of phase

The phase term is a little easier to develop, since they add and subtract naturally.  Calculation of phase begins, and ends, with the fact that

$$\angle H(j\omega ) = \angle {C'} + \sum\limits_{k = 1}^m {\angle \left( {1 + {{j\omega } \over {{z_k}}}} \right)} - \sum\limits_{i = 1}^n {\angle \left( {1 + {{j\omega } \over {{p_i}}}} \right)}$$

Again, there are only two types of terms: the constant term and the simple zeros and poles.

##### Key Concept

Starting from a transfer function it is possible to express both its magnitude and phase as a sum of simple terms.

References