  Citation: Li, H.; Barão, M.; Rato, L; Wen, S. HMM-Based Dynamic Mapping with Gaussian Random Fields. Electronics 2022, 11, 722. https://doi.org/10.3390/ electronics11050722 Academic Editor: Enzo Pasquale Scilingo Received: 14 January 2022 Accepted: 21 February 2022 Published: 26 February 2022 Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affil- iations. Copyright: © 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/). electronics Article HMM-Based Dynamic Mapping with Gaussian Random Fields Hongjun Li 1, * , Miguel Barão 2 , Luís Rato 2 and Shengjun Wen 1 1 Zhongyuan-Petersburg Aviation College, Zhongyuan University of Technology, Zhengzhou 450007, China; wsj@zut.edu.cn 2 Departamento de Informática, Escola de Ciências e Tecnologia, Universidade de Évora, 7004-516 Évora, Portugal; mjsb@uevora.pt (M.B.); lmr@uevora.pt (L.R.) * Correspondence: li.hongjun@zut.edu.cn; Tel.:+86-13526706493 This paper is an extended version of our paper published in 24th International Conference on Automation and Computing under the title “Mapping Dynamic Environments Using Markov Random Field Models”. Abstract: This paper focuses on the mapping problem for mobile robots in dynamic environments where the state of every point in space may change, over time, between free or occupied. The dynam- ical behaviour of a single point is modelled by a Markov chain, which has to be learned from the data collected by the robot. Spatial correlation is based on Gaussian random fields (GRFs), which correlate the Markov chain parameters according to their physical distance. Using this strategy, one point can be learned from its surroundings, and unobserved space can also be learned from nearby observed space. The map is a field of Markov matrices that describe not only the occupancy probabilities (the stationary distribution) as well as the dynamics in every point. The estimation of transition probabilities of the whole space is factorised into two steps: The parameter estimation for training points and the parameter prediction for test points. The parameter estimation in the first step is solved by the expectation maximisation (EM) algorithm. Based on the estimated parameters of training points, the parameters of test points are obtained by the predictive equation in Gaussian processes with noise-free observations. Finally, this method is validated in experimental environments. Keywords: dynamic environments; Markov chain; Gaussian random fields; expectation maximisation 1. Introduction 1.1. Literature Review Dynamic environments are particularly important and complex. These environments include static objects and different kinds of dynamic objects. High dynamic objects, such as moving people, change their position quickly. Low dynamic objects, such as doors and pieces of furniture, can appear and disappear from particular locations however those events are comparatively rare. Autonomous robots should be able to know if objects are static or dynamic to help in path planning. In earlier research, the environments were assumed to be static. The classical method for static environments is occupancy grid mapping [13] where maps are divided into a grid and the states of different grid cells are assumed to be independent. In dynamic environments, one popular strategy is to estimate the number of potential targets, their positions, and velocities from sensor data [46]. The dynamic object detection needs to identify the objects and their correspondence in different time instants. The other one is to apply Markov chains. The dynamic occupancy grids proposed in [713] does not rely on high-level object models. Every grid cell is associated with a Markov chain, where its future occupancy state only depends on the current state. Since the occupancy observations are noisy, the states are not directly observable and the process is modelled instead by hidden Markov models (HMMs) [14] at each point in space. Estimating good parameters in an HMM requires considerable data. If the dependence between different grid cells is taken into account, as is done in [8], maps are built with inconsistencies. Electronics 2022, 11, 722. https://doi.org/10.3390/electronics11050722 https://www.mdpi.com/journal/electronics