# Electronic – Bode Plot: calculating phase change

bode plotcircuit analysiscircuit-design

I need to plot this transfer function

When plotting the phase vs frequency graph, I am having problems to calculate the change in phase between 10 and 10^1.5. To my understanding, at frequency=10 the phase is -90°, then, there is a phase change and the slope should increase at a rate of 45°/dec but there is a change in frequency at 10^1.5. To calculate the degrees until the curve reaches 10^1.5 I applied simple trigonometry so that from frequency=10 to 10^1.5 the curve has moved up 10.80°. However, that answer is incorrect and the actual Bode plot shows that from frequency=10 to 10^1.5 the curve has moved up 22.5°. Could someone please explain to me how to properly calculate the phase change from frequency=10 to 10^1.5?

Well, we have the following transfer function:

$$\mathcal{H}\left(\text{s}\right):=\frac{\text{X}\left(\text{s}\right)}{\text{Y}\left(\text{s}\right)}=\frac{\left(1+10^{-\alpha}\cdot\text{s}\right)\left(1+10^{-\beta}\cdot\text{s}\right)}{\left(1+10^{-\gamma}\cdot\text{s}\right)\left(1+10^{-\epsilon}\cdot\text{s}\right)}\tag1$$

Where $$\\alpha\in\mathbb{R}_{\ge0}\$$, $$\\beta\in\mathbb{R}_{\ge0}\$$,$$\\gamma\in\mathbb{R}_{\ge0}\$$, and $$\\epsilon\in\mathbb{R}_{\ge0}\$$.

We can expand the RHS of the transfer function:

$$\mathcal{H}\left(\text{s}\right)=\frac{1+10^{-\beta}\cdot\text{s}+10^{-\alpha}\cdot\text{s}+10^{-\alpha}\cdot\text{s}\cdot10^{-\beta}\cdot\text{s}}{1+10^{-\epsilon}\cdot\text{s}+10^{-\gamma}\cdot\text{s}+10^{-\gamma}\cdot\text{s}\cdot10^{-\epsilon}\cdot\text{s}}=$$ $$\frac{1+\left(10^{-\alpha}+10^{-\beta}\right)\cdot\text{s}+10^{-\left(\alpha+\beta\right)}\cdot\text{s}^2}{1+\left(10^{-\gamma}+10^{-\epsilon}\right)\cdot\text{s}+10^{-\left(\gamma+\epsilon\right)}\cdot\text{s}^2}=$$ $$\frac{10^{-\left(\alpha+\beta\right)}\cdot\text{s}^2+\left(10^{-\alpha}+10^{-\beta}\right)\cdot\text{s}+1}{10^{-\left(\gamma+\epsilon\right)}\cdot\text{s}^2+\left(10^{-\gamma}+10^{-\epsilon}\right)\cdot\text{s}+1}\tag2$$

Now, when we work with sinusoidial functions we can substitute $$\\text{s}=\text{j}\omega\$$:

$$\underline{\mathcal{H}}\left(\text{j}\omega\right)=\frac{10^{-\left(\alpha+\beta\right)}\cdot\left(\text{j}\omega\right)^2+\left(10^{-\alpha}+10^{-\beta}\right)\cdot\text{j}\omega+1}{10^{-\left(\gamma+\epsilon\right)}\cdot\left(\text{j}\omega\right)^2+\left(10^{-\gamma}+10^{-\epsilon}\right)\cdot\text{j}\omega+1}=$$ $$\frac{1-10^{-\left(\alpha+\beta\right)}\omega^2+\left(10^{-\alpha}+10^{-\beta}\right)\omega\text{j}}{1-10^{-\left(\gamma+\epsilon\right)}\omega^2+\left(10^{-\gamma}+10^{-\epsilon}\right)\omega\text{j}}\tag3$$

Now, we can take the argument on both sides:

$$\displaystyle\arg\left(\underline{\mathcal{H}}\left(\text{j}\omega\right)\right)=\arg\left(1-10^{-\left(\alpha+\beta\right)}\omega^2+\left(10^{-\alpha}+10^{-\beta}\right)\omega\text{j}\right)-\arg\left(1-10^{-\left(\gamma+\epsilon\right)}\omega^2+\left(10^{-\gamma}+10^{-\epsilon}\right)\omega\text{j}\right)\tag4$$

So, we get a few different cases:

