From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

spectrum

hello everyone,

i have implemented a spectrum function on a time domain signal in MATLAB. i want to implement the same function in Labview. i have tried all spectrum VIs in Labview but they didnot give same output signal.

i donot want to use matlab script in my code. can anyone guide that in labview which VI works same as Spectrum function of Matlab?

Thanks 

0 Kudos
Message 1 of 19
(1,506 Views)

Hi sundas,

 


@sundas wrote:

i have implemented a spectrum function on a time domain signal in MATLAB.


Do you mind to explain which functions with their parameters you use in Matlab?

Do you mind to provide example data used for the spectrum calculation?

 


@sundas wrote:

i want to implement the same function in Labview. i have tried all spectrum VIs in Labview but they didnot give same output signal.


Do you mind to explain the differences in the output data? Are the results "different by orders of magnitude" or just "different in the 6th or 7th decimal digit"?

Do you mind to explain which (LabVIE) functions you tried?

Do you mind to attach a VI with those function, with example data embedded, so we can discuss about your results?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 19
(1,498 Views)

i have tried power spectrum, auto power spectrum, amplitude and phase spectrum. 

In matlab, i have applied 

x = spectrum(x (1:end));

As result, i got one signal curve.

But when i implement the said Labview spectrum VIs i got FFT type signal response. 

0 Kudos
Message 3 of 19
(1,483 Views)

Hi sundas,

 

you missed to attach a VI with example data…(LV2017 preferred)

 


@sundas wrote:

x = spectrum(x (1:end));

As result, i got one signal curve.

But when i implement the said Labview spectrum VIs i got FFT type signal response


What is the difference between a "signal curve" and a "FFT type signal response"?

Don't you expect a "FFT type" response when you calculate a spectrum???

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 19
(1,476 Views)

Attached is the screenshot of spectrum response in Labview and matlab with same input signal.

please see the attached screenshots and suggest something.

Thanks..  

Download All
0 Kudos
Message 5 of 19
(1,418 Views)

Hi sundas,

 

you missed to attach a VI with typical data included!

(Again: LV2017 preferred)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 19
(1,411 Views)

Hi,

you can refer the attached screenshots to compare the results. 

If it helps you this will be great.

Thank you

0 Kudos
Message 7 of 19
(1,374 Views)

Hi sundas,

 


@sundas wrote:

you can refer the attached screenshots to compare the results. 

If it helps you this will be great.


I have to ask for the 3rd time:

When will you attach an example VI with example data included so we can analyze what you have programmed?

When will you attach the Matlab source code used to create your image?

 

Just showing images of some arbitrary plots does NOT HELP at all…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 19
(1,369 Views)

Hi GerdW,

Please find the attach zipped folder.

I hope now this will help you.

I will wait for your reply.

Thanks 

0 Kudos
Message 9 of 19
(1,351 Views)

Hi sundas,

 


@sundas wrote:

Please find the attach zipped folder.

I hope now this will help you.


Two notes:

  • A "zipped" folder should have the file suffix "ZIP". Why do you use proprietary software instead of simple (free-to-use, built into Windows) ZIP format???
  • Right now I'm using LV2017 so you should downconvert your VI…
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 19
(1,343 Views)