next up previous contents
Next: Other ways of filtering: Up: Filters Previous: Filtering neurophysiological signals   Contents

Correcting distortions

But we are not only interested in frequencies. We want the filtered signal to maintain the form but filtering can modify the form of the signal because it modifies the phase in different ways depending on the frequency. If we were going to measure a peak latency we would like that the filter did not introduce modifications. Let's superimpose the original and the filtered signals with the next code.


-->plot2d(t(1:500),base(1:500),1,"011"," ",[0,-1500,5,1500])  
 
-->plot2d(t(1:500),resul1(1:500),1,"011"," ",[0,-1500,5,1500])

The result is not perfect. Although the signal has been low filtered, there is some distortion in form. It has appeared some delay that can be different for each frequency.

Figure 10.5: Superimposition of `base' and `resul1'. Notice that some delay and distortion appear.
\begin{figure}
\epsfbox{figures/filtexe2.eps}
\end{figure}

Since the distortion comes from the modification introduced in phase,we can eliminate it by filtering the result from the end to the beginning. The process is somewhat difficult. The first step is to invert the result. Then we filter the signal with the same filter (the amplitudes will not be very grossly modified since the signal has been previously filtered, but the modification in phase introduced by the filter will be compensated). Finally we invert the signal. In summary,to correct distortions in phase, we filter the data forward and then backward (with the same filter).

 
-->step1 = resul1($:-1:1);             // inversion
 
-->step2 = flts(step1,lisys1);         // new filtering
 
-->final = step2($:-1:1);              // new inversion
 
-->plot2d(t(1:500),base(1:500),1,"011"," ",[0,-1500,5,1500])
 
-->plot2d(t(1:500),final(1:500),1,"011"," ",[0,-1500,5,1500])
 
-->plot2d(t(1:500),final(1:500)-800,1,"011"," ",[0,-1500,5,1500])

The result has been shown in the following figure (superimposed with the original signal and isolated with a displacement in amplitude). We can see that high frequencies have been eliminated but the form remains unchanged. We could measure latencies in the filtered signal without introducing bias.

Figure 10.6: Superimposition of `base' and `final'. By filtering forward and then backward, the delay and the distortions have been corrected.
\begin{figure}
\epsfbox{figures/filtexe3.eps}
\end{figure}


next up previous contents
Next: Other ways of filtering: Up: Filters Previous: Filtering neurophysiological signals   Contents
je 2006-10-13