Hi guys, I'm reading the code of Airprobe and I found this function.
double gsm_receiver_cf::compute_freq_offset(const gr_complex * input, unsigned first_sample, unsigned last_sample) { double phase_sum = 0; unsigned ii; for (ii = first_sample; ii < last_sample; ii++) { double phase_diff = compute_phase_diff(input[ii], input[ii-1]) - (M_PI / 2) / d_OSR; phase_sum += phase_diff; } double phase_offset = phase_sum / (last_sample - first_sample); double freq_offset = phase_offset * 1625000.0 / (12.0 * M_PI); return freq_offset; } It calculates the frequency offset with "freq_offset = phase_offset * 1625000.0 / (12.0 * M_PI);" I guess the (1625000.0/12*pi) equals (1625000/6)/(2pi) and 1625/6 kbit/s is the modulation rate of GSM. So, what is the principle of this calculation? How to calculate the freq_offset with phase_offset. I tried some derivation but failed. Can anyone help me to find out the derivation ? Best wishes, Zhenhua 2014-03-04 9:28 GMT+08:00 zhenhua han <hzhua...@gmail.com>: > Hi Perper, > > I took a look at your code, and I found this > > //set_frequency(d_freq_offset); > > It seems you have turned off the the frequency offset correction as you > said. > Do you know the reason of the introduced instability by this part? > > Best, > Zhenhua > > 2014-03-04 1:42 GMT+08:00 Perper <per...@o2.pl>: > > W dniu 28.02.2014 15:31, zhenhua han pisze: >> > Hi, >> > >> > As I have known, GSM uses GMSK modulation which BT = 0.3 and it >> > uses Viterbi algorithm for demodulation. And I took a look at the code >> > of GMSK demod code in GNU Radio, it use quadrature_demod but not >> > Viterbi as demodulation method. So which one is better in doing >> > demodulating GMSK? >> > >> > Moreover, GSM uses Viterbi algorithm to decode the convolution >> > encoding. Would it be possible to use quadrature_demod to demodulate >> > GSM signal instead of Viterbi? What about the convolution decoding >> > part (maybe by some other method)? >> > >> > Cheers, >> > Zhenhua >> > >> > >> > _______________________________________________ >> > Discuss-gnuradio mailing list >> > Discuss-gnuradio@gnu.org >> > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio >> Hello all, >> >> Regarding usage of viterbi algorithm for maximum likelihood sequence >> estimation in GSM - you may look at and try gsm-receiver that I once >> submitted to airprobe. I've prepared version where I thrown out all of >> decoding stuff and left only synchronization, channel estimation and >> detection of bits with viterbi algorithm. It's available for download in >> here: >> https://github.com/Jakotako/gr-gsm >> >> It compiles with newest gnu-radio and it has gnuradio companion xml file >> as well. It can be easily connected to different sources in gnuradio >> (file, rtl-sdr, usrp) and it has a message sink where burst bits and >> gsmtap headers are sent. I've corrected some issues with synchronization >> and turned off frequency offset correction that introduced instability >> of the receiver. After compiling and installing you can start with >> examples. >> >> -- >> Best Regards, >> Piotr Krysik >> >> _______________________________________________ >> Discuss-gnuradio mailing list >> Discuss-gnuradio@gnu.org >> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio >> > >
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio