Active-Learning Reliability Analysis of Automotive Structures Based on Multi-Software Interaction in the MATLAB Environment

: The reliability design of automotive structures is characterized by numerous variables and implicit responses. The traditional design of experiments for metamodel construction often requires manual adjustment of model parameters and extensive finite element analysis, resulting in inefficiency. To address these issues, active learning-based reliability methods are effective solutions. This study proposes an active-learning reliability analysis method based on multi-software interaction. Firstly, through secondary development of different software and MATLAB (version 2023a)’s batch processing function, a multi-software interactive reliability analysis method is developed, achieving automation in structural parametric design, finite element analysis and post-processing. This provides a more efficient and convenient platform for the implementation of active learning. Secondly, the polynomial chaos–kriging (PCK) active-learning method is introduced, combining the advantages of polynomial chaos expansion (PCE) and kriging. The PCK method captures the global behavior of the computational model using regression-based PCE and local variations using interpolation-based kriging. This metamodel is constructed with fewer training samples, effectively replacing the real multi-dimensional implicit response relations, thereby improving the efficiency of modeling and reliability analysis. Finally, the specific implementation scheme is detailed. The accuracy and efficiency of the proposed method are verified by a reliability engineering example of body-in-white bending and torsional stiffness.


Introduction
Due to the continuous development of automotive technology, structural systems are gradually being integrated.Uncertainty issues have also become increasingly complex and diverse, involving multiple covariates and implicit responses.A common approach is to establish a surrogate model through the design of experiments (DOE) for reliability analysis and optimal design.
To improve efficiency, on the one hand, it is necessary to establish an automated analysis platform to achieve tasks such as model parameterization, solving and postprocessing, thereby addressing the problem of inefficiency associated with traditional manual operation.Currently, a variety of software is available for parametric design.For the study of some microscopic stochastic structures, Chen et al. [1] reconstructed the catalyst layer of a proton exchange membrane fuel cell (including non-precious metal catalyst or platinum) with a high-resolution porous structure.Liu et al. [2] parameterized random reconstruction of the fuel cell gas diffusion layer by an ANSYS-SpaceClaim script, improving the efficiency of the repetitive operations.Additionally, for larger structures with more fixed shape characteristics, scholars have conducted research on optimization techniques for structural parameters.Mogullapally et al. [3] employed the HyperStudy (version 2017.2.0) tool and the ANSYS (version 18.1) solver to optimize the weight of the leaf disc.Zhao et al. [4] proposed a parametric modeling method based on the secondary development of Abaqus and designed a plug-in tool for cell structure simulation analysis through a graphical user interface.Wu et al. [5] used SolidWorks and ANSYS Workbench software for secondary development and compiled parametric design software using C# to integrate 3D model design, engineering drawing generation and finite element safety analysis.In addition, LS-OPT (version 6.0) [6] and Isight [7] are also often used to build optimization platforms for structural performance analysis and lightweight design.It is evident that the current commonly used software has parametric design and optimization capabilities.In practical application, suitable methods and software should be selected according to the design requirements.
On the other hand, metamodeling methods are used for reliability analysis.For complex engineering problems, there may be complex nonlinear relationships between the design variables and the responses, which are not explicitly expressed and are black-box problems, or the performance (limit state) functions involve expensive computational problems.Therefore, metamodeling methods are used in practical engineering, and the basic idea is to construct approximate (surrogate) models, i.e., to establish approximate mapping relationships between input variables and output responses by DOE, which play a role in computationally efficient and predictable responses at unknown points.Commonly used surrogate models include the response surface model [8], polynomial chaos expansions (PCEs) [9], kriging [10,11], polynomial chaos-kriging (PCK) [12], machine learning [13,14], support vector machines [15,16] and radial-basis functions [17].Once the surrogate model has been constructed, reliability methods can be used to calculate the failure probability.
In order to reduce the training sample size, active-learning metamodeling methods have been proposed, such as the active-learning reliability method, which combines kriging and Monte Carlo simulation (AK-MC) [18]; the candidate sample set is a large number of samples generated by the MC method, and the evaluation of the learning function occurs in each loop, which affects the computational efficiency.Therefore, some scholars have replaced MC methods with importance sampling (IS) [19], subset simulation (SS) [20] and directional sampling (DS) [21] to form more efficient kriging-based active-learning methods.PCK can also be constructed as an active-learning metamodel [22], which combines the strengths of PCE and kriging, where PCE provides an efficient method for dealing with variability and uncertainty in input parameters, and kriging provides flexibility for modeling complex nonlinear relationships.Therefore, PCK is used in this study to construct an active-learning metamodel.
From the above two aspects, this study proposes an active-learning reliability analysis method based on multi-software interaction, illustrated by conducting bending and torsional stiffness reliability analysis of a body-in-white (BIW) structure.Firstly, the finite element model (FEM) of the BIW is introduced, including design variables, constraints and loads.Secondly, based on the characteristics of the model, a multi-software interactive analysis platform is built in the MATLAB environment, and automated DOE is implemented through secondary development.Finally, the active learning PCK method is introduced to adaptively construct surrogate models and perform the reliability analysis, aiming to improve the efficiency and accuracy of metamodeling and reliability analysis.

