convert dB to dBV
CASTalk.com Forum Index CASTalk.com
Discussion of DSP, FPGA, storage and embedded system.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web castalk.com
convert dB to dBV

 
Post new topic   Reply to topic    CASTalk.com Forum Index -> DSP
Author Message
ngeva0
Guest





Posted: Wed Dec 07, 2005 12:55 am    Post subject: convert dB to dBV Reply with quote

I have a set of random data that was generated by sampling the noise. Righ
now I am plotting the PSD of the noise in dB. How do I plot it with respec
to dBV? The reason for doing this is because the magnitude I got in th
plot using MATLAB is in dB. But on the dynamic signal analyzer, it show
the similar plot but the magnitude is in dBV. I want to make sure what
got from MATLAB is correct by checking with the signal analyzer.Th
following is my code:

Fs=50000;

datasize=size(RANDOM);
numsample=datasize(1);
numsample=numsample;

FFTX=fft(RANDOM(:,2),numsample);
X=FFTX(1:floor(numsample/2)).*conj(FFTX(1:floor(numsample/2)));

BW=1.5*Fs*numsample;
X=X/BW;

Omega=(0:numsample-1)/(numsample)*Fs;
Omega=Omega(1:floor(numsample/2));

H=plot(Omega,10*log10(X));
set(H,'Color','BLACK');

The file name is called RANDOM. Thanks for your help!!
Back to top
Noway2
Guest





Posted: Wed Dec 07, 2005 1:15 am    Post subject: Re: convert dB to dBV Reply with quote

To calculate in decibels, you need to know the reference, e.g. dBV,
dBm, etc as dB is a gain (or attenuation) from that reference. If I
remember correctly, dBV should mean that 0 dB is equivalent to 1V and
dBm is similarly referenced to 1mV.
Back to top
Mark
Guest





Posted: Wed Dec 07, 2005 1:16 am    Post subject: Re: convert dB to dBV Reply with quote

the ref for 0 dBv = 1Volt

the ref for 0 dBm = 1 mW yes Watt of power not voltage
(this is commonly used for all RF work except CATV)

the ref for 0 dBmV = 1 mV yes Volt
this is commonly used for CATV

Mark
Back to top
Tim Wescott
Guest





Posted: Wed Dec 07, 2005 1:16 am    Post subject: Re: convert dB to dBV Reply with quote

ngeva0 wrote:

Quote:
To calculate in decibels, you need to know the reference, e.g. dBV,
dBm, etc as dB is a gain (or attenuation) from that reference. If I
remember correctly, dBV should mean that 0 dB is equivalent to 1V and
dBm is similarly referenced to 1mV.




Yes I have been searching online and I think you need to know the
reference voltage. But I don't know exactly how you find this reference
voltage. In my setup, I have a noise generator, and a oscilliscope that is
connected to a computer. The output of the generator is connected to one of
the channels on the oscilliscope. Then sample the waveform on the
osciliscope using the computer. Thus, I will get a set of random data. How
do I find the reference voltage? Is it the amplitude of the noise generated
by the noise generator? Is it from the ocsiliscope? Thank you.

The reference voltage is a consequence of your analog to digital
converter, which in this case is your o-scope. The easiest way to find
this would be to put a known voltage into the scope (like the 1.5V from
a flashlight battery, or the square wave test signal on the scope, if it
has one). Read in your file and look at it with a text editor, then
figure out how to go from the information on the o-scope screen to the
information in the file.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
Back to top
ngeva0
Guest





Posted: Wed Dec 07, 2005 1:16 am    Post subject: Re: convert dB to dBV Reply with quote

Quote:
To calculate in decibels, you need to know the reference, e.g. dBV,
dBm, etc as dB is a gain (or attenuation) from that reference. If I
remember correctly, dBV should mean that 0 dB is equivalent to 1V and
dBm is similarly referenced to 1mV.



Yes I have been searching online and I think you need to know th
reference voltage. But I don't know exactly how you find this referenc
voltage. In my setup, I have a noise generator, and a oscilliscope that i
connected to a computer. The output of the generator is connected to one o
the channels on the oscilliscope. Then sample the waveform on th
osciliscope using the computer. Thus, I will get a set of random data. Ho
do I find the reference voltage? Is it the amplitude of the noise generate
by the noise generator? Is it from the ocsiliscope? Thank you.
Back to top
Mike Yarwood
Guest





Posted: Wed Dec 07, 2005 7:28 am    Post subject: Re: convert dB to dBV Reply with quote

"ngeva0" <ngeva0@hotmail.com> wrote in message
news:buidnUl7u99F8AvenZ2dnUVZ_sGdnZ2d@giganews.com...
Quote:
ngeva0 wrote:

