Extracting a Heartbeat
from Speckle Pattern
Analysis
Interferometric Scattering of Light by
Moving Red Blood Cells
F.J. Brull
BSc Thesis
Applied Physics
;
Thesis Fabian Brull
Extracting a
Heartbeat from
Speckle Pattern
Analysis
Interferometric Scattering of Light by Moving
Red Blood Cells
by
F.J. Brull
to obtain the degree of Bachelor of Science
at the Delft University of Technology,
to be defended publicly on Wednesday June 22, 2016 at 3:00 PM.
Student number: 4268334
Project duration: March, 2016 – June, 2016
Supervisors: Dr. S. Kenjeres, TU Delft TP
Dr. N. Bhattacharya, TU Delft Optics
Ir. K. Van As, TU Delft TP
Thesis committee: Prof. dr. ir. C. R. Kleijn, TU Delft TP
Thesis Fabian Brull
Abstract
The increase in the number of people suffering from cardiovascular diseases asks for improved diag-
nostics through measurements and simulations. Photoplethysmography is a proven technique when it
comes to measuring a heartbeat in-vivo in a non-invasive, cheap and real-time manner. However, not
all information contained in the 3D electromagnetic fields that result from the scattering of light off e.g.
skin and blood cells is used. Measuring these fields with an 2D camera could allow for the retrieval of
more cardiac parameters.
Van As has simulated the environment of an incoming plane wave scattering off a configuration of
red blood cells, represented by spheres, using Mie scattering theory and fluid dynamics in OpenFOAM.
The interference of light is measured with a camera resulting in speckle patterns [29, 30]. Joosten has
introduced a sinusoidal periodicity in Van As’ simulations to mimic an actual heartbeat [13].
In our research an attempt will be made to retrieve this introduced periodicity by analysis of the
speckle patterns. In order to do so, time series of numerous speckle pattern properties are converted
into the frequency domain. Properties of the generated images, that are considered are the fractality,
correlation coefficient, autocorrelation function and speckle contrast.
The generated results do not allow for retrieval of the frequency of the introduced artificial heartbeat.
Possible explanations for this are the small screen size, low particle density in the fluid, short integration
time and different shape of the input signal compared to experimental research by Loozen [15].
iii
Thesis Fabian Brull
Preface
In the three years of the Bachelor Applied Physics at the TU Delft, I have come across physical concepts
that defy explanation by anyone not familiar to them. An excellent example of this is the superposition
of states in quantum mechanics; how on earth can that poor cat be both alive and dead at the same
time? Relativistic length contraction and time dilation fall into the same category. The fact that the
length of an object, as seen by an observer, depends on its relative velocity does not fit the framework
we use to process our everyday observations.
It was theories like these that triggered me to study Physics in the first place. I felt I could not leave
these mysteries untouched. Courses such as ’Modern Physics’, ’Introduction to Elementary Particle
Physics’ and ’Quantum Mechanics’ helped to satisfy this hunger for knowledge.
Another course that was one of my favorites was Optics, as it closed the gaps in my understanding
of light and imaging. Long anticipated courses like this one, that finally touched upon subjects you had
heard about a million times, but were not able to study in depth yet, were greatly appreciated by me.
In the process of orienting myself on a suitable topic for my BSc thesis, I decided that a multidisci-
plinary project would interest me most. After Professor Chris Kleijn brought me in touch with Kevin van
As, I learned that I could use my newly obtained knowledge about electro-magnetics, statistics, fluid
dynamics and optics in a project with a very clear basic daily application: the retrieval of a heartbeat.
Looking back at the results, one could say that we did not succeed in doing so at present. However,
I think we used a thorough approach and demonstrated that with an adjustment of certain simulation
parameters retrieval could be possible, as was demonstrated experimentally by Loozen. Research is
said to be a never-ending process...
Acknowledgments
First of all, I would like to thank both my senior supervisors Dr. Nandini Bhattacharya and Dr. Sasa
Kenjeres for their input during this project.
In addition, I would like to thank Kevin van As for his day-to-day guidance and for doing such a fine
job during his MSc project, without which none of the research I conducted would have been possible.
The same goes for the countless simulations that were run by Tom Joosten. Finally, I would like to
thank Gyllion Loozen, whom I never met, for his experimental data, that allowed me to make sense out
of our noisy simulation results. Now, at least we have an idea what could have caused this choas.
F.J. Brull
Delft, June 2016
v
Thesis Fabian Brull
Contents
Abstract iii
Preface v
List of Figures ix
List of Tables xi
1 Introduction 1
2 The Project 3
2.1 Theory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.1.1 Fluid Dynamics of Blood . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.1.2 Optics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2 Experimental Method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.2.1 Setup by Van As . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.2.2 Solving the Navier-Stokes equations with OpenFOAM. . . . . . . . . . . . . . . . 10
2.2.3 Adding a Pulsatile Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.2.4 The Camera . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.2.5 Relevant Setup Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3 Discrete Fourier Transform 15
3.1 Fast Fourier Transform. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.2 The Nyquist Frequency and the Nyquist-Shannon Sampling Theorem . . . . . . . . . . . 15
3.3 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4 Fractality 17
4.1 Theory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.2 Experimental Method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.2.1 Binary Box Counting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.2.2 Differential Grayscale Box Counting. . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.2.3 Mass Box Counting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.2.4 Mean Fractal Dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.2.5 Average Cover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.2.6 Summary Fractal Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.3 Preliminary Results. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.3.1 Time Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.3.2 Frequency Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
5 Correlations 25
5.1 Theory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.1.1 Correlation Coefficient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.1.2 Autocorrelation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.1.3 Speckle Contrast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
5.2 Experimental Method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.3 Preliminary Results. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.3.1 Correlation Coefficient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.3.2 Autocorrelation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
5.3.3 Speckle Contrast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
6 Case Study Camera Size 33
6.1 Deviations within a Single Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
6.1.1 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
6.1.2 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
vii
viii Contents
7 Conclusions & Recommendations 37
7.1 Conclusions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
7.2 Hypotheses and Recommendations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
7.2.1 Camera Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
7.2.2 Number of Particles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
7.2.3 Integration Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
7.2.4 Sampling Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
7.2.5 Shape of Input Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
A Appendix 41
A.1 Fourier Spectrum of Signals mirrored in a Line . . . . . . . . . . . . . . . . . . . . . . . . 41
Bibliography 43
List of Figures
2.1 Shape of a Red Blood Cell. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Mie Theory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3 Schematic Overview Setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.4 Artist Impression of Geometry. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.5 Imposed Pressure Gradient to introduce Periodicity. . . . . . . . . . . . . . . . . . . . . 12
2.6 Visualization of the Recording Process. . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.1 Aliasing in Frequency Domain. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.2 Aliasing in Time Domain. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.1 Topological Dimensions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.2 Koch Snowflake. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.3 Influence Grid Orientation on Box Counting. . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.4 Results - Time Domain. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.5 Results - Difference between Regular and Mass Box Counting. . . . . . . . . . . . . . . 22
4.6 Results Grayscale - Mirroring in Time Domain. . . . . . . . . . . . . . . . . . . . . . . . 23
4.7 Results - Frequency Domain. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.1 Visualization Speckle Contrast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
5.2 Results - Correlation Coefficient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.3 Results - Autocorrelation, Color Plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
5.4 Results - Autocorrelation, Single Pixel . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.5 Results - Autocorrelation, Standard Deviations . . . . . . . . . . . . . . . . . . . . . . . 31
5.6 Results - Speckle Contrast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
6.1 Visual Comparison Speckle Patterns Van As and Loozen . . . . . . . . . . . . . . . . . 33
6.2 Dependency of Fractal Dimension on Screen Size . . . . . . . . . . . . . . . . . . . . . 35
6.3 Dependency of Speckle Contrast on Screen Size . . . . . . . . . . . . . . . . . . . . . . 35
A.1 Influence Mirroring on Fourier Spectrum. . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
ix
Thesis Fabian Brull
List of Tables
2.1 Hemodynamics for Different Types of Vessels. . . . . . . . . . . . . . . . . . . . . . . . 5
2.2 Relevant Setup Parameters Joosten and Van As. . . . . . . . . . . . . . . . . . . . . . . 13
4.1 Summary Fractal Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
xi
Thesis Fabian Brull
1
Introduction
On a daily basis, over a hundred people in the Netherlands die from cardiovascular diseases and an-
other thousand are hospitalized because of heart diseases [9]. Even more shocking data for the future
was presented by the Dutch Heart Foundation in 2015 [7]: the number of patients suffering from cardio-
vascular illnesses is expected to increase from 850.000 in 2011 to 1.4 million in 2040. This increasing
problem for the Dutch healthcare system asks for better understanding and improved diagnostics in
this medical field. Therefore, retrieval of data from measurements and simulations is vital.
The most renowned cardiac parameter is the heartbeat. In an ideal case, one could look directly into
the vessel and see the positions of the red blood cells changing over time. One would thereby know
the corresponding length of the cardiac cycle. However, as both the human skin and blood plasma are
opaque, this is not possible. Therefore, numerous techniques have been developed to work around
this limitation, e.g. medical sonography, magnetic resonance angiography and light. Yet, none of the
existing techniques is perfect.
Light is suited to perform measurements, because it is cheap, real-time and non-invasive. The
most basic way of using light is done in photoplethysmography [2], which is based on the absorption
of light by tissue. In this technique, light is used to illuminate the skin, then the change in the degree of
absorption over time is attributed to the heartbeat. It is important to note that this method transforms
the 3D information of the scattering of light off e.g. skin and blood cells, into a single number: the
absorption ratio. A downside of this technique is that information is lost in this conversion.
Possibly, much more information about the blood flow than just the length of the cardiac cycle could
be obtained if, instead of a single number, 2D information is retrieved from illuminating the sample with
light. However, with this increased potential for the retrieval of more cardiac parameters, the complexity
of the analysis goes up. The reason being that the scattering of coherent light off the complex red
blood cell configuration in vessels, consisting of thousands of cells, will result in a 2D interference
pattern when measured with a camera. This can be seen somewhat as a Fourier transform of these
particle positions, rather than a direct image of them [28]. In tomography, images of a fixed particle
configuration that are taken under different angles are used to reconstruct the initial particle positions.
Yet, these exact particle positions are not of interest when trying to retrieve ensemble parameters such
as the length of the cardiac cycle or oxygen saturation.
On the other hand, as the heartbeat is a periodic phenomenon, one could expect certain properties
of these speckle patterns to reflect this periodicity. This hypothesis has been confirmed experimentally
for the fractal dimension, correlation coefficient and speckle contrast by Loozen, Nemati and others
[15, 18, 19].
The downside of these experimental research is that the ability to change the setup parameters is
limited, e.g. it is not feasible to realize certain concentration levels experimentally. Here simulations
would offer a solution. Van As [30] anticipated on this by simulating the experimental setup that was
used by Loozen [15], allowing for adjustments of the setup parameters. Van As combined fluid dynam-
ics simulations for the motion of the red blood cells in OpenFOAM with self-created optics code [29],
1
2 1. Introduction
resulting in speckle images that were recorded by a camera. His code was validated by checking for
the Fraunhofer approximation for a double slit configuration. However, simulations to mimic a heartbeat
were not yet achieved. This would be a logical next step.
Our research will make use of the results Van As stated in his Master Thesis [30]. The speckle
patterns that are analyzed in this research are obtained by simulations from Tom Joosten with Van As’
OptoFluids code [29]. A specific periodicity is introduced in the simulation set up, in order to mimic
a heartbeat. The goal for this thesis is retrieving the introduced periodicity from the speckle patterns.
Therefore, the central research question that we will try to answer is:
Can the periodicity of the input signal be retrieved from speckle pattern analysis?
The approach that will be chosen in order to do so is similar to the one chosen by Nemati and
others [15, 18, 19]: speckle patterns will be obtained for a number of time steps. For these time steps
certain properties of the speckle patterns will be determined, resulting in time sequences. These time
sequences can then be converted from the time domain into the frequency domain using a Fourier
transform. In the Fourier spectrum it is then possible to find dominant frequencies.
As Van As’ work will be used as a starting point, it is necessary to elaborate on the theories and
experimental method he used in order to create his OptoFluids code and generate results. Ch. 2
will be devoted to this. The approach of converting a time sequence into the frequency domain with a
Fourier transform can be taken for many different parameters of the speckle patterns. For this reason
this transformation process will be discussed in Ch. 3. Four different types of speckle pattern analysis
will be demonstrated. In Ch. 4 fractality, which describes the scaling symmetry of the speckle patterns,
will be discussed. The other types of analysis all concern correlations and are therefore elaborated on
in Ch. 5. The correlations that will be used are the correlation coefficient, the autocorrelation and the
speckle contrast. The first two are a measure of the coherence of the speckle patterns in time, whereas
the latter is a measure for the amount of blurring within a speckle pattern. In Ch. 6 a case study that
has been triggered by the results of the analysis types is conducted.
2
The Project
This chapter will be devoted to giving a clear overview of the work that was conducted by Van As on
fluid dynamics in combination with optics and it will elaborate on how his findings will be used in our
research. The purpose is to discuss how speckle patterns that are created using the OptoFluids
code [29], details about this code can be found in Van As’ Master Thesis [30]. The OptoFluids code
combines OpenFOAM simulations with Van As’ self-developed optics code.
The theory is discussed in Sec. 2.1. In Sec. 2.2, the setup and further assumptions made by
Joosten [13] are discussed.
2.1. Theory
2.1.1. Fluid Dynamics of Blood
Figure 2.1: The shape of a red blood cell. It is said to be similar
to a donut due to the fact that is a biconcave disk.
Blood is crucial for human survival: it transports
nutrients, such as oxygen and proteins, towards
the organs and transports the waste products
away. Blood consists of blood plasma with blood
cells in it. The plasma, which consists for 92% of
water, makes up 54.3% of the volume of blood.
The different particle types in the plasma are
red blood cells (volume fraction of 45%), white
blood cells (volume fraction of 0.7%) and platelets
[6, 26]. The red blood cells are responsible for
the oxygen transport, the white blood cells take
care of the immune system and the function of
platelets is to stop bleeding by clotting.
For this research the red blood cells are the
main focus. Real-life red blood cells are donut-
shaped, however in the simulations with the
OptoFluids code by Van As they are approx-
imated as spheres.
Rheology
Rheology is the study of flow and deformation of matter, i.e. liquids and so called ’soft solids’, in re-
sponse to an applied force [31]. A distinction between Newtonian and Non-Newtonian fluids is made in
this field of study. The strain rate describes how distances within the material change due to expand-
ing, shrinking and shearing. Newtonian fluids can be described by a temperature-dependent dynamic
viscosity coefficient 𝜇, i.e. the viscosity does not depend on the strain rate. There is only a limited class
of fluids for which this is true.
The shear stress 𝜏 in a fluid is related to the derivative of the velocity along a boundary, 𝑢 , with
3
4 2. The Project
respect to the direction perpendicular to the direction of this velocity, 𝑥 , by the dynamic viscosity:
𝜏(𝑥 ) = 𝜇
𝜕𝑢
𝜕𝑥
, (2.1)
where 𝑥 denotes the 𝑖 coordinate, with 𝑖 ∈ {1, 2, 3}, i.e. {𝑥 , 𝑥 , 𝑥 } = {𝑥, 𝑦, 𝑧}.
In case the viscosity does depend on the strain rate one speaks of Non-Newtonian fluids. If all
particles making up the material are moving with the same speed the strain rate is 0 by definition.
Blood behaves as a Non-Newtonian fluid due to its high volume fraction of particles. This makes its
flow behave different from Newtonian fluids, such as water, allowing it to transport more nutrients and
waste products compared to pure blood plasma [30].
A second property that is different for Non-Newtonian fluids is the volume distribution of red blood
cells. The radial profile can be described by the volume fraction of red blood cells 𝜙(𝑟) as function of
the radial distance to the axis of the cylinder 𝑟 [30]:
𝜙(𝑟) =
𝑑𝑉 (𝑟)
𝑑𝑉(𝑟)
. (2.2)
As shown by Van As [30], this can be converted into a probability density function 𝑃(𝑟) for the number
of particles as a function of 𝑟 and the total number of particles 𝑁 inside a cylinder with length 𝐿 and
radius 𝑅:
𝑃(𝑟) =
𝜙(𝑟)𝑟
∫ 𝜙(𝑟)𝑟𝑑𝑟
, (2.3)
𝑁 =
2𝜋𝐿
𝑉
∫ 𝜙(𝑟)𝑟𝑑𝑟. (2.4)
These expressions were combined with measurements for 𝜙(𝑟) performed by Aarts [1] to retrieve an
input probability density distribution for injecting particles in the fluid dynamics simulations in OpenFOAM.
Thereby, the particle distribution in the simulations will mimic that of real in-vivo blood flow.
Reynolds Number
The Reynolds number describes the relationship between inertial and viscous forces [31]:
𝑅𝑒 =
𝜌𝑈𝐿
𝜇
=
𝑈𝐿
𝜈
, (2.5)
where 𝑈 is the typical velocity scale, 𝐿 the characteristic length scale, 𝜈 the kinematic viscosity, 𝜌 the
density and 𝜇 the dynamic viscosity. This kinematic viscosity 𝜈 is related to the dynamic viscosity 𝜇 by:
𝜈 =
𝜇
𝜌
. (2.6)
For pipe-flow, with radius 𝑅, the typical length 𝐿 = 2𝑅 and 𝑈 relates to the velocity 𝑢(𝑟) as:
𝑈 = ̄𝑢 =
∫ 𝑢(𝑟)𝑟𝑑𝑟
∫ 𝑟𝑑𝑟
. (2.7)
The value of the Reynolds number indicates whether the inertial forces or the viscous forces are dom-
inating. It gives valuable information on whether a certain flow will be turbulent (sufficiently high 𝑅𝑒,
inertia-dominated) or laminar (sufficiently low 𝑅𝑒, viscous-dominated). The condition for turbulence in
pipe-flow is around 𝑅𝑒 > 4000, whereas 𝑅𝑒 < 2300 under most conditions corresponds to laminar
flow. There is transitional flow in case 2300 < 𝑅𝑒 < 4000 [31, 35].
The value of the Reynolds number for blood strongly depends on the kind of vessel that is consid-
ered, as can be seen from Table 2.1.
2.1. Theory 5
Table 2.1: Hemodynamics for different types of vessels [23].
Vessel 𝑣[𝑐𝑚𝑠 ] 𝐷[𝑐𝑚] 𝑅𝑒
Aorta 48 2.5 3400
Artery 45 0.4 500
Arteriole 5 0.005 0.7
Capillary 0.1 0.0008 0.002
Venule 0.2 0.002 0.01
Vein 10 0.5 140
Vena Cava 38 3.0 3300
Navier-Stokes Equation
As stated above, blood behaves like a non-Newtonian fluid. However, in Van As’ thesis [30] the Newto-
nian model for the stress tensor was assumed. As this assumption will also be applicable to the results
of this research, the influence of this choice on the relevant theory will be stated below. The assumption
leads to the following set of Navier-Stokes equations in Einstein notation for incompressible flow [14]:
𝑑𝑢
𝑑𝑥
= 0, (2.8)
𝑑𝑢
𝑑𝑡
+ 𝑢
𝑑𝑢
𝑑𝑥
=
1
𝜌
(
𝑑𝑃
𝑑𝑥
+
𝜏
𝑑𝑥
+ 𝑓 ) , (2.9)
𝜏 = 𝜇 (
𝑑𝑢
𝑑𝑥
+
𝑑𝑢
𝑑𝑥
) , (2.10)
where 𝑥 denotes the 𝑖 coordinate, with 𝑖 ∈ {1, 2, 3}, i.e. {𝑥 , 𝑥 , 𝑥 } = {𝑥, 𝑦, 𝑧}. As a result 𝑢 is the
velocity in the 𝑥 direction, i.e. {𝑢 , 𝑢 , 𝑢 } = {𝑢 , 𝑢 , 𝑢 }. Furthermore, 𝜌 is the density of the fluid, 𝜇 the
dynamic viscosity of the fluid, 𝑃 the pressure, 𝜏 the stress tensor and 𝑓 the sum of external forces
per unit volume.
The distinction between incompressible and compressible flow is that for the incompressible flows
density variation is not linked to pressure variations [27]. As the density does not depend on the tem-
perature either, it is constant in both space and time for incompressible flow. As a result, pressure
variations will derived from the constraint that mass conservation imposes on the velocity field, com-
bined with momentum equations.
As the particles in the simulations are assumed to be small enough, Lagrangian Particle Tracking
will be used to determine their positions. The red blood cells are treated as point particles which are
subject to Newton’s law.
2.1.2. Optics
When light, i.e. an electromagnetic wave, is incident on matter there will be two phenomena taking
place. Let us look at this at the level of the most fundamental particles: that of electrons and protons.
In the first place, the light incident on a fundamental charged particle will cause it to oscillate. In its turn
this oscillation will lead to secondary radiation, which is called scattering.
A second phenomenon that will be present in such a collision of light and an electron or a proton,
is absorption. This means that part of the incoming electromagnetic radiation is not reflected, but
absorbed by the particle. Absorption combined with scattering, will alter the strength of the incident
light. This is due to the fact that the scattered wave will interfere with the incident wave. Extinction
occurs in case of destructive interference of the incident and scattered wave.
Theories that capture the physical essence of scattering are very relevant to this research as they
describe how interference causes speckle patterns. For this reason, a derivation of Mie Theory based
on Bohren & Huffman [4] and Li Na NG [20] will be given here.
Mie Theory
In order to quantify the scattering of light on a sphere Gustav Mie developed Mie Theory in 1908 [17]. In
his theory the incoming light is treated as an electromagnetic wave, governed by the Maxwell equations.
6 2. The Project
When the incoming real electric field is denoted as ⃗ℰ (𝑡) and incoming real magnetic H-field as
⃗ℋ (𝑡), and periodic behavior with frequency 𝜔 is assumed for the electromagnetic wave, these can
be written as:
⃗ℰ (𝑡) = 𝑅𝑒 ( ⃗𝐸 𝑒 ) , (2.11)
⃗ℋ (𝑡) = 𝑅𝑒 ( ⃗𝐻 𝑒 ) , (2.12)
where ( ⃗𝐸 , ⃗𝐻 ∈ ℂ ). ⃗𝐸 and ⃗𝐻 are the time-independent complex electric and magnetic field respec-
tively. In general, the H-field is related to the magnetic B-field ⃗ℬ and the magnetization ⃗ℳ in the
following way:
⃗ℋ =
⃗ℬ
𝜇
− ⃗ℳ, (2.13)
where is 𝜇 the magnetic permeability in vacuum. The Maxwell equations for the time-independent
complex fields ⃗𝐸 and ⃗𝐻 are then given as:
∇ ⋅ (𝜖 ⃗𝐸) = 0, (2.14)
∇ × ⃗𝐸 = 𝑖𝜔𝜇 ⃗𝐻, (2.15)
∇ ⋅ (𝜖 ⃗𝐻) = 0, (2.16)
∇ × ⃗𝐻 = −𝑖𝜔𝜖 ⃗𝐸, (2.17)
where 𝜇 denotes the magnetic permeability and 𝜖 denotes the electric permittivity:
𝜖 = 𝜖 (1 + 𝜒) + 𝑖
𝜎
𝜔
, (2.18)
where 𝜖 is the electric permittivity in vacuum, 𝜒 the electric susceptibility and 𝜎 is the conductivity. It
should be noted that 𝜇, 𝜒, 𝜎 and therefore 𝜖 are material-dependent parameters. By taking the curl of
(2.15) and (2.17) and applying the vector identity:
∇ × (∇ × ⃗𝐴) = ∇ (∇ ⋅ ⃗𝐴) − ∇ ⋅ (∇ ⃗𝐴) , (2.19)
the following time-dependent vector wave equations follow:
∇ ⃗𝐸 + 𝑘 ⃗𝐸 = 0, (2.20)
∇ ⃗𝐻 + 𝑘 ⃗𝐻 = 0, (2.21)
where 𝑘 = 𝜔 𝜖𝜇.
The focus from here on will be on finding the vector solutions to the wave equations. In order to
do so, a spherical coordinate system (𝑟, 𝜃, 𝜙) will be used. In case of a single spherical scatterer, the
center of this scatterer will coincide with the origin of the coordinate system. This is shown in Fig. 2.2.
Now a scalar function 𝜓 , will be defined. The scalar function will be a solution to:
∇ 𝜓 + 𝑘 𝜓 = 0. (2.22)
It should be noted that the individual components of (2.20) and (2.21) do not satisfy the scalar wave
equation (2.22).
On the other hand, the following three independent vectors are solutions to the scalar wave equation
(2.22):
⃗𝐿 = ∇𝜓 , , (2.23)
⃗𝑀 , = ∇ × ⃗𝑟𝜓 , , (2.24)
⃗𝑁 , =
1
𝑘
∇ × ⃗𝑀 , . (2.25)
Analogous to ⃗𝐸 and ⃗𝐻, ⃗𝑀 , and ⃗𝑁 , are related to each other by the curl operator. Furthermore, ⃗𝐿,
⃗𝑀 , and ⃗𝑁 , all can be shown to be solutions to the vector wave equations (2.20) and (2.21). In the
further analysis ⃗𝐿 will be omitted, because it represents a purely longitudinal wave.
2.1. Theory 7
Figure 2.2: Geometry of plane waves scattering off a
spherical particle in spherical coordinates as described by
Mie Theory. Note that the incoming wave is traveling in
the -direction and is polarized in the -direction.
Solution to the Scalar Wave Equation
Equation (2.22) can be expressed in spherical coordinates (𝑟, 𝜃, 𝜙) as:
1
𝑟
1
𝜕𝑟
(𝑟
𝜕𝜓
𝛿𝑟
) +
1
𝑟 sin 𝜃
𝜕
𝜕𝜃
(sin 𝜃
𝜕𝜓
𝜕𝜃
) +
1
𝑟 sin 𝜃
𝛿 𝜓
𝜕𝜓
+ 𝑘 𝜓 = 0. (2.26)
Using separation of variables, the solutions can be shown to be:
𝜓 = cos (𝑚𝜑)𝑃 cos 𝜃𝑧 (𝑘 𝑟),
𝜓 = sin (𝑚𝜑)𝑃 cos 𝜃𝑧 (𝑘 𝑟),
(2.27)
where 𝑃 is the Legendre polynomial and 𝑧 (𝑘 𝑟) is any spherical Bessel function. 𝑧 (𝑘 𝑟) represents
the radial spherical Bessel functions, 𝑗 (𝑘 𝑟), and first order Hankel functions, ℎ (𝑘 𝑟). The reason for
this choice is that, on the one hand, 𝑗 (𝑘 𝑟) captures the right behavior for incoming and transmitted
waves near the origin, as it is finite at the origin. On the other hand, ℎ (𝑘 𝑟) gives the right behavior for
scattered waves in the far field, as it is infinite there. The subscript 𝑒 denotes ’even’ in this, whereas 𝑜
stands for ’odd’. The general solution will be a superposition of the solutions (2.27):
𝜓 = ∑
,
𝛼 , 𝜓 + 𝛽 , 𝜓 . (2.28)
Solution to the Vector Wave Equation
Combining (2.27) and (2.28) with (2.24) and (2.25) will lead to four solutions to the vector wave equa-
tions (2.20), (2.21) for every (𝑛, 𝑚) known as the Vector Spherical Harmonics:
8 2. The Project
⃗𝑀{ }
= {
− sin 𝑚𝜑
cos 𝑚𝜑
}
𝑚
sin 𝜃
𝑃 (cos 𝜃) 𝑧 (𝑘 𝑟) ̂𝜃
+ {
− cos 𝑚𝜑
− sin 𝑚𝜑
}
𝑑𝑃 (cos 𝜃)
𝑑𝜃
𝑧 (𝑘 𝑟) ̂𝜑, (2.29)
⃗𝑁{ }
= {
cos 𝑚𝜑
sin 𝑚𝜑
} 𝑛 (𝑛 + 1) 𝑃 (cos 𝜃)
𝑧 (𝑘 𝑟)
𝑘 𝑟
̂𝑟
+ {
cos 𝑚𝜑
sin 𝑚𝜑
}
𝑑𝑃 (cos 𝜃)
𝑑𝜃
1
𝑘 𝑟
𝑑 (𝑘 𝑟𝑧 (𝑘 𝑟))
𝑑 (𝑘 𝑟)
̂𝜃
+ {
− sin 𝑚𝜑
cos 𝑚𝜑
}
𝑃 (cos 𝜃)
sin 𝜃
𝑚
𝑘 𝑟
𝑑 (𝑘 𝑟𝑧 (𝑘 𝑟))
𝑑𝑘 𝑟
̂𝜑. (2.30)
(2.29) and (2.30) make up a complete basis.
Expansion of Incoming Fields in Vector Wave Equation Solutions
Analogous to (2.28), an arbitrary periodic field ⃗𝐴 can be written as a linear combination of (2.29) and
(2.30):
⃗𝐴 =
𝑖
𝜔
∑
,
[𝐴 ,
⃗𝑀 , + 𝐵 ,
⃗𝑁 , ]. (2.31)
Combining the fact that (2.31) applies to all periodic fields with (2.15) and (2.17) results in the following
identities for the incoming H-field and electric field:
⃗𝐻 = −
𝑖𝑘
𝜔𝜇
∑
,
[𝐴 ,
⃗𝑁 , + 𝐵 ,
⃗𝑀 , ], (2.32)
⃗𝐸 = −
𝑘
𝜔 𝜖𝜇
∑
,
[𝐴 ,
⃗𝑀 , + 𝐵 ,
⃗𝑁 , ]. (2.33)
The coefficients 𝐴 , and 𝐵 , can be found by applying Fourier analysis. This results in an integral
over the surface Ω of the particle causing the scattering:
𝐴 , = ∫ ⃗𝑀∗
,
⃗𝐸 𝑑Ω, (2.34)
where ⃗𝑀∗
, is the complex conjugate of ⃗𝑀 , . Due to the symmetry of a sphere there is no loss
of generality when an the electric field of an incoming electromagnetic wave in random direction is
expressed as:
⃗𝐸 = 𝐸 𝑒 ̂𝑥. (2.35)
Applying (2.34) to (2.35) results in:
⃗𝐸 = 𝐸 ∑ 𝑖
2𝑛 + 1
𝑛 (𝑛 + 1))
( ⃗𝑀
( )
− 𝑖 ⃗𝑁
( )
) . (2.36)
Note that only the Bessel function of the first kind, 𝑧 = 𝑗 , will yield solutions that are, like (2.35), finite
in the origin. This is denoted in (2.36) by (1).
The corresponding H-field can then be found by either taking the curl of (2.35) and then applying
Fourier analysis (2.34) or by directly taking the curl of (2.36):
⃗𝐻 =
−𝑘
𝜔𝜇
𝐸 ∑ 𝑖
2𝑛 + 1
𝑛 (𝑛 + 1))
( ⃗𝑀
( )
+ 𝑖 ⃗𝑁
( )
) . (2.37)
2.1. Theory 9
Boundary Conditions
So far only the incoming fields have been considered in the expansion in vector wave equation solu-
tions. At the beginning of Sec. 2.1.2 is was noted however that the light incoming on a particle will
cause scattering and absorption. Absorption takes place in the interior of the particle, whereas the
scattered wave will be present in the exterior of the particle. Therefore, in order to solve for the result-
ing external electromagnetic field due to scattering of an incident wave, also the scattered wave must
be considered. The incoming wave will interact with this scattered wave ⃗𝐸 resulting in the following
superposition:
⃗𝐸 = ⃗𝐸 + ⃗𝐸 , (2.38)
where ⃗𝐸 denotes the resulting field external to the particle responsible for the scattering. The elec-
tromagnetic field that exists within the particle due to absorption will be represented by ⃗𝐸 .
For transitions from one material to another the electric permittivity and magnetic permeability
change almost instantly in space; the length scale is in the order of atomic dimensions [20]. These
changes impose boundary conditions on the tangential electric and H-field through the Maxwell equa-
tions (2.15) and (2.17):
[ ⃗𝐸 − ⃗𝐸 ] × ⃗𝑛 = [ ⃗𝐸 + ⃗𝐸 − ⃗𝐸 ] × ⃗𝑛 = 0,
[ ⃗𝐻 − ⃗𝐻 ] × ⃗𝑛 = [ ⃗𝐻 + ⃗𝐻 − ⃗𝐻 ] × ⃗𝑛 = 0,
(2.39)
where ⃗𝑛 = ̂𝑟. Additionally, constraints on the normal components can be formulated by integration over
a volume of (2.14) and (2.16):
[𝜖 ⃗𝐸 − 𝜖 ⃗𝐸 ] ⋅ ⃗𝑛 = [𝜖 ⃗𝐸 + 𝜖 ⃗𝐸 − 𝜖 ⃗𝐸 ] ⋅ ⃗𝑛 = 0,
[𝜇 ⃗𝐻 − 𝜇 ⃗𝐻 ] ⋅ ⃗𝑛 = [𝜇 ⃗𝐻 + 𝜇 ⃗𝐻 − 𝜇 ⃗𝐻 ] ⋅ ⃗𝑛 = 0.
(2.40)
The combination of the four constraints on the tangential and normal components is sufficient to solve
for ⃗𝐸 and ⃗𝐸 in case of a known ⃗𝐸 .
Calculation of Fields in Vector Wave Equation Solutions
Calculation of the scattered and internal field is most conveniently done in the basis of the vector wave
equation solutions (2.29) and (2.30). The scattered and internal electromagnetic waves are are written
as a linear combination of these making use of the boundary conditions (2.39). The results are the
following:
⃗𝐸 = ∑ 𝐸 (𝑐 ⃗𝑀
( )
− 𝑖𝑑 ⃗𝑁
( )
) , (2.41)
⃗𝐻 =
−𝑘
𝜔𝜇
∑ 𝐸 (𝑑 ⃗𝑀
( )
+ 𝑖𝑐 ⃗𝑁
( )
) , (2.42)
⃗𝐸 = ∑ 𝐸 (𝑖𝑎 ⃗𝑁
( )
− 𝑏 ⃗𝑀
( )
) , (2.43)
⃗𝐻 =
𝑘
𝜔𝜇
∑ 𝐸 (𝑖𝑏 ⃗𝑁
( )
+ 𝑎 ⃗𝑀
( )
) , (2.44)
where 𝐸 = 𝐸 𝑖 ( )
( )
, which is a common factor in all four expressions.
For the internal electromagnetic fields (2.41) and (2.42), the Bessel function that is needed is again
that of the first kind: 𝑧
( )
≡ 𝑗 . The reason for this is that the solution should be finite at the origin,
as this is part of the internal region in case the center of the particle coincides with the origin of the
coordinate system.
For the scattered electromagnetic fields (2.43) and (2.44), the Bessel function that is needed is that
of the third kind, the spherical Hankel function of the first kind: 𝑧
( )
≡ ℎ
( )
. This follows from the required
10 2. The Project
physical behavior in the far field [30]. Namely, for 𝑘𝑟 >> 𝑛 the first kind Hankel function becomes an
outgoing spherical wave:
ℎ
( )
(𝑘 𝑟)
(−𝑖) 𝑒
𝑖𝑘 𝑟
, (2.45)
which is consistent with what one would expect physically.
The solution to the set of equations containing four unknown variables 𝑎 , 𝑏 , 𝑐 and 𝑑 is found
by applying the boundary conditions (2.39) to (2.41), (2.42) and (2.43) to (2.44). As only the external
field will be responsible for the generation of speckle patterns, here only the solution to 𝑎 and 𝑏 will
be given:
𝑎 =
𝜇 𝛽 𝑗 (𝑦)[𝑥𝑗 (𝑥)] − 𝜇 𝑗 (𝑥)[𝑦𝑗 (𝑦)]
𝜇 𝛽 𝑗 (𝑦)[𝑥ℎ
( )
(𝑥)] − 𝜇 ℎ
( )
(𝑥)[𝑦𝑗 (𝑦)]
, (2.46)
𝑏 =
𝜇 𝑗 (𝑦)[𝑥𝑗 (𝑥)] − 𝜇 𝑗 (𝑥)[𝑦𝑗 (𝑦)]
𝜇 𝑗 (𝑦)[𝑥ℎ
( )
(𝑥)] − 𝜇 ℎ
( )
(𝑥)[𝑦𝑗 (𝑦)]
, (2.47)
where 𝑥 ≡ 𝑘 𝑎 denotes the size parameter, 𝑦 ≡ 𝑘 𝑎 = 𝛽𝑥. 𝛽 represents the relative refractive index:
𝛽 =
𝑘
𝑘
= √
𝜖 𝜇
𝜖 𝜇
. (2.48)
Once these coefficients are known, the strength of scattered electromagnetic waves as a function of
position (𝑟, 𝜃, 𝜙) can be determined. This was done by Van As [30] by making use of the Far-Field
approximation [28].
It should be noted that for the general case of multiple scatterers, a switch to general coordinates is
necessary. Also, the initial phase of the incoming plane wave will depend on the particle position and
must be considered [30].
2.2. Experimental Method
The application of the theories described in Sec. 2.1 is outlined here. First, the overview of the setup
created by Van As will be given in Sec. 2.2.1. Then we will zoom in on the implementation of the
theories of Sec. 2.1 in the individual parts of the setup in Sec. 2.2.2, Sec. 2.2.3 and Sec. 2.2.4. In
Sec. 2.2.5 we will look at the parameters as used in the present research by Joosten.
2.2.1. Setup by Van As
As mentioned before, Van As’ OptoFluids code links simulations on fluid dynamics in OpenFOAM to
his self-created optics code to create speckle patterns. In Fig. 2.3 the coupling between the two is
displayed schematically. Red blood cells are approximated by spheres. In OpenFOAM the positions of
red blood cells are calculated as a function of time. A certain periodicity in the movement of the fluid,
and therefore the blood cells, was introduced here. A visualization of the particle positions at a certain
time step can be seen in Fig. 2.3.
In the optics part an incoming plane wave is used to illuminate this particle configuration and cal-
culate the resulting field as described in Sec. 2.1.2. The resulting field is then recorded by a camera,
which leads to 2D speckle patterns. A time series of these speckle patterns will be used in this research
to seek to retrieve the introduced periodicity.
2.2.2. Solving the Navier-Stokes equations with OpenFOAM
As working with OpenFOAM is not part of the scope of this research, only crucial information on the
input and output of the simulations by Joosten [13] will be given.
In OpenFOAM the Navier Stokes equations (2.8), (2.9), (2.10) are discretized, using the Finite Volume
Method. This results in a system of non-linear coupled equations. This is solved using OpenFOAM’s
pimple iteration scheme. Cyclic boundary conditions were imposed by Joosten on the cylinder ends:
particles leaving at the one end will be inserted into the cylinder at the other end, at the same position
with respect to the cylinder axis, to maintain a constant number of particles. These cyclic boundary
conditions are justified by Joosten [13]. The number of particles that is introduced into the simulation
is 1000. The initial positions are randomly generated making use of the probability distribution in (2.3).
2.2. Experimental Method 11
Figure 2.3: Schematic overview of the setup as simulated by Van As in the OptoFluids code. An incoming plane wave will
scatter off a configuration of red blood cells. The resulting interference pattern is recorded by a camera as a speckle image.
The goal of our research is to retrieve the introduced heartbeat from analysis of time series of these speckle patterns.
Figure 2.4: Artist impression of the geometry. The
red blood cells are represented by spheres,
particle positions are given for a certain time. Cyclic
boundary conditions were imposed on the cylinder
ends to maintain a constant number of particles.
2.2.3. Adding a Pulsatile Flow
In order to mimic a real heartbeat, Joosten introduced a periodicity in the simulation environment by
imposing a pressure gradient [13]:
Δ𝑃
𝜌
= 𝛼(1 + 𝛽𝑠𝑖𝑛(2𝜋𝑓𝑡)). (2.49)
The parameters 𝛼 en 𝛽 were deduced from typical values for arteries, combined with Hagen-Poiseuille
flow validation: 𝛼 = 2.6780625 ⋅ 10 , 𝛽 = 0.7. The frequency 𝑓 was chosen as 1𝐻𝑧; an order or
magnitude that is comparable to the typical frequency of a heartbeat [8]. The pressure gradient is
plotted as a function of time in Fig. 2.5.
2.2.4. The Camera
For the recording of the speckle patterns a square camera of 128 x 128 pixels was used. As a real
camera creates images by integration of the intensity measured during a finite integration time, the
same principle will be used in the processing of the simulation data. The integration time is taken as
100𝜇𝑠. During this integration time, 20 instantaneous speckle images will be recorded with 5𝜇𝑠 between
12 2. The Project
0 0.5 1 1.5 2 2.5 3
t[s]
0
1
2
3
4
5
∆P
ρ
m2
s2
×10-4
Figure 2.5: Imposed pressure gradient to introduce periodicity in the flow [13].
them. Then a single speckle pattern will be created by averaging the intensity per pixel over these 20
samples. It is this averaging that makes the velocity extractable from speckle images. Namely, if the
particles move considerably between two successive instantaneous images, then these patterns will
be very different and averaging will result in a high degree of blurring. On the other hand, if the particles
are barely moving, the two successive instantaneous images will be very similar, leading to minimal
blurring. Blurring is thus an indicator of the velocity of the particles.
The ’blurred’ image will be used for the fractality and correlation analysis. The camera size and
position was chosen in such a way that a typical speckle takes up around 4 x 4 pixels [13]. The blurred
images that are used for the analysis are sampled at a frequency of 12.5𝐻𝑧. So every 𝑡 of
0.08𝑠 the camera measures 20 instantaneous speckle images within the measurement time 𝑡
of 100𝜇𝑠. This is visualized in Fig. 2.6.
Figure 2.6: Visualization of the recording process. After each sampling time instantaneous speckle patterns,
depicted in blue, are used to generate one blurred speckle pattern that is comparable to an image of a real camera.
2.2.5. Relevant Setup Parameters
It should be noted that the parameters as chosen by Van As [30] were predominantly the same as
those used in the experimental research by Loozen [15]. This allows for experimental validation. In
both cases, instead of real blood, water-glycerol, which has a refractive index identical to blood, was
2.2. Experimental Method 13
used. Due to differences in other material properties, e.g. density, deviations from the typical Reynolds
numbers for different vessels as stated in Table 2.1 can be expected.
Table 2.2: Relevant setup parameters as used in simulations by Joosten [13] and Van As [30].
𝐿 1cm Length of the cilinder in the 𝑧-direction
𝑅 8mm Radius of the cylinder
𝑎 4𝜇m Radius of simulated particles
𝜌 1157.2kgm Density of the fluid
𝜌 1.1 ⋅ 10 kgm Density of the particles
𝜇 9.58 ⋅ 10 Pa ⋅ s Dynamic viscosity of the fluid
𝜈 8.28 ⋅ 10 m s Kinematic viscosity of the fluid
𝑣 5.4 ⋅ 10 ms Centerline (maximum) velocity of the fluid
𝑁 1000 Number of simulated particles
𝑛 1 Refractive index of the surrounding medium
𝑛 1.52 Refractive index of the particles
𝜆 532nm Wavelength of the used laser
𝑦 25cm Distance between the camera and the cylinder axis
|⃗𝑟 | 1.25cm Halfwidth of the camera
𝑡 100𝜇s Integration time of the camera
From the data provided in Table 2.2, the Reynolds number can be calculated using (2.5):
𝑅𝑒 =
𝜌𝑣 2𝑅
𝜇
≃ 104. (2.50)
As stated in Sec. 2.1.1, the condition for laminar behavior for pipe-flow is around 𝑅𝑒 < 2300 [31],
therefore the simulated flow will be viscous-dominated and behave in a laminar way.
Thesis Fabian Brull
3
Discrete Fourier Transform
The discrete Fourier transform is used in mathematics to convert a finite sample that is sampled at a
certain fixed sampling frequency 𝑓 into the frequency domain . It is used for digital signal processing
and can be computed making use of the Fast Fourier Transform-algorithm [21, 22]. The Fourier trans-
form is relevant to our research as it allows us to convert a time series into the frequency domain and
thereby determine the governing frequencies.
3.1. Fast Fourier Transform
A periodic (period 𝑇) and discrete (𝑁 values) sequence 𝑥 , is transformed into a periodic and discrete
sequence 𝑋 , by [21, 22]:
𝑋 = ∑ 𝑥 𝑒 , 𝑘 ∈ ℤ. (3.1)
The Fourier transform is periodic in 𝑘 with period 𝑁 : 𝑋 = 𝑋 . Therefore, it is usually computed in
the 𝑘-interval [0, 𝑁-1] . 𝑋 will be a measure of the amount of 𝑓 present in the signal 𝑥 . The discrete
Fourier transform treats the data as if it were periodic with the period equal to the measuring time 𝑇.
This measuring time 𝑇 is related to the number of samples 𝑁 and the sampling frequency 𝑓 in the
following way:
𝑇 =
𝑁
𝑓
. (3.2)
The frequencies that can therefore be distinguished are multiples of the fundamental frequency ,
which for a periodic signal with one cycle in the sequence of measuring time 𝑇 are:
𝑓 = 0,
1
𝑇
,
2
𝑇
, ...,
𝑁 − 1
𝑇
= 0,
1
𝑁
𝑓 ,
2
𝑁
𝑓 , ...,
𝑁 − 1
𝑁
𝑓 . (3.3)
So the interval [0, 𝑓 ] is divided into 𝑁 equally spaced steps. Because of this periodicity in the frequency
domain:
𝑓 = 𝑓 . (3.4)
As the values for 𝑋 are complex, their absolute value has to be computed to display them in a graph.
The absolute value of 𝑋 will be denoted as the power of the signal for that certain value of 𝑘.
3.2. The Nyquist Frequency and the Nyquist-Shannon Sampling
Theorem
From the discrete Fourier transform, it follows that a sequence of 𝑁 samples will result in a sequence
of values 𝑋 with periodicity 𝑁. The maximum number of unique values for 𝑋 would therefore be 𝑁.
15
16 3. Discrete Fourier Transform
However, according to the Nyquist theorem [22, 24] the Nyquist folding frequency is half the sampling
frequency 𝑓 . Signals with frequencies higher than this 𝑓 , 𝑓 +Δ𝑓 will fold back to 𝑓 -Δ𝑓, as can be
seen in Fig. 3.1. From the Nyquist theorem follows that the frequency spectrum is mirrored in 𝑓 . This
behavior of two signals becoming indistinguishable when being sampled is called aliasing. In Fig. 3.2,
aliasing is visualized in the time domain for two sinusoidal signals with a frequency of 0.4𝑓 and 1.4𝑓
respectively.
Because of the folding, the interval [0, 𝑓 ] of the Fourier spectrum will contain all the frequency
information of a signal.
Figure 3.1: Aliasing: After sampling with sampling frequency sinusoids signals with a frequency of 0.4 , 0.6 , 1.4 and
1.6 become indistinguishable.
0 1 2 3 4 5 6
t [s]
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
Amplitude
0.4 fs
sampled at f
s
1.4 f
s
sampled at fs
Figure 3.2: Aliasing is visualized for two sinusoidal signals. After sampling with a sampling frequency the two sinusoidal
signals with a frequency of . and . respectively, become indistinguishable.
3.3. Conclusion
The discrete Fourier transform is used to convert a finite time sequence into the frequency domain.
This is relevant to our research as numerous properties of speckle patterns will be computed as time
sequences. The frequencies that can be distinguished are multiples of the fundamental frequency
(see (3.3)). The Nyquist folding frequency is half the sampling frequency. Thus, the sampling rate
of 12.5𝐻𝑧, as used in present research, should be sufficient to detect the introduced 1𝐻𝑧 frequency.
Aliasing causes the 11.5𝐻𝑧 frequency to fold back to 1𝐻𝑧 in the Fourier spectrum. Although this causes
noise, the folding should not impact the results enormously, as the frequency of 1𝐻𝑧 is predominant.
4
Fractality
Fractality is one of the properties of the speckle patterns that is used in this research to form a time
sequence that will be converted in to the frequency domain. First, the underlying theory is elaborated
in Sec. 4.1. In Sec. 4.2 the implementation of different fractal dimensions in this research is discussed.
Lastly, the preliminary results are presented and discussed in Sec. 4.3.
4.1. Theory
Fractality describes the scaling symmetry exhibited by natural phenomena or mathematical figures.
This is closely linked to the degree of roughness and complexity. In order to quantify the fractal be-
havior of phenomena, the fractal dimension can be calculated. This indicates how the number of
non-overlapping self-similar fractals 𝑁 , measuring units so to say, changes when the phenomenon is
scaled up or down [3, 16]:
𝐷 =
ln (𝑁 )
ln( )
, (4.1)
where 𝑟 is the scaling ratio and 𝐷 the similarity dimension. The scaling ratio concerns the size of the
self-similar fractal that is used to measure the phenomenon. For geometric figures, such as a straight
line, square and cube, the similarity dimension will be an integer number.
For instance, when the size of the square measuring unit is divided in half (𝑟 = ), four times as
many of them (𝑁 = 4) are needed to cover the same area. This results in the expected similarity
dimension of 2, which is equal to its topological dimension. This is visualized in Fig 4.1.
For fractals however this is not the case; the similarity dimension will be a non-integer and will
therefore differ from the topological dimension of the fractal. An excellent example of this is the Koch
Snowflake [3, 16], as displayed in Fig 4.2. The circumference of this Koch Snowflake will be shown to
have the non-integer dimension of 1.26.
For the Koch Snowflake the building block is an equilateral triangle. As can be seen from Fig.
4.2, each time the scaling factor 𝑟 = is applied, every line segment will split into 3 equal parts and
the same building block will be implemented on the middle segment. By doing so the contour of the
figure becomes of its original size. The non-overlapping self-similar fractal in this case, is the side
of the equilateral triangles with a length that is that of the length of the side of the original triangle.
Therefore, the number of non-overlapping self-similar fractals will increase by factor 4: 𝑁 = 4. From
this a similarity dimension 𝐷 = 1.26 follows.
A distinction between exact fractals and statistical fractals can be made. Exact fractals, such as the
Koch Snowflake, are perfectly self-similar: the same pattern repeats itself at every scale. On the other
hand, for statistical fractals only the statistical properties repeat themselves at the different scales. For
the present research, statistical fractality is of interest.
In order to apply the theory of statistical fractality to a speckle pattern that changes over time,
box counting techniques are well suited. This comes down to dividing the entire image into boxes
of equal size and determining how many of these boxes of specific size are needed to cover all the
non-background pixels of the image [19]. The mathematical way of determining the number of boxes,
depends on the chosen box counting method and will be discussed in Sec. 4.2.
17
18 4. Fractality
Figure 4.1: Traditional scaling for 1D, 2D and 3D. When scaling the size of the measuring unit (line for 1D, square for 2D, cube
for 3D) with , the number of measuring units needed to cover the entire geometry goes as .
Figure 4.2: Koch Snowflake with . . Each time the image is scaled with the number of non-overlapping
self-similar fractals, equilateral triangle sides, , is multiplied by .
Repeating the process for boxes of different sizes results in a relationship between the box size 𝑠
and the number of boxes needed to cover all the non-background pixels of the image 𝑁 . The box size
𝑠 is similar to the scaling ratio 𝑟, that was used in Sec. 4.1, resulting in:
𝐷 =
ln (𝑁 )
ln( )
. (4.2)
Linear fitting through the data-points (ln ( ) , ln (𝑁 )) will therefore give 𝐷 as the slope.
Physical Implication
It is important to note the physical meaning of the steepness of the slope. For the box counting tech-
niques used in this research, the value of the fractal dimension will range between 1 and 2. A fractal
dimension of 1 represents a straight line, whereas a dimension of 2 corresponds to a line that makes
up a plane by wiggling through space. The fractality is thus a measure of the ability of a pattern to
fill 2D space. This is directly linked to its complexity: a higher fractal dimension also means that with
decreasing box size the object becomes more complex [10].
4.2. Experimental Method 19
A second way to gain a physical intuition about fractality is by looking at it as the degree of roughness
in an image. This is often applied in studying textures, as the fractality captures how coarseness
is spread over a surface. Higher fractal dimensions correspond to rougher, more coarse surfaces
[5, 32, 33].
4.2. Experimental Method
For analyzing the speckle patterns retrieved from the OptoFluids code, it is useful to make use of
available software such as ImageJ in combination with the plug-in FracLac. FracLac allows for
multiple ways of applying box counting to an image. Below a brief descriptions of the different box
counting options in FracLac are given.
4.2.1. Binary Box Counting
For binary box counting the value for each pixel is converted into a binary value. By default, the pixel
color (either black or white) that appears most is set as the background color. In determining the number
of boxes needed to cover the entire image, the number of boxes containing non-background pixels is
simply counted. This standard way of box counting results in a fractal dimension that is denoted by
FracLac as 𝐷 . 𝐷 is given by a formula similar to (4.2), with 𝑠 the relative box size:
𝐷 =
ln (𝑁 )
ln( )
. (4.3)
Linear fitting through the data-points (ln ( ) , ln (𝑁 )) will therefore give 𝐷 as the slope.
It should be noted that in the conversion from grayscale (which would be natural to use for the
output of the OptoFluids code) to binary, information is lost. Aditionally, information is lost in the
way of box counting, as the possibility of more non-background colored pixels being in the same box
is not accounted for. The mass box counting method does take this possibility into consideration, as
discussed in Sec. 4.2.2.
4.2.2. Differential Grayscale Box Counting
For grayscale analysis, the fact that the pixels take values from 0 (black) to 255 (white) is used. In
order to do so, it is no longer possible to just look at which boxes contain valuable information, i.e.
non-background colored pixels. The calculations are therefore adjusted in the following way: given a
certain box size 𝑠, for each box position (𝑖, 𝑗) the difference in intensity 𝛿𝐼 , , between the pixel with
maximum intensity and the pixel with minimum intensity within that box is determined:
𝛿𝐼 , , = 𝐼 ( , , ) − 𝐼 ( , , ). (4.4)
These differences in intensity for a given box size are then summed over all the boxes to determine the
intensity value 𝐼 that then corresponds with box size 𝑠:
𝐼 = ∑
,
(1 + 𝛿𝐼 , , ) . (4.5)
Finally, the fractal dimension for grayscale analysis 𝐷 , is given by:
𝐷 , =
ln (𝐼 )
ln( )
. (4.6)
4.2.3. Mass Box Counting
For mass box counting, the number of non-background pixels per box is determined and used to cal-
culate the average non-background colored pixels per box 𝜇 . The mass fractal dimension 𝐷 is then
calculated in the following way for binary analysis:
𝐷 =
ln (𝜇 )
ln( )
. (4.7)
20 4. Fractality
The grayscale analogue to (4.7) is determined by dividing 𝐼 by the total number of boxes 𝑁 , to
calculate the average per box 𝐼 :
𝐼 =
𝐼
𝑁 ,
, (4.8)
which is then used to calculate the mass fractal dimension 𝐷 , :
𝐷 , =
ln (𝐼 )
ln(𝑠)
. (4.9)
4.2.4. Mean Fractal Dimension
Another refinement that can be made is averaging over different grid orientations, as the calculation
of the fractal dimension will depend on the orientation of the grid as illustrated in Fig. 4.3. Depending
on the orientation of the grid, represented by the gray squares, with respect to the object, the white
triangle, there are more or fewer gray squares needed to cover the entire object. By performing the
same calculation for a number of different grid orientations 𝑁 and then averaging, the influence of the
grid orientation on the result should be reduced. The mean fractal dimension 𝐷 is then given by:
𝐷 =
1
𝑁
∑ 𝐷 (𝐺). (4.10)
FracLac applies this way of averaging to both the standard box counting methods 𝐷 and 𝐷 in both
binary and grayscale analysis, resulting in 𝐷 , 𝐷 , 𝐷 , and 𝐷 , . In the remainder the bar
notation will be dropped; all the discussed fractal dimensions will be grid averaged, unless specified
otherwise.
Figure 4.3: Influence of grid orientation on the number of boxes needed to cover the entire image of non-background pixels.
4.2.5. Average Cover
A final fractal dimension that can be calculated using FracLac is based on the average cover over all
grids. So instead of calculating the fractal dimension for each grid and then averaging it over these
grids, the cover for each box size will be averaged over the grids:
𝑁 =
1
𝑁
∑ 𝑁 (𝐺). (4.11)
Then this average cover will be used for calculating an analogue to 𝐷 :
𝐷 =
ln(𝑁 )
ln( )
. (4.12)
In the grayscale analysis the analogue to 𝐷 will be denoted as 𝐷 , .
4.3. Preliminary Results 21
4.2.6. Summary Fractal Dimensions
To summarize, for each speckle pattern six different fractal dimensions will be calculated, as shown in
Table. 4.1.
Table 4.1: Summary Fractal Dimensions
Binary Grayscale
Box counting fractal dimension averaged over grids 𝐷 (Sec. 4.2.1) 𝐷 , (Sec. 4.2.2)
Mass box counting fractal dimension averaged over grids 𝐷 (Sec. 4.2.3) 𝐷 , (Sec. 4.2.3)
Cover averaged over grids 𝐷 (Sec. 4.2.5) 𝐷 , (Sec. 4.2.5)
4.3. Preliminary Results
For the fractal analysis, 34 equally time spaced speckle patterns are used, which corresponds to 2.64
periods of the input signal. These patterns are constructed as described in Sec. 2.2.4 and the used
metrics are summarized in Table 4.1: the ’blurred’ speckle patterns that are used for the analysis are
constructed out of 20 instantaneous speckle patterns recorded equally time spaced in 100𝜇𝑠. The time
between the ’blurred’ speckle patterns is 0.08𝑠, which corresponds to a sampling frequency of 12.5𝐻𝑧.
4.3.1. Time Domain
The fractal dimension is determined six times making use of the methods described in Sec. 4.2. The
resulting time sequences are shown in Fig. 4.4.
0 1 2 3
t [s]
1.66
1.68
1.7
1.72
DB
a
0 1 2 3
t [s]
1.66
1.68
1.7
1.72
DM
b
0 1 2 3
t [s]
1.66
1.68
1.7
1.72
Dx
c
0 1 2 3
t[s]
1.38
1.4
1.42
1.44
1.46
DB,gray
d
0 1 2 3
t [s]
0.38
0.4
0.42
0.44
0.46
DM,gray
e
0 1 2 3
t [s]
1.38
1.4
1.42
1.44
1.46
Dx,gray
f
Figure 4.4: Six different measures for the fractal dimension are shown. These are calculated for 34 succeeding speckle
patterns with a sample rate of . . a (d) binary (grayscale) box counting, b (e) binary (grayscale) mass box counting, c (e)
binary (grayscale) average cover.
When zooming in on the binary fractal dimensions, Fig. 4.4 (a,b,c), similarities in the time dependent
behavior can be found. In the first place, 𝐷 and 𝐷 are identical. This would suggest that accounting
for the fact that there can be multiple non-background pixels in one box does not significantly alter the
results or improve the outcome.
The fact that 𝐷 (𝐷 , ) displays the same behavior as 𝐷 (𝐷 , ) is what one would expect from
the way they are calculated. The difference comes from the fact that the averaging for 𝐷 (𝐷 , ) over
the grids is done before applying the regression, whereas for 𝐷 (𝐷 , ) the process of calculating
the fractal dimension is done for each individual grid and then averaged over the grids. After explicitly
checking whether 𝐷 (𝐷 , ) is just a shifted version of 𝐷 (𝐷 , ), it is found that this is not the
22 4. Fractality
0 0.5 1 1.5 2 2.5 3
t [s]
2
3
4
5
6
7
8
9
10
DB−Dx
×10-3
Binary
Grayscale
Figure 4.5: Difference between ( , ) and ( , ). These differences turn out not be be constant, but seem to
fluctuate around a value with order of magnitude . This is significantly smaller than the typical value for the fractal
dimension, regardless of the applied calculation method.
case. This is shown in Fig. 4.5. To conclude, as 𝐷 (𝐷 , ) follows the same trend as 𝐷 (𝐷 , )
we would expect their Fourier spectra to be similar.
For the grayscale analysis the values of 𝐷 , and 𝐷 , differ a lot. Closely analyzing the
data suggests that the values of 𝐷 , are the values of 𝐷 , mirrored in a horizontal line around
𝐷 ≃ 0.9. This hypothesis is confirmed by calculating the average of 𝐷 , and 𝐷 , for every time
instance: the result is a horizontal line at 𝐷 = 0.9218 as displayed in Fig. 4.6. The mirroring behavior
is not what one would expect from (4.9), as this allows for rewriting 𝐷 , as:
𝐷 , =
ln(𝐼 )
ln(𝑠)
= 𝐷 − 𝐷 , . (4.13)
The fact that (4.13) does not hold for the experimental data follows from looking at Fig. 4.4 (a,b,c),
subtracting 𝐷 , from 𝐷 will clearly give values smaller observed in Fig. 4.4 (c). The equations for
(4.3), (4.6) and (4.9) were checked with FracLac’s logbooks on the used computations. Additionally,
it was checked whether the equations (4.3), (4.6) and (4.9) would yield positive values for the fractal
dimension. Finding the reason for the mirroring behavior and the fact that (4.13) does not hold remains
open to further investigation.
Ultimately, not the real time but the frequency domain behavior of the fractal dimension is relevant
for this research. Therefore, it is important to discuss the implications of this mirroring behavior on
this. In Appendix A.1 a case study on this is conducted. The implication on the results for 𝐷 ,
and 𝐷 , is that they contain the same frequency information after accounting for their offsets. No
additional value is added from analyzing them separately.
4.3.2. Frequency Domain
As the average value of the fractal dimension is not relevant, subtracting this average value from the
time sequence as displayed in Fig. 4.4 will remove the 0𝐻𝑧 component from the frequency domain,
allowing us to better visualize the non-zero frequency components.
The purpose of constructing these Fourier spectra is being able to determine whether the 1𝐻𝑧
frequency of the imposed boundary conditions (2.49) can be retrieved from the fractality speckle pattern
analysis. From Fig. 4.7 it is not possible to retrieve this 1𝐻𝑧 frequency. Neither the binary, Fig. 4.7a,
nor the grayscale analysis, Fig. 4.7b, shows a significant peak around 1𝐻𝑧 compared to the other
frequencies. The result that is obtained seems to be noise. Hypotheses will be discussed in Ch. 7.
A final step will be to verify that the obtained Fourier spectra are at least consistent with each other.
As the binary 𝐷 and 𝐷 have identical time sequences, their Fourier spectrum is also identical. The
4.3. Preliminary Results 23
0 0.5 1 1.5 2 2.5 3
t [s]
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6D
D
B
D
M
D
x
mirrorline: 0.5 (D
B
+D
M
)
Figure 4.6: The grayscale fractal dimensions are displayed as a function of time for the speckle images. The values of
and are related by mirroring in the dashed at line . .
0 1 2 3 4 5 6 7
f [Hz]
0
1
2
3
4
5
6
7
Power
×10-3 a
D
B
DM
Dx
0 1 2 3 4 5 6 7
f [Hz]
0
0.002
0.004
0.006
0.008
0.01
0.012
Power
b
D
B
D
M
Dx
Figure 4.7: The discrete time discrete Fourier transform for the six fractal dimension time sequences in the frequency range
. . a contains the three considered binary fractal dimension, b contains the three considered grayscale fractal
dimensions.
fact that the Fourier spectra for 𝐷 and 𝐷 , both for the binary and grayscale analysis, behave very
similarly is consistent with the fact that the differences between the 𝐷 and 𝐷 time sequence values
are very small, as displayed in Fig. 4.5. Additionally, there seems to be consistency up to a certain level
between the binary and grayscale analysis: both process the data in a different way and therefore the
hypothesis that noise is processed explains why both yield different Fourier spectra. Fig. 4.7 justifies
that one may regard only 𝐷 and 𝐷 , as relevant parameters, as the behavior of the other binary
(grayscale) does not seem to deviate from 𝐷 (𝐷 , ) considerably.
Thesis Fabian Brull
5
Correlations
Three different correlation functions will be used to develop time sequences that can be converted into
the frequency domain making use of the discrete Fourier transform. In Sec. 5.1 the theory behind
each of these three methods will be discussed. In Sec. 5.2 the process of processing speckle patterns
making use of these theories will be be discussed briefly. The preliminary results that follow from the
correlation analysis will be presented in Sec. 5.3.
5.1. Theory
5.1.1. Correlation Coefficient
The dynamics of the scattering particles cause the measured intensities to vary over time, i.e. the
speckle patterns change over time due to the motion of these particles. Nemati and others define the
temporal field correlation g1 in order to quantify these fluctuations [18]:
𝑔 (𝜏) =
1
𝑇
∫ 𝐸∗
(𝑡)𝐸(𝑡 + 𝜏)𝑑𝑡, (5.1)
where 𝜏 is the correlation time, 𝑇 the exposure time, 𝐸(𝑡) the time-dependent complex electric field and
𝐸∗
(𝑡) its complex conjugate. The physical electric field ℰ(𝑡) is related to the complex electric field in
the following way:
ℰ(𝑡) = 𝑅𝑒(𝐸(𝑡)). (5.2)
The correlation time 𝜏 is similar to the delay time in the autocorrelation. It is stated by Nemati and
others that this is related to the velocity of the scatterers, which in its turn depends on the distribution
of the scattering particles [18].
In order to quantify the frequency spectrum of fluctuations in intensity in the speckle patterns due to
the motion of the particles, and thus extract an heartbeat, the correlation coefficient 𝑐𝑐 is constructed
[18]:
𝑐𝑐(𝑡) =
∑ ∑ (𝑓 − ̄𝑓)(𝑔 − ̄𝑔)
√∑ ∑ (𝑓 − ̄𝑓) √∑ ∑ (𝑔 − ̄𝑔)
, (5.3)
where 𝑓 denotes the intensity of pixel (𝑘, 𝑙) at a certain time 𝑡 and ̄𝑓 is the instantaneously area-
averaged intensity at that time 𝑡. 𝑔 denotes the intensity of that same pixel in the next time frame, ̄𝑔
is again the instantaneously area-averaged intensity. 𝑘 and 𝑙 both range from 1 to 𝑁 in case of a square
𝑁 x 𝑁 pixel detector. The denominator is implemented in order to normalize the result. By Nemati and
others it is stated that the correlation coefficient will range between 0 and 1 [18]. However, in case that
𝑓 > ̄𝑓 for all 𝑔 < ̄𝑔 and 𝑓 < ̄𝑓 for all 𝑔 > ̄𝑔, a negative value for the correlation coefficient will
result. We therefore assume that the author implied that the absolute value of the correlation coefficient
will be between 0 and 1. The results of the correlation coefficient in Sec. 5.3.1 calculation will support
this argument.
25
26 5. Correlations
In case of 𝑀 equally time-spaced speckle patterns, the value for the correlation coefficient 𝑐𝑐 is
calculated 𝑀 − 1 times, resulting in a time sequence. This will then be converted into a frequency
spectrum making use of the discrete Fourier transform.
Physical Implication
Important to note is the physics behind the mathematical operation: the correlation coefficient is basi-
cally a measure of how the intensity of a certain pixel (𝑘, 𝑙) relates to its value one time step further.
Specifically, the difference between the value of that certain pixel (𝑘, 𝑙) and the average image inten-
sity is compared to that of the next time step. In case the value of the pixel compared to the average
intensity is very similar, the correlation coefficient approaches a value of 1. This means that the ’rough-
ness’ of the image, i.e. the localization of dark and bright spots, is very similar for two succeeding time
steps. This would happen if the positions of the particles hardly change in the elapsed time, which
corresponds to low velocity of the fluid.
In case the ’roughness’ of the succeeding time step is completely uncorrelated to that of the previous
image, the correlation coefficient will approach 0. This corresponds to rapid changing particle positions
due to the velocity of the fluid.
Conditions for a negative correlation coefficient are discussed above. For a value for the correlation
coefficient of −1 the ’roughness’ of the succeeding picture has to have the inverse roughness of the
first picture, i.e. bright spots where the dark spots were previously located and vice versa.
The likelihood of obtaining a correlation coefficient of −1 is small as the change in the speckle
patterns is governed by the particle motion, i.e. there is no reason why the particles in the next time
frame would be positioned in exactly such a way that the speckle pattern will be inverted.
On the contrary, for closely time-spaced measurements one would expect that the particles have
barely changed their positions resulting in a speckle pattern that is very similar to that of the previous
time step, resulting in a value for correlation coefficient close to 1. This behavior is indeed observed
for the speckle patterns that are used for integration to create a blurred speckle pattern.
5.1.2. Autocorrelation
The autocorrelation function is a statistical computation that describes the correlation between different
time steps of the same random process. It provides a measure of the similarity of values for different
times of a single signal. The autocorrelation for a stochastic process 𝑥(𝑛) at time steps 𝑘 and 𝑙 is given
as:
𝑟 (𝑘, 𝑙) = 𝐸[𝑥(𝑘)𝑥∗
(𝑙)] (5.4)
Stationarity is the notion of time-invariant behavior of stochastic processes. Wide sense stationarity is
a form of stationarity that only limits the behavior of the ensemble averages. The conditions for wide
sense stationarity are the following [34]:
𝑚 (𝑘) = 𝑚 < ∞,
𝑟 (𝑘, 𝑙) = 𝑟 (𝑘 − 𝑙) ∀(𝑘, 𝑙),
𝑐 (0) < ∞,
(5.5)
where 𝑚 (𝑛) is the mean function of 𝑥(𝑛) and 𝑐 (𝑛) is the autocovariance function of 𝑥(𝑛). For a finite
length wide sense stationary process [𝑥(𝑛)]( )
( )
, a time averaged autocorrelation can be calculated
in the following way:
̂𝑟 (𝑘, 𝑁) =
1
𝑁
∑ 𝑥(𝑛)𝑥∗
(𝑛 − 𝑘). (5.6)
In case this time averaged autocorrelation function approaches the true autocorrelation function 𝑟 (𝑘),
the wide sense stationary process will be called autocorrelation ergodic.
Nonrandom Variable
In analyzing speckle patterns, the autocorrelation function can be calculated for the intensity of a certain
pixel over time. This is done by multiplying the value for the intensity of a certain pixel by the value of
the intensity of that same pixel at a different moment in time. The difference between the compared
times is the lag 𝜏. For a given data series there are multiple samples with the same lag. The value
5.1. Theory 27
of the contrast function is calculated by averaging over the intensity products with the same lag. This
result is then scaled by the average value of the intensity squared, in order to normalize the contrast
function at 𝜏 = 0. Taken altogether, the contrast function 𝑔 can compactly be denoted as1
:
𝑔 (⃗𝑟, 𝜏) =
⟨𝐼(⃗𝑟, 𝑡) ∙ 𝐼(⃗𝑟, 𝑡 + 𝜏)⟩
⟨𝐼(⃗𝑟, 𝜏) ⟩
. (5.7)
This is closely linked to (5.6). However, it should be noted that the intensity of a pixel at a certain time is
not a stochastic process. This intensity is the deterministic result of the incoming electromagnetic wave
reflecting on the particle configuration that is specified in the simulation. The initial particle positions
are generated randomly with (2.3), their positions for later time steps are the result of a periodic blood
flow. Accordingly, the speckle patterns are random to a certain degree, but if the elapsed time between
them is sufficiently small coherence is expected.
Furthermore, if the intensity of a pixel at a certain time would be a stochastic process, analyzing this
time evolution in order to retrieve a heartbeat would be a vain attempt. The similarity to (5.6) can be
found in comparing ⟨𝐼(⃗𝑟, 𝑡) ∙ 𝐼(⃗𝑟, 𝑡 + 𝜏)⟩ to ̂𝑟 (𝑘, 𝑁), this is just a different notation for ̂𝑟( ⃗)(𝑘, 𝑁). From
this it becomes clear that the average is computed over different numbers of products for different time
lags. This can be understood intuitively: for 𝜏 = 1 one can take the product of the intensity at the first
time step with the second time step, the second with the third time step and so on to calculate the
average. For 𝜏 = 𝑁 −1 one can only take the product of the intensity of the first and last sample
to calculate the time averaged autocorrelation.
Accordingly, an impact on the uncertainty can be expected: for small lags the average is calculated
over a large number of products resulting in a relatively low uncertainty in the mean. For large lags the
average is calculated over an increasingly small sample number, with a larger uncertainly in the mean
as a result.
Falsely treating the variable 𝐼(⃗𝑟, 𝑡) ∙ 𝐼(⃗𝑟, 𝑡 + 𝜏) as random variable 𝑋(⃗𝑟, 𝑡, 𝜏) with E(𝑋) = 𝜇(⃗𝑟, 𝜏) and
Var(𝑋) = 𝜎 and 𝑆 (⃗𝑟, 𝜏) = ∑ 𝑋(⃗𝑟, 𝑡, 𝜏) would result in the following [34]:
E (
𝑆 (⃗𝑟, 𝜏)
𝑁
) = ⟨𝐼(⃗𝑟, 𝑡) ∙ 𝐼(⃗𝑟, 𝑡 + 𝜏)⟩ =
1
𝑁
∑ 𝑋(⃗𝑟, 𝑡, 𝜏) = 𝜇(⃗𝑟, 𝜏), (5.8)
Var (
𝑆 (⃗𝑟, 𝜏)
𝑁
) =
𝜎
𝑁
, (5.9)
where 𝑁 denotes the number of pairs with a certain lag 𝜏. For the standard deviation this would imply:
std (
𝑆 (⃗𝑟, 𝜏)
𝑁
) =
𝜎
√𝑁
. (5.10)
It should be noted that this standard deviation describes the behavior of the mean: for an increasing
number of samples, ( ⃗, )
is more likely to be equal to E(
( ⃗, )
). The behavior of the standard
deviation of the actual nonrandom variable 𝑔 can be compared to this behavior. To do so,
⟨ ( ⃗, )∙ ( ⃗, )⟩
⟨ ( ⃗, ) ⟩
will be calculated for equally sized subsets of data points for fixed 𝜏. The standard deviation between the
means of these subsets, 𝜎 , is then used to quantify the certainty in the mean that was calculated
over all data points: the autocorrelation function 𝑔 . Furthermore, the standard deviation of ( ⃗, )∙ ( ⃗, )
⟨ ( ⃗, ) ⟩
can be calculated as a function of 𝜏. This is a measure for the spread in data points and will be denoted
as 𝜎 .
Physical Implication
When the physical implications of the autocorrelation function 𝑔 are considered, it should be noted
that these are very similar to those of the correlation coefficient in Sec. 5.1.1. It captures how similar
the intensity of each pixel (𝑘, 𝑙) is to that of the same pixel (𝑘, 𝑙) at a later point in the time sequence.
The main difference is that this is done for all the different time lags that are possible for a certain
pixel (𝑘, 𝑙). So instead of a summation over all pixels for a time lag of 1, the autocorrelation function is
1Note the difference with the normalized intensity autocorrelation function [25]. In order to normalize the contrast function at
, the definition as stated in (5.7) is used in present research.
28 5. Correlations
calculated for each pixel individually for varying time lags. As a result the contrast function is a function
of both space (i.e. pixel coordinate) and time lag.
A second difference is the fact that the pixel intensities are compared directly, instead of looking
at their difference with the mean intensity of the entire screen. Regardless of the differences, the
autocorrelation is a measure for how similar the intensity at a certain pixel position (𝑘, 𝑙) is to that
of the same pixel later on in the time sequence. Equality of the intensities will give a value for the
autocorrelation function of 1.
5.1.3. Speckle Contrast
A final parameter that was shown to be useful to quantify changes in speckle patterns is the speckle
contrast. The speckle contrast 𝑆𝐶 is defined as [11, 12]:
𝑆𝐶 =
𝜎
⟨𝐼⟩
, (5.11)
where 𝜎 is the standard deviation of the pixel intensity and ⟨𝐼⟩ the average pixel intensity. This speckle
contrast will be determined for each of the equally time spaced speckle patterns, resulting in a time
sequence.
For an infinite number of pixels per speckle the speckle contrast will approach the value of 1 [11, 12].
In case of a fine, but not infinitely fine mesh, values close to 1 are typical. This would mean that the
value for the speckle contrast would have a constant value for all time steps, making it impossible
to use in order to retrieve an heartbeat. Averaging over multiple instantaneous speckle patterns, as
necessary to mimic a real camera, will cause velocity-dependent blurring. Namely, if the particles move
considerably between succeeding instantaneous images, the result will be blurred to a higher degree
than in case they barely move. Blurring reduces 𝜎 and thus the speckle contrast. To conclude, the
speckle contrast is a measure for the blurriness, which is velocity-dependent.
Physical Implication
The physical meaning of the above stated speckle contrast can be intuitively understood by looking at
a binary image (black (0) and white (255) pixels) and a grayscale image (pixel intensities between 0
and 255). If the binary image consists of an equal amount of black and white pixels and the grayscale
images of pixel intensities homogeneously spread between 0 and 255, the average pixel intensity of
both images will be the same. This is shown in Fig. 5.1. However, 𝜎 will be larger than 𝜎 ,
resulting in a higher speckle contrast for the binary image and a lower speckle contrast for the grayscale
image. To conclude, the speckle contrast is a measure for the spread in pixel intensities within a certain
speckle pattern compared to the average intensity of that certain image.
Figure 5.1: Comparison of speckle images with the same average intensity. For the grayscale image on the left, the standard
deviation is lower than for the binary image on the right. As a result, the grayscale image has a lower speckle contrast than the
binary image.
Having looked at what two speckle patterns with the same average intensity but different speckle
contrasts look like, it is important to discuss the physical mechanism that governs these differences.
5.2. Experimental Method 29
As described in Sec. 2.2.4, a single time step speckle pattern is created by integration over 20 in-
stantaneous speckle images 5𝜇𝑠 apart in time in order to mimic an actual camera. Depending on how
different these 20 instantaneous images are, the resulting speckle pattern will be blurred to a higher or
lower degree.
This can be understood in the following way: if the particles are not moving significantly, the 20
images that will be used for integration will be more or less the same, leading to minimal blurring. On
the other hand, if there is considerable movement of the particles, the 20 instantaneous will be very
different, resulting in a very blurred image.
From this one could conclude that blurred images, with a low speckle contrast, correspond to a high
blood velocity and that rather clean images, with a high speckle contrast, correspond to a low blood
velocity.
5.2. Experimental Method
All three correlations (correlation coefficient of Sec. 5.1.1, autocorrelation of Sec. 5.1.2 and speckle
contrast of Sec. 5.1.3) are determined by loading the speckle patterns into MATLAB R2015b. Making
use of (5.3), (5.7) and (5.11) respectively, the time series are calculated and then converted into a
frequency spectrum, making use of the discrete Fourier transform, as was described in Sec. 3.1.
5.3. Preliminary Results
For the correlation analysis, 81 equally time-spaced speckle patterns are used. These are again con-
structed as described in Sec. 2.2.4. The time between the ’blurred’ speckle patterns is 0.08𝑠, which
comes down to a sampling frequency of 12.5𝐻𝑧. This is equal to the settings used for the fractality
analysis in Sec. 4.3.
5.3.1. Correlation Coefficient
0 20 40 60 80
# sample
-0.05
-0.04
-0.03
-0.02
-0.01
0
0.01
0.02
0.03
0.04
0.05
CC
a
0 1 2 3 4 5 6 7
f (Hz)
0
1
2
3
4
5
6
7
8
9
Power
×10-3 b
Figure 5.2: a: The time sequence for the correlation coefficient, consisting of data points, that results from analyzing the
speckle images is displayed. b: Fourier spectrum that results from converting the correlation coefficient time sequence from a
into the frequency domain using the discrete Fourier transform.
In Fig. 5.2a, the time sequence for the correlation coefficient is shown. Fig. 5.2b contains the
corresponding Fourier spectrum. Although Fig. 5.2 contains peaks around the frequency of 1𝐻𝑧, these
are not predominantly present. As a result, it is not possible to retrieve the frequency of the imposed
signal (2.49) of 1𝐻𝑧. Similarly to the results in Sec. 4.3, the recorded signal seems to be noise rather
than the sinusoidal input signal.
30 5. Correlations
5.3.2. Autocorrelation
The results for the autocorrelation function are both a function of the time lag and the position. There-
fore, it is possible to display the results in numerous ways. Here, there is chosen to look at the behavior
of all pixels (𝑘, 𝑙) for a certain lag and the behavior of a certain pixel [(64, 64)] for different time lags 𝜏.
a
20 60 100
# Pixel
20
40
60
80
100
120
#Pixel
0.2
0.4
0.6
0.8
b
20 60 100
# Pixel
20
40
60
80
100
120
#Pixel
0.2
0.4
0.6
0.8
c
20 60 100
# Pixel
20
40
60
80
100
120
#Pixel
0.2
0.4
0.6
0.8
d
20 60 100
# Pixel
20
40
60
80
100
120
#Pixel
0
0.5
1
1.5
2
2.5
Figure 5.3: Values of the autocorrelation function displayed as color plot for different time lags. a: , b: , c:
, d: .
The results for all pixels for a certain time lag are shown in 5.3. It follows from Fig. 5.3 that the value
of the correlation function changes significantly over time. Important here is to note the changing limits
for the color bar; for Fig. 5.3d the value of the autocorrelation function starts to deviate from the range
[0, 1], which was valid for the first three time lags. The spread in the values for different pixels tends
to increase as the time lag increases. This can partly be accounted for by the fact that for the higher
time lags the averaging in calculating the value for 𝑔 had to be done over fewer samples. For 𝜏 = 74,
only 7 samples could be used for averaging, which is considerably smaller than the 80 combinations
that can be used in the calculation for 𝜏 = 1.
Next, the results for the pixel (64, 64) will be discussed (see Fig. 5.4). It follows from Fig. 5.4a
that the speckle patterns are instantly uncorrelated. The error bars that are plotted are calculated by
dividing the data points for 𝜏 = 1, 11, 21, 31, 41, 51, 61 into subsets of 10 data points, that are then used
to calculate 𝑔 for these subsets. The standard deviation in the values of 𝑔 for the subsets, 𝜎
quantifies the certainty in the value for 𝑔 that was calculated using (5.7).
The discrete Fourier transform can been seen in Fig. 5.4b. The 0𝐻𝑧 frequency was set to 0 by
subtracting the mean value from the signal. It follows from Fig. 5.4b that there is no predominant peak
around the desired frequency of 1𝐻𝑧. On the contrary, the Fourier spectrum contains components for all
the different frequencies. This is once more an indication that the speckle patterns that are processed
do not reflect the periodicity that was imposed by the boundary conditions through a pressure gradient.
Different pixels lead to similar results.
The behavior of the standard deviation of 𝑔 of pixel (64, 64) for increasing 𝜏 will be further analyzed
5.3. Preliminary Results 31
0 20 40 60 80
τ
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
g2
a
0 1 2 3 4 5 6 7
f (Hz)
0
0.01
0.02
0.03
0.04
0.05
0.06
Power
b
Figure 5.4: a: The autocorrelation for the pixel ( , ) is displayed as function of time lag with error bars. These error bars
are plotted for the data points , , , , , , . b: The discrete Fourier Transform of the time sequence with the
frequency set to .
0 10 20 30 40 50 60 70 80 90
# of samples
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
σ
σ
spread
σmean
~N-1/2
Figure 5.5: The spread of the data points, , and the uncertainty in , , are plotted for the pixel ( , ).
Although decreases with an increasing number of samples, it does not display the behavior of a random variable, ,
as indicated with the dashed line.
in Fig. 5.5. The distinction between the certainty in the calculated mean, as plotted in Fig. 5.4a and
spread in data points is taken into account.
The standard deviation of ( ⃗, )∙ ( ⃗, )
⟨ ( ⃗, ) ⟩
, 𝜎 , is calculated as a function of the number of samples
corresponding to 𝜏. This is a measure for the spread in data points. In Fig. 5.5, 𝜎 is plotted.
No clear dependency on the number of samples can be identified. Additionally, the certainty in the
calculated value of 𝑔 , 𝜎 , is plotted in the same figure (Fig. 5.5). For comparison the expected
relationship for a random variable (see (5.10)) is included. The behavior of the uncertainty in the mean
for a random variable will go as 𝑁 , where 𝑁 denotes the number of samples that is used for averaging.
32 5. Correlations
Although 𝜎 decreases with an increasing number of samples, a 𝑁 -relationship does not fit
through the data points. It was expressed in Sec. 5.1.2 that the behavior of 𝑔 will be different from
that of a random variable.
The general tendency that 𝜎 increases with a decreasing number of samples is consistent with
the fact that the averaging must be done over fewer combinations for these higher values for 𝜏.
5.3.3. Speckle Contrast
The values of the speckle contrast that are plotted in Fig 5.6a, which are mostly slightly below 1 mainly,
are consistent with what is expected for a mesh of our size [13].
There are no predominant peaks in the Fourier spectrum of Fig 5.6b around the frequency of 1𝐻𝑧.
Therefore, the analysis with speckle contrast did not succeed in retrieving the frequency of the imposed
signal (2.49) of 1𝐻𝑧.
0 1 2 3 4 5 6 7
t [s]
0.93
0.94
0.95
0.96
0.97
0.98
0.99
1
1.01
1.02
SC
a
0 1 2 3 4 5 6 7
f (Hz)
0
1
2
3
4
5
6
7
8
9
Power
×10-3 b
Figure 5.6: a: The speckle contrast for the samples displayed as a function of time. b: the time sequence in converted into
the frequency domain making use of the discrete Fourier transform.
6
Case Study Camera Size
The fact that neither the fractality analysis in Sec 4.3.2, nor the three analyzed correlations as demon-
strated in Sec. 5.3 yields results that allow for the retrieval of the artificial heartbeat frequency, makes
it necessary to seriously question the setup that was used during the simulations. Comparison with
the parameters that were used by Loozen seems a reasonable point to start, given the fact that he has
demonstrated that speckle contrast can be used to retrieve an introduced periodicity underlying the
speckle patterns. The most important differences are the camera size, number of particles, integration
time of the camera and shape of the input signal.
Due to time constraints, we will look into the influence of the camera size on the noisiness of the
results. In order to do so, three speckle patterns as measured by Loozen are used for further analysis. A
prominent difference is the amount of pixels that was used. Our simulations with Van As’ OptoFluids
code make use of a camera consisting of 128 x 128 pixels, which covers a screen with a halfwidth of
1.25𝑐𝑚 as can be seen in Table 2.2. Loozen’s images that are used for this analysis consist of 300 x
300 pixels.
In Fig. 6.1 a speckle pattern as measured by Van As is shown on the left, on the right a speckle
pattern that was experimentally measured by Loozen is shown. The size of a single pixel is equal for
both patterns. This makes it possible to compare the number of pixels that is used to cover a typical
speckle. From visual comparison in Fig. 6.1 it becomes apparent that there seems to be a deviation
in the number of pixels that is used to cover a typical speckle. Van As’ speckle patterns seem to have
bigger speckles when the pixel size is set to equality, which corresponds to more pixels per typical
speckle.
Figure 6.1: Visual comparison between a typical speckle pattern generated by Van As ( x pixels) [30] on the left and
one experimentally measured by Loozen ( x pixels) [15] on the right.
33
34 6. Case Study Camera Size
6.1. Deviations within a Single Image
To investigate the role of the difference in camera size, we will divide the speckle patterns of Loozen
into subsections and look at the deviation between these sections. A first step would be dividing the
300 x 300 pixel image into two halves of 150 x 300 pixels. Repeating the process of calculating the
binary fractal dimension, 𝐷 , as outlined in Sec. 4.2, for both halves makes a comparison between the
two possible. A mean value and standard deviation for the fractal dimension of these two subsections
will be calculated.
The same procedure can be used to divide the original image into 4, 6, 9, 12 and 16 equal sections,
leading to standard deviations and mean values for each. It is interesting to see how the mean values
and standard deviations behave as a function of the number of sections. As the number of screens
increases, the number of pixels per screen necessarily decreases.
This process of chopping the original images into an increasing number of subsections will be ex-
ecuted for three of Loozen’s speckle patterns in order to account for the fact that speckle patterns are
random, i.e. speckle patterns for different time steps have different properties.
Analogous to determining the fractal dimension of sections of the original image and looking at the
standard deviations, one could look at the speckle contrast, as outlined in Sec. 5.2. The results will
then be compared to those of fractal dimension analysis.
6.1.1. Results
In Fig. 6.2 the results for dividing the original image of 300 x 300 pixels into equal-size sections are
plotted for the fractal dimension 𝐷 .
It follows from Fig. 6.2a that the fractal dimension increases with increasing screen size. This
could be explained by the fact that with decreasing camera size the number of non-background pixels
decreases. These non-background pixels are in a way a measure for the roughness of images, which
is directly related to fractal dimension. The pixels size limits the minimal box size. As the pixel size is
the same for the sections of the image and the original image, the smallest box is the same for both.
However, as the subsections are smaller than the original image, the number of boxes needed to cover
all the non-background pixels decreases. This results in a lower fractal dimension.
In Fig. 6.2b it can be seen that the standard deviation tends to decrease for increasing camera size.
The screen size that was used (128 x 128 pixels) corresponds to 𝜎 ≈ 0.005 ∼ 0.01.
In order to determine if these typical values for 𝜎 have a significant influence on the results in Sec.
4.3, we should compare them to the fluctuations over time that were reported in Sec. 4.3. It follows
from Fig. 4.4a that the typical fluctuation over time is in the order of 0.02. This would mean that the
noise to signal ratio is about 0.25 ∼ 0.5.
It follows from Fig. 6.3a that in contrast to the fractal dimension, the speckle contrast does not change
significantly when the size of the camera is changed. The definition of the speckle contrast (see (5.11)),
which relates the standard deviation of the pixel intensity to the mean value, can be used to understand
this. The contrast present in an image does not change when it is divided into parts. Deviations from the
value for the entire image do exist, because locally there can be places with higher and lower contrast.
However, these deviations are due to the random distribution of speckles of the surface, rather than
being governed by a physical principal such as is the case for the fractal dimension.
The behavior of the standard deviation for the speckle contrast between cameras of the same size
is consistent with that of the fractal dimension. In Fig. 6.3b it can be seen that the general trend for all
three of Loozen’s images is that the standard deviation 𝜎 decreases as the screen size is increased.
For the speckle pattern analysis, it is also necessary to compare the typical value of the standard
deviation for a 128 x 128 pixel screen with the fluctuations over time of the speckle contrast as deter-
mined in Sec. 5.3.3. The typical value for 𝜎 is found in Fig. 6.3b and is reported to be in the range of
0.02 ∼ 0.03. It follows from Fig. 5.6 that the over time fluctuations of the speckle contrast as simulated
with van As’ setup are around 0.05. The resulting noise to signal ratio is 0.4 ∼ 0.6.
6.1.2. Conclusion
The analysis of three of Loozen’s speckle patterns suggests that very high noise to signal ratios are
expected for a camera of 128 x 128 pixels. This is consistent with the noisy results that were obtained
for the fractal analysis in Sec. 4.3.2 and three correlation types in Sec. 5.3. Increasing the camera
6.1. Deviations within a Single Image 35
size improves the noise to signal ratio for both the fractal dimension and speckle pattern for Loozen’s
images. Based on this, the hypothesis that increasing the number of camera pixels could allow for
retrieval of the heartbeat can be formulated.
0 1 2 3 4 5
# pixels/screen ×104
1.7
1.72
1.74
1.76
1.78
1.8
1.82
DB
a
1
2
3
0 1 2 3 4 5
# pixels/screen ×104
0
0.002
0.004
0.006
0.008
0.01
0.012
0.014
σDB
b
1
2
3
Figure 6.2: a: Dependency of the fractal dimension on the number of pixel per screen is plotted. The values are computed
by averaging over multiple same-size sections of the same original image. Three different images that were measured by
Loozen are analyzed. The dotted horizontal line indicates the screen size as simulated by Van As. b: The standard deviation
between these sections of the same size is plotted against the number of pixels.
0 1 2 3 4 5
# pixels/screen ×104
0.92
0.925
0.93
0.935
0.94
0.945
0.95
0.955
SC
a
1
2
3
0 1 2 3 4 5
# pixels/screen ×104
0.005
0.01
0.015
0.02
0.025
0.03
0.035
0.04
σSC
b
1
2
3
Figure 6.3: a: Dependency of the speckle contrast on the number of pixels per screen is plotted. The values are computed
by averaging over multiple same-size sections of the same original image. Three different images that were measured by
Loozen are analyzed. The dotted horizontal line indicates the screen size as simulated by Van As. b: The standard deviation
between these sections of the same size is plotted against the number of pixels.
Thesis Fabian Brull
7
Conclusions & Recommendations
7.1. Conclusions
Close attention to the research question, stated in Ch. 1, will be paid when drawing conclusions. The
ultimate goal here is to use simulations with Van As’ OptoFluids code to generate a time sequence
of speckle patterns and seek to retrieve the periodicity of the introduced sinusoidal pressure gradient
which causes the red blood cells to move. The degree to which the speckle patterns are blurred is an
indicator for the velocity of the particles.
In order to retrieve the periodicity, numerous fractal dimensions and correlations have been com-
puted for equally time-spaced images. The time sequences of these properties have been transformed
into the frequency domaain, which allows for the detection of underlying frequencies. Under the con-
ditions of this research, being able to retrieve the periodicity means that the Fourier spectrum of the
analyzed quantity must contain a predominant peak around the frequency of 1𝐻𝑧, which is the fre-
quency of the input signal.
The results of the fractal analysis as discussed in Sec. 4.3, the correlation coefficient in Sec. 5.3.1,
the autocorrelation in Sec. 5.3.2 and the speckle contrast in Sec. 5.3.3, do not contain the desired
predominant peak around 1𝐻𝑧. This can lead to no other conclusion than that in our experiments
the governing frequency has not been retrieved from speckle pattern analysis. Instead noise was
measured.
From the experimental research conducted by others [15, 18, 19], it is known that the fractal di-
mension, correlation coefficient and speckle contrast are suitable parameters for extracting information
from speckle patterns in order to retrieve a periodicity that was introduced experimentally. The fact
that these same parameters were unsuccessful in retrieving the periodicity that was introduced in the
simulations could indicate that differences in the settings, e.g. camera size, between the OptoFluids
code and experimental setup by Loozen are responsible for the noise that was observed in the results.
The camera size, number of particles, integration time of the camera, sampling rate and shape
of the input signal can be indicated as the most prominent differences between the simulations and
experiments. The particles density was a factor 1000 lower than in experiments. The used integration
time was a factor 200 shorter than the integration time Loozen used, this results in significantly less
blurring and less noise cancellation. The sampling rate was sufficiently high to detect the introduced
periodicity. For the input signal, Loozen used a rectangular pulse wave, whereas in present research
the shape was sinusoidal. This leads to more gradual transitions and weaker signals.
The influence of the camera size was investigated in Sec. 6. In addition to the fact that there was a
serious discrepancy in the number of pixels that made up the camera, 128 x 128 pixels for our results
versus 300 x 300 pixels for Loozen’s [15], the number of pixels per typical speckle has been reported
to be higher in our speckle images.
Decreasing the number of pixels seems to go hand in hand with a greater degree of randomness,
as can be seen from Fig. 6.2b and Fig. 6.3b. This increased randomness has been compared with
the fluctuations over time. For a number of pixels as used in the present research, this results in noise
to signal ratios of 0.25 ∼ 0.5 and 0.4 ∼ 0.6 for the fractal dimension and speckle pattern respectively.
37
38 7. Conclusions & Recommendations
This could explain the noisy character of our results. Increasing the number of pixels will improve the
noise to signal ratio for the fractal dimension and the speckle contrast.
To conclude, the periodicity of the introduced input signal was not retrieved with either the fractal di-
mension, the correlation coefficient, the autocorrelation and the speckle contrast analysis. Differences
in setup parameters with experiments, e.g. camera size and integration time, are indicated as possible
causes for the noisy results.
7.2. Hypotheses and Recommendations
The fact that we were not able to produce results that demonstrate the appropriateness of using fractal-
ity and the outlined correlations for recovering a simulated heartbeat in the limited time of this Bachelor
Thesis does not mean that these properties do not reflect the periodicity. In this section hypotheses
and recommendations for carrying out follow-up research are given.
In order to be able to compare our results directly with those by Loozen [15] and Nemati and others
[19], tackling the remaining differences in setup parameters would be a logical next step. The camera
size, the number of red blood cells, the sampling rate, the integration time of the camera and the shape
of the input signal were indicated as important differences. The possible influence of these is discussed
and recommendations for necessary changes are made.
7.2.1. Camera Size
The camera size in our simulations is 128 x 128 pixels, whereas the images by Loozen that are analyzed
in Ch. 6 consist of 300 x 300 pixels. As the number of pixels has been shown to influence the deviation
between same-size sections of Loozen’s images for both the fractal dimension and speckle contrast,
increasing the camera size is recommended.
This will lead to an improvement of the noise to signal ratios of 0.25−0.5 and 0.4−0.6 for the fractal
dimension and speckle pattern respectively (see Sec. 6.1.1). Extrapolation in Fig 6.2 b suggests that
a 300 x 300 pixel screen would have values for 𝜎 of 0.001 − 0.002, which is a serious reduction
compared to the 128 x 128 pixel screen with typical values for 𝜎 of 0.005 − 0.01. The noise to signal
ratio would therefore significantly improve to 0.05 − 0.01.
An analogous approach for the speckle contrast would, taking a conservative approach by following
the red line (2) in Fig. 6.2b, leads to the improvement of the noise to signal ratio by a factor of 2. Best
case scenario, corresponding to the blue line (1) in Fig. 6.2b, the influence of randomness due to the
number of pixels is eliminated entirely for a 300 x 300 pixel screen. This is of course not realistic.
Scaling the number of pixels up from 128 x 128 to 300 x 300 means having 5.5 times more pixels.
For the number of particles 𝑁 equal to 1000, this will lead to a computation time that increases by
roughly the same factor, according to the complexity analysis of the algorithm by Van As [30].
A critical note on these noise to signal and improvement estimations should be made. In these
estimates, the degree of randomness in the fractal dimension (speckle contrast) due to the number
of pixels as determined from analyzing three measured images by Loozen is compared to the typical
fluctuation over time as determined from the simulated speckle patterns.
More appropriate would be comparing the degree of randomness to the typical fluctuations over
time of Loozen’s images. However, as only three of Loozen’s images were provided for analysis,
this approach could not be taken. More (details on the) images would resolve this uncertainty. As
a consequence, not too much emphasis should be put on the quantitative value of these computed
noise to signal ratios. Their qualitative behavior, as observed when increasing the number of pixels, is
relevant nevertheless. A conservative hypothesis would be that the noise to signal ratio for both the
fractal dimension and speckle contrast improves when the number of pixels is increased.
To conclude, increasing the camera size is recommended as this will improve the noise to signal
ratio and therefore allow for a better chance of achieving the goal of artificial heartbeat detection. This
comes at the price of an increased computation time.
7.2. Hypotheses and Recommendations 39
7.2.2. Number of Particles
A second parameter that should be considered in follow-up experiments is the number of particles in
the simulation compared to the number of particles in the experiment. It follows from comparison of the
parameters used by Van As [30] and Loozen [15] that the number of particles in the simulation of 1000
red blood cells, results in a factor 1000 more dilute solution than was used in the experiments. The
impact of increasing the number of particles on the computation time should be investigated. In Van As’
thesis [30] it was indicated that for more concentrated solutions multi-scattering becomes increasingly
important, as the typical distance between the scatterers is decreased.
7.2.3. Integration Time
The integration time 𝑡 as indicated in Fig. 2.6 was 100𝜇𝑠 in our simulations, whereas the cam-
era settings for measuring Loozen’s speckle patterns were set to a measuring time of 20𝑚𝑠. A longer
measuring time corresponds to averaging over more instantaneous samples and therefore a resulting
speckle pattern that is more blurred in case of moving particles. If the measurement time is increased,
the averaging will be done over an increasing large part of the cardiac cycle, reducing the difference be-
tween different time steps. With these reduced differences information about the underlying frequency
spectrum is harder to detect, but Loozen has demonstrated that this is possible. This increased degree
of blurring for all time steps will influence the speckle contrast, as it is a direct measure of blurriness.
Yet, the longer measuring time as used by Loozen will also have a positive impact on the results.
Namely, the effects of noise are reduced when averaging over a longer time. The fact that Loozen used
a factor 200 longer integration time, could explain the fact that our results are noisy.
Running the experiments with an integration time of 20𝑚𝑠 will make the direct comparison between
our simulated speckle patterns and Loozen’s measured images more appropriate and could reduce
the noise. The number of instantaneous images used to construct a single time step that is required
for convergence, should be reevaluated for the new integration time.
7.2.4. Sampling Rate
In addition to the integration time, the sampling rate used in experiments was different from the sampling
rate in our research (12.5𝐻𝑧). Namely, Loozen worked with an open shutter, leading to a integration
time of 20𝑚𝑠 and a time step of 20𝑚𝑠 [15]. This corresponds to a sampling rate of 50𝐻𝑧. Nemati and
others used sampling rates of 50𝐻𝑧 and higher [18]. This could explain the fact that the autocorrelation
function showed no correlation for time lag 𝜏 = 1 (see Fig. 5.4a), as higher sampling rates make it
possible to detect correlated behavior at smaller time scales. This would lead to the hypothesis that
correlated behavior is not observed in our research because of a too low sampling rate.
However, it should be noted that a sampling rate of 12.5𝐻𝑧 is sufficient to detect frequencies of 1𝐻𝑧
and the fact that no correlated behavior is observed on the time scale corresponding to this frequency
means that the periodicity of the input signal was not present in the autocorrelation and correlation
coefficient analysis. Changing the sampling rate will not influence this.
7.2.5. Shape of Input Signal
In our research the imposed signal was a sinusoidal pressure gradient, as displayed in Fig. 2.5. In
Loozen’s thesis [15] it was stated that an inline-pump was used to introduce a rectangular pulse wave
for its simplicity and auto-coherence. The main difference between a sinusoidal and rectangular pulse
wave is the fact that the former introduces changes that are gradual, whereas the latter produces abrupt
changes.
A hypothesis that can be formulated from this is that the changes in the fluid velocities are too
gradual to retrieve the periodicity from speckle pattern analysis for sinusoidal signals. The reason for
this is that gradual changes lead to a weaker signal and therefore higher noise to signal ratios. Since an
actual heartbeat seems to displays multiple abrupt changes, rather than a gradually changing behavior,
the fact that it might not work for sinusoidal signals is not a problem.
Changing the imposed boundary conditions from a sine-like to a rectangular pulse wave pressure
gradient is recommended for direct comparison with Loozen.
Thesis Fabian Brull
A
Appendix
A.1. Fourier Spectrum of Signals mirrored in a Line
As described in Sec. 4.3 the values of 𝐷 , are the values of 𝐷 , mirrored in a horizontal line
around 𝐷 ≃ 0.9. Here a more general case displaying such mirroring behavior will be considered to
analyze the implications on the Fourier spectra of these signals. The signals considered here are two
sines, with different offsets, that are related to each other by the previously described mirroring in a
line, as can be seen in Fig. A.1 a. The Fourier spectra of both signals are calculated and displayed in
Fig. A.1b.
0 1 2 3 4 5 6 7
f (Hz)
0
1
2
3
4
5
6
7
8
Power
b
sin(at)
-sin(at)
Mirror line
0 0.5 1 1.5 2 2.5 3
t [s]
0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
Amplitude
a
sin(at)
-sin(at)
Mirror line
Figure A.1: In a two sines with a frequency of 1 Hz related to each other by mirroring in the horizontal mirror line are displayed
as real time signals. The length of the signals was chosen to match the interval length of the measurements for fractality. In b
the Fourier spectra of both the signals and the mirror line are displayed.
As can be seen in Fig A.1b, the two signals do indeed have the same Fourier spectrum except for
their zero frequency. It can be noted that the frequency at which the Fourier spectrum peaks is not
equal to the exact frequency of the sines (1𝐻𝑧). This has to do with the fact that the measuring time is
not equal to an integer number of periods, as is described in Sec. 3.1.
41
Thesis Fabian Brull
Bibliography
[1] P.A.M.M. Aarts, S.A.T. van den Broek, G.W. Prins, G.D.C. Kuiken, J.J. Sixma, and R.M. Heethaar.
Blood platelets are concentrated near the wall and red blood cells, in the center in flowing blood.
Arteriosclerosis, 8(819), 1988.
[2] J. Allen. Photoplethysmography and its application in clinical physiological measurement. Physi-
ological Measurement, February 2007.
[3] A. Barcellos. The fractal geometry of Mandelbrot, 1982.
[4] C.F. Bohren and D.R. Huffman. Absorption and Scattering of Light by Small Particles. John Wiley
and Sons, Inc., Wiley Professional Paperback edition, 1998.
[5] R.D. Corrêa, J.B. Meireles, J.A.O. Huguenin, D.P. Caetano, and L. da Silva. Fractal structure of
digital speckle patterns produced by rough surfaces. Elsevier Physica A, pages 869–874, 2013.
[6] J. Cutnell and K. Johnson. Physics. Wiley, 4th edition, 1998.
[7] Dutch Heart Foundation. Hart- en vaatziekten in Nederland 2015,
2015. URL https://www.hartstichting.nl/downloads/cijfers/
hart-en-vaatziekten-in-Nederland-2015.
[8] Dutch Heart Foundation. Hartritme, 2016. URL https://www.hartstichting.nl/
hartritme.
[9] Dutch Heart Foundation. Feiten en cijfers hart- en vaatziekten, 2016. URL https://www.
hartstichting.nl/hart-vaten/cijfers.
[10] Fractal Foundation. Fractal dimension - box counting method, 2016. URL http://
fractalfoundation.org/.
[11] J. W. Goodman. Speckle phenomena in optics: Theory and applications. Roberts and Company
Publishers, 2007.
[12] J. W. Goodman and G. Parry. Laser speckle and related phenomena. Springer, Berlin Heidelberg
New York, 1984, 1984.
[13] T. Joosten. Interferometric scattering of light by moving red blood cells: Extracting a heartbeat.
BSc Thesis Report, TU Delft, 2016.
[14] P.K. Kundu, I.M. Cohen, and D.R. Dowling. Fluid Mechanics. Elsevier, pages 110–114, 2012.
[15] G.B. Loozen. Monitoring pulsating flow with dynamic speckle fields. MSc Thesis Report, TU Delft,
2015.
[16] B.B. Mandelbrot. The Fractal geometry of Nature. W.H. Freeman and Comapany New York, 1977.
[17] G. Mie. Beiträge zur Optik trüber Medien, speziell kolloidaler Metallösungen. Annalen der Physik,
337(4), 1908.
[18] M. Nemati, C.N. Presura, H.P. Urbach, and N. Bhattacharya. Dynamic light scattering from pul-
satile flow in the presence of induced motion artifacts. Biomed Opt Express, 5(7), July 2014.
[19] M. Nemati, S. Kenjeres, H.P. Urbach, and N. Bhattacharya. Fractality of pulsatile flow in speckle
images. Journal of Applied Physics, J. Appl. Phys. 119(174902), 2016.
[20] L.N. Ng. Manipulation of particles on optical waveguides, 2000.
43
44 Bibliography
[21] A.V. Oppenheim, A.S. Willsky, and S. Hamid Nawab. Signals and Systems. Pearson, Pearson
New International Edition edition, 2014.
[22] B. Osgood. Stanford - the Fourier transform and its applications, Not dated. URL https://see.
stanford.edu/materials/lsoftaee261/book-fall-07.pdf.
[23] D. Penney. Hemodynamics, 2003. URL http://www.coheadquarters.com/PennLibr/
MyPhysiology/lect5/table5.01.htm.
[24] P.P.L. Regtien. Electronic instrumentation. VVSD, 2nd edition, 2005.
[25] K. Schätzel. Noise on photon autocorrelation functions. Quantum Optics, pages 287–305, 1990.
[26] M. Shmukler. The Physics Handbook. Wiley, 2004.
[27] Stanford. Stanford - Solution methods for the incompressible Navier-Stokes equations, Not dated.
URL https://web.stanford.edu/class/me469b/handouts/incompressible.pdf.
[28] H.P. Urbach, A. Aurèle, and S. Konijnenberg. Optics - TU Delft course notes. PDF, 2016.
[29] K. van As. OptoFluids Code, 2015.
[30] K. van As. Interferometric scattering of light by an ensemble of flowing spherical particles: A
numercial study. MSc Thesis Report, TU Delft, 2015.
[31] H. van den Akker and R. Mudde. Fysische Transportverschijnselen - denken in balansen. Delft
University Press, 4th edition, 2014.
[32] H.M. van der Kooij and J. Sprakel. Watching paint dry; more exciting than it seems. Soft Matter,
2015.
[33] H.M. van der Kooij, G.T. van de Kerkhof, and J. Sprakel. A mechanistic view of drying suspension
droplets. Soft Matter, 12(11), 2016.
[34] M. Verhaegen. Stochastic processes for physics students: An introduction, 2016.
[35] F.M. White. Fluid Mechanics. McGraw-Hill, 2011.

