MATLAB Answers

Equation for Amplitude difference between two tones

15 views (last 30 days)
Parisa
Parisa on 10 Aug 2020
Commented: Parisa on 10 Aug 2020
Hi, I have an equation amp2=10^(-10/20) to find an amplitude that is -10 dB lower than a reference, what do I change in the formula to make it 20, 30, or 40 dB?

  0 Comments

Sign in to comment.

Accepted Answer

Shae Morgan
Shae Morgan on 10 Aug 2020
Edited: Shae Morgan on 10 Aug 2020
The equation for dB is 10*log10(Incident_intensity/reference_intensity).
When dealing with pressures (as we usually are in sound waves) the relationship between pressure and intensity adjusts that equation to 20*log10(incident_pressure/reference_pressure).
When solving for a certain dB difference you can manipulate the equation to result in your specific desired intensity
-10 dB = 20 * log10(x/ref) Where the ref is the average amplitude of the reference sound, and x is the intensity you're trying to find that is 10 dB less than that reference point.
when you solve for x - that equation looks like this
x = 10^(-10/20) * ref
where x = your amp2. My guess is your reference (ref) in your equation is = 1 so solving for amp2 gives you the amplitude that would be 10 dB lower than an amplitude of 1. To find any other difference, you need to know 1) what dB difference you need and 2) what the reference point is.
e.g., if you have two, 500 ms, 1000 Hz audio signals:
amp1=1;
amp2=1;
f=1000;
dur=.5;
fs=44100;
t= 0:1/fs:dur-1/fs;
sig1= amp1*sin(2*pi*f*t);
sig2=amp2*sin(2*pi*f*t);
if you want sig2 to be -10 dB relative to sig1, you need to adjust the amplitude relative to the rms amplitude of the first signal
ref_level=rms(sig1); %this is the amplitude you compare to
dB_difference=-10; %this number can be substituded for whatever dB change you want
amp2_10dB = 10^(dB_difference/20) * ref_level;
norm_sig2=sig2./rms(sig2); %normalize sig2
scaled_sig2=norm_sig2.*amp2_10dB;
%check
new_level=rms(scaled_sig2);
checkdB=20*log10(new_level/ref_level) %our original dB equation
should be -10 .

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!