58
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

Embed Size (px)

Citation preview

Page 1: Thesis Fabian Brull

Extracting a Heartbeatfrom Speckle PatternAnalysis

Interferometric Scattering of Light byMoving Red Blood Cells

F.J. Brull

BSc ThesisApplied Physics

;

Page 2: Thesis Fabian Brull
Page 3: Thesis Fabian Brull

Extracting aHeartbeat fromSpeckle Pattern

AnalysisInterferometric Scattering of Light by Moving

Red Blood Cellsby

F.J. Brullto 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: 4268334Project duration: March, 2016 – June, 2016Supervisors: Dr. S. Kenjeres, TU Delft TP

Dr. N. Bhattacharya, TU Delft OpticsIr. K. Van As, TU Delft TP

Thesis committee: Prof. dr. ir. C. R. Kleijn, TU Delft TP

Page 4: Thesis Fabian Brull
Page 5: Thesis Fabian Brull

AbstractThe 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 itcomes to measuring a heartbeat in-vivo in a non-invasive, cheap and real-time manner. However, notall 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 ofmore cardiac parameters.

Van As has simulated the environment of an incoming plane wave scattering off a configuration ofred 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 hasintroduced 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 thespeckle patterns. In order to do so, time series of numerous speckle pattern properties are convertedinto 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 integrationtime and different shape of the input signal compared to experimental research by Loozen [15].

iii

Page 6: Thesis Fabian Brull
Page 7: Thesis Fabian Brull

PrefaceIn the three years of the Bachelor Applied Physics at the TUDelft, I have come across physical conceptsthat defy explanation by anyone not familiar to them. An excellent example of this is the superpositionof states in quantum mechanics; how on earth can that poor cat be both alive and dead at the sametime? Relativistic length contraction and time dilation fall into the same category. The fact that thelength of an object, as seen by an observer, depends on its relative velocity does not fit the frameworkwe 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 leavethese mysteries untouched. Courses such as ’Modern Physics’, ’Introduction to Elementary ParticlePhysics’ 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 understandingof light and imaging. Long anticipated courses like this one, that finally touched upon subjects you hadheard 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 vanAs, I learned that I could use my newly obtained knowledge about electro-magnetics, statistics, fluiddynamics 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 simulationparameters retrieval could be possible, as was demonstrated experimentally by Loozen. Research issaid to be a never-ending process...

AcknowledgmentsFirst of all, I would like to thank both my senior supervisors Dr. Nandini Bhattacharya and Dr. SasaKenjeres 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 finejob 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 tothank Gyllion Loozen, whom I never met, for his experimental data, that allowed me to make sense outof our noisy simulation results. Now, at least we have an idea what could have caused this choas.

F.J. BrullDelft, June 2016

v

Page 8: Thesis Fabian Brull
Page 9: Thesis Fabian Brull

Contents

Abstract iii

Preface v

List of Figures ix

List of Tables xi

1 Introduction 1

2 The Project 32.1 Theory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2.1.1 Fluid Dynamics of Blood . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32.1.2 Optics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2.2 Experimental Method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.2.1 Setup by Van As . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.2.2 Solving the Navier-Stokes equations with OpenFOAM. . . . . . . . . . . . . . . . 102.2.3 Adding a Pulsatile Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.2.4 The Camera . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.2.5 Relevant Setup Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

3 Discrete Fourier Transform 153.1 Fast Fourier Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153.2 The Nyquist Frequency and the Nyquist-Shannon Sampling Theorem . . . . . . . . . . . 153.3 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

4 Fractality 174.1 Theory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174.2 Experimental Method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

4.2.1 Binary Box Counting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194.2.2 Differential Grayscale Box Counting. . . . . . . . . . . . . . . . . . . . . . . . . . 194.2.3 Mass Box Counting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194.2.4 Mean Fractal Dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204.2.5 Average Cover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204.2.6 Summary Fractal Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

4.3 Preliminary Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214.3.1 Time Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214.3.2 Frequency Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

5 Correlations 255.1 Theory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

5.1.1 Correlation Coefficient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255.1.2 Autocorrelation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265.1.3 Speckle Contrast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

5.2 Experimental Method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295.3 Preliminary Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

5.3.1 Correlation Coefficient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295.3.2 Autocorrelation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305.3.3 Speckle Contrast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

6 Case Study Camera Size 336.1 Deviations within a Single Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

6.1.1 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346.1.2 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

vii

Page 10: Thesis Fabian Brull

viii Contents

7 Conclusions & Recommendations 377.1 Conclusions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377.2 Hypotheses and Recommendations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

7.2.1 Camera Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387.2.2 Number of Particles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397.2.3 Integration Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397.2.4 Sampling Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397.2.5 Shape of Input Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

A Appendix 41A.1 Fourier Spectrum of Signals mirrored in a Line . . . . . . . . . . . . . . . . . . . . . . . . 41

Bibliography 43

Page 11: Thesis Fabian Brull

List of Figures

2.1 Shape of a Red Blood Cell. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32.2 Mie Theory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.3 Schematic Overview Setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.4 Artist Impression of Geometry. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.5 Imposed Pressure Gradient to introduce Periodicity. . . . . . . . . . . . . . . . . . . . . 122.6 Visualization of the Recording Process. . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

3.1 Aliasing in Frequency Domain. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163.2 Aliasing in Time Domain. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

4.1 Topological Dimensions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184.2 Koch Snowflake. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184.3 Influence Grid Orientation on Box Counting. . . . . . . . . . . . . . . . . . . . . . . . . . 204.4 Results - Time Domain. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214.5 Results - Difference between Regular and Mass Box Counting. . . . . . . . . . . . . . . 224.6 Results Grayscale - Mirroring in Time Domain. . . . . . . . . . . . . . . . . . . . . . . . 234.7 Results - Frequency Domain. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

5.1 Visualization Speckle Contrast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285.2 Results - Correlation Coefficient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295.3 Results - Autocorrelation, Color Plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305.4 Results - Autocorrelation, Single Pixel . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315.5 Results - Autocorrelation, Standard Deviations . . . . . . . . . . . . . . . . . . . . . . . 315.6 Results - Speckle Contrast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

6.1 Visual Comparison Speckle Patterns Van As and Loozen . . . . . . . . . . . . . . . . . 336.2 Dependency of Fractal Dimension on Screen Size . . . . . . . . . . . . . . . . . . . . . 356.3 Dependency of Speckle Contrast on Screen Size . . . . . . . . . . . . . . . . . . . . . . 35

A.1 Influence Mirroring on Fourier Spectrum. . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

ix

Page 12: Thesis Fabian Brull
Page 13: Thesis Fabian Brull

List of Tables

2.1 Hemodynamics for Different Types of Vessels. . . . . . . . . . . . . . . . . . . . . . . . 52.2 Relevant Setup Parameters Joosten and Van As. . . . . . . . . . . . . . . . . . . . . . . 13

4.1 Summary Fractal Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

xi

Page 14: Thesis Fabian Brull
Page 15: Thesis Fabian Brull

1Introduction

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 futurewas 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 increasingproblem for the Dutch healthcare system asks for better understanding and improved diagnostics inthis 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 intothe vessel and see the positions of the red blood cells changing over time. One would thereby knowthe corresponding length of the cardiac cycle. However, as both the human skin and blood plasma areopaque, this is not possible. Therefore, numerous techniques have been developed to work aroundthis limitation, e.g. medical sonography, magnetic resonance angiography and light. Yet, none of theexisting techniques is perfect.