ngeva0 wrote:


To calculate in decibels, you need to know the reference, e.g. dBV,
dBm, etc as dB is a gain (or attenuation) from that reference. If I
remember correctly, dBV should mean that 0 dB is equivalent to 1V
and
dBm is similarly referenced to 1mV.




Yes I have been searching online and I think you need to know the
reference voltage. But I don't know exactly how you find this

reference

voltage. In my setup, I have a noise generator, and a oscilliscope
that

is

connected to a computer. The output of the generator is connected to

one of

the channels on the oscilliscope. Then sample the waveform on the
osciliscope using the computer. Thus, I will get a set of random
data.

How

do I find the reference voltage? Is it the amplitude of the noise

generated

by the noise generator? Is it from the ocsiliscope? Thank you.

The reference voltage is a consequence of your analog to digital
converter, which in this case is your o-scope. The easiest way to find

this would be to put a known voltage into the scope (like the 1.5V from

a flashlight battery, or the square wave test signal on the scope, if
it


has one). Read in your file and look at it with a text editor, then
figure out how to go from the information on the o-scope screen to the

information in the file.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com



Hi Tim:

Thanks for you advice. The data I got in the file matches to what is
on
the screen of the o-scope (the data pattern looks like the periodic
square
wave I put in). The voltages measured seem reasonable. But the
magnitude I
got in the MATLAB is about -20 to -40dB off from the magnitude in dBV
shows on the signal analyzer(same plot, only the magnitude is off). I
divided my data by 100, then plotted again. Now the magnitude in dB
shows
in the MATLAB is close to the magnitude in dBV on the signal analyzer.
Does it mean anything?

You may have an issue with scaling and/or the number of samples you're
using. A PSD calculation should take the sampling rate into account to
bring the FFT results into the real world -- Matlab may not be doing it
right, it may have an oddball way to do the scaling, or you just may not

be using the function correctly.

I'd look at the help for the function you're using, or if you've made
your own PSD calculator I'd double check that you're handling the FFT
scaling and sample-rate scaling correctly.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com


The following is the MATLAB code:

Fs=50000;

datasize=size(RANDOM);
numsample=datasize(1);
numsample=numsample;

FFTX=fft(RANDOM(:,2),numsample);
X=FFTX(1:floor(numsample/2)).*conj(FFTX(1:floor(numsample/2)));

BW=1.5*Fs*numsample;
X=X/BW;

Omega=(0:numsample-1)/(numsample)*Fs;
Omega=Omega(1:floor(numsample/2));

H=plot(Omega,10*log10(X));
set(H,'Color','BLACK');

For this case, the file name is called RANDOM because I used a random
data. I also tried it using squarewave data. You can change the file name
to the file you want to find the PDS of. Thanks for your help!!

You may well be getting tired ( anyone with numsample=numsample in a

function probably is or was very tired) why not have a break and a good
sleep, plan what you have to do to find out what the sample magnitude is for
the peak of a 1 volt sinewave, put a one volt sinewave on your scope ( lots
of cycles per fft period but with frequency comfortably less than 25000 Hz )
save in your matlab file. Linearly scale your sample values so that the peak
values are at +/- 1.000 and the average amplitude is 0, then run your psd
routine - what value in dB do you get? If you change the y axis gain or
offset on the scope does it change the sample values that you record?
How big is numsample? If you change numsample does it change your dB value
for the only big spectral line you should be seeing ( sinewave input) in
your matlab plot ?

Best of Luck - Mike
Back to top
ngeva0
Guest





Posted: Wed Dec 07, 2005 8:02 am    Post subject: Re: convert dB to dBV Reply with quote

Quote:
ngeva0 wrote:

To calculate in decibels, you need to know the reference, e.g. dBV,
dBm, etc as dB is a gain (or attenuation) from that reference. If I
remember correctly, dBV should mean that 0 dB is equivalent to 1V and
dBm is similarly referenced to 1mV.




Yes I have been searching online and I think you need to know the
reference voltage. But I don't know exactly how you find thi
reference
voltage. In my setup, I have a noise generator, and a oscilliscope tha
is
connected to a computer. The output of the generator is connected t
one of
the channels on the oscilliscope. Then sample the waveform on the
osciliscope using the computer. Thus, I will get a set of random data
How
do I find the reference voltage? Is it the amplitude of the nois
generated
by the noise generator? Is it from the ocsiliscope? Thank you.

The reference voltage is a consequence of your analog to digital
converter, which in this case is your o-scope. The easiest way to find
this would be to put a known voltage into the scope (like the 1.5V from
a flashlight battery, or the square wave test signal on the scope, if i

has one). Read in your file and look at it with a text editor, then
figure out how to go from the information on the o-scope screen to the
information in the file.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com


Hi Tim:

Thanks for you advice. The data I got in the file matches to what is o
the screen of the o-scope (the data pattern looks like the periodic squar
wave I put in). The voltages measured seem reasonable. But the magnitude
got in the MATLAB is about -20 to -40dB off from the magnitude in dB
shows on the signal analyzer(same plot, only the magnitude is off).
divided my data by 100, then plotted again. Now the magnitude in dB show
in the MATLAB is close to the magnitude in dBV on the signal analyzer
Does it mean anything?
Back to top
Tim Wescott
Guest





Posted: Wed Dec 07, 2005 9:16 am    Post subject: Re: convert dB to dBV Reply with quote

ngeva0 wrote:

Quote:
ngeva0 wrote:


To calculate in decibels, you need to know the reference, e.g. dBV,
dBm, etc as dB is a gain (or attenuation) from that reference. If I
remember correctly, dBV should mean that 0 dB is equivalent to 1V and
dBm is similarly referenced to 1mV.




Yes I have been searching online and I think you need to know the
reference voltage. But I don't know exactly how you find this

reference

voltage. In my setup, I have a noise generator, and a oscilliscope that

is

connected to a computer. The output of the generator is connected to

one of

the channels on the oscilliscope. Then sample the waveform on the
osciliscope using the computer. Thus, I will get a set of random data.

How

do I find the reference voltage? Is it the amplitude of the noise

generated

by the noise generator? Is it from the ocsiliscope? Thank you.

The reference voltage is a consequence of your analog to digital
converter, which in this case is your o-scope. The easiest way to find
this would be to put a known voltage into the scope (like the 1.5V from
a flashlight battery, or the square wave test signal on the scope, if it


has one). Read in your file and look at it with a text editor, then
figure out how to go from the information on the o-scope screen to the
information in the file.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com



Hi Tim:

Thanks for you advice. The data I got in the file matches to what is on
the screen of the o-scope (the data pattern looks like the periodic square
wave I put in). The voltages measured seem reasonable. But the magnitude I
got in the MATLAB is about -20 to -40dB off from the magnitude in dBV
shows on the signal analyzer(same plot, only the magnitude is off). I
divided my data by 100, then plotted again. Now the magnitude in dB shows
in the MATLAB is close to the magnitude in dBV on the signal analyzer.
Does it mean anything?

You may have an issue with scaling and/or the number of samples you're
using. A PSD calculation should take the sampling rate into account to
bring the FFT results into the real world -- Matlab may not be doing it
right, it may have an oddball way to do the scaling, or you just may not
be using the function correctly.

I'd look at the help for the function you're using, or if you've made
your own PSD calculator I'd double check that you're handling the FFT
scaling and sample-rate scaling correctly.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
Back to top
ngeva0
Guest





Posted: Wed Dec 07, 2005 9:16 am    Post subject: Re: convert dB to dBV Reply with quote

Quote:
ngeva0 wrote:

ngeva0 wrote:


To calculate in decibels, you need to know the reference, e.g. dBV,
dBm, etc as dB is a gain (or attenuation) from that reference. If I
remember correctly, dBV should mean that 0 dB is equivalent to 1
and
dBm is similarly referenced to 1mV.




Yes I have been searching online and I think you need to know the
reference voltage. But I don't know exactly how you find this

reference

voltage. In my setup, I have a noise generator, and a oscilliscop
that

is

connected to a computer. The output of the generator is connected to

one of

the channels on the oscilliscope. Then sample the waveform on the
osciliscope using the computer. Thus, I will get a set of rando
data.

How

do I find the reference voltage? Is it the amplitude of the noise

generated

by the noise generator? Is it from the ocsiliscope? Thank you.

The reference voltage is a consequence of your analog to digital
converter, which in this case is your o-scope. The easiest way to fin

this would be to put a known voltage into the scope (like the 1.5V fro

a flashlight battery, or the square wave test signal on the scope, i
it


has one). Read in your file and look at it with a text editor, then
figure out how to go from the information on the o-scope screen to th

information in the file.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com



Hi Tim:

Thanks for you advice. The data I got in the file matches to what i
on
the screen of the o-scope (the data pattern looks like the periodi
square
wave I put in). The voltages measured seem reasonable. But th
magnitude I
got in the MATLAB is about -20 to -40dB off from the magnitude in dBV
shows on the signal analyzer(same plot, only the magnitude is off). I
divided my data by 100, then plotted again. Now the magnitude in d
shows
in the MATLAB is close to the magnitude in dBV on the signal analyzer.
Does it mean anything?

