AnsweredAssumed Answered

Received signal "trigger"

Question asked by Daniel_Camara on Aug 19, 2015
Latest reply on Aug 25, 2015 by Daniel_Camara

Hi people,


  Today's state:

   I am receiving the data in a FMCOMMS4 as a stream. To detect my data, and to be sure I will treat only the sent data, I implemented an infinite pulse filter (Infinite impulse response - Wikipedia, the free encyclopedia) that gets all the received stream and tries to detect an increase in the power of the received signal. Great, it works quite well, but I need to put the RX gain in manual and set to a "reasonable"  value  (for now I am setting by hand in a try/error manner). The way I implemented (I don't know if there is another better way), my filter does not work at all with the automatic gain control (I attached the code below). The automatic gain it keeps increasing and decreasing the gain searching for a signal, and my filter starts to recognize noise as signal whenever the automatic gain increases enough the gain to try to search for a signal. Well, at least it is as I understand what is going on.


  I was wondering if there is a way to do it differently, hopefully a smarter way and not using the filter to detect a transmission. Or at least base the filter in something that is automatically managed by the board e.g RSSI. 


  - For example, there is a way to implement, with the driver, a kind of trigger so that I will receive the data only if it is above a given RSSI.  I don't know if I can use, reliably, the RSSI to detect the packets, if so I could use it instead the  historic average I am getting with my filter I could ignore my filter and maybe use the automatic control of gain.


   Other idea, I don' t know if it is possible/does what I need, Is there a way to set the board RX filters in such a way that I would get only valid signal, and the average noise would be ignored?!


   I looked into the board settings at (AD9361 Device Driver Customization [Analog Devices Wiki] and but honestly I feel incompetent to understand EVERYTHING that is there and see if I can implement this. Any directions would be welcomed



Just for the information, the filter code (FII_WEIGHT is a small value between 0 and 1, and the input i and q are all the values received

in the rx buffer, at least until the output of this sequence tells us we received something that is much higher than the history).

 * Inifinite impulse filter.
 * Sums up the square of I and Q, and adds up to a historic sequence.
 * Returns the percentage the value is bigger than the present
 * value of the sequence.
 * Only for statistical purposes it also stores the historic
 * maximum value of the received signal
double iirFilter(int16_t i, int16_t q) {
    uint32_t squareMean = (pow(i, 2) + pow(q, 2)) / 2;
    iirFilter_value = (FII_WEIGHT * (double) squareMean)
            + ((1.0 - FII_WEIGHT) * iirFilter_value);

    if (squareMean > maxMean) {
        maxMean = squareMean;
        printf("Max square Mean = %d : iirFilter=%f\n", maxMean, iirFilter_value);
    //Returns the ratio between this value and the historic sequence
    return squareMean / ((double) iirFilter_value);


  Best regards...