Bending and Torsional Stiffness Analysis Model of BIW
The bending and torsional stiffness of the BIW have an important impact on vehicle performance, such as NVH (noise, vibration, and harshness), safety, handling performance and stability.They also affect the degree of lightweighting of the body, which are key parameters in the development process and represent the core competitiveness of the vehicle.The model is from ref. [23], and the pre-processing process of CAE meshing, material properties and constraint boundaries of the model is performed using Hypermesh (version 2019) software, which has about 390,000 cells.The thicknesses of 14 key sheet metal components are considered as the design variables.The FEM and component numbers are shown in Figure 1.The paired components in Figure 1 are annotated on only one side, and the initial values and ranges of the design variables are shown in Table 1.The loads and constraints for the bending and torsion cases are shown in Figure 2a and Figure 2b, respectively, defining the vertical (gravitational) direction of the model as the Z-direction.The forces F b1 , F b2 applied to the sill beams and F t1 , F t2 applied to the shock towers are Z-directed forces (N): F b1 = F b2 = 3336N and F t1 = F t2 = 1177N.For bending conditions, the four restraint positions (SPC1-SPC4) are located on the shock towers; for torsion conditions, the front restraint position (SPC1) is located in the middle of the front bumper frame, and the rear restraint positions (SPC2, SPC3) are located on the antiroll bar brackets.The locations of the observation points are illustrated in Figure 3.Under the bending condition, the maximum deformation (mm) in the Z-direction of the nodes below the left and right sill beams (six observation points are found uniformly on each side) are set to be d L max and d R max , respectively, and, under the torsion condition, the Z-displacements (mm) at the left and right loading points of the shock towers are d L and d R , respectively.Setting d as the distance (mm) between the loading points of the shock towers, the equations of bending stiffness K b and torsional stiffness K t can be obtained: (N/mm) where . Schematic of observation points for bending and torsion conditions.

