10-23-2015 04:09 AM
Hi,
This is really a simple question I guess, but how can I shift the phase of signal(complex waveform) by arbitrary degree?
If there are any simple VIs for such phase shift, please let me know.
The input signal is around 500Hz sinusoid signal. And its output should be same amplitude and same freq.
Thanks in advance.
10-23-2015 04:35 AM
You're looking for something that takes an input array X[i], and outputs a new array Y such that Y[i] = X[i-n].
Two options spring to mind:
- If you have anything above base (I think), have a look on the Signal Processing palette for Y[i]=X[i-n].vi. Note the clever name!
- Do it yourself - it's pretty trivial with a for loop.
The number of elements you shift to get an arbitrary phase angle or time delay is up to the sampling rate of your input signal.
10-23-2015 05:04 AM
Thank you for your advice, thoult!
I was able to find the Y[i]=X[i-n].vi., and as your advice, its implimentation is quite simple.
Let me ask one more question...
I think I can shift the waveform with the VI, but if I shift arbitrary "n" samples, then those samples will be discarded and addtional samples will be required from next array to make the output continuous.
So, in order to make it continuous, I think the shifted array should wait next array to be concatinated n samples which are part of next one.
Is my notion correct?
Thank you again.
10-24-2015 11:50 AM
If it's a Complex Waveform you just need to multiply by a Complex Constant of that phase (and length one). I.e., multiply by exp(i*theta).
10-25-2015 03:47 AM
Thank you drjdpowell!
Yes that's right.
But the thing is my system is constructed with USRP(Software Defined Radio device).
Because the each IQ data frame from the niUSRP Fetch Rx Data VI is processed in while loop, in order to make it continuous, the simple multiplicaton you mentioned won't work I guess.
However I finally implemented phase shifter (with a little problem...)by myself. This is kind of delay function.
Again, thank you guys for supports.