More Related Content

PDF
Seismic Tomograhy for Concrete Investigation
PDF
thesis
PDF
Memoire antoine pissoort_aout2017
PDF
Integrating IoT Sensory Inputs For Cloud Manufacturing Based Paradigm
PDF
Classification System for Impedance Spectra
PDF
PhD thesis
PDF
phd-thesis
PDF
CADances-thesis
Seismic Tomograhy for Concrete Investigation
thesis
Memoire antoine pissoort_aout2017
Integrating IoT Sensory Inputs For Cloud Manufacturing Based Paradigm
Classification System for Impedance Spectra
PhD thesis
phd-thesis
CADances-thesis

What's hot (15)

PDF
M1 - Photoconductive Emitters
PDF
thesis
PDF
Ali-Dissertation-5June2015
PDF
PDF
Ric walter (auth.) numerical methods and optimization a consumer guide-sprin...
PDF
Coulomb gas formalism in conformal field theory
PDF
10.1.1.127.5075
PDF
grDirkEkelschotFINAL__2_
PDF
Mark Quinn Thesis
PDF
PDF
feilner0201
PDF
Morton john canty image analysis and pattern recognition for remote sensing...
PDF
Nonlinear Simulation of Rotor-Bearing System Dynamics
M1 - Photoconductive Emitters
thesis
Ali-Dissertation-5June2015
Ric walter (auth.) numerical methods and optimization a consumer guide-sprin...
Coulomb gas formalism in conformal field theory
10.1.1.127.5075
grDirkEkelschotFINAL__2_
Mark Quinn Thesis
feilner0201
Morton john canty image analysis and pattern recognition for remote sensing...
Nonlinear Simulation of Rotor-Bearing System Dynamics
Ad

