Hello, I am doing IQ demodulation in DSP. Only one reference signal(sin) fo is coming as reference. I have generate 2fo,4fo from it and also generate orthogonal signal of each of it for IQ demodulation. All these frequency should be phase looked with the reference signal.My question is how to generate these.Any special techniques for generation. Any reference or suggestion will be great. waiting for reply praveen

# sin and cos signal generation for IQ demodulation in dsp

Started by ●June 28, 2003

Posted by ●June 28, 2003

praveen wrote:> > Hello, > I am doing IQ demodulation in DSP. Only one reference signal(sin) fo > is coming as reference. I have generate 2fo,4fo from it and also > generate orthogonal signal of each of it for IQ demodulation. All > these frequency should be phase looked with the reference signal.My > question is how to generate these.Any special techniques for > generation. Any reference or suggestion will be great.Here's one brute-force way. The down-side is that it requires a clock 4 times the reference frequency, but that may not be a problem if your rates are not that high. Generate a nice square 2fo signal by frequency synthesizing the reference signal up by 4, then dividing that by two using a D flip flop with Q and Q* outputs. Generate the in-phase signal, 1fo, by dividing the 2fo signal by 2. Then generate the quadrature 1fo signal, 1foq, by clocking the 1fo signal through a D-flip flop using 2fo* (the Q* output of the divider) as a clock. The Q output of this flip-flop is the 1foq signal. If you need nice sine waves, filter the 1fo and 1foq signals with a filter that has a cutoff just above 1fo. However, I've never done this before... A schematic is worth a thousand words, but hopefully you get the gist. -- % Randy Yates % "...the answer lies within your soul %% Fuquay-Varina, NC % 'cause no one knows which side %%% 919-577-9882 % the coin will fall." %%%% <yates@ieee.org> % 'Big Wheels', *Out of the Blue*, ELO http://home.earthlink.net/~yatescr

Posted by ●June 30, 2003

In article 3EFDA062.4DF109B6@ieee.org, Randy Yates at yates@ieee.org wrote on 06/28/2003 10:01:> praveen wrote: >> >> Hello, >> I am doing IQ demodulation in DSP. Only one reference signal(sin) fo >> is coming as reference. I have generate 2fo,4fo from it and also >> generate orthogonal signal of each of it for IQ demodulation. All >> these frequency should be phase looked with the reference signal.My >> question is how to generate these.Any special techniques for >> generation. Any reference or suggestion will be great. > > Here's one brute-force way. The down-side is that it requires a clock > 4 times the reference frequency, but that may not be a problem if your > rates are not that high. > > Generate a nice square 2fo signal by frequency synthesizing the reference > signal up by 4, then dividing that by two using a D flip flop with Q and > Q* outputs. Generate the in-phase signal, 1fo, by dividing the 2fo signal > by 2. Then generate the quadrature 1fo signal, 1foq, by clocking the 1fo > signal through a D-flip flop using 2fo* (the Q* output of the divider) as > a clock. The Q output of this flip-flop is the 1foq signal. If you > need nice sine waves, filter the 1fo and 1foq signals with a filter > that has a cutoff just above 1fo. > > However, I've never done this before... > > A schematic is worth a thousand words, but hopefully you get the gist.another way, especially if the need is for nice round sine waves, is what Clay Turner calls "Coupled-standard quadrature" in his "Recursive Discrete-Time Sinusoidal Oscillators" paper he did last May for IEEE Sig Proc magazine. it is essentially: cos(wt + phi) = cos(wt)cos(phi) - sin(wt)sin(phi) sin(wt + phi) = cos(wt)sin(phi) + sin(wt)cos(phi) where phi = w/Fs. cos(phi) and sin(phi) should be bumped up by the smallest amount possible (LSB) so that cos^2 + sin^2 will add to slightly bigger than 1. that will keep the amplitude from decaying. what keeps it from blowing up is clipping. and i *have* done this on the 56K long ago. worked like a dream. r b-j

Posted by ●June 30, 2003

Hello Praveen, R-BJ mentioned my article about recursive osc. You can use one of these and phase lock it to you incoming sine wave. A simple phase lock can be had if you analytic extend your sine wave to include a cos component. You can use a phase orthogonal filter pair to do this. Then use the osc (with quadrature outputs) to heterodyne the incoming reference down to zero. This gets lowpassed and is used to control the frequency of the quad osc. See my article for details on dynamic tuning of oscs. If your reference's amplitude is all over the place, then you can add a simple arctan method to get amplitude independence. If you only need to freq. lock instead of phase lock, you can used a derivative method (finds instantaneous freq.) and avoid arctangents. Once you have a quad osc locked to your signal, you can easily create the square and fourth powers just by squaring the quad osc's output. Treat the osc's output as a complex number. Just square it again to get the 4th power value. Another approach for locking is the Costas loop; however, since it does real signal mixing, you get both the sum and difference frequencies in two intermediate stages. The sum frequencies are knocked out with a pair of lowpass filters. But since you don't want the sum frequency to alias on top of your frequency of interest, you have to oversample (relative to your final data bandwidth). The complex phase locked loop doesn't suffer from this requirement - in fact you can let the aliasing just wrap the signal around. For example, to demodulate BPSK, just phase lock the square of the osc's output to the square of the signal to create the control signal for the oscilator's frequency. Then let the original osc. output be used to directly demodulate the unsquared signal. I've implemented this and it works well. The reason this works is a complex mix doesn't create both images. Clay My paper can be found here: http://personal.atl.bellsouth.net/p/h/physics/oscpaper.pdf "praveen" <praveenkumar1979@rediffmail.com> wrote in message news:ff8a3afb.0306272310.16c7e4ca@posting.google.com...> Hello, > I am doing IQ demodulation in DSP. Only one reference signal(sin) fo > is coming as reference. I have generate 2fo,4fo from it and also > generate orthogonal signal of each of it for IQ demodulation. All > these frequency should be phase looked with the reference signal.My > question is how to generate these.Any special techniques for > generation. Any reference or suggestion will be great. > > > waiting for reply > praveen

Posted by ●June 30, 2003

Randy Yates wrote:> > praveen wrote: > > > > Hello, > > I am doing IQ demodulation in DSP. Only one reference signal(sin) fo > > is coming as reference. I have generate 2fo,4fo from it and also > > generate orthogonal signal of each of it for IQ demodulation. All > > these frequency should be phase looked with the reference signal.My > > question is how to generate these.Any special techniques for > > generation. Any reference or suggestion will be great. > > Here's one brute-force way. The down-side is that it requires a clock > 4 times the reference frequency, but that may not be a problem if your > rates are not that high. > > Generate a nice square 2fo signal by frequency synthesizing the reference > signal up by 4, then dividing that by two using a D flip flop with Q and > Q* outputs. Generate the in-phase signal, 1fo, by dividing the 2fo signal > by 2. Then generate the quadrature 1fo signal, 1foq, by clocking the 1fo > signal through a D-flip flop using 2fo* (the Q* output of the divider) as > a clock. The Q output of this flip-flop is the 1foq signal. If you > need nice sine waves, filter the 1fo and 1foq signals with a filter > that has a cutoff just above 1fo. > > However, I've never done this before... > > A schematic is worth a thousand words, but hopefully you get the gist. > --I've done that (sort of), and for diode ring modulators, the square signal is ideal. With a 4x clock, feed the clock inputs of 2 D-type flip flops. Connect the Q output of one to the D input of the other, and the ~Q output of that one do the D input of the first. The Qs will have a quarter of the clock frequency and quadrature phase. With the ~Qs, all four phases are available. There is no need for the 4x clock to be square; only one of its edges is used. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������