4 DOF Model

You can ask questions here about Trevor and Gerard's exciting new book on Luthiery.

Moderators: kiwigeo, Jeremy D

johnosb
Kauri
Posts: 32
Joined: Sun Mar 25, 2012 8:51 pm

Re: 4 DOF Model

Post by johnosb » Sat Sep 22, 2012 6:37 pm

kiwigeo wrote:Anyone tried the calculations on a Mac? :mrgreen:
No, don't got one of them but if I thought it'd work I'd get one!!
trevtheshed wrote:I checked the Dbar calc (yet again) and I have it coded exactly as per the book. So,
Yeah, I'm absolutely positive It's us. Ive even gone through and checked your matrices and worked out the determinants just to be sure. Gotta be something we're doing in Excel. I don't suppose you have a breakdown of the terms like I did above? Might put us on to where we're going wrong. It has to be in the IMSUB or IMSUM as the IMPRODUCTS are too straightforward. I've tried evaluating the reals outside the IM functions (omega^2, etc), tried converting the real values to complex COMPLEX(omega^2, 0, "J") for example. Just dunno. As I said to Dom, the damned thing's working, it's just the level is different and there is a notch filter just below T(1,1)1. Very frustrating!!

Os

User avatar
Trevor Gore
Blackwood
Posts: 1605
Joined: Mon Jun 20, 2011 8:11 pm

Re: 4 DOF Model

Post by Trevor Gore » Sun Sep 23, 2012 10:49 am

I expanded out the brackets, (terms 5 and 6 - make sure you get the signs right) making 11 terms total. I evaluated those in 11 columns using IMPRODUCT, each keeping its correct sign, then summed across the columns using IMSUM. I just treated the real terms as complex with zero imaginary part.

User avatar
Dominic
Blackwood
Posts: 1098
Joined: Thu Jan 10, 2008 8:58 am
Location: Canberra

Re: 4 DOF Model

Post by Dominic » Sun Sep 23, 2012 11:02 pm

Thanks again Trevor, I tried something like this but obviously got an error somewhere. I'll get it though I am sure, there are only so many ways to calculate it. And each time I get one wrong, I am by default closer to the answer.
I kind of like these challenges, as frustrating as it can be because the success is all the sweeter. Plus I just get a buzz out the way numbers can come together in a model and do cool stuff.
So thanks again for the cool books Trevor, hours of excel fun.
Cheers
Dom
You can bomb the world to pieces,
but you can't bomb the world to peace!

User avatar
Dominic
Blackwood
Posts: 1098
Joined: Thu Jan 10, 2008 8:58 am
Location: Canberra

Re: 4 DOF Model

Post by Dominic » Fri Oct 05, 2012 12:46 am

Well, I have had two people with very good math skills to check my calcs and they both are happy with what Os and I have done. So I am stuck at this point. I think I'll try the 2DOF model and see if I can replicate that.
But I am running out of options
Dom
You can bomb the world to pieces,
but you can't bomb the world to peace!

User avatar
Trevor Gore
Blackwood
Posts: 1605
Joined: Mon Jun 20, 2011 8:11 pm

Re: 4 DOF Model

Post by Trevor Gore » Fri Oct 05, 2012 7:39 am

It may be better to start by trying to replicate Christensen's plots that I mention here.

User avatar
Dominic
Blackwood
Posts: 1098
Joined: Thu Jan 10, 2008 8:58 am
Location: Canberra

Re: 4 DOF Model

Post by Dominic » Fri Oct 05, 2012 6:38 pm

Sorry Trevor, that's the one I meant. I was just being lazy.
Cheers
Dom
You can bomb the world to pieces,
but you can't bomb the world to peace!

johnosb
Kauri
Posts: 32
Joined: Sun Mar 25, 2012 8:51 pm

Re: 4 DOF Model

Post by johnosb » Sun Oct 07, 2012 11:06 pm

Well, I cracked it with Excel after checking the calcs several (dozen!) times over and not finding anything wrong. I decided to try a different approach and wrote an app to do it. Eureka, worked first up. I still have to sort out a few issues with the plot output format but the shape and amplitude match Trevor's book.

