Introduction

We build physical products. That means before any neural network sees a single data point, there are centuries of mechanics, material science, and continuum theory to constrain the problem. The question is not whether physics helps. It’s how to integrate it into a learning pipeline without it either being ignored or blowing up the gradients. Civil engineering and continuum mechanics directly informed how we approached the mattress deconvolution problem: choosing the right foundation models, designing the physics losses that would regularize our networks.

Ideology

A bed can be made of different permutations: different thickness, different densities of memory foam and latex. The cushion formed by the final mattress can be thought of as a set of springs with movement constraints. Our goal was to recover the pressure applied on top of the mattress by a person, given the pressure read by sensors sitting at the bottom of the mattress block.

Pressure Deconvolution Through Mattress Blocks

Mathematical Background

The Forward Problem

When a load q(x, y) is applied on the top surface of a mattress, the pressure sensors at the bottom read a dispersed version p(x, y). The relationship between applied load and observed bottom pressure is governed by the mechanical response of the foam material.

Winkler Foundation

The simplest model treats each point independently:

Pasternak Foundation

Pasternak introduced a shear layer that couples adjacent springs:

Filonenko-Borodich Model

A further extension accounts for plate bending rigidity:

Boussinesq Stress Distribution

From classical soil mechanics, the vertical stress at depth z below a point load P is:

The Inverse Problem

Our task is the inverse: given p(x, y) at the bottom, recover q(x, y) at the top. If the forward mapping is p = F(q), we seek q = F⁻¹(p). This inverse is ill-posed. The Boussinesq kernel is a low-pass filter, and recovering the high-frequency content of q from p amplifies noise severely. That’s why classical deconvolution methods fail and a learning-based approach with physics regularization was pursued.

Data Collection and Preprocessing

Hardware Setup

The pressure sensor grid consists of a 112 × 96 array covering the full bed surface (7 × 6 ft). The bed is divided into blocks of varying dimensions: 1×2 ft, 1×1.5 ft, and 1×0.5 ft segments. Each 1×1 ft region corresponds to 16×16 sensor elements, giving a per-block resolution of up to 24 × 16 for a 1.5 × 1 ft block.

Pressure Deconvolution Through Mattress Blocks

Calibration

The sensors output raw ADC values in [0, 4096]. An exponential calibration function was applied:

Noise Cleaning

Two pixel-level cleaning operations were applied sequentially: spike removal (any pixel exceeding twice both its vertical or horizontal neighbours is replaced by the average of those neighbours) and dead-pixel interpolation (any pixel less than half of any cardinal neighbour is replaced by the mean of the dominant-axis neighbours).

Data Augmentation

Methodology

All approaches are described in chronological order, with the reasoning behind each transition.

Approach 1: Analytical Boussinesq Inversion

All three failed. Wiener deconvolution returned near-zero matrices (the PSF was too uniform, making the inverse numerically degenerate). Influence matrix inversion was severely underdetermined (96 measurements vs. 384 unknowns) with residuals > 40. Conjugate gradient converged slowly (residual ∼ 6000 after 1000 GPU iterations). The fundamental assumption, that the mattress acts as a linear shift-invariant system with a known Boussinesq PSF, is incorrect. The PSF is not position-invariant, the mattress response is nonlinear, and the Boussinesq model assumes a semi-infinite elastic medium, not a thin finite-thickness foam layer.

Approach 2: Sobel Gradient Coefficient Model

Approach 3: ConvTranspose2d Network with Heuristic Physics Losses

Pressure Deconvolution Through Mattress Blocks Pressure Deconvolution Through Mattress Blocks

Approach 4: U-Net with Filonenko-Borodich PDE Loss

A proper U-Net (Encoder: 1 → 64 → 128 → 256 → 512 → Decoder: 256 → 128 → 64 → 1) with BatchNorm, ReLU, and 2×2 max-pooling/transposed convolutions. The Filonenko-Borodich PDE residual was computed using finite differences with spacing dx = 6 mm:

Results Summary

Key Findings Across All Trials

Further Work

Spectral Physics Loss

Instead of computing the biharmonic in the spatial domain, compute the PDE residual in the Fourier domain:

Multi-Scale / Coarse-to-Fine Training

Start training on downsampled 14 × 12 or 28 × 24 grids where the biharmonic is stable, then progressively upsample to the full 112 × 96 resolution. Physics parameters learned at coarse scale provide initialization for the fine scale.

Neural Operator Approach

Replace the convolutional network with a Fourier Neural Operator (FNO) or DeepONet. FNOs are resolution-invariant and naturally operate in the frequency domain, making them compatible with the spectral physics loss proposed above.

PSF Calibration Campaign

The PSF was measured at only one location with 5 force levels. A systematic calibration measuring the PSF at a dense grid of positions (centre, edges, corners) and multiple force levels would quantify the spatial variation and nonlinearity, providing either a spatially varying PSF map for more accurate classical inversion, or physics-informed priors for the neural network.

Paired Data Augmentation via Simulation

Given estimated material properties, a finite element simulation of the mattress block could generate thousands of synthetic (q, p) pairs for pretraining. The network could then be fine-tuned on the limited real data.

Dimensionless Formulation

Non-dimensionalize all quantities before training: pressures by their mean, spatial coordinates by the block dimension, and material parameters by characteristic values. This ensures that the physics loss and data loss operate on O(1) quantities, preventing the scale mismatch that caused gradient explosion.

This problem will be revisited after other priorities are addressed.

Conclusion

This work documents an extensive exploration of methods for recovering true surface pressure from sensor readings beneath a mattress block. The problem is an inverse problem analogous to stress reconstruction in soil mechanics, complicated by finite geometry, material nonlinearity, and edge effects.

Classical analytical inversion methods failed due to ill-posedness and the inapplicability of infinite-medium, shift-invariant assumptions. Neural network approaches ranged from simple parametric models to deep convolutional PINNs with explicit PDE residuals. The convolutional networks with heuristic physics losses converged but produced insufficiently sharp outputs and didn’t learn meaningful physics parameters. The exact PDE-based approaches hit numerical instability of the biharmonic operator on fine grids, causing gradient explosion. Physics needs to be redefined for edges and corners. Alternative paths to large-scale data (simulation, or second-order inference from easier tasks) need to be explored.

ApproachParametersBest LossFailure Mode
Boussinesq inversion (Wiener)1 (reg. K)Residual > 40Near-zero output; degenerate PSF
Boussinesq inversion (NNLS/CG)∼384 loadsResidual ∼ 6000Underdetermined; no convergence
Sobel coefficient model7MSE ∼ 89,000All coefficients → 0
ConvTranspose2d + physics∼3.5MMSE ∼ 100k–150kBlurry output; physics params frozen
U-Net + FB PDE loss∼7MNaN by epoch 3Biharmonic gradient explosion

Table 1. Summary of all approaches attempted.