Hostname: page-component-76d6cb85b7-f97m6 Total loading time: 0 Render date: 2026-07-14T02:37:31.485Z Has data issue: false hasContentIssue false

Decoder decomposition for the analysis of the latent space of nonlinear autoencoders with wind-tunnel experimental data

Published online by Cambridge University Press:  09 December 2024

Yaxin Mo
Affiliation:
Department of Aeronautics, Imperial College London, London, UK
Tullio Traverso
Affiliation:
Department of Aeronautics, Imperial College London, London, UK The Alan Turing Institute, London, UK
Luca Magri*
Affiliation:
Department of Aeronautics, Imperial College London, London, UK The Alan Turing Institute, London, UK Politecnico di Torino, DIMEAS, Torino, Italy
*
Corresponding author: Luca Magri; Email: l.magri@imperial.ac.uk

Abstract

Turbulent flows are chaotic and multi-scale dynamical systems, which have large numbers of degrees of freedom. Turbulent flows, however, can be modeled with a smaller number of degrees of freedom when using an appropriate coordinate system, which is the goal of dimensionality reduction via nonlinear autoencoders. Autoencoders are expressive tools, but they are difficult to interpret. This article aims to propose a method to aid the interpretability of autoencoders. First, we introduce the decoder decomposition, a post-processing method to connect the latent variables to the coherent structures of flows. Second, we apply the decoder decomposition to analyze the latent space of synthetic data of a two-dimensional unsteady wake past a cylinder. We find that the dimension of latent space has a significant impact on the interpretability of autoencoders. We identify the physical and spurious latent variables. Third, we apply the decoder decomposition to the latent space of wind-tunnel experimental data of a three-dimensional turbulent wake past a bluff body. We show that the reconstruction error is a function of both the latent space dimension and the decoder size, which are correlated. Finally, we apply the decoder decomposition to rank and select latent variables based on the coherent structures that they represent. This is useful to filter unwanted or spurious latent variables or to pinpoint specific coherent structures of interest. The ability to rank and select latent variables will help users design and interpret nonlinear autoencoders.

Information

