Electronic – What have I done wrong in determining the transfer function for this RCL circuit

analogcircuit analysistransfer function

What have I done wrong in determining the transfer function for this RCL circuit?

enter image description here

(1) $$\dfrac{Eo(s)}{Ei(s)}=\dfrac{s^2R_2CL+sL}{s^2CL(R_1+R_2)+s(R_1R_2C+L)+R_1} $$

Regardless, of how many times that I try, I get the same result. However, my TF response doesn't match the circuit response, as can be seen.

Using complex impedance method

Defining $$z_1 = R1 $$ $$z_s=\dfrac{1}{sC} + R_2 = \dfrac{1+sR_2C}{sC} $$

$$z_p = \dfrac{z_sz_L}{z_s+z_L}=\dfrac{\dfrac{1+sR_2C}{sC}sL}{\dfrac{1+sR_2C}{sC}+sL} =\dfrac{\dfrac{s^2R_2CL+sL}{sC}}{\dfrac{1+sR_2C}{sC}+sL}$$

Multiplying numerator and deniminator through by sC

$$z_p=z_2=\dfrac{s^2R_2CL+sL}{s^2CL+sR_2C+1} $$

Therefore, we have that

$$\dfrac{Eo(s)}{Ei(s)}=\dfrac{z_2}{z_1+z_2}= \dfrac{\dfrac{s^2R_2CL+sL}{s^2CL+sR2C+1}}{{R1}+\dfrac{s^2R_2CL+sL}{s^2CL+sR2C+1}}$$

Simplifying

$$\dfrac{Eo(s)}{Ei(s)}=\dfrac{s^2R_2CL+sL}{{R_1(s^2CL+sR_2C+1)}+{s^2R_2CL+sL}}$$

$$\dfrac{Eo(s)}{Ei(s)}=\dfrac{s^2R_2CL+sL}{s^2CL(R_1+R_2)+s(R_1R_2C+L)+R1}$$

Best Answer

Well, we are trying to analyze the circuit. When we use and apply KCL, we can write the following set of equations:

$$\text{I}_{\text{R}_1}=\text{I}_\text{L}+\text{I}_{\text{R}_2}\tag1$$

When we use and apply Ohm's law, we can write the following set of equations:

$$ \begin{cases} \text{I}_{\text{R}_1}=\frac{\text{V}_\text{i}-\text{V}_1}{\text{R}_1}\\ \\ \text{I}_\text{L}=\frac{\text{V}_1}{\text{sL}}\\ \\ \text{I}_{\text{R}_2}=\frac{\text{V}_1-\text{V}_2}{\text{R}_2}\\ \\ \text{I}_{\text{R}_2}=\text{sC}\text{V}_2 \end{cases}\tag2 $$

Substitute \$(2)\$ into \$(1)\$, in order to get:

$$ \begin{cases} \frac{\text{V}_\text{i}-\text{V}_1}{\text{R}_1}=\frac{\text{V}_1}{\text{sL}}+\frac{\text{V}_1-\text{V}_2}{\text{R}_2}\\ \\ \frac{\text{V}_\text{i}-\text{V}_1}{\text{R}_1}=\frac{\text{V}_1}{\text{sL}}+\text{sC}\text{V}_2 \end{cases}\tag3 $$

Now, the transfer function is given by:

$$\frac{\text{V}_2}{\text{V}_\text{i}}=\frac{\text{sL}}{\text{CL}\left(\text{R}_1+\text{R}_2\right)\text{s}^2+\left(\text{L}+\text{CR}_1\text{R}_2\right)\text{s}+\text{R}_1}\tag4$$

Where I used the following Mathematica-codes:

In[1]:=Clear["Global`*"];
FullSimplify[
 Solve[{IR1 == IL + IR2, IR1 == (Vi - V1)/R1, IL == V1/(s*L), 
   IR2 == (V1 - V2)/R2, IR2 == s*c*V2}, {IR1, IR2, IL, V1, V2}]]

Out[1]={{IR1 -> (Vi + c s (R2 + L s) Vi)/(
   R1 + (L + c R1 R2) s + c L (R1 + R2) s^2), 
  IR2 -> (c L s^2 Vi)/(R1 + (L + c R1 R2) s + c L (R1 + R2) s^2), 
  IL -> (Vi + c R2 s Vi)/(R1 + (L + c R1 R2) s + c L (R1 + R2) s^2), 
  V1 -> (L s (1 + c R2 s) Vi)/(
   R1 + (L + c R1 R2) s + c L (R1 + R2) s^2), 
  V2 -> (L s Vi)/(R1 + (L + c R1 R2) s + c L (R1 + R2) s^2)}}