Batch Methods for MATLAB
Since the responses of bending and torsional stiffness are implicitly related to the thickness variables of key components, one efficient method is to build parametric structural models and to construct an automated analysis platform for DOE.Isight provides visual interfaces and tools to create complex engineering designs that are highly automated through custom components.However, there are some shortcomings in practical application; for example, when building multiple custom functions, the conversion and transmission of data will become complicated.If it is run only in a certain programming software, the operation is more flexible and can ensure data synchronization and consistency.For this reason, this study further summarizes the implementation and features of Isight, as well as two commonly used programming software options-MATLAB (version 2023a) and Python (version 3.11)-for batch processing, as shown in Table 2. Ideal for situations where more advanced processmanagement functions are required, such as interacting with sub-processes, controlling input and output streams and implementing more complex process communications.
In terms of the execution mode, blocking execution means that, when an operation is called, the program will wait for the completion of the operation before continuing to execute the subsequent code, while, in non-blocking execution mode, the program will not wait for the completion of the operation and will continue to execute the subsequent code.Generally, it is necessary to call the results of batch execution by external software, so blocking execution is used.
The functions in Table 2 have different characteristics.The system() and os.system() function are suitable for simple external command execution and return the exit status code of the command, but cannot output or handle errors.The subprocess.run() and subprocess.Popen() function, on the other hand, provide richer functionality.The purpose of this study is to implement batch processing in blocking execution mode, so all of the above functions meet the general requirements.
MATLAB is widely applied in academia due to its powerful arithmetic and programming features in handling matrices and numerical computations, providing rich engineering toolboxes and an interactive development environment.Many uncertainty studies and open-source codes have been implemented based on MATLAB.For example, DACE [24] and ooDACE [25] are commonly used open-source toolboxes for kriging modeling, and a generic MATLAB-based uncertainty quantification framework, UQLab [22], has been developed at ETH Zurich, which includes modules for MC method simulation, sensitivity analysis, reliability analysis, active-learning surrogate modeling and Bayesian inversion.These toolboxes and the framework offer significant inspiration and facilitate programming implementations for uncertainty studies.Therefore, MATLAB is chosen to implement batch processing in this study.
Additionally, using MATLAB for batch processing enhances convenience in function calls and data transfers.Data saving and extraction can be achieved by navigating through different folders.Storing models with varying parameters in distinct directories allows for dynamic changes in the working path, which effectively prevents file overwriting during iterations.This approach greatly improves the flexibility and efficiency of model management.

Automate Tasks with Scripts
The purpose of batch processing is to automate the execution of different software to complete a series of tasks in modeling, pre-processing, finite element analysis and postprocessing.In this study, ANSA (version 23.1.1)software is used to implement model parameterization and post processing, which is a professional finite element pre-processing software that provides powerful parameterization functions.The features of ANSA are as follows: (1) It is easy to modify the model by defining parameters and to quickly generate the models of different variants, avoiding the errors or inconsistencies that may be introduced by manual modification; (2) It integrates a variety of engineering design and simulation software options, such as a finite element solver, optimization software, etc., which provides convenience in model parameter transfer; (3) It supports the combination of script and batch commands, which achieves the automated model modification, improving work efficiency and reducing repetitive work; (4) META module is an important part of ANSA software for model post-processing, results analysis and report generation, which also supports batch operation to automate the analysis and processing of multiple results.
This study uses the 'system()' function in MATLAB to execute the batch command file (.bat).For example, in the case of ANSA batch processing, the MATLAB code can be written as "status = system('ANSA.bat')",where "status" returns the execution status, where 0 denotes successful execution, while other values indicate encountering errors or issues.Throughout the analysis process, ANSA, OptiStruct and META are executed sequentially in batch order, corresponding, respectively, to preprocessing, solving and post-processing.
The ANSA pre-processing requires the execution of a script (.script.ansa), which can be created through the "Task Manager" of ANSA.Select "Optimisation Task" in "Task Manager" to set up the pre-processing procedure, as shown in Figure 4a, including input parameter file (DVFile.txt),design variables and output model (BIW.fem), and then save the current operation as execution script (.script.ansa), which automatically assigns the parameters of DVFile.txt to the design variables of the model and exports the modified model (BIW.fem).
The modified model BIW.fem is solved using Optistruct by simply running the batch file (.bat).In post-processing, the displacements of the observation points are extracted using META.In the bending condition, the maximum deformations of the left and right side sill beams are extracted, and, since the Z-direction displacements are negative, the smallest (most negative) values are taken as the maximum deformations at the observation points, as shown in Figure 4b.In the torsion condition, the Z-direction displacements of the two front shock towers are extracted, as shown in Figure 4c.After the post-processing setup is completed, the execution script file (.ses) and the response file (.ses.results) are exported.Finally, the response results are extracted from the response file (.ses.results) through MATLAB, and the bending and torsional stiffness are calculated through Equation (1).

