MATLAB Examples


Particle Trajectory Velocimetry (PTV) us methods of Particle Image

Velocimetry (PIV) to determine the trajectory of particles accelerated inside an acoustophoretic device as result of an ultrasonic standing wave field.

1. Init a new experiment by clicking the corresponding button in the toolbar. In the popup window navigate to the folder with your videos and give a name to your evaluation. If needed change the mechanical properties of particle and fluid in the next pop-up window.

2. Add an a experiment and specify the known data

3. If needed identify the relation between pixel and real size using the "Identify Scale" button. Select the video, and once it is loaded press "Measure". A ruler appears place it to correspond to the reference object or grid and press "Add to table". Enter the size of the reference object or the number of squares and confirm. Close the window then enough measures were done.

$Video Preprocessing$

4. If needed rotate the video so that Ultrasound actuation direction is parallel to the vertical image axis. To reduce the image to an region of interest (ROI), press "crop" drag and drop the appearing rectangle and double click to apply it. Save the settings and close the figure.

5. "Track particle position". From each video frame the background image is subtracted, so that the only visible thing are the moving particles. The function from J. Martín Pastor extracts then all particle centers from each video frame.

Note: The image containing the extracted background and colored with the start and end positions is saved in the "Data" folder generated beside the videos.

$Trajectory Extraction$

6. "Identify Trajectories" Particles are linked with closest particles from the next frame to form trajectories consisting in a time and a position vector and sorted as specified in order to select valid candidates for the acoustophoretic pressure fit. FIT-REQURIREMENTS - A minimum y displacement is require - "Manual" or "Auto" Mode allow to select only parts of the trajectory GEOMETRIC-TEMPORAL-REQURIREMENTS - First the geometric step limit saying that a particle could move maximally 10 pixels between two video frames. - Then the temporal step limit is set to reject trajectories in which particles could were lost by the detection algorithm for at maximum 3 frames. Longer interruptions lead to detection of two separated trajectories. - Finally a minimal length of a trajectory is required to reject the snippets that are to small for further processing. Assumptions for the input video files: - The video starts in the moment there the US is switched on - The frame rate is constant and known


pause % Use it to do your job in the GUI

Load the data gained by PTV

Find the folder containing the optained results and load them

% Get the folder to the results
dir_PTV = fullfile(read_setting('dir_data_eval'))

% Identify found modes
modes = ls(fullfile(dir_PTV,'Results*'));

% Load results obtained by Particle Trajectory velocimetry
p_Mean = zeros(size(modes,1),1);
p_std = zeros(size(modes,1),1);
freq = zeros(size(modes,1),1);
for l = 1:size(modes,1)
    % Load Results
    PTV_results{l} = load_PTV_results(fullfile(dir_PTV,deblank(modes(l,:))));

    % Load pressure as vector over the modes
    p_Mean(l) = PTV_results{l}.pMean;
    p_std = std(PTV_results{l}.pScatter);

    % Extract frequency from mode
    ind_end = findstr(modes(l,:),'kHz');
    ind_1 = findstr(modes(l,1:ind_end),'_');
        freq(l) = str2double( modes(l,ind_1+1:ind_end-1));

Do some great stuff with the data

As example to a plot Pressure-Voltage plot with the results from the last acoustophoretic mode

% Get a new figure handle
figHandle = setPlotFontAndSize;
set(figHandle,'Name','Pressure-Voltage plot')

% Plot the linear approximations
hold on;
hold on;

% Add the individual measurements
for m = 1:size(PTV_results{1}.U3,1)
hold off;

% Add legend and labels
xlabel('Voltage [Vpp]')
ylabel('Pressure Amplitude [MPa]')
legend('Linear Approximation','Linear - forced to zero','Location','Northwest')

% Save the figure
name = 'Pressure_Voltage_curve';
path_res = dir_PTV;

More about

R.Barnkob, P. Augustsson, T. Laurell, and H. Bruus, Measuring the local pressure amplitude in microchannel acoustophoresis, Lab Chip, vol. 10, pp. 563-570, 2010.!divAbstract

J. M. Pastor, Software for particle tracking version 2.0., Matlab(C) file exchange plattform, 2012

D. Blair and E. Dufresne, The matlab particle tracking code repository. The Matlab Particle Tracking Code Repository, 2008

Written by: Matthias Burri

Swiss federal Institute of Technoloy ETH Zürich

Dept. Mechanical and Process Engineering

Institut of mechanical system (IMES)

CLA Tannenstrasse 3

CH - 8092 Zurich, Switzerland

e-mail: matthias.burri<at>