Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
Binary file added docs/JOSS2/Fig1.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/JOSS2/Fig2.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
229 changes: 229 additions & 0 deletions docs/JOSS2/paper.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@
@article{klishin2023data,
title={Data-induced interactions of sparse sensors},
author={Klishin, Andrei A and Kutz, J Nathan and Manohar, Krithika},
journal={arXiv preprint arXiv:2307.11838},
year={2023}
}

@article{karnik2024constrained,
title={Constrained optimization of sensor placement for nuclear digital twins},
author={Karnik, Niharika and Abdo, Mohammad G and Estrada-Perez, Carlos E and Yoo, Jun Soo and Cogliati, Joshua J and Skifton, Richard S and Calderoni, Pattrick and Brunton, Steven L and Manohar, Krithika},
journal={IEEE Sensors Journal},
year={2024},
publisher={IEEE}
}

@article{klishin2025doubledescent,
title={Origins and mitigation of double descent in reduced order modeling},
author={Klishin, Andrei A and Otto, Samuel E and Kutz, J Nathan and Manohar, Krithika},
journal={In preparation},
year={2025}
}

@article{erichson2020shallow,
title={Shallow neural networks for fluid flow reconstruction with limited sensors},
author={Erichson, N Benjamin and Mathelin, Lionel and Yao, Zhewei and Brunton, Steven L and Mahoney, Michael W and Kutz, J Nathan},
journal={Proceedings of the Royal Society A},
volume={476},
number={2238},
pages={20200097},
year={2020},
publisher={The Royal Society Publishing}
}

@article{manohar2018predicting,
title={Predicting shim gaps in aircraft assembly with machine learning and sparse sensing},
author={Manohar, Krithika and Hogan, Thomas and Buttrick, Jim and Banerjee, Ashis G and Kutz, J Nathan and Brunton, Steven L},
journal={Journal of manufacturing systems},
volume={48},
pages={87--95},
year={2018},
publisher={Elsevier}
}

