Math Algebra Tip - Page 1
Forum section: electronics / beginners

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 14, 2017, 07:00:10 am
content: Working on a lengthy bit of algebra?Applicable example from electronics: working with AC networks, filters, whatever. Even just three components (R, L and C) can lead to some ponderous formulas, when written out in full (in terms of R, L and C).The tip is this: instead of working with the equation as you go -- taking along all that baggage that's just going to trip you up later -- come up with the simplest possible skeleton, and evaluate that.The example I'm working with right now: find the resonance of an RLC network. There are many possible ways to define resonance (V peak, P peak, phi = multiple of pi/2, imaginary = 0, etc.), all of which vary in difficulty. In this case, I'm using the hardest, and most...robust? method: take the derivative with respect to frequency, and find zeroes (i.e., local minima/maxima).This is a terrible formula to simplify (peaking at 40 terms), but it's much better to do symbolically, then substitute the values in later.Worked example:Find the local max/min of:\[ Z = \frac{a + jb}{c + jd} \]For a general network (in this case, a one-port's impedance Z; this applies equally well for a transfer function H), a ratio of complex numbers (which happen to be polynomials in \$\omega\$) is the simplest starting point.Working from here, we take \$\left|Z\right|\$, then set \$\frac{d\left|Z\right|}{d\omega} = 0\$, then simplify as much as possible. The result is:\[ 0 = a\,da + b\,db - \frac{a^2 + b^2}{c^2 + d^2} \left( c\,dc + d\,dd \right) \](Yes, I realizedwas a poor choice of symbol for a calculus problem...)Then we substitute in our polynomials a, b, c and d (and their derivatives), and solve for \$\omega\$.Give it a try. See if it works, see if I made any mistakes deriving this.Simple case: impedance of a parallel resonant network, \$Z = \frac{1}{\frac{1}{R} + \frac{1}{j \omega L} + j \omega C}\$, we get \$a = 1\$, \$b = 0\$, \$c = \frac{1}{R}\$, and \$d = \omega C - \frac{1}{\omega L}\$. Let me know!(What, you think I was going to give you the answer that easily?)Tim

author: kulky64
author_rank: Regular Contributor
timestamp: March 14, 2017, 11:39:28 am
content: You made two errors in your math.1. You determined impedance wrong, you have sign error in capacitive term.2. You determined "d" term wrong from your already wrong expression for impedance. From what you have, it should be:\$ d=-\frac{1}{\omega L}-\omega C \$.You can't simply ignore that imaginary unit is in denominator.

author: egonotto
author_rank: Super Contributor
timestamp: March 14, 2017, 01:00:28 pm
content: Quote from: kulky64 on March 14, 2017, 11:39:28 amAlmost true. How about:\$ d=\omega C -\frac{1}{\omega L}\$

author: kulky64
author_rank: Regular Contributor
timestamp: March 14, 2017, 01:12:09 pm
content: This is correct, if you have correct expresion for impedance. But I calculated d from his incorrect expression for impedance.

author: orolo
author_rank: Frequent Contributor
timestamp: March 14, 2017, 05:02:55 pm
content: Quote from: T3sl4co1l on March 14, 2017, 07:00:10 amMuch easier to derive than to write down.\$ Z = \displaystyle \frac{u}{v} \$\$d\vert Z\vert^2 = 0 \quad \Leftrightarrow \quad \displaystyle d\frac{u u^*}{vv^*} = 0 \$\$\displaystyle d\frac{uu^*}{vv^*} \ =\ \displaystyle \frac{(u du^* + u^* du) v v^* \ - \ u u^* (v dv^* + v^*dv)}{(v v^*)^2} \$\$ \displaystyle d\vert Z\vert = 0 \quad \Rightarrow \quad (u du^* + u^* du) v v^* \ - \ u u^* (v dv^* + v^*dv) = (u du^* + u^* du)\vert v\vert^2 - \vert u \vert^2 (v dv^* + v^*dv) = 0 \$Noting that \$ u du^* + u^* du = (udu^*) + (udu^*)^* = 2 \Re udu^* \$, if we make \$u = a + bi\$, then \$udu^* = (a + bi)(\dot{a} - \dot{b}i) = a\dot{a} + b\dot{b} + a\dot{b}i - b\dot{a}i\$. So the real part is \$a\dot{a} + b\dot{b}\$. The same for v.From there, the condition is:\$(a\dot{a} + b\dot{b})(c^2 + d^2) - (a^2+b^2)(c\dot{c} + d\dot{d}) = 0 \$------------------Other way, much easier:\$ \vert Z \vert^2 = \displaystyle \frac{a^2 + b^2}{c^2 + d^2} \$Deriving:\$ \displaystyle d \frac{a^2 + b^2}{c^2 + d^2} = \displaystyle \frac{2(a\dot{a} + b\dot{b})(c^2+ d^2) - (a^2+b^2)2(c\dot{c}+d\dot{d})}{(c^2+d^2)^2} \$The condition for that derivative to be zero is:\$(a\dot{a} + b\dot{b})(c^2 + d^2) - (a^2+b^2)(c\dot{c} + d\dot{d}) = 0 \$This last one doesn't need complex numbers.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 14, 2017, 11:32:18 pm
content: Quote from: kulky64 on March 14, 2017, 11:39:28 amQuote from: egonotto on March 14, 2017, 01:00:28 pmThanks! Edited.Tim

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 14, 2017, 11:33:48 pm
content: Quote from: orolo on March 14, 2017, 05:02:55 pmThanks, good to have agreement between two other approaches and my own.Must say I like the symmetry in this formula!Tim