Forums

Root Raised Cosine Filter

Started by jonmcleod2003 2 weeks ago18 replieslatest reply 2 weeks ago107 views

Hello.

I am experimenting with a soft transmitter and receiver, using DMR modulation.

My plans is this. On the transmit side, I generate dibits, filter them with an RRC filter, modulate them into 4-level FM, and transmit them. On the receive side, I receive signal, demodulate it in to FM, filter the baseband with an identical RRC filter, and then recover the transmitted dibits. I'm not using the whole DMR stack -- I'm just using DMR modulation to transmit generic data on a narrowband channel.

From what I can find, a "typical" DMR transmitter uses a sample rate of 48000 hz with 10 samples per symbol.  The RRC filter is an FIR with an even number of taps, usually 20-30 taps to span two-to-three symbols. Beta is usually 0.2. The DMR spec (ETSI TS 102 361-1) shows a filter pass band at DC-1920Hz, and a stop band above 2880Hz. From what I can tell, a 20-30 tap FIR is a reasonable way to approximate this.

However, I've tried a combination of filter length and beta values, that I think would meet the spec, but they all cause undermodulation of the transitions. Is there some basic problems with my assumptions above or is this just a design bug I need to work out? I have looked at DMR in the past, off the air with a scope, and whatever's coming out of the transmitter it's always on the mark with symbols at +/- 648Hz and +/- 1944Hz. Now that I'm trying to make it work, I don't see how that's possible with the premodulation filter they describe in the spec.

Any wisdom is appreciated. Thanks.

[ - ]
Reply by kazMay 14, 2020

I am not familiar with DMR standards but with other comm potocols. Just curious what is exactly dibit which you input to the filter. I am expecting you create four distinct signal levels then filter it.

[ - ]
Reply by jonmcleod2003May 14, 2020
I pass fixed point values +3, +1,-1,-3 into the filter, which correspond to dibit values 01, 00, 10, 11 from the data stream. Each symbol includes 10 samples, so a dibit of 01 becomes 10x +3 sample values input into the filter. The outputs of the filter are each multiplied by 648 to generate frequency deviation samples, 4800 symbols per second and 48000 samples per second.  Ultimately those output samples will be used to modulate a PLL (eg, LMX2571) but right now I'm just trying to see the math work.


For reference, but not necessary (I think) to figure this out, here is the DMR spec:

https://www.etsi.org/deliver/etsi_ts/102300_102399...


[ - ]
Reply by kazMay 14, 2020

I can see symbol rate is meant to be 4800/sec. However I am not sure why you repeat the symbol ten times to filter it. If you are targeting upsampling by "repeating" then it is not the standard way of upsampling but may be tolerated by some applications.

proper upsampling by 10 can be done through your filter itself or afterwards.

[ - ]
Reply by jonmcleod2003May 14, 2020

I'm weak here, but I think what I'm doing is not quite the same as interpolation. I'm building in code a baseband signal, which is a train of symbols, each 10 samples long.  So, a 4-level square wave. I'm then filtering that with an FIR filter but not a multi-rate FIR filter, before sending it to the modulator. In my experience with interpolation, I've stuffed zeroes into a more analog-ish signal, to create the same signal with the same bandwidth but a higher sampling rate. That required a special filter built to handle the extra zeroes. But maybe I'm doing this all wrong and I should be using a multirate filter, and that's my problem?

[ - ]
Reply by kazMay 14, 2020

Once you map bit stream to symbols (2 bits to 1 symbol) then you choose the four symbol levels (this need to occupy full dynamic range available to you followed by filtering), the levels of +1/+3 etc need to be scaled for proper filtering. I think this what you call analogish signal, true it is no longer bits. Whether you want upsampling of symbols after modulation by 10 or not depends on your DAC setup and bandwidth considerations. The standards will not determine your DAC implementation or its sampling rate. It is the air requirements and spectrum limitations that take over.

[ - ]
Reply by jonmcleod2003May 14, 2020

In this case they'll be scaled and fed by I2S to the direct modulation system on an LMX2571, which is on existing hardware.  So we don't need to upsample it further or make it into an analog signal. The PLL and loop filter end up being the analog part of the circuit.

[ - ]
Reply by napiermMay 14, 2020

Hello,

A raised cosine (or general Nyquist) filter is used over a linear channel in order to minimize inter-symbol interference.  Since a band limiting filter is needed the response is split between the transmitter and receiver, thus the RRC filter.  Note in terms of selectivity it is pretty lousy.

FM modulation is *not* a linear operation.  In the continuous phase case the modulating base-band signal is used to steer a phase accumulator and thus the instantaneous frequency.  Some type of shaping filter is needed on the base-band signal.

One option is filtering the transitions with a Gaussian filter.  It has the advantage of no overshoot and so good spectral band limiting.  This is GFSK and is used in many low power applications.  The bad is that the previous bit can interfere with the current bit leaving you with an elevated noise floor on reception.

Another option is a Nyquist filter (*NOT* RRC).  A properly designed Nyquist filter on the base band will minimize inter-symbol interference as well as minimize frequency excursions and thus the occupied spectrum.

Note this is on the transmit side.  A receive filter is used to reduce noise power; think equivalent noise bandwidth.  There is no "matched" filter in this scheme.  Best you can do is to have constant group delay over the receive channel.

FWIW,

Mark Napier



[ - ]
Reply by jonmcleod2003May 14, 2020

Thanks! I've thought about GFSK or other modulations, and completely different ways to do it, and we might go another direction soon. But for right now, for a number of reasons, we want to test it using the DMY physical layer. I'm using the RRC on the baseband (before using it to modulate anything), which is a 4-level square wave, and the filtered baseband has intersymbol interference even though the whole point of raised cosine is to avoid that.

