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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Hilbert Transform for 90 degree phase shift

Solved!
Go to solution

I am usig hilbert transform to provide me with a phase shift of the input signal of a UHF radar unit.

When I try to get the phase sifted wave I dont get anything.But when I reproduce the output of the HIlbert and do a sine I get the orginal wave without the phase shift.

When I also use a simulated sine wave and use Hilbert transform for it, I get a wave which has been phase shifted by 90 degrees.

So can you please help me with phase shifting using Hilbert.

Are there any better solutions for phase shifting?

0 Kudos
Message 1 of 7
(5,459 Views)

Pleast attach your Vi instead of a oversized useless picture. Also attach a set of typical data. (Or run it for a while, then "edit...make current values default". Save under a new name and attach it here).

 

  1. How many points do you read per iteration of the loop? (Maybe the ptbypt version would be more approrpiate?)
  2. What is the point of these computations? (Do you have a link to a website explaining the algorithm?)
  3. The hilbert transform mutiliates the DC (and sometimes the niquist) component. Could that be the problem?
  4. What is the meaning of "I don't get anything"? (empty array, all zeroes, all NaN, unexpected values?)
  5. Does the error output return anything interesting?

 

0 Kudos
Message 2 of 7
(5,441 Views)

Thank you very much for you reply,

I1) will try the pt by pt hilbert transform and update you.

2)Regarding the Hilbert transform for the algoritham, You can check this link, here he uses cos so he reproduces the original signal, so i used a sin instead of cos and when I used a simulated wave form I could get a phase shift of 90 degree.

http://zone.ni.com/reference/en-XX/help/371361G-01/lvanlsconcepts/hilbert_transform_analytic/

But when I try my signal from the radar I dont get anything with sin but with cos I can reproduce the signal and the reproduced signal and the input are the same.

3)My signal is AC signal so i think there should be no problem with hilbert.

4)The error output just gives 0.

I attached my VI you can check it.

0 Kudos
Message 3 of 7
(5,423 Views)

If the default values of the VI are correct, you are only reading a single sample/iteration for processing. All you get is the DC component with gets zeroed out by the hilbert transform. There is nothing left, as expected.

 

I encourage you to fully understand these algorithms.

0 Kudos
Message 4 of 7
(5,397 Views)

I am sorry, I am trying to understand the algorithm.

The hilbert transform should give a phase shift of 90 degrees right?

So how do I do hilbert transform?

Do I need to create a cyclic buffer or soemthing like that to store my values and then do Hilbert transform?

0 Kudos
Message 5 of 7
(5,374 Views)
Solution
Accepted by topic author mitun

If you get one point at a time, use the ptbypt version as already mentioned. It includes a buffer of configurable size.

Message 6 of 7
(5,361 Views)

Thanks it works great now

0 Kudos
Message 7 of 7
(5,340 Views)