This blog post describes how to use an impulse response approach to get the most out of your OnScale models with a basic unit cell transducer example.

## What is an impulse response?

The impulse response of a system is its response to a very short input signal (an impulse). An impulse is a signal with amplitude of 1 at t = 0 and zero everywhere else. Using an impulse to excite a system provides “infinite” frequency content, i.e. the impulse response tells us how the system will behave for inputs at all frequencies.

## Why is it useful?

Impulse responses are a great tool when it comes to simulating transducers because many transducer drive signals are wideband.

Finite element analysis (FEA) models cannot support infinite frequency content because the maximum frequency is limited by the size of the mesh. It is possible, though, to simulate an impulse response within a certain frequency band of interest.

In OnScale it is possible to calculate the impulse response across a wide band of interest (band-limited impulse response) using a time-domain response simulation approach.

The response to this impulse will allow us to calculate the response to a range of drive signals such as ramps, steps, squares or sinusoidal signals in post-processing.

Calculating the impulse response allows users to assess various arbitrary drive functions in one cost-effective model.

## Impulse response theory

The only time-domain signal that contains all single-frequency elements with unit magnitude is an impulse (delta function). In the time domain, putting an impulse into a system gives you a time-domain output signal. Time-domain signals can be converted into the frequency domain using the fast Fourier transform (FFT).

The output signal Y(w) is considered as the convolution of two functions, the input signal X(w) and the impulse response H(w). Convolution is a mathematical operation that is the integral of the product of the two functions after one is shifted and reversed.

The Fourier transform of the convolution of two functions is just the product of the Fourier transforms of the two functions. As such, in the time domain the FFT of the convolution of two signals is the product of their frequency spectra.

Because of this property, it’s clear that if we are able to calculate the impulse response transfer function H(ω) we will then be able to calculate the response Y(ω) to any arbitrary input X(ω).

The approach we take in OnScale to solve this problem is the following:

- The user performs a simulation using a broadband signal as an input (such as Ricker or Blackman wavelets)
- From that one simulation, we can calculate the transfer function H(ω) = Y(ω)/X(ω)
- The user can then define a custom impulse function in a CSV file and just multiply by this transfer function to get the impulse response

## Impulse response of a 1-3 piezocomposite unit cell

The following example is a simple 3D unit cell transducer model. This unit cell models an infinite ceramic plate with a water load and backing material that can be diced to form a 1-3 piezocomposite. Using a center frequency of 1.5 MHz we can calculate the transmit impulse response then apply a pulsed drive function in post-processing and analyze the device output with and without harmonic content.

This example was run for two cases:

- 6 MHz bandwidth, covering only the fundamental resonance
- 10 MHz bandwidth, covering the fundamental resonance and 3
^{rd}harmonic

In each case a Ricker wavelet was used to drive the model because they have very low sidelobes, which is good for general purpose work. That being said, it is important to note that Blackman is shorter and has zero DC component, which is useful for removing drift.

The model was run and then a 140 ns square pulse was applied afterwards in post-processing. The results for the 4.6 MHz and 10 MHz bandwidth are below.

In Figure 9, you can observe the time-domain input and output signals (top-left and top-right pictures) and their respective frequency-domain representation obtained by doing a fast Fourier transform (FFT).

In Figure 10 we calculated the band-limited impulse response H(ω) (bottom picture) from the input and output signals X(ω) and Y(ω) (top-left and top-right pictures).

In Figure 11 we used the previously calculated H(ω) band-limited impulse response to calculate in post-processing the response to any standard impulse signal. At the top is the impulse signal at t=0 and at the bottom is the impulse response output.

In Figure 12 and 13, we use the calculated impulse response as a drive spectrum to calculate the device output to a 4.6 MHz and a 10 MHz bandwidth pulse. As the 10 MHz signal has a larger frequency band, we can see in the response that the effect of the 3^{rd} harmonic becomes visible.

The effect of the 3^{rd} harmonic is small, but it can be seen in the output pulse.

## Try this yourself

To run this example yourself, download the files here. If you have any questions about this blog post, please get in touch with support@onscale.com or post your questions in our forum.