time domain synchronized averaging is the most suitable for this kind of signal(I mean of course the ECG signal)
but to do so we have to create our trigger signal which we can assume simply to be zeros every where and one at the place of the peak(the top part of the R signal)
Now because we have the two signals we can use TSA Easily by simply divide the beats signal into periods of time corresponding to the trigger signal.
the next step is normalizing the small signals resulting from the first step so that they all have the same time period(compress long signal and stretch short signal so that all the signals has the same time frame)
now for the averaging step simply add the signals by adding every point to the points corresponding to the same time in the other beats signals and finally dividing by the number of the small beats signals you have your time domain averaged signal...
of course you can try low-pass filters on this signal but it will need more experience in filtering than using TSA.
Simple algorithm:
1-your signal will be y(t) where t is the time vector and y is the ECG reading
2-your trigger will be pulse(t) which is zeros every where except for the maximum R peak.
3-the number of beats at your signal is n
4-use the trigger to divide the time vector into t1, t2,.......tn vectors
5-use the trigger to divide y(t) to y1(t1), y2(t2),.........yn(tn) signals.
6-Normalize the signal in the time axis direction so that all the signals will be represented in the same period tp: y1(tp), y2(tp),.....yn(tp)
7-your averaged signal will equal y_av(tp)=(y1(tp)+y2(tp)+......+yn(tp))/n
8-Now you have your averaged signal that is more smother than any of the beats and also more representative.
---------- Post added at 21:20 ---------- Previous post was at 21:16 ----------
Those are also images that may help visualize the algorithm while reading the steps:
**broken link removed**
Also I must say that there is a lot more in ECG filtering than just that but I'm trying to simplify things.
I'm using TSA now in vibration analysis which clearly states that it's a general method and can be used in many fields and off course there might be a methods that is specialized in ECG filtering that I don't know about or just know the main Idea with no experince