Light is suited to perform measurements, because it is cheap, real-time and non-invasive. Themost basic way of using light is done in photoplethysmography [2], which is based on the absorptionof light by tissue. In this technique, light is used to illuminate the skin, then the change in the degree ofabsorption over time is attributed to the heartbeat. It is important to note that this method transformsthe 3D information of the scattering of light off e.g. skin and blood cells, into a single number: theabsorption 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 couldbe obtained if, instead of a single number, 2D information is retrieved from illuminating the sample withlight. However, with this increased potential for the retrieval of more cardiac parameters, the complexityof the analysis goes up. The reason being that the scattering of coherent light off the complex redblood cell configuration in vessels, consisting of thousands of cells, will result in a 2D interferencepattern when measured with a camera. This can be seen somewhat as a Fourier transform of theseparticle positions, rather than a direct image of them [28]. In tomography, images of a fixed particleconfiguration 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 suchas the length of the cardiac cycle or oxygen saturation.

On the other hand, as the heartbeat is a periodic phenomenon, one could expect certain propertiesof these speckle patterns to reflect this periodicity. This hypothesis has been confirmed experimentallyfor 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 islimited, e.g. it is not feasible to realize certain concentration levels experimentally. Here simulationswould offer a solution. Van As [30] anticipated on this by simulating the experimental setup that wasused 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

Page 16: Thesis Fabian Brull

2 1. Introduction

resulting in speckle images that were recorded by a camera. His code was validated by checking forthe Fraunhofer approximation for a double slit configuration. However, simulations to mimic a heartbeatwere 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 specklepatterns 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 mimica 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 andothers [15, 18, 19]: speckle patterns will be obtained for a number of time steps. For these time stepscertain properties of the speckle patterns will be determined, resulting in time sequences. These timesequences can then be converted from the time domain into the frequency domain using a Fouriertransform. 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 andexperimental method he used in order to create his OptoFluids code and generate results. Ch. 2will be devoted to this. The approach of converting a time sequence into the frequency domain with aFourier transform can be taken for many different parameters of the speckle patterns. For this reasonthis transformation process will be discussed in Ch. 3. Four different types of speckle pattern analysiswill 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 onin Ch. 5. The correlations that will be used are the correlation coefficient, the autocorrelation and thespeckle contrast. The first two are a measure of the coherence of the speckle patterns in time, whereasthe latter is a measure for the amount of blurring within a speckle pattern. In Ch. 6 a case study thathas been triggered by the results of the analysis types is conducted.

Page 17: Thesis Fabian Brull

2The Project

This chapter will be devoted to giving a clear overview of the work that was conducted by Van As onfluid dynamics in combination with optics and it will elaborate on how his findings will be used in ourresearch. The purpose is to discuss how speckle patterns that are created using the OptoFluidscode [29], details about this code can be found in Van As’ Master Thesis [30]. The OptoFluids codecombines 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 byJoosten [13] are discussed.

2.1. Theory2.1.1. Fluid Dynamics of Blood

Figure 2.1: The shape of a red blood cell. It is said to be similarto a donut due to the fact that is a biconcave disk.

Blood is crucial for human survival: it transportsnutrients, such as oxygen and proteins, towardsthe organs and transports the waste productsaway. Blood consists of blood plasma with bloodcells in it. The plasma, which consists for 92% ofwater, makes up 54.3% of the volume of blood.The different particle types in the plasma arered blood cells (volume fraction of 45%), whiteblood cells (volume fraction of 0.7%) and platelets[6, 26]. The red blood cells are responsible forthe oxygen transport, the white blood cells takecare of the immune system and the function ofplatelets is to stop bleeding by clotting.

For this research the red blood cells are themain focus. Real-life red blood cells are donut-shaped, however in the simulations with theOptoFluids code by Van As they are approx-imated as spheres.

RheologyRheology 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 inthis 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 dynamicviscosity coefficient 𝜇, i.e. the viscosity does not depend on the strain rate. There is only a limited classof 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

Page 18: Thesis Fabian Brull

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 andwaste products compared to pure blood plasma [30].

A second property that is different for Non-Newtonian fluids is the volume distribution of red bloodcells. The radial profile can be described by the volume fraction of red blood cells 𝜙(𝑟) as function ofthe 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 numberof particles as a function of 𝑟 and the total number of particles 𝑁 inside a cylinder with length 𝐿 andradius 𝑅:

𝑃(𝑟) = 𝜙(𝑟)𝑟∫ 𝜙(𝑟)𝑟𝑑𝑟

, (2.3)

𝑁 = 2𝜋𝐿𝑉 ∫ 𝜙(𝑟)𝑟𝑑𝑟. (2.4)

These expressions were combined with measurements for 𝜙(𝑟) performed by Aarts [1] to retrieve aninput 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 NumberThe 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, 𝜌 thedensity 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 inpipe-flow is around 𝑅𝑒 > 4000, whereas 𝑅𝑒 < 2300 under most conditions corresponds to laminarflow. 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.

Page 19: Thesis Fabian Brull

2.1. Theory 5

Table 2.1: Hemodynamics for different types of vessels [23].

Vessel 𝑣[𝑐𝑚𝑠 ] 𝐷[𝑐𝑚] 𝑅𝑒Aorta 48 2.5 3400Artery 45 0.4 500Arteriole 5 0.005 0.7Capillary 0.1 0.0008 0.002Venule 0.2 0.002 0.01Vein 10 0.5 140Vena Cava 38 3.0 3300

Navier-Stokes EquationAs 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 resultsof this research, the influence of this choice on the relevant theory will be stated below. The assumptionleads 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 thevelocity in the 𝑥 direction, i.e. {𝑢 , 𝑢 , 𝑢 } = {𝑢 , 𝑢 , 𝑢 }. Furthermore, 𝜌 is the density of the fluid, 𝜇 thedynamic viscosity of the fluid, 𝑃 the pressure, 𝜏 the stress tensor and 𝑓 the sum of external forcesper unit volume.

The distinction between incompressible and compressible flow is that for the incompressible flowsdensity 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, pressurevariations 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 Trackingwill be used to determine their positions. The red blood cells are treated as point particles which aresubject to Newton’s law.

2.1.2. OpticsWhen light, i.e. an electromagnetic wave, is incident on matter there will be two phenomena takingplace. 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 turnthis 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, butabsorbed by the particle. Absorption combined with scattering, will alter the strength of the incidentlight. This is due to the fact that the scattered wave will interfere with the incident wave. Extinctionoccurs 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 theydescribe how interference causes speckle patterns. For this reason, a derivation of Mie Theory basedon Bohren & Huffman [4] and Li Na NG [20] will be given here.

Mie TheoryIn order to quantify the scattering of light on a sphere Gustav Mie developed Mie Theory in 1908 [17]. Inhis theory the incoming light is treated as an electromagnetic wave, governed by theMaxwell equations.

Page 20: Thesis Fabian Brull

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 canbe 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 thefollowing way:

ℋ⃗ = ℬ⃗𝜇 − ℳ⃗, (2.13)

