|
Prev: SAA7105
Next: FFT Averaging
From: Paul Solomon on 20 Oct 2005 04:01 Hi All, I have been working for some time now on making a multichannel FM demod / remod, and I have finally gotten my hands on some test equipment to put this design through its paces and have found that I have a strange problem. To start with I will outline the design that I am using.. I undersample the FM signal at 80MSPS using a 12bit ADC, this signal is then mixed down to baseband with a NCO that generated a sin and cos output to give me an I and Q. The I and Q then go through a CIC decimation filter in which I decimate by 16 and then a 300kHz wide FIR filter to get rid of any adjacent channels and decimate by another 4. The I and Q now contains my signal of interest at a sampling rate of 1.25MSPS, this is fed into a cordic ATAN2 function and then I differentiate the output by subtracting the previous sample (and I phase unwrap by looking for changes greater than pi and adding or subtracting 2*pi as appropriate). The output here is then my FM multiplex output which should contain L+R, 19kHz stero pilot, L-R DSBSC at 38kHz etc and on a spectrum analyser I can tune to a station and see all this, and when I output to speakers it sounds good. Now for my problem, with this test equipment I have been able to create a FM carrier that is has a deviation of 75kHz and a modulation tone of 1kHz. When I feed this into my demod, I can hear the 1kHz tone on the speakers and it sounds ok. However when I look at this output on a spectrum analyser, there is not only my 1kHz tone, but what appears to be an FM modulated version of the 1kHz tone on my output at about 40dB down. This basically raises the noise floor in the 0-75kHz region of the FM MPX output and has an upwards slope to the noise floor in the same shape that the 1kHz tone FM modulated would look like. Interestingly if I change the level of my modulating tone, the BW of the noise gets narrower and wider as you would expect an FM carrier to (i.e. the deviation decreases and increases). And if I change the tone frequency, the look of the noise changes as the FM spectrum would change, so at 19kHz I have the familiar 3 - 4 spikes in the noise floor that the FM shape of a 19kHz tone looks like. At first I thought that I was getting some of the signal that I am demodulating leaking through to the output somehow however I have done some tests in which I vary the level of the incomming FM signal level by 40dB and this has no effect on the level of the noise on the output of the FM MPX, it is a constant -40dBC. I have no idea what could be causing this, but it is quite frustrating, as although the audio sounds fine, it wipes out the RDS carrier and thus makes this system unuseable. I am am starting to suspect it may be a side effect of my method of demodulation (i.e.CORDIC atan2 followed by difference of current sample and last) but I have no idea why this would cause a FM modulation of the output. To summarise, I am getting a FM modulated version of my FM multiplex outputted on top of my FM multiplex output but it as about 40dB down from the actual FM Multiplex signal and I dont know why! Any ideas?? Regards, Paul Solomon
From: Paul Solomon on 21 Oct 2005 04:11 "Paul Solomon" <psolomon(a)tpg.com.au> wrote in message news:43574fa0$1(a)dnews.tpgi.com.au... > Hi All, > > I have been working for some time now on making a multichannel FM demod / > remod, and I have finally gotten my hands on some test equipment to put > this design through its paces and have found that I have a strange > problem. > > To start with I will outline the design that I am using.. > > I undersample the FM signal at 80MSPS using a 12bit ADC, this signal is > then mixed down to baseband with a NCO that generated a sin and cos output > to give me an I and Q. The I and Q then go through a CIC decimation filter > in which I decimate by 16 and then a 300kHz wide FIR filter to get rid of > any adjacent channels and decimate by another 4. The I and Q now contains > my signal of interest at a sampling rate of 1.25MSPS, this is fed into a > cordic ATAN2 function and then I differentiate the output by subtracting > the previous sample (and I phase unwrap by looking for changes greater > than pi and adding or subtracting 2*pi as appropriate). The output here is > then my FM multiplex output which should contain L+R, 19kHz stero pilot, > L-R DSBSC at 38kHz etc and on a spectrum analyser I can tune to a station > and see all this, and when I output to speakers it sounds good. > > Now for my problem, with this test equipment I have been able to create a > FM carrier that is has a deviation of 75kHz and a modulation tone of 1kHz. > When I feed this into my demod, I can hear the 1kHz tone on the speakers > and it sounds ok. However when I look at this output on a spectrum > analyser, there is not only my 1kHz tone, but what appears to be an FM > modulated version of the 1kHz tone on my output at about 40dB down. This > basically raises the noise floor in the 0-75kHz region of the FM MPX > output and has an upwards slope to the noise floor in the same shape that > the 1kHz tone FM modulated would look like. Interestingly if I change the > level of my modulating tone, the BW of the noise gets narrower and wider > as you would expect an FM carrier to (i.e. the deviation decreases and > increases). And if I change the tone frequency, the look of the noise > changes as the FM spectrum would change, so at 19kHz I have the familiar > 3 - 4 spikes in the noise floor that the FM shape of a 19kHz tone looks > like. > > At first I thought that I was getting some of the signal that I am > demodulating leaking through to the output somehow however I have done > some tests in which I vary the level of the incomming FM signal level by > 40dB and this has no effect on the level of the noise on the output of the > FM MPX, it is a constant -40dBC. > > I have no idea what could be causing this, but it is quite frustrating, as > although the audio sounds fine, it wipes out the RDS carrier and thus > makes this system unuseable. I am am starting to suspect it may be a side > effect of my method of demodulation (i.e.CORDIC atan2 followed by > difference of current sample and last) but I have no idea why this would > cause a FM modulation of the output. > > To summarise, I am getting a FM modulated version of my FM multiplex > outputted on top of my FM multiplex output but it as about 40dB down from > the actual FM Multiplex signal and I dont know why! > > Any ideas?? > > Regards, > > Paul Solomon > > Hi All, I have done another stack of work on this today and although I am still unsure why I am getting this problem, I think I have found out how to fix it. I have been using a decimation factor of 64 in the design taking me down to a sampling rate of 1.25MSPS for the cordic demod, I have found that if I decimate by 32 instead and run the cordic demod at 2.5MSPS the problem goes away. I am yet to understand why this is, it could be the fact that I am using the difference instead of differentiating the phase to generate the instantaneous frequency but I do not know yet.. Regards, Paul Solomon
From: Clay S. Turner on 21 Oct 2005 09:50 "Paul Solomon" <psolomon(a)tpg.com.au> wrote in message news:4358a2ec(a)dnews.tpgi.com.au... > > Hi All, > > I have done another stack of work on this today and although I am still > unsure why I am getting this problem, I think I have found out how to fix > it. I have been using a decimation factor of 64 in the design taking me > down to a sampling rate of 1.25MSPS for the cordic demod, I have found > that if I decimate by 32 instead and run the cordic demod at 2.5MSPS the > problem goes away. I am yet to understand why this is, it could be the > fact that I am using the difference instead of differentiating the phase > to generate the instantaneous frequency but I do not know yet.. > > Hello Paul, I was wondering if your differencing was the problem. Technically you need a true derivative. The way I've done FM demod totally avoids the atan completely. Just do the (I dQ - Q dI) / (I^2 + Q^2) method. All you need is a couple of FIR differentiators and one division. If your AGC is good, this division can be replaced with an expansion about the nomimal gain. Clay
From: Paul Solomon on 21 Oct 2005 18:43 "Clay S. Turner" <Physics(a)Bellsouth.net> wrote in message news:2l66f.20$8e7.8(a)bignews7.bellsouth.net... > > "Paul Solomon" <psolomon(a)tpg.com.au> wrote in message > news:4358a2ec(a)dnews.tpgi.com.au... >> >> Hi All, >> >> I have done another stack of work on this today and although I am still >> unsure why I am getting this problem, I think I have found out how to fix >> it. I have been using a decimation factor of 64 in the design taking me >> down to a sampling rate of 1.25MSPS for the cordic demod, I have found >> that if I decimate by 32 instead and run the cordic demod at 2.5MSPS the >> problem goes away. I am yet to understand why this is, it could be the >> fact that I am using the difference instead of differentiating the phase >> to generate the instantaneous frequency but I do not know yet.. >> >> > > Hello Paul, > > I was wondering if your differencing was the problem. Technically you need > a true derivative. The way I've done FM demod totally avoids the atan > completely. Just do the (I dQ - Q dI) / (I^2 + Q^2) method. All you need > is a couple of FIR differentiators and one division. If your AGC is good, > this division can be replaced with an expansion about the nomimal gain. > > Clay > > > Hi Clay, This has been brought up a few times and the thing that has stopped me going down this road each time is that with all mt googleing, I have still not been able to work out how to differentiate with an FIR filter. I understand that a FIR filter with the co-eff's [1, -1] is effectively what I am doing at the moment for my differentiator, but I have not been able to find a concise reference that says to approximate differentiation do this. If anyone could explain to me how to do this FIR approximation of differentiation, I would greatly appreciate it. I have Matlab at my dispoal if there is a magic command available to auto generate the co-efficients.I also have a copy of Ricks Understanding DSP, but I have not seen any reference to this there (unless I have missed it?) Also if there is any mathematical relationship between the number of co-efficients and the error in the differentiation approximation then I would be interested in that also. Regards, Paul Solomon
From: Clay S. Turner on 21 Oct 2005 19:41
"Paul Solomon" <psolomon(a)tpg.com.au> wrote in message news:43596fac$1(a)dnews.tpgi.com.au... >> > Hi Clay, > > This has been brought up a few times and the thing that has stopped me > going down this road each time is that with all mt googleing, I have still > not been able to work out how to differentiate with an FIR filter. I > understand that a FIR filter with the co-eff's [1, -1] is effectively what > I am doing at the moment for my differentiator, but I have not been able > to find a concise reference that says to approximate differentiation do > this. > > If anyone could explain to me how to do this FIR approximation of > differentiation, I would greatly appreciate it. I have Matlab at my > dispoal if there is a magic command available to auto generate the > co-efficients.I also have a copy of Ricks Understanding DSP, but I have > not seen any reference to this there (unless I have missed it?) > > Also if there is any mathematical relationship between the number of > co-efficients and the error in the differentiation approximation then I > would be interested in that also. > Hello Paul, I use a program I wrote (based on the Park McClellan version) to make my FIR filters. Matlab should be able to do this. But I'm not a Matlab guy, so I'm unable to give you exact details. But with a PM design, you do get the approximation error, so you can figure out the rest. A link to my program is below. It is a DOS application, so it will run on pretty much any windows machine. When you start it, tell it you want a differentiator. Pick a value like 11 for an initial filter order (number of taps). Enter your sampling rate. And for the frequency bands enter 0.0 for the low value and something a little less than 0.5*sampling rate for the high value. Adjust your filter order (up or down) until the error is small enough. The displayed frequencies are digital frequencies (relative to the sampling rate) To save the FIR coefs, just use "calculate filter coefs" menu option to compute the coefs (answer no to both the quantize and 56000 mode questions), and the program will write the results into a file called fil.dat. The format is text and this will look like a c file matrix. Sorry about the scant instructions - I've been too lazy to write a users manual. But the price is right and I give permission for all to use. I can do this since I wrote it. http://personal.atl.bellsouth.net/p/h/physics/FIR.Zip Enjoy, Clay p.s. I'll be away from my computer this weekend, so if you post any questions, I'll be able to get to them Sunday night. |