k-Wave Toolbox |

## Modelling A Focussed Detector Example

On this page…
Overview Defining the sensor geometry Running the simulation

### Overview

This example shows how k-Wave can be used to model the output of a focussed bowl detector where the directionality arises from spatially averaging across the detector surface. It builds on the Homogeneous Propagation Medium and Using A Binary Sensor Mask examples.

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

Back to Top

### Defining the sensor geometry

For large single element detectors, the directionality arises because the output is spatially averaged across the pressure field on the transducer surface. Here this effect is simulated using a focussed bowl detector (defined using a binary sensor mask) created with makeCircle.

    % define a sensor as part of a circle centred on the grid
    sensor_radius = 65; % [pixels]
    arc_angle = pi;     % [rad]
    sensor.mask = makeCircle(Nx, Nz, Nx/2, Nz/2, sensor_radius, arc_angle);

Back to Top

### Running the simulation

To illustrate the directionality of the simulated detector, a disc shaped source (created using makeDisc) is first placed at the focus of the detector and then horizontally offset. A visualisation of the two simulations (with the initial pressure distribution overlayed) is given below.

The output from the simulated single element detector is then obtained by averaging the time signals recorded at each pixel within the `sensor.mask` giving a single time series output. The resulting time series for both source positions are shown below; it is clear that the detector produces a larger output for the source nearer the focus of the detector.

Back to Top

© 2009, 2010 Bradley Treeby and Ben Cox.