Multifunction DAQ

Showing results for 
Search instead for 
Did you mean: 

How to change the phase by 90 deg of a sine wave


Does any one know how to change the phase of a sine wave by 90 degrees.

0 Kudos
Message 1 of 12
I could not understand what you want. But if you want to change it in software world, you can use LabVIEW. If Express VI in LabVIEW must be really useful. It generate programing code automatically.

0 Kudos
Message 2 of 12
If it's a sine wave that has already been created then just use a Hilbert Transform. If you are creating a sine wave, then you can adjust the phase to whatever you want it to be.

You can also just do the math if it is really a sine wave. Use the Pythagorean Theorem.
Randall Pursley
0 Kudos
Message 3 of 12

Thanks. I want to change the phase of a generated sine wave by any value. I have included a sample programme. Can you help me in how to use formula node or array manipulations to change the wave form 90 deg phase.


0 Kudos
Message 4 of 12
Sorry, hre is the programme.
0 Kudos
Message 5 of 12
Hi Malkoba,

Thank you for your post.

Having looked at your VI I can say that you have created the correct inputs to the 'Sine'.

However the dial you had created had no affect as it was not wired into it the 'Sine' on the block diagram.To fix the problem I have wired the 'Phase' dial into the 'phase' terminal of the waveform generator. This now changes the phase of the sine wave during runtime.

The dial also now has a digital display (numeric box below it)- this can be used to read the dial's value, or feed in specific values into the control.

Please find a modified version of your VI below.

National Instruments | Northern California
0 Kudos
Message 6 of 12
see attached vi. This vi takes the generated data , creates a phase shifted version of the existing data and plots both sets.
Message 7 of 12

Thanks. I require to change the phase of the wave form array data comming out from the sub vi . Do you know how it can be done with matrix operations or by using a formula node or by any other method.


0 Kudos
Message 8 of 12
what is included in the array data ?
Y values, Time stamp data ?, DT inf ?

If only the Y data is included, then
estimate the period of the sine wave,
then shift the array data by a fraction of the period.
0 Kudos
Message 9 of 12
Here is a Hilbert Transform based phase shifter. Remember that if you aren't working with sine waves, phase shift is not the same as a time shift.
Randall Pursley
0 Kudos
Message 10 of 12