Viewers also liked (19)

PDF
Portafolio
PDF
Wirkungstransparenz bei Spendenorganisationen (2014)
DOC
Examen de archivoguido
PPT
Musica
PPTX
Formación universitaria por medio de la web
ODP
Web toledo
DOCX
Reina's Updated CV
PPTX
Gobierno y Estado
PPTX
Desarrollo sustentable
PDF
Stoich Notes 1
PDF
Eyeware - Project Glass und die Zukunft von Smartphones (MA Thesis, 2012)
PDF
Ost 1 1011b1 85
DOCX
• Deutsch
PPTX
Todo es arte
PDF
CMS Sicherheit
PPT
Page Master
PPT
IF Tagung 2009 Intro Folien
PPTX
Blog y educación
PPT
Vegetáción y clima - San Miguel de las Dueñas
Portafolio
Wirkungstransparenz bei Spendenorganisationen (2014)
Examen de archivoguido
Musica
Formación universitaria por medio de la web
Web toledo
Reina's Updated CV
Gobierno y Estado
Desarrollo sustentable
Stoich Notes 1
Eyeware - Project Glass und die Zukunft von Smartphones (MA Thesis, 2012)
Ost 1 1011b1 85
• Deutsch
Todo es arte
CMS Sicherheit
Page Master
IF Tagung 2009 Intro Folien
Blog y educación
Vegetáción y clima - San Miguel de las Dueñas
Ad

