Overview

This project implements a discrete-time Kalman filter for estimating and predicting COVID-19 case numbers using real epidemiological data. The implementation demonstrates the application of advanced signal processing and statistical estimation techniques to public health data analysis.

The project utilizes actual COVID-19 data from the BC Centre for Disease Control (BCCDC) to validate the filter's performance in tracking disease progression and making short-term predictions. Multiple filter variants were developed and compared to optimize performance for different scenarios.

Problem Statement

During the COVID-19 pandemic, accurate estimation and prediction of case numbers became crucial for public health decision-making. Traditional epidemiological models often struggle with:

  • Noisy data: Daily case reports contain measurement noise and reporting delays
  • State estimation: Difficulty in estimating the true underlying infection rate from observed data
  • Real-time tracking: Need for algorithms that can update estimates as new data becomes available
  • Uncertainty quantification: Providing confidence intervals for predictions

The challenge was to develop a robust filtering algorithm that could handle these issues while providing reliable estimates and short-term forecasts.

Solution

The solution employs a discrete-time Kalman filter approach with the following key components:

State Space Modeling

Developed a state-space representation of COVID-19 dynamics with process and measurement noise models

Kalman Filtering

Implemented recursive estimation algorithm for optimal state estimation under Gaussian noise assumptions

Pandemic Modeling

Incorporated epidemiological growth models to capture disease transmission dynamics

Real Data Integration

Validated the approach using actual BCCDC COVID-19 case data for British Columbia

Technical Implementation

Core Algorithm Components

The implementation consists of several key MATLAB functions:

1. Kalman Filter Variants

  • kalmanFilter.m: Basic discrete-time Kalman filter implementation
  • kalmanFilter2.m: Enhanced version with improved noise modeling
  • kalmanFilter3.m: Advanced variant with adaptive parameters

2. Pandemic Model

  • panmodel.m: Epidemiological growth model incorporating exponential and logistic growth phases
  • State variables include infection rate, growth rate, and measurement bias
  • Process noise accounts for model uncertainties and external factors

3. Mathematical Framework

The discrete-time system is modeled as:

x(k+1) = F*x(k) + w(k)    % State evolution
y(k) = H*x(k) + v(k)      % Measurement model

Where:
- x(k): State vector (infection parameters)
- F: State transition matrix
- H: Measurement matrix  
- w(k): Process noise (Q covariance)
- v(k): Measurement noise (R covariance)

4. Algorithm Steps

  1. Prediction: Forecast next state using system dynamics
  2. Update: Correct prediction using new measurement
  3. Covariance Update: Update uncertainty estimates
  4. Parameter Adaptation: Adjust filter parameters based on performance

Results & Performance

The Kalman filter implementation demonstrated significant improvements over raw data analysis:

Key Achievements

  • Noise Reduction: Successfully filtered measurement noise from daily case reports
  • Trend Identification: Accurately tracked underlying infection trends despite data irregularities
  • Prediction Capability: Provided reliable 7-14 day forecasts with confidence intervals
  • Real-time Processing: Algorithm efficiently processes new data points as they become available

Validation Results

Using BCCDC data from early pandemic phases, the filter showed:

  • Reduced mean squared error compared to simple moving averages
  • Better capture of exponential growth phases
  • Improved detection of trend changes and inflection points
  • Robust performance across different noise levels

Lessons Learned

Technical Insights

  • Parameter Tuning: Proper selection of process and measurement noise covariances is critical for optimal performance
  • Model Selection: Different epidemiological phases require different state-space models
  • Data Quality: Filter performance is highly dependent on data consistency and reporting practices

Mathematical Understanding

  • Gained deep understanding of recursive estimation theory
  • Learned the importance of observability and controllability in system design
  • Developed appreciation for the trade-offs between model complexity and computational efficiency

Practical Applications

  • Kalman filters are powerful tools for real-time state estimation problems
  • Public health applications require careful consideration of reporting delays and data quality
  • Multiple model variants allow for comprehensive performance evaluation

Future Enhancements

Potential improvements and extensions to this work include:

  • Extended Kalman Filter: Handle nonlinear epidemiological models
  • Multi-variate Analysis: Incorporate multiple data streams (hospitalizations, deaths, testing rates)
  • Adaptive Filtering: Real-time parameter estimation and model selection
  • Spatial Modeling: Extend to multi-region analysis with geographic coupling