Need a compensation method/filter for a signal

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

Reply to
Atreides
Loading thread data ...

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

Reply to
Jerry Avins

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:

Reply to
Atreides

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

Reply to
Jerry Avins

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.

Reply to
AntiSPAM_g9u5dd43

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

Reply to
Atreides

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

Reply to
Jerry Avins

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

Reply to
Fred Marshall

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

Jerry

Reply to
Jerry Avins

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

Fred

Reply to
Fred Marshall

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.