k-Wave Toolbox |

## Defining A Gaussian Sensor Frequency Response Example

On this page…
Overview Defining the sensor frequency response Running the simulation

### Overview

This example shows how to account for the frequency response of detectors when this response has a Gaussian shape (e.g., piezoelectric transducers). It builds on the Homogeneous Propagation Medium Example.

- open the file in the MATLAB Editor
- run the file in MATLAB

Back to Top

### Defining the sensor frequency response

The frequency response of the sensor is assigned using the `frequency_response` field of the `sensor` input structure. This accepts two parameters, one for the center frequency, and one for the bandwidth of the frequency response. The transducer bandwidth, defined as a percentage, controls the FWHM of the filter, where the FWHM = % bandwidth * center frequency.

    % define the frequency response of the sensor elements
    center_freq = 3e6;      % [Hz]
    bandwidth = 80;         % [%]
    sensor.frequency_response = [center_freq, bandwidth];

When an input for `sensor.frequency_response` is supplied, a Gaussian filter is applied within the simulation functions after the simulation is completed by multiplying the Fourier transformed signals by a zero-phase Gaussian window using `gaussianFilter`. Note, the same filter can also easily be applied by calling `gaussianFilter` explicitly when the sensor data is returned.

Back to Top

### Running the simulation

To illustrate the effect of the filter, the time series recorded at the first sensor position for a simulation with and without the `sensor.frequency_response` field defined are plotted below. The corresponding amplitude spectrums are also shown. The removal of the low frequency information has a significant effect on the signal amplitude.

Back to Top

© 2009, 2010, 2011 Bradley Treeby and Ben Cox.