LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Phase error in vi

Solved!
Go to solution

@Coryman wrote:

Bob,

I discovered the bandpass filter (Express) was introducing a 50 degree lag in all of my phase readings.  What was interesting, is that the phase lag was consistent no matter what the frequency or the initial phase or magnitude.  Also, the magnitude was not attenuated at all.  It looked like a simple case of adding 50 degrees to the phase readings, but without knowing why that's just bad coding.  

 


Egad, that's really terrible!  I'll have to take a look at that, and if it pans out, let NI know that they have a really faulty Express VI.  I'm a little jammed up right now, but I'll try to get to it in a few days.

 

Bob Schor

0 Kudos
Message 11 of 17
(836 Views)

Bob,

I never know when you are needling me.  You just got telling me all filters introduce error, and now you are saying the Express vi, Bandpass Filter shouldn't be off by degrees?  I just assumed that lag was to be expected.  But, like I said, it is just amazingly coincidental that by adding exactly 50 degrees to my four phase readings, the numbers are right on the money!

Regards,

Ron

0 Kudos
Message 12 of 17
(825 Views)

If you configure the express filter vi, the configuration screen can show you the expected transfer function in amplitude and phase.

FIR filter usually have a constant group delay (clean sawtooth in phase) , IIR could be nearly anything but a constant phase lag over frequency is called a phase shifter and I think is not possible to configure in the filter express vi.  

 

Can you post an exsample vi?

  Still wonder where the constant phase shift comes from..

 

BTW if you use tone detection (or Sine approximation) there is no need to prefilter the signal, the procedure is a small band filter 😉

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 13 of 17
(816 Views)

Henrik,

Here is my vi.  Yes, I use the tone extractor vi, but I still need the bandpass filter to get my filtered orbit at running speed, or do I?  I have a lot going on in this vi, since it is a work in progress.  By the way, my hat is off to Bob Schor for helping me extensively.  Those trigger 'dots' and peak 'dots' riding the time waveforms are all due to him.  I took some of the flexibility out of this example to remove any confusion.  There will be a numeric selector so the filtered orbit can be viewed for any harmonic of running speed.  

You don't have to fill in any information on the first request screen.  Just click on 'OK'.

0 Kudos
Message 14 of 17
(812 Views)

Henrik,

You are correct about the phase error being the same for some of my work.  I am extracting the magnitude and phase of a single frequency from the time waveforms.  The initial values of the six channels are as follows:

 

Magnitude         Phase (degrees)

4.775                215

1.592                90

1.326                315

0.531                45

2.122                180

1.326                 270

 

Here is the results from the vi...

 

1x Running Speed Displacement Magnitude and Phase.png

 

Here is my code....

 

Extract Single Tone Information.png

0 Kudos
Message 15 of 17
(763 Views)

Henrik,

I found the answer in the description of the single tone extraction.  When in doubt, read the instructions...  I was already way ahead of myself.  No wonder all of the phase readings looked good before I started applying the tach to that page.  Alll of the signals are triggered on the very first input page by the tach channel, and the vi calculated the phase for the frequency in question from time zero!  So, I found my error was 10 degrees.  The same 10 degrees on all channels, so since this phase is all relative to each other, that amount of phase error is not a problem.  Here's a question for you.  The proximity probes that are used to view shaft orbits need phase with zero error.  How do you think those 'boxes' calculate phase?

Thanks again for your input.

Ron

0 Kudos
Message 16 of 17
(750 Views)

"When in doubt, read the instructions..."    short RTFM  is always a good idea. 😄

For the tone detection there is a good presentation (1999?)  from NI . I posted a link here somewhere...

Keep in mind that even if the input is of wfrm type the T0 of the wfrm is ignored. The first sample for the phase output is related to T0=0s.

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 17 of 17
(737 Views)