Type
Research Article
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (http://creativecommons.org/licenses/by/4.0), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2024. Published by Cambridge University Press
Figure 0

Figure 1. Snapshots of the streamwise velocity of the laminar wake dataset at different times within the same period. A vortex shedding period is denoted with $ {T}^{lam} $. The area bounded by the gray box is used for training.

Figure 1

Figure 2. POD of the laminar wake $ \mathbf{U} $. Left: the percentage energy contained in the first six POD modes of the unsteady wake $ {\varPhi}^{lam} $ (data mode). Data modes 1 and 2, 3 and 4, and 5 and 6 contain similar flow energy and oscillate at the same frequency but out of phase. Center: phase plot of the first two data time coefficients. Right: the frequency spectrum of the data and the data time coefficients 1, 3, 5, and 7, normalized by their standard deviations. The data contain the vortex shedding frequency and its harmonics. (Since each pair has the same frequency spectrum, only the odd data modes are shown here.)

Figure 2

Figure 3. The first six POD modes (data modes) of the unsteady wake behind a cylinder dataset $ {\varPhi}_{:,1}^{lam},\dots, {\varPhi}_{:,6}^{lam} $.

Figure 3

Figure 4. Experimental setup, reproduced from(Rigas, 2021). The dimensions $ {x}_1 $ and $ {x}_2 $ are the measured location nondimensionalized by the diameter $ D $. The black dots mark the location of the pressure sensors.

Figure 4

Figure 5. The wind-tunnel pressure dataset $ \mathbf{P} $. Left: Mean pressure. Center: RMS pressure. Right: The premultiplied PSD ($ \hskip0.1em St\cdot $ PSD) of the wind-tunnel dataset, with peaks at $ \hskip0.1em St\approx \mathrm{0.002,0.06} $ and $ \hskip0.1em St\approx 0.2 $ and its harmonics. The peaks correspond to the three-dimensional rotation of the wake, the pulsation of the vortex core, and the vortex shedding and its harmonics, respectively.

Figure 5

Figure 6. POD of the wind-tunnel dataset $ \mathbf{P} $. Left: Percentage energy of the first 10 data modes. Right: Cumulative percentage energy of POD modes. The reconstruction of the pressure dataset to 95% energy needs 21 data modes.

Figure 6

Figure 7. Left: The premultiplied PSD ($ St $ PSD) of their associated time coefficients $ {\boldsymbol{A}}_{1,:}^{exp} $ to $ {\boldsymbol{A}}_{5,:}^{exp} $. Middle: The temporal evolution of the data time coefficients, $ {\boldsymbol{A}}_{1,:}^{exp} $ to $ {\boldsymbol{A}}_{5,:}^{exp} $, for the first 10 seconds of the experiment. Right: The first five data modes of the wind-tunnel dataset $ {\varPhi}_{:,1}^{exp} $ to $ {\varPhi}_{:,5}^{exp} $.

Figure 7

Table 1. Different autoencoder architectures and the training datasets

Figure 8

Figure 8. The schematics of the standard autoencoder (AE). Different AEs are employed for different datasets and tests. The AE architecture and dataset for each test are listed in Table 1a. (a) AE for decomposing the laminar cylinder wake $ \mathbf{U} $ with three convolution layers in both the encoder and the decoder. The hyperparameters are in Tables A.1 and A.2 in the Appendix. (b) AE for decomposing the wind-tunnel pressure data $ \mathbf{P} $ with five feedforward layers. The input is a flattened vector of measurement taken from all sensors at time $ t $. The hyperparameters are given in Tables A.3 and A.4 in the Appendix.

Figure 9

Figure 9. Schematic of the MD-AE (Murata et al., 2020) with two latent variables as an example. Each latent variable is decoded by a decoder to produce a decomposed field. The sum of the decomposed fields $ {\mathbf{M}}^1 $ and $ {\mathbf{M}}^2 $ is the output of the MD-AE.

Figure 10

Figure 10. Results of training the MD-AE on the laminar wake dataset with a latent dimension of 2. (a) Both latent variables are periodic in time. (b) Frequency spectrum of the latent variables, normalized by their standard deviation, compared with the frequency of the data. The latent variables both contain the vortex shedding frequency and the second harmonic of the vortex shedding frequencies. (c) A snapshot output of the MD-AE (mean flow added) and the POD modes of the decomposed fields. The POD modes of decomposed field 1 are similar to data modes 1, 3, and 6 and the POD modes of decomposed field 2 are similar to data modes 2, 4, and 5.

Figure 11

Figure 11. Results from the MD-AE trained with the laminar wake dataset with two latent variables. The first four decoder coefficients plotted against the latent variables. Both latent variables affect the magnitude of the first four POD modes of the data in the output of the MD-AE.

Figure 12

Figure 12. Results from the MD-AE trained with the laminar wake dataset with two latent variables. The equivalent energy of the two decomposed fields of the MD-AE, showing the first four POD modes of the data. All POD modes of data are present in both decomposed fields.

Figure 13

Figure 13. The MSE of AEs trained with the unsteady wake dataset with different numbers of latent variables averaged over five repeats each. The error bars represent the standard deviation of the repeats. At $ {N}_z=2 $, the MSE is approximately $ 1.3\times {10}^5 $.

Figure 14

Figure 14. Results from the AE trained with the laminar wake dataset with two latent variables. (a) Phase plot of two latent variables. The unit circle indicates harmonic oscillations. (b) Time trace of the two latent variables. The latent variables are periodic and $ 90{}^{\circ} $ out of phase, behaving the same as the first two data time coefficients. (c) The frequency spectrum of the latent variables, compared to the frequency in the dataset. The variables are normalized by their standard deviation, $ \sigma $, before applying the Fourier transform for visualization.

Figure 15

Figure 15. Contour plots of the first four decoder coefficients of an AE with two latent variables, trained with the laminar wake dataset. The contours show the values of the decoder coefficients. The gray circle labels the values of the latent variables observed during training, which shows the dynamics of the dataset. The images in the last column show the output of the AE at points 1 and 2 labeled on the contour plots.

Figure 16

Figure 16. Results from the AE trained with the laminar wake dataset with two latent variables. The figure shows the average rate of change of the decoder coefficients due to the latent variable i.

Figure 17

Figure 17. The AE trained with the wind-tunnel dataset with two latent variables. Top left: Predicted RMS pressure. Top right: Predicted instantaneous pressure. Bottom left: The premultiplied overall PSD of the prediction. Bottom right: The premultiplied PSD of the latent variables of the AE trained with two latent variables, normalized by their standard deviation.

Figure 18

Figure 18. Same as Figure 17 with three latent variables.

Figure 19

Figure 19. The schematics and training process of the decoder-only network. The decoder has 99% more trainable parameters than the decoder in the $ {N}_z=2 $ AE discussed in Section 7.1.

Figure 20

Figure 20. Left: Predicted RMS pressure of the decoder-only network. Right: The premultiplied PSD of the predicted pressure from the AE with two and three latent variables, and from the large decoder-only network, trained with the wind-tunnel dataset.

Figure 21

Figure 21. AE with different numbers of latent variables and the same hyperparameters, trained with the wind-tunnel dataset. The loss stops decreasing at $ {N}_z\approx 28 $. Figure 22 shows the results from the AE with 28 latent variables. The RMS predicted pressure is in agreement with the reference RMS pressure, and the prediction has PSD that approximates the data’s PSD in terms of both magnitude and frequency content. To understand which data modes are present in the prediction, we define the equivalent energy for an AE with a POD weight matrix, $ {\mathbf{W}}_p $ (Eq. 2.1), as:

Figure 22

Figure 22. RMS predicted pressure and premultiplied PSD of the prediction of the AE trained with the wind-tunnel dataset with 28 latent variables. The network attains an MSE equivalent to the reconstruction with 30 POD modes.

Figure 23

Figure 23. The AE trained with the wind-tunnel dataset with 28 latent variables. (a) Equivalent energy of the predicted pressure compared to the POD eigenvalues of the reference data. (b) The average rate of change of decoder coefficients 1 and 2 due to the latent variables, normalized by the standard deviation of the latent variables. The decoder coefficients 1 and 2 are direct analogies of the data POD time coefficients 1 and 2, which are associated with vortex shedding.

Figure 24

Figure 24. Prediction obtained with the AE with 28 latent variables from the filtered latent variables $ {\mathbf{Z}}_f $ and the reference data.

Figure 25

Figure 25. Premultiplied PSD of the prediction obtained with the AE with 28 latent variables from the filtered latent variables. All peaks (except for $ St\approx 0.2 $) are filtered.

Figure 26

Figure 26. POD on the prediction obtained with the AE with 28 latent variables from the filtered latent variables. (a) Equivalent energy of the filtered prediction $ {\hat{\mathbf{P}}}_f $ compared to the POD eigenvalues of the reference data. Among the five most energetic POD modes, the filtered prediction shows a large amount of energy only in data modes 1 and 2, which is the goal we set. (b) POD modes 1 and 2 of $ {\hat{\mathbf{P}}}_f $, which contain over 99% of the flow energy of $ {\hat{\mathbf{P}}}_f $. These two modes show the same frequency peak at $ St\approx 0.2 $ and have antisymmetric spatial structures. These two modes represent vortex shedding.

Figure 27

Table A.1. The encoder used in all convolutional AEs and MD-AEs

Figure 28

Table A.2. The decoder used in all convolutional AEs and MD-AEs

Figure 29

Table A.3. The encoder used in feedforward AEs

Figure 30

Table A.4. The decoder used in feedforward AEs

Figure 31

Table A.5. The hyperparameters used in all networks

Figure 32

Table A.6. Large decoder used in Section 7.1

Figure 33

Figure 27. Results from the AE trained with the laminar wake dataset with one latent variable. (a) The latent variable approximates the discontinuity caused by the angle moving from $ 2\pi $ to $ 0 $. (b) The frequency spectrum of the latent variable, normalized by its standard deviation, compared with the data frequencies. The latent variables contain frequencies that do not exist in the dataset.

Figure 34

Figure 28. Results from the AE trained with the laminar wake dataset with three latent variables. (a) The time trace of the latent variables. (b) The frequency spectrum of the latent variables, normalized by their standard deviations. The latent variables contain the vortex shedding and the first harmonic frequency. (c) The average rate of change of decoder coefficients due to the latent variables of an AE with three latent variables. Latent variables $ {\mathbf{Z}}_{2,:} $ and $ {\mathbf{Z}}_{3,:} $ have the same contributions toward the first six data modes, meaning that both latent variables carry the same information.

Submit a response

Comments

No Comments have been published for this article.