Dom, I've compared the values obtained with Excel and they're all over the place. I'm assuming that there is something about the way that Excel handles the complex arithmetic. I've attached a screen grab of the plot and also of the intermediate values for an input frequency of 100Hz in case you want to chase the Excel solution.

Os
Attachments
4DOF Vals.JPG
4DOF Vals.JPG (61.12 KiB) Viewed 46340 times
4DOF App.JPG
4DOF App.JPG (44.66 KiB) Viewed 46340 times

User avatar
Trevor Gore
Blackwood
Posts: 1605
Joined: Mon Jun 20, 2011 8:11 pm

Re: 4 DOF Model

Post by Trevor Gore » Mon Oct 08, 2012 12:54 am

Well done, John! You deserve a medal for perseverance!

Your plot looks pretty close now, but the first peak is about 10 dB down compared to what I got, but the overall shape and the other peak heights are about the same. Given what we're finding out, it's hard to say which is the more accurate.

Tell you what, it's pretty scary how Excel can screw things up, given that half the world's finances are run on it, and I bet few people know that you only get the right answers some of the time.

For the record, what machine/operating system/Excel version were you using? (I'm using a Toshiba Tecra M5 with Windows XP, and Office Pro 2002) and what did you write the app in?

johnosb
Kauri
Posts: 32
Joined: Sun Mar 25, 2012 8:51 pm

Re: 4 DOF Model

Post by johnosb » Mon Oct 08, 2012 9:48 am

trevtheshed wrote: Your plot looks pretty close now, but the first peak is about 10 dB down compared to what I got, but the overall shape and the other peak heights are about the same. Given what we're finding out, it's hard to say which is the more accurate.
A lot of the calc results are stored in textboxes which I formatted to 2 significant digits, I used those rather than store the results as variables. That's maybe the reason for the slight differences
trevtheshed wrote: Tell you what, it's pretty scary how Excel can screw things up, given that half the world's finances are run on it, and I bet few people know that you only get the right answers some of the time.
You're not wrong. I found that if I calculated (some but not all) terms differently I got different results even though the methods were mathematically the same. You put me on to this when you suggested expanding some of the Dbar terms. I found that the solution to:
-a(BC-D) was different to -abcd + ad and when the terms were evaluated I got different results for subtracting a term or adding a negative term (TermA - TermB compared to TermA + (-TermB)). All very confusing.
trevtheshed wrote: For the record, what machine/operating system/Excel version were you using? (I'm using a Toshiba Tecra M5 with Windows XP, and Office Pro 2002) and what did you write the app in?
The PC is no name, built from parts from a local computer shop and updated as required. It's only an Intel I3 system running XP with Office 2007. I only use it for a bit of development, office stuff, internet and email. I have a faster machine for video and audio stuff. I wrote the app in VB6 as it's quick, down and dirty and I have a licensed Activex charting component so was the obvious choice.

John.

User avatar
Trevor Gore
Blackwood
Posts: 1605
Joined: Mon Jun 20, 2011 8:11 pm

Re: 4 DOF Model

Post by Trevor Gore » Mon Oct 08, 2012 4:10 pm

Thanks John.

Are you happy to declare victory over this lot?

I think it's probably going to take someone programming it up in Matlab or something, working in 64 bit double precision to shake out the rest of it.

I hope Microsoft are watching this one!

johnosb
Kauri
Posts: 32
Joined: Sun Mar 25, 2012 8:51 pm

Re: 4 DOF Model

Post by johnosb » Mon Oct 08, 2012 7:13 pm

trevtheshed wrote:Thanks John.

Are you happy to declare victory over this lot?

I think it's probably going to take someone programming it up in Matlab or something, working in 64 bit double precision to shake out the rest of it.

I hope Microsoft are watching this one!
I'm happy :D :D :D with the results. I might have a look at why the main air peak is a bit low and I added a peak search routine today to display the centroids. All in all it's been a worthwhile exercise. Now all I have to do is put it all to work. I have a large bodied bass using a tail piece (a'la 70s Maton Bindara) planned and I'm trying to figure out how to apply all this to such a project (another thread coming I guess!).

Anyway, thanks for all your input, definitely would not have been able to resolve it without your help.

John.

User avatar
Dominic
Blackwood
Posts: 1098
Joined: Thu Jan 10, 2008 8:58 am
Location: Canberra

Re: 4 DOF Model

Post by Dominic » Tue Oct 09, 2012 1:06 am

Great work John. Well I am glad I didn't spend all those long nights chasing an excel bug. :x
But I am glad it wasn't me making an error.
I am using a dell laptop 2.56Ghz but with Windows 7 Home. I'll try it at work tomorrow on the machines we use to run the economy. Keep your fingers crossed, for all our sakes.

Cheers
Dom
You can bomb the world to pieces,
but you can't bomb the world to peace!

Bruce McC
Blackwood
Posts: 395
Joined: Thu Apr 07, 2011 1:29 pm
Location: Canberra ACT Australia

Re: 4 DOF Model

Post by Bruce McC » Tue Oct 09, 2012 8:52 am

" I'll try it at work tomorrow on the machines we use to run the economy. Keep your fingers crossed, for all our sakes."
Is that appropriate? No wonder the expected budgetary deficit is now in doubt! :lol:
Bruce Mc.

johnosb
Kauri
Posts: 32
Joined: Sun Mar 25, 2012 8:51 pm

Re: 4 DOF Model

Post by johnosb » Tue Oct 09, 2012 10:15 am

afshar wrote:
" I'll try it at work tomorrow on the machines we use to run the economy. Keep your fingers crossed, for all our sakes."
Is that appropriate? No wonder the expected budgetary deficit is now in doubt! :lol:
Treasury computers should work fine, they should be familiar with working in imaginary numbers

User avatar
Dominic
Blackwood
Posts: 1098
Joined: Thu Jan 10, 2008 8:58 am
Location: Canberra

Re: 4 DOF Model

Post by Dominic » Tue Oct 09, 2012 6:11 pm

Ha Ha. Our numbers are always right at the time we make them, its the next day that the problems start. But hey, would you rather have us, or the europeans or americans running the place. In case no one has noticed yet, but the rest of the world has gone to the crapper and yet we are still going pretty good.

But back to our model, Trevor, are your machines business machines with num lock. Mine is a multimedia? machine.

You use windows XP don't you? What excel version do you use?

I have an XP machine here with excel 2003. I've also got an older sharp laptop I might try it on.

Cheers
Dom
You can bomb the world to pieces,
but you can't bomb the world to peace!

User avatar
Trevor Gore
Blackwood
Posts: 1605
Joined: Mon Jun 20, 2011 8:11 pm

Re: 4 DOF Model

Post by Trevor Gore » Tue Oct 09, 2012 9:53 pm

Dominic wrote:But back to our model, Trevor, are your machines business machines with num lock. Mine is a multimedia? machine.

You use windows XP don't you? What excel version do you use?
Current machine is a Toshiba Tecra M5 (as previously mentioned) which is a laptop (the one I used for the course at your place) running Excel 2002 SP3 on Windows XP. I would class my machines as more business than multimedia, but I don't know what the distinction is, other than wide screens and faster video cards. I did the whole book on the Tecra; word processing, photo editing, graphics and page layout to offset-litho-ready.

I wouldn't have thought num lock would make any difference - it's just a keyboard function.

Have a read of this and this, which is most likely where the problems lie. I was brought up with the first generation of commercial digital computers, so issues related to ill-conditioning were drilled into us when being taught how to program IBM 360s. These days, I rarely think of it specifically, but still, by habit, code in that style. In a nutshell, just try to keep the numbers you manipulate in a single cell or function of a similar size, where you can, by breaking down the formulae such that that is the case. If you use the Excel built-in functions, try to find out how they do the calc. As both you and John have found, the layout of the code matters, even on fairly simple stuff like the thickness calc.

User avatar
Dominic
Blackwood
Posts: 1098
Joined: Thu Jan 10, 2008 8:58 am
Location: Canberra

Re: 4 DOF Model

Post by Dominic » Wed Oct 10, 2012 8:09 am

Thanks Trevor, I just meant that machines with num lock functions are more likely to be business machines. This is the first laptop I've had this does not have these functions so i wondered if it dealt differently with numbers at the machine code level.
Anyway, I'll read up on it and at least we know its not our math skills.
Cheers
Dom
You can bomb the world to pieces,
but you can't bomb the world to peace!

User avatar
kiwigeo
Admin
Posts: 10582
Joined: Sat Sep 29, 2007 5:57 pm
Location: Adelaide, Sth Australia

Re: 4 DOF Model

Post by kiwigeo » Wed Oct 10, 2012 5:30 pm

There's always log books :mrgreen:
Martin

johnosb
Kauri
Posts: 32
Joined: Sun Mar 25, 2012 8:51 pm

Re: 4 DOF Model

Post by johnosb » Mon Oct 15, 2012 10:12 pm

Another quick question for you Trevor.

Where do you get the stiffness and damping factor for the 4DOF parameters? I figured that K could be calculated from the Young's modulus of a measured plate using (4EBD^3)/L^3 but this comes out tiny compared to your 68000. I used the long grain E, body length, lower bout width and target thickness. and came up with 1133 Nm. As for the damping factor, no idea!

John.

User avatar
Trevor Gore
Blackwood
Posts: 1605
Joined: Mon Jun 20, 2011 8:11 pm

Re: 4 DOF Model

Post by Trevor Gore » Tue Oct 16, 2012 10:00 am

John,

The data points to feed the model started out as measured parameters for the guitar that was modelled, but you have to remember that the values in the model are all equivalent masses and equivalent stiffnesses, which are hard to measure experimentally. However, they are mostly reasonably close to measurements made in fairly simple ways, unlike the values you get if you try to tune a 3 DOF model. The 3 DOF model is written up very well in Howard Wright's thesis, downloadable from here and is pretty much essential reading if meddling in this stuff.

The stiffness K (N/m) [not sure how you got Nm, unless it was just a typo], is measured in the same way as it is measured for monopole mobility, just load/deflection with the load on the monopole antinode (for both top and back). Obviously, you need a finished guitar to do this with or some pretty good FE modelling. You could go back to the Hearmon equations, but they are only for rectangular flat plates, without bracing, so you would have to make some adjustments. Caldersmith, in one of his papers (the guitar as a reflex enclosure) has an approach that can get you to an equivalent braced plate stiffness from the plate dimensions and brace sizes. His numbers come out similar to my measurements. If you're trying to do predictive design work, probably your best bet is to find a guitar similar to what you want to design and go from there.

For the damping factors, they were matched to the frequency response curve of the modelled guitar and so they are what they are. As you know, the Q values of the peaks in the frequency response curve of a finished guitar bear little relationship to the Q of the materials it is made from.

Having fed the basic measurements into the model, the model is then "tuned" to match the frequency response curve of the guitar being modelled by tweaking the parameters until the difference between the modelled result and the measured guitar response is minimised, all the time making sure that as you tweak the parameters they still remain reasonably close to real world values. You could write a routine to do the tweaking (more optimisation!) or do it manually. I think most people (Wright, Christensen etc.) used a combination of both, as did I, as doing optimisation in this complex space presents its own problems.

johnosb
Kauri
Posts: 32
Joined: Sun Mar 25, 2012 8:51 pm

Re: 4 DOF Model

Post by johnosb » Wed Oct 17, 2012 4:24 pm

Thanks Trevor,

I have started reading Wright's thesis and already picked up a few things that needed clarifying. Given that K has such a dramatic roll in moving and shaping the T(1,1) peaks, I was hoping to use the model to trim the peaks into position for various timber varieties. It seemed to me that by transposing the formulae you provide one could obtain values for K via (2Pif)^2 m or 4ebd^3/l^3. Using you table of measured values (4.5-3 on pp 4-63),neither of these give reasonable figures with the latter being consistently 'out' by a factor of 20 and oddly the ratio of the two is 10.37 so there is obviously a relationship.

N/m is the unit given in the parameter table. I thought this reasonable given I was thinking in terms of deflection under load.

I'll keep studying!!

John.

User avatar
Trevor Gore
Blackwood
Posts: 1605
Joined: Mon Jun 20, 2011 8:11 pm

Re: 4 DOF Model

Post by Trevor Gore » Thu Oct 18, 2012 12:24 am

Table 4.5-3 just gives you the elastic constants for the plates when they are flat and rectangular. To get to the stiffness of a panel on a guitar, you then have to factor in the braces and their distribution and stiffness; the panel curvature; the boundary conditions (free for a plate, edge constrained and mass loaded for a panel on a guitar) and the panel outline shape. On top of that, you could also add the effect of the finish if you wanted to be pedantic! That is why the panel stiffness comes out a lot higher than you might have thought. iirc, just an encastré edge constraint (edge moment constraint) gives an increase in stiffness of a factor of 4, with the sort of curvatures I use giving another factor of 4. And that's not counting the braces yet!

So, there's no straight forward route to get to a built panel stiffness from a simple plate stiffness.
johnosb wrote:I was hoping to use the model to trim the peaks into position for various timber varieties.
I pretty much approached that the other way round. (Not that you should necessarily do that...). By using the thicknessing formula (Equ. 4.5-7) I get the same panel performance every time by managing the thickness. So once I've built one guitar, I know that I can get the same performance using different wood (it's always different, even if of the same species) if I use the thicknessing formula.

To do it the way you suggest, you'd have to use the method in the Caldersmith paper I mentioned (it's the 1978 one, in his Appendix A). Not sure it would be as precise as you'd need. No harm in giving it a try, though.

Jim Kirby
Beefwood
Posts: 23
Joined: Sat Nov 24, 2012 5:17 am
Location: Newark, DE, USA

Re: 4 DOF Model

Post by Jim Kirby » Wed Dec 26, 2012 5:59 am

Merry Christmas to all from the U.S. East Coast. I have been trying to program up the various tools in the book in matlab (I know nothing about excel), and I had been stuck trying to reproduce Figure 2.4-4 with my code. I was getting very strange behavior at 100 Hz and below. I have rederived the solution starting exactly from AII 2-1 through 2-4 as given, and I have a sign difference in one term compared to the result AII 2-43. I get

+ K_t K_b alpha_ab

for the first term in brackets in the numerator, rather than with the - sign. If anyone else has checked this, please let me know. With this change, I get qualitatively the same behavior in Figure 2.4-4, although my peak at around 100 Hz is a little stronger (getting up to about -50 dB), and my low frequency asymptote bottoms out at around -95 dB instead of the -90 in the book (more like Figure 2.4-7).

I'd be glad to pass along the .m file and a scan of my solution if anyone is interested. I was trying to upload the figure here but my image is 1 pixel too wide - need to resize.

Jim

User avatar
Trevor Gore
Blackwood
Posts: 1605
Joined: Mon Jun 20, 2011 8:11 pm

Re: 4 DOF Model

Post by Trevor Gore » Thu Dec 27, 2012 12:01 pm

Jim, I think both John and Dom have been through the derivations (they will correct me if I'm wrong!) and I think they got what's in the book. John has also managed to get pretty similar charts to mine, here: viewtopic.php?f=33&t=4636&start=50#p55463, so at this point I'd say have another look and see if there's an error in your workings. A Matlab solution will certainly be good to have, as Excel is pretty flaky on this stuff, so I'm looking forward to seeing what you have, when you're ready.

Jim Kirby
Beefwood
Posts: 23
Joined: Sat Nov 24, 2012 5:17 am
Location: Newark, DE, USA

Re: 4 DOF Model

Post by Jim Kirby » Thu Dec 27, 2012 1:39 pm

Thanks for your reply. Actually, the error in the printed solution is easy to see starting from the form AII 2-38. The numerator will be

-F det ( the 3 by 3 matrix subdominant to this)

which becomes

-F ( -K_t K_b alpha_ab + D_s D_b alpha_at + 0 -alpha_at K_b^2 - 0 -alpha_ab alpha_bt D_s)

which gives, after cancelling - signs, the same as AII 2-43 except for a plus sign in front of the first term in the numerator.

Incidentally, note that the subscripts for y in AII 2-37 and AII 2-38 are typos - should be y_b and y_a. Also, the p^2 inside the log in Equ. 2.4-12 should be |p|^2, since p is complex.

I'm still checking my matlab code to make sure that I have programmed the results up correctly. All I know so far is that, if I keep the - sign as in the text, the main air peak gets really mangled. (and I need to figure out how to resize my plots on my mac - I guess iphoto will do it? Dunno, never use it. Matlab insists on giving me a jpeg which is 1201 pixels wide.)

I'm really enjoying the book, now that I've had time to get into it finally after having had it almost from day 1.

Post Reply

Who is online

Users browsing this forum: No registered users and 29 guests