Similar to Thesis Fabian Brull (20)

PDF
MSci Report
PDF
spurgeon_thesis_final
PDF
PDF
GlebPhysicsThesis
PDF
RFP_2016_Zhenjie_CEN
PDF
Stochastic Processes and Simulations – A Machine Learning Perspective
PDF
MSc_thesis_OlegZero
PDF
CERN-THESIS-2011-016
PDF
PDF
Inglis PhD Thesis
PDF
M2 - Graphene on-chip THz
PDF
phd_unimi_R08725
PDF
Opinion Formation about Childhood Immunization and Disease Spread on Networks
PDF
Bachelor Arbeit
PDF
1026332_Master_Thesis_Eef_Lemmens_BIS_269.pdf
PDF
diplomarbeit
PDF
2012thesisBennoMeier
PDF
probabilidades.pdf
PDF
thesis
PDF
Final_project_watermarked
MSci Report
spurgeon_thesis_final
GlebPhysicsThesis
RFP_2016_Zhenjie_CEN
Stochastic Processes and Simulations – A Machine Learning Perspective
MSc_thesis_OlegZero
CERN-THESIS-2011-016
Inglis PhD Thesis
M2 - Graphene on-chip THz
phd_unimi_R08725
Opinion Formation about Childhood Immunization and Disease Spread on Networks
Bachelor Arbeit
1026332_Master_Thesis_Eef_Lemmens_BIS_269.pdf
diplomarbeit
2012thesisBennoMeier
probabilidades.pdf
thesis
Final_project_watermarked

