From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
03-08-2006 12:45 PM
I forgot to ask, how do I normalize two waveforms so they have the same amplitude? (My signals will not have the same amplitude).
Jeff
03-08-2006 01:27 PM - edited 03-08-2006 01:27 PM
Message Edited by rpursley8 on 03-08-2006 02:30 PM
03-08-2006 01:46 PM
03-08-2006 01:51 PM
@rpursley8 wrote:
Essentially a Hilbert transform in the frequency domain is performed by changing the sign of the negative frequency components. All cosines become sines and all sines become cosines. I use this to convert one of the sine signal to a cosine signal and then use the trig identities to get the result in the for cos (w) +jsin(w) where w=the phase difference between the two signals.
~~~ Currently mass compiling to version 8.0.1, hour 3
Message Edited by rpursley8 on 03-08-2006 01:12 PM
So that is why my first attempt wouldn't work. I was using arcsine and should have been using arccosine. Thanx a bunch Randall.
03-08-2006 02:08 PM
I found this vi in my library. I think Randall was the originator. It uses a slightly different method for finding phase differences. Correct me if I'm wrong Randall, but it looks like it uses the Hilbert Transform to shift the reference signal by 90 degress (like I and Q modulation). Then it multiplies the input signal by the unshifted reference to get the real part (I), and multiplies the input by the shifted reference to get the imaginary part (Q). The phase angle is then extracted from the x+jy signal and converted from radians to degrees.
What I don't understand is why do you multiply the DC component by 2?
03-08-2006 02:20 PM
Great thread everyone.
Boy now I have many options.
I also did not understand the multiply by 2 but I'm sure you have a reason.
Also, what is the icon or vi that's in the middle, right after the waves are multiplied together?
Jeff
03-08-2006 02:34 PM
03-08-2006 02:38 PM
03-08-2006 02:49 PM
03-08-2006 02:55 PM
Thanks my icon is totally different lol.
But this seems to work just fine. I will test it with some "noisier" signals to see how it works but my guess is that this is a better method than what I was doing with the zero crossing thing.
Thanks again for all the help!
Jeff