cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Annoying problem with minimization

aclark-3
1-Visitor

Annoying problem with minimization

Hello.

I've written a program which finds the resonance frequencies of a recorder (using 2nd order Runge-Kutta integration) for various open and closed positions of the finger holes. Actually right now I am trying to get the same results in MathCad as in my earlier Excel program, so that I can easily move on to using complex quantities. I have attached the file.

I am pretty sure that the basic computations are correct, and one can skip over them. The problem is with the minimization. Things are very sensitive to the inital "guess" frequency (at the top of the program). If I am off by say about 50 Hertz I get nonsense. Furthermore the final frequency found drifts slightly as I change the guess frequency. It's also very sensitive to the CTOL.

The fundamental frequency for the hole configuration set right now is 353.4 Hz.  If I guess around 800 Hz and search for the 2nd harmonic, I sometimes get around 743.9 Hz, but if I change the guess a tad I might get 347.1 Hz.

Any help appreciated.

Regards, Al

5 REPLIES 5

alton clark wrote:

The problem is with the minimization. Things are very sensitive to the inital "guess" frequency (at the top of the program). If I am off by say about 50 Hertz I get nonsense.

Plot P2 as a function of frequency to see why:

P2.PNG

Alan

thanks Alan.

I realize that there are multiple harmonic solutions.

Is there some way that I can restrict the search for frequency so that it only includes one specific harmonic?

Al

RichardJ
19-Tanzanite
(To:aclark-3)

Create a solve block with a constraint:

Or use a solve block with Minerr and look for several at the same time!

fres.png

Alan

Thanks much, Alan

Announcements

Top Tags