# Spectral slope

## Homework Statement

I have some registration of sound gathered by hydrophone. Next I have created a power spectral density (dB re 1 Pa^2/Hz) vs frequency plot (semilog in matlab). And now I want to find spectral slope in dB/octave (one octave is log2(f2/f1).
I suppose that I should calculate the difference between two PSD points (max and min) and then divide this value by amount of octaves estimated based on the mentioned formula?
Could you if I'm right? Or mby there should use some different formula?

## Answers and Replies

NascentOxygen
Staff Emeritus
Science Advisor
Semilog....and your horizontal axis is f or log(f/fo)?

One actave is a doubling in frequency. So if linear f can you draw a straight line approximation to any region of interest, then extend that line over an exact octave and read the change in dB.

Drawing by hand has inherent noise-averaging, in comparison with a two points reliance which does not.

Here is an example
https://i.imgsafe.org/b3c770eb73.png [Broken]

Last edited by a moderator:
NascentOxygen
Staff Emeritus
Science Advisor
Are you looking for a fixed dB/oct figure? If so, you will be looking for a straight line best fit to this.

Ok, so for that I must count the difference value of dB i.e. from 1 Hz - 1.5 Hz and then calculate the amount of decades from taken frequencies?

NascentOxygen
Staff Emeritus
Science Advisor
Ok, so for that I must count the difference value of dB i.e. from 1 Hz - 1.5 Hz and then calculate the amount of decades from taken frequencies?
Why do you mention "decade" when you are interested in per "octave"? Note that 1.5 Hz is difficult to read, it's definitely not midway between grid lines on a log plot.

There is a grid line at 1 Hz, the next grid line adjacent to that is 2 Hz, so why not use that for your double frequency? If you take a plastic ruler and measure this horizontal distance between these 2 grid lines, then everywhere and anywhere along the horizontal axis this same distance (in mm) represents a doubling in frequency. (Try it on the 2 Hz, 3 Hz, 4 Hz, and 5 Hz grid lines to demonstrate this is true.)

Is this noise on the recording, and you want to smooth it before doing calculations? If there are spectral peaks that you want to preserve, then I guess you'll want to exclude them from your smoothing.