Path: utzoo!attcan!uunet!zaphod.mps.ohio-state.edu!usc!ucsd!ucbvax!pasteur!bennett.berkeley.edu!parks From: parks@bennett.berkeley.edu (Tom Parks) Newsgroups: comp.dsp Subject: Re: Creating Samples by stuffing & filtering Message-ID: <8563@pasteur.Berkeley.EDU> Date: 6 Nov 90 17:23:27 GMT References: <16311@netcom.UUCP> Sender: news@pasteur.Berkeley.EDU Reply-To: parks@bennett.berkeley.edu (Tom Parks) Organization: University of California, Berkeley Lines: 31 In article <16311@netcom.UUCP>, mcmahan@netcom.UUCP (Dave Mc Mahan) writes: > The Problem: > > I have been given a task of smoothing an ECG (electro-cardiogram) signal that > needs to be sent to a strip chart recorder. [stuff deleted] > What I have done: > > To create more samples, I assumed that I could just read in one sample, > duplicate it to the output the desired number of times for the proper > expansion factor (currently, an expansion factor of 4 samples out for each > sample in seems to be about right) and then pass the expanded data through > a digital filter to low pass filter it and smooth the final output. Instead of duplicating the samples, insert zeros between the samples. This way your low pass filter can be flat in the pass band, instead of needing to compensate for the bowing introduced by duplicating samples. (Duplicating samples is equivalent to passing your signal through a system that has a rectangular pulse for its impulse response. The Fourier transform of a rectangular pulse is sinc-like.) Also, this means that many of the samples you are filtering will be zero, and multiplication by zero can be done very quickly, in zero time in fact. Tom Parks Electronics Research Laboratory University of California, Berkeley ---------------------------------- Life is a sexually transmitted disease.