Hi Luke: On Tue, 2017-01-17 at 12:50 -0500, Luke Berndt wrote: > Andy - Thank you so much, this was extremely helpful. I switched to > your RF chain and I think it helped a bit.
I'm glad it helped. FWIW I tried an alternate FM demod approach - 4 PLLs one at each tone - but the tones turned out to be not spaced far enough apart for that to work well. I'd didn't bother with the 4 bandpass filter, non-coherent approach that Marcus mentioned, since 4 coherent PLL's didn't work out. Stick with either the FM detector or Quad Demod. > As you can probably guess, I am more of a programmer than an RF > expert. I'm not very good a great many things myself. :) > > It does look like Max has a branch of OP25 which has a deemphasis > filter that has been tuned for P25. > https://git.osmocom.org/op25/tree/op25/gr-op25_repeater/apps/tx/op25_c4fm_mod.py?h=max > It might be tricky to port to C++ because it uses Numpy, but I am going to > give it a shot. Don't bother. That's just a moving average filter of approximately the symbol length. The same one I have in the flowgraph I gave you. The sinc(4800f) in the frequency domain, works out to a boxcar in the time domain. Now the APCO P25 transmitters' pre-emphasis filter is a little weird, since it is 1/sinc(4800f) in the frequency domain and goes infinite. However it is truncated at 2880 Hz, before it hits it's first infinity. Luckily you don't need the pre-emphasis filter. > > I do think you are right though, the underlying problem is that there > is a lot of noise. This may sound crazy, but I think it is coming from > the USB hub I am using. I know USB2 operates around 480MHz and I am > trying to record at 490MHz. I am going to experiment with my setup a > bit to see if this is it. Not crazy; EMI is a real thing in UHF. The source can also be PC DRAM clocks, PC monitors, etc. Funny side note: my directional TV antenna gets lots of noise at least once a day when it points at the galactic disc. Apparently the Milky Way is a large source of UHF noise. > > Thanks again for taking the time to put this all together. I will > report back on how things are going and if mange to get clean > recordings. It was fun. Down where I live they've just upgraded to APCO P25, but its all new and all Phase II, so no C4FM signals for me. :( Good luck! -Andy > > - Luke > > On Sun, Jan 15, 2017 at 6:58 PM, Andy Walls > <a...@silverblocksystems.net> wrote: > Hi Luke, > > > See the attached GRC for what can be done in GNURadio. > > > 1. You need the baseband noise filter. > > 2. You may or may not need the deemphasis filter. It appears > to make things better, > but it introduces receiver side ISI, since the filter doesn't > get dumped at every symbol > peak. (APCO 25 expects an integrate and dump deemphasis > filter, this one just > integrates). > > 3. You may wish to use the FM detector PLL instead of the Quad > Demod block. You > can limit symbol peak frequency deviation using the Max Freq > and Min Freq parameters. > Currently, I have them set at +/-3 * 600 Hz * 190%. Leave the > loop bandwidth alone; > > it is set at symbol_rate/2 * 1.20 Hz = 2880 Hz, which is where > the transmitter Nyquist > > filter should cut off. > > > The signal you provided really does have a very poor SNR. The > attached low SNR > > png shows the best I could do with it. There are some of the > 4 levels visible in the chaos, > > but it's not good. I have attached a png from a high SNR test > signal for comparison. > > > So what you can do "outside" of GNURadio: > > > 1. Attach an external receiver bandpass filter for the 470 - > 512 MHz safety > > band to your radio. The only small, reasonably priced, off > the shelf ones I could find > are ceramic packages that are expected to be soldered to a > board. :( > > > 2. Set your gains on your SDR smartly to maximize your > receiver noise figure. > > Set the RF gain as high as you can without clipping the IF > stage, set the > > IF gain as high as you can without clipping the Base Band > stage. Set the Base > > Band gain as high as you can without clipping the ADC inputs. > > https://en.wikipedia.org/wiki/Friis_formulas_for_noise > "... the overall noise figure of a radio receiver is primarily > established by the noise figure of its first amplifying stage. > Subsequent stages have a diminishing effect on signal-to-noise > ratio. " > > > > Regards, > > Andy > > > > On Thu, Jan 12, 2017 at 12:00 PM, > <discuss-gnuradio-requ...@gnu.org> wrote: > Message: 6 > Date: Wed, 11 Jan 2017 21:56:51 -0500 > From: Luke Berndt > To: Marcus M?ller , GNURadio Discussion List > <discuss-gnuradio@gnu.org> > Subject: Re: [Discuss-gnuradio] Improve FSK4 decodes > in OP25 > > Thanks Marcus! I will try putting in a low pass in > first after the Quad demod. That BPF / Polyphase > Channelizer approach sounds pretty cool too! > > I have attached a GRC file that I use for debugging > and a link the raw dump from a File Sink. The sample > rate at the sink is 96k/s, the system channel rate is > 48k/s, with 10 samples per symbol. The FSK Level has > to be set to about 0.66. > > I am sure that some of the problem is that I don?t > have a great signal coming in, but if there is any > additional processing I could do to improve the > reception that would be great. > > > > Wav file > > https://www.dropbox.com/s/ncpz6wt8tubm2v3/32784-1484187802_4.90762e%2B08.wav?dl=0 > > <https://www.dropbox.com/s/ncpz6wt8tubm2v3/32784-1484187802_4.90762e+08.wav?dl=0> > > Raw capture from a file sink > > https://www.dropbox.com/s/810zj7pudc66yo3/32784-1484187802_4.90762e%2B08.raw?dl=0 > > <https://www.dropbox.com/s/810zj7pudc66yo3/32784-1484187802_4.90762e+08.raw?dl=0> > > > > > On Jan 11, 2017, at 12:12 PM, Marcus M?ller > <marcus.muel...@ettus.com> wrote: > > > > Hi Luke, > > > > you don't happen to have a waterfall plot or a raw > IQ recording? > > Quadrature demodulation isn't the most resilient to > noise. So, a low-pass filter that makes sure that > events that are sufficiently shorter than a symbol > after the Quadrature demodulator would sound wise. > Then again, I don't know the OP25 infrastructure > overly well, so chances are the FSK4 demod already > contains one. > > > > An alternative to your Quad FM demod would be a > four-bandpasses-based decider. An easy way to build > one is to either use four individual BPFs, or use one > set of filter taps in the Polyphase Channelizer (which > divides your f_sample_in stream into four > f_sample_in/4 -rate streams with channel centers). > Just use a filter that would select the "zeroth" > carrier. The magic of polyphase math will add three > f_sample_in/4-shifted versions (you might need to use > Rotator or similar to put the zeroth subcarrier at > f=0). I have a "playing with channelizers" flow graph > [1]. Advantage of the polyphase channelizer is that it > uses very little more ressources than a single > bandpass filter would ? basically, you get the three > additional filters for the cost of a short FFT. Yay! > > > > Cheers, > > > > Marcus > > > > [1] > https://gist.github.com/babffaa88f54a7fba9b52fc09bda0462 > <https://gist.github.com/babffaa88f54a7fba9b52fc09bda0462> > > > > On 01/11/2017 04:44 PM, Luke Berndt wrote: > >> I am using the C++ OP25 libs to capture and record > the P25 transmissions from a trunked radio system > ( https://github.com/robotastic/trunk-recorder > <https://github.com/robotastic/trunk-recorder> ). > >> > >> Transmission can either use 4-Level FSK or CPSK. I > am getting great decodes from a system using CPSK but > I am having a lot of trouble with a system using 4FSK. > >> > >> At a high level, here is my 4FSK flow graph > > (https://github.com/robotastic/trunk-recorder/blob/master/trunk-recorder/recorders/p25_recorder.cc > > <https://github.com/robotastic/trunk-recorder/blob/master/trunk-recorder/recorders/p25_recorder.cc>): > >> Xlating + LPF to roughly capture the channel > >> ARB Resampler to get the system sample rate > >> Quad FM Demod > >> Multiply Const - to get the right levels, -3 to 3 > >> FSK4 Demod - from OP25 > >> FSK4 Slicer - from OP25 > >> OP25 Decode > >> it then converts it to what is needed to record it > as a Wav file > >> > >> Are there some obvious blocks I should add in to > help condition the input better? I think the incoming > levels may not be constant. There also seems to be > occasional interference. Is there a block that will > discard values above a certain range? It would be > great to throw-away samples above 3.5 or below -3.5. > >> > >> Attached is a picture with what I think is an > example of the interference. > >> > >> Here is an example of a very clean recording: > > https://beta.openmhz.com/wmata?call-id=587652495833790100186198 > <https://beta.openmhz.com/wmata?call-id=587652495833790100186198> > >> > >> Here is an example of a bad decode: > > https://beta.openmhz.com/wmata?call-id=58765250583379010018619c > <https://beta.openmhz.com/wmata?call-id=58765250583379010018619c> > >> > >> Any tips would be greatly appreciated!! > >> > >> - Luke > > _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio