enter image description hereI'm transmitting RF packets with frequency 868MHZ , symbol rate (it's the same as bit rate) is 50KBaud , and Im sampling them by a dongle (fs=20480KHZ) to capture those RF packets, the captured samples are IQ RAW DATA and I save them into a file , by matlab Im using this file and plot all the captured data(packets), I see the RF packets as peaks where there's packet found, otherwise noise.

I have built demodulator which the output of its values ranges between 1 and -1 , so I have arrived to a file that has values that ranges between 1 and -1 , this demodulated IQ samples I want to convert them to binary 0 or 1 , so Im trying to build encoder in Matlab code by using LPF , how could I do that? for more clarification I want to input to my LPF the demodulated IQ samples and then the output would be something like:

enter image description here

I want this because if I have the output of LPF then I can walk through that output and decide where I have "zero-Crossing" this means when there's a step (zero-crossing) then the value would be changed from zero to 1 or 1 to zero (depend on the value what was before) ,

how can I do that? the cutoff frequency of my LPF must be my bit rate frequency right? how can I also do LPF in matlab? thanks alot !!!!

second question, lets assume I have the output of my LPF , then how can I walk through the output in order to decide zero/one (deciding zero crossing-high to low or low to high-), this part called FLOW ESTIMATION , how can I do that?

  • $\begingroup$ any help guys?? $\endgroup$
    – LiamLony
    Jun 22 '20 at 20:50
  • $\begingroup$ What's the question here? You want to convert an output that takes values in between 1 and -1 to correspond to either a 0 or 1? $\endgroup$ Jun 23 '20 at 3:00
  • $\begingroup$ By the way which dongle are you using? $\endgroup$ Jun 23 '20 at 3:00
  • $\begingroup$ yes ! convert the output that takes values between 1 -1 to correspond to either 0 or 1 , using rtl sdr.dongle $\endgroup$
    – LiamLony
    Jun 23 '20 at 9:03

If the constellation at the tarsmitter is symmetric about 0 on the real line then you can simply threshold the output between -1 and +1 with 0 as the threshold. So anything above zero is a logical 1 and everything below zero is a logical 0.

This detection is rule is optimal when the noise is additive.

  • $\begingroup$ I understand you , but the problem that the data are probabilistic, this means that between the change from 1 to -1 in the demodulated vector would be values that ranges between 1 and -1 , so I'm looking for an optimal way for making the conversion from the demodulated vector to zero and 1(choosing threshold isn't good-not optimal) , my SNR isn't high .. $\endgroup$
    – LiamLony
    Jun 23 '20 at 11:09
  • $\begingroup$ I could do rounding to the values that are found on the "switch" between 1 and -1 , but rounding will not help me .. need optimal way, so I chose LPF method .. for detecting zero-crossing $\endgroup$
    – LiamLony
    Jun 23 '20 at 11:18
  • $\begingroup$ So if I understand, you have sampled a signal, where each sample is used to determine whether a 0(corresponding to -1) or 1(corresponding to +1) was transmitted, so in this case if a sample is 0 is transmitted and received sample is -0.563 then map it to logical 0, if the sample value is +0.126 then it's logical 1. However if you have multiple samples corresponding to a single symbol, then you can choose the last sample corresponding to the symbol $\endgroup$ Jun 23 '20 at 11:22
  • $\begingroup$ Yup you got me, 1 is logically 1 , -1 is logically 0 . I understand you but how do you know that when 0 is transmitted then the recieved sample is -0.563? maybe it's -0.7? maybe -0.2? my problem actually is mapping the vector of values that I sampled which they range between 1 and -1 to 1 and 0 .. $\endgroup$
    – LiamLony
    Jun 23 '20 at 11:26
  • $\begingroup$ This is exactly the whole problem statement of a field called detection theory. In short, suppose I transmitted -1 and due to noise it shifted to let's say -0.1.the Receiver knows that the ttansitter transmits either a +1 or -1 with equal probability and the reception gets corrupted by additive gaussian noise. In this case we try to formulate a rule the "minimizes the probability of error", this is given by the log likelihood ratio, and turns out that fir this problem it will be a simple rule which gives a threshold of 0. Anything above that is a 1 and below that is a 0. $\endgroup$ Jun 23 '20 at 11:32

Not the answer you're looking for? Browse other questions tagged or ask your own question.