You may have an issue with scaling and/or the number of samples you're
using. A PSD calculation should take the sampling rate into account to
bring the FFT results into the real world -- Matlab may not be doing it
right, it may have an oddball way to do the scaling, or you just may no

be using the function correctly.

I'd look at the help for the function you're using, or if you've made
your own PSD calculator I'd double check that you're handling the FFT
scaling and sample-rate scaling correctly.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com


The following is the MATLAB code:

Fs=50000;

datasize=size(RANDOM);
numsample=datasize(1);
numsample=numsample;

FFTX=fft(RANDOM(:,2),numsample);
X=FFTX(1:floor(numsample/2)).*conj(FFTX(1:floor(numsample/2)));

BW=1.5*Fs*numsample;
X=X/BW;

Omega=(0:numsample-1)/(numsample)*Fs;
Omega=Omega(1:floor(numsample/2));

H=plot(Omega,10*log10(X));
set(H,'Color','BLACK');

For this case, the file name is called RANDOM because I used a rando
data. I also tried it using squarewave data. You can change the file nam
to the file you want to find the PDS of. Thanks for your help!!
Back to top
Stan Pawlukiewicz
Guest





Posted: Wed Dec 07, 2005 5:16 pm    Post subject: Re: convert dB to dBV Reply with quote

ngeva0 wrote:
Quote:
ngeva0 wrote:


To calculate in decibels, you need to know the reference, e.g. dBV,
dBm, etc as dB is a gain (or attenuation) from that reference. If I
remember correctly, dBV should mean that 0 dB is equivalent to 1V and
dBm is similarly referenced to 1mV.




Yes I have been searching online and I think you need to know the
reference voltage. But I don't know exactly how you find this

reference

voltage. In my setup, I have a noise generator, and a oscilliscope that

is

connected to a computer. The output of the generator is connected to

one of

the channels on the oscilliscope. Then sample the waveform on the
osciliscope using the computer. Thus, I will get a set of random data.

How

do I find the reference voltage? Is it the amplitude of the noise

generated

by the noise generator? Is it from the ocsiliscope? Thank you.

The reference voltage is a consequence of your analog to digital
converter, which in this case is your o-scope. The easiest way to find
this would be to put a known voltage into the scope (like the 1.5V from
a flashlight battery, or the square wave test signal on the scope, if it


has one). Read in your file and look at it with a text editor, then
figure out how to go from the information on the o-scope screen to the
information in the file.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com



Hi Tim:

Thanks for you advice. The data I got in the file matches to what is on
the screen of the o-scope (the data pattern looks like the periodic square
wave I put in). The voltages measured seem reasonable. But the magnitude I
got in the MATLAB is about -20 to -40dB off from the magnitude in dBV
shows on the signal analyzer(same plot, only the magnitude is off). I
divided my data by 100, then plotted again. Now the magnitude in dB shows
in the MATLAB is close to the magnitude in dBV on the signal analyzer.
Does it mean anything?


In the frequency domain, PSD is usually measured in dB referenced to
power, sometimes 1 watt, in a 1Hz band or dB Volts per sqrt(Hz). Recall
Parseval's theorem. I think the psd function in matlab does the
bandwidth correction for you. The frequency domain spreads the power out
over all the analysis frequencies. Some people take an alternative
approach of putting a pure tone of known amplitude and a bin center
frequency and using a fudge factor to correct things so that a 1 volt
tone indicates 1 volt/sqr(Hz) on the frequency domain display.

When I plot psd results I label the y axis explicitly, i.e. in
acoustics we often reference to a micro pascal, so I would label it dB
re 1 micropascal in a 1Hz band.
Back to top
Fred Marshall
Guest





Posted: Wed Dec 07, 2005 11:36 pm    Post subject: Re: convert dB to dBV Reply with quote

ngeva0,

Part of the problem here, I think, is that you need to know *where* the
"volt" lives.
*You can't do dBv without this*
Otherwise, when you have a display of dB on a scope, the reference can be
rather arbitrary from a system point of view and there is no way to
reference it to a volt at some point in the system.
Is it at the output of a sensor? That would be typical.
Is it at the input to the scope after some filtering perhaps? Also typical.
etc. etc.

It's up to you to define where that "volt" resides.

Thereafter, you calibrate your "system" so you know how the output relates
to the reference volt.

That's what people are telling you when they say:
Put in 1v (meaning "at the reference point") and see what you get out.
Then reference everything to that. dBv...
But only you know where the reference *point* in the system is.

Of course you can get fancier and inject a signal wherever you like but then
you have to reference that signal back to the reference point - perhaps by
calculating attentuation or gain back to the reference point of interest.

Fred
Back to top
 
Post new topic   Reply to topic    CASTalk.com Forum Index -> DSP All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




VoIP Electronics Powered by phpBB