Search
In this part we will examine the basic properties of US imaging systems using the Field II simulator. The Field II simulator is an environment for the numeric simulation of ultrasound signals. The simulator is capable of numerically simulating emitted and received acoustic fields for a broad range of acoustic transducers. With the simulator it is for example possible to acquire data and reconstruct images similarly to a conventional ultrasound imaging device. However we will only cover simple properties of the acoustic signals and fields generated by an array of transducers.
Installation
Field II is distributed as a bundle of Matlab functions for various operating system (Win, Unix, …). To use the simulator , do the following:
mkdir Field_II
tar -xvzf Field_II_ver_3_30_linux.tar.gz -C ./Field_II
addpath('path_to_fieldii')
field_init;
field_end;
Description of some functions from the Field II simulator
This file contains the description of several functions. Complete description of the simulator Field II is in the user's guide.
The first task consists of a few steps:
Alternatively, instead of writing your simulation from scratch, you can use this prepared m-file.
We set up the acoustic system with the following parameters:
xdc_linear_array
The function xdc_impulse modifies the impulse response of the transducer. We will use the impulse response in shape of Gaussian-modulated sinusoidal pulse. Use the gauspuls function for the generation of the impulse response.
xdc_impulse
gauspuls
tc = gauspuls('cutoff',fc,bw,bwr,tpe)
In this mode the function returns the cutoff time tc at which the trailing pulse envelope falls below tpe dB with respect to the peak envelope amplitude. After estimating an appropriate values for the cutoff time we obtain the impulse response in the form of Gaussian-modulated sinusoidal pulse with a following call to the gauspuls function.
yi = gauspuls(t,fc,bw,bwr)
For our simulation, we will use the following parameters of the impulse response:
Let the excitation of the transducer be the Dirac impulse.
When excited by the excitation signal the piezoelectric elements start to oscillate and the transducer emits an acoustic pulse into the environment. The Field II simulator simulates the pressure field for the given transducer and excitation signal. In the simulation we can measure the time dependent changes in pressure at a certain point in the environment.
The emitter which we set up in the acoustic system part emits an ultrasound ray alongside the z-axis. The ray is focused to the distance 30 mm.
Simulate the time dependent changes on a line of points evenly distributed from -1 mm to 1 mm with the step 0.02 mm that runs parallel to the x-axis and goes through the fixed focus (x = -1:0.02:1, y = 0, z = 30 mm). Use function calculate_hp to calculate the pressure field (see the help page for the format of the coordinates).
calculate_hp
Task 1.2.1 Visualize the time dependent changes in the simulated pressure field.
HW 1.2.2 [1 pt] Repeat the pressure field simulation, but measure the pressure changes also on lines 25 mm and 35 mm from the transducer. Visualize the maximum values of pressure in dB (20*log10(Pm/max(Pm))) in each point along the three lines. Compare the shape of the normalized pressure maxima, notice especially the side lobes. How do the side lobes affect the US imaging (the lateral resolution)?
HW 1.2.3 [1 pt] Examine the effect of the central frequency on the side lobes. Repeat the steps 1.2.1 and 1.2.2 for two different central frequencies (for example 5 MHz and 10 MHz) and compare the results of the different central frequencies. Discuss the results and their practical implications.
BONUS 1.2.4 [1 pt] Try to eliminate the side lobes by apodization (function xdc_apodization, choose the profil hanning or blackmann), visualize the shape of the normalized pressure similarly to task 1.2.2, discuss the effect of apodization on the lateral resolution.
xdc_apodization
In this part of the lab we will use the Field II simulator for the ultrasound imaging of a simple phantom of water filled cysts. The task is based on an example provided by the authors of the simulator. However our experiment will be a bit simpler. The archive contains the simplified version.
The project is split into a few scripts.
field.m
cyst_pht.m
mk_pht.m
sim_img.m
make_image.m
The phantom of water filled cysts consists of uniformly distributed particles that randomly scatter ultrasound waves (also called scatterers in the Field II). The scatterers are in a block of size 20 x 10 x 40 mm and there are $10^4$ scatterers (you can try more, but more than $10^5$ may result in a very long computation times for the simulation). The sizes of the water-filled cysts are 6, 4 and 2 mm and are positioned along the middle at 10, 20 and 30 mm from the start. The properties of water are simulated by making the amplitude of scattering zero (or not scattering the ultrasound waves at all).
Task 2.1 Visualize the phantom. Try plot3 function.
plot3
After setting up the environment by running the field.m script and creating the phantom by executing the mk_pht.m script, we can run the simulation of the ultrasound measurement by executing the sim_img.m script. The simulation consists of scanning 40 ultrasound beams. The simulation doesn't keep the data in the workspace, but saves them in rf_data folder in the project folder. And after finishing simulating all the lines, you can create the image be by running the make_image.m script.
Task 2.2 Examine the scripts and make sure that you understand how it works.
Task 2.3 Run the simulation and admire the results.
HW 2.4 [1 pt] Update the phantom so that will also include 3 high scattering objects of different sizes (5, 3 and 1 mm). Put them alongside the water-filled cysts (for example by moving the water-filled cysts to $x=-5$ and the high density objects to $x=5$). Simulate the high scattering properties of the objects by making the amplitudes of the scatterers 10 times higher. Visualize the phantom, put the image into the report and also submit the ph_data.mat with the updated phantom alongside the report.
HW 2.5 [2 pt] Repeat the simulation of the B-mode with the updated phantom. You can try to to change the parameters of the simulation, you may want to add more lines, etc. In that case, make sure that you adjust all scripts accordingly, you have to change no_lines and image_width parameters in scripts sim_img.m and make_image.m; in the script make_image.m you also have to change the axes limits. Visualize the result of the simulation with the updated phantom, put the resulting image in the report and comment on the results.
Hint the simulation is not excessively computationally demanding, however the scripts are written in a way that the execution can be run in parallel on multiple computers. If you have a more powerful computer you can try to run the simulation in parallel on your machine. Simply run multiple instances of Matlab that run the same script, however check your resources and how much of them uses one instance of the simulation, before you trying to parallelize.
Matlab can be run from command line without GUI, running a worker on linux computer could look like:
matlab -nosplash -nodesktop -r "run('field.m');run('sim_img.m');exit"
but you might need to add paths, and other things.