Need a compensation method/filter for a signal

May 09, 2006 9 Replies

Hello,



I have a signal which contains some peaks in it. They are not noise peaks but rather like discontinious local maximums. I want to smooth this peaks out. I have tried to illustrate the problem with the following image:


formatting link
The black plot is the original and the green one is what I am trying to achieve. A simple smoothing is sufficient for me.



I have looked at lead-lag compensation and some other methods, but I am a bit lost. I would appreciate if somebody could suggest a filter or compensation method.



Thanks,



MDE



Are the peaks in frequency, or in time? If in time, they represent high frequencies. A simple low=pass filter will reduce their amplitude and broaden them a bit.

How does the signal arise?

Jerry

Hi Jerry,

The x axis shows time in the plot. The signal is produced by a piece of software and it is actually a number of functions concatenated one after another.

As far as I know a low pass filter will trim the peaks, therefore the signal will not be continious then. Do I understand correctly ? Here is what I understand:

That picture would be produced by a limiter, a circuit that removes high amplitudes. A low-pass filter reduces high frequencies, thereby softening abrupt transitions and slopes in general.

You mentioned looking into a lead-lag network. A simple lag network is a low-pass filter. It acts like an integrator above some frequency that depends on the design.

Jerry

Any linear filter used on a realtime signal is going to have a phase lag if it is causal, so you won't be able to maintain the same "peak point" as the original filter with a linear filter, in real-time.

That said, if your data is already sampled, you can filter it forward and backward to maintain the same peak point.

Ok. Thanks again for the clarification.

Since the incoming signal is coming from a software (so it is sampled), I assume this is what the literatur call data in time domain. I understand that I have to work in the frequency domain. Would a FFT help me to move to freq. domain so that I could apply a low pass filter ?

Thanks in advance,

MDE

You can low-pass filter in time domain. (All analog filters are do.)

formatting link
and
formatting link
will introduce you to time-domain filters. A very simple filter will probably serrve the purpose you described. If x[n] are inputs and y[n] outputs -- n = 0, 1,

2, ... -- then a simple wxponental decaying averager is

y[n] = a*x[n] + (1-a)*y[n-1], 0 < a

I'm sorry to jump in so late. It occurs to me that your original picture/plot hopes to preserve the peak values and soften the transition around them. I don't think that's possible with linear filtering - no matter which domain you do the processing in.

A lowpass filter will reduce the peak values because they are "sharp" and sharpness goes along with high frequency content. Remove the high frequencies and remove the sharpness, thus the peaks. Instead of your original plot, you will get a filter output that (roughly) rounds the peaks

*inside* the original more like this:

/\ / \ / \ / \ / ----\ \ /--- \ \ -- \ \ / --- / \ / \

--/ ----

Fred

Inside? I guess that inherent delay will put the falling edge outside the original pulse.

Jerry

You're likely correct Jerry. This was a macro view.

Fred

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required