5
\$\begingroup\$

I want to calculate the transfer function of the following low pass filter

schematic

simulate this circuit – Schematic created using CircuitLab

UPDATED Circuit
enter image description here

It is made from an inductor, the internal resistance of the inductor, a capacitor and a charge resistance.
Then using a voltage divider we can say

\begin{align} v_{o}&=v_{oi}\frac{R}{Ls+R_{L}+\frac{R(\frac{1}{Cs})}{R+\frac{1}{Cs}}}\\ \frac{v_{o}}{v_{oi}}&=\frac{R}{Ls+R_{L}+\frac{1}{\frac{1}{R}+\frac{1}{\frac{1}{Cs}}}}\\ &=\frac{R}{Ls+R_{L}+\frac{1}{\frac{1}{R}+Cs}}\\ &=\frac{R}{Ls+R_{L}+\frac{1}{\frac{1+RCs}{R}}}\\ &=\frac{R}{Ls+R_{L}+\frac{R}{1+RCs}}\\ &=\frac{R}{Ls+R_{L}+\frac{R}{1+RCs}}\frac{1+RCs}{1+RCs}\\ &=\frac{R+R^{2}Cs}{(Ls+RLCs^{2})+(R_{L}+RR_{L}Cs)+R}\\ &=\frac{R+R^{2}Cs}{(Ls+RLCs^{2})+(R_{L}+RR_{L}Cs)+R} \end{align}

But I think this should be a bit different: it does look like a 2nd order system but seems to be too bloated, so is this the transfer function? I am trying to couple this to the output of a DC-AC inverter.

UPDATE
As noted by ErikR, the numerator was wrong, so the derivation is:

\$\frac{v_{o}}{v_{oi}}=\frac{\frac{1}{\frac{1}{R}+\frac{1}{\frac{1}{Cs}}}}{Ls+R_{L}+\frac{1}{\frac{1}{R}+\frac{1}{\frac{1}{Cs}}}}\$

\$\frac{v_{o}}{v_{oi}}=\frac{\frac{1}{\frac{1}{R}+Cs}}{Ls+R_{L}+\frac{1}{\frac{1}{R}+Cs}}\$

\$\frac{v_{o}}{v_{oi}}=\frac{\frac{1}{\frac{1+RCs}{R}}}{Ls+R_{L}+\frac{1}{\frac{1+RCs}{R}}}\$

\$\frac{v_{o}}{v_{oi}}=\frac{\frac{R}{1+RCs}}{Ls+R_{L}+\frac{R}{1+RCs}}\$

\$\frac{v_{o}}{v_{oi}}=\frac{\frac{R}{1+RCs}}{Ls+R_{L}+\frac{R}{1+RCs}}\frac{1+RCs}{1+RCs}\$

\$\frac{v_{o}}{v_{oi}}=\frac{R}{(Ls+RLCs^{2})+(R_{L}+RR_{L}Cs)+R}\$

\$\frac{v_{o}}{v_{oi}}=\frac{1}{(\frac{Ls}{R}+LCs^{2})+(\frac{R_{L}}{R}+R_{L}Cs)+1}\$

\$\frac{v_{o}}{v_{oi}}=\frac{1}{LCs^{2}+(\frac{L}{R}+R_{L}C)s+(\frac{R_{L}}{R}+1)}\$

\$\endgroup\$
5
  • 5
    \$\begingroup\$ Good instincts. It really should be a low-pass form. Nicely asked question here, too. +1 \$\endgroup\$
    – jonk
    Jun 8, 2021 at 18:57
  • 3
    \$\begingroup\$ I have to ask: is this a homework? Because if it is then this should be bookmarked and referenced to other people as the sort of question that presents the problem and the attempted solution. \$\endgroup\$ Jun 9, 2021 at 10:12
  • 3
    \$\begingroup\$ Where is the output voltage \$v_o\$ tapped? Probably across R and C, but this is not self-evident. \$\endgroup\$
    – Curd
    Jun 9, 2021 at 10:29
  • 2
    \$\begingroup\$ @aconcernedcitizen, this is not a homework, but I wont mind to tag it as one. \$\endgroup\$
    – avelardo
    Jun 9, 2021 at 19:01
  • 2
    \$\begingroup\$ @Curd Im updating the circuit, because indeed its taped to R and C. \$\endgroup\$
    – avelardo
    Jun 9, 2021 at 19:01

3 Answers 3

7
\$\begingroup\$

Your numerator in this:

$$ v_{o}=v_{oi}\frac{R}{Ls+R_{L}+\frac{R(\frac{1}{Cs})}{R+\frac{1}{Cs}}} $$

Should be \$Z_R || Z_C\$. That is,