1. When $$\1-10^{-\left(\alpha+\beta\right)}\omega^2=0\$$, we get: $$\arg\left(1-10^{-\left(\alpha+\beta\right)}\omega^2+\left(10^{-\alpha}+10^{-\beta}\right)\omega\text{j}\right)=\frac{\pi}{2}\tag5$$
2. When $$\1-10^{-\left(\alpha+\beta\right)}\omega^2>0\$$, we get: $$\arg\left(1-10^{-\left(\alpha+\beta\right)}\omega^2+\left(10^{-\alpha}+10^{-\beta}\right)\omega\text{j}\right)=$$ $$\arctan\left(\frac{\left(10^{-\alpha}+10^{-\beta}\right)\omega}{1-10^{-\left(\alpha+\beta\right)}\omega^2}\right)\tag6$$
3. When $$\1-10^{-\left(\alpha+\beta\right)}\omega^2<0\$$, we get: $$\arg\left(1-10^{-\left(\alpha+\beta\right)}\omega^2+\left(10^{-\alpha}+10^{-\beta}\right)\omega\text{j}\right)=$$ $$\frac{\pi}{2}+\arctan\left(\frac{\left|1-10^{-\left(\alpha+\beta\right)}\omega^2\right|}{\left(10^{-\alpha}+10^{-\beta}\right)\omega}\right)\tag7$$
4. When $$\1-10^{-\left(\gamma+\epsilon\right)}\omega^2=0\$$, we get: $$\arg\left(1-10^{-\left(\gamma+\epsilon\right)}\omega^2+\left(10^{-\gamma}+10^{-\epsilon}\right)\omega\text{j}\right)=\frac{\pi}{2}\tag8$$
5. When $$\1-10^{-\left(\gamma+\epsilon\right)}\omega^2>0\$$, we get: $$\arg\left(1-10^{-\left(\gamma+\epsilon\right)}\omega^2+\left(10^{-\gamma}+10^{-\epsilon}\right)\omega\text{j}\right)=\arctan\left(\frac{\left(10^{-\gamma}+10^{-\epsilon}\right)\omega}{1-10^{-\left(\gamma+\epsilon\right)}\omega^2}\right)\tag9$$
6. When $$\1-10^{-\left(\gamma+\epsilon\right)}\omega^2<0\$$, we get: $$\arg\left(1-10^{-\left(\gamma+\epsilon\right)}\omega^2+\left(10^{-\gamma}+10^{-\epsilon}\right)\omega\text{j}\right)=$$ $$\frac{\pi}{2}+\arctan\left(\frac{\left|1-10^{-\left(\gamma+\epsilon\right)}\omega^2\right|}{\left(10^{-\gamma}+10^{-\epsilon}\right)\omega}\right)\tag{10}$$

Now, we can this apply this to your problem. We know that $$\\alpha=2\$$, $$\\beta=\frac{5}{2}\$$, $$\\gamma=0\$$, and $$\\epsilon=\frac{9}{2}\$$. So we can work out the different cases:

1. When $$\\omega=100\sqrt[4]{10}\$$, we get: $$\arg\left(1-10^{-\left(\alpha+\beta\right)}\omega^2+\left(10^{-\alpha}+10^{-\beta}\right)\omega\text{j}\right)=\frac{\pi}{2}\tag{11}$$
2. When $$\0\le\omega<100\sqrt[4]{10}\$$, we get: $$\arg\left(1-10^{-\left(\alpha+\beta\right)}\omega^2+\left(10^{-\alpha}+10^{-\beta}\right)\omega\text{j}\right)=$$ $$\arctan\left(\frac{100\left(10+\sqrt{10}\right)\omega}{100000-\omega^2\sqrt{10}}\right)\tag{12}$$
3. When $$\\omega>100\sqrt[4]{10}\$$, we get: $$\arg\left(1-10^{-\left(\alpha+\beta\right)}\omega^2+\left(10^{-\alpha}+10^{-\beta}\right)\omega\text{j}\right)=$$ $$\frac{\pi}{2}+\arctan\left(\frac{\left|\omega^2\sqrt{10}-100000\right|}{100\left(10+\sqrt{10}\right)\omega}\right)\tag{13}$$
4. When $$\\omega=100\sqrt[4]{10}\$$, we get: $$\arg\left(1-10^{-\left(\gamma+\epsilon\right)}\omega^2+\left(10^{-\gamma}+10^{-\epsilon}\right)\omega\text{j}\right)=\frac{\pi}{2}\tag{14}$$
5. When $$\0\le\omega<100\sqrt[4]{10}\$$, we get: $$\arg\left(1-10^{-\left(\gamma+\epsilon\right)}\omega^2+\left(10^{-\gamma}+10^{-\epsilon}\right)\omega\text{j}\right)=$$ $$\arctan\left(\frac{\left(100000+\sqrt{10}\right)\omega}{100000-\omega^2\sqrt{10}}\right)\tag{15}$$
6. When $$\\omega>100\sqrt[4]{10}\$$, we get: $$\arg\left(1-10^{-\left(\gamma+\epsilon\right)}\omega^2+\left(10^{-\gamma}+10^{-\epsilon}\right)\omega\text{j}\right)=$$ $$\frac{\pi}{2}+\arctan\left(\frac{\left|\omega^2\sqrt{10}-100000\right|}{\left(100000+\sqrt{10}\right)\omega}\right)\tag{16}$$

If you uses Mathematica I wrote a code that you can use:

Plot[Piecewise[{{Pi/2, \[Omega] ==
100*10^(1/
4)}, {ArcTan[(100*(10 +
Sqrt[10])*\[Omega])/(100000 - \[Omega]^2*Sqrt[10])],
0 <= \[Omega] < 100*10^(1/4)}, {(Pi/2) +
ArcTan[Abs[\[Omega]^2*Sqrt[10] -
100000]/(100*(10 + Sqrt[10])*\[Omega])], \[Omega] >
100*10^(1/4)}}] -
Piecewise[{{Pi/2, \[Omega] ==
100*10^(1/
4)}, {ArcTan[((100000 +
Sqrt[10])*\[Omega])/(100000 - \[Omega]^2*Sqrt[10])],
0 <= \[Omega] < 100*10^(1/4)}, {(Pi/2) +
ArcTan[Abs[\[Omega]^2*Sqrt[10] -
100000]/((100000 + Sqrt[10])*\[Omega])], \[Omega] >
100*10^(1/4)}}], {\[Omega], 10, 10^(3/2)},