LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

First three harmonic analysis

Hi Mark

Thank you very much for your mail.
When I used pramod.vi, it gave me the error as given below:

"Error 50103 occurred at DAQmx Start Task.vi
The specified resourse is reserved. The operation couldnot be completed as specified."

I think the error is related to the DAQ Assistant express vi.

Our data acquition card is loaded a windows pc. LabView 7.1 is installed on that pc. As you sent the code of higher version, I saw these vi on another pc and preapred the same code on a machine loaded with LabView 7.1.
I couldnot able to locate the unbandle waveform as you have given in pramod1.vi. Can I use "build waveform" function for the same purpose?

Can you please send that vi in LabView 7.1 version?

Thanks
Pramod
0 Kudos
Message 11 of 48
(2,308 Views)
Hi Mark

I tried with the "Build Waveform" and it worked fine. Can you please check the attached code. I have also added the 5th order Butterworth lowpass filter.

Still I have one doubt. I will highly appreciate if you can clear that.

When I use the DAQ Assistant for normal pressure signal acquisition, I took the data for about 20 seconds. In that case, the waveform comes as straight lines as the number of data points becomes very large. In order to see the sinusoidal wave, I have to magnify it in the range of 0 to 0.1 seconds(extreme ends of x-axis).
When we are measuring first three harmonics, we are actually separating out those from the entire waveform. So I think magnification is not required in this case. Am I correct?

Thanks
Pramod
0 Kudos
Message 12 of 48
(2,303 Views)
Hi Pramod,
 
Do both of the previous responses belong to you? I notice a different screen name and want to make sure I answer all the questions here.
 
The reason you were receiving that error is because I placed a second DAQ assistant in the diagram by accident. Sorry for the confusion.
 
The method you implemented to initialize the waveform shift register is correct. And the magnification you mentioned won't effect your analysis. However, the filter you added filters the original signal so if you are attempting to smooth the spectral analysis output, you need to move the filter to the other side of the Distortion Masurement VIs.
 
Let me know what signal you are wanting to filter.
 
Everything else looks good.
Sappster
0 Kudos
Message 13 of 48
(2,282 Views)
Hi Mark

Yes. I sent last both responses. As I told earlier, my pc dont have LabView 8.5 version. So to see the code I have to use other machine. On that machine, other users NI id was already there by default. Therefore, when I replied, it was from that user id. You have answered every question and I am very much thankful to you.

Actually, I am using the filter to reduce the noise in the signal coming from the DAQ Assistant. In normal pressure acquisition, I placed the filter immediatly after the DAQ Assistant. As per your suggestion, I placed the filter after distortion measurement express function as shown in the attachment.
If noise reduction is the major goal rather than smoothening of function, then can you please tell what should be the correct location of filter?
0 Kudos
Message 14 of 48
(2,268 Views)
Hi Pramod,
 
If you are trying to reduce the noise in the original reading then place the filter right after the DAQ assistant. However, this may filter your harmonics that you are trying to read, so becareful how you filter the signal. If you want to smooth (average) the measurments for the harmonics then you will want the filter (running average) code right after the Distortion Measurement VI.
 
If you just want a basic smoothing, I recommend the average pt-by-pt VI found in the Pt-By-Pt folder under signal processing. You will need to manipulate the waveforms you are currntly using. Let me kow if you need any help or have any questions.
Sappster
0 Kudos
Message 15 of 48
(2,264 Views)
Hi Mark

Thanks for your reply.

I am reducing the noise while acquiring the pressure signals. So I will place the filter right after the DAQ Assistant. For getting the first three harmonics, I will place the filter after distortion measurement vi only if it is required or I will use pt-by-pt averaging vi.

THanks

Pramod
0 Kudos
Message 16 of 48
(2,251 Views)
Hi Mark

The LabView code for first three harmonic analysis is now working well.
I am now doing the power spectral density measurements. I have seen there are two FFT Power Spectral Density measurement options in
LabView 7.1. One is Functions>>Analysis>>Spectral>>Power Spectral Density and other is All Functions>>Analyze>>Waveform Measurements>>FFT Power Spectral density. Both are same or different? I have 6 channels for pressure acquisition. Can I take averaged power spectral density of all 6 channels as only a single graph?

Thank you

Pramod
0 Kudos
Message 17 of 48
(2,198 Views)
Hi Pramod,
 
The 2 VIs you mentioned are not the exact same function, but both calculate the PSD the same.
 
You can use the merge signals VI to combine the signals into one graph. Here is an example:
 
Sappster
0 Kudos
Message 18 of 48
(2,163 Views)
Hi Mark

Thank you for your mail. I have used the split and merge signal previously. I am attaching herewith the two LabView codes to calculate the power spectral density. Correspondingly, I have attached the image files of front panel. The measurement was carried out with 6 channels. The vi-2 image file shows 6 different signals on the same plot while vi-1 gives averaged single plot of 6 channels. The latter is what I am looking for.
I am not sure about the code. Is it correct? Also there is a high peak line near zero frequency in vi-2 image file.

Pramod
0 Kudos
Message 19 of 48
(2,151 Views)

Hi pramod,

I have attached an example of how to average the 6 readings. The way you are graphing the PSD in both examples is fine, you just might find it easier to work with the data from the vi2 example.

Sappster
0 Kudos
Message 20 of 48
(2,124 Views)