Interference compensating circuit including a matched filter followed by a median filter
The present invention relates to a circuit arrangement for reducing the adverse effects of an interference signal on a data signal. 
     BACKGROUND OF THE INVENTION 
     The term data signal is intended to mean any signal carrying data or information, including telecommunications data. 
     A matched filter is used to detect a signal e.g. in telecommunications. The impulse response of a realizable matched filter is a signal, which is scaled, delayed and inverted in time. At the output of the filter matched to the signal we obtain the maximum level when the signal is completely received. 
     The output waveform of the filter is proportional to the autocorrelation function of the signal itself. In an Additive Gaussian White Noise (AGWN) channel the matched filter maximizes the momentary signal to noise ratio and minimizes the error probability of the transmission system. If also interference is added to the signal in the transmission channel the receiver will not anymore operate in an optimal way, and the performance will be reduced. 
     A matched filter is also used in spread spectrum telecommunication systems. Then it can be used for the detection of a data signal and also i.e. in the search phase for the code synchronization of the receiver, so that the filter impulse response is a time inverted, scaled and delayed version of the distribution code or part of it. 
     The prior art is described below with reference to FIGS. 1 to 3 of the accompanying drawings, in which: 
     FIG. 1 shows a code synchronization system, selected as an example, in accordance with the prior art; 
     FIG. 2 shows the output signal of the prior art matched filter in FIG. 1; and 
     FIG. 3 shows the signal provided by the threshold comparison block. 
     FIG. 1 shows a prior art code synchronization system. The code synchronization system comprises a filter 1 matched to the spreading code, a threshold comparison means 2, and means 3 for activation of the monitoring. 
     The maximum value is obtained at the filter 1 output when the spreading code or a part of it is received, and it can synchronize the code generator or the receiver after the threshold comparison. 
     FIG. 2 shows the output signal of a prior art matched filter in an exemplary case. The exemplary case is ideal and the code contains L chips and the chip period is T seconds. The output signal 4 is now an ideal autocorrelation function containing impulses having a height of L times the level of the received signal, the repeating period being the code length L×T seconds. 
     FIG. 3 shows the signal provided by the threshold comparison block. The signal 5 of the threshold comparison block 2 has the value &#34;1&#34; when the output signal 4 of the matched filter exceeds the threshold level. 
     For example a deterministic error could be disastrous, because remnants of the interference could be evident at the output of the filter 1. Then the synchronization ability decreases, preferably if the code&#39;s autocorrelation function form is not ideal and contains side lobes, which in combination with the interference response could cause the threshold level to be exceeded. The matched filter 1 certainly attenuates the interference, but for instance the attenuation of a continuous interference at the center frequency of the filter decreases when the imbalance of the spreading code increases, or in a binary case, when the difference between the number of ones and zeroes increases. 
     Usually we try to remove the interference by different attenuation or correction algorithms. These methods are often complicated and require computing time in order to estimate the characteristics of the interference or the state of the channel. 
     SUMMARY OF THE INVENTION 
     According to the present invention there is provided a circuit arrangement for reducing the adverse effects of an interference signal on a data signal, the circuit arrangement comprising a matched filter characterized in that the output of the matched filter is coupled to a median filter to compensate for rapid changes in the data signal, and the output of the median filter is coupled to a calculation circuit in which a signal characteristic of the interference signal at the output of the matched filter is determined such that the data signal may be compensated for the effect of the interference signal. 
     An advantage of the present invention is the provision of a circuit arrangement which will address the above presented disadvantages and problems. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     Embodiments of the present invention are described, by way of example, with reference to FIGS. 4 to 7 of the accompanying drawings, in which: 
     FIG. 4 shows the median filtered output signal of the matched filter in principle; 
     FIG. 5 shows the block diagram of a circuit arrangement, in accordance with the invention; 
     FIG. 6 shows a block diagram of an alternative circuit arrangement, in accordance with the invention; and 
     FIG. 7 shows the block diagram of another alternative circuit arrangement, in accordance with the invention. 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     It is well known that rapid changes or impulses can be removed from a signal with a median filter, which is illustrated in FIG. 4 where the output signal of a matched filter is fictitiously median filtered. In median filtering the signal or samples taken of it are processed so that a median (MED) is calculated for each 2k+1 samples, in which k is an integer. Then the output signal 6 of the median filter is 
     
         y(n)=MED[x(n-k), x(n-k+1), . . . , x(n), . . . , x(n+k)]. 
    
     x(n) is an input signal, in which the integer n represents the sampling moment as multiples of the sampling interval. 
     The solution in accordance with the invention presents a different circuit arrangement to estimate and to remove the interference with the aid of a median filter. An advantage of the circuit arrangement in accordance with the invention is based on the impulse nature of the output signal of the matched filter. 
     FIG. 5 shows a block diagram of an embodiment of the circuit arrangement in accordance with the invention. The circuit arrangement comprises a filter 7 matched to the signal, a delay element 8, a median filter 9 and an adder 10, followed by a threshold comparison 11. In a traditional case samples are taken at the output of the matched filter 7, and they are compared to a threshold level in the threshold comparator 11, after which the presence of a signal is determined. Particularly, when there occurs a deterministic error it is possible that the base level of the samples between the impulse peaks exceeds the threshold, whereby erroneous decisions could be made continuously. 
     In the circuit arrangement the signal or the samples obtained from the matched filter 7 are median filtered in the median filter 9 so that the median of 2k+1 samples is calculated 
     
         y(n)=MED[x(n-k), x(n-k+1) , . . . , x(n), . . . , x(n+k)]. 
    
     At the same time samples obtained at the output of the matched filter 7 are delayed by k samples in the delay means 8, after which the difference between the delayed signal and the sample sequence provided by the median filter 9 is calculated in the adding means 10. Only then the difference signal is compared with the threshold level in the comparison means 11. 
     Here the circuit arrangement has an advantage that the offset from the base level, caused by the interference, can be removed from the signal and at the same time we obtain information about the interference. The median filter 9 is basically of a low-pass type. The calculation of the difference signal corresponds to a high-pass type processing in order to remove the interference, the processing being based on the impulse-like nature of the actual useful signal. 
     FIG. 6 shows the block diagram of an alternative solution of the circuit arrangement in accordance with the invention. In the alternative circuit arrangement the signal or the samples obtained from the filter 7 are median filtered in the median filter 9 so that the median of 2k+1 samples is calculated. The threshold calculation block 12 uses the output of the median filter 9 in determining a threshold for a decision circuit 13. At the same time the samples obtained at the output of the matched filter 7 are delayed by k samples in the delay means 8, after which the delayed signal is supplied to the decision circuit 13. In the decision circle 13 the output signal is determined on the basis of the basic data. 
     FIG. 7 shows the block diagram of another alternative solution of the circuit arrangement in accordance with the invention. In the second alternative solution the signal or samples obtained from the matched filter 7 are median filtered in the median filter 9 so that the median of 2k+1 samples is calculated. The obtained signal is supplied to the calculation circuit 14, which calculates the output signal based solely on the output of the median filter 9, and without considering also the signal that is output from the matched filter 7. The output of the median filter 9 is then employed as desired by the calculation circuit 14. 
     In view of the foregoing it will be clear to a person skilled in the art that modifications may be incorporated without departing from the scope of the present invention.