# How to correct for inperfect 90 degree phase shift before doing IQ demodulation?

I want to sample two signals, S and R and later do IQ demodulation on these.

I am multiplying S with R and I also want to multiply S with a 90 degree phase shifted version of R by shifting the samples in R so I get a 90 degree phase shift. The problem I encounter with this is that unless I have a sampling rate that is 4*n of the sine signal frequency (where n is an integer) I wont be able to phase shift the R signal by 90 degrees. And this is my case as the sampling rate and the signal frequency are not in this multiple of each other. So let's say I am able to do a 82 degree phase shift. Is it then possible to correct for this somehow for the total number of periods I choose to sample?

Does it at all give any additional information when doing IQ demodulation when I phase shift the reference signal by shifting the samples to get a 90 degree phase shift?

EDIT: Measuring range is 3k->300k Hz. S is a single frequency sine wave and R a square wave.

• Your best bet is to delay R by a non-integer amount, using a fractional delay filter. – Oliver Charlesworth Jun 1 '13 at 0:33
• Is "R" a sinusoid or something else? – Jim Clay Jun 1 '13 at 1:50
• You can implement the 90 degree phase shift using a Hilbert transform filter, which will work well over a range of frequencies. – Jason R Jun 1 '13 at 14:17
• @OliCharlesworth: This might work, but it seems like maybe the Hilbert transform which is suggested below is better/easier for my application. – iQt Jun 1 '13 at 21:08
• @JimClay: "R" is a pure one frequency sinusoid. – iQt Jun 1 '13 at 21:09