LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Commulative Phase Measurement

Hello !
If I am measuring phase by using ratio of two quadrature signals in difference and taking its inverse tangent I am getting a typical saw tooth wave type graph generated. A linear variation of phase value -pi/2 to pi/2 in each cycle then again repeating. I am adding pi/2 to shift the lower limit at zero and upper pi.Now I need that values from next cycle be added over and above this pi making added two cycle 2pi and of third pulse comes 3pi like this. So that I can get cumulative phase values added together. As in attached simulation vi I am using four sine wave generator and if i am putting phase value of first 0 second 90 third 180 and 4th 270 I get the desired situation where I am continuously generating phase shifted sine wave fr
om which I am getting the phase retrieved I need phase not a cyclic variation but accumulated curve. I want to avoid any recursive routine. Can any one suggest me how to do this in lab VIEW so that I can have easy solution? Please send me if you have any VI related to this.My actual use is Interferometer fringe counting and interpolation by measuring phase of fringe pattern on-line using VISION under LabVIEW 6.01 although this simulation has been done on LabVIEW 7.0 Demo.Due to problem at server I am not able to attach the simulation but i want to do add phase over value before the jump or subtract depending on direction of motion
Ajay Shankar
0 Kudos
Message 1 of 7
(3,512 Views)
First of all, you should use the "Inverse Tangent (2 input)" instead of the regular inverse tangent, and wire the two quadrature signals directly to the two inputs. This will give you resolution in all four quadrants directly without having to jump through hoops.

For the second problem, push the two signals through an autoindexing FOR loop, wire the current phase to a shift register and implement a "revolution counter" in a second shift register. You have it easy because the angles allways increase. At every iteration, compare the new phase to the previous phase and just increment the revolution counter (n) by one whenever the new phase is less than the old phase. (If your phase is noisy, add a bit more intelligence). The total phase will then always be [3
60*n + Phase from atan]. Build an new array containing the total phase at the right loop boundary. Please let me know if this is not clear enough.
0 Kudos
Message 2 of 7
(3,512 Views)
There's also a vi called 'Unwrap Phase' to handle the 2nd part if you purchased LabVIEW Full or higher. It's found in the block diagram function pallette at:

Analyze-->Signal Processing-->Time Domain-->Unwrap Phase.

I've used it with modestly noisy signals with good results.

-Kevin P.
ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 3 of 7
(3,512 Views)
Hello sir,
Initially I did used this Unwrap phase vi but result was the same in case of noise free atan output. It do shows some changes in case of noise but it was not adding the phase after pi/2 jump over and above the earlier value. I need to account for the phase value with sign(Increasing or Decreasing)
Ajay
Ajay Shankar
0 Kudos
Message 4 of 7
(3,512 Views)
Hello sir,
Sorry not to mentioning that in actual interferomeric set-up phase angle may increase or decrease depending on direction of motion.In one direction this will be increasing in other one decreasing(A typical phase quadrature case although generated from fringe pattern using Vision tools)). I need to accumulate the comulative value of all these phase to get incremental displacement data as I am also using this quadrature signal to find direction of movement.Therefore simple counting will not work and I am new to labVIEW not getting proper idea how to do. Please help, as I am not able to attach the file due to some problem at NI server can I have you e-mail so that I could send you the actual VI I am trying to use at set-up.
Ajay Shankar
Ajay Shankar
0 Kudos
Message 5 of 7
(3,512 Views)
Hi,

Originally, altenbach addressed 2 problems and I was just commenting on the 2nd one. His answer to the first problem is also vital -- using the 2-input (4-quadrant) inverse tangent function rather than the 1-input (2-quadrant) one.

I just whipped up a quick example for you. It generates a single cycle of a sine wave and a cosine wave. Then it concatenates several cycles worth of each, but some of the sine waves are inverted. This produces two direction reversals. Next, gaussian noise is added. Finally, the inverse tangent and unwrap functions are called. You can choose either the (correct) 2-input or the (incorrect) 1-input inverse tangent.

Hope this helps to show what to do, and allows you to exper
iment with sensitivity to signal-to-noise ratio.

-Kevin P.
ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 6 of 7
(3,512 Views)
Hello altenbach
I am still awaiting your help when both increasing and decreasing case is there.I need net value all the time when motion reverses then phase value should be deducted from the accumulated phase.Please have your help.I am not able to upload the vi plaese provide your e-mail so that I can send you this vi.
Ajay Shankar
Ajay Shankar
0 Kudos
Message 7 of 7
(3,512 Views)