[ - ]
Reply by napiermMay 14, 2020

I looked at that spec and sure enough they are using the RRC for base-band filtering.

It's a little different.  So what they have to do is use the matching RRC filter on the Receive side *after* doing the FM demodulation.  That is serving as a "roofing" filter and the match to the RRC on the transmitter.

From a noise reduction standpoint this is funny.  I don't know the implications of filtering after the FM demod which is another non-linear process.

From a system perspective what is there is correct.  The symbols after the demod and RRC filter should not interfere with each other.  If you look at an eye diagram in low noise conditions there should be nice open eyes.

If you look at the signal in the middle or just after the 1st RRC filter then yes there will be interference.

One way to satisfy yourself that the filter is correct is by running it twice on the base-band signal.  After the 2nd RRC filter you should see nice eyes.  If not then something is wrong.

Good Luck,

Mark Napier


[ - ]
Reply by jonmcleod2003May 15, 2020

One real conceptual problem I'm having, is that RC or RRC filters seem to cause intersymbol interference straight out of the chute.

When I play around with RRC or RC filters with rolloff=0.2, spanning 2 to 6 symbols at 10 samples per symbol, I see significant undermodulation. For instance, transitioning from 3 to -3 really only makes it +/- 1.5 or so after passing through the root raised cosine filter.  If I connect this to the modulator, the frequency deviation will be half what it should be. On the other hand, sequence of +3 symbols manages full deviation in the second symbol. The same basic thing happens with a raised cosine filter, but in a more pronounced way.

If the symbol rate is 4800 symbols per second, and the filter rolls off between 1920Hz and 2880Hz, I would actually expect some attenuation, so I'm not surprised to see this. What I don't understand is why I see DMR systems modulating out to 1944Hz in the field when I look at an eye diagram on a service monitor. I think I'm misunderstanding some really fundamental piece of how the these filters fit into the system.

[ - ]
Reply by kazMay 18, 2020

For symbol rate (Rs) of 4800 (at baseband) you need to pass frequencies from dc to half Rs i.e. 0-2400MHz. If the filter rolls off at 1920 to 2880 I expect it to be still ok though some attenuation will occur at edge. My main concern is the way you "are not interpolating" your symbols. The RRC filter requires minimum of interpolation by 2 since one sample per symbol cannot shape symbol edges. An interpolation by 10 is great but you are not doing that, you are just repeating symbols. I don't see how this is going to shape the symbols.

[ - ]
Reply by jonmcleod2003May 18, 2020

You are right, and I was deeply confused about how this works. This weekend, I started giving the filter one symbol value followed by 9 zeros, and my various RC and RRC filter designs worked as I would have expected.

My issue now is that cascading two RRC filters in a literal way does not equal one RC filter. I believe that may be because the signal needs to be decimated prior to the second stage, and I'm misunderstanding that in the same way I misunderstood interpolation in the first stage.

[ - ]
Reply by jonmcleod2003May 18, 2020

napierm, kaz,

As a basic sanity check, is one raised cosine filter equal to two cascaded root raised cosine filters, assuming alpha and filter length match (the sample output of the first rrc filter feeds the sample input of the second rrc filter)?

[ - ]
Reply by jonmcleod2003May 18, 2020

It seems like, as a practical matter, to "split" a RC baseband filter into a transmit RRC filter and receive RRC filter, your system has to work like this:

  1. The transmitter filters its baseband symbols with its RRC, FM modulates the resulting signal, and transmits it.
  2. The receiver receives the signal and FM demodulates it into baseband.
  3. The receiver locates the symbol centers, thus finding the original (but ISI distorted) symbol values, the same ones sent by the transmitter into its RRC in step one. (the symbol center synchronization must have to happen during a +3 -3 +3 -3 synchronization pattern where ISI is predictable).
  4. Once these symbol centers are located, the receiver keeps the center sample of each symbol and throws away the 9 other samples, thus effectively decimating the signal by 10, to one sample per symbol. The result will be the original transmitted symbols, distorted by ISI. The receiver passes these distorted samples through its own matching RRC filter, again interpolating back up to 10 samples per symbol, and keeps just the bit cell center samples of the filtered result.  These are the original (ISI free) symbols generated in step one.

If I'm correct, the receiver RRC doesn't really need to exist except as a translation function to guestimate the next sample based on the current distorted sample plus a few previous undistorted samples. In this design, roof filtering (mentioned earlier) is done prior to demodulation, with a crystal filter in the 1st IF stage and a compensated CIC filter after the second (digital) down converter.  The main purpose of the actual RRC is on the transmit side, to keep the FCC happy. The receive RRC filter, to un-do ISI, seems kinda virtual.

Am I close??

[ - ]
Reply by kazMay 18, 2020

Any two cascaded fir filters (h1,h2) is same as one filter with h = h1 convolved with h2.

But why you want two RRC filters instead of one? 

[ - ]
Reply by jonmcleod2003May 18, 2020

In this case, it's because the DMR spec "splits" the RC filter between the transmitter and receiver. The transmitter splatter filter is RRC and the receiver noise filter is a matched RRC. Together, they are an RC filter between the transmitter and receiver.

[ - ]
Reply by kazMay 18, 2020

That could be misleading. There is one RRC at Tx and another one at Rx.

the response of each one is Root raised cosine so in theory the overall response is said to be raised cosine(root cosine^2) but from your perspective they are just two separate filters with "same" frequency response. The number of taps or rate change need not be same.

[ - ]
Reply by jonmcleod2003May 18, 2020

True.  Good point.