I have a question regarding I/Q modulation occuring in a multi-rate system. Here's the background: fs = 20e6; fc = 20e6; (my carrier freq) I = cos( 5mhz ) Q = 0; I first upconvert both I and Q to fs = 120e6 in two stages, interp by 4, and interp by 3/2. Then I form the passband signal: passband = I*cos( fc ) - Q*sin( fc ). Now I retrieve the I and Q components by I_rcv = passband * cos( fc ); Q_rcv = passband * -sin( fc ); then I decimate by 6 to recover I and Q at fs = 20e6. This works as expected. My question pertains to the following slightly modified setup: First, I interpolate I and Q by 4, so that fs = 80e6, then form the passband signal: passband = I*cos( fc ) - Q*sin( fc ). Now I interpolate the passband signal by 3/2 so that the passband signal is at fs = 120e6. Next I try to retrieve I and Q components by the following: I_rcv = passband * cos( fc ); Q_rcv = passband * -sin( fc ); and decimating by 6. This fails though. Given that the filter cutoff frequencies used are correct, does anyone have some insight into why this might fail? Thanks.
Do multirate filters break I/Q mod/demod?
Started by ●December 3, 2007
Reply by ●December 3, 20072007-12-03
On Dec 3, 10:01 pm, "sal p" <salvatore.perro...@baesystems.com> wrote:> I have a question regarding I/Q modulation occuring in a multi-rate > system. > > Here's the background: > fs = 20e6; > fc = 20e6; (my carrier freq) > > I = cos( 5mhz ) > Q = 0; > > I first upconvert both I and Q to fs = 120e6 in two stages, interp by 4, > and interp by 3/2. Then I form the passband signal: > passband = I*cos( fc ) - Q*sin( fc ). > > Now I retrieve the I and Q components by > I_rcv = passband * cos( fc ); > Q_rcv = passband * -sin( fc ); > > then I decimate by 6 to recover I and Q at fs = 20e6. > > This works as expected. > > My question pertains to the following slightly modified setup: > > First, I interpolate I and Q by 4, so that fs = 80e6, then form the > passband signal: > passband = I*cos( fc ) - Q*sin( fc ). > > Now I interpolate the passband signal by 3/2 so that the passband signal > is at fs = 120e6. > > Next I try to retrieve I and Q components by the following: > I_rcv = passband * cos( fc ); > Q_rcv = passband * -sin( fc ); > > and decimating by 6. > > This fails though. Given that the filter cutoff frequencies used are > correct, does anyone have some insight into why this might fail? Thanks.I'm too tired to think about the maths, so I'm not going to attempt to suggest whether the approaches may or may not be equivalent! However, the first obvious debug step would be to compare the two final passband signals at 120Msamp/s. Do they look the same in the time domain and frequency domain? -- Oli
Reply by ●December 4, 20072007-12-04
On Dec 3, 4:01 pm, "sal p" <salvatore.perro...@baesystems.com> wrote:> I have a question regarding I/Q modulation occuring in a multi-rate > system. > > Here's the background: > fs = 20e6; > fc = 20e6; (my carrier freq) > > I = cos( 5mhz ) > Q = 0; > > I first upconvert both I and Q to fs = 120e6 in two stages, interp by 4, > and interp by 3/2. Then I form the passband signal: > passband = I*cos( fc ) - Q*sin( fc ). > > Now I retrieve the I and Q components by > I_rcv = passband * cos( fc ); > Q_rcv = passband * -sin( fc ); > > then I decimate by 6 to recover I and Q at fs = 20e6. > > This works as expected. > > My question pertains to the following slightly modified setup: > > First, I interpolate I and Q by 4, so that fs = 80e6, then form the > passband signal: > passband = I*cos( fc ) - Q*sin( fc ). > > Now I interpolate the passband signal by 3/2 so that the passband signal > is at fs = 120e6. > > Next I try to retrieve I and Q components by the following: > I_rcv = passband * cos( fc ); > Q_rcv = passband * -sin( fc ); > > and decimating by 6. > > This fails though. Given that the filter cutoff frequencies used are > correct, does anyone have some insight into why this might fail? Thanks.Sal, I ran your code through Matlab and the two methods produced the same results. I used Matlab's "resample" function to perform decimation and interpolation. What did you mean by stating that the second method "fails"? Darol Klawetter
Reply by ●December 5, 20072007-12-05
Oli and Darol, thanks for your responses. Oli, Yes both passband signals look the same in both time and frequency. There are slight differences in the two due to the magnitudes of the suppressed interpolation images being different (b/c the interp filters have different passband specs.) Other than these slight differences, the two are the same and look like what I would expect. (Two peaks spaced 5 mhz apart centered around +/- fc = 20Mhz ). Darol, By fail I mean that my demodulated I/Q doesn't match my original I/Q using the second method: I_tx = cos(2*pi *5e6 * t); Q_tx = zeros(length(t), 1); but my demod. I/Q both look like cos(5mhz), with the same amplitude. I am not using the resample function, I am changing the sampling rate using upsamle(), filter(), downsample(). I will try using resample and see where my code differs from the resample results. Thanks for the insight! Sal
Reply by ●December 5, 20072007-12-05
>Oli and Darol, thanks for your responses. > >Oli, >Yes both passband signals look the same in both time and frequency.There>are slight differences in the two due to the magnitudes of thesuppressed>interpolation images being different (b/c the interp filters have >different passband specs.) Other than these slight differences, the two >are the same and look like what I would expect. (Two peaks spaced 5 mhz >apart centered around +/- fc = 20Mhz ). > >Darol, >By fail I mean that my demodulated I/Q doesn't match my original I/Qusing>the second method: > >I_tx = cos(2*pi *5e6 * t); >Q_tx = zeros(length(t), 1); > >but my demod. I/Q both look like cos(5mhz), with the same amplitude. > >I am not using the resample function, I am changing the sampling rate >using upsamle(), filter(), downsample(). I will try using resample andsee>where my code differs from the resample results. > >Thanks for the insight! > >Sal >I re-tested the two methods using resample(), and I found the problem. The filter I was using to implement the interpolation by 3/2 is minimum-phase, NOT linear-phase (I chose a min. phase filter for its time-domain properties). Using a linear-phase filter for the 3/2 interpolation makes both methods equivalent. Here's my take on what is happening: Since I'm interpolating, mixing, then interpolating again, the filter applied after the mixing has to be linear phase to maintain the phase relationships b/w the I/Q data and the carrier that exist after the data was initially mixed. Thanks for your help. -Sal
Reply by ●December 5, 20072007-12-05
On Dec 5, 10:10 am, "sal p" <salvatore.perro...@baesystems.com> wrote:> >Oli and Darol, thanks for your responses. > > >Oli, > >Yes both passband signals look the same in both time and frequency. > There > >are slight differences in the two due to the magnitudes of the > suppressed > >interpolation images being different (b/c the interp filters have > >different passband specs.) Other than these slight differences, the two > >are the same and look like what I would expect. (Two peaks spaced 5 mhz > >apart centered around +/- fc = 20Mhz ). > > >Darol, > >By fail I mean that my demodulated I/Q doesn't match my original I/Q > using > >the second method: > > >I_tx = cos(2*pi *5e6 * t); > >Q_tx = zeros(length(t), 1); > > >but my demod. I/Q both look like cos(5mhz), with the same amplitude. > > >I am not using the resample function, I am changing the sampling rate > >using upsamle(), filter(), downsample(). I will try using resample and > see > >where my code differs from the resample results. > > >Thanks for the insight! > > >Sal > > I re-tested the two methods using resample(), and I found the problem. > The filter I was using to implement the interpolation by 3/2 is > minimum-phase, NOT linear-phase (I chose a min. phase filter for its > time-domain properties). Using a linear-phase filter for the 3/2 > interpolation makes both methods equivalent. > > Here's my take on what is happening: Since I'm interpolating, mixing, then > interpolating again, the filter applied after the mixing has to be linear > phase to maintain the phase relationships b/w the I/Q data and the carrier > that exist after the data was initially mixed. > > Thanks for your help. > -SalGlad to have helped.