Dynamic Light Scattering (DLS) is a technique used to measure the size distribution of small particles in suspension by analyzing the fluctuations in light intensity caused by Brownian motion. MATLAB is well-suited for this type of analysis, as it offers extensive mathematical and visualization capabilities.

🗯️MATLAB snippet

Basic Overview of DLS:

  1. Concept: DLS measures the diffusion of particles in a fluid by observing the time-dependent intensity of scattered light.
  2. Data Analysis: The time correlation function of the intensity signal is used to extract the diffusion coefficient, which can then be related to particle size using the Stokes-Einstein equation.
  3. Mathematical Background:

Implementing DLS Analysis in MATLAB:

Here's a simplified approach to analyzing DLS data using MATLAB.

Step 1: Import Intensity Data

Ensure you have time-series data representing the intensity of the scattered light. This data is typically obtained from a DLS instrument.

 % Load the intensity data (assumed to be in a .mat or .csv file)
 data = load('intensity_data.mat'); % Replace with your file path or import function
 intensity = data.intensity; % Adjust based on your file's structure
 time = data.time; % Time vector corresponding to intensity data

Step 2: Calculate the Correlation Function

The correlation function ( $g_2(\tau)$ ) can be estimated using MATLAB's built-in functions.

 % Compute the correlation function using autocorrelation
 normalized_correlation = xcorr(intensity, 'unbiased');
 normalized_correlation = normalized_correlation(normalized_correlation >= 0); % Take only non-negative lags
 ​
 % Normalize the correlation function
 g2_tau = normalized_correlation / max(normalized_correlation);
 ​
 % Plot the correlation function
 figure;
 plot(time(1:length(g2_tau)), g2_tau);
 xlabel('Time Delay (s)');
 ylabel('Correlation Function g_2(\\tau)');
 title('Intensity Correlation Function');

Step 3: Extract the Diffusion Coefficient

Fit an exponential decay model to the correlation function to find the diffusion coefficient ( $D$ ).

 % Fit an exponential decay to estimate D (simplified approach)
 fit_func = @(b, x) exp(-2 * b * x); % Simple model for fitting
 initial_guess = 1e-4; % Adjust based on expected D
 params = lsqcurvefit(fit_func, initial_guess, time(1:length(g2_tau)), g2_tau);
 ​
 D = params; % Extracted diffusion coefficient
 disp(['Estimated Diffusion Coefficient: ', num2str(D)]);

Step 4: Calculate the Hydrodynamic Radius

Use the Stokes-Einstein equation to calculate the hydrodynamic radius ( $R_H$ ).

 % Constants
 kB = 1.380649e-23; % Boltzmann constant (J/K)
 T = 298; % Temperature in Kelvin (e.g., room temperature ~25°C)
 eta = 0.001; % Viscosity of water in Pa·s (at ~25°C)
 ​
 % Calculate the hydrodynamic radius
 R_H = (kB * T) / (6 * pi * eta * D);
 disp(['Hydrodynamic Radius (nm): ', num2str(R_H * 1e9)]); % Convert to nanometers