Sound

Sound - Messages

#1 Posted: 4/10/2018 11:40:58 AM
Ruben Sidranski

Ruben Sidranski

17 likes in 463 posts.

Group: User

I think I need a program loop to get the graph to show up correctly. Suggestions?
Quick Sound Loss.smz (132 KiB) downloaded 63 time(s).
#2 Posted: 4/10/2018 11:56:29 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

I think I need a program loop to get the graph to show up correctly.Suggestions?


"Why does log10 look different ?"
because you have two different formulas, thus two different results
#3 Posted: 4/10/2018 12:39:19 PM
Ruben Sidranski

Ruben Sidranski

17 likes in 463 posts.

Group: User

Jean,
The second equation is off/not evaluated. Graphically log to base x and log10 display differently. Question is about graph though
#4 Posted: 4/10/2018 2:31:49 PM
Davide Carpi

Davide Carpi

1416 likes in 2873 posts.

Group: Moderator

Strict math seems correct to me; let's compare the values for different directivity factors at ssame distance.

we have:
log(a/b)=log(a)-log(b)
to simplify things we can get rid of the absolute value; in your example all numbers are above 1, plus logarithms' arguments are <= 8 in numerator and >= 12 in denominator (4*pi*distance_greater_than_1), thus:
|10*log10(a/b)| = 10*(log10(b)-log10(a)) = 10*(log10(f(x))-log10(Q)) = 10*log10(f(x))-10*log10(Q)
at same distance, log10(f(x)) is the same for every directivity factor Q
10*log10(f(x))-10*log10(Q) = const-10*log10(Q)
10*log10(2)=3, 10*log10(4)=6, 10*log10(8)=9 (approx)
Lp(Q,x)=Lw(Q,1.5)-|10*log10(a/b)|=Lw(Q,1.5)-const+10*log10(Q)
Lw(Q,1.5) loses -3dB when you double Q, but at the same time the absolute value term adds +3B -> so why values are so close (and functions overlapped in the plot)

In fact, if you go further, you can do the same for Lw:
Lw(Q,dist) = Ltot+|10*log10(Q/f(dist))| = Ltot+10*log10(f(dist))-10*log10(Q) = const2-10*log10(Q)
Lp(Q,x) = Lw(Q,1.5)-const1+10*log10(Q) = const2-10*log10(Q)-const1+10*log10(Q) = const2-const1 = constant
and decimal shown in the workshet are only because different decimal places shown in the results
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#5 Posted: 4/10/2018 2:50:48 PM
Davide Carpi

Davide Carpi

1416 likes in 2873 posts.

Group: Moderator

What might be wrong...

You have sound pressure measured by the vendor -> You have to calculate the power level for the distance and directivity condition of the vendor

Then you have the sound power level of your source... it's a constant! Use this value to estimate the sound power at various distances for various directivity conditions!

2018-04-10 19_52_02-Sound.png
Quick Sound Loss - rev.1.sm (134 KiB) downloaded 58 time(s).
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#6 Posted: 4/10/2018 3:19:57 PM
Ruben Sidranski

Ruben Sidranski

17 likes in 463 posts.

Group: User

Davide,
I did the same thing, where I assumed directivity is b=2 on Lw. I'll just document that and move on as the rest of the math appears to work out
#7 Posted: 4/10/2018 4:42:50 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Jean,
The second equation is off/not evaluated.Graphically log to base x and log10 display differently.Question is about graph though


Few more things you can do as real project.
Line style "splines" is a bit smoother in the low region.

SoundPressure.PNG

Quick Sound Loss - rev.2.sm (134 KiB) downloaded 53 time(s).

#8 Posted: 4/10/2018 5:41:23 PM
Ruben Sidranski

Ruben Sidranski

17 likes in 463 posts.

Group: User

Funny ...
OK, here I am as I had done most of the items that Davide and Jean added. Now I would like to add a "dot" or a vertical line where the dB.final is. Please use this sheet
Quick Sound Loss.smz (135 KiB) downloaded 57 time(s).

Jean, I did not see where you used a spline

All should I be using "cinterp" to place the "dot?
#9 Posted: 4/10/2018 7:30:35 PM
CBG

CBG

77 likes in 312 posts.

Group: User

Something like this?


Sound.png

Quick Sound Loss - rev.1.sm (134 KiB) downloaded 51 time(s).


Best Regards

Carlos
#10 Posted: 4/10/2018 7:43:06 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Jean, I did not see where you used a spline

All should I be using "cinterp" to place the "dot?


1. spline is for line style ... line/spline.
2. what that gyzma #,#,#,,,does in maths ?
3. X_Y plot does not support " in your plot suggestion
4. X_Y is for final/final/final ... project
once done, if you rework something above=> it will freak the plot
X_Y plot has slightly pregnant memory. Doctored in red .

