Controlled time series generation for automotive software-in-the-loop testing using GANs

Dhasarathy Parthasarathy,Karl Bäckström,Jens Henriksson,Sólrún Einarsdóttir
DOI: https://doi.org/10.48550/arXiv.2002.06611
2020-02-18
Abstract:Testing automotive mechatronic systems partly uses the software-in-the-loop approach, where systematically covering inputs of the system-under-test remains a major challenge. In current practice, there are two major techniques of input stimulation. One approach is to craft input sequences which eases control and feedback of the test process but falls short of exposing the system to realistic scenarios. The other is to replay sequences recorded from field operations which accounts for reality but requires collecting a well-labeled dataset of sufficient capacity for widespread use, which is expensive. This work applies the well-known unsupervised learning framework of Generative Adversarial Networks (GAN) to learn an unlabeled dataset of recorded in-vehicle signals and uses it for generation of synthetic input stimuli. Additionally, a metric-based linear interpolation algorithm is demonstrated, which guarantees that generated stimuli follow a customizable similarity relationship with specified references. This combination of techniques enables controlled generation of a rich range of meaningful and realistic input patterns, improving virtual test coverage and reducing the need for expensive field tests.
Machine Learning
What problem does this paper attempt to address?
### What problem does this paper attempt to solve? This paper aims to solve the problem of input stimulus generation in automotive software - in - the - loop (SIL) testing. Specifically, the paper addresses the following two main challenges: 1. **Limitations of existing technologies**: - **Manually - designed input sequences**: Although they can precisely control and feed back the testing process, it is difficult to cover complex situations in real - world scenarios. - **Replaying data recorded from real vehicles**: It can reflect real - world situations, but it requires collecting a large number of well - annotated data sets, which is costly and difficult to obtain comprehensive coverage. 2. **Improving virtual test coverage and reducing the need for expensive real - vehicle testing**: - The two existing methods (manual design and replaying real - vehicle data) both have their own limitations and cannot simultaneously ensure the authenticity and economy of the test. Therefore, a new method is needed to generate input stimuli that are both realistic and controllable. ### Solution To solve the above problems, the authors propose a method based on generative adversarial networks (GANs), combined with variational autoencoders (VAEs), for generating synthetic time - series signals. The main contributions of this method include: - **VAE/GAN model**: Used to generate synthetic vehicle signal sequences for SIL testing. - **Generation method based on similarity measurement**: Ensure that the generated stimuli have measurable similarity with the reference stimuli, thereby increasing the chances of finding defects. - **Customized generation method**: By adjusting the similarity measurement parameters, fine - control of the generated stimuli can be achieved. The combination of these techniques enables researchers to generate rich, diverse, meaningful, and realistic input patterns in SIL testing, thereby improving the coverage of virtual testing and reducing the need for expensive real - vehicle testing. ### Mathematical formula representation To more clearly describe the key formulas involved in the model training and evaluation process, the following are several important formulas presented in Markdown format: - **GAN loss function**: \[ L_{\text{GAN}}=\log(\text{Disc}(x))+\log(1 - \text{Disc}(\text{Gen}(z))) \] - **VAE reconstruction error**: \[ L_{\text{elem}} = -\mathbb{E}_{q(z|x)}[\log \bar{x}] \] - **VAE prior loss**: \[ L_{\text{prior}}=-\mathbb{E}_{q(z|x)}[\log(p(x|z))] \] - **Loss of the \( l \) - th layer of the discriminator**: \[ L_{\text{Dis}^l}=-\mathbb{E}_{q(z|x)}[\log p(\text{Disc}^l(x)|z)] \] - **Composite loss function**: \[ L = \beta L_{\text{prior}}+\gamma L_{\text{Dis}^l}+L_{\text{GAN}} \] - **Composite metric \( Msr \)**: \[ Msr(x_2,\bar{x})=\kappa\cdot\text{SSIM}(x_2,\bar{x})+(1 - \kappa)\cdot R(x_2,\bar{x}) \] where the roughness metric \( R(a, b) \) is defined as: \[ R(a, b)=\frac{\sum_{i = 0}^{N - 1}|b_{i + 1}-b_i|}{\sum_{i = 0}^{N - 1}|a_{i + 1}-a_i|} \] Through these formulas, the paper details how to use GANs and VAEs together.