$$ v_{o}=v_{oi}\frac{R || Z_C}{Z_L+R_{L}+(R||Z_C)} $$

\$\endgroup\$
3
  • 2
    \$\begingroup\$ Thanks I did oversee this, Im updating the question. \$\endgroup\$
    – avelardo
    Jun 8, 2021 at 19:04
  • 3
    \$\begingroup\$ Shud be \$Z_L\$ \$\endgroup\$ Jun 8, 2021 at 19:30
  • 3
    \$\begingroup\$ Ok - updated... \$\endgroup\$
    – ErikR
    Jun 8, 2021 at 19:31
6
\$\begingroup\$

These are the kinds of questions that should be brought here more often. I see that ErikR has correctly identified the flaw in your writing and that you've selected the answer. Great!

So I won't belabor those details.


Instead, I'll recommend that you learn to use sympy, which is freely available. (Yes, there are some 'instructions' you'll need to follow to get it loaded up and running right.)

Let me show you one way you may use that tool:

var('s R_l R L C')                    # let sympy know your variable names
zc = 1/s/C                            # capacitor C impedance
zl = s*L                              # inductor L impedance
zp = R / (1 + R/zc)                   # parallel (R || C) impedance
                                      # ... same as writing zc / (1 + zc/R)
tf = simplify( zp / (zp + R_l + zl) ) # generate the transfer function

From the above, if you print out 'tf' you will get:

$$\frac{R}{R+\left(L\cdot s + R_L\right)\cdot\left(C\cdot R\cdot s + 1\right)}$$

And that is already in a useful form.


However, I've written a small bit of Python (sympy requires Python) for 2nd order transfer functions to help me out when putting things into standard form:

def tf2( h ):
    global s, omega, zeta, P, A, N
    s, omega, zeta, P, A, N = symbols( "s omega zeta P A N")
    expr = simplify( h )
    n, d = fraction( expr )
    v = {}
    for fs in d.free_symbols: v[fs] = 1
    nc = Poly( expand( n ), s).all_coeffs()
    dc = Poly( expand( d ), s).all_coeffs()
    sgn = dc[0].subs( v )
    if sgn < 0:
        nc = Poly( expand( -n ), s).all_coeffs()
        dc = Poly( expand( -d ), s).all_coeffs()
    if len( dc ) == 3 and len( nc ) <= len( dc ):
        omegac = powdenest( sqrt( simplify( dc[2] / dc[0] ) ), force=True )
        zetac = powdenest( simplify( dc[1] / 2 / powdenest( sqrt( simplify( dc[0] * dc[2] ) ), force=True ) ), force=True )
        u = []
        for i in range( len( nc ) ):
            Av = powdenest( simplify( nc[i] / dc[len( dc ) - len( nc ) + i] ), force=True )
            if Av != 0:
                u.append( { A: Av, N: (len( nc ) - i - 1) } )
        return { omega: omegac, zeta: zetac, P: u }

I wrote the above code in about an hour's time (debugging and everything) to help me work faster and better, helping me validate what I write here. In part because I respect the time of others and do what I can to verify what I write.

This function is defined for me inside a file called init.sage. (I use sympy as part of SageMath, which is another free tool.) It is able to handle the full 2nd order transfer function of this very general form:

$$\begin{align*} \mathcal{H}\left(s\right)&=\frac{a_2 s^2 + a_1 s + a_0}{b_2 s^2 + b_1 s + b_0}\\\\ &=\frac{a_2 s^2}{b_2 s^2 + b_1 s + b_0}+\frac{a_1 s}{b_2 s^2 + b_1 s + b_0}+\frac{a_0}{b_2 s^2 + b_1 s + b_0} \end{align*}$$

And turn it into one of this standard form:

$$\begin{align*} \mathcal{H}\left(s\right)&=A_2\frac{\left(\frac{s}{\omega_{_0}}\right)^2} { \left(\frac{s}{\omega_{_0}}\right)^2 + 2\zeta \left(\frac{s}{\omega_{_0}}\right) + 1}+A_1\frac{ 2\zeta \left(\frac{s}{\omega_{_0}}\right)} { \left(\frac{s}{\omega_{_0}}\right)^2 + 2\zeta \left(\frac{s}{\omega_{_0}}\right) + 1} +A_0\frac1 { \left(\frac{s}{\omega_{_0}}\right)^2 + 2\zeta \left(\frac{s}{\omega_{_0}}\right) + 1}\\\\ &=A_2\frac{ s^2} { s^2 + 2\zeta\,\omega_{_0} s + \omega_{_0}^2}+A_1\frac{ 2\zeta\,\omega_{_0} s} { s^2 + 2\zeta\,\omega_{_0} s + \omega_{_0}^2}+A_0\frac{ \omega_{_0}^2} { s^2 + 2\zeta\,\omega_{_0} s + \omega_{_0}^2} \end{align*}$$

