Frequently Asked Question

Ultrasim tips


Q: What value of points per element do you recommend using in Ultrasim. The beam pattern seems to vary with a varying number of points per element and I was not sure if that effect leveled off once the density of points was above a certain value.

A: When you look at the output diplayed in the text window after you exit the transducer setup menu, you will see a value for the distance between points relative to the wavelength. It should be less than half a wavelength in order not to create any artifacts in the simulations. Up to one wavelength is usually OK if you are only interested in the field broadside to the array.

On the other hand, the more points the slower the simulation will run. Therefore it may be a good idea to run preliminary simulations with undersampling and just ignore the artifacts on the sides and run the final simulation with a well sampled transducer surface.


Q: I am having a problem plotting the beam pattern along a line on the z axis when z starts from 0.

A: You can simulate along the z-axis if you do not start with z=0. Start instead with z=1 mm and it will work. The reason is that the field is found by normalizing with the inverse of the distance from the transducer to the point and this division will give infinity as a result.


Q: I have an arrangement of two transducers of equal dimensions separated by a distance X. I am not sure which pulldown menu I should use in your program to define the value X.

A: You can do this by setting up an aperture that covers the two apertures of interest plus all the area between them. Then 'thin' away the area between them. This can be done via the thinning command - the lowest command in the transducer menu. There is a mode there for manual thinning by clicking with the mouse on the points that you want to remove. If you don't have too many points this is feasible.

Alternatively it can be done from the command line. Whether an element or point is thinned away or not is coded by the sign of the fourth parameter, i.e. in elem_pts(4,:) and centers(4,:) (the azimuth element number). One common way is to use the 'find' command in Matlab and search according to some criterion on the x, y, or z-coordinates of the points (parameters 1, 2, or 3) and then toggle the sign. See Appendix C.3.2 of the User's Manual for more on the coding.

An example of this method can be found in How to set up ultrasim for other transducer geometries than rectangular and circular


Q: As I change the elevation aperture, the simulated acoustic field does not change.

A: There are two possible reasons for this:

  1. You may have only specified a single point in a single element in the elevation dimension. Then the elevation aperture is infinitesemally small, only a point, regardless of the value in mm given for the aperture.
  2. If the transducer is symmetrical in the elevation dimension (y-axis), and you observe the field in the x-z plane, then sometimes changes in the y-aperture will not impact the field in the x-z plane, or along the acoustic axis.

Ultrasim model


Q: Which model for the element response is used in Ultrasim?

A: First, an element will be omnidirectional unless it is set up with more than one point. With several points (at least 3-5), the response will be that corresponding to a hard baffle, i.e. proportional to sinc of sine to the angle of incidence.


Q: What is the space between each element in a linear array in Ultrasim?

A: This space is the kerf or the cut between the various elements. There is a variable in Ultrasim for kerf, but it is not used. It was put in there as a possible future variable. Therefore there is no direct control over kerf and the elements as such are not modelled, they are just represented by points and you only have indirect control over the element spacing. If you make the point density high enough you can model space between elements also.

Take as an example a transducer simulated by three points per element in azimuth. The actual size of each element in the simulation is the distance between 3 points, and the kerf will be the distance between points, as sketched: ...|* * *|* * *|* * *|..., where * is each point and | is the element boundary.

However, for most studies, distance from the center of an element to the next one is more important as it determines e.g. whether grating lobes will appear. Ultrasim gives you full control over this parameter.


Q: Is it possible to simulate ultrasound propagation through layered media with non-parallel or curved boundaries? As I understand, the simulation of layered media is possible only for advanced users.

A: We used to have a general 3D layered medium module which was not fully integrated with the rest of ultrasim and also a 2D layered medium option. They are no longer maintained and will not be added to the public version.


Ultrasim program environment


Q: I have downloaded the files and placed the folder in the path and they appear correctly in the list. When I start Ultrasim then I get numerous messages like 'Warning: Name is nonexistent or not a directory: \local\matlab\toolbox\ultrasim\user'

A: There can be two reasons for this:

  1. Your usiminit.m og userusim.m files have not been edited properly to set the paths in the variables there, see here.
  2. You have user files in a directory name which contains spaces and have not updated to the latest 2005 fix for that, see here.

Q: I am using the 01 version of Ultrasim. When I set the transducer geometry to "Rectangular and Curved array" but not to "Annular array", and then go to "Configuration/Transducer/Setup", I get an error message:
??? Error using ==> figure
Invalid figure property: 'FileName'.
Error in ==> c:\matlab\toolbox\ultrasim\config\t1usim.m
On line 45 ==> h0 = figure('Color',[0.8 0.8 0.8], ...
??? Error while evaluating uimenu Callback.

A: We made a change to t1usim.m and added a graphical user interface for setting up rectangular transducers in Ultrasim01. Apparantly that does not work in your installation. We have only had this kind of problem on SGI workstations running an old version of matlab, however it has been reported using Windows NT and Matlab ver. 5 also. If you get this problem, then copy the old versions of t1usim.m and t1u15dtx.m from the "config.old" directory over the ones in the "config" directory. That removes the graphical user interface.


Q: I've downloaded the Ultrasim software (98 version), but the unzip of the downloaded file has missing subdirectories giving the following warnings:
Warning: Directory access failure: c:\matlab5.3\toolbox\ultrasim\optimize.
Warning: Directory access failure: c:\matlab5.3\toolbox\ultrasim\genetic.
Warning: Directory access failure: c:\matlab5.3\toolbox\ultrasim\anneal.

How can I retrieve the missing directories?

A: Simply create the 3 subdirectories: optimize, genetic, anneal. These subdirectories are not really required, but the path command refers to them.


Q: When I run calculation in Ultrasim, I receive an error message, stating that boxcar is not defined. Did I miss any files when I loaded ultrasim?

A: This means that you don't have Matlab's Signal Processing Toolbox properly installed.


Comments, questions or suggestions - contact: Sverre Holm

Published Mar. 9, 2011 10:05 AM - Last modified Feb. 25, 2020 10:44 AM