LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Ni MY DAQmx

Hello everyone.
i am reading a sinusoidal signal from function generator, the freq of the signal is 10 Hz while the sampling rate and samples are 10k.
i am able to read the signal and then plot it on the waveform graph and chart as well.

the problem i am facing right now is the phase shift issue, what i mean to say is that i used extract tone vi block it gives me the exact freq, amplitude but the phase is changing continuously. i have a system in which i then have to fed this sinusoidal to my Lock-in amp to extract the magnitude and phase but the phase output of lock-in is also changing continuously which is obvious because the acquired signal have changing phase.

give me possible solution and suggestions.

Regards

0 Kudos
Message 1 of 16
(2,849 Views)

Are you sure it's changing phase, or the start is not triggered correctly with your signal?

Benoit

0 Kudos
Message 2 of 16
(2,842 Views)

@bseguin wrote:

Are you sure it's changing phase, or the start is not triggered correctly with your signal?

Benoit


thank you for the response,

i am uploading a video of it may be you can have a better view of it, it may not be possible that the phase shift, one thing i know is the problem of acquiring the signal and that may be the triggering one.

0 Kudos
Message 3 of 16
(2,832 Views)

Sorry, but your video is completely useless.

The problem is in your code and/or the hardware.

The phase shift is not real.

When your take the sample, the sample is triggered by something (software or hardware). If you do not force a trig, you will see this virtual phase shift.

What I mean is that the signal is not synchronized with your acquisition sampling.

Benoit

0 Kudos
Message 4 of 16
(2,823 Views)

@bseguin wrote:

Sorry, but your video is completely useless.

The problem is in your code and/or the hardware.

The phase shift is not real.

When your take the sample, the sample is triggered by something (software or hardware). If you do not force a trig, you will see this virtual phase shift.

What I mean is that the signal is not synchronized with your acquisition sampling.

Benoit


i think you are right, how to force the trigger to synch and avoid this virtual phase shift?

0 Kudos
Message 5 of 16
(2,821 Views)

It's depend of your application. What are you trying to do?

If you want to calculate a phase difference between two signal, you have to trigger them at the same time.

Reading a signal without reference to compare, the phase will be completely useless information.

 

Benoit

0 Kudos
Message 6 of 16
(2,819 Views)

@bseguin wrote:

It's depend of your application. What are you trying to do?

If you want to calculate a phase difference between two signal, you have to trigger them at the same time.

Reading a signal without reference to compare, the phase will be completely useless information.

 

Benoit


okay let me explain in detail.
i am trying to make a system that create a sinusoidal perturbation to the battery through Ao0, in response to that the batter give me two sinusoidal perturbation,
1. voltage perturbation which i acquire through AI 0.

2. current perturbation through current sensor and then i acquire it through AI 1.

after acquiring both signals i need to fed these perturbation to my Lock-in amp so that i can get voltage and current magnitude and phase to calculate its impedance at specific frequency. i would have two magnitudes (voltage and current) and two phase information (voltage and current) so i will divide the magnitudes and subtract phases in order to get impedance.

so i was facing some problems of phase shifts that is virtual phase shifts, so i decided to first check it with function generator.

keep in mind that right now i just connected the function generator directly to daq and acquire the signal of function generator through daq and i am getting this virtual phase changing problem.

i hope i cleared all your questions.

0 Kudos
Message 7 of 16
(2,813 Views)

OK so you will in fact compare two signal to compare the phase shift.

you solution is simply to trig the acquisition of the signal at the same time on two different channel of the same DAQ.

By doing so, you wont see any virtual phase shift.

To validate your code, you can simply connect the function generator to the two input you will use to compare the phase shift.

Benoit

0 Kudos
Message 8 of 16
(2,799 Views)

@bseguin wrote:

OK so you will in fact compare two signal to compare the phase shift.

you solution is simply to trig the acquisition of the signal at the same time on two different channel of the same DAQ.

By doing so, you wont see any virtual phase shift.

To validate your code, you can simply connect the function generator to the two input you will use to compare the phase shift.

Benoit


Pardon me, i didn't got your point. 

to make it simple i just want to read the function generator signal on only one channel that is AI 0, i acquired the signal and plotted it on the waveform graph. and i used the extract tone vi and i am getting the virtual phase problem what to do now, keep in mind for now that i am only acquiring one signal right now.

0 Kudos
Message 9 of 16
(2,796 Views)

At this point, just ignore the phase shift because phase shift will be relevant only if you compare with another signal.

Benoit

0 Kudos
Message 10 of 16
(2,786 Views)