# Physics-Informed Deep Learning For Traffic State Estimation: A Survey and the Outlook
## 3 PIDL for Deterministic Tse
### Numerical Data Validation for Three-Parameter-Based LWR
PUNN \(f_{\theta}(x,t)\), parameterized by \(\theta\), is designed as a fully connected feedforward neural network with 8 hidden layers and 20 hidden nodes in each hidden layer. The hyperbolic tangent function (tanh) is used as the activation function for hidden neurons. By replacing \(\rho\) with \(f_{\theta}\), we have \(r_{c}:=[f_{\theta}]_{t}+(Q(f_{\theta}))_{x}-e[f_{\theta}]_{xx}\) in this case. With the estimated \(\rho\) and the observations \(\hat{\rho}\) on the observation points, we can obtain the data loss \(L_{o}\). In contrast, in PICGs, the connecting weights are fixed and the activation function of each node is designed to conduct a specific nonlinear operation for calculating an intermediate value of \(r_{c}\). The physics discrepancy \(L_{c}\) is the mean square of \(r_{c}\) on the collocation points. To customize the training of PIDL to Equation (9), we need to additionally introduce _boundary collocation points_\(\mathcal{C}_{B}=\{(0,t^{(i_{b})})|i_{b}=1,\ \ldots,N_{b}\}\cup\{(1,t^{(i_{b})})|i_{b}=1,\ \ldots,N_{b}\}\), for learning the two boundary conditions. Different from the \(\mathcal{B}\) in Equation (8), observations on boundary points are not required here in \(\mathcal{C}_{B}\). Then, we obtain the following loss:  
\[Loss_{\theta}=\alpha\cdot L_{o}+\beta\cdot L_{c}+\gamma\cdot L_{b}, \tag{10}\]  
\[\text{where, }\ L_{o}=\frac{\alpha}{N_{o}}\sum_{i=1}^{N_{c}}|f_{\theta}(x^{(i )},t^{(i)})-\hat{\rho}^{(i)}|^{2}\ \ (data\ loss),\]  
\[L_{c}=\frac{\beta}{N_{c}}\sum_{i=1}^{N_{c}}|r_{c}(x^{(i)},t^{(i)})|^{2}\ \ ( physics\ loss),\]  
\[L_{b}=\frac{\gamma}{N_{b}}\sum_{i_{b}=1}^{N_{b}}|f_{\theta}(0,t^{(i_{b})})-f _{\theta}(1,t^{(i_{b})})|^{2}\ \ (boundary\ loss).\]  
Note that because \(r_{c}:=[f_{\theta}]_{t}+(Q(f_{\theta}))_{x}-e[f_{\theta}]_{xx},r_{c}\) is affected by \(\theta\). Furthermore, boundary collocation points are used to calculate the boundary loss \(L_{b}\). Because \(L_{b}\) might change with different scenarios, it is ignored in Figure 6 for simplicity. **TSE and system identification using loop detectors:** In this experiment, five model variables \(\delta\), \(p\), \(\sigma\), \(\rho_{max}\), and \(\epsilon\) are encoded as learning variables in the PICG depicted in Figure 6. Define \(\lambda=(\delta,p,\sigma,\rho_{max},\epsilon)\) and the residual \(r_{c}\) is affected by both \(\theta\) and \(\lambda\), resulting in the objective \(Loss_{\theta,\lambda}\). We now use observations from loop detectors, i.e., only the traffic density at certain locations where loop detectors are installed can be observed. By default, loop detectors are evenly located along the road. Figure 6: PIDL flowchart for three-parameter-based LWR, consisting of a PUNN for traffic density estimation and a PICG for calculating the residual, where \(\lambda=(\delta,p,\sigma,\rho_{max},\epsilon)\). We use \(N_{c}=150,000\) collocation points and other experimental configurations are given in A.1.1. We conduct PIDL-based TSE experiments using different numbers of loop detectors to solve \((\theta^{*},\lambda^{*})=\operatorname*{argmin}_{\theta,\lambda}\,Loss_{\theta,\lambda}\). In addition to the traffic density estimation errors of \(\rho(x,t;\theta^{*})\), we evaluate the estimated model parameters \(\lambda^{*}\) using the \(\mathbb{L}^{2}\) relative error (RE) and present them as a percentage. Figure 7 presents a visualization of the estimated traffic density \(\rho\) (left) and traffic velocity (right) of the PIDL. Comparisons at certain time points are presented. Note that the PUNN in Figure 6 does not predict \(u\) directly, instead it is calculated by \(Q(\rho)/\rho\) in the post-processing. More results are provided in Table A1 and the observation is that the PIDL architecture in Figure 6 with five loop detectors can achieve a satisfactory performance on both traffic density estimation and system identification. In general, more loop detectors can help our model to improve the TSE accuracy, as well as the convergence to the true model parameters.