DOE Analysis
The DOE process and file interactions are shown in Figure 5.The design variables and their respective value ranges are presented in Table 1.MATLAB is used to generate random samples and modify the DVFile.txtsequentially.Next, ANSA modifies the model parameters according to the DVFile.txt.The rest of the process is the same as the previous subsection and is not repeated.BIW involves 14 variables; thus, each sample dimension is 14.In order to make the sample distribution more uniform, this study adopts the Latin hypercube method for sampling, and the initial sample size is set to 20. Figure 6 displays matrix plots of the five variables from t 1 to t 5 ; the diagonal histograms show that the samples are evenly distributed, and the remaining scatter plots show that the samples are distributed in the entire design space without evidence of multi-sample clustering.When the DOE is completed, the main effect values of the 14 design variables on the bending and torsional stiffness responses (K b and K t ) are calculated and normalized.The results are shown in Figure 7: each variable exhibits a different degree of influence on K b and K t .Taken together, it is observed that only t 2 has a smaller effect on both responses, but, for K t , t 2 has more influence than t 6 .Therefore, all 14 variables are considered in the next step of reliability analysis.

Building an Active-Learning-Based Reliability Analysis Platform 4.1. PCK-Based Active-Learning Method
The small initial DOE sample size makes it challenging to establish accurate K b and K t surrogate models.The output responses of each sample need to be solved by calling the FEM.In order to reduce the number of new samples in the DOE, this study further constructs a reliability analysis platform based on active learning.The purpose of active learning is to establish locally accurate limit state function surrogate models through iteration, thereby reducing the sample size and improving efficiency.
The process of active-learning-based reliability analysis and the methods available for each step are shown in Figure 8.The first step is DOE analysis, which has been carried out in the previous section.Further, the metamodels (surrogate models) are built.The next reliability analysis based on the metamodels can be performed by MC, IS, SS, etc.; in this study, the MC method is used for reliability analysis, and the sample size is chosen to be 10 6 .Then, it is determined whether convergence occurs.If yes, modeling is completed; otherwise, the active learning function is used to find the next optimal point, which is added to the DOE sample set and the metamodel is updated until the convergence condition is met.The sample generation method for the initial DOE can be chosen according to the actual requirements.If the simulation is time-consuming and too many samples are not suitable, LHS sampling can be used.If a large sample size is necessary for the analysis, the MC method can be used.Sobol sampling has the advantage of being able to provide a global sensitivity index, which is suitable for exploring the complex relationship between inputs and outputs.Metamodels used for active learning include kriging, PCK and SVR.In this study, PCK is used to build the metamodel, which combines the strengths of PCE and kriging.The kriging method is a stochastic interpolation algorithm in which the estimated function value is a linear combination of a regression model and a stochastic process.Its general form is [26] g

OE
where f T (x)β denotes the regression model, f (x) = [ f 1 (x), f 2 (x), ..., f n (x)] T denotes the vector of regression basis functions, β = [β 1 , β 2 , ..., β n ] T is the vector of regression coefficients and Z(x, ω) is a zero mean, unit variance, stationary Gaussian process, characterized by the correlation function R and its hyperparameter θ.Consider a random vector with independent components x ∈ R n described by the joint probability density function f X .PCE approximates the output of the computational model with a sum of orthogonal polynomials [27]: where Ψ α (x) are multivariate polynomials that are orthonormal with respect to the input distributions, α ∈ A ⊂ N n are multi-indices and y α are the corresponding coefficients.PCK uses regression-based PCE to capture the global behaviour of the computational model and interpolation-based kriging to capture local variations, and its metamodeling technique is more effective than the metamodeling technique produced by PCE and kriging separately, which is expressed as [28] The active-learning function utilizes the U-function proposed by AK-MC [18]: where g(x) and σ g (x) are the mean and standard deviation obtained from kriging estimation.The criterion for convergence is the learning function (LF)-based criterion that needs to be satisfied: This means that the probability of any point in the candidate pool being misclassified is less than Φ(−ϵ U ).In general, ϵ U = 2 is acceptable.The convergence criteria also include variance-based criteria (bounds on P f , bounds on β ) and stability-based criteria (stability on P f , stability on β), where P f and β denote the failure probability and the reliability index.Taking bounds on P f as an example, the expression is as follows: where the three failure probabilities are defined as follows: where k = Φ −1 (1 − α/2); the confidence interval 1 − α/2 = 97.5% is usually set, yielding k = 1.96.In this study, active-learning applications are developed with these two convergence criteria.For more details on other convergence criteria and learning functions in Figure 8, please refer to ref. [22].

