Modeling sound pressure level of a rifle shot
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Noise can be classified as pollution and lawmakers often (always?) treat it as such. Noise can have different origin points, point source being among the simplest to model. Because noise has broader health implications, being able to understand its propagation, a simple model can further our understanding in toning down or preventing excessive noise burden on the environment and its inhabitants. In this work, I will focus on firing range noise and the propagation of sound to the surrounding area.
Small scale firing ranges can be considered as point origin of noise. To make a simple predictive model, a number of assumptions and generalization are made. The reader should realize that this makes the model a bit less realistic.
When talking to experienced people, they will tell you that the distance between a firing range and the first house should be roughly 200 m. While there is no explicit mention of this number in Slovenian laws (yes, I’ve checked), there is a threshold of sound pressure level (SPL) of 75 dB. So, knowing the SPL of the rifle and we know the legal threshold, we can use a simple model to estimate approximate distance at which the SPL will fall to or below the aforementioned legal threshold.
A rifle shot produces a sound pressure level of about 170 dB, which is roughly the sound of a jet engine at a 30 m distance (see here).
Noise propagates and dissipates through the air with roughly (source)
p ~ 1/r
which gives us
L_2 = L_1 - 20 × log(r_2/r_1)
where
L_2 = sound level at measured distance
L_1 = sound level at reference distance
r_1 = reference distance from source of the sound
r_2 = measured distance from the source
Using this model, we have accepted all sorts of assumptions, like calm weather, even terrain, even air pressure, no air resistance… Come to think of it, this model would be best suited for a desert in lovely weather. Nonetheless, it gives us a starting point.
I would be interested to hear from more knowledgeable readers on any potential mistakes and how to improve the model with regards to at least above assumptions.
Modeling this equation in R is trivial. Let’s write a function that will calculate L_2 for a sequence of r_2 values.
soundPressure <- function(r2, r1, L1) { L2 <- L1 - 20 * log(r1/r2) dL <- L1 - abs(L1 - L2) # this will give us the appropriate delta that we can use to plot our graph return(dL) } # let's define some parameters distance <- seq(1, 1000, 1) # a vector of distances to be used as r_2 L1 <- 170 r1 <- 1 # this is the threshold level defined by the lawmaker # we're actually interested in finding at what distance, the noise # dissipates to this level dB.level <- 75 # apply the above formula to every value in "distance" dB <- sapply(distance, soundPressure, r1 = r1, L1 = L1) # plotting find.x <- which(round(dB) == dB.level)[1] # find which value is ~75 dB plot(x = distance, y = dB, ylim = c(1, L1), xlab = "Distance (m)", ylab = "Sound pressure level (dB)", type = "l") abline(h = dB.level, col = "red") abline(v = find.x, col = "red") # distance label text(x = distance[find.x], y = 0, offset = 0.5, col = "black", pos = 4, labels = paste(distance[find.x], "m"), cex = 1.3) # SPL text(x = 0, y = dB.level, col = "black", labels = paste(dB.level, "dB"), cex = 1.3, offset = 1, pos = 1)
Result of the plotting is
This tells us that the sound pressure level at roughly 113 m away from the rifle will be 75 dB (the legal threshold). Based on these results, a 200 m buffer around a firing range gives an estimate with a margin of around 100 m buffer.
As already mentioned, I would be happy to hear your comments on errors and how to improve the above model.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.