Thesis Fabian Brull

  • 1. Extracting a Heartbeat from Speckle Pattern Analysis Interferometric Scattering of Light by Moving Red Blood Cells F.J. Brull BSc Thesis Applied Physics ;
  • 3. Extracting a Heartbeat from Speckle Pattern Analysis Interferometric Scattering of Light by Moving Red Blood Cells by F.J. Brull to obtain the degree of Bachelor of Science at the Delft University of Technology, to be defended publicly on Wednesday June 22, 2016 at 3:00 PM. Student number: 4268334 Project duration: March, 2016 – June, 2016 Supervisors: Dr. S. Kenjeres, TU Delft TP Dr. N. Bhattacharya, TU Delft Optics Ir. K. Van As, TU Delft TP Thesis committee: Prof. dr. ir. C. R. Kleijn, TU Delft TP
  • 5. Abstract The increase in the number of people suffering from cardiovascular diseases asks for improved diag- nostics through measurements and simulations. Photoplethysmography is a proven technique when it comes to measuring a heartbeat in-vivo in a non-invasive, cheap and real-time manner. However, not all information contained in the 3D electromagnetic fields that result from the scattering of light off e.g. skin and blood cells is used. Measuring these fields with an 2D camera could allow for the retrieval of more cardiac parameters. Van As has simulated the environment of an incoming plane wave scattering off a configuration of red blood cells, represented by spheres, using Mie scattering theory and fluid dynamics in OpenFOAM. The interference of light is measured with a camera resulting in speckle patterns [29, 30]. Joosten has introduced a sinusoidal periodicity in Van As’ simulations to mimic an actual heartbeat [13]. In our research an attempt will be made to retrieve this introduced periodicity by analysis of the speckle patterns. In order to do so, time series of numerous speckle pattern properties are converted into the frequency domain. Properties of the generated images, that are considered are the fractality, correlation coefficient, autocorrelation function and speckle contrast. The generated results do not allow for retrieval of the frequency of the introduced artificial heartbeat. Possible explanations for this are the small screen size, low particle density in the fluid, short integration time and different shape of the input signal compared to experimental research by Loozen [15]. iii
  • 7. Preface In the three years of the Bachelor Applied Physics at the TU Delft, I have come across physical concepts that defy explanation by anyone not familiar to them. An excellent example of this is the superposition of states in quantum mechanics; how on earth can that poor cat be both alive and dead at the same time? Relativistic length contraction and time dilation fall into the same category. The fact that the length of an object, as seen by an observer, depends on its relative velocity does not fit the framework we use to process our everyday observations. It was theories like these that triggered me to study Physics in the first place. I felt I could not leave these mysteries untouched. Courses such as ’Modern Physics’, ’Introduction to Elementary Particle Physics’ and ’Quantum Mechanics’ helped to satisfy this hunger for knowledge. Another course that was one of my favorites was Optics, as it closed the gaps in my understanding of light and imaging. Long anticipated courses like this one, that finally touched upon subjects you had heard about a million times, but were not able to study in depth yet, were greatly appreciated by me. In the process of orienting myself on a suitable topic for my BSc thesis, I decided that a multidisci- plinary project would interest me most. After Professor Chris Kleijn brought me in touch with Kevin van As, I learned that I could use my newly obtained knowledge about electro-magnetics, statistics, fluid dynamics and optics in a project with a very clear basic daily application: the retrieval of a heartbeat. Looking back at the results, one could say that we did not succeed in doing so at present. However, I think we used a thorough approach and demonstrated that with an adjustment of certain simulation parameters retrieval could be possible, as was demonstrated experimentally by Loozen. Research is said to be a never-ending process... Acknowledgments First of all, I would like to thank both my senior supervisors Dr. Nandini Bhattacharya and Dr. Sasa Kenjeres for their input during this project. In addition, I would like to thank Kevin van As for his day-to-day guidance and for doing such a fine job during his MSc project, without which none of the research I conducted would have been possible. The same goes for the countless simulations that were run by Tom Joosten. Finally, I would like to thank Gyllion Loozen, whom I never met, for his experimental data, that allowed me to make sense out of our noisy simulation results. Now, at least we have an idea what could have caused this choas. F.J. Brull Delft, June 2016 v
  • 9. Contents Abstract iii Preface v List of Figures ix List of Tables xi 1 Introduction 1 2 The Project 3 2.1 Theory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.1.1 Fluid Dynamics of Blood . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.1.2 Optics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.2 Experimental Method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.2.1 Setup by Van As . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.2.2 Solving the Navier-Stokes equations with OpenFOAM. . . . . . . . . . . . . . . . 10 2.2.3 Adding a Pulsatile Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.2.4 The Camera . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.2.5 Relevant Setup Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3 Discrete Fourier Transform 15 3.1 Fast Fourier Transform. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.2 The Nyquist Frequency and the Nyquist-Shannon Sampling Theorem . . . . . . . . . . . 15 3.3 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 4 Fractality 17 4.1 Theory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4.2 Experimental Method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 4.2.1 Binary Box Counting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 4.2.2 Differential Grayscale Box Counting. . . . . . . . . . . . . . . . . . . . . . . . . . 19 4.2.3 Mass Box Counting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 4.2.4 Mean Fractal Dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 4.2.5 Average Cover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 4.2.6 Summary Fractal Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.3 Preliminary Results. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.3.1 Time Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.3.2 Frequency Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 5 Correlations 25 5.1 Theory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 5.1.1 Correlation Coefficient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 5.1.2 Autocorrelation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 5.1.3 Speckle Contrast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 5.2 Experimental Method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 5.3 Preliminary Results. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 5.3.1 Correlation Coefficient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 5.3.2 Autocorrelation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 5.3.3 Speckle Contrast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 6 Case Study Camera Size 33 6.1 Deviations within a Single Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 6.1.1 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 6.1.2 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 vii
  • 10. viii Contents 7 Conclusions & Recommendations 37 7.1 Conclusions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 7.2 Hypotheses and Recommendations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 7.2.1 Camera Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 7.2.2 Number of Particles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 7.2.3 Integration Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 7.2.4 Sampling Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 7.2.5 Shape of Input Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 A Appendix 41 A.1 Fourier Spectrum of Signals mirrored in a Line . . . . . . . . . . . . . . . . . . . . . . . . 41 Bibliography 43
  • 11. List of Figures 2.1 Shape of a Red Blood Cell. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.2 Mie Theory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.3 Schematic Overview Setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.4 Artist Impression of Geometry. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.5 Imposed Pressure Gradient to introduce Periodicity. . . . . . . . . . . . . . . . . . . . . 12 2.6 Visualization of the Recording Process. . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.1 Aliasing in Frequency Domain. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 3.2 Aliasing in Time Domain. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 4.1 Topological Dimensions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 4.2 Koch Snowflake. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 4.3 Influence Grid Orientation on Box Counting. . . . . . . . . . . . . . . . . . . . . . . . . . 20 4.4 Results - Time Domain. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.5 Results - Difference between Regular and Mass Box Counting. . . . . . . . . . . . . . . 22 4.6 Results Grayscale - Mirroring in Time Domain. . . . . . . . . . . . . . . . . . . . . . . . 23 4.7 Results - Frequency Domain. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 5.1 Visualization Speckle Contrast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 5.2 Results - Correlation Coefficient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 5.3 Results - Autocorrelation, Color Plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 5.4 Results - Autocorrelation, Single Pixel . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 5.5 Results - Autocorrelation, Standard Deviations . . . . . . . . . . . . . . . . . . . . . . . 31 5.6 Results - Speckle Contrast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 6.1 Visual Comparison Speckle Patterns Van As and Loozen . . . . . . . . . . . . . . . . . 33 6.2 Dependency of Fractal Dimension on Screen Size . . . . . . . . . . . . . . . . . . . . . 35 6.3 Dependency of Speckle Contrast on Screen Size . . . . . . . . . . . . . . . . . . . . . . 35 A.1 Influence Mirroring on Fourier Spectrum. . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 ix
  • 13. List of Tables 2.1 Hemodynamics for Different Types of Vessels. . . . . . . . . . . . . . . . . . . . . . . . 5 2.2 Relevant Setup Parameters Joosten and Van As. . . . . . . . . . . . . . . . . . . . . . . 13 4.1 Summary Fractal Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 xi
  • 15. 1 Introduction On a daily basis, over a hundred people in the Netherlands die from cardiovascular diseases and an- other thousand are hospitalized because of heart diseases [9]. Even more shocking data for the future was presented by the Dutch Heart Foundation in 2015 [7]: the number of patients suffering from cardio- vascular illnesses is expected to increase from 850.000 in 2011 to 1.4 million in 2040. This increasing problem for the Dutch healthcare system asks for better understanding and improved diagnostics in this medical field. Therefore, retrieval of data from measurements and simulations is vital. The most renowned cardiac parameter is the heartbeat. In an ideal case, one could look directly into the vessel and see the positions of the red blood cells changing over time. One would thereby know the corresponding length of the cardiac cycle. However, as both the human skin and blood plasma are opaque, this is not possible. Therefore, numerous techniques have been developed to work around this limitation, e.g. medical sonography, magnetic resonance angiography and light. Yet, none of the existing techniques is perfect. Light is suited to perform measurements, because it is cheap, real-time and non-invasive. The most basic way of using light is done in photoplethysmography [2], which is based on the absorption of light by tissue. In this technique, light is used to illuminate the skin, then the change in the degree of absorption over time is attributed to the heartbeat. It is important to note that this method transforms the 3D information of the scattering of light off e.g. skin and blood cells, into a single number: the absorption ratio. A downside of this technique is that information is lost in this conversion. Possibly, much more information about the blood flow than just the length of the cardiac cycle could be obtained if, instead of a single number, 2D information is retrieved from illuminating the sample with light. However, with this increased potential for the retrieval of more cardiac parameters, the complexity of the analysis goes up. The reason being that the scattering of coherent light off the complex red blood cell configuration in vessels, consisting of thousands of cells, will result in a 2D interference pattern when measured with a camera. This can be seen somewhat as a Fourier transform of these particle positions, rather than a direct image of them [28]. In tomography, images of a fixed particle configuration that are taken under different angles are used to reconstruct the initial particle positions. Yet, these exact particle positions are not of interest when trying to retrieve ensemble parameters such as the length of the cardiac cycle or oxygen saturation. On the other hand, as the heartbeat is a periodic phenomenon, one could expect certain properties of these speckle patterns to reflect this periodicity. This hypothesis has been confirmed experimentally for the fractal dimension, correlation coefficient and speckle contrast by Loozen, Nemati and others [15, 18, 19]. The downside of these experimental research is that the ability to change the setup parameters is limited, e.g. it is not feasible to realize certain concentration levels experimentally. Here simulations would offer a solution. Van As [30] anticipated on this by simulating the experimental setup that was used by Loozen [15], allowing for adjustments of the setup parameters. Van As combined fluid dynam- ics simulations for the motion of the red blood cells in OpenFOAM with self-created optics code [29], 1
  • 16. 2 1. Introduction resulting in speckle images that were recorded by a camera. His code was validated by checking for the Fraunhofer approximation for a double slit configuration. However, simulations to mimic a heartbeat were not yet achieved. This would be a logical next step. Our research will make use of the results Van As stated in his Master Thesis [30]. The speckle patterns that are analyzed in this research are obtained by simulations from Tom Joosten with Van As’ OptoFluids code [29]. A specific periodicity is introduced in the simulation set up, in order to mimic a heartbeat. The goal for this thesis is retrieving the introduced periodicity from the speckle patterns. Therefore, the central research question that we will try to answer is: Can the periodicity of the input signal be retrieved from speckle pattern analysis? The approach that will be chosen in order to do so is similar to the one chosen by Nemati and others [15, 18, 19]: speckle patterns will be obtained for a number of time steps. For these time steps certain properties of the speckle patterns will be determined, resulting in time sequences. These time sequences can then be converted from the time domain into the frequency domain using a Fourier transform. In the Fourier spectrum it is then possible to find dominant frequencies. As Van As’ work will be used as a starting point, it is necessary to elaborate on the theories and experimental method he used in order to create his OptoFluids code and generate results. Ch. 2 will be devoted to this. The approach of converting a time sequence into the frequency domain with a Fourier transform can be taken for many different parameters of the speckle patterns. For this reason this transformation process will be discussed in Ch. 3. Four different types of speckle pattern analysis will be demonstrated. In Ch. 4 fractality, which describes the scaling symmetry of the speckle patterns, will be discussed. The other types of analysis all concern correlations and are therefore elaborated on in Ch. 5. The correlations that will be used are the correlation coefficient, the autocorrelation and the speckle contrast. The first two are a measure of the coherence of the speckle patterns in time, whereas the latter is a measure for the amount of blurring within a speckle pattern. In Ch. 6 a case study that has been triggered by the results of the analysis types is conducted.
  • 17. 2 The Project This chapter will be devoted to giving a clear overview of the work that was conducted by Van As on fluid dynamics in combination with optics and it will elaborate on how his findings will be used in our research. The purpose is to discuss how speckle patterns that are created using the OptoFluids code [29], details about this code can be found in Van As’ Master Thesis [30]. The OptoFluids code combines OpenFOAM simulations with Van As’ self-developed optics code. The theory is discussed in Sec. 2.1. In Sec. 2.2, the setup and further assumptions made by Joosten [13] are discussed. 2.1. Theory 2.1.1. Fluid Dynamics of Blood Figure 2.1: The shape of a red blood cell. It is said to be similar to a donut due to the fact that is a biconcave disk. Blood is crucial for human survival: it transports nutrients, such as oxygen and proteins, towards the organs and transports the waste products away. Blood consists of blood plasma with blood cells in it. The plasma, which consists for 92% of water, makes up 54.3% of the volume of blood. The different particle types in the plasma are red blood cells (volume fraction of 45%), white blood cells (volume fraction of 0.7%) and platelets [6, 26]. The red blood cells are responsible for the oxygen transport, the white blood cells take care of the immune system and the function of platelets is to stop bleeding by clotting. For this research the red blood cells are the main focus. Real-life red blood cells are donut- shaped, however in the simulations with the OptoFluids code by Van As they are approx- imated as spheres. Rheology Rheology is the study of flow and deformation of matter, i.e. liquids and so called ’soft solids’, in re- sponse to an applied force [31]. A distinction between Newtonian and Non-Newtonian fluids is made in this field of study. The strain rate describes how distances within the material change due to expand- ing, shrinking and shearing. Newtonian fluids can be described by a temperature-dependent dynamic viscosity coefficient 𝜇, i.e. the viscosity does not depend on the strain rate. There is only a limited class of fluids for which this is true. The shear stress 𝜏 in a fluid is related to the derivative of the velocity along a boundary, 𝑢 , with 3
  • 18. 4 2. The Project respect to the direction perpendicular to the direction of this velocity, 𝑥 , by the dynamic viscosity: 𝜏(𝑥 ) = 𝜇 𝜕𝑢 𝜕𝑥 , (2.1) where 𝑥 denotes the 𝑖 coordinate, with 𝑖 ∈ {1, 2, 3}, i.e. {𝑥 , 𝑥 , 𝑥 } = {𝑥, 𝑦, 𝑧}. In case the viscosity does depend on the strain rate one speaks of Non-Newtonian fluids. If all particles making up the material are moving with the same speed the strain rate is 0 by definition. Blood behaves as a Non-Newtonian fluid due to its high volume fraction of particles. This makes its flow behave different from Newtonian fluids, such as water, allowing it to transport more nutrients and waste products compared to pure blood plasma [30]. A second property that is different for Non-Newtonian fluids is the volume distribution of red blood cells. The radial profile can be described by the volume fraction of red blood cells 𝜙(𝑟) as function of the radial distance to the axis of the cylinder 𝑟 [30]: 𝜙(𝑟) = 𝑑𝑉 (𝑟) 𝑑𝑉(𝑟) . (2.2) As shown by Van As [30], this can be converted into a probability density function 𝑃(𝑟) for the number of particles as a function of 𝑟 and the total number of particles 𝑁 inside a cylinder with length 𝐿 and radius 𝑅: 𝑃(𝑟) = 𝜙(𝑟)𝑟 ∫ 𝜙(𝑟)𝑟𝑑𝑟 , (2.3) 𝑁 = 2𝜋𝐿 𝑉 ∫ 𝜙(𝑟)𝑟𝑑𝑟. (2.4) These expressions were combined with measurements for 𝜙(𝑟) performed by Aarts [1] to retrieve an input probability density distribution for injecting particles in the fluid dynamics simulations in OpenFOAM. Thereby, the particle distribution in the simulations will mimic that of real in-vivo blood flow. Reynolds Number The Reynolds number describes the relationship between inertial and viscous forces [31]: 𝑅𝑒 = 𝜌𝑈𝐿 𝜇 = 𝑈𝐿 𝜈 , (2.5) where 𝑈 is the typical velocity scale, 𝐿 the characteristic length scale, 𝜈 the kinematic viscosity, 𝜌 the density and 𝜇 the dynamic viscosity. This kinematic viscosity 𝜈 is related to the dynamic viscosity 𝜇 by: 𝜈 = 𝜇 𝜌 . (2.6) For pipe-flow, with radius 𝑅, the typical length 𝐿 = 2𝑅 and 𝑈 relates to the velocity 𝑢(𝑟) as: 𝑈 = ̄𝑢 = ∫ 𝑢(𝑟)𝑟𝑑𝑟 ∫ 𝑟𝑑𝑟 . (2.7) The value of the Reynolds number indicates whether the inertial forces or the viscous forces are dom- inating. It gives valuable information on whether a certain flow will be turbulent (sufficiently high 𝑅𝑒, inertia-dominated) or laminar (sufficiently low 𝑅𝑒, viscous-dominated). The condition for turbulence in pipe-flow is around 𝑅𝑒 > 4000, whereas 𝑅𝑒 < 2300 under most conditions corresponds to laminar flow. There is transitional flow in case 2300 < 𝑅𝑒 < 4000 [31, 35]. The value of the Reynolds number for blood strongly depends on the kind of vessel that is consid- ered, as can be seen from Table 2.1.
  • 19. 2.1. Theory 5 Table 2.1: Hemodynamics for different types of vessels [23]. Vessel 𝑣[𝑐𝑚𝑠 ] 𝐷[𝑐𝑚] 𝑅𝑒 Aorta 48 2.5 3400 Artery 45 0.4 500 Arteriole 5 0.005 0.7 Capillary 0.1 0.0008 0.002 Venule 0.2 0.002 0.01 Vein 10 0.5 140 Vena Cava 38 3.0 3300 Navier-Stokes Equation As stated above, blood behaves like a non-Newtonian fluid. However, in Van As’ thesis [30] the Newto- nian model for the stress tensor was assumed. As this assumption will also be applicable to the results of this research, the influence of this choice on the relevant theory will be stated below. The assumption leads to the following set of Navier-Stokes equations in Einstein notation for incompressible flow [14]: 𝑑𝑢 𝑑𝑥 = 0, (2.8) 𝑑𝑢 𝑑𝑡 + 𝑢 𝑑𝑢 𝑑𝑥 = 1 𝜌 ( 𝑑𝑃 𝑑𝑥 + 𝜏 𝑑𝑥 + 𝑓 ) , (2.9) 𝜏 = 𝜇 ( 𝑑𝑢 𝑑𝑥 + 𝑑𝑢 𝑑𝑥 ) , (2.10) where 𝑥 denotes the 𝑖 coordinate, with 𝑖 ∈ {1, 2, 3}, i.e. {𝑥 , 𝑥 , 𝑥 } = {𝑥, 𝑦, 𝑧}. As a result 𝑢 is the velocity in the 𝑥 direction, i.e. {𝑢 , 𝑢 , 𝑢 } = {𝑢 , 𝑢 , 𝑢 }. Furthermore, 𝜌 is the density of the fluid, 𝜇 the dynamic viscosity of the fluid, 𝑃 the pressure, 𝜏 the stress tensor and 𝑓 the sum of external forces per unit volume. The distinction between incompressible and compressible flow is that for the incompressible flows density variation is not linked to pressure variations [27]. As the density does not depend on the tem- perature either, it is constant in both space and time for incompressible flow. As a result, pressure variations will derived from the constraint that mass conservation imposes on the velocity field, com- bined with momentum equations. As the particles in the simulations are assumed to be small enough, Lagrangian Particle Tracking will be used to determine their positions. The red blood cells are treated as point particles which are subject to Newton’s law. 2.1.2. Optics When light, i.e. an electromagnetic wave, is incident on matter there will be two phenomena taking place. Let us look at this at the level of the most fundamental particles: that of electrons and protons. In the first place, the light incident on a fundamental charged particle will cause it to oscillate. In its turn this oscillation will lead to secondary radiation, which is called scattering. A second phenomenon that will be present in such a collision of light and an electron or a proton, is absorption. This means that part of the incoming electromagnetic radiation is not reflected, but absorbed by the particle. Absorption combined with scattering, will alter the strength of the incident light. This is due to the fact that the scattered wave will interfere with the incident wave. Extinction occurs in case of destructive interference of the incident and scattered wave. Theories that capture the physical essence of scattering are very relevant to this research as they describe how interference causes speckle patterns. For this reason, a derivation of Mie Theory based on Bohren & Huffman [4] and Li Na NG [20] will be given here. Mie Theory In order to quantify the scattering of light on a sphere Gustav Mie developed Mie Theory in 1908 [17]. In his theory the incoming light is treated as an electromagnetic wave, governed by the Maxwell equations.
  • 20. 6 2. The Project When the incoming real electric field is denoted as ⃗ℰ (𝑡) and incoming real magnetic H-field as ⃗ℋ (𝑡), and periodic behavior with frequency 𝜔 is assumed for the electromagnetic wave, these can be written as: ⃗ℰ (𝑡) = 𝑅𝑒 ( ⃗𝐸 𝑒 ) , (2.11) ⃗ℋ (𝑡) = 𝑅𝑒 ( ⃗𝐻 𝑒 ) , (2.12) where ( ⃗𝐸 , ⃗𝐻 ∈ ℂ ). ⃗𝐸 and ⃗𝐻 are the time-independent complex electric and magnetic field respec- tively. In general, the H-field is related to the magnetic B-field ⃗ℬ and the magnetization ⃗ℳ in the following way: ⃗ℋ = ⃗ℬ 𝜇 − ⃗ℳ, (2.13) where is 𝜇 the magnetic permeability in vacuum. The Maxwell equations for the time-independent complex fields ⃗𝐸 and ⃗𝐻 are then given as: ∇ ⋅ (𝜖 ⃗𝐸) = 0, (2.14) ∇ × ⃗𝐸 = 𝑖𝜔𝜇 ⃗𝐻, (2.15) ∇ ⋅ (𝜖 ⃗𝐻) = 0, (2.16) ∇ × ⃗𝐻 = −𝑖𝜔𝜖 ⃗𝐸, (2.17) where 𝜇 denotes the magnetic permeability and 𝜖 denotes the electric permittivity: 𝜖 = 𝜖 (1 + 𝜒) + 𝑖 𝜎 𝜔 , (2.18) where 𝜖 is the electric permittivity in vacuum, 𝜒 the electric susceptibility and 𝜎 is the conductivity. It should be noted that 𝜇, 𝜒, 𝜎 and therefore 𝜖 are material-dependent parameters. By taking the curl of (2.15) and (2.17) and applying the vector identity: ∇ × (∇ × ⃗𝐴) = ∇ (∇ ⋅ ⃗𝐴) − ∇ ⋅ (∇ ⃗𝐴) , (2.19) the following time-dependent vector wave equations follow: ∇ ⃗𝐸 + 𝑘 ⃗𝐸 = 0, (2.20) ∇ ⃗𝐻 + 𝑘 ⃗𝐻 = 0, (2.21) where 𝑘 = 𝜔 𝜖𝜇. The focus from here on will be on finding the vector solutions to the wave equations. In order to do so, a spherical coordinate system (𝑟, 𝜃, 𝜙) will be used. In case of a single spherical scatterer, the center of this scatterer will coincide with the origin of the coordinate system. This is shown in Fig. 2.2. Now a scalar function 𝜓 , will be defined. The scalar function will be a solution to: ∇ 𝜓 + 𝑘 𝜓 = 0. (2.22) It should be noted that the individual components of (2.20) and (2.21) do not satisfy the scalar wave equation (2.22). On the other hand, the following three independent vectors are solutions to the scalar wave equation (2.22): ⃗𝐿 = ∇𝜓 , , (2.23) ⃗𝑀 , = ∇ × ⃗𝑟𝜓 , , (2.24) ⃗𝑁 , = 1 𝑘 ∇ × ⃗𝑀 , . (2.25) Analogous to ⃗𝐸 and ⃗𝐻, ⃗𝑀 , and ⃗𝑁 , are related to each other by the curl operator. Furthermore, ⃗𝐿, ⃗𝑀 , and ⃗𝑁 , all can be shown to be solutions to the vector wave equations (2.20) and (2.21). In the further analysis ⃗𝐿 will be omitted, because it represents a purely longitudinal wave.
  • 21. 2.1. Theory 7 Figure 2.2: Geometry of plane waves scattering off a spherical particle in spherical coordinates as described by Mie Theory. Note that the incoming wave is traveling in the -direction and is polarized in the -direction. Solution to the Scalar Wave Equation Equation (2.22) can be expressed in spherical coordinates (𝑟, 𝜃, 𝜙) as: 1 𝑟 1 𝜕𝑟 (𝑟 𝜕𝜓 𝛿𝑟 ) + 1 𝑟 sin 𝜃 𝜕 𝜕𝜃 (sin 𝜃 𝜕𝜓 𝜕𝜃 ) + 1 𝑟 sin 𝜃 𝛿 𝜓 𝜕𝜓 + 𝑘 𝜓 = 0. (2.26) Using separation of variables, the solutions can be shown to be: 𝜓 = cos (𝑚𝜑)𝑃 cos 𝜃𝑧 (𝑘 𝑟), 𝜓 = sin (𝑚𝜑)𝑃 cos 𝜃𝑧 (𝑘 𝑟), (2.27) where 𝑃 is the Legendre polynomial and 𝑧 (𝑘 𝑟) is any spherical Bessel function. 𝑧 (𝑘 𝑟) represents the radial spherical Bessel functions, 𝑗 (𝑘 𝑟), and first order Hankel functions, ℎ (𝑘 𝑟). The reason for this choice is that, on the one hand, 𝑗 (𝑘 𝑟) captures the right behavior for incoming and transmitted waves near the origin, as it is finite at the origin. On the other hand, ℎ (𝑘 𝑟) gives the right behavior for scattered waves in the far field, as it is infinite there. The subscript 𝑒 denotes ’even’ in this, whereas 𝑜 stands for ’odd’. The general solution will be a superposition of the solutions (2.27): 𝜓 = ∑ , 𝛼 , 𝜓 + 𝛽 , 𝜓 . (2.28) Solution to the Vector Wave Equation Combining (2.27) and (2.28) with (2.24) and (2.25) will lead to four solutions to the vector wave equa- tions (2.20), (2.21) for every (𝑛, 𝑚) known as the Vector Spherical Harmonics:
  • 22. 8 2. The Project ⃗𝑀{ } = { − sin 𝑚𝜑 cos 𝑚𝜑 } 𝑚 sin 𝜃 𝑃 (cos 𝜃) 𝑧 (𝑘 𝑟) ̂𝜃 + { − cos 𝑚𝜑 − sin 𝑚𝜑 } 𝑑𝑃 (cos 𝜃) 𝑑𝜃 𝑧 (𝑘 𝑟) ̂𝜑, (2.29) ⃗𝑁{ } = { cos 𝑚𝜑 sin 𝑚𝜑 } 𝑛 (𝑛 + 1) 𝑃 (cos 𝜃) 𝑧 (𝑘 𝑟) 𝑘 𝑟 ̂𝑟 + { cos 𝑚𝜑 sin 𝑚𝜑 } 𝑑𝑃 (cos 𝜃) 𝑑𝜃 1 𝑘 𝑟 𝑑 (𝑘 𝑟𝑧 (𝑘 𝑟)) 𝑑 (𝑘 𝑟) ̂𝜃 + { − sin 𝑚𝜑 cos 𝑚𝜑 } 𝑃 (cos 𝜃) sin 𝜃 𝑚 𝑘 𝑟 𝑑 (𝑘 𝑟𝑧 (𝑘 𝑟)) 𝑑𝑘 𝑟 ̂𝜑. (2.30) (2.29) and (2.30) make up a complete basis. Expansion of Incoming Fields in Vector Wave Equation Solutions Analogous to (2.28), an arbitrary periodic field ⃗𝐴 can be written as a linear combination of (2.29) and (2.30): ⃗𝐴 = 𝑖 𝜔 ∑ , [𝐴 , ⃗𝑀 , + 𝐵 , ⃗𝑁 , ]. (2.31) Combining the fact that (2.31) applies to all periodic fields with (2.15) and (2.17) results in the following identities for the incoming H-field and electric field: ⃗𝐻 = − 𝑖𝑘 𝜔𝜇 ∑ , [𝐴 , ⃗𝑁 , + 𝐵 , ⃗𝑀 , ], (2.32) ⃗𝐸 = − 𝑘 𝜔 𝜖𝜇 ∑ , [𝐴 , ⃗𝑀 , + 𝐵 , ⃗𝑁 , ]. (2.33) The coefficients 𝐴 , and 𝐵 , can be found by applying Fourier analysis. This results in an integral over the surface Ω of the particle causing the scattering: 𝐴 , = ∫ ⃗𝑀∗ , ⃗𝐸 𝑑Ω, (2.34) where ⃗𝑀∗ , is the complex conjugate of ⃗𝑀 , . Due to the symmetry of a sphere there is no loss of generality when an the electric field of an incoming electromagnetic wave in random direction is expressed as: ⃗𝐸 = 𝐸 𝑒 ̂𝑥. (2.35) Applying (2.34) to (2.35) results in: ⃗𝐸 = 𝐸 ∑ 𝑖 2𝑛 + 1 𝑛 (𝑛 + 1)) ( ⃗𝑀 ( ) − 𝑖 ⃗𝑁 ( ) ) . (2.36) Note that only the Bessel function of the first kind, 𝑧 = 𝑗 , will yield solutions that are, like (2.35), finite in the origin. This is denoted in (2.36) by (1). The corresponding H-field can then be found by either taking the curl of (2.35) and then applying Fourier analysis (2.34) or by directly taking the curl of (2.36): ⃗𝐻 = −𝑘 𝜔𝜇 𝐸 ∑ 𝑖 2𝑛 + 1 𝑛 (𝑛 + 1)) ( ⃗𝑀 ( ) + 𝑖 ⃗𝑁 ( ) ) . (2.37)
  • 23. 2.1. Theory 9 Boundary Conditions So far only the incoming fields have been considered in the expansion in vector wave equation solu- tions. At the beginning of Sec. 2.1.2 is was noted however that the light incoming on a particle will cause scattering and absorption. Absorption takes place in the interior of the particle, whereas the scattered wave will be present in the exterior of the particle. Therefore, in order to solve for the result- ing external electromagnetic field due to scattering of an incident wave, also the scattered wave must be considered. The incoming wave will interact with this scattered wave ⃗𝐸 resulting in the following superposition: ⃗𝐸 = ⃗𝐸 + ⃗𝐸 , (2.38) where ⃗𝐸 denotes the resulting field external to the particle responsible for the scattering. The elec- tromagnetic field that exists within the particle due to absorption will be represented by ⃗𝐸 . For transitions from one material to another the electric permittivity and magnetic permeability change almost instantly in space; the length scale is in the order of atomic dimensions [20]. These changes impose boundary conditions on the tangential electric and H-field through the Maxwell equa- tions (2.15) and (2.17): [ ⃗𝐸 − ⃗𝐸 ] × ⃗𝑛 = [ ⃗𝐸 + ⃗𝐸 − ⃗𝐸 ] × ⃗𝑛 = 0, [ ⃗𝐻 − ⃗𝐻 ] × ⃗𝑛 = [ ⃗𝐻 + ⃗𝐻 − ⃗𝐻 ] × ⃗𝑛 = 0, (2.39) where ⃗𝑛 = ̂𝑟. Additionally, constraints on the normal components can be formulated by integration over a volume of (2.14) and (2.16): [𝜖 ⃗𝐸 − 𝜖 ⃗𝐸 ] ⋅ ⃗𝑛 = [𝜖 ⃗𝐸 + 𝜖 ⃗𝐸 − 𝜖 ⃗𝐸 ] ⋅ ⃗𝑛 = 0, [𝜇 ⃗𝐻 − 𝜇 ⃗𝐻 ] ⋅ ⃗𝑛 = [𝜇 ⃗𝐻 + 𝜇 ⃗𝐻 − 𝜇 ⃗𝐻 ] ⋅ ⃗𝑛 = 0. (2.40) The combination of the four constraints on the tangential and normal components is sufficient to solve for ⃗𝐸 and ⃗𝐸 in case of a known ⃗𝐸 . Calculation of Fields in Vector Wave Equation Solutions Calculation of the scattered and internal field is most conveniently done in the basis of the vector wave equation solutions (2.29) and (2.30). The scattered and internal electromagnetic waves are are written as a linear combination of these making use of the boundary conditions (2.39). The results are the following: ⃗𝐸 = ∑ 𝐸 (𝑐 ⃗𝑀 ( ) − 𝑖𝑑 ⃗𝑁 ( ) ) , (2.41) ⃗𝐻 = −𝑘 𝜔𝜇 ∑ 𝐸 (𝑑 ⃗𝑀 ( ) + 𝑖𝑐 ⃗𝑁 ( ) ) , (2.42) ⃗𝐸 = ∑ 𝐸 (𝑖𝑎 ⃗𝑁 ( ) − 𝑏 ⃗𝑀 ( ) ) , (2.43) ⃗𝐻 = 𝑘 𝜔𝜇 ∑ 𝐸 (𝑖𝑏 ⃗𝑁 ( ) + 𝑎 ⃗𝑀 ( ) ) , (2.44) where 𝐸 = 𝐸 𝑖 ( ) ( ) , which is a common factor in all four expressions. For the internal electromagnetic fields (2.41) and (2.42), the Bessel function that is needed is again that of the first kind: 𝑧 ( ) ≡ 𝑗 . The reason for this is that the solution should be finite at the origin, as this is part of the internal region in case the center of the particle coincides with the origin of the coordinate system. For the scattered electromagnetic fields (2.43) and (2.44), the Bessel function that is needed is that of the third kind, the spherical Hankel function of the first kind: 𝑧 ( ) ≡ ℎ ( ) . This follows from the required
  • 24. 10 2. The Project physical behavior in the far field [30]. Namely, for 𝑘𝑟 >> 𝑛 the first kind Hankel function becomes an outgoing spherical wave: ℎ ( ) (𝑘 𝑟) (−𝑖) 𝑒 𝑖𝑘 𝑟 , (2.45) which is consistent with what one would expect physically. The solution to the set of equations containing four unknown variables 𝑎 , 𝑏 , 𝑐 and 𝑑 is found by applying the boundary conditions (2.39) to (2.41), (2.42) and (2.43) to (2.44). As only the external field will be responsible for the generation of speckle patterns, here only the solution to 𝑎 and 𝑏 will be given: 𝑎 = 𝜇 𝛽 𝑗 (𝑦)[𝑥𝑗 (𝑥)] − 𝜇 𝑗 (𝑥)[𝑦𝑗 (𝑦)] 𝜇 𝛽 𝑗 (𝑦)[𝑥ℎ ( ) (𝑥)] − 𝜇 ℎ ( ) (𝑥)[𝑦𝑗 (𝑦)] , (2.46) 𝑏 = 𝜇 𝑗 (𝑦)[𝑥𝑗 (𝑥)] − 𝜇 𝑗 (𝑥)[𝑦𝑗 (𝑦)] 𝜇 𝑗 (𝑦)[𝑥ℎ ( ) (𝑥)] − 𝜇 ℎ ( ) (𝑥)[𝑦𝑗 (𝑦)] , (2.47) where 𝑥 ≡ 𝑘 𝑎 denotes the size parameter, 𝑦 ≡ 𝑘 𝑎 = 𝛽𝑥. 𝛽 represents the relative refractive index: 𝛽 = 𝑘 𝑘 = √ 𝜖 𝜇 𝜖 𝜇 . (2.48) Once these coefficients are known, the strength of scattered electromagnetic waves as a function of position (𝑟, 𝜃, 𝜙) can be determined. This was done by Van As [30] by making use of the Far-Field approximation [28]. It should be noted that for the general case of multiple scatterers, a switch to general coordinates is necessary. Also, the initial phase of the incoming plane wave will depend on the particle position and must be considered [30]. 2.2. Experimental Method The application of the theories described in Sec. 2.1 is outlined here. First, the overview of the setup created by Van As will be given in Sec. 2.2.1. Then we will zoom in on the implementation of the theories of Sec. 2.1 in the individual parts of the setup in Sec. 2.2.2, Sec. 2.2.3 and Sec. 2.2.4. In Sec. 2.2.5 we will look at the parameters as used in the present research by Joosten. 2.2.1. Setup by Van As As mentioned before, Van As’ OptoFluids code links simulations on fluid dynamics in OpenFOAM to his self-created optics code to create speckle patterns. In Fig. 2.3 the coupling between the two is displayed schematically. Red blood cells are approximated by spheres. In OpenFOAM the positions of red blood cells are calculated as a function of time. A certain periodicity in the movement of the fluid, and therefore the blood cells, was introduced here. A visualization of the particle positions at a certain time step can be seen in Fig. 2.3. In the optics part an incoming plane wave is used to illuminate this particle configuration and cal- culate the resulting field as described in Sec. 2.1.2. The resulting field is then recorded by a camera, which leads to 2D speckle patterns. A time series of these speckle patterns will be used in this research to seek to retrieve the introduced periodicity. 2.2.2. Solving the Navier-Stokes equations with OpenFOAM As working with OpenFOAM is not part of the scope of this research, only crucial information on the input and output of the simulations by Joosten [13] will be given. In OpenFOAM the Navier Stokes equations (2.8), (2.9), (2.10) are discretized, using the Finite Volume Method. This results in a system of non-linear coupled equations. This is solved using OpenFOAM’s pimple iteration scheme. Cyclic boundary conditions were imposed by Joosten on the cylinder ends: particles leaving at the one end will be inserted into the cylinder at the other end, at the same position with respect to the cylinder axis, to maintain a constant number of particles. These cyclic boundary conditions are justified by Joosten [13]. The number of particles that is introduced into the simulation is 1000. The initial positions are randomly generated making use of the probability distribution in (2.3).
  • 25. 2.2. Experimental Method 11 Figure 2.3: Schematic overview of the setup as simulated by Van As in the OptoFluids code. An incoming plane wave will scatter off a configuration of red blood cells. The resulting interference pattern is recorded by a camera as a speckle image. The goal of our research is to retrieve the introduced heartbeat from analysis of time series of these speckle patterns. Figure 2.4: Artist impression of the geometry. The red blood cells are represented by spheres, particle positions are given for a certain time. Cyclic boundary conditions were imposed on the cylinder ends to maintain a constant number of particles. 2.2.3. Adding a Pulsatile Flow In order to mimic a real heartbeat, Joosten introduced a periodicity in the simulation environment by imposing a pressure gradient [13]: Δ𝑃 𝜌 = 𝛼(1 + 𝛽𝑠𝑖𝑛(2𝜋𝑓𝑡)). (2.49) The parameters 𝛼 en 𝛽 were deduced from typical values for arteries, combined with Hagen-Poiseuille flow validation: 𝛼 = 2.6780625 ⋅ 10 , 𝛽 = 0.7. The frequency 𝑓 was chosen as 1𝐻𝑧; an order or magnitude that is comparable to the typical frequency of a heartbeat [8]. The pressure gradient is plotted as a function of time in Fig. 2.5. 2.2.4. The Camera For the recording of the speckle patterns a square camera of 128 x 128 pixels was used. As a real camera creates images by integration of the intensity measured during a finite integration time, the same principle will be used in the processing of the simulation data. The integration time is taken as 100𝜇𝑠. During this integration time, 20 instantaneous speckle images will be recorded with 5𝜇𝑠 between
  • 26. 12 2. The Project 0 0.5 1 1.5 2 2.5 3 t[s] 0 1 2 3 4 5 ∆P ρ m2 s2 ×10-4 Figure 2.5: Imposed pressure gradient to introduce periodicity in the flow [13]. them. Then a single speckle pattern will be created by averaging the intensity per pixel over these 20 samples. It is this averaging that makes the velocity extractable from speckle images. Namely, if the particles move considerably between two successive instantaneous images, then these patterns will be very different and averaging will result in a high degree of blurring. On the other hand, if the particles are barely moving, the two successive instantaneous images will be very similar, leading to minimal blurring. Blurring is thus an indicator of the velocity of the particles. The ’blurred’ image will be used for the fractality and correlation analysis. The camera size and position was chosen in such a way that a typical speckle takes up around 4 x 4 pixels [13]. The blurred images that are used for the analysis are sampled at a frequency of 12.5𝐻𝑧. So every 𝑡 of 0.08𝑠 the camera measures 20 instantaneous speckle images within the measurement time 𝑡 of 100𝜇𝑠. This is visualized in Fig. 2.6. Figure 2.6: Visualization of the recording process. After each sampling time instantaneous speckle patterns, depicted in blue, are used to generate one blurred speckle pattern that is comparable to an image of a real camera. 2.2.5. Relevant Setup Parameters It should be noted that the parameters as chosen by Van As [30] were predominantly the same as those used in the experimental research by Loozen [15]. This allows for experimental validation. In both cases, instead of real blood, water-glycerol, which has a refractive index identical to blood, was
  • 27. 2.2. Experimental Method 13 used. Due to differences in other material properties, e.g. density, deviations from the typical Reynolds numbers for different vessels as stated in Table 2.1 can be expected. Table 2.2: Relevant setup parameters as used in simulations by Joosten [13] and Van As [30]. 𝐿 1cm Length of the cilinder in the 𝑧-direction 𝑅 8mm Radius of the cylinder 𝑎 4𝜇m Radius of simulated particles 𝜌 1157.2kgm Density of the fluid 𝜌 1.1 ⋅ 10 kgm Density of the particles 𝜇 9.58 ⋅ 10 Pa ⋅ s Dynamic viscosity of the fluid 𝜈 8.28 ⋅ 10 m s Kinematic viscosity of the fluid 𝑣 5.4 ⋅ 10 ms Centerline (maximum) velocity of the fluid 𝑁 1000 Number of simulated particles 𝑛 1 Refractive index of the surrounding medium 𝑛 1.52 Refractive index of the particles 𝜆 532nm Wavelength of the used laser 𝑦 25cm Distance between the camera and the cylinder axis |⃗𝑟 | 1.25cm Halfwidth of the camera 𝑡 100𝜇s Integration time of the camera From the data provided in Table 2.2, the Reynolds number can be calculated using (2.5): 𝑅𝑒 = 𝜌𝑣 2𝑅 𝜇 ≃ 104. (2.50) As stated in Sec. 2.1.1, the condition for laminar behavior for pipe-flow is around 𝑅𝑒 < 2300 [31], therefore the simulated flow will be viscous-dominated and behave in a laminar way.
  • 29. 3 Discrete Fourier Transform The discrete Fourier transform is used in mathematics to convert a finite sample that is sampled at a certain fixed sampling frequency 𝑓 into the frequency domain . It is used for digital signal processing and can be computed making use of the Fast Fourier Transform-algorithm [21, 22]. The Fourier trans- form is relevant to our research as it allows us to convert a time series into the frequency domain and thereby determine the governing frequencies. 3.1. Fast Fourier Transform A periodic (period 𝑇) and discrete (𝑁 values) sequence 𝑥 , is transformed into a periodic and discrete sequence 𝑋 , by [21, 22]: 𝑋 = ∑ 𝑥 𝑒 , 𝑘 ∈ ℤ. (3.1) The Fourier transform is periodic in 𝑘 with period 𝑁 : 𝑋 = 𝑋 . Therefore, it is usually computed in the 𝑘-interval [0, 𝑁-1] . 𝑋 will be a measure of the amount of 𝑓 present in the signal 𝑥 . The discrete Fourier transform treats the data as if it were periodic with the period equal to the measuring time 𝑇. This measuring time 𝑇 is related to the number of samples 𝑁 and the sampling frequency 𝑓 in the following way: 𝑇 = 𝑁 𝑓 . (3.2) The frequencies that can therefore be distinguished are multiples of the fundamental frequency , which for a periodic signal with one cycle in the sequence of measuring time 𝑇 are: 𝑓 = 0, 1 𝑇 , 2 𝑇 , ..., 𝑁 − 1 𝑇 = 0, 1 𝑁 𝑓 , 2 𝑁 𝑓 , ..., 𝑁 − 1 𝑁 𝑓 . (3.3) So the interval [0, 𝑓 ] is divided into 𝑁 equally spaced steps. Because of this periodicity in the frequency domain: 𝑓 = 𝑓 . (3.4) As the values for 𝑋 are complex, their absolute value has to be computed to display them in a graph. The absolute value of 𝑋 will be denoted as the power of the signal for that certain value of 𝑘. 3.2. The Nyquist Frequency and the Nyquist-Shannon Sampling Theorem From the discrete Fourier transform, it follows that a sequence of 𝑁 samples will result in a sequence of values 𝑋 with periodicity 𝑁. The maximum number of unique values for 𝑋 would therefore be 𝑁. 15
  • 30. 16 3. Discrete Fourier Transform However, according to the Nyquist theorem [22, 24] the Nyquist folding frequency is half the sampling frequency 𝑓 . Signals with frequencies higher than this 𝑓 , 𝑓 +Δ𝑓 will fold back to 𝑓 -Δ𝑓, as can be seen in Fig. 3.1. From the Nyquist theorem follows that the frequency spectrum is mirrored in 𝑓 . This behavior of two signals becoming indistinguishable when being sampled is called aliasing. In Fig. 3.2, aliasing is visualized in the time domain for two sinusoidal signals with a frequency of 0.4𝑓 and 1.4𝑓 respectively. Because of the folding, the interval [0, 𝑓 ] of the Fourier spectrum will contain all the frequency information of a signal. Figure 3.1: Aliasing: After sampling with sampling frequency sinusoids signals with a frequency of 0.4 , 0.6 , 1.4 and 1.6 become indistinguishable. 0 1 2 3 4 5 6 t [s] -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 Amplitude 0.4 fs sampled at f s 1.4 f s sampled at fs Figure 3.2: Aliasing is visualized for two sinusoidal signals. After sampling with a sampling frequency the two sinusoidal signals with a frequency of . and . respectively, become indistinguishable. 3.3. Conclusion The discrete Fourier transform is used to convert a finite time sequence into the frequency domain. This is relevant to our research as numerous properties of speckle patterns will be computed as time sequences. The frequencies that can be distinguished are multiples of the fundamental frequency (see (3.3)). The Nyquist folding frequency is half the sampling frequency. Thus, the sampling rate of 12.5𝐻𝑧, as used in present research, should be sufficient to detect the introduced 1𝐻𝑧 frequency. Aliasing causes the 11.5𝐻𝑧 frequency to fold back to 1𝐻𝑧 in the Fourier spectrum. Although this causes noise, the folding should not impact the results enormously, as the frequency of 1𝐻𝑧 is predominant.
  • 31. 4 Fractality Fractality is one of the properties of the speckle patterns that is used in this research to form a time sequence that will be converted in to the frequency domain. First, the underlying theory is elaborated in Sec. 4.1. In Sec. 4.2 the implementation of different fractal dimensions in this research is discussed. Lastly, the preliminary results are presented and discussed in Sec. 4.3. 4.1. Theory Fractality describes the scaling symmetry exhibited by natural phenomena or mathematical figures. This is closely linked to the degree of roughness and complexity. In order to quantify the fractal be- havior of phenomena, the fractal dimension can be calculated. This indicates how the number of non-overlapping self-similar fractals 𝑁 , measuring units so to say, changes when the phenomenon is scaled up or down [3, 16]: 𝐷 = ln (𝑁 ) ln( ) , (4.1) where 𝑟 is the scaling ratio and 𝐷 the similarity dimension. The scaling ratio concerns the size of the self-similar fractal that is used to measure the phenomenon. For geometric figures, such as a straight line, square and cube, the similarity dimension will be an integer number. For instance, when the size of the square measuring unit is divided in half (𝑟 = ), four times as many of them (𝑁 = 4) are needed to cover the same area. This results in the expected similarity dimension of 2, which is equal to its topological dimension. This is visualized in Fig 4.1. For fractals however this is not the case; the similarity dimension will be a non-integer and will therefore differ from the topological dimension of the fractal. An excellent example of this is the Koch Snowflake [3, 16], as displayed in Fig 4.2. The circumference of this Koch Snowflake will be shown to have the non-integer dimension of 1.26. For the Koch Snowflake the building block is an equilateral triangle. As can be seen from Fig. 4.2, each time the scaling factor 𝑟 = is applied, every line segment will split into 3 equal parts and the same building block will be implemented on the middle segment. By doing so the contour of the figure becomes of its original size. The non-overlapping self-similar fractal in this case, is the side of the equilateral triangles with a length that is that of the length of the side of the original triangle. Therefore, the number of non-overlapping self-similar fractals will increase by factor 4: 𝑁 = 4. From this a similarity dimension 𝐷 = 1.26 follows. A distinction between exact fractals and statistical fractals can be made. Exact fractals, such as the Koch Snowflake, are perfectly self-similar: the same pattern repeats itself at every scale. On the other hand, for statistical fractals only the statistical properties repeat themselves at the different scales. For the present research, statistical fractality is of interest. In order to apply the theory of statistical fractality to a speckle pattern that changes over time, box counting techniques are well suited. This comes down to dividing the entire image into boxes of equal size and determining how many of these boxes of specific size are needed to cover all the non-background pixels of the image [19]. The mathematical way of determining the number of boxes, depends on the chosen box counting method and will be discussed in Sec. 4.2. 17
  • 32. 18 4. Fractality Figure 4.1: Traditional scaling for 1D, 2D and 3D. When scaling the size of the measuring unit (line for 1D, square for 2D, cube for 3D) with , the number of measuring units needed to cover the entire geometry goes as . Figure 4.2: Koch Snowflake with . . Each time the image is scaled with the number of non-overlapping self-similar fractals, equilateral triangle sides, , is multiplied by . Repeating the process for boxes of different sizes results in a relationship between the box size 𝑠 and the number of boxes needed to cover all the non-background pixels of the image 𝑁 . The box size 𝑠 is similar to the scaling ratio 𝑟, that was used in Sec. 4.1, resulting in: 𝐷 = ln (𝑁 ) ln( ) . (4.2) Linear fitting through the data-points (ln ( ) , ln (𝑁 )) will therefore give 𝐷 as the slope. Physical Implication It is important to note the physical meaning of the steepness of the slope. For the box counting tech- niques used in this research, the value of the fractal dimension will range between 1 and 2. A fractal dimension of 1 represents a straight line, whereas a dimension of 2 corresponds to a line that makes up a plane by wiggling through space. The fractality is thus a measure of the ability of a pattern to fill 2D space. This is directly linked to its complexity: a higher fractal dimension also means that with decreasing box size the object becomes more complex [10].
  • 33. 4.2. Experimental Method 19 A second way to gain a physical intuition about fractality is by looking at it as the degree of roughness in an image. This is often applied in studying textures, as the fractality captures how coarseness is spread over a surface. Higher fractal dimensions correspond to rougher, more coarse surfaces [5, 32, 33]. 4.2. Experimental Method For analyzing the speckle patterns retrieved from the OptoFluids code, it is useful to make use of available software such as ImageJ in combination with the plug-in FracLac. FracLac allows for multiple ways of applying box counting to an image. Below a brief descriptions of the different box counting options in FracLac are given. 4.2.1. Binary Box Counting For binary box counting the value for each pixel is converted into a binary value. By default, the pixel color (either black or white) that appears most is set as the background color. In determining the number of boxes needed to cover the entire image, the number of boxes containing non-background pixels is simply counted. This standard way of box counting results in a fractal dimension that is denoted by FracLac as 𝐷 . 𝐷 is given by a formula similar to (4.2), with 𝑠 the relative box size: 𝐷 = ln (𝑁 ) ln( ) . (4.3) Linear fitting through the data-points (ln ( ) , ln (𝑁 )) will therefore give 𝐷 as the slope. It should be noted that in the conversion from grayscale (which would be natural to use for the output of the OptoFluids code) to binary, information is lost. Aditionally, information is lost in the way of box counting, as the possibility of more non-background colored pixels being in the same box is not accounted for. The mass box counting method does take this possibility into consideration, as discussed in Sec. 4.2.2. 4.2.2. Differential Grayscale Box Counting For grayscale analysis, the fact that the pixels take values from 0 (black) to 255 (white) is used. In order to do so, it is no longer possible to just look at which boxes contain valuable information, i.e. non-background colored pixels. The calculations are therefore adjusted in the following way: given a certain box size 𝑠, for each box position (𝑖, 𝑗) the difference in intensity 𝛿𝐼 , , between the pixel with maximum intensity and the pixel with minimum intensity within that box is determined: 𝛿𝐼 , , = 𝐼 ( , , ) − 𝐼 ( , , ). (4.4) These differences in intensity for a given box size are then summed over all the boxes to determine the intensity value 𝐼 that then corresponds with box size 𝑠: 𝐼 = ∑ , (1 + 𝛿𝐼 , , ) . (4.5) Finally, the fractal dimension for grayscale analysis 𝐷 , is given by: 𝐷 , = ln (𝐼 ) ln( ) . (4.6) 4.2.3. Mass Box Counting For mass box counting, the number of non-background pixels per box is determined and used to cal- culate the average non-background colored pixels per box 𝜇 . The mass fractal dimension 𝐷 is then calculated in the following way for binary analysis: 𝐷 = ln (𝜇 ) ln( ) . (4.7)
  • 34. 20 4. Fractality The grayscale analogue to (4.7) is determined by dividing 𝐼 by the total number of boxes 𝑁 , to calculate the average per box 𝐼 : 𝐼 = 𝐼 𝑁 , , (4.8) which is then used to calculate the mass fractal dimension 𝐷 , : 𝐷 , = ln (𝐼 ) ln(𝑠) . (4.9) 4.2.4. Mean Fractal Dimension Another refinement that can be made is averaging over different grid orientations, as the calculation of the fractal dimension will depend on the orientation of the grid as illustrated in Fig. 4.3. Depending on the orientation of the grid, represented by the gray squares, with respect to the object, the white triangle, there are more or fewer gray squares needed to cover the entire object. By performing the same calculation for a number of different grid orientations 𝑁 and then averaging, the influence of the grid orientation on the result should be reduced. The mean fractal dimension 𝐷 is then given by: 𝐷 = 1 𝑁 ∑ 𝐷 (𝐺). (4.10) FracLac applies this way of averaging to both the standard box counting methods 𝐷 and 𝐷 in both binary and grayscale analysis, resulting in 𝐷 , 𝐷 , 𝐷 , and 𝐷 , . In the remainder the bar notation will be dropped; all the discussed fractal dimensions will be grid averaged, unless specified otherwise. Figure 4.3: Influence of grid orientation on the number of boxes needed to cover the entire image of non-background pixels. 4.2.5. Average Cover A final fractal dimension that can be calculated using FracLac is based on the average cover over all grids. So instead of calculating the fractal dimension for each grid and then averaging it over these grids, the cover for each box size will be averaged over the grids: 𝑁 = 1 𝑁 ∑ 𝑁 (𝐺). (4.11) Then this average cover will be used for calculating an analogue to 𝐷 : 𝐷 = ln(𝑁 ) ln( ) . (4.12) In the grayscale analysis the analogue to 𝐷 will be denoted as 𝐷 , .
  • 35. 4.3. Preliminary Results 21 4.2.6. Summary Fractal Dimensions To summarize, for each speckle pattern six different fractal dimensions will be calculated, as shown in Table. 4.1. Table 4.1: Summary Fractal Dimensions Binary Grayscale Box counting fractal dimension averaged over grids 𝐷 (Sec. 4.2.1) 𝐷 , (Sec. 4.2.2) Mass box counting fractal dimension averaged over grids 𝐷 (Sec. 4.2.3) 𝐷 , (Sec. 4.2.3) Cover averaged over grids 𝐷 (Sec. 4.2.5) 𝐷 , (Sec. 4.2.5) 4.3. Preliminary Results For the fractal analysis, 34 equally time spaced speckle patterns are used, which corresponds to 2.64 periods of the input signal. These patterns are constructed as described in Sec. 2.2.4 and the used metrics are summarized in Table 4.1: the ’blurred’ speckle patterns that are used for the analysis are constructed out of 20 instantaneous speckle patterns recorded equally time spaced in 100𝜇𝑠. The time between the ’blurred’ speckle patterns is 0.08𝑠, which corresponds to a sampling frequency of 12.5𝐻𝑧. 4.3.1. Time Domain The fractal dimension is determined six times making use of the methods described in Sec. 4.2. The resulting time sequences are shown in Fig. 4.4. 0 1 2 3 t [s] 1.66 1.68 1.7 1.72 DB a 0 1 2 3 t [s] 1.66 1.68 1.7 1.72 DM b 0 1 2 3 t [s] 1.66 1.68 1.7 1.72 Dx c 0 1 2 3 t[s] 1.38 1.4 1.42 1.44 1.46 DB,gray d 0 1 2 3 t [s] 0.38 0.4 0.42 0.44 0.46 DM,gray e 0 1 2 3 t [s] 1.38 1.4 1.42 1.44 1.46 Dx,gray f Figure 4.4: Six different measures for the fractal dimension are shown. These are calculated for 34 succeeding speckle patterns with a sample rate of . . a (d) binary (grayscale) box counting, b (e) binary (grayscale) mass box counting, c (e) binary (grayscale) average cover. When zooming in on the binary fractal dimensions, Fig. 4.4 (a,b,c), similarities in the time dependent behavior can be found. In the first place, 𝐷 and 𝐷 are identical. This would suggest that accounting for the fact that there can be multiple non-background pixels in one box does not significantly alter the results or improve the outcome. The fact that 𝐷 (𝐷 , ) displays the same behavior as 𝐷 (𝐷 , ) is what one would expect from the way they are calculated. The difference comes from the fact that the averaging for 𝐷 (𝐷 , ) over the grids is done before applying the regression, whereas for 𝐷 (𝐷 , ) the process of calculating the fractal dimension is done for each individual grid and then averaged over the grids. After explicitly checking whether 𝐷 (𝐷 , ) is just a shifted version of 𝐷 (𝐷 , ), it is found that this is not the
  • 36. 22 4. Fractality 0 0.5 1 1.5 2 2.5 3 t [s] 2 3 4 5 6 7 8 9 10 DB−Dx ×10-3 Binary Grayscale Figure 4.5: Difference between ( , ) and ( , ). These differences turn out not be be constant, but seem to fluctuate around a value with order of magnitude . This is significantly smaller than the typical value for the fractal dimension, regardless of the applied calculation method. case. This is shown in Fig. 4.5. To conclude, as 𝐷 (𝐷 , ) follows the same trend as 𝐷 (𝐷 , ) we would expect their Fourier spectra to be similar. For the grayscale analysis the values of 𝐷 , and 𝐷 , differ a lot. Closely analyzing the data suggests that the values of 𝐷 , are the values of 𝐷 , mirrored in a horizontal line around 𝐷 ≃ 0.9. This hypothesis is confirmed by calculating the average of 𝐷 , and 𝐷 , for every time instance: the result is a horizontal line at 𝐷 = 0.9218 as displayed in Fig. 4.6. The mirroring behavior is not what one would expect from (4.9), as this allows for rewriting 𝐷 , as: 𝐷 , = ln(𝐼 ) ln(𝑠) = 𝐷 − 𝐷 , . (4.13) The fact that (4.13) does not hold for the experimental data follows from looking at Fig. 4.4 (a,b,c), subtracting 𝐷 , from 𝐷 will clearly give values smaller observed in Fig. 4.4 (c). The equations for (4.3), (4.6) and (4.9) were checked with FracLac’s logbooks on the used computations. Additionally, it was checked whether the equations (4.3), (4.6) and (4.9) would yield positive values for the fractal dimension. Finding the reason for the mirroring behavior and the fact that (4.13) does not hold remains open to further investigation. Ultimately, not the real time but the frequency domain behavior of the fractal dimension is relevant for this research. Therefore, it is important to discuss the implications of this mirroring behavior on this. In Appendix A.1 a case study on this is conducted. The implication on the results for 𝐷 , and 𝐷 , is that they contain the same frequency information after accounting for their offsets. No additional value is added from analyzing them separately. 4.3.2. Frequency Domain As the average value of the fractal dimension is not relevant, subtracting this average value from the time sequence as displayed in Fig. 4.4 will remove the 0𝐻𝑧 component from the frequency domain, allowing us to better visualize the non-zero frequency components. The purpose of constructing these Fourier spectra is being able to determine whether the 1𝐻𝑧 frequency of the imposed boundary conditions (2.49) can be retrieved from the fractality speckle pattern analysis. From Fig. 4.7 it is not possible to retrieve this 1𝐻𝑧 frequency. Neither the binary, Fig. 4.7a, nor the grayscale analysis, Fig. 4.7b, shows a significant peak around 1𝐻𝑧 compared to the other frequencies. The result that is obtained seems to be noise. Hypotheses will be discussed in Ch. 7. A final step will be to verify that the obtained Fourier spectra are at least consistent with each other. As the binary 𝐷 and 𝐷 have identical time sequences, their Fourier spectrum is also identical. The
  • 37. 4.3. Preliminary Results 23 0 0.5 1 1.5 2 2.5 3 t [s] 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6D D B D M D x mirrorline: 0.5 (D B +D M ) Figure 4.6: The grayscale fractal dimensions are displayed as a function of time for the speckle images. The values of and are related by mirroring in the dashed at line . . 0 1 2 3 4 5 6 7 f [Hz] 0 1 2 3 4 5 6 7 Power ×10-3 a D B DM Dx 0 1 2 3 4 5 6 7 f [Hz] 0 0.002 0.004 0.006 0.008 0.01 0.012 Power b D B D M Dx Figure 4.7: The discrete time discrete Fourier transform for the six fractal dimension time sequences in the frequency range . . a contains the three considered binary fractal dimension, b contains the three considered grayscale fractal dimensions. fact that the Fourier spectra for 𝐷 and 𝐷 , both for the binary and grayscale analysis, behave very similarly is consistent with the fact that the differences between the 𝐷 and 𝐷 time sequence values are very small, as displayed in Fig. 4.5. Additionally, there seems to be consistency up to a certain level between the binary and grayscale analysis: both process the data in a different way and therefore the hypothesis that noise is processed explains why both yield different Fourier spectra. Fig. 4.7 justifies that one may regard only 𝐷 and 𝐷 , as relevant parameters, as the behavior of the other binary (grayscale) does not seem to deviate from 𝐷 (𝐷 , ) considerably.
  • 39. 5 Correlations Three different correlation functions will be used to develop time sequences that can be converted into the frequency domain making use of the discrete Fourier transform. In Sec. 5.1 the theory behind each of these three methods will be discussed. In Sec. 5.2 the process of processing speckle patterns making use of these theories will be be discussed briefly. The preliminary results that follow from the correlation analysis will be presented in Sec. 5.3. 5.1. Theory 5.1.1. Correlation Coefficient The dynamics of the scattering particles cause the measured intensities to vary over time, i.e. the speckle patterns change over time due to the motion of these particles. Nemati and others define the temporal field correlation g1 in order to quantify these fluctuations [18]: 𝑔 (𝜏) = 1 𝑇 ∫ 𝐸∗ (𝑡)𝐸(𝑡 + 𝜏)𝑑𝑡, (5.1) where 𝜏 is the correlation time, 𝑇 the exposure time, 𝐸(𝑡) the time-dependent complex electric field and 𝐸∗ (𝑡) its complex conjugate. The physical electric field ℰ(𝑡) is related to the complex electric field in the following way: ℰ(𝑡) = 𝑅𝑒(𝐸(𝑡)). (5.2) The correlation time 𝜏 is similar to the delay time in the autocorrelation. It is stated by Nemati and others that this is related to the velocity of the scatterers, which in its turn depends on the distribution of the scattering particles [18]. In order to quantify the frequency spectrum of fluctuations in intensity in the speckle patterns due to the motion of the particles, and thus extract an heartbeat, the correlation coefficient 𝑐𝑐 is constructed [18]: 𝑐𝑐(𝑡) = ∑ ∑ (𝑓 − ̄𝑓)(𝑔 − ̄𝑔) √∑ ∑ (𝑓 − ̄𝑓) √∑ ∑ (𝑔 − ̄𝑔) , (5.3) where 𝑓 denotes the intensity of pixel (𝑘, 𝑙) at a certain time 𝑡 and ̄𝑓 is the instantaneously area- averaged intensity at that time 𝑡. 𝑔 denotes the intensity of that same pixel in the next time frame, ̄𝑔 is again the instantaneously area-averaged intensity. 𝑘 and 𝑙 both range from 1 to 𝑁 in case of a square 𝑁 x 𝑁 pixel detector. The denominator is implemented in order to normalize the result. By Nemati and others it is stated that the correlation coefficient will range between 0 and 1 [18]. However, in case that 𝑓 > ̄𝑓 for all 𝑔 < ̄𝑔 and 𝑓 < ̄𝑓 for all 𝑔 > ̄𝑔, a negative value for the correlation coefficient will result. We therefore assume that the author implied that the absolute value of the correlation coefficient will be between 0 and 1. The results of the correlation coefficient in Sec. 5.3.1 calculation will support this argument. 25
  • 40. 26 5. Correlations In case of 𝑀 equally time-spaced speckle patterns, the value for the correlation coefficient 𝑐𝑐 is calculated 𝑀 − 1 times, resulting in a time sequence. This will then be converted into a frequency spectrum making use of the discrete Fourier transform. Physical Implication Important to note is the physics behind the mathematical operation: the correlation coefficient is basi- cally a measure of how the intensity of a certain pixel (𝑘, 𝑙) relates to its value one time step further. Specifically, the difference between the value of that certain pixel (𝑘, 𝑙) and the average image inten- sity is compared to that of the next time step. In case the value of the pixel compared to the average intensity is very similar, the correlation coefficient approaches a value of 1. This means that the ’rough- ness’ of the image, i.e. the localization of dark and bright spots, is very similar for two succeeding time steps. This would happen if the positions of the particles hardly change in the elapsed time, which corresponds to low velocity of the fluid. In case the ’roughness’ of the succeeding time step is completely uncorrelated to that of the previous image, the correlation coefficient will approach 0. This corresponds to rapid changing particle positions due to the velocity of the fluid. Conditions for a negative correlation coefficient are discussed above. For a value for the correlation coefficient of −1 the ’roughness’ of the succeeding picture has to have the inverse roughness of the first picture, i.e. bright spots where the dark spots were previously located and vice versa. The likelihood of obtaining a correlation coefficient of −1 is small as the change in the speckle patterns is governed by the particle motion, i.e. there is no reason why the particles in the next time frame would be positioned in exactly such a way that the speckle pattern will be inverted. On the contrary, for closely time-spaced measurements one would expect that the particles have barely changed their positions resulting in a speckle pattern that is very similar to that of the previous time step, resulting in a value for correlation coefficient close to 1. This behavior is indeed observed for the speckle patterns that are used for integration to create a blurred speckle pattern. 5.1.2. Autocorrelation The autocorrelation function is a statistical computation that describes the correlation between different time steps of the same random process. It provides a measure of the similarity of values for different times of a single signal. The autocorrelation for a stochastic process 𝑥(𝑛) at time steps 𝑘 and 𝑙 is given as: 𝑟 (𝑘, 𝑙) = 𝐸[𝑥(𝑘)𝑥∗ (𝑙)] (5.4) Stationarity is the notion of time-invariant behavior of stochastic processes. Wide sense stationarity is a form of stationarity that only limits the behavior of the ensemble averages. The conditions for wide sense stationarity are the following [34]: 𝑚 (𝑘) = 𝑚 < ∞, 𝑟 (𝑘, 𝑙) = 𝑟 (𝑘 − 𝑙) ∀(𝑘, 𝑙), 𝑐 (0) < ∞, (5.5) where 𝑚 (𝑛) is the mean function of 𝑥(𝑛) and 𝑐 (𝑛) is the autocovariance function of 𝑥(𝑛). For a finite length wide sense stationary process [𝑥(𝑛)]( ) ( ) , a time averaged autocorrelation can be calculated in the following way: ̂𝑟 (𝑘, 𝑁) = 1 𝑁 ∑ 𝑥(𝑛)𝑥∗ (𝑛 − 𝑘). (5.6) In case this time averaged autocorrelation function approaches the true autocorrelation function 𝑟 (𝑘), the wide sense stationary process will be called autocorrelation ergodic. Nonrandom Variable In analyzing speckle patterns, the autocorrelation function can be calculated for the intensity of a certain pixel over time. This is done by multiplying the value for the intensity of a certain pixel by the value of the intensity of that same pixel at a different moment in time. The difference between the compared times is the lag 𝜏. For a given data series there are multiple samples with the same lag. The value
  • 41. 5.1. Theory 27 of the contrast function is calculated by averaging over the intensity products with the same lag. This result is then scaled by the average value of the intensity squared, in order to normalize the contrast function at 𝜏 = 0. Taken altogether, the contrast function 𝑔 can compactly be denoted as1 : 𝑔 (⃗𝑟, 𝜏) = ⟨𝐼(⃗𝑟, 𝑡) ∙ 𝐼(⃗𝑟, 𝑡 + 𝜏)⟩ ⟨𝐼(⃗𝑟, 𝜏) ⟩ . (5.7) This is closely linked to (5.6). However, it should be noted that the intensity of a pixel at a certain time is not a stochastic process. This intensity is the deterministic result of the incoming electromagnetic wave reflecting on the particle configuration that is specified in the simulation. The initial particle positions are generated randomly with (2.3), their positions for later time steps are the result of a periodic blood flow. Accordingly, the speckle patterns are random to a certain degree, but if the elapsed time between them is sufficiently small coherence is expected. Furthermore, if the intensity of a pixel at a certain time would be a stochastic process, analyzing this time evolution in order to retrieve a heartbeat would be a vain attempt. The similarity to (5.6) can be found in comparing ⟨𝐼(⃗𝑟, 𝑡) ∙ 𝐼(⃗𝑟, 𝑡 + 𝜏)⟩ to ̂𝑟 (𝑘, 𝑁), this is just a different notation for ̂𝑟( ⃗)(𝑘, 𝑁). From this it becomes clear that the average is computed over different numbers of products for different time lags. This can be understood intuitively: for 𝜏 = 1 one can take the product of the intensity at the first time step with the second time step, the second with the third time step and so on to calculate the average. For 𝜏 = 𝑁 −1 one can only take the product of the intensity of the first and last sample to calculate the time averaged autocorrelation. Accordingly, an impact on the uncertainty can be expected: for small lags the average is calculated over a large number of products resulting in a relatively low uncertainty in the mean. For large lags the average is calculated over an increasingly small sample number, with a larger uncertainly in the mean as a result. Falsely treating the variable 𝐼(⃗𝑟, 𝑡) ∙ 𝐼(⃗𝑟, 𝑡 + 𝜏) as random variable 𝑋(⃗𝑟, 𝑡, 𝜏) with E(𝑋) = 𝜇(⃗𝑟, 𝜏) and Var(𝑋) = 𝜎 and 𝑆 (⃗𝑟, 𝜏) = ∑ 𝑋(⃗𝑟, 𝑡, 𝜏) would result in the following [34]: E ( 𝑆 (⃗𝑟, 𝜏) 𝑁 ) = ⟨𝐼(⃗𝑟, 𝑡) ∙ 𝐼(⃗𝑟, 𝑡 + 𝜏)⟩ = 1 𝑁 ∑ 𝑋(⃗𝑟, 𝑡, 𝜏) = 𝜇(⃗𝑟, 𝜏), (5.8) Var ( 𝑆 (⃗𝑟, 𝜏) 𝑁 ) = 𝜎 𝑁 , (5.9) where 𝑁 denotes the number of pairs with a certain lag 𝜏. For the standard deviation this would imply: std ( 𝑆 (⃗𝑟, 𝜏) 𝑁 ) = 𝜎 √𝑁 . (5.10) It should be noted that this standard deviation describes the behavior of the mean: for an increasing number of samples, ( ⃗, ) is more likely to be equal to E( ( ⃗, ) ). The behavior of the standard deviation of the actual nonrandom variable 𝑔 can be compared to this behavior. To do so, ⟨ ( ⃗, )∙ ( ⃗, )⟩ ⟨ ( ⃗, ) ⟩ will be calculated for equally sized subsets of data points for fixed 𝜏. The standard deviation between the means of these subsets, 𝜎 , is then used to quantify the certainty in the mean that was calculated over all data points: the autocorrelation function 𝑔 . Furthermore, the standard deviation of ( ⃗, )∙ ( ⃗, ) ⟨ ( ⃗, ) ⟩ can be calculated as a function of 𝜏. This is a measure for the spread in data points and will be denoted as 𝜎 . Physical Implication When the physical implications of the autocorrelation function 𝑔 are considered, it should be noted that these are very similar to those of the correlation coefficient in Sec. 5.1.1. It captures how similar the intensity of each pixel (𝑘, 𝑙) is to that of the same pixel (𝑘, 𝑙) at a later point in the time sequence. The main difference is that this is done for all the different time lags that are possible for a certain pixel (𝑘, 𝑙). So instead of a summation over all pixels for a time lag of 1, the autocorrelation function is 1Note the difference with the normalized intensity autocorrelation function [25]. In order to normalize the contrast function at , the definition as stated in (5.7) is used in present research.
  • 42. 28 5. Correlations calculated for each pixel individually for varying time lags. As a result the contrast function is a function of both space (i.e. pixel coordinate) and time lag. A second difference is the fact that the pixel intensities are compared directly, instead of looking at their difference with the mean intensity of the entire screen. Regardless of the differences, the autocorrelation is a measure for how similar the intensity at a certain pixel position (𝑘, 𝑙) is to that of the same pixel later on in the time sequence. Equality of the intensities will give a value for the autocorrelation function of 1. 5.1.3. Speckle Contrast A final parameter that was shown to be useful to quantify changes in speckle patterns is the speckle contrast. The speckle contrast 𝑆𝐶 is defined as [11, 12]: 𝑆𝐶 = 𝜎 ⟨𝐼⟩ , (5.11) where 𝜎 is the standard deviation of the pixel intensity and ⟨𝐼⟩ the average pixel intensity. This speckle contrast will be determined for each of the equally time spaced speckle patterns, resulting in a time sequence. For an infinite number of pixels per speckle the speckle contrast will approach the value of 1 [11, 12]. In case of a fine, but not infinitely fine mesh, values close to 1 are typical. This would mean that the value for the speckle contrast would have a constant value for all time steps, making it impossible to use in order to retrieve an heartbeat. Averaging over multiple instantaneous speckle patterns, as necessary to mimic a real camera, will cause velocity-dependent blurring. Namely, if the particles move considerably between succeeding instantaneous images, the result will be blurred to a higher degree than in case they barely move. Blurring reduces 𝜎 and thus the speckle contrast. To conclude, the speckle contrast is a measure for the blurriness, which is velocity-dependent. Physical Implication The physical meaning of the above stated speckle contrast can be intuitively understood by looking at a binary image (black (0) and white (255) pixels) and a grayscale image (pixel intensities between 0 and 255). If the binary image consists of an equal amount of black and white pixels and the grayscale images of pixel intensities homogeneously spread between 0 and 255, the average pixel intensity of both images will be the same. This is shown in Fig. 5.1. However, 𝜎 will be larger than 𝜎 , resulting in a higher speckle contrast for the binary image and a lower speckle contrast for the grayscale image. To conclude, the speckle contrast is a measure for the spread in pixel intensities within a certain speckle pattern compared to the average intensity of that certain image. Figure 5.1: Comparison of speckle images with the same average intensity. For the grayscale image on the left, the standard deviation is lower than for the binary image on the right. As a result, the grayscale image has a lower speckle contrast than the binary image. Having looked at what two speckle patterns with the same average intensity but different speckle contrasts look like, it is important to discuss the physical mechanism that governs these differences.
  • 43. 5.2. Experimental Method 29 As described in Sec. 2.2.4, a single time step speckle pattern is created by integration over 20 in- stantaneous speckle images 5𝜇𝑠 apart in time in order to mimic an actual camera. Depending on how different these 20 instantaneous images are, the resulting speckle pattern will be blurred to a higher or lower degree. This can be understood in the following way: if the particles are not moving significantly, the 20 images that will be used for integration will be more or less the same, leading to minimal blurring. On the other hand, if there is considerable movement of the particles, the 20 instantaneous will be very different, resulting in a very blurred image. From this one could conclude that blurred images, with a low speckle contrast, correspond to a high blood velocity and that rather clean images, with a high speckle contrast, correspond to a low blood velocity. 5.2. Experimental Method All three correlations (correlation coefficient of Sec. 5.1.1, autocorrelation of Sec. 5.1.2 and speckle contrast of Sec. 5.1.3) are determined by loading the speckle patterns into MATLAB R2015b. Making use of (5.3), (5.7) and (5.11) respectively, the time series are calculated and then converted into a frequency spectrum, making use of the discrete Fourier transform, as was described in Sec. 3.1. 5.3. Preliminary Results For the correlation analysis, 81 equally time-spaced speckle patterns are used. These are again con- structed as described in Sec. 2.2.4. The time between the ’blurred’ speckle patterns is 0.08𝑠, which comes down to a sampling frequency of 12.5𝐻𝑧. This is equal to the settings used for the fractality analysis in Sec. 4.3. 5.3.1. Correlation Coefficient 0 20 40 60 80 # sample -0.05 -0.04 -0.03 -0.02 -0.01 0 0.01 0.02 0.03 0.04 0.05 CC a 0 1 2 3 4 5 6 7 f (Hz) 0 1 2 3 4 5 6 7 8 9 Power ×10-3 b Figure 5.2: a: The time sequence for the correlation coefficient, consisting of data points, that results from analyzing the speckle images is displayed. b: Fourier spectrum that results from converting the correlation coefficient time sequence from a into the frequency domain using the discrete Fourier transform. In Fig. 5.2a, the time sequence for the correlation coefficient is shown. Fig. 5.2b contains the corresponding Fourier spectrum. Although Fig. 5.2 contains peaks around the frequency of 1𝐻𝑧, these are not predominantly present. As a result, it is not possible to retrieve the frequency of the imposed signal (2.49) of 1𝐻𝑧. Similarly to the results in Sec. 4.3, the recorded signal seems to be noise rather than the sinusoidal input signal.
  • 44. 30 5. Correlations 5.3.2. Autocorrelation The results for the autocorrelation function are both a function of the time lag and the position. There- fore, it is possible to display the results in numerous ways. Here, there is chosen to look at the behavior of all pixels (𝑘, 𝑙) for a certain lag and the behavior of a certain pixel [(64, 64)] for different time lags 𝜏. a 20 60 100 # Pixel 20 40 60 80 100 120 #Pixel 0.2 0.4 0.6 0.8 b 20 60 100 # Pixel 20 40 60 80 100 120 #Pixel 0.2 0.4 0.6 0.8 c 20 60 100 # Pixel 20 40 60 80 100 120 #Pixel 0.2 0.4 0.6 0.8 d 20 60 100 # Pixel 20 40 60 80 100 120 #Pixel 0 0.5 1 1.5 2 2.5 Figure 5.3: Values of the autocorrelation function displayed as color plot for different time lags. a: , b: , c: , d: . The results for all pixels for a certain time lag are shown in 5.3. It follows from Fig. 5.3 that the value of the correlation function changes significantly over time. Important here is to note the changing limits for the color bar; for Fig. 5.3d the value of the autocorrelation function starts to deviate from the range [0, 1], which was valid for the first three time lags. The spread in the values for different pixels tends to increase as the time lag increases. This can partly be accounted for by the fact that for the higher time lags the averaging in calculating the value for 𝑔 had to be done over fewer samples. For 𝜏 = 74, only 7 samples could be used for averaging, which is considerably smaller than the 80 combinations that can be used in the calculation for 𝜏 = 1. Next, the results for the pixel (64, 64) will be discussed (see Fig. 5.4). It follows from Fig. 5.4a that the speckle patterns are instantly uncorrelated. The error bars that are plotted are calculated by dividing the data points for 𝜏 = 1, 11, 21, 31, 41, 51, 61 into subsets of 10 data points, that are then used to calculate 𝑔 for these subsets. The standard deviation in the values of 𝑔 for the subsets, 𝜎 quantifies the certainty in the value for 𝑔 that was calculated using (5.7). The discrete Fourier transform can been seen in Fig. 5.4b. The 0𝐻𝑧 frequency was set to 0 by subtracting the mean value from the signal. It follows from Fig. 5.4b that there is no predominant peak around the desired frequency of 1𝐻𝑧. On the contrary, the Fourier spectrum contains components for all the different frequencies. This is once more an indication that the speckle patterns that are processed do not reflect the periodicity that was imposed by the boundary conditions through a pressure gradient. Different pixels lead to similar results. The behavior of the standard deviation of 𝑔 of pixel (64, 64) for increasing 𝜏 will be further analyzed
  • 45. 5.3. Preliminary Results 31 0 20 40 60 80 τ 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 g2 a 0 1 2 3 4 5 6 7 f (Hz) 0 0.01 0.02 0.03 0.04 0.05 0.06 Power b Figure 5.4: a: The autocorrelation for the pixel ( , ) is displayed as function of time lag with error bars. These error bars are plotted for the data points , , , , , , . b: The discrete Fourier Transform of the time sequence with the frequency set to . 0 10 20 30 40 50 60 70 80 90 # of samples 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 σ σ spread σmean ~N-1/2 Figure 5.5: The spread of the data points, , and the uncertainty in , , are plotted for the pixel ( , ). Although decreases with an increasing number of samples, it does not display the behavior of a random variable, , as indicated with the dashed line. in Fig. 5.5. The distinction between the certainty in the calculated mean, as plotted in Fig. 5.4a and spread in data points is taken into account. The standard deviation of ( ⃗, )∙ ( ⃗, ) ⟨ ( ⃗, ) ⟩ , 𝜎 , is calculated as a function of the number of samples corresponding to 𝜏. This is a measure for the spread in data points. In Fig. 5.5, 𝜎 is plotted. No clear dependency on the number of samples can be identified. Additionally, the certainty in the calculated value of 𝑔 , 𝜎 , is plotted in the same figure (Fig. 5.5). For comparison the expected relationship for a random variable (see (5.10)) is included. The behavior of the uncertainty in the mean for a random variable will go as 𝑁 , where 𝑁 denotes the number of samples that is used for averaging.
  • 46. 32 5. Correlations Although 𝜎 decreases with an increasing number of samples, a 𝑁 -relationship does not fit through the data points. It was expressed in Sec. 5.1.2 that the behavior of 𝑔 will be different from that of a random variable. The general tendency that 𝜎 increases with a decreasing number of samples is consistent with the fact that the averaging must be done over fewer combinations for these higher values for 𝜏. 5.3.3. Speckle Contrast The values of the speckle contrast that are plotted in Fig 5.6a, which are mostly slightly below 1 mainly, are consistent with what is expected for a mesh of our size [13]. There are no predominant peaks in the Fourier spectrum of Fig 5.6b around the frequency of 1𝐻𝑧. Therefore, the analysis with speckle contrast did not succeed in retrieving the frequency of the imposed signal (2.49) of 1𝐻𝑧. 0 1 2 3 4 5 6 7 t [s] 0.93 0.94 0.95 0.96 0.97 0.98 0.99 1 1.01 1.02 SC a 0 1 2 3 4 5 6 7 f (Hz) 0 1 2 3 4 5 6 7 8 9 Power ×10-3 b Figure 5.6: a: The speckle contrast for the samples displayed as a function of time. b: the time sequence in converted into the frequency domain making use of the discrete Fourier transform.
  • 47. 6 Case Study Camera Size The fact that neither the fractality analysis in Sec 4.3.2, nor the three analyzed correlations as demon- strated in Sec. 5.3 yields results that allow for the retrieval of the artificial heartbeat frequency, makes it necessary to seriously question the setup that was used during the simulations. Comparison with the parameters that were used by Loozen seems a reasonable point to start, given the fact that he has demonstrated that speckle contrast can be used to retrieve an introduced periodicity underlying the speckle patterns. The most important differences are the camera size, number of particles, integration time of the camera and shape of the input signal. Due to time constraints, we will look into the influence of the camera size on the noisiness of the results. In order to do so, three speckle patterns as measured by Loozen are used for further analysis. A prominent difference is the amount of pixels that was used. Our simulations with Van As’ OptoFluids code make use of a camera consisting of 128 x 128 pixels, which covers a screen with a halfwidth of 1.25𝑐𝑚 as can be seen in Table 2.2. Loozen’s images that are used for this analysis consist of 300 x 300 pixels. In Fig. 6.1 a speckle pattern as measured by Van As is shown on the left, on the right a speckle pattern that was experimentally measured by Loozen is shown. The size of a single pixel is equal for both patterns. This makes it possible to compare the number of pixels that is used to cover a typical speckle. From visual comparison in Fig. 6.1 it becomes apparent that there seems to be a deviation in the number of pixels that is used to cover a typical speckle. Van As’ speckle patterns seem to have bigger speckles when the pixel size is set to equality, which corresponds to more pixels per typical speckle. Figure 6.1: Visual comparison between a typical speckle pattern generated by Van As ( x pixels) [30] on the left and one experimentally measured by Loozen ( x pixels) [15] on the right. 33
  • 48. 34 6. Case Study Camera Size 6.1. Deviations within a Single Image To investigate the role of the difference in camera size, we will divide the speckle patterns of Loozen into subsections and look at the deviation between these sections. A first step would be dividing the 300 x 300 pixel image into two halves of 150 x 300 pixels. Repeating the process of calculating the binary fractal dimension, 𝐷 , as outlined in Sec. 4.2, for both halves makes a comparison between the two possible. A mean value and standard deviation for the fractal dimension of these two subsections will be calculated. The same procedure can be used to divide the original image into 4, 6, 9, 12 and 16 equal sections, leading to standard deviations and mean values for each. It is interesting to see how the mean values and standard deviations behave as a function of the number of sections. As the number of screens increases, the number of pixels per screen necessarily decreases. This process of chopping the original images into an increasing number of subsections will be ex- ecuted for three of Loozen’s speckle patterns in order to account for the fact that speckle patterns are random, i.e. speckle patterns for different time steps have different properties. Analogous to determining the fractal dimension of sections of the original image and looking at the standard deviations, one could look at the speckle contrast, as outlined in Sec. 5.2. The results will then be compared to those of fractal dimension analysis. 6.1.1. Results In Fig. 6.2 the results for dividing the original image of 300 x 300 pixels into equal-size sections are plotted for the fractal dimension 𝐷 . It follows from Fig. 6.2a that the fractal dimension increases with increasing screen size. This could be explained by the fact that with decreasing camera size the number of non-background pixels decreases. These non-background pixels are in a way a measure for the roughness of images, which is directly related to fractal dimension. The pixels size limits the minimal box size. As the pixel size is the same for the sections of the image and the original image, the smallest box is the same for both. However, as the subsections are smaller than the original image, the number of boxes needed to cover all the non-background pixels decreases. This results in a lower fractal dimension. In Fig. 6.2b it can be seen that the standard deviation tends to decrease for increasing camera size. The screen size that was used (128 x 128 pixels) corresponds to 𝜎 ≈ 0.005 ∼ 0.01. In order to determine if these typical values for 𝜎 have a significant influence on the results in Sec. 4.3, we should compare them to the fluctuations over time that were reported in Sec. 4.3. It follows from Fig. 4.4a that the typical fluctuation over time is in the order of 0.02. This would mean that the noise to signal ratio is about 0.25 ∼ 0.5. It follows from Fig. 6.3a that in contrast to the fractal dimension, the speckle contrast does not change significantly when the size of the camera is changed. The definition of the speckle contrast (see (5.11)), which relates the standard deviation of the pixel intensity to the mean value, can be used to understand this. The contrast present in an image does not change when it is divided into parts. Deviations from the value for the entire image do exist, because locally there can be places with higher and lower contrast. However, these deviations are due to the random distribution of speckles of the surface, rather than being governed by a physical principal such as is the case for the fractal dimension. The behavior of the standard deviation for the speckle contrast between cameras of the same size is consistent with that of the fractal dimension. In Fig. 6.3b it can be seen that the general trend for all three of Loozen’s images is that the standard deviation 𝜎 decreases as the screen size is increased. For the speckle pattern analysis, it is also necessary to compare the typical value of the standard deviation for a 128 x 128 pixel screen with the fluctuations over time of the speckle contrast as deter- mined in Sec. 5.3.3. The typical value for 𝜎 is found in Fig. 6.3b and is reported to be in the range of 0.02 ∼ 0.03. It follows from Fig. 5.6 that the over time fluctuations of the speckle contrast as simulated with van As’ setup are around 0.05. The resulting noise to signal ratio is 0.4 ∼ 0.6. 6.1.2. Conclusion The analysis of three of Loozen’s speckle patterns suggests that very high noise to signal ratios are expected for a camera of 128 x 128 pixels. This is consistent with the noisy results that were obtained for the fractal analysis in Sec. 4.3.2 and three correlation types in Sec. 5.3. Increasing the camera
  • 49. 6.1. Deviations within a Single Image 35 size improves the noise to signal ratio for both the fractal dimension and speckle pattern for Loozen’s images. Based on this, the hypothesis that increasing the number of camera pixels could allow for retrieval of the heartbeat can be formulated. 0 1 2 3 4 5 # pixels/screen ×104 1.7 1.72 1.74 1.76 1.78 1.8 1.82 DB a 1 2 3 0 1 2 3 4 5 # pixels/screen ×104 0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 σDB b 1 2 3 Figure 6.2: a: Dependency of the fractal dimension on the number of pixel per screen is plotted. The values are computed by averaging over multiple same-size sections of the same original image. Three different images that were measured by Loozen are analyzed. The dotted horizontal line indicates the screen size as simulated by Van As. b: The standard deviation between these sections of the same size is plotted against the number of pixels. 0 1 2 3 4 5 # pixels/screen ×104 0.92 0.925 0.93 0.935 0.94 0.945 0.95 0.955 SC a 1 2 3 0 1 2 3 4 5 # pixels/screen ×104 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 σSC b 1 2 3 Figure 6.3: a: Dependency of the speckle contrast on the number of pixels per screen is plotted. The values are computed by averaging over multiple same-size sections of the same original image. Three different images that were measured by Loozen are analyzed. The dotted horizontal line indicates the screen size as simulated by Van As. b: The standard deviation between these sections of the same size is plotted against the number of pixels.
  • 51. 7 Conclusions & Recommendations 7.1. Conclusions Close attention to the research question, stated in Ch. 1, will be paid when drawing conclusions. The ultimate goal here is to use simulations with Van As’ OptoFluids code to generate a time sequence of speckle patterns and seek to retrieve the periodicity of the introduced sinusoidal pressure gradient which causes the red blood cells to move. The degree to which the speckle patterns are blurred is an indicator for the velocity of the particles. In order to retrieve the periodicity, numerous fractal dimensions and correlations have been com- puted for equally time-spaced images. The time sequences of these properties have been transformed into the frequency domaain, which allows for the detection of underlying frequencies. Under the con- ditions of this research, being able to retrieve the periodicity means that the Fourier spectrum of the analyzed quantity must contain a predominant peak around the frequency of 1𝐻𝑧, which is the fre- quency of the input signal. The results of the fractal analysis as discussed in Sec. 4.3, the correlation coefficient in Sec. 5.3.1, the autocorrelation in Sec. 5.3.2 and the speckle contrast in Sec. 5.3.3, do not contain the desired predominant peak around 1𝐻𝑧. This can lead to no other conclusion than that in our experiments the governing frequency has not been retrieved from speckle pattern analysis. Instead noise was measured. From the experimental research conducted by others [15, 18, 19], it is known that the fractal di- mension, correlation coefficient and speckle contrast are suitable parameters for extracting information from speckle patterns in order to retrieve a periodicity that was introduced experimentally. The fact that these same parameters were unsuccessful in retrieving the periodicity that was introduced in the simulations could indicate that differences in the settings, e.g. camera size, between the OptoFluids code and experimental setup by Loozen are responsible for the noise that was observed in the results. The camera size, number of particles, integration time of the camera, sampling rate and shape of the input signal can be indicated as the most prominent differences between the simulations and experiments. The particles density was a factor 1000 lower than in experiments. The used integration time was a factor 200 shorter than the integration time Loozen used, this results in significantly less blurring and less noise cancellation. The sampling rate was sufficiently high to detect the introduced periodicity. For the input signal, Loozen used a rectangular pulse wave, whereas in present research the shape was sinusoidal. This leads to more gradual transitions and weaker signals. The influence of the camera size was investigated in Sec. 6. In addition to the fact that there was a serious discrepancy in the number of pixels that made up the camera, 128 x 128 pixels for our results versus 300 x 300 pixels for Loozen’s [15], the number of pixels per typical speckle has been reported to be higher in our speckle images. Decreasing the number of pixels seems to go hand in hand with a greater degree of randomness, as can be seen from Fig. 6.2b and Fig. 6.3b. This increased randomness has been compared with the fluctuations over time. For a number of pixels as used in the present research, this results in noise to signal ratios of 0.25 ∼ 0.5 and 0.4 ∼ 0.6 for the fractal dimension and speckle pattern respectively. 37
  • 52. 38 7. Conclusions & Recommendations This could explain the noisy character of our results. Increasing the number of pixels will improve the noise to signal ratio for the fractal dimension and the speckle contrast. To conclude, the periodicity of the introduced input signal was not retrieved with either the fractal di- mension, the correlation coefficient, the autocorrelation and the speckle contrast analysis. Differences in setup parameters with experiments, e.g. camera size and integration time, are indicated as possible causes for the noisy results. 7.2. Hypotheses and Recommendations The fact that we were not able to produce results that demonstrate the appropriateness of using fractal- ity and the outlined correlations for recovering a simulated heartbeat in the limited time of this Bachelor Thesis does not mean that these properties do not reflect the periodicity. In this section hypotheses and recommendations for carrying out follow-up research are given. In order to be able to compare our results directly with those by Loozen [15] and Nemati and others [19], tackling the remaining differences in setup parameters would be a logical next step. The camera size, the number of red blood cells, the sampling rate, the integration time of the camera and the shape of the input signal were indicated as important differences. The possible influence of these is discussed and recommendations for necessary changes are made. 7.2.1. Camera Size The camera size in our simulations is 128 x 128 pixels, whereas the images by Loozen that are analyzed in Ch. 6 consist of 300 x 300 pixels. As the number of pixels has been shown to influence the deviation between same-size sections of Loozen’s images for both the fractal dimension and speckle contrast, increasing the camera size is recommended. This will lead to an improvement of the noise to signal ratios of 0.25−0.5 and 0.4−0.6 for the fractal dimension and speckle pattern respectively (see Sec. 6.1.1). Extrapolation in Fig 6.2 b suggests that a 300 x 300 pixel screen would have values for 𝜎 of 0.001 − 0.002, which is a serious reduction compared to the 128 x 128 pixel screen with typical values for 𝜎 of 0.005 − 0.01. The noise to signal ratio would therefore significantly improve to 0.05 − 0.01. An analogous approach for the speckle contrast would, taking a conservative approach by following the red line (2) in Fig. 6.2b, leads to the improvement of the noise to signal ratio by a factor of 2. Best case scenario, corresponding to the blue line (1) in Fig. 6.2b, the influence of randomness due to the number of pixels is eliminated entirely for a 300 x 300 pixel screen. This is of course not realistic. Scaling the number of pixels up from 128 x 128 to 300 x 300 means having 5.5 times more pixels. For the number of particles 𝑁 equal to 1000, this will lead to a computation time that increases by roughly the same factor, according to the complexity analysis of the algorithm by Van As [30]. A critical note on these noise to signal and improvement estimations should be made. In these estimates, the degree of randomness in the fractal dimension (speckle contrast) due to the number of pixels as determined from analyzing three measured images by Loozen is compared to the typical fluctuation over time as determined from the simulated speckle patterns. More appropriate would be comparing the degree of randomness to the typical fluctuations over time of Loozen’s images. However, as only three of Loozen’s images were provided for analysis, this approach could not be taken. More (details on the) images would resolve this uncertainty. As a consequence, not too much emphasis should be put on the quantitative value of these computed noise to signal ratios. Their qualitative behavior, as observed when increasing the number of pixels, is relevant nevertheless. A conservative hypothesis would be that the noise to signal ratio for both the fractal dimension and speckle contrast improves when the number of pixels is increased. To conclude, increasing the camera size is recommended as this will improve the noise to signal ratio and therefore allow for a better chance of achieving the goal of artificial heartbeat detection. This comes at the price of an increased computation time.
  • 53. 7.2. Hypotheses and Recommendations 39 7.2.2. Number of Particles A second parameter that should be considered in follow-up experiments is the number of particles in the simulation compared to the number of particles in the experiment. It follows from comparison of the parameters used by Van As [30] and Loozen [15] that the number of particles in the simulation of 1000 red blood cells, results in a factor 1000 more dilute solution than was used in the experiments. The impact of increasing the number of particles on the computation time should be investigated. In Van As’ thesis [30] it was indicated that for more concentrated solutions multi-scattering becomes increasingly important, as the typical distance between the scatterers is decreased. 7.2.3. Integration Time The integration time 𝑡 as indicated in Fig. 2.6 was 100𝜇𝑠 in our simulations, whereas the cam- era settings for measuring Loozen’s speckle patterns were set to a measuring time of 20𝑚𝑠. A longer measuring time corresponds to averaging over more instantaneous samples and therefore a resulting speckle pattern that is more blurred in case of moving particles. If the measurement time is increased, the averaging will be done over an increasing large part of the cardiac cycle, reducing the difference be- tween different time steps. With these reduced differences information about the underlying frequency spectrum is harder to detect, but Loozen has demonstrated that this is possible. This increased degree of blurring for all time steps will influence the speckle contrast, as it is a direct measure of blurriness. Yet, the longer measuring time as used by Loozen will also have a positive impact on the results. Namely, the effects of noise are reduced when averaging over a longer time. The fact that Loozen used a factor 200 longer integration time, could explain the fact that our results are noisy. Running the experiments with an integration time of 20𝑚𝑠 will make the direct comparison between our simulated speckle patterns and Loozen’s measured images more appropriate and could reduce the noise. The number of instantaneous images used to construct a single time step that is required for convergence, should be reevaluated for the new integration time. 7.2.4. Sampling Rate In addition to the integration time, the sampling rate used in experiments was different from the sampling rate in our research (12.5𝐻𝑧). Namely, Loozen worked with an open shutter, leading to a integration time of 20𝑚𝑠 and a time step of 20𝑚𝑠 [15]. This corresponds to a sampling rate of 50𝐻𝑧. Nemati and others used sampling rates of 50𝐻𝑧 and higher [18]. This could explain the fact that the autocorrelation function showed no correlation for time lag 𝜏 = 1 (see Fig. 5.4a), as higher sampling rates make it possible to detect correlated behavior at smaller time scales. This would lead to the hypothesis that correlated behavior is not observed in our research because of a too low sampling rate. However, it should be noted that a sampling rate of 12.5𝐻𝑧 is sufficient to detect frequencies of 1𝐻𝑧 and the fact that no correlated behavior is observed on the time scale corresponding to this frequency means that the periodicity of the input signal was not present in the autocorrelation and correlation coefficient analysis. Changing the sampling rate will not influence this. 7.2.5. Shape of Input Signal In our research the imposed signal was a sinusoidal pressure gradient, as displayed in Fig. 2.5. In Loozen’s thesis [15] it was stated that an inline-pump was used to introduce a rectangular pulse wave for its simplicity and auto-coherence. The main difference between a sinusoidal and rectangular pulse wave is the fact that the former introduces changes that are gradual, whereas the latter produces abrupt changes. A hypothesis that can be formulated from this is that the changes in the fluid velocities are too gradual to retrieve the periodicity from speckle pattern analysis for sinusoidal signals. The reason for this is that gradual changes lead to a weaker signal and therefore higher noise to signal ratios. Since an actual heartbeat seems to displays multiple abrupt changes, rather than a gradually changing behavior, the fact that it might not work for sinusoidal signals is not a problem. Changing the imposed boundary conditions from a sine-like to a rectangular pulse wave pressure gradient is recommended for direct comparison with Loozen.
  • 55. A Appendix A.1. Fourier Spectrum of Signals mirrored in a Line As described in Sec. 4.3 the values of 𝐷 , are the values of 𝐷 , mirrored in a horizontal line around 𝐷 ≃ 0.9. Here a more general case displaying such mirroring behavior will be considered to analyze the implications on the Fourier spectra of these signals. The signals considered here are two sines, with different offsets, that are related to each other by the previously described mirroring in a line, as can be seen in Fig. A.1 a. The Fourier spectra of both signals are calculated and displayed in Fig. A.1b. 0 1 2 3 4 5 6 7 f (Hz) 0 1 2 3 4 5 6 7 8 Power b sin(at) -sin(at) Mirror line 0 0.5 1 1.5 2 2.5 3 t [s] 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 Amplitude a sin(at) -sin(at) Mirror line Figure A.1: In a two sines with a frequency of 1 Hz related to each other by mirroring in the horizontal mirror line are displayed as real time signals. The length of the signals was chosen to match the interval length of the measurements for fractality. In b the Fourier spectra of both the signals and the mirror line are displayed. As can be seen in Fig A.1b, the two signals do indeed have the same Fourier spectrum except for their zero frequency. It can be noted that the frequency at which the Fourier spectrum peaks is not equal to the exact frequency of the sines (1𝐻𝑧). This has to do with the fact that the measuring time is not equal to an integer number of periods, as is described in Sec. 3.1. 41
  • 57. Bibliography [1] P.A.M.M. Aarts, S.A.T. van den Broek, G.W. Prins, G.D.C. Kuiken, J.J. Sixma, and R.M. Heethaar. Blood platelets are concentrated near the wall and red blood cells, in the center in flowing blood. Arteriosclerosis, 8(819), 1988. [2] J. Allen. Photoplethysmography and its application in clinical physiological measurement. Physi- ological Measurement, February 2007. [3] A. Barcellos. The fractal geometry of Mandelbrot, 1982. [4] C.F. Bohren and D.R. Huffman. Absorption and Scattering of Light by Small Particles. John Wiley and Sons, Inc., Wiley Professional Paperback edition, 1998. [5] R.D. Corrêa, J.B. Meireles, J.A.O. Huguenin, D.P. Caetano, and L. da Silva. Fractal structure of digital speckle patterns produced by rough surfaces. Elsevier Physica A, pages 869–874, 2013. [6] J. Cutnell and K. Johnson. Physics. Wiley, 4th edition, 1998. [7] Dutch Heart Foundation. Hart- en vaatziekten in Nederland 2015, 2015. URL https://www.hartstichting.nl/downloads/cijfers/ hart-en-vaatziekten-in-Nederland-2015. [8] Dutch Heart Foundation. Hartritme, 2016. URL https://www.hartstichting.nl/ hartritme. [9] Dutch Heart Foundation. Feiten en cijfers hart- en vaatziekten, 2016. URL https://www. hartstichting.nl/hart-vaten/cijfers. [10] Fractal Foundation. Fractal dimension - box counting method, 2016. URL http:// fractalfoundation.org/. [11] J. W. Goodman. Speckle phenomena in optics: Theory and applications. Roberts and Company Publishers, 2007. [12] J. W. Goodman and G. Parry. Laser speckle and related phenomena. Springer, Berlin Heidelberg New York, 1984, 1984. [13] T. Joosten. Interferometric scattering of light by moving red blood cells: Extracting a heartbeat. BSc Thesis Report, TU Delft, 2016. [14] P.K. Kundu, I.M. Cohen, and D.R. Dowling. Fluid Mechanics. Elsevier, pages 110–114, 2012. [15] G.B. Loozen. Monitoring pulsating flow with dynamic speckle fields. MSc Thesis Report, TU Delft, 2015. [16] B.B. Mandelbrot. The Fractal geometry of Nature. W.H. Freeman and Comapany New York, 1977. [17] G. Mie. Beiträge zur Optik trüber Medien, speziell kolloidaler Metallösungen. Annalen der Physik, 337(4), 1908. [18] M. Nemati, C.N. Presura, H.P. Urbach, and N. Bhattacharya. Dynamic light scattering from pul- satile flow in the presence of induced motion artifacts. Biomed Opt Express, 5(7), July 2014. [19] M. Nemati, S. Kenjeres, H.P. Urbach, and N. Bhattacharya. Fractality of pulsatile flow in speckle images. Journal of Applied Physics, J. Appl. Phys. 119(174902), 2016. [20] L.N. Ng. Manipulation of particles on optical waveguides, 2000. 43
  • 58. 44 Bibliography [21] A.V. Oppenheim, A.S. Willsky, and S. Hamid Nawab. Signals and Systems. Pearson, Pearson New International Edition edition, 2014. [22] B. Osgood. Stanford - the Fourier transform and its applications, Not dated. URL https://see. stanford.edu/materials/lsoftaee261/book-fall-07.pdf. [23] D. Penney. Hemodynamics, 2003. URL http://www.coheadquarters.com/PennLibr/ MyPhysiology/lect5/table5.01.htm. [24] P.P.L. Regtien. Electronic instrumentation. VVSD, 2nd edition, 2005. [25] K. Schätzel. Noise on photon autocorrelation functions. Quantum Optics, pages 287–305, 1990. [26] M. Shmukler. The Physics Handbook. Wiley, 2004. [27] Stanford. Stanford - Solution methods for the incompressible Navier-Stokes equations, Not dated. URL https://web.stanford.edu/class/me469b/handouts/incompressible.pdf. [28] H.P. Urbach, A. Aurèle, and S. Konijnenberg. Optics - TU Delft course notes. PDF, 2016. [29] K. van As. OptoFluids Code, 2015. [30] K. van As. Interferometric scattering of light by an ensemble of flowing spherical particles: A numercial study. MSc Thesis Report, TU Delft, 2015. [31] H. van den Akker and R. Mudde. Fysische Transportverschijnselen - denken in balansen. Delft University Press, 4th edition, 2014. [32] H.M. van der Kooij and J. Sprakel. Watching paint dry; more exciting than it seems. Soft Matter, 2015. [33] H.M. van der Kooij, G.T. van de Kerkhof, and J. Sprakel. A mechanistic view of drying suspension droplets. Soft Matter, 12(11), 2016. [34] M. Verhaegen. Stochastic processes for physics students: An introduction, 2016. [35] F.M. White. Fluid Mechanics. McGraw-Hill, 2011.