GPU-accelerated Optical Sensor Simulation - Simulating a Network of Optical Sensors Utilizing GPU-acceleration - Forsberg, Joar (My University, 2026)
Laser triangulation sensors are widely used in industrial measurement systems, where multiple sensors continuously acquire geometric data and transmit it to a host for calibration and analysis. Prototyping such systems is costly and time-consuming, as physical sensors require specialized hardware, precise alignment, and dedicated network infrastructure. This thesis presents a proof-of-concept framework for virtual laser triangulation sensors that can be used as a substitute for physical prototypes during system development and testing. The work consists of two main components: a mathematical simulation for generating sensor-like measurements, and a network layer that enables the virtual sensors to communicate with the host software exactly as real devices do. The simulation computes raypolygon intersections to emulate the measurement process of a triangulation sensor. A naïve CPU version and a GPU-accelerated version were implemented, followed by a custom CUDA kernel based on Cramers rule for solving large batches of independent 2 × 2 systems. Profiling and roofline analysis show that the custom kernel achieves several orders of magnitude higher performance compared to both the CPU implementation and high-level GPU libraries such as cuSOLVER. The network interface is implemented using UDP communication and a virtual Wire- Guard network, allowing each virtual sensor to appear indistinguishable from a physical one to the existing configuration software. This enables seamless hardware-in-the-loop style testing without modifications to the host system. The results demonstrate that virtual laser triangulation sensors can generate realistic measurements at rates significantly higher than required for real-time operation, creating room for future improvements in physical accuracy and noise modeling. The framework establishes a foundation for scalable virtual prototyping of optical measurement systems and shows that highly specialized GPU kernels can dramatically accelerate small-matrix computations commonly found in geometric simulation workloads.
Keywords: laser triangulation; GPU acceleration; CUDA; UDP; numerical simulation; virtual sensors