0

I would like help solving the equation below for Fn within matlab or Octave (preferably).

What I know is the following:

  • MG = 1.3
  • QE = 0.52
  • LN = 3.5

Because I am following this reference(https://www.ti.com/seclit/ml/slup263/slup263.pdf) I know the answer for FN should be 0.65. Page 24 shows the values I am using, and the design I am following.

The answer my script gives when looking at what I tried is incorrect, which can be seen at the very bottom.

What I am trying to solve for is where the Green Arrow is pointing within the curves shown below. The equation shown for MG creates these curves. I realise I have an equation with only 1 unknown, but, I can't come up with a way to solve this equation using matlab or octave.

I'm hoping to see some ones solution to the problem, otherwise, help me through this issue.

enter image description here

enter image description here

My Attempt at solving the equation is below

enter image description here

The answer I get is below as well

enter image description here

RogerDodger
  • 118
  • 8
  • Using Sage: `vars={Mg:1.3,Qe:0.52,Ln:3.5}` and then `nsolve((abs(Ln*fn**2/((((Ln+1)*fn**2)-1)+I*(Ln*Qe*fn*(fn**2-1))))-Mg).subs(vars),0.6,prec=8)}` gives `0.657244793372456` – periblepsis Apr 14 '23 at 04:28

1 Answers1

1

Using your values I found:

$$\frac{13}{10}=\frac{175\text{f}_\text{n}^2}{\sqrt{\text{f}_\text{n}^2\left(\text{f}_\text{n}^2\left(8281\text{f}_\text{n}^2+34063\right)-14219\right)+2500}}\space\Longrightarrow\space$$ $$\text{f}_\text{n}\approx0.516136\space\text{Hz}\space\wedge\space\text{f}_\text{n}\approx0.657245\space\text{Hz}\tag1$$

I used Mathematica to solve the equation:

In[1]:=Clear["Global`*"];
m = 13/10;
q = 52/100;
l = 35/10;
x = FullSimplify[
   Sqrt[ComplexExpand[
       Re[(l*f^2)/((f^2*(l + 1) - 1) + (l*q*f*(f^2 - 1))*I)]]^2 + 
     ComplexExpand[
       Im[(l*f^2)/((f^2*(l + 1) - 1) + (l*q*f*(f^2 - 1))*I)]]^2], 
   Assumptions -> f > 0];
FullSimplify[NSolve[x == m, f, PositiveReals]]

Out[1]={{f -> 0.516136}, {f -> 0.657245}}
Jan Eerland
  • 7,203
  • 12
  • 21
  • Hi Jan, my question is asking to solve for FN, the equation is already given as MG=... – RogerDodger Apr 14 '23 at 14:53
  • @RogerDodger see my edit. – Jan Eerland Apr 14 '23 at 15:00
  • Funny how you guys did this in 3nS, but, using your approach of breaking apart the real and imaginary components seemed to have solved the issue for me. thank you – RogerDodger Apr 14 '23 at 15:48
  • @RogerDodger The abs() function in Sage knows what to do with complex numbers. Your formula shows the abs() function bars. So all I did was to add abs() to surround your expression on the right. Sage's nsolve, given a nearby starting point, will do the rest. No idea why you had any trouble. But I don't use that software, either. I'm too cheap. – periblepsis Apr 15 '23 at 23:19
  • @periblepsis Yea idk why octave wasn't solving it with an abs function either, since it supposedly is supposed to automatically do what I and Jan did manually. Octave is free, and essentially clones MATLAB in language and features, fyi – RogerDodger Apr 18 '23 at 19:44
  • @RogerDodger Well, I had tried Octave some time ago, along with Sage and Sympy. I only have time to invest in one. (No prior experience with MATLAB to help make the decision.) I found it a lot easier with Sage/Sympy to learn as I go and to get everything I really needed, so I cut Octave out of my sphere. If there comes a time when it provides something I need and cannot otherwise get, I'll probably be forced to go back and spend more time with it. In any case, seems like what I have works to solve your problem with relative ease (no added learning on my part.) Yet another confirmation for me. – periblepsis Apr 18 '23 at 20:15