where is 𝜇 the magnetic permeability in vacuum. The Maxwell equations for the time-independentcomplex 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. Itshould 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 todo so, a spherical coordinate system (𝑟, 𝜃, 𝜙) will be used. In case of a single spherical scatterer, thecenter 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 waveequation (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 thefurther analysis �⃗� will be omitted, because it represents a purely longitudinal wave.

Page 21: Thesis Fabian Brull

2.1. Theory 7

Figure 2.2: Geometry of plane waves scattering off aspherical particle in spherical coordinates as described byMie 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. 𝑧 (𝑘 𝑟) representsthe radial spherical Bessel functions, 𝑗 (𝑘 𝑟), and first order Hankel functions, ℎ (𝑘 𝑟). The reason forthis choice is that, on the one hand, 𝑗 (𝑘 𝑟) captures the right behavior for incoming and transmittedwaves near the origin, as it is finite at the origin. On the other hand, ℎ (𝑘 𝑟) gives the right behavior forscattered 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:

Page 22: Thesis Fabian Brull

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 SolutionsAnalogous 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 followingidentities 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 integralover 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 isexpressed 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), finitein 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 applyingFourier analysis (2.34) or by directly taking the curl of (2.36):

�⃗� = −𝑘𝜔𝜇 𝐸 ∑ 𝑖 2𝑛 + 1

𝑛 (𝑛 + 1)) (�⃗�( ) + 𝑖�⃗�( ) ) . (2.37)

Page 23: Thesis Fabian Brull

2.1. Theory 9

Boundary ConditionsSo 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 willcause scattering and absorption. Absorption takes place in the interior of the particle, whereas thescattered 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 mustbe considered. The incoming wave will interact with this scattered wave �⃗� resulting in the followingsuperposition:

