LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

power spectral density

Hello,

 

I cannot seem to change the "desired units" of the SVT Power Spectral Density.vi in the sound and vibration toolkit. It is still possible to switch between EU^2/Hz and EU/sqrt(Hz) on the Power Spectral Density function?

 

Regards,

Raoul Enning

 

0 Kudos
Message 1 of 7
(2,406 Views)

To follow up: This only occurs when dB is on. When dB is on, the VIs seem to be stuck on "power" (so EU^2/Hz) even though the y-axis is reported as EU/sqrt(Hz). switching now between power and magnitude does not work.

 

Regards,

Raoul

 

0 Kudos
Message 2 of 7
(2,381 Views)

Hi Raoul

 

Can you please upload the VI you are using?

 

Thanks

 

kind regards

 

Beat

NI Europe

0 Kudos
Message 3 of 7
(2,378 Views)

Sure, here it is.

 

Please cancel the attempt to load a file, this is irrelevant to the PSD or FFT measurements. The PSD is the last case in the sequence.

 

Cheers,

Raoul

 

0 Kudos
Message 4 of 7
(2,373 Views)

Hi Raoul

 

The reason you can see in the " svc_Spectrum Units.vi"

 

svc_Spectrum Units.gif

 

If the  db ON Button is activated it always take the same Label for the y-axis.

 

This is because of the dB calculation I think.

 

Kind regards

 

Beat

NI Germany

0 Kudos
Message 5 of 7
(2,359 Views)

Hello Beat,

 

thanks for your help in this matter, I really do appreciate it. First and foremost let me mention that I am working with SVT version 3.1- maybe quite antiquated; i un- and reinstalled it just to make sure that no one here in my lab had fooled with it. On that note, my spectrum units.vi looks somewhat different to yours (see attachment). The relevant portion of the naming of the y-axis variables comes in the "svl_Modify Unit Label for Spectrum Type and Spectral Density.vi". If we look in this VI (also attached) we see that the larger outer conditional, which defines if the units are X^2 / Hz or X / sqrt(Hz), has itself a condition that only allows free movement when the input is linear. When the input is in dB, the conditional is always false, which amounts to forced labeling the Y-axis with X / sqrt(Hz). I actually see the same conditional in the VI you posted.

 

In addition to this, the data doesnt change either.  This is because of the sv_Linear to dB.vi (also in attachment). when switching between EU^2/Hz and EU/sqrt(Hz), the "input signal" data switches between either 1 set of data, or that same set of data squared. so far so good. However, the calculation that is done here when EU/sqrt(Hz) is selected (i.e. magnitude) is 20log(Vin/Vref) which is equivalen to 10log(Vin^2/Vref^2). So, this returns us to power and not magnitude, converting the data right back to how it is when EU^2/Hz. Now I can imagine that programmers have done this to maintain the definition of the dB in electrical engineering, but I will argue that when I select EU/sqrt(Hz) (this cannot be called power spectral density anymore) I want the units in Volts, and not in Volts squared.

 

Regardless of the semantics of the data computation, the units reported on the y-axis are always wrong when dB is active. Following the computation of the data in sv_Linear to dB.vi, they should always be EU^2/Hz, and not the other way around.

 

In order to fix this, I am compelled to convert the 20log(Vin/Vref) computation to 10log(Vin/Vref) and to remove the "linear" condition in the svl_Modify Unit Label for Spectrum Type and Spectral Density.vi.

 

What do you think of this idea? Am I completely wrong in my thoughts? 

 

Regards,

Raoul Enning

      

Download All
0 Kudos
Message 6 of 7
(2,327 Views)

Hi Raoul

 

No I think your ideas are good and you´re on the right way.

Let me know if you can proceed with your solutions.

 

Have a nica day

 

Kind regards

 

Beat

NIG

0 Kudos
Message 7 of 7
(2,278 Views)