So here is what I get from it:

tf2(tf)
{omega: sqrt(R + R_l)/(sqrt(C)*sqrt(L)*sqrt(R)),
 zeta: (C*R*R_l/2 + L/2)/(sqrt(C)*sqrt(L)*sqrt(R)*sqrt(R + R_l)),
 P: [{A: R/(R + R_l), N: 0}]}

The first two shown there, omega and zeta, are common to all terms (regardless of whether there is one, two, or three of them.) The P part is an array. Here, it indicates the \$A\$ factors for each term and the s-power of the term, \$N\$. You can see that the only \$s^0\$ is present. So this is a low-pass filter.

So you have a low-pass filter, where: \$A_0=\frac1{1+\frac{R_L}{R}}\$, \$\omega_{_0}={\sqrt{1+\frac{R_L}{R}}}\cdot\frac1{\sqrt{L\,\cdot\, C}}\$, and \$\zeta=\frac1{2\,\omega_{_0}}\cdot\left(\frac{R_L}{L}+\frac1{R\,\cdot\, C}\right)\$.

It's the fact that \$\alpha=\omega_{_0}\cdot\zeta\$. So to achieve the above results for \$\zeta\$, more easily, I did this:

mytf2 = tf2(tf)
alpha = simplify( mytf2[zeta] * mytf2[omega] )

I found that \$\alpha=\frac12\left(\frac{R_L}{L}+\frac1{R\,\cdot\, C}\right)\$. So it was then very easy to write out the result from \$\zeta=\frac{\alpha}{\omega_{_0}}\$.

\$\endgroup\$
5
  • 2
    \$\begingroup\$ thanks, just what I was looking for, since Im in a project,and I was thinking of using something like python, in the same way that the question I did overlook the simpy package, Just great, thanks so much this answer helps me so much too.!!! \$\endgroup\$
    – avelardo
    Jun 8, 2021 at 19:34
  • 2
    \$\begingroup\$ @avelardo Thanks for letting me know that it helps! Appreciated. And best wishes. \$\endgroup\$
    – jonk
    Jun 9, 2021 at 3:01
  • 2
    \$\begingroup\$ Thanks to you, you are very kind, also I started to write somethings that perhaps I share here later, take care and thanks again!!!. \$\endgroup\$
    – avelardo
    Jun 9, 2021 at 19:06
  • 2
    \$\begingroup\$ @avelardo If so, please let me know so that I can see if it helps me do other things well. Again, thanks! \$\endgroup\$
    – jonk
    Jun 9, 2021 at 19:11
  • 2
    \$\begingroup\$ Thanks you are very kind, I will of course.! \$\endgroup\$
    – avelardo
    Jun 10, 2021 at 2:48
0
\$\begingroup\$

Well, the transfer function of your circuit is given by:

$$\mathscr{H}\left(\text{s}\right):=\frac{\text{v}_\text{o}\left(\text{s}\right)}{\text{v}_\text{i}\left(\text{s}\right)}=\frac{\text{R}\text{||}\frac{1}{\text{sC}}}{\left(\text{R}\text{||}\frac{1}{\text{sC}}\right)+\text{R}_\text{L}+\text{sL}}=\frac{\text{R}}{\text{RLCs}^2+\left(\text{L}+\text{CRR}_\text{L}\right)\text{s}+\text{R}+\text{R}_\text{L}}\tag1$$

Now, when working with sinusoidal signals we can use \$\text{s}:=\text{j}\omega\$ (where \$\text{j}^2=-1\$ and \$\omega=2\pi\text{f}\$ with \$\text{f}\$ is the frequency of the input signal in Hertz). So we get:

$$\underline{\mathscr{H}}\left(\text{j}\omega\right)=\frac{\text{R}}{\text{RLC}\left(\text{j}\omega\right)^2+\left(\text{L}+\text{CRR}_\text{L}\right)\text{j}\omega+\text{R}+\text{R}_\text{L}}=$$ $$\frac{\text{R}}{\text{R}_\text{L}+\text{R}\left(1-\text{LC}\omega^2\right)+\left(\text{L}+\text{CRR}_\text{L}\right)\omega\text{j}}\tag2$$

So, the amplitude response of your circuit is given by:

$$\left|\underline{\mathscr{H}}\left(\text{j}\omega\right)\right|=\frac{\text{R}}{\sqrt{\left(\text{R}_\text{L}+\text{R}\left(1-\text{LC}\omega^2\right)\right)^2+\left(\left(\text{L}+\text{CRR}_\text{L}\right)\omega\right)^2}}\tag3$$

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.