2022-08-21T22:50:40.000-0400

Simcenter SCADAS
Simcenter Testlab

Consider the images processed with different filters in *Figure 1*:

[https://www.researchgate.net/figure/Actual-model-b-Observation-data-c-Deconvolution-results-showing-ringing-artifacts-d_fig3_306341631]

Do you prefer the ringing-middle image or the smooth-right one? And why not the left one already?

Contents:

*1. Motivation*

2. Image Processing Analogy

3. Time is Real; Frequency is Not

4. Why You Need an Acquisition Filter

4.1 Nyquist-Shannon

4.2 Signal is Bandlimited; Input is Not

5. Why You Should Care About Your Acquisition FIlter

5.1 Choose Your Filter Right

5.2 Type and Order

5.3 Phase as Linear as Possible

5.4 Magnitude: Ideal for Frequency Might not be for Time

5.4.1 Cause of Overshoot

5.4.2 Signal Overshoot is not Gibbs

5.4.3 Sharpness versus Smoothness

6. I Don't Measure Square Waves, What About my Actual Signal?

6.1 Overshoot in My Actual Signal

6.2 Reducing Overshoot

6.2.1 Using a Linear Phase Filter

6.2.2 Using a Smooth Filter

7. Conclusion

**1. Motivation**

The middle and right images were filtered and contain less information than the original. Someone even told me Gibbs appears in the middle one. Who you gonna call? That’s my immediate answer to that. But things don’t spontaneously appear; they have physical causes, although the Universe doesn’t care if we understand them. I do care, and I’ll elaborate for you.

Contents:

2. Image Processing Analogy

3. Time is Real; Frequency is Not

4. Why You Need an Acquisition Filter

4.1 Nyquist-Shannon

4.2 Signal is Bandlimited; Input is Not

5. Why You Should Care About Your Acquisition FIlter

5.1 Choose Your Filter Right

5.2 Type and Order

5.3 Phase as Linear as Possible

5.4 Magnitude: Ideal for Frequency Might not be for Time

5.4.1 Cause of Overshoot

5.4.2 Signal Overshoot is not Gibbs

5.4.3 Sharpness versus Smoothness

6. I Don't Measure Square Waves, What About my Actual Signal?

6.1 Overshoot in My Actual Signal

6.2 Reducing Overshoot

6.2.1 Using a Linear Phase Filter

6.2.2 Using a Smooth Filter

7. Conclusion

The middle and right images were filtered and contain less information than the original. Someone even told me Gibbs appears in the middle one. Who you gonna call? That’s my immediate answer to that. But things don’t spontaneously appear; they have physical causes, although the Universe doesn’t care if we understand them. I do care, and I’ll elaborate for you.

Do you also recognize those ringing artifacts (

We are not talking about time ghosts; we are talking about filters! If words like “Bessel” aren’t unknown to you; if you are aware of what filter type you are using, you probably care about the time domain.

Translating our case to images, considering a black and white image, we would have a 3D “time” (or spatial) signal, instead of our typical 2D time plot. Anyway, our 2D understanding can practically be applied following similar reasoning: We would have 2x "time" or spatial axis (x,y axis) making a plane (image). The voltage or amplitude (z axis) would be the intensity of color (white), rendering our 0V to black, and the gray scale all the way up to our max range, up to the white color. A sudden color transition, like in the images, represents a transient in the amplitude, so high frequency components in the image's FFT.

If we want to edit the left image and take out high frequency components (sudden changes in color), an overshooting filter will ring the colors near the transitions (

In classic frequency domain analysis, you brought your reality (time data) to the world of ideas (frequency data), and you analyzed it there, without much of a worry. You knew your bandwidth of interest, you complied with Nyquist-Shannon, and the story ended, everybody happy.

However, in your shock and break testing, road load data and durability processing, and even electric vehicle battery pyro fuse short testing, the signal time shape also matters. Nobody warned you: how to get rid of those weird, annoying, and potentially clipping amplitude inaccuracies and overshoots (

You want to get your time measurements just right: Good enough isn’t an option! Statistics, peaks, times at level, level crossings, range pairs, rain flows, and your logical triggers all depend on the time data (*Figure 4*).

Just small changes in the amplitude can change fatigue life estimates drastically. See this knowledge article for more information: What is a SN-Curve?.

The information of an analog signal is contained in its bandwidth, aka its frequency content (both in magnitude and phase). Most of our (practical) analog signals have a bandwidth between 0 Hertz and some frequency (aka bandwidth of interest). This is important especially if we are going to sample our signal and convert it to digital data.

Following Nyquist-Shannon sampling theorem and its hypotheses, if your -equidistant- digital data is acquired with a sample rate higher than the double of the signal bandwidth, all the information of your original analog signal will be correctly digitized/encoded, and even perfectly reconstructed if necessary.

If the analog signal bandwidth is below of half of the sample rate (aka Nyquist frequency), then no artifacts are possible, end of story… But wait, do we always have means to set Nyquist as high as we want? Do we have the luxury to assume that the input signal we want to measure was bandlimited in the first place? And was it free of unexpected noise, that at same time may have had contents beyond its bandwidth? And even beyond Nyquist, folding then back as alias content (

Think about our input signal as a combination of actual expected signal and undesired noise. Acquisition low pass filters (from now on, just filters) are then needed, whether to mold your input signal into a smaller bandwidth, or more importantly, to get rid of noise and alias.

Both for frequency and time domains, you can do two things:

- Set your measurement bandwidth right in the first place, or
- Choose your acquisition filter type wisely.

First option is impossible to predict because some information of your original input (signal + noise) may fall anyway out of your bandwidth, and so get filtered. We should then focus on the second choice, especially when talking about time domain: depending on the filter type used, overshoot might appear more, less, or not at all.

**5.1 Choose Your Filter Right**

Your measurement bandwidth is already defined by the filter passband, or cut-off frequency (Fco), generally at -3dB (*Figure 6*). Further, implementable filters aren’t ideal:

Your measurement bandwidth is already defined by the filter passband, or cut-off frequency (Fco), generally at -3dB (

- They won’t totally stop or totally let frequency components pass
- They will delay frequency components differently
- They need space between cut-off frequency (Fco) and stopband (i.e. transition band can’t be 0)
- Their behavior will further deviate from expectation depending on their implementation (analog, digital (FIR, IIR), etc.)

The transfer function of a filter is basically characterized by filter type and order

**Type**defines its shape and phase response in passband, transition band and stopband. There are some well-known classical filter types, most of them originating as analog versions like Butterworth, Bessel, Chebyshev, Elliptic, etc as shown in*Figure 7*. All of them optimize certain figures, at the price of compromising others.

**Order**(or number of poles) sizes its buffer (i.e. energy storing devices contributing to the process delay, like capacitors for analog filters, or memory vectors for digital filters), and it will account for the roll-off (or steepness) and help to minimize the transition band (*Figure 8*), in compromise with filter complexity and process delay.

More about filters in the knowledge article: Introduction to Filters: FIR versus IIR

**5.3 Phase as Linear as Possible**

Classical analog and digital IIR filters have non-linear phase responses (*Figure 9*) because they are intrinsically causal. Each signal frequency component won’t propagate through the filter with the same delay.

Classical analog and digital IIR filters have non-linear phase responses (

It’s always an undesirable artifact of a filter, although these filters exist since years (specially the analog ones of course), so their behavior is well known. Furthermore, IIR filters are easy to design, cheap, simple, and very performant, if we are ready to pay the price of non-linearity in their phase responses. In the time domain, this produces scattering (or asymmetries).

Phase linearity in passband, means group delay (proportional to the derivative of phase) as constant as possible, ensures minimal shape distortion and helps distributing overshoot, if any, before and after transients.

In general, increasing filter order reduces phase linearity (*Figure 10*).

Phase linearity in passband, means group delay (proportional to the derivative of phase) as constant as possible, ensures minimal shape distortion and helps distributing overshoot, if any, before and after transients.

In general, increasing filter order reduces phase linearity (

But there are exceptions where phase linearity improves with filter order, like Bessel and transitional filters like Gaussian.

Finally, only a subset of synthesized digital Finite Impulse Response (FIR) filters can have exactly linear phase transfer functions. So, if you can have the luxury to choose for those, go for it. I do already with my Simcenter SCADAS hardware, with both sharp and smooth linear filters choices.

**5.4 Magnitude: Ideal for Frequency Might not be for Time**

If we can’t accommodate our measurement bandwidth to our signal frequency content, we will lose information after filtering. You want the best filtered version for time analysis (smooth in time), which is not the best version for frequency analysis (overshooting in time). Differences between some filter types and their orders are shown in*Figure 11*.

Finally, only a subset of synthesized digital Finite Impulse Response (FIR) filters can have exactly linear phase transfer functions. So, if you can have the luxury to choose for those, go for it. I do already with my Simcenter SCADAS hardware, with both sharp and smooth linear filters choices.

If we can’t accommodate our measurement bandwidth to our signal frequency content, we will lose information after filtering. You want the best filtered version for time analysis (smooth in time), which is not the best version for frequency analysis (overshooting in time). Differences between some filter types and their orders are shown in

Good news is that if we can choose the acquisition filter like we do with Simcenter SCADAS hardware, we can tune how this impacts our measurement, especially in time domain when overshoot comes into play.

Overshoot is a product of a sharp filter transfer function magnitude, when there is frequency content falling into the stopband as shown in

There is an actual need to store stopband energy in the filter itself, and it may be abruptly released and overlapped later into the passband. As a rule of thumb:

- The sharper the filter, the larger the overshoot amplitude
- The higher the order, the longer its duration

I’ve seen that The Gibbs Phenomenon is commonly confused with data acquisition artifacts, like overshoot. Although the result resembles in both cases a ringing artifact, while overshoot may (or not) be produced after filtering a signal, Gibbs phenomenon always appears after approximating a discontinuous function with a finite set of its Fourier Series (

Overshoot is a physical product of a filter, Gibbs is a mathematical consequence of a suboptimal approximation exercise.

If we can’t guarantee that our signal frequency content doesn’t go beyond our measurement bandwidth, sharpness is desired for frequency domain transition band, allowing more efficient usage of our measurement bandwidth given a sample rate. On the other hand, smoothness is better for time domain, allowing smoother energy release; thus, overshoot is minimized and eventually avoided. Sharpness depends only on filter type. Smooth and sharp filters are shown in

To achieve better stopband attenuation figures using a smooth anti-aliasing filter, we should have an extra care to use higher sample rates so that Nyquist frequency gets pushed safely above cut-off frequency (Fco).

The time domain differences and frequency domain differences between sharp and smooth filters is shown in*Figure 15*.

The time domain differences and frequency domain differences between sharp and smooth filters is shown in

A sharp filter (elliptic) has a narrow transition band in the frequency domain. However, the sharp filter results in overshoots in the time domain. A smooth filter (Bessel) has no overshoot in the time domain, but has a more gradual attenuation performance in the frequency domain relative to the sharp, elliptic filter.

**6. I Don't Measure Square Waves, What About my Actual Signal?**

Let’s look for a high frequency component measurement example, like this pyrotechnic events audio in CD quality (sample rate 44.1kHz) as shown in*Figure 16*.

Let’s look for a high frequency component measurement example, like this pyrotechnic events audio in CD quality (sample rate 44.1kHz) as shown in

If we needed a reduced version of this original input signal because for example, amongst others:

- We are not interested in higher frequencies, that at same time may contain noise, or
- We don’t have possibility to sample high enough, or
- We needed to align our sample rate to a grid that doesn't allow a measurement bandwidth big enough for our original signal, or
- We didn’t expect signal frequency content to extend further than our predefined measurement BW

We will need to filter out some high frequency components of it. We will be then tempted to use the commonly expected ideal filter: a sharp one. For this example, we will be using a moderately sharp filter like Butterworth, and a 14th order version of it to enable an important roll-off.

Let’s suppose in this example we are interested in a target bandwidth of 11kHz. In time, our common sense might accept that the filtered version (green) reaches lower amplitude values, but if we look closely, this isn’t always the case: there’s overshoot in the filtered signal (

Furthermore, we can remark the delay of the filtered signal. It’s not possible to exactly correct for it, because the filter isn’t linear.

We may want to improve the result. We know already that if there’s overshoot at the output, filter sharpness is the only reason for it. So it wouldn’t be a surprise that trying both educing filter roll-off (by using a lower order), or increasing our bandwidth (seting cut-off frequency higher), would essentially not free our result from overshoot. Both roll-off and cut-off frequency do not play a practical role in filter sharpness: Only filter type does.

We know that a sharp filter like Butterworth won’t free our signal from overshoot, but if it had a linear phase response, overshoot could at least spread before and after quick transitions as shown in

Thanks to the filter and processing offer of our Simcenter hardware and software solutions, we can try the linear phase version of our Butterworth (called “Zero phase” in Simcenter Testlab), and even correct for the delay on-the-fly.

This is what we should go for: using a smooth filter. For example a Bessel at our target bandwidth of 11kHz as shown in

Using a smooth Bessel filter, the filtered signal does not exceed the amplitude of the original signal.

The images (

If you want to be safe of time ghosts, just join me:

- For frequency domain analysis, I always choose a sharp linear FIR filter, like the build-in decimation filter of Simcenter SCADAS Lab/Mobile/Recorder series, or the Steep FIR of the RS series. I can then set the Nyquist frequency quite close to my measurement bandwidth. Rule of thumb: 25% higher, for an excellent alias rejection at Nyquist already.
- When I’m interested in the time domain, I choose a smooth linear FIR filter, like the Gaussian filter in Simcenter SCADAS RS series, or a smooth near-linear phase filter like Bessel both in RS and Lab/Mobile/Recorder series. I set a Nyquist frequency far enough from my measurement bandwidth (rule of thumb: 1 to 5 times higher, depending on filter order), for a good alias rejection.

Simcenter SCADAS RS hardware offers wide and flexible measurement bandwidths selectable per channel, high sample rates, high throughput and storage space, wide range of acquisition filter choices for frequency and time domains, including optimized linear phase, and smooth filters enabling you to get exactly "0" overshoot in any of your measurement acquisitions.

Questions? Email aleix.riera@siemens.com.

Questions? Email aleix.riera@siemens.com.