Quick Sound Loss (3).sm (140 KiB) downloaded 63 time(s).

#11 Posted: 4/10/2018 8:45:59 PM
Ruben Sidranski

Ruben Sidranski

17 likes in 463 posts.

Group: User

Wrote

Something like this?
Sound.png


Carlos,
I think you attached the wrong file. Yes, that is what I was looking for.

Jean,
When I double click the graph on your latest file, my computer locks up. I'm on version 0.99.6671.

NOW my file is locking up!!! ARRG
#12 Posted: 4/10/2018 9:18:04 PM
CBG

CBG

77 likes in 312 posts.

Group: User

Ok, This is the right file


Quick Sound Loss (1)_r1.sm (140 KiB) downloaded 72 time(s).


Best Regards

Carlos
#13 Posted: 4/10/2018 10:38:04 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Jean,
When I double click the graph on your latest file, my computer locks up.I'm on version 0.99.6671.



My 6179 opens your 6671 ... your 6671 freezes opening 6179
Is it a bug ?
BTW, attach an image of the polynomials that fail [as you reported].

Sound3.PNG
#14 Posted: 4/11/2018 9:58:39 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Few more things you can do as real project.


Thanks Elsid,
Nice project, saved for myself, you can have it as is.

Jean

SoundProject.PNG

Inst_dB Sound.sm (142 KiB) downloaded 53 time(s).
#15 Posted: 4/13/2018 2:23:09 AM
Ruben Sidranski

Ruben Sidranski

17 likes in 463 posts.

Group: User

Well, Here we go again ...
I found a quirk. Depending on values dB initial values, neither solve nor FindRoot is functional. I was plugging in values by hand without seeing an issue. I tried a "higher" dB set of values (86 vs 75) for equipment and the calculation *zap*
Quick Sound Loss.smz (168 KiB) downloaded 55 time(s).
Also, the X-Y plot legend information *ZAP*
#16 Posted: 4/13/2018 8:55:34 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Well, Here we go again ...
I found a quirk.Depending on values dB initial values, neither solve nor FindRoot is functional.I was plugging in values by hand without seeing an issue.I tried a "higher" dB set of values (86 vs 75) for equipment and the calculation *zap*


That one was Doctored and you don't use the Doctored version.
Explained before, if above X_Y something is Doctored, zap.

Quick Sound Loss (4) Doctored 20180413.sm (167 KiB) downloaded 57 time(s).



#17 Posted: 4/13/2018 10:33:23 AM
Ruben Sidranski

Ruben Sidranski

17 likes in 463 posts.

Group: User

Found the issue(s). See revamped file. Still having issues in that X-Y plot Labels for the legend *zap*Quick Sound Loss.smz (142 KiB) downloaded 92 time(s).
Edit: Two bugs
  1. X-Y Plot. If functions crash, *Zap* to the legend titles. All other titles OK. Legend is empty due to laziness after last 5 crashes
  2. solve(4) did not like trying to cancel units in the denominator of the final function (#dist). As I was adding units to x:0-100 FT and dividing the units meters in the function, the function crashed in the solve block (Just the function, with all values plugged in except for x = vector, so it's a solve(4) issue).
This is one of those sheets where UNITS are huge! The equations are all based off of SI/metric references. Major issue

There is additional documentation and function definition updates. Sanity check the graph x scale (adjusted for feet since I'm in the US). Should be good now
#18 Posted: 4/13/2018 11:38:07 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Found the issue.I'll post revamp file.Still having issues in that X-Y plot Labels for the legend *zap*


Clik on "list", edit "series name".

#19 Posted: 1/25/2021 8:16:25 PM
Ruben Sidranski

Ruben Sidranski

17 likes in 463 posts.

Group: User

Revisiting this old calc with SMath newer features and some function definitions.
  1. No longer works if I redefine the logarithmic sum with vectorize
  2. I cannot get the "heat capacity function" to work for ploting

Sound Loss (Quick).sm (476 KiB) downloaded 39 time(s).
Thanks for the help.
#20 Posted: 1/25/2021 9:34:45 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Hi. Some notes, but I'm not sure if this solve all of the issues:
1. Use count inside rangeindividual, but not outside. You use it in f(x, b ), and guess that could be problematic.
2. After that, you divide x by 'm in f and x by feet in rangeindividual, choose only one.
3. Maybe here don't affect, but if rangeindividual have not f(#,#) as parameter, define f before rangeindividual, you know, just in case.

Clipboard01.jpg

Best regards.
Alvaro.
1 users liked this post
ElSid 1/25/2021 9:53:00 PM
  • New Posts New Posts
  • No New Posts No New Posts