�⃗� = �⃗� + �⃗� , (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 permeabilitychange almost instantly in space; the length scale is in the order of atomic dimensions [20]. Thesechanges 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 overa 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 solvefor �⃗� and �⃗� in case of a known �⃗� .

Calculation of Fields in Vector Wave Equation SolutionsCalculation of the scattered and internal field is most conveniently done in the basis of the vector waveequation solutions (2.29) and (2.30). The scattered and internal electromagnetic waves are are writtenas a linear combination of these making use of the boundary conditions (2.39). The results are thefollowing:

�⃗� = ∑ 𝐸 (𝑐 �⃗�( ) − 𝑖𝑑 �⃗�( ) ) , (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 againthat 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 thecoordinate system.

For the scattered electromagnetic fields (2.43) and (2.44), the Bessel function that is needed is thatof the third kind, the spherical Hankel function of the first kind: 𝑧( ) ≡ ℎ( ). This follows from the required

Page 24: Thesis Fabian Brull

10 2. The Project

physical behavior in the far field [30]. Namely, for 𝑘𝑟 >> 𝑛 the first kind Hankel function becomes anoutgoing 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 externalfield will be responsible for the generation of speckle patterns, here only the solution to 𝑎 and 𝑏 willbe 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 ofposition (𝑟, 𝜃, 𝜙) can be determined. This was done by Van As [30] by making use of the Far-Fieldapproximation [28].

It should be noted that for the general case of multiple scatterers, a switch to general coordinates isnecessary. Also, the initial phase of the incoming plane wave will depend on the particle position andmust be considered [30].

2.2. Experimental MethodThe application of the theories described in Sec. 2.1 is outlined here. First, the overview of the setupcreated by Van As will be given in Sec. 2.2.1. Then we will zoom in on the implementation of thetheories 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. InSec. 2.2.5 we will look at the parameters as used in the present research by Joosten.

2.2.1. Setup by Van AsAs mentioned before, Van As’ OptoFluids code links simulations on fluid dynamics in OpenFOAM tohis self-created optics code to create speckle patterns. In Fig. 2.3 the coupling between the two isdisplayed schematically. Red blood cells are approximated by spheres. In OpenFOAM the positions ofred 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 certaintime 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 researchto seek to retrieve the introduced periodicity.

2.2.2. Solving the Navier-Stokes equations with OpenFOAMAs working with OpenFOAM is not part of the scope of this research, only crucial information on theinput 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 VolumeMethod. This results in a system of non-linear coupled equations. This is solved using OpenFOAM’spimple 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 positionwith respect to the cylinder axis, to maintain a constant number of particles. These cyclic boundaryconditions are justified by Joosten [13]. The number of particles that is introduced into the simulationis 1000. The initial positions are randomly generated making use of the probability distribution in (2.3).

Page 25: Thesis Fabian Brull

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 willscatter 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. Thered blood cells are represented by spheres,

particle positions are given for a certain time. Cyclicboundary conditions were imposed on the cylinderends to maintain a constant number of particles.

2.2.3. Adding a Pulsatile FlowIn order to mimic a real heartbeat, Joosten introduced a periodicity in the simulation environment byimposing a pressure gradient [13]:

Δ𝑃𝜌 = 𝛼(1 + 𝛽𝑠𝑖𝑛(2𝜋𝑓𝑡)). (2.49)

The parameters 𝛼 en 𝛽 were deduced from typical values for arteries, combined with Hagen-Poiseuilleflow validation: 𝛼 = 2.6780625 ⋅ 10 , 𝛽 = 0.7. The frequency 𝑓 was chosen as 1𝐻𝑧; an order ormagnitude that is comparable to the typical frequency of a heartbeat [8]. The pressure gradient isplotted as a function of time in Fig. 2.5.

2.2.4. The CameraFor the recording of the speckle patterns a square camera of 128 x 128 pixels was used. As a realcamera creates images by integration of the intensity measured during a finite integration time, thesame principle will be used in the processing of the simulation data. The integration time is taken as100𝜇𝑠. During this integration time, 20 instantaneous speckle images will be recorded with 5𝜇𝑠 between

Page 26: Thesis Fabian Brull

12 2. The Project

0 0.5 1 1.5 2 2.5 3t[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 20samples. It is this averaging that makes the velocity extractable from speckle images. Namely, if theparticles move considerably between two successive instantaneous images, then these patterns willbe very different and averaging will result in a high degree of blurring. On the other hand, if the particlesare barely moving, the two successive instantaneous images will be very similar, leading to minimalblurring. 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 andposition was chosen in such a way that a typical speckle takes up around 4 x 4 pixels [13]. The blurredimages that are used for the analysis are sampled at a frequency of 12.5𝐻𝑧. So every 𝑡 of0.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 ParametersIt should be noted that the parameters as chosen by Van As [30] were predominantly the same asthose used in the experimental research by Loozen [15]. This allows for experimental validation. Inboth cases, instead of real blood, water-glycerol, which has a refractive index identical to blood, was

Page 27: Thesis Fabian Brull

2.2. Experimental Method 13

used. Due to differences in other material properties, e.g. density, deviations from the typical Reynoldsnumbers 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.

Page 28: Thesis Fabian Brull
Page 29: Thesis Fabian Brull

3Discrete Fourier Transform

The discrete Fourier transform is used in mathematics to convert a finite sample that is sampled at acertain fixed sampling frequency 𝑓 into the frequency domain . It is used for digital signal processingand 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 andthereby determine the governing frequencies.

3.1. Fast Fourier TransformA periodic (period 𝑇) and discrete (𝑁 values) sequence 𝑥 , is transformed into a periodic and discretesequence 𝑋 , by [21, 22]:

𝑋 = ∑ 𝑥 𝑒 , 𝑘 ∈ ℤ. (3.1)

The Fourier transform is periodic in 𝑘 with period 𝑁 : 𝑋 = 𝑋 . Therefore, it is usually computed inthe 𝑘-interval [0, 𝑁-1] . 𝑋 will be a measure of the amount of 𝑓 present in the signal 𝑥 . The discreteFourier 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 thefollowing 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 frequencydomain:

𝑓 = 𝑓 . (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 SamplingTheorem

From the discrete Fourier transform, it follows that a sequence of 𝑁 samples will result in a sequenceof values 𝑋 with periodicity 𝑁. The maximum number of unique values for 𝑋 would therefore be 𝑁.

15

Page 30: Thesis Fabian Brull

16 3. Discrete Fourier Transform

However, according to the Nyquist theorem [22, 24] the Nyquist folding frequency is half the samplingfrequency 𝑓 . Signals with frequencies higher than this 𝑓 , 𝑓 +Δ𝑓 will fold back to 𝑓 -Δ𝑓, as can beseen in Fig. 3.1. From the Nyquist theorem follows that the frequency spectrum is mirrored in 𝑓 . Thisbehavior 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 frequencyinformation of a signal.

Figure 3.1: Aliasing: After sampling with sampling frequency sinusoids signals with a frequency of 0.4 , 0.6 , 1.4 and1.6 become indistinguishable.

0 1 2 3 4 5 6t [s]

-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

Am

plitu

de

0.4 fs

sampled at fs

1.4 fs

sampled at fs

Figure 3.2: Aliasing is visualized for two sinusoidal signals. After sampling with a sampling frequency the two sinusoidalsignals with a frequency of . and . respectively, become indistinguishable.

3.3. ConclusionThe 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 timesequences. 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 rateof 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 causesnoise, the folding should not impact the results enormously, as the frequency of 1𝐻𝑧 is predominant.

Page 31: Thesis Fabian Brull

4Fractality

Fractality is one of the properties of the speckle patterns that is used in this research to form a timesequence that will be converted in to the frequency domain. First, the underlying theory is elaboratedin 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. TheoryFractality 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 ofnon-overlapping self-similar fractals 𝑁 , measuring units so to say, changes when the phenomenon isscaled 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 theself-similar fractal that is used to measure the phenomenon. For geometric figures, such as a straightline, 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 asmany of them (𝑁 = 4) are needed to cover the same area. This results in the expected similaritydimension 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 willtherefore differ from the topological dimension of the fractal. An excellent example of this is the KochSnowflake [3, 16], as displayed in Fig 4.2. The circumference of this Koch Snowflake will be shown tohave 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 andthe same building block will be implemented on the middle segment. By doing so the contour of thefigure becomes of its original size. The non-overlapping self-similar fractal in this case, is the sideof 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. Fromthis a similarity dimension 𝐷 = 1.26 follows.

A distinction between exact fractals and statistical fractals can be made. Exact fractals, such as theKoch Snowflake, are perfectly self-similar: the same pattern repeats itself at every scale. On the otherhand, for statistical fractals only the statistical properties repeat themselves at the different scales. Forthe 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 boxesof equal size and determining how many of these boxes of specific size are needed to cover all thenon-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

Page 32: Thesis Fabian Brull

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, cubefor 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-overlappingself-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 ImplicationIt 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 fractaldimension of 1 represents a straight line, whereas a dimension of 2 corresponds to a line that makesup a plane by wiggling through space. The fractality is thus a measure of the ability of a pattern tofill 2D space. This is directly linked to its complexity: a higher fractal dimension also means that withdecreasing box size the object becomes more complex [10].

Page 33: Thesis Fabian Brull

4.2. Experimental Method 19

A second way to gain a physical intuition about fractality is by looking at it as the degree of roughnessin an image. This is often applied in studying textures, as the fractality captures how coarsenessis spread over a surface. Higher fractal dimensions correspond to rougher, more coarse surfaces[5, 32, 33].

4.2. Experimental MethodFor analyzing the speckle patterns retrieved from the OptoFluids code, it is useful to make use ofavailable software such as ImageJ in combination with the plug-in FracLac. FracLac allows formultiple ways of applying box counting to an image. Below a brief descriptions of the different boxcounting options in FracLac are given.

4.2.1. Binary Box CountingFor binary box counting the value for each pixel is converted into a binary value. By default, the pixelcolor (either black or white) that appears most is set as the background color. In determining the numberof boxes needed to cover the entire image, the number of boxes containing non-background pixels issimply counted. This standard way of box counting results in a fractal dimension that is denoted byFracLac 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 theway of box counting, as the possibility of more non-background colored pixels being in the same boxis not accounted for. The mass box counting method does take this possibility into consideration, asdiscussed in Sec. 4.2.2.

4.2.2. Differential Grayscale Box CountingFor grayscale analysis, the fact that the pixels take values from 0 (black) to 255 (white) is used. Inorder 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 acertain box size 𝑠, for each box position (𝑖, 𝑗) the difference in intensity 𝛿𝐼 , , between the pixel withmaximum 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 theintensity 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 CountingFor 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 thencalculated in the following way for binary analysis:

𝐷 = ln (𝜇 )ln( ) . (4.7)

Page 34: Thesis Fabian Brull

20 4. Fractality

The grayscale analogue to (4.7) is determined by dividing 𝐼 by the total number of boxes 𝑁 , tocalculate 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 DimensionAnother refinement that can be made is averaging over different grid orientations, as the calculationof the fractal dimension will depend on the orientation of the grid as illustrated in Fig. 4.3. Dependingon the orientation of the grid, represented by the gray squares, with respect to the object, the whitetriangle, there are more or fewer gray squares needed to cover the entire object. By performing thesame calculation for a number of different grid orientations 𝑁 and then averaging, the influence of thegrid 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 bothbinary and grayscale analysis, resulting in 𝐷 , 𝐷 , 𝐷 , and 𝐷 , . In the remainder the barnotation will be dropped; all the discussed fractal dimensions will be grid averaged, unless specifiedotherwise.

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 CoverA final fractal dimension that can be calculated using FracLac is based on the average cover over allgrids. So instead of calculating the fractal dimension for each grid and then averaging it over thesegrids, 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 𝐷 , .

Page 35: Thesis Fabian Brull

4.3. Preliminary Results 21

4.2.6. Summary Fractal DimensionsTo summarize, for each speckle pattern six different fractal dimensions will be calculated, as shown inTable. 4.1.

Table 4.1: Summary Fractal Dimensions

Binary GrayscaleBox 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 ResultsFor the fractal analysis, 34 equally time spaced speckle patterns are used, which corresponds to 2.64periods of the input signal. These patterns are constructed as described in Sec. 2.2.4 and the usedmetrics are summarized in Table 4.1: the ’blurred’ speckle patterns that are used for the analysis areconstructed out of 20 instantaneous speckle patterns recorded equally time spaced in 100𝜇𝑠. The timebetween the ’blurred’ speckle patterns is 0.08𝑠, which corresponds to a sampling frequency of 12.5𝐻𝑧.

4.3.1. Time DomainThe fractal dimension is determined six times making use of the methods described in Sec. 4.2. Theresulting time sequences are shown in Fig. 4.4.

0 1 2 3t [s]

1.66

1.68

1.7

1.72

DB

a

0 1 2 3t [s]

1.66

1.68

1.7

1.72

DM

b

0 1 2 3t [s]

1.66

1.68

1.7

1.72

Dx

c

0 1 2 3t[s]

1.38

1.4

1.42

1.44

1.46

DB,gray

d

0 1 2 3t [s]

0.38

0.4

0.42

0.44

0.46

DM

,gray

e

0 1 2 3t [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 specklepatterns 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 dependentbehavior can be found. In the first place, 𝐷 and 𝐷 are identical. This would suggest that accountingfor the fact that there can be multiple non-background pixels in one box does not significantly alter theresults or improve the outcome.

The fact that 𝐷 (𝐷 , ) displays the same behavior as 𝐷 (𝐷 , ) is what one would expect fromthe way they are calculated. The difference comes from the fact that the averaging for 𝐷 (𝐷 , ) overthe grids is done before applying the regression, whereas for 𝐷 (𝐷 , ) the process of calculatingthe fractal dimension is done for each individual grid and then averaged over the grids. After explicitlychecking whether 𝐷 (𝐷 , ) is just a shifted version of 𝐷 (𝐷 , ), it is found that this is not the

Page 36: Thesis Fabian Brull

22 4. Fractality

0 0.5 1 1.5 2 2.5 3t [s]

2

3

4

5

6

7

8

9

10

DB−D

x

×10-3

BinaryGrayscale

Figure 4.5: Difference between ( , ) and ( , ). These differences turn out not be be constant, but seem tofluctuate 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 thedata 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 timeinstance: the result is a horizontal line at 𝐷 = 0.9218 as displayed in Fig. 4.6. The mirroring behavioris 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 fractaldimension. Finding the reason for the mirroring behavior and the fact that (4.13) does not hold remainsopen to further investigation.

Ultimately, not the real time but the frequency domain behavior of the fractal dimension is relevantfor this research. Therefore, it is important to discuss the implications of this mirroring behavior onthis. 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. Noadditional value is added from analyzing them separately.

4.3.2. Frequency DomainAs the average value of the fractal dimension is not relevant, subtracting this average value from thetime 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 patternanalysis. 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 otherfrequencies. 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

Page 37: Thesis Fabian Brull

4.3. Preliminary Results 23

0 0.5 1 1.5 2 2.5 3t [s]

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6D

DB

DM

Dx

mirrorline: 0.5 (DB

+DM

)

Figure 4.6: The grayscale fractal dimensions are displayed as a function of time for the speckle images. The values ofand are related by mirroring in the dashed at line . .

0 1 2 3 4 5 6 7f [Hz]

0

1

2

3

4

5

6

7

Pow

er

×10-3 a

DB

DM

Dx

0 1 2 3 4 5 6 7f [Hz]

0

0.002

0.004

0.006

0.008

0.01

0.012

Pow

er

b

DB

DM

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 verysimilarly is consistent with the fact that the differences between the 𝐷 and 𝐷 time sequence valuesare very small, as displayed in Fig. 4.5. Additionally, there seems to be consistency up to a certain levelbetween the binary and grayscale analysis: both process the data in a different way and therefore thehypothesis that noise is processed explains why both yield different Fourier spectra. Fig. 4.7 justifiesthat one may regard only 𝐷 and 𝐷 , as relevant parameters, as the behavior of the other binary(grayscale) does not seem to deviate from 𝐷 (𝐷 , ) considerably.

Page 38: Thesis Fabian Brull
Page 39: Thesis Fabian Brull

5Correlations

Three different correlation functions will be used to develop time sequences that can be converted intothe frequency domain making use of the discrete Fourier transform. In Sec. 5.1 the theory behindeach of these three methods will be discussed. In Sec. 5.2 the process of processing speckle patternsmaking use of these theories will be be discussed briefly. The preliminary results that follow from thecorrelation analysis will be presented in Sec. 5.3.

5.1. Theory5.1.1. Correlation CoefficientThe dynamics of the scattering particles cause the measured intensities to vary over time, i.e. thespeckle patterns change over time due to the motion of these particles. Nemati and others define thetemporal 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 inthe following way:

ℰ(𝑡) = 𝑅𝑒(𝐸(𝑡)). (5.2)

The correlation time 𝜏 is similar to the delay time in the autocorrelation. It is stated by Nemati andothers that this is related to the velocity of the scatterers, which in its turn depends on the distributionof the scattering particles [18].

In order to quantify the frequency spectrum of fluctuations in intensity in the speckle patterns due tothe 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 andothers 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 willresult. We therefore assume that the author implied that the absolute value of the correlation coefficientwill be between 0 and 1. The results of the correlation coefficient in Sec. 5.3.1 calculation will supportthis argument.

25

Page 40: Thesis Fabian Brull

26 5. Correlations

In case of 𝑀 equally time-spaced speckle patterns, the value for the correlation coefficient 𝑐𝑐 iscalculated 𝑀 − 1 times, resulting in a time sequence. This will then be converted into a frequencyspectrum making use of the discrete Fourier transform.

Physical ImplicationImportant 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 averageintensity 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 timesteps. This would happen if the positions of the particles hardly change in the elapsed time, whichcorresponds to low velocity of the fluid.

In case the ’roughness’ of the succeeding time step is completely uncorrelated to that of the previousimage, the correlation coefficient will approach 0. This corresponds to rapid changing particle positionsdue to the velocity of the fluid.

Conditions for a negative correlation coefficient are discussed above. For a value for the correlationcoefficient of −1 the ’roughness’ of the succeeding picture has to have the inverse roughness of thefirst 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 specklepatterns is governed by the particle motion, i.e. there is no reason why the particles in the next timeframe 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 havebarely changed their positions resulting in a speckle pattern that is very similar to that of the previoustime step, resulting in a value for correlation coefficient close to 1. This behavior is indeed observedfor the speckle patterns that are used for integration to create a blurred speckle pattern.

5.1.2. AutocorrelationThe autocorrelation function is a statistical computation that describes the correlation between differenttime steps of the same random process. It provides a measure of the similarity of values for differenttimes of a single signal. The autocorrelation for a stochastic process 𝑥(𝑛) at time steps 𝑘 and 𝑙 is givenas:

𝑟 (𝑘, 𝑙) = 𝐸[𝑥(𝑘)𝑥∗(𝑙)] (5.4)

Stationarity is the notion of time-invariant behavior of stochastic processes. Wide sense stationarity isa form of stationarity that only limits the behavior of the ensemble averages. The conditions for widesense stationarity are the following [34]:

𝑚 (𝑘) = 𝑚 < ∞,𝑟 (𝑘, 𝑙) = 𝑟 (𝑘 − 𝑙) ∀(𝑘, 𝑙),𝑐 (0) < ∞,

(5.5)

where 𝑚 (𝑛) is the mean function of 𝑥(𝑛) and 𝑐 (𝑛) is the autocovariance function of 𝑥(𝑛). For a finitelength wide sense stationary process [𝑥(𝑛)]( )

( ), a time averaged autocorrelation can be calculatedin 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 VariableIn analyzing speckle patterns, the autocorrelation function can be calculated for the intensity of a certainpixel over time. This is done by multiplying the value for the intensity of a certain pixel by the value ofthe intensity of that same pixel at a different moment in time. The difference between the comparedtimes is the lag 𝜏. For a given data series there are multiple samples with the same lag. The value

Page 41: Thesis Fabian Brull

5.1. Theory 27

of the contrast function is calculated by averaging over the intensity products with the same lag. Thisresult is then scaled by the average value of the intensity squared, in order to normalize the contrastfunction 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 isnot a stochastic process. This intensity is the deterministic result of the incoming electromagnetic wavereflecting on the particle configuration that is specified in the simulation. The initial particle positionsare generated randomly with (2.3), their positions for later time steps are the result of a periodic bloodflow. Accordingly, the speckle patterns are random to a certain degree, but if the elapsed time betweenthem is sufficiently small coherence is expected.

Furthermore, if the intensity of a pixel at a certain time would be a stochastic process, analyzing thistime evolution in order to retrieve a heartbeat would be a vain attempt. The similarity to (5.6) can befound in comparing ⟨𝐼(𝑟, 𝑡) ∙ 𝐼(𝑟, 𝑡 + 𝜏)⟩ to ̂𝑟 (𝑘, 𝑁), this is just a different notation for �̂� ( ⃗)(𝑘, 𝑁). Fromthis it becomes clear that the average is computed over different numbers of products for different timelags. This can be understood intuitively: for 𝜏 = 1 one can take the product of the intensity at the firsttime step with the second time step, the second with the third time step and so on to calculate theaverage. For 𝜏 = 𝑁 − 1 one can only take the product of the intensity of the first and last sampleto calculate the time averaged autocorrelation.

Accordingly, an impact on the uncertainty can be expected: for small lags the average is calculatedover a large number of products resulting in a relatively low uncertainty in the mean. For large lags theaverage is calculated over an increasingly small sample number, with a larger uncertainly in the meanas a result.

Falsely treating the variable 𝐼(𝑟, 𝑡) ∙ 𝐼(𝑟, 𝑡 + 𝜏) as random variable 𝑋(𝑟, 𝑡, 𝜏) with E(𝑋) = 𝜇(𝑟, 𝜏) andVar(𝑋) = 𝜎 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 increasingnumber 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 themeans of these subsets, 𝜎 , is then used to quantify the certainty in the mean that was calculatedover 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 denotedas 𝜎 .

Physical ImplicationWhen the physical implications of the autocorrelation function 𝑔 are considered, it should be notedthat these are very similar to those of the correlation coefficient in Sec. 5.1.1. It captures how similarthe 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 certainpixel (𝑘, 𝑙). So instead of a summation over all pixels for a time lag of 1, the autocorrelation function is1Note 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.

Page 42: Thesis Fabian Brull

28 5. Correlations

calculated for each pixel individually for varying time lags. As a result the contrast function is a functionof both space (i.e. pixel coordinate) and time lag.

A second difference is the fact that the pixel intensities are compared directly, instead of lookingat their difference with the mean intensity of the entire screen. Regardless of the differences, theautocorrelation is a measure for how similar the intensity at a certain pixel position (𝑘, 𝑙) is to thatof the same pixel later on in the time sequence. Equality of the intensities will give a value for theautocorrelation function of 1.

5.1.3. Speckle ContrastA final parameter that was shown to be useful to quantify changes in speckle patterns is the specklecontrast. 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 specklecontrast will be determined for each of the equally time spaced speckle patterns, resulting in a timesequence.

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 thevalue for the speckle contrast would have a constant value for all time steps, making it impossibleto use in order to retrieve an heartbeat. Averaging over multiple instantaneous speckle patterns, asnecessary to mimic a real camera, will cause velocity-dependent blurring. Namely, if the particles moveconsiderably between succeeding instantaneous images, the result will be blurred to a higher degreethan in case they barely move. Blurring reduces 𝜎 and thus the speckle contrast. To conclude, thespeckle contrast is a measure for the blurriness, which is velocity-dependent.

Physical ImplicationThe physical meaning of the above stated speckle contrast can be intuitively understood by looking ata binary image (black (0) and white (255) pixels) and a grayscale image (pixel intensities between 0and 255). If the binary image consists of an equal amount of black and white pixels and the grayscaleimages of pixel intensities homogeneously spread between 0 and 255, the average pixel intensity ofboth 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 grayscaleimage. To conclude, the speckle contrast is a measure for the spread in pixel intensities within a certainspeckle 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 standarddeviation 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 specklecontrasts look like, it is important to discuss the physical mechanism that governs these differences.

Page 43: Thesis Fabian Brull

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 howdifferent these 20 instantaneous images are, the resulting speckle pattern will be blurred to a higher orlower degree.

This can be understood in the following way: if the particles are not moving significantly, the 20images that will be used for integration will be more or less the same, leading to minimal blurring. Onthe other hand, if there is considerable movement of the particles, the 20 instantaneous will be verydifferent, resulting in a very blurred image.

From this one could conclude that blurred images, with a low speckle contrast, correspond to a highblood velocity and that rather clean images, with a high speckle contrast, correspond to a low bloodvelocity.

5.2. Experimental MethodAll three correlations (correlation coefficient of Sec. 5.1.1, autocorrelation of Sec. 5.1.2 and specklecontrast of Sec. 5.1.3) are determined by loading the speckle patterns into MATLAB R2015b. Makinguse of (5.3), (5.7) and (5.11) respectively, the time series are calculated and then converted into afrequency spectrum, making use of the discrete Fourier transform, as was described in Sec. 3.1.

5.3. Preliminary ResultsFor 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𝑠, whichcomes down to a sampling frequency of 12.5𝐻𝑧. This is equal to the settings used for the fractalityanalysis 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 7f (Hz)

0

1

2

3

4

5

6

7

8

9

Pow

er

×10-3 b

Figure 5.2: a: The time sequence for the correlation coefficient, consisting of data points, that results from analyzing thespeckle 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 thecorresponding Fourier spectrum. Although Fig. 5.2 contains peaks around the frequency of 1𝐻𝑧, theseare not predominantly present. As a result, it is not possible to retrieve the frequency of the imposedsignal (2.49) of 1𝐻𝑧. Similarly to the results in Sec. 4.3, the recorded signal seems to be noise ratherthan the sinusoidal input signal.

Page 44: Thesis Fabian Brull

30 5. Correlations

5.3.2. AutocorrelationThe 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 behaviorof 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

# P

ixel

0.2

0.4

0.6

0.8

b

20 60 100

# Pixel

20

40

60

80

100

120

# P

ixel

0.2

0.4

0.6

0.8

c

20 60 100

# Pixel

20

40

60

80

100

120

# P

ixel

0.2

0.4

0.6

0.8

d

20 60 100

# Pixel

20

40

60

80

100

120

# P

ixel

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 valueof the correlation function changes significantly over time. Important here is to note the changing limitsfor 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 tendsto increase as the time lag increases. This can partly be accounted for by the fact that for the highertime 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 combinationsthat 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.4athat the speckle patterns are instantly uncorrelated. The error bars that are plotted are calculated bydividing the data points for 𝜏 = 1, 11, 21, 31, 41, 51, 61 into subsets of 10 data points, that are then usedto 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 bysubtracting the mean value from the signal. It follows from Fig. 5.4b that there is no predominant peakaround the desired frequency of 1𝐻𝑧. On the contrary, the Fourier spectrum contains components for allthe different frequencies. This is once more an indication that the speckle patterns that are processeddo 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

Page 45: Thesis Fabian Brull

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 7f (Hz)

0

0.01

0.02

0.03

0.04

0.05

0.06

Pow

er

b

Figure 5.4: a: The autocorrelation for the pixel ( , ) is displayed as function of time lag with error bars. These error barsare 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 andspread 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 thecalculated value of 𝑔 , 𝜎 , is plotted in the same figure (Fig. 5.5). For comparison the expectedrelationship for a random variable (see (5.10)) is included. The behavior of the uncertainty in the meanfor a random variable will go as 𝑁 , where 𝑁 denotes the number of samples that is used for averaging.

Page 46: Thesis Fabian Brull

32 5. Correlations

Although 𝜎 decreases with an increasing number of samples, a 𝑁 -relationship does not fitthrough the data points. It was expressed in Sec. 5.1.2 that the behavior of 𝑔 will be different fromthat of a random variable.

The general tendency that 𝜎 increases with a decreasing number of samples is consistent withthe fact that the averaging must be done over fewer combinations for these higher values for 𝜏.

5.3.3. Speckle ContrastThe 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 imposedsignal (2.49) of 1𝐻𝑧.

0 1 2 3 4 5 6 7t [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 7f (Hz)

0

1

2

3

4

5

6

7

8

9

Pow

er

×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 intothe frequency domain making use of the discrete Fourier transform.

Page 47: Thesis Fabian Brull

6Case 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, makesit necessary to seriously question the setup that was used during the simulations. Comparison withthe parameters that were used by Loozen seems a reasonable point to start, given the fact that he hasdemonstrated that speckle contrast can be used to retrieve an introduced periodicity underlying thespeckle patterns. The most important differences are the camera size, number of particles, integrationtime 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 theresults. In order to do so, three speckle patterns asmeasured by Loozen are used for further analysis. Aprominent difference is the amount of pixels that was used. Our simulations with Van As’ OptoFluidscode make use of a camera consisting of 128 x 128 pixels, which covers a screen with a halfwidth of1.25𝑐𝑚 as can be seen in Table 2.2. Loozen’s images that are used for this analysis consist of 300 x300 pixels.

In Fig. 6.1 a speckle pattern as measured by Van As is shown on the left, on the right a specklepattern that was experimentally measured by Loozen is shown. The size of a single pixel is equal forboth patterns. This makes it possible to compare the number of pixels that is used to cover a typicalspeckle. From visual comparison in Fig. 6.1 it becomes apparent that there seems to be a deviationin the number of pixels that is used to cover a typical speckle. Van As’ speckle patterns seem to havebigger speckles when the pixel size is set to equality, which corresponds to more pixels per typicalspeckle.

Figure 6.1: Visual comparison between a typical speckle pattern generated by Van As ( x pixels) [30] on the left andone experimentally measured by Loozen ( x pixels) [15] on the right.

33

Page 48: Thesis Fabian Brull

34 6. Case Study Camera Size

6.1. Deviations within a Single ImageTo investigate the role of the difference in camera size, we will divide the speckle patterns of Loozeninto subsections and look at the deviation between these sections. A first step would be dividing the300 x 300 pixel image into two halves of 150 x 300 pixels. Repeating the process of calculating thebinary fractal dimension, 𝐷 , as outlined in Sec. 4.2, for both halves makes a comparison between thetwo possible. A mean value and standard deviation for the fractal dimension of these two subsectionswill 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 valuesand standard deviations behave as a function of the number of sections. As the number of screensincreases, 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 arerandom, 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 thestandard deviations, one could look at the speckle contrast, as outlined in Sec. 5.2. The results willthen be compared to those of fractal dimension analysis.

6.1.1. ResultsIn Fig. 6.2 the results for dividing the original image of 300 x 300 pixels into equal-size sections areplotted for the fractal dimension 𝐷 .

It follows from Fig. 6.2a that the fractal dimension increases with increasing screen size. Thiscould be explained by the fact that with decreasing camera size the number of non-background pixelsdecreases. These non-background pixels are in a way a measure for the roughness of images, whichis directly related to fractal dimension. The pixels size limits the minimal box size. As the pixel size isthe 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 coverall 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 followsfrom Fig. 4.4a that the typical fluctuation over time is in the order of 0.02. This would mean that thenoise 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 changesignificantly 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 understandthis. The contrast present in an image does not change when it is divided into parts. Deviations from thevalue 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 thanbeing 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 sizeis consistent with that of the fractal dimension. In Fig. 6.3b it can be seen that the general trend for allthree 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 standarddeviation 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 of0.02 ∼ 0.03. It follows from Fig. 5.6 that the over time fluctuations of the speckle contrast as simulatedwith van As’ setup are around 0.05. The resulting noise to signal ratio is 0.4 ∼ 0.6.

6.1.2. ConclusionThe analysis of three of Loozen’s speckle patterns suggests that very high noise to signal ratios areexpected for a camera of 128 x 128 pixels. This is consistent with the noisy results that were obtainedfor the fractal analysis in Sec. 4.3.2 and three correlation types in Sec. 5.3. Increasing the camera

Page 49: Thesis Fabian Brull

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’simages. Based on this, the hypothesis that increasing the number of camera pixels could allow forretrieval 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

123

0 1 2 3 4 5

# pixels/screen ×104

0

0.002

0.004

0.006

0.008

0.01

0.012

0.014

σD

B

b

123

Figure 6.2: a: Dependency of the fractal dimension on the number of pixel per screen is plotted. The values are computedby 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 deviationbetween 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

123

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

123

Figure 6.3: a: Dependency of the speckle contrast on the number of pixels per screen is plotted. The values are computedby 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 deviationbetween these sections of the same size is plotted against the number of pixels.

Page 50: Thesis Fabian Brull
Page 51: Thesis Fabian Brull

7Conclusions & Recommendations

7.1. ConclusionsClose attention to the research question, stated in Ch. 1, will be paid when drawing conclusions. Theultimate goal here is to use simulations with Van As’ OptoFluids code to generate a time sequenceof speckle patterns and seek to retrieve the periodicity of the introduced sinusoidal pressure gradientwhich causes the red blood cells to move. The degree to which the speckle patterns are blurred is anindicator 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 transformedinto 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 theanalyzed 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 desiredpredominant peak around 1𝐻𝑧. This can lead to no other conclusion than that in our experimentsthe governing frequency has not been retrieved from speckle pattern analysis. Instead noise wasmeasured.

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 informationfrom speckle patterns in order to retrieve a periodicity that was introduced experimentally. The factthat these same parameters were unsuccessful in retrieving the periodicity that was introduced in thesimulations could indicate that differences in the settings, e.g. camera size, between the OptoFluidscode 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 shapeof the input signal can be indicated as the most prominent differences between the simulations andexperiments. The particles density was a factor 1000 lower than in experiments. The used integrationtime was a factor 200 shorter than the integration time Loozen used, this results in significantly lessblurring and less noise cancellation. The sampling rate was sufficiently high to detect the introducedperiodicity. For the input signal, Loozen used a rectangular pulse wave, whereas in present researchthe 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 aserious discrepancy in the number of pixels that made up the camera, 128 x 128 pixels for our resultsversus 300 x 300 pixels for Loozen’s [15], the number of pixels per typical speckle has been reportedto 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 withthe fluctuations over time. For a number of pixels as used in the present research, this results in noiseto signal ratios of 0.25 ∼ 0.5 and 0.4 ∼ 0.6 for the fractal dimension and speckle pattern respectively.

37

Page 52: Thesis Fabian Brull

38 7. Conclusions & Recommendations

This could explain the noisy character of our results. Increasing the number of pixels will improve thenoise 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. Differencesin setup parameters with experiments, e.g. camera size and integration time, are indicated as possiblecauses for the noisy results.

7.2. Hypotheses and RecommendationsThe 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 BachelorThesis does not mean that these properties do not reflect the periodicity. In this section hypothesesand 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 camerasize, the number of red blood cells, the sampling rate, the integration time of the camera and the shapeof the input signal were indicated as important differences. The possible influence of these is discussedand recommendations for necessary changes are made.

7.2.1. Camera SizeThe camera size in our simulations is 128 x 128 pixels, whereas the images by Loozen that are analyzedin Ch. 6 consist of 300 x 300 pixels. As the number of pixels has been shown to influence the deviationbetween 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 fractaldimension and speckle pattern respectively (see Sec. 6.1.1). Extrapolation in Fig 6.2 b suggests thata 300 x 300 pixel screen would have values for 𝜎 of 0.001 − 0.002, which is a serious reductioncompared to the 128 x 128 pixel screen with typical values for 𝜎 of 0.005 − 0.01. The noise to signalratio would therefore significantly improve to 0.05 − 0.01.

An analogous approach for the speckle contrast would, taking a conservative approach by followingthe red line (2) in Fig. 6.2b, leads to the improvement of the noise to signal ratio by a factor of 2. Bestcase scenario, corresponding to the blue line (1) in Fig. 6.2b, the influence of randomness due to thenumber 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 byroughly 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 theseestimates, the degree of randomness in the fractal dimension (speckle contrast) due to the numberof pixels as determined from analyzing three measured images by Loozen is compared to the typicalfluctuation over time as determined from the simulated speckle patterns.

More appropriate would be comparing the degree of randomness to the typical fluctuations overtime 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. Asa consequence, not too much emphasis should be put on the quantitative value of these computednoise to signal ratios. Their qualitative behavior, as observed when increasing the number of pixels, isrelevant nevertheless. A conservative hypothesis would be that the noise to signal ratio for both thefractal 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 signalratio and therefore allow for a better chance of achieving the goal of artificial heartbeat detection. Thiscomes at the price of an increased computation time.

Page 53: Thesis Fabian Brull

7.2. Hypotheses and Recommendations 39

7.2.2. Number of ParticlesA second parameter that should be considered in follow-up experiments is the number of particles inthe simulation compared to the number of particles in the experiment. It follows from comparison of theparameters used by Van As [30] and Loozen [15] that the number of particles in the simulation of 1000red blood cells, results in a factor 1000 more dilute solution than was used in the experiments. Theimpact 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 increasinglyimportant, as the typical distance between the scatterers is decreased.

7.2.3. Integration TimeThe 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 longermeasuring time corresponds to averaging over more instantaneous samples and therefore a resultingspeckle 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 frequencyspectrum is harder to detect, but Loozen has demonstrated that this is possible. This increased degreeof 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 useda 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 betweenour simulated speckle patterns and Loozen’s measured images more appropriate and could reducethe noise. The number of instantaneous images used to construct a single time step that is requiredfor convergence, should be reevaluated for the new integration time.

7.2.4. Sampling RateIn addition to the integration time, the sampling rate used in experiments was different from the samplingrate in our research (12.5𝐻𝑧). Namely, Loozen worked with an open shutter, leading to a integrationtime of 20𝑚𝑠 and a time step of 20𝑚𝑠 [15]. This corresponds to a sampling rate of 50𝐻𝑧. Nemati andothers used sampling rates of 50𝐻𝑧 and higher [18]. This could explain the fact that the autocorrelationfunction showed no correlation for time lag 𝜏 = 1 (see Fig. 5.4a), as higher sampling rates make itpossible to detect correlated behavior at smaller time scales. This would lead to the hypothesis thatcorrelated 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 frequencymeans that the periodicity of the input signal was not present in the autocorrelation and correlationcoefficient analysis. Changing the sampling rate will not influence this.

7.2.5. Shape of Input SignalIn our research the imposed signal was a sinusoidal pressure gradient, as displayed in Fig. 2.5. InLoozen’s thesis [15] it was stated that an inline-pump was used to introduce a rectangular pulse wavefor its simplicity and auto-coherence. The main difference between a sinusoidal and rectangular pulsewave is the fact that the former introduces changes that are gradual, whereas the latter produces abruptchanges.

A hypothesis that can be formulated from this is that the changes in the fluid velocities are toogradual to retrieve the periodicity from speckle pattern analysis for sinusoidal signals. The reason forthis is that gradual changes lead to a weaker signal and therefore higher noise to signal ratios. Since anactual 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 pressuregradient is recommended for direct comparison with Loozen.

Page 54: Thesis Fabian Brull
Page 55: Thesis Fabian Brull

AAppendix

A.1. Fourier Spectrum of Signals mirrored in a LineAs described in Sec. 4.3 the values of 𝐷 , are the values of 𝐷 , mirrored in a horizontal linearound 𝐷 ≃ 0.9. Here a more general case displaying such mirroring behavior will be considered toanalyze the implications on the Fourier spectra of these signals. The signals considered here are twosines, with different offsets, that are related to each other by the previously described mirroring in aline, as can be seen in Fig. A.1 a. The Fourier spectra of both signals are calculated and displayed inFig. A.1b.

0 1 2 3 4 5 6 7f (Hz)

0

1

2

3

4

5

6

7

8

Pow

er

b

sin(at)-sin(at)Mirror line

0 0.5 1 1.5 2 2.5 3t [s]

0

0.5

1

1.5

2

2.5

3

3.5

4

4.5

Am

plitu

de

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 displayedas 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 fortheir zero frequency. It can be noted that the frequency at which the Fourier spectrum peaks is notequal to the exact frequency of the sines (1𝐻𝑧). This has to do with the fact that the measuring time isnot equal to an integer number of periods, as is described in Sec. 3.1.

41

Page 56: Thesis Fabian Brull
Page 57: 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 Wileyand 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 ofdigital 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 CompanyPublishers, 2007.

[12] J. W. Goodman and G. Parry. Laser speckle and related phenomena. Springer, Berlin HeidelbergNew 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 speckleimages. Journal of Applied Physics, J. Appl. Phys. 119(174902), 2016.

[20] L.N. Ng. Manipulation of particles on optical waveguides, 2000.

43

Page 58: Thesis Fabian Brull

44 Bibliography

[21] A.V. Oppenheim, A.S. Willsky, and S. Hamid Nawab. Signals and Systems. Pearson, PearsonNew 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: Anumercial study. MSc Thesis Report, TU Delft, 2015.

[31] H. van den Akker and R. Mudde. Fysische Transportverschijnselen - denken in balansen. DelftUniversity 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 suspensiondroplets. 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.