@article{alonso2010novel,
title={A novel strategy for radar imaging based on compressive sensing},
author={Alonso, Mariv{\'\i} Tello and L{\'o}pez-Dekker, Paco and Mallorqu{\'\i}, Jordi J},
journal={IEEE Transactions on Geoscience and Remote Sensing},
volume={48},
number={12},
pages={4285--4295},
year={2010},
publisher={IEEE}
}

@article{krause2008near,
title={Near-optimal sensor placements in Gaussian processes: Theory, efficient algorithms and empirical studies.},
author={Krause, Andreas and Singh, Ajit and Guestrin, Carlos},
journal={Journal of Machine Learning Research},
volume={9},
number={2},
year={2008}
}

@article{alexanderian2021optimal,
title={Optimal experimental design for infinite-dimensional Bayesian inverse problems governed by PDEs: A review},
author={Alexanderian, Alen},
journal={Inverse Problems},
volume={37},
number={4},
pages={043001},
year={2021},
publisher={IOP Publishing}
}

@article{donoho2006compressed,
title={Compressed sensing},
author={Donoho, David L},
journal={IEEE Transactions on information theory},
volume={52},
number={4},
pages={1289--1306},
year={2006},
publisher={IEEE}
}

@article{summers2015submodularity,
title={On submodularity and controllability in complex dynamical networks},
author={Summers, Tyler H and Cortesi, Fabrizio L and Lygeros, John},
journal={IEEE Transactions on Control of Network Systems},
volume={3},
number={1},
pages={91--101},
year={2015},
publisher={IEEE}
}

@article{joshi2008sensor,
title={Sensor selection via convex optimization},
author={Joshi, Siddharth and Boyd, Stephen},
journal={IEEE Transactions on Signal Processing},
volume={57},
number={2},
pages={451--462},
year={2008},
publisher={IEEE}
}

@article{de2021pysensors,
title={PySensors: A Python package for sparse sensor placement},
author={de Silva, Brian M and Manohar, Krithika and Clark, Emily and Brunton, Bingni W and Brunton, Steven L and Kutz, J Nathan},
journal={arXiv preprint arXiv:2102.13476},
year={2021}
}

@article{brunton2016sparse,
title={Sparse sensor placement optimization for classification},
author={Brunton, Bingni W and Brunton, Steven L and Proctor, Joshua L and Kutz, J Nathan},
journal={SIAM Journal on Applied Mathematics},
volume={76},
number={5},
pages={2099--2122},
year={2016},
publisher={SIAM}
}

@article{clark2020multi,
title={Multi-fidelity sensor selection: Greedy algorithms to place cheap and expensive sensors with cost constraints},
author={Clark, Emily and Brunton, Steven L and Kutz, J Nathan},
journal={IEEE Sensors Journal},
volume={21},
number={1},
pages={600--611},
year={2020},
publisher={IEEE}
}

@article{klishin2023data,
title={Data-induced interactions of sparse sensors},
author={Klishin, Andrei A and Kutz, J Nathan and Manohar, Krithika},
journal={arXiv preprint arXiv:2307.11838},
year={2023}
}

@article{baraniuk2010model,
title={Model-based compressive sensing},
author={Baraniuk, Richard G and Cevher, Volkan and Duarte, Marco F and Hegde, Chinmay},
journal={IEEE Transactions on information theory},
volume={56},
number={4},
pages={1982--2001},
year={2010},
publisher={IEEE}
}

@article{candes2006stable,
title={Stable signal recovery from incomplete and inaccurate measurements},
author={Candes, Emmanuel J and Romberg, Justin K and Tao, Terence},
journal={Communications on Pure and Applied Mathematics: A Journal Issued by the Courant Institute of Mathematical Sciences},
volume={59},
number={8},
pages={1207--1223},
year={2006},
publisher={Wiley Online Library}
}

@article{schmid2010dynamic,
title={Dynamic mode decomposition of numerical and experimental data},
author={Schmid, Peter J},
journal={Journal of fluid mechanics},
volume={656},
pages={5--28},
year={2010},
publisher={Cambridge University Press}
}

@article{barrault2004empirical,
title={An ‘empirical interpolation’method: application to efficient reduced-basis discretization of partial differential equations},
author={Barrault, Maxime and Maday, Yvon and Nguyen, Ngoc Cuong and Patera, Anthony T},
journal={Comptes Rendus Mathematique},
volume={339},
number={9},
pages={667--672},
year={2004},
publisher={Elsevier}
}

@article{chaturantabut2010nonlinear,
title={Nonlinear model reduction via discrete empirical interpolation},
author={Chaturantabut, Saifon and Sorensen, Danny C},
journal={SIAM Journal on Scientific Computing},
volume={32},
number={5},
pages={2737--2764},
year={2010},
publisher={SIAM}
}

@article{drmac2016new,
title={A new selection operator for the discrete empirical interpolation method---improved a priori error bound and extensions},
author={Drmac, Zlatko and Gugercin, Serkan},
journal={SIAM Journal on Scientific Computing},
volume={38},
number={2},
pages={A631--A648},
year={2016},
publisher={SIAM}
}

@article{manohar2018data,
title={Data-driven sparse sensor placement for reconstruction: Demonstrating the benefits of exploiting known patterns},
author={Manohar, Krithika and Brunton, Bingni W and Kutz, J Nathan and Brunton, Steven L},
journal={IEEE Control Systems Magazine},
volume={38},
number={3},
pages={63--86},
year={2018},
publisher={IEEE}
}

@article{manohar2021optimal,
title={Optimal sensor and actuator selection using balanced model reduction},
author={Manohar, Krithika and Kutz, J Nathan and Brunton, Steven L},
journal={IEEE Transactions on Automatic Control},
volume={67},
number={4},
pages={2108--2115},
year={2021},
publisher={IEEE}
}
99 changes: 99 additions & 0 deletions docs/JOSS2/paper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
---
title: 'PySensors 2.0: A Python Package for Sparse Sensor Placement'
tags:
- Python
- machine learning
authors:
- name: Niharika Karnik
affiliation: 1
orcid: 0000-0002-4259-0294
- name: Yash Bhangale
affiliation: 1
orcid: 0009-0008-4163-6538
- name: Mohammad G. Abdo
affiliation: 3
orcid: 0000-0001-9845-6978
- name: Andrei A. Klishin
affiliation: 4
orcid: 0000-0002-5740-8520
- name: Joshua J. Cogliati
affiliation: 3
orcid: 0000-0003-2471-8095
- name: Bingni W. Brunton
affiliation: 5
orcid: 0000-0002-4831-3466
- name: J. Nathan Kutz
affiliation: 2
orcid: 0000-0002-6004-2275
- name: Steven L. Brunton
affiliation: 1
orcid: 0000-0002-6565-5118
- name: Krithika Manohar
affiliation: 1
orcid: 0000-0002-1582-6767
affiliations:
- name: Department of Mechanical Engineering, University of Washington
index: 1
- name: Department of Applied Mathematics, University of Washington
index: 2
- name: Idaho National Laboratory
index: 3
- name: Department of Mechanical Engineering, University of Hawai'i at Mānoa
index: 4
- name: Department of Biology, University of Washington
index: 5
date: 12 August 2025
bibliography: paper.bib
---


# Summary

`PySensors` is a Python package for the optimization of sparse sensor placement for reconstruction and classification tasks. This major update to `PySensors` introduces novel spatial constraints for sensor placement, including the enforcement of maximum or exact sensor counts in specific regions, predetermined sensor locations, and minimum distances between sensors. This functionality is extended to support custom basis inputs, enabling integration of any data-driven or spectral basis. We also propose a thermodynamic approach that goes beyond a single "optimal" sensor configuration and maps the complete landscape of sensor interactions induced by the training data. This comprehensive view facilitates integration with external selection criteria and enables assessment of sensor replacement impacts. The new optimization technique also accounts for over- and under-sampling of sensors, utilizing a regularized least squares approach for robust reconstruction. Additionally, we implement noise-induced uncertainty quantification of the estimation error and provide pointwise uncertainty heat maps to guide deployment decisions. To highlight these additions, we outline the mathematical algorithms and theory underlying these new capabilities. The usage of these new features is illustrated with code examples and practical advice for implementation across multiple application domains. Finally, we outline a roadmap of potential extensions to further strengthen the package's functionality and applicability to emerging sensing challenges.

# Statement of need
The scalable optimization of sensor placement is critical for efficient monitoring, control, and decision-making in complex engineering systems. Sensor measurements are necessary for real-time estimation of high-dimensional fluid flows [@erichson2020shallow], large-scale flexible structures [@manohar2018predicting], temperature fields and pressure fields across geophysical [@alonso2010novel] and nuclear energy systems [@karnik2024constrained]. Accurate real-time tracking of key system variables depends sensitively on the locations of sensors deployed within the system, which have to be optimized for the desired task. In general, the selection of an optimal subset of sensors among candidate locations is NP-hard, necessitating heuristic or greedy approaches such as compressed sensing [@donoho2006compressed] or greedy algorithms that exploit submodularity [@krause2008near].

![An overview image of capabilities of Pysensors](./Fig1.jpeg "PySensors 2.0 expands its capabilities by introducing custom basis functions, optimizers, constraints, solvers, and uncertainty quantification, enabling constrained sensing, over- and under-sampling, and uncertainty quantification in the presence of noisy sensor measurements.")

`PySensors` is a Python package [@de2021pysensors] dedicated to solving the complex challenge of optimal sensor placement in data-driven systems. It implements advanced sparse optimization algorithms that use dimensionality reduction techniques to identify the most informative measurement locations with remarkable efficiency [@manohar2018data;@brunton2016sparse;@clark2020multi]. It helps users identify the best locations for sensors when working with complex high dimensional data, focusing on both reconstruction [@manohar2018data] and classification [@brunton2016sparse] tasks. The package follows `scikit-learn` conventions for user-friendly access while offering advanced customization options for experienced users. Other sensor placment packages such as `Chama` [@klise2017sensor], `Polire` [@narayanan2020toolkit], and `OSPS` toolbox [@yi2011optimal], focus primarily on event detection, Gaussian process modeling, and structural health monitoring respectively, while `PySensors` specifically targets signal reconstruction and classification applications.

The original `PySensors` code provided an implementation of `Sparse Sensor Placement for Reconstruction (SSPOR)` using the `QR` optimizer for optimal sensor selection in unconstrained placement settings in which the number of sensors $p$ is equivalent to the number of modes $r$. The previous version offered only limited support for constraints and for specifying the number of sensors, which restricts its applicability to many real-world problems. The `Cost-Constrained QR (CCQR)` framework incorporated heterogeneous cost functions into the optimization process to accommodate practical deployment constraints.
The `Sparse Sensor Placement Optimization for Classification (SSPOC)` framework identified minimal sensor configurations that can classify high dimensional signals $\mathbf{x}\in\mathbb{R}^n$ as belonging to one of $c$ classes. Data is projected into a reduced spectral or data-driven basis $r\ll n$ to enable efficient optimization. Different basis functions such as `Identity`, `SVD` and `RandomProjection` implemented in `PySensors` can significantly impact sensor selection effectiveness and reconstruction quality [@manohar2018data].

This new version of `Pysensors` focuses specifically on practical engineering applications where measurement data is inherently noisy and spatial deployment constraints are unavoidable. Key improvements include constraint-aware optimization methods that handle spatial restrictions and sensor density limitations. This version of `Pysensors` implements methodologies introduced in [@klishin2023data] and [@karnik2024constrained] to make them accessible to scientists and engineers in all domains. These enhancements transform `PySensors` from a purely academic tool into a practical platform for solving real-world sensing challenges while maintaining mathematical rigor. Our code is thoroughly documented and contains extensive examples. `PySensors` is completely open-source and adheres to PEP8 stylistic standards.

# New Features

`PySensors` 1.0 implemented two sensor placement methods for reconstruction: (1) `QR`, a greedy optimization technique that places sensors throughout an unconstrained domain, and (2) `CCQR`, a cost-constrained optimization technique that accepts a user-defined vector of sensor costs throughout the domain, penalizing larger-cost locations for sensor placement.

Traditional QR factorization presents challenges for under-sampling ($p < r)$ and over-sampling ($p > r$) regimes in which the number of sensors is strictly greater or less than the model rank, respectively, and cannot enforce complex spatial constraints. `PySensors 2.0` addresses these limitations through two new optimization algorithms: `Generalized QR (GQR)` and `Two Point GReedy (TPGR)`.

Implementing spatially constrained sensor placement requires a deeper intervention in the underlying QR optimization framework. To address this requirement, we add the generalized QR `GQR` optimization functionality based on recent work [@karnik2024constrained], which provides the architectural flexibility needed to handle complex spatial constraints. We enhance the algorithm's capabilities by implementing diverse spatial constraints options: `maxn`, `exactn`, `predetermined`, and `distance`. Pre-defined constraint regions include ‘Circle‘, ‘Ellipse‘, ‘Polygon‘, ‘Parabola‘, ‘Line‘, and ‘Cylinder‘. Additionally, users can define a custom constraint using a `.py` python file or an equation string.

The objective that the QR optimizer is based on suffers from two limitations, it is not defined for the under-sampling
regime, in which the number of sensors is less than the model rank ($p < r$), and the underlying optimization is difficult to interpret and visualize directly. Ref.[@klishin2023data] resolves these limitations by adding a prior regularization and decomposing the resulting objective into sums over the placed sensors
$$
\mathcal{H}\equiv -\log \det(\mathbf{S}^{-2}+(\mathbb{S} \boldsymbol{\Psi}_r)^T(\mathbb{S} \boldsymbol{\Psi}_r)/\eta^2)\approx E_b+\sum\limits_{i\in \gamma}h_i+\sum\limits_{i\neq j \in\gamma}J_{ij} \
$$
The Two Point Greedy (TPGR) optimizer uses the above approximate objective, which allows the user to specify any number of sensors
$p$ for a given mode number
$r$. In contrast, the QR pivoting algorithm always returns exactly
$p=r$ sensors, ordered by decreasing importance, with any additional sensors selected randomly. Beyond this flexibility, TPGR can also generate sensor placement energy landscapes, providing insight into the relative quality of different sensor configurations.

`PySensors 2.0` adds the Regularized Least Squares solution derived in Ref.[@klishin2023data]:
$$
\mathbf{A}_{RLS}=\left( \mathbf{S}^{-2}+(\mathbb{S} \boldsymbol{\Psi}_r)^T(\mathbb{S} \boldsymbol{\Psi}_r)/\eta^2 \right)^{-1} (\mathbb{S} \boldsymbol{\Psi}_r)^T/\eta^2,
$$
This Regularized Least Squares solution is the new default reconstruction solver for `PySensors 2.0`, replacing the Least Squares solution via the Moore-Penrose pseudoinverse.
We implement uncertainty quantification metrics from [@klishin2023data] to assess the propagation of measurement noise through reconstruction algorithms and provide robust pointwise error estimates in reconstruction outputs. In addition, this version adds support for custom bases, so that researchers can transform their data into an alternative basis such as dynamic mode decomposition (DMD) modes before passing it to `PySensors`.

Finally, we demonstrate these new functionalities using new notebook examples for nuclear energy component systems, and update and streamline existing notebooks for sea surface temperature and image reconstruction.

![A flowchart to suggest which method to use](./Fig2.jpeg "Usage flowchart for PySensors showing recommended optimizers: QR with Identity/SVD basis for field reconstruction, SVD with SSPOC for classification, GQR for spatial constraints, and TPGR for under/over-sampling. Uncertainty quantification can be enabled separately to improve robustness under noisy measurements.")


# Acknowledgments
The authors would like to thank B. de Silva for valuable feedback. The authors acknowledge support from the Boeing Company, NSF AI Institute in Dynamic Systems under grant 2112085 and through the Idaho National Laboratory (INL) Laboratory Directed Research \& Development (LDRD) Program under DOE Idaho Operations Office Contract DE-AC07-05ID14517 for LDRD-22A1059-091FP.

# References
Loading