# Solve an equation with angle of 2 transfer functions to get the capacitor?

Posted 6 months ago
944 Views
|
9 Replies
|
4 Total Likes
|
 Hello, I have a little Mathematica notebook that equalizes the angle of 2 transfer functions to calculate a capacitor with Solve[]. In an other Computer Mathematics System I get a solution without problem, but Mathematica gives an error back. Can anybody help me, who is better in Mathematica syntax? Thanks, Regards Leo Za = I*w*L + 1/(I*w*C + 2/Z0); Zb = 1/(I*w*C) + 1/(1/(I*w*L) + 2/Z0); Zl = Re[1/(1/Za + 1/Zb)] - I*Im[1/(1/Za + 1/Zb)]; Zal = 1/(1/Zl + 1/Za); Zbl = 1/(1/Zl + 1/Zb); WU2U0a = Arg[Zbl/2/(1/(1/(Zbl + I*w*L) + I*w*C) + Z0/2)]; WU2U0b = Arg[-Zal/ 2/(Z0/2 + 1/(1/(1/(Zal + 1/(I*w*C))) + (1/(I*w*L))))]; Z0 = 44 - I*15; w = 2*Pi*868*^6; L = 1.8*^-9; Solve[WU2U0a == WU2U0b && C > 0 && C < 50*^-12, C]  Attachments:
9 Replies
Sort By:
Posted 6 months ago
 Do not use C as a variable, since it is a built-in symbol in the system. We put X =WU2U0a - WU2U0b . In this problem we have a special case when X goes through 0 abruptly - see fig. Thus, all solvers fail on this problem. Fortunately, we can approximately determine the root of the equation as the minimum point X. It is possible that this solution makes sense for technical applications in trigger generators. p = 9; Za = I*w*L + 1/(I*w*C1 + 2/Z0); Zb = 1/(I*w*C1) + 1/(1/(I*w*L) + 2/Z0); Zl = Re[1/(1/Za + 1/Zb)] - I*Im[1/(1/Za + 1/Zb)]; Zal = 1/(1/Zl + 1/Za); Zbl = 1/(1/Zl + 1/Zb); WU2U0a = Arg[Zbl/2/(1/(1/(Zbl + I*w*L) + I*w*C1) + Z0/2)]; WU2U0b = Arg[-Zal/ 2/(Z0/2 + 1/(1/(1/(Zal + 1/(I*w*C1))) + (1/(I*w*L))))]; Z0 = 44 - I*15; w = Rationalize[2*Pi*868*^6, 10^-p]; L = 18*^-10; X = WU2U0a - WU2U0b; Block[{$MinPrecision = p,$MaxPrecision = p}, NMinimize[{X, 0 <= C1 < 5*10^-11}, C1, WorkingPrecision -> p]] {-2.96652668, {C1 -> 2.77937850*10^-11}} {Plot[X, {C1, 2.7730*10^-11, 2.7930*10^-11}], Plot[{WU2U0a, WU2U0b}, {C1, 2.7730*10^-11, 2.7930*10^-11}, PlotLegends -> "Expressions"]} 
Posted 6 months ago
 Hello Alexander, the circuit is a monofrequent balun. With another Computer Mathematics System (MuPad) it is easy to solve the problem. The problem is solved now. It was my mistake.Thanks a lot.Regards. Attachments:
Posted 6 months ago

It is a fact that there are many solutions for C1 that angle of transfer function 1 is equal to angle of transfer function 2. A German mathematician told me yesterday the problem is a quotient with 2 polynomials in w with the order 48.

It depends upon the methode to find some solutions. Different methods deliver different solutions. MuPad delivers 13 real solutions for C1. Mathematica's Solve and NSolve have different methodes, so it sometimes delivers different solutions depending on whether methode was internal used. -

Maybe I will check if there are wrong solutions when I have time.

## I guess all solutions are right and we should accept that.

MuPad: C1 -> 1.606139208*10^-11 In the attachment You can bottom see that the 2 voltages have the same phase in the load impedance. So C1 -> 1.606139208*10^-11 is a correct solution.

This C1 solution is the best, because with it Zgenerator will be Zinput*, so it is close to matching.

Regards Leo

Attachments:
Posted 6 months ago
 It is possible that some of the solutions found with MuPad are erroneous. It is easy to check, for example, that C1 = 1.606139208*10^-11 is not a root of the equation X = 0, indeed In[3]:= X /. C1 -> 1.606139208*10^-11 Out[3]= 2.15442 Or have you found another solution? Does it coincide with mine C1 -> 2.77937850*10^-11?
Posted 6 months ago
 At the moment I have the problem, that I get different solutions with different calculations with Mathematica. Sometimers I get 2 real solutions, sometimes I get only complex solutions.- I will check it tomorrow. I am confused.My results are in the attachment.I will check it tomorrow, it is late here. I will message.Regards Attachments:
Posted 6 months ago
 It is a fact that there are many solutions for C1 that angle of transfer function 1 is equal to angle of transfer function 2. A German mathematician told me yesterday the problem is a quotient with 2 polynomials in w with the order 48.It depends upon the methode to find some solutions. Different methods deliver different solutions. MuPad delivers 13 real solutions for C1. Mathematica's Solve and NSolve have different methodes, so it sometimes delivers different solutions depending on whether methode was internal used. -Maybe I will check if there are wrong solutions when I have time.I guess all solutions are right and we should accept that.Regards Leo
Posted 6 months ago
 Many solutions in the complex plane and only one real root, which I have indicated. But if you change the frequency w, as suggested by the German mathematician, the roots will be infinitely many.