Active-Learning Platform Construction and Reliability Analysis
According to the previous subsection, active learning is an iterative process, where each iteration necessitates invoking the PCK metamodel and the learning function, and then solving the FEM.Therefore, the PCK metamodel function and the learning function are established in MATLAB, which are convenient to be called at any time.Iterations are facilitated by the "while" function.The active learning process with multi-software interaction is shown in Algorithm 1.The sample size in step 2 can be set to 10 6 ; steps 6-8 are automated batch processing of multi-software, where step 6 is pre-processing using ANSA to modify the model parameters to X opt , step 7 is solving using OptiStruct and step 8 is post-processing using META to export the response file.In step 13, the reliability analysis is performed based on the PCK metamodel.If the LF-based convergence criterion is used, the failure probability can be calculated after the metamodel update is complete.
Algorithm 1 can be used as an active-learning reliability analysis platform, which is used to analyze the reliability of the bending and torsional stiffness of the BIW.The iterative process of the LF-based (U-learning function) convergence condition is illustrated in Figure 9.The initial DOE sample size is 20.Initially, the metamodels for bending and torsional stiffness are established.The error in the torsional stiffness metamodel is statistically found to be larger than in the bending stiffness metamodel, so the activelearning reliability analysis is firstly carried out for torsional stiffness, and the convergence condition is reached after iterating nine samples.Subsequently, 29 samples are used as initial samples to analyze the bending stiffness.After iterating through 2 additional samples, convergence is achieved, totaling 11 new samples used in the process.
Algorithm 1 Active-learning reliability analysis algorithms for multi-software interaction.
Input: The initial DOE samples X init , and the corresponding response Y init Output: PCK metamodel; failure probability P 1: Build the initial PCK metamodel using X init and Y init 2: Generate samples X using the MC method and compute U(X) Updating PCK metamodel using X all and Y all 12: Perform step 2 to generate new samples X and compute U(X) 13: Calculate P 0 f , P + f and P − The iterative process based on bounds on P f is shown in Figure 10.The initial sample size is still 20; after adding 47 new samples, the metamodel of torsional stiffness reaches convergence, and, using these 67 samples as the initial samples to update the metamodel of bending stiffness, as can be seen from Figure 10b, the accurate metamodel is established with only 1 new sample.The U-learning function is used as the convergence criterion and is not constrained by variance-based criteria (bounds on P f ).As a result, although the error interval of the failure probability does not converge effectively, it remains within approximately 10%, meeting the general accuracy requirement and reducing the number of iterations.
Without the application of active learning, HyperStudy suggests conducting a DOE with 132 samples.Following the DOE, response surfaces are constructed.The R-square (coefficient of determination) for bending and torsional stiffnesses are 0.9998 and 0.9997, respectively, indicating high accuracy.Reliability analysis is performed using the MC method, and the average of the 20 simulations is used as the benchmark value for the failure probability of each response.The results are shown in Table 3.The failure probability of the bending stiffness P b is 1.53 × 10 −4 , and the failure probability of the torsional stiffness P t is 3.33 × 10 −4 .The results of the PCK metamodel are close to these, which verifies the accuracy and efficiency of the scheme in this paper.Minimizing the number of training samples through active learning avoids the waste caused by too many samples, and also avoids the possible accuracy degradation caused by an insufficient number of samples.However, the sample size required may vary relatively widely with different convergence criteria, and the appropriate convergence criterion needs to be selected by weighing accuracy and efficiency in practical applications.To further examine the stability of active learning, taking torsional stiffness as an example, the initial sample is set to 30, and the iterative process under different random seeds is shown in Figure 11.It can be observed that different random seeds lead to different initial samples, resulting in variations in the number of iterations and reliability results.Figure 9a and Figure 11a share the same random seed, but, due to different initial sample sizes, they also yield different numbers of iterations and reliability results.Despite these differences, the results generally fall within controllable ranges.

Conclusions
(1) This study proposes a multi-software interaction approach for active-learning reliability analysis, using BIW as a case study, to address the multi-dimensional implicit response relationships and time-consuming computational costs.MATLAB programming and secondary development are used to achieve multi-software interaction and automate of pre-processing, solving and post-processing tasks, thereby minimizing manual interventions and enhancing efficiency.Subsequently, the PCK active-learning method is introduced to establish locally accurate surrogate models and reduce the number of DOE training samples.Active learning required 31 samples using the LF-based criterion and 68 samples with the bounds on P f criterion.The resulting failure probabilities are consistent with those obtained using the response surface method with 132 samples.This significantly reduces the sample size, thereby minimizing computational demands and further improving efficiency, specifically by reducing the number of finite element simulations required.Therefore, this method not only improves the design efficiency, but also provides an interactive modeling framework that is easy to understand and apply, enabling the rapid application of the technology to real-world engineering problems.This is conducive to promoting the innovation and development of automotive structural design, and brings tangible value to the field of engineering design; (2) The efficiency and accuracy of active learning may be affected by a number of factors, such as the initial sample size, random seed, convergence criterion and degree of nonlinearity.Among these factors, the initial sample size and convergence criterion are easier to control.Therefore, during application, continuous practice is needed to balance the efficiency and accuracy by adjusting the initial sample size and convergence criteria; (3) In terms of uncertainty quantification, as engineering problems become increasingly complex, future research can further explore and develop in the following three aspects.Firstly, intelligent parameter design needs to be enhanced to improve the stability and validity of models as parameters change.This will simplify the system design process and improve adaptability for various engineering applications.Secondly, capabilities for secondary software development need to be strengthened to improve flexibility and scalability.This will help provide tailored solutions for engineering analysis and meet the different needs of users.Finally, reliability methods need to be continuously refined and improved to address potential challenges and shortcomings for engineering applications, including how to improve efficiency and robustness when addressing multi-dimensional and nonlinear implicit response issues.

Figure 1 .
Figure 1.Key components of the BIW finite element model.

Figure 4 .
Figure 4. Pre-and post-processing: (a) ANSA pre-processing process; (b) Extracting the maximum value of displacement under bending conditions; (c) Extracting the displacements of the damping tower under torsional conditions.

f 14 :Figure 9 .
Figure 9. Iterative process of LF-based convergence criterion: (a) Active-learning iterative process for torsional stiffness; (b) Active-learning iterative process for bending stiffness.

Figure 10 .
Figure 10.Iterative process based on the bounds on P f convergence criterion: (a) Active-learning iterative process for torsional stiffness; (b) Active-learning iterative process for bending stiffness.

Figure 11 .
Figure 11.Iterative process for torsional stiffness with 30 initial samples: (a) The random seed is set to 1; (b) The random seed is set to 2.

Table 1 .
Design variables and probability distribution characteristics.

Table 2 .
Batch processing methods and features.
3: X all ← X init ; Y all ← Y init 4: while The convergence criterion is not satisfied do X all ← [X all ; X opt ]; Y all ← [Y all ; Y opt ]

Table 3 .
Comparison of results between the response surface method and active-learning method.