A Machine-Learning-Based Software for the Simulation of Regional Characteristic Ground Motion

: Ground-motion simulations provide input time history data required for designing and assessing structures; however, the simulations conducted by the currently available tools only match the design spectrum without verifying if the statistical characteristics of the spectrum and duration are satisﬁed. A ground-motion simulation software was developed to resolve these issues. The developed software employs machine learning methods to match the amplitude, spectrum, and duration features of the target region. Principal component analysis is employed to extract features from the actual ground-motion database to detect characteristic ground motions and predict the target acceleration amplitude, response spectrum, and duration, based on the response spectrum and duration prediction equations. The results show that the simulated ground motion can match the amplitude, spectrum, and duration characteristics well. Therefore, the simulated ground motion can provide more reasonable input for the structure. Moreover, the developed software provides visualization functions that enable the user to determine the target area and obtain the amplitude ﬁeld intuitively.


Introduction
The time-history analysis method is an important tool for calculating the response of structures under earthquakes.However, time-history analysis relies on reliable groundmotion inputs.In general, there are two types of ground motion-the real ground-motion records obtained by seismic stations in the advent of earthquakes, and synthetic ground motion.Real ground motions are obtained from the ground-motion database [1], whereas several methodologies are employed to obtain synthetic ground motions [2,3].Many factors affect the structural response (e.g., load uncertainty, structural material, and construction quality), among which load uncertainty has the highest influence [4,5], and ground-motion input (as an important part of the structural load input) has a considerable effect.
In practice, recorded ground motions are preferred over synthetic ground motions [6].This is because the synthetic ground motions according to some criteria (e.g., control spectra, etc.) are different from the recorded ground motions to some extent.However, the lack of recorded ground motion makes it impossible to select a suitable record.Therefore, it is important to synthesize reliable and reasonable ground motion for time-history analysis [2].
Ground-motion-synthesis methodologies have been developed for many years, and several researchers have proposed different methods to simulate ground motions based on different principles.Currently, ground-motion-simulation methods are divided into three categories: (1) Ground-motion simulation based on the stochastic method; (2) physicsbased ground-motion-simulation methods; and (3) hybrid simulated ground motions [3,[7][8][9][10][11]. Numerous techniques for simulating ground motion are currently under investigation [12][13][14][15][16][17].For example, Ref. [18] simulated ground-motion time series at uninstrumented sites using a gaussian process regression.They estimated the time series at a site based on observed ground motions at surrounding sites, and the method can be used for estimating and understanding causes of earthquake damage at uninstrumented sites.The amplitude, spectrum, and duration simultaneously constrain the ground motions.Currently, the most widely used method in engineering is ground-motion synthesis with matching target response spectrum.However, this synthesis method cannot obtain a unique ground-motion time history.Therefore, a multicriteria objective function for ground motion is proposed.Seismic event parameters, target spectra (Sa, haz(T)), target intensity measures (IMs) for a specific site, structure of interest, and other conditions are investigated to simulate more reasonable ground motion [19][20][21][22][23][24][25][26][27][28][29][30][31].The energy of seismic waves recorded at a station is related to the strong motion part of the recorded ground motion.For a given acceleration a(t), velocity v(t), or displacement d(t), Ref. [29] defined the strong motion part of the recorded ground motion as the fast-growing region of the integral, where f(t) is any of a(t), v(t), or d(t).The time interval at which the maximum contribution of this integral occurs is defined as the strong motion duration.Ref. [29] defined the 5-95% time interval as the ground-motion duration.Therefore, it is commonly used in seismic hazard analysis [18,19].However, this is not reflected in the simulation method.In addition, there are regional differences in the amplitude, spectrum, and duration of ground motions due to geological formations [26].When simulating ground motions using the machine learning method, it is essential to consider the regional characteristics of the location of interest.To ensure accurate results, it becomes necessary to constrain the amplitude, spectrum, and duration as the main control factors.By carefully adjusting these parameters, the simulation can better capture the specific ground-motion characteristics relevant to the location under study.
Thus far, researchers have developed ground-motion-selection software or frameworks based on different methods [27][28][29]; however, procedures for developing ground motion simulations using advanced methodologies are lacking.Although some methods have been proposed for synthesizing ground-motion records that meet some of the statistical characteristics, the current theoretical approach does not consider user-oriented applications [31].The current user-oriented ground-motion simulation records cannot meet user requirements for more accurate acceleration time history records.The user-friendly interface and visualization allows users to focus on other aspects of their research, and software or plug-ins have been developed to facilitate their use [32].Thus, it is necessary to develop user-friendly software that provides a graphical user interface (GUI) with visualization functions and applies a more rational and advanced ground-motion methodology [33][34][35].
Machine learning methods have been successfully applied in various fields in recent years [36].The proposed software employs a machine learning synthesis method based on an actual ground-motion database that not only matches the target response spectrum, but also ensures constraints on the duration using constraints.This resolves the significant variations in the input response caused by the diversity of the matching results mentioned above.This method first extracts the characteristic ground motions from the actual ground-motion database using principal component analysis (PCA), and then matches the amplitude, spectrum, and duration.To determine the most reasonable ground motions, the extracted characteristic ground motions are combined using a multi-objective genetic algorithm known for its successful application in numerous studies [37].This algorithm efficiently determines the optimal solution by considering multiple constraints, enabling the linear combination of the extracted characteristic ground motions.The software is a MATLAB-based application that clearly identifies target areas based on engineering parameters provided by researchers and engineers, obtains amplitude fields visualized at different periods, and generates acceleration time history records on demand, which enables researchers to focus on subsequent research.This paper introduces ground-motion simulation methodology used by the software and demonstrates its application.

Methods for Ground-Motion Simulation
Ref. [38] was the first to carry out the work on ground-motion simulation.Subsequently, there has been long-term development of ground-motion simulation methods and theories.Deterministic methods are mainly applied to simulate the low-frequency components of ground motion, and stochastic methods are proposed to simulate the highfrequency components of ground motion [39].Hybrid simulation methods combine the advantages of both deterministic and stochastic simulations, and can simulate a wide range of earthquakes [40].However, the deterministic approach requires a hypocenter model [41].The stochastic and hybrid simulation methods also require parameters specific to the target region, such as stress drop, local site effects, etc. [9].Therefore, simulating ground motion remains a huge challenge.With the increasing number of modern seismic stations and the development of seismic monitoring and ground motion databases-which are now becoming increasingly abundant-a large amount of data is bound to provide a wealth of information for research.Owing to the large amount of data, it is important to determine how to use these data.A regional ground motion field is obtained by applying machine learning methods with user-requested scenario parameters (e.g., magnitude, epicenter distance, latitude, and longitude).
The program applies a ground-motion simulation method based on the database of actual time-history records by applying machine learning PCA for extracting characteristic ground motions and combining them with a genetic algorithm to determine the optimal solution.First, ground motion records in the database are extracted by PCA to obtain the characteristic ground motions that represent the characteristics in the target area.The extracted characteristic ground motions are independent of each other, and they are linearly combined to simulate ground motions.The linear combination coefficients are unknown.The synthesized ground motions require the simultaneous matching of the response spectrum with both the target response spectrum and the target duration characteristics.A multi-objective genetic algorithm is applied for using these two matching relationships as constraints to solve for the combination coefficients that meet the evaluation criteria.The simulation process is illustrated in Figure 1.
different periods, and generates acceleration time history records on demand, which en bles researchers to focus on subsequent research.This paper introduces ground-moti simulation methodology used by the software and demonstrates its application.

Methods for Ground-Motion Simulation
Ref. [38] was the first to carry out the work on ground-motion simulation.Sub quently, there has been long-term development of ground-motion simulation metho and theories.Deterministic methods are mainly applied to simulate the low-frequen components of ground motion, and stochastic methods are proposed to simulate the hig frequency components of ground motion [39].Hybrid simulation methods combine t advantages of both deterministic and stochastic simulations, and can simulate a wi range of earthquakes [40].However, the deterministic approach requires a hypocen model [41].The stochastic and hybrid simulation methods also require parameters spec to the target region, such as stress drop, local site effects, etc. [9].Therefore, simulati ground motion remains a huge challenge.With the increasing number of modern seism stations and the development of seismic monitoring and ground motion databases which are now becoming increasingly abundant-a large amount of data is bound to p vide a wealth of information for research.Owing to the large amount of data, it is i portant to determine how to use these data.A regional ground motion field is obtain by applying machine learning methods with user-requested scenario parameters (e magnitude, epicenter distance, latitude, and longitude).
The program applies a ground-motion simulation method based on the database actual time-history records by applying machine learning PCA for extracting character tic ground motions and combining them with a genetic algorithm to determine the op mal solution.First, ground motion records in the database are extracted by PCA to obta the characteristic ground motions that represent the characteristics in the target area.T extracted characteristic ground motions are independent of each other, and they are lin arly combined to simulate ground motions.The linear combination coefficients are u known.The synthesized ground motions require the simultaneous matching of the sponse spectrum with both the target response spectrum and the target duration char teristics.A multi-objective genetic algorithm is applied for using these two matching re tionships as constraints to solve for the combination coefficients that meet the evaluati criteria.The simulation process is illustrated in Figure 1.

PCA for Extracting Ground Motions
The sheer volume of data in the ground-motion database and the potential correlation between individual datum makes the data difficult to process.First, the characteristics of the ground-motion data in the database need to be extracted and processed (i.e., dimensionality reduction of the data).There are many methods of data dimensionality reduction in machine learning: PCA, linear discriminant analysis (LDA), locally linear embedding (LLE), and so on.However, LDA is a supervised dimensionality reduction algorithm; the stream shape learned by LLE can only be unclosed, and the sample set is dense and uniform.PCA, as an unsupervised dimensionality reduction algorithm, is easier to use and less demanding on data.
We use PCA to obtain the reduced-dimensional characteristics from the ground-motion database, calling them characteristic ground motions.Specifically, we use PCA to reduce the dimensionality of the entire accelerated ground-motion record and to obtain a time series of data similar to the accelerated ground motion.It should be noted that PCA uses the ground shaking database of the target region to reflect the regional characteristics of the synthetic ground motion.For areas lacking ground-motion records, ground motion from areas with similar earthquake sources, propagation paths, and site conditions can be selected as ground-motion data.
The application of the PCA algorithm for dimensionality reduction of the groundmotion dataset involves the following process: Dataset X needs to be reduced to k dimensions, where X is a matrix of n rows and m columns.The m represents the ground-motion durations, and 'n' stands for the number of x 11 , x 12 , x 13 , . . ., x 1m ; x 21 , x 22 , x 23 , . . ., x 2m . . .
(1) Centralize all samples according to Equation (1); i.e., each bit of the feature minus its respective mean.
(2) Calculate the covariance matrix of sample C, C = 1 n X T X (3) Determine the eigenvalues and eigenvectors of the covariance matrix via the eigenvalue decomposition of the matrix covariance matrix.
The eigenvalues are sorted from the largest to the smallest, and the largest k values are selected.The corresponding k eigenvectors are used as row vectors to form the eigenvector matrix P.
The centralized data matrix is transformed into a new space constructed by k eigenvectors, i.e., Y = PX, which in turn yields new orthogonal feature ground motion data.
The selection of dimension K, representing the number of characteristic ground motions after dimensionality reduction, can be determined based on the scatter matrix S generated during singular value decomposition.Equation ( 2) can be used to calculate the minimum value of K that satisfies the error condition.If the value of t is 0.15, then it indicates that the PCA algorithm retains 85% of the main information from the original data.Consequently, the minimum number of characteristic ground-shaking that can be extracted under this allowable error can be determined.The specific value of t can be determined according to the requirements for the error; therefore, different K values can be selected.
Multiple characteristic ground motions that are independent of each other can be obtained by applying the abovementioned PCA method to the actual ground-motion records.The characteristic ground motions and actual ground-motion records in the database shared the same sampling rate.As a result, it is possible to synthesize the target ground motions by combining the characteristic ground motions in a linear manner and determining the combination coefficients that dictate their blending.The linear combination is a vector synthesis of the characteristic ground-motion vectors multiplied by scaling coefficients.The characteristic ground motions are linearly combined as Equation ( 3) where k i , a i , and q denote the coefficient, extracted characteristic ground motion, and number of extracted characteristic ground motions, respectively.The characteristic ground motions are eigenvectors composed of data matrices, which are then sorted according to the size of the eigenvalues.

Optimization of Coefficients Using NSGA-II
A genetic algorithm is applied because it is necessary to determine the combination coefficients in Equation (3).The simulating method employed in this procedure takes into account both the matching of the target response spectrum and the target duration, which are obtained from the ground-motion-duration model.This approach differs from the traditional method that only considers matching the target response spectrum based on the prediction equation of the ground-motion-response spectrum.Since it involves multiple constraints and requires solving multiple equations, the conventional singleobjective optimization algorithm is no longer applicable, and the computational effort becomes significant.Therefore, the elitist nondominated sorting genetic algorithm NSGA-II is utilized [42].This algorithm effectively balances the relationship between each objective function, resulting in an optimal solution set that maximizes the performance of each subobjective function.This approach differs from single-objective optimization and offers a unique solution.Consequently, the solution to the multi-objective optimization problem comprises a set of equilibrium solution sets.
The algorithm uses fast dominant sorting to minimize the complexity of the algorithm and volume of operations.Furthermore, it replaces the fitness-sharing strategy via crowding and crowding comparison operators to perform a peer comparison of the results after fast sorting such that the individuals in the Pareto solution can be evenly extended to the whole domain, and the diversity of the population is preserved.Among them, the banded elite strategy expands the sample by combining the parent and child populations to ensure that better individuals can be retained.

Control Conditions of the Synthesis Coefficient
A well-matched ground motion is defined as a ground motion with a minimum error in the response spectrum constraint and a minimum error in the duration constraint.The mean absolute error (MAE) is used to match the response spectra of the synthesized ground motions with the target spectrum.We used MAE as the error because it is a more common and straightforward error compared to other errors [43].Equation (4) introduces the constraint equation for the response spectrum.
where E 1 refers to the MAE between the response spectra of the synthesized ground motions and the target spectrum, S * a T j represents the target response spectrum obtained from the ground-motion prediction equation in the target area, and T j indicates the selected self-oscillation period control point in the spectral matching process.m is the number of response spectrum period points.Furthermore, S a ∑ n j = 1 k i a i , T i represents the response spectrum calculated from the new time-history records obtained by a linear combination of the extracted characteristic ground motions, where ∑ n i = 1 k i a i represents the new timehistory record obtained by multiplying the extracted N characteristic ground motions by their respective coefficients.
The simulating method applied by the software considers not only the amplitude and frequency spectrum reflected by the ground-motion response spectrum, but also the parametric characteristics of the duration, which is an important parameter of ground motions.As the structure undergoes nonlinearization, the probability of permanent deformation increases with longer durations due to the cumulative effect of earthquakes.Therefore, ground-motion duration is a very important constraint.It is necessary to obtain a reasonable prediction of the ground-motion duration and select the ground-motion duration prediction equation suitable for the target area.The constraint equation for the duration is introduced as Equation ( 5).
where d 5-95 denotes the target ground-motion duration time (different types of duration definitions can be selected, and this paper considers a 5-95% significant duration as an example to introduce the method).The new synthetic ground-motion duration is recorded as D 5-95 .

Validation of Methods
An earthquake of magnitude Ms6.0 occurred at 28.34 • N 104.90 • E, located in Changning County, Yibin City, southeastern Sichuan Province, China, on 17 June 2019.In this study, the ground-motion database was created by collecting the mainshock of the Changning earthquake and aftershock records of magnitude 4 or higher that occurred between June 17 and 24.The specific earthquake information is summarized in Table 1.The epicenter, station locations, and the intensity distribution of the mainshock in Changning are illustrated in Figure 2a; the epicenter and source mechanism of the selected main aftershock are illustrated in Figure 2b.The database contains 9 earthquakes with a total of 286 horizontally oriented seismic records, and raw ground-motion data are filtered and baseline adjusted [44].The feasibility of the synthesis method is verified by simulating the Changning earthquake.The Changning earthquake was selected as the scenario, and the target response spectrum and duration were calculated to validate the method.

Extraction of Characteristic Ground Motion
The PCA was applied to extract the characteristic ground motion in the mainshock and aftershock databases of Changning.The number of extracted characteristic ground motions was calculated according to Equation (2) to determine the number of extracted characteristic ground motions.In this study, t is set to 0.05, i.e., we expect the obtained extracted characteristic ground motion to retain 95% of the main information in the dataset.The minimum K value that satisfied the error condition was 11.The top 11 waves were extracted from the database and ranked according to the percentage of retained information for the subsequent synthesis of ground motion.Table 2 summarizes the percentage of information retained in the original database for each extracted ground motion, and Figure 3 shows the time and frequency analysis of the top eight characteristic ground motions.The extracted ground motion has similar nonstationary characteristics to the actual ground-motion recordings in the time and frequency domains, which makes the characteristic ground motions suitable as a set of basis vectors for ground-motion synthesis.

Extraction of Characteristic Ground Motion
The PCA was applied to extract the characteristic ground motion in the mainshock and aftershock databases of Changning.The number of extracted characteristic ground motions was calculated according to Equation (2) to determine the number of extracted characteristic ground motions.In this study, t is set to 0.05, i.e., we expect the obtained extracted characteristic ground motion to retain 95% of the main information in the dataset.The minimum K value that satisfied the error condition was 11.The top 11 waves were extracted from the database and ranked according to the percentage of retained information for the subsequent synthesis of ground motion.Table 2 summarizes the percentage of information retained in the original database for each extracted ground motion, and Figure 3 shows the time and frequency analysis of the top eight characteristic ground motions.The extracted ground motion has similar nonstationary characteristics to the actual groundmotion recordings in the time and frequency domains, which makes the characteristic ground motions suitable as a set of basis vectors for ground-motion synthesis.

Validation of Ground-Motion Prediction Equation and Constraints
The Changning earthquake in Sichuan occurred in the western part of China; therefore, it is necessary to select a ground-motion model for western China that is suitable for this region and a ground-motion duration prediction equation based on a strong groundmotion database in China [45].The target response spectrum and target duration groundmotion models were calculated using the response spectrum and duration, respectively, as the constraints for ground-motion synthesis of the Changning earthquake by se ing the earthquake scenario.The specific forms of the selected response spectrum groundmotion model and the ground-motion duration model are shown as Equations ( 6) and (7).
= 0.1561 + 0.3647 + (0.4958 − 0.0145 ) + 2.5 − 0.1784 ln 30, where Sa(T) is the response spectrum, Ms is the surface wave magnitude, Rrup is the rupture distance, and D5-95 is the ground-motion duration.Vs30 is the shear wave velocity at 30 m below ground, representing the site conditions, and the value of our target site Vs30 is 302 m/s. Figure 4a-d shows the comparison of the response spectra of the Changning earthquake records at three period points (0.01 s, 0.20 s, and 1.00 s) with the a enuation curves obtained from the corresponding ground-motion models.The figures also show the comparison of the 5-95% significant duration of the actual ground-motion data with the predicted values obtained from the duration prediction equation.The two chosen groundmotion models have the capability to predict the actual ground-motion characteristics of the region and demonstrate the validity of the selected synthetic constraints, including the target response spectrum and duration.It is important to mention that two independent GMPEs are used in this paper.However, it is more reasonable to use the generalized conditioning intensity measure (GCIM) or generalized ground-motion prediction model (GGMPM) models, which can provide realistic targets to validate the simulation.

Validation of Ground-Motion Prediction Equation and Constraints
The Changning earthquake in Sichuan occurred in the western part of China; therefore, it is necessary to select a ground-motion model for western China that is suitable for this region and a ground-motion duration prediction equation based on a strong groundmotion database in China [45].The target response spectrum and target duration groundmotion models were calculated using the response spectrum and duration, respectively, as the constraints for ground-motion synthesis of the Changning earthquake by setting the earthquake scenario.The specific forms of the selected response spectrum ground-motion model and the ground-motion duration model are shown as Equations ( 6) and (7).
where Sa(T) is the response spectrum, M s is the surface wave magnitude, R rup is the rupture distance, and D 5-95 is the ground-motion duration.V s 30 is the shear wave velocity at 30 m below ground, representing the site conditions, and the value of our target site V s 30 is 302 m/s. Figure 4a-d shows the comparison of the response spectra of the Changning earthquake records at three period points (0.01 s, 0.20 s, and 1.00 s) with the attenuation curves obtained from the corresponding ground-motion models.The figures also show the comparison of the 5-95% significant duration of the actual ground-motion data with the predicted values obtained from the duration prediction equation.The two chosen ground-motion models have the capability to predict the actual ground-motion characteristics of the region and demonstrate the validity of the selected synthetic constraints, including the target response spectrum and duration.It is important to mention that two independent GMPEs are used in this paper.However, it is more reasonable to use the generalized conditioning intensity measure (GCIM) or generalized ground-motion prediction model (GGMPM) models, which can provide realistic targets to validate the simulation.

Validation of Synthetic Ground Motion
We used the method in this study to synthesize a ground motion and match it w record selected from the real ground-motion database to verify the feasibility of the thesis method and to verify if the matching results are reasonable.One station in Changning earthquake, i.e., 51NXT, was arbitrarily selected, and the specific ground-s ing information is as listed in Table 3.The synthesis was conducted based on this met and the matching effect of the synthesized peak ground acceleration, response spectr and duration with the real ground-motion records, is also summarized in Table 3. matching effect and error distribution of the synthesized ground motion and actual mic records are illustrated in Figure 5.In Figure 5b, the horizontal and vertical axes resent the error values between the response spectrum and the holding time of the thetic ground shaking, and between the response spectrum and the target values obta from the ground-shaking model, respectively.These error values are calculated u Equations ( 4) and (5).Each sca er in the distribution of the figure represents a set of li combination coefficients of waves in the optimal solution set, whereas the red sca er resents the finalized combination coefficients under the judging criteria.The synth ground motion in Figure 5a,c shows the result of the linear combination of waves obta using the corresponding combination coefficients of the sca er.Peak ground accelerat and response spectra of the synthetic ground motion are well matched with the ac

Validation of Synthetic Ground Motion
We used the method in this study to synthesize a ground motion and match it with a record selected from the real ground-motion database to verify the feasibility of the synthesis method and to verify if the matching results are reasonable.One station in the Changning earthquake, i.e., 51NXT, was arbitrarily selected, and the specific groundshaking information is as listed in Table 3.The synthesis was conducted based on this method, and the matching effect of the synthesized peak ground acceleration, response spectrum, and duration with the real ground-motion records, is also summarized in Table 3.The matching effect and error distribution of the synthesized ground motion and actual seismic records are illustrated in Figure 5.In Figure 5b, the horizontal and vertical axes represent the error values between the response spectrum and the holding time of the synthetic ground shaking, and between the response spectrum and the target values obtained from the ground-shaking model, respectively.These error values are calculated using Equations ( 4) and (5).Each scatter in the distribution of the figure represents a set of linear combination coefficients of waves in the optimal solution set, whereas the red scatter represents the finalized combination coefficients under the judging criteria.The synthetic ground motion in Figure 5a,c shows the result of the linear combination of waves obtained using the corresponding combination coefficients of the scatter.Peak ground accelerations and response spectra of the synthetic ground motion are well matched with the actual records; more importantly, 90% of the significant duration of the synthetic ground shaking is matched perfectly with the actual records, and the duration of synthetic earthquakes is controlled to the target level of the regional duration prediction model.This method allows the synthesis of ground motion considering constraints of the regional groundmotion prediction model; they can be used for the construction of a regional set and a ground-shaking time field for engineering structure input.motion prediction model; they can be used for the construction of a regional set and a ground-shaking time field for engineering structure input.

Architecture of Software
The software has three modules: (1) parameter input, (2) visualization, and (3) calculation history time record.Simulating ground motions require the user to provide parameters for engineering demand.The program functions as a black box, requiring only user-provided parameters to yield results.For instance, regional ground-motion time-history records that meet the user's requirements can be input into the program.This eliminates the need for users to delve into the program's execution details, allowing them to concentrate on other aspects.Initially, users can utilize the software's area module to mark the epicenter and target area accurately and distinctly on the map, facilitating quick determination of the target area and enhancing user experience.Subsequently, within the field simulation module, users can swiftly obtain the amplitude field for each period in the target area by inputting parameters, enabling clear observation of period amplitudes and intuitive judgments.Ultimately, the program can be employed to precisely calculate historical time records for further research.Figure 6 shows the architecture of the proposed procedure.
Appl.Sci.2023, 13, x FOR PEER REVIEW 11 of 18 the need for users to delve into the program's execution details, allowing them to concentrate on other aspects.Initially, users can utilize the software's area module to mark the epicenter and target area accurately and distinctly on the map, facilitating quick determination of the target area and enhancing user experience.Subsequently, within the field simulation module, users can swiftly obtain the amplitude field for each period in the target area by inpu ing parameters, enabling clear observation of period amplitudes and intuitive judgments.Ultimately, the program can be employed to precisely calculate historical time records for further research.Figure 6 shows the architecture of the proposed procedure.

Parameter Input Module
Scenario construction for the ground motion needs the user to propose requirements and determine the demand parameters.The user is first required to determine the magnitude of the earthquake and the location of the epicenter, and then to determine other parameters such as latitude and longitude, Vs30, and rupture angle of the target area.The input parameter module was entered through the panel in Figure 7a.The specific meanings of the parameters are listed in Table 4.

Parameter Input Module
Scenario construction for the ground motion needs the user to propose requirements and determine the demand parameters.The user is first required to determine the magnitude of the earthquake and the location of the epicenter, and then to determine other parameters such as latitude and longitude, Vs30, and rupture angle of the target area.The input parameter module was entered through the panel in Figure 7a.The specific meanings of the parameters are listed in Table 4.
Appl.Sci.2023, 13, x FOR PEER REVIEW 11 of 18 the need for users to delve into the program's execution details, allowing them to concentrate on other aspects.Initially, users can utilize the software's area module to mark the epicenter and target area accurately and distinctly on the map, facilitating quick determination of the target area and enhancing user experience.Subsequently, within the field simulation module, users can swiftly obtain the amplitude field for each period in the target area by inputting parameters, enabling clear observation of period amplitudes and intuitive judgments.Ultimately, the program can be employed to precisely calculate historical time records for further research.Figure 6 shows the architecture of the proposed procedure.

Parameter Input Module
Scenario construction for the ground motion needs the user to propose requirements and determine the demand parameters.The user is first required to determine the magnitude of the earthquake and the location of the epicenter, and then to determine other parameters such as latitude and longitude, Vs30, and rupture angle of the target area.The input parameter module was entered through the panel in Figure 7a.The specific meanings of the parameters are listed in Table 4.   Interval for gridding the ground-motion field, e.g., 5 km

Visualization Module
In the past, the command line format was poorly interactive and costly to learn; GUI is the trend of modern program development, which makes it easy for users to use the software without having to pay a high learning cost.Data visualization is an efficient form of presenting data that allows users to observe data results clearly and intuitively, and helps users use the software better.

Target Area
The target area visualization module allows the user to clearly determine if the area is their desired area and easily adjust it to their needs; this results in a better interactive experience.Based on parameters entered in the previous subsection, the epic_longititude and epic_latitude-which are the location of the epicenter-were determined.Then, the target area was determined based on the information provided by the user about the target area (latitude and longitude of the specified area); these are displayed in the area module panel, as shown in Figure 7b.

Field Simulation
Under the action of the same ground-motion record, a single-degree-of-freedom system with the same damping and different periods will exhibit different structural responses.The maximum acceleration of the single-degree-of-freedom system represents the damage force of the ground motion.Hence, visually depicting the amplitude fieldspecifically the maximum acceleration field-of the ground motion within the target area aids in assessing the destructive force of the ground motion.After determining the target area according to the target area module, the target area amplitude field should be drawn in the panel under the MAP according to the location information, magnitude, strike, division, etc., as shown in Figure 7.In the left panel, IMMAP draws the amplitude field based on all amplitude values, and users can obtain the corresponding location information based on the latitude and longitude of the horizontal and vertical coordinates.The values of the amplitude field are marked by contour lines in the panel so that users can better understand the amplitude size.The GEOMAP on the right shows a geographic map which serves as the base map, and the amplitude field is drawn with itself as the base to ensure convenience for users to compare geographic information.
Furthermore, it is necessary to provide the amplitude fields for different periods.IMMAP and GEOMAP provide amplitude fields for shorter to longer periods, as illustrated in Figure 8a,b.This provides the user with a visual reference to obtain the degree of damage to the target area caused by this earthquake.

Calculation History Time Record Module
Within the visualization module, the user-provided parameters for scenario requirements serve as inputs.As shown in Figure 9, the RUN button in the menu is clicked to generate a series of acceleration time history records denoted by latitude and longitude coordinates in the "data" folder under the installation directory.

Properties and Usage of Software
The parameter input module allows us to enter scenarios that the user needs to build.The visualization module is a visualization function that provides the user-defined epicenter and the range of the target area while providing the amplitude fields of the main periods of the response spectrum.The calculation history time record module provides the time-history records.
Demand parameters are entered into the software, and the demand scenarios are determined by entering the magnitude, epicenter, and target area.Figure 10 shows the settings for the Changning earthquake.

Calculation History Time Record Module
Within the visualization module, the user-provided parameters for scenario requirements serve as inputs.As shown in Figure 9, the RUN button in the menu is clicked to generate a series of acceleration time history records denoted by latitude and longitude coordinates in the "data" folder under the installation directory.

Calculation History Time Record Module
Within the visualization module, the user-provided parameters for scenario requirements serve as inputs.As shown in Figure 9, the RUN button in the menu is clicked to generate a series of acceleration time history records denoted by latitude and longitude coordinates in the "data" folder under the installation directory.

Properties and Usage of Software
The parameter input module allows us to enter scenarios that the user needs to build.The visualization module is a visualization function that provides the user-defined epicenter and the range of the target area while providing the amplitude fields of the main periods of the response spectrum.The calculation history time record module provides the time-history records.
Demand parameters are entered into the software, and the demand scenarios are determined by entering the magnitude, epicenter, and target area.Figure 10 shows the settings for the Changning earthquake.

Properties and Usage of Software
The parameter input module allows us to enter scenarios that the user needs to build.The visualization module is a visualization function that provides the user-defined epicenter and the range of the target area while providing the amplitude fields of the main periods of the response spectrum.The calculation history time record module provides the time-history records.
Demand parameters are entered into the software, and the demand scenarios are determined by entering the magnitude, epicenter, and target area.Figure 10 shows the settings for the Changning earthquake.
After entering the parameters, the epicenter and target area (blue area) were illustrated by clicking on the AREA button in the visualization module to determine if the set area matches the demanded scenario and if adjustments are required.The epicenter is indicated by a red star, and the target area is indicated by a blue box.The base map is provided by the Map Toolkit in MATLAB (MATLAB Basemap Data, colorterrain); the map indicates important cities and roads, which enables better user experience, as indicated in Figure 10.
After determining the target area, another visualization feature of the software is drawing the amplitude field based on the input parameters.After clicking on the field simulation button, the amplitude field is drawn in the panel under the MAP, as indicated in Figure 11.After entering the parameters, the epicenter and target area (blue area) were illustrated by clicking on the AREA button in the visualization module to determine if the set area matches the demanded scenario and if adjustments are required.The epicenter is indicated by a red star, and the target area is indicated by a blue box.The base map is provided by the Map Toolkit in MATLAB (MATLAB Basemap Data, colorterrain); the map indicates important cities and roads, which enables better user experience, as indicated in Figure 10.
After determining the target area, another visualization feature of the software is drawing the amplitude field based on the input parameters.After clicking on the field simulation button, the amplitude field is drawn in the panel under the MAP, as indicated in Figure 11.After entering the parameters, the epicenter and target area (blue area) were illustrated by clicking on the AREA button in the visualization module to determine if the set area matches the demanded scenario and if adjustments are required.The epicenter is indicated by a red star, and the target area is indicated by a blue box.The base map is provided by the Map Toolkit in MATLAB (MATLAB Basemap Data, colorterrain); the map indicates important cities and roads, which enables better user experience, as indicated in Figure 10.
After determining the target area, another visualization feature of the software is drawing the amplitude field based on the input parameters.After clicking on the field simulation button, the amplitude field is drawn in the panel under the MAP, as indicated in Figure 11.Finally, one feature of the software is the provision of ground-motion records.After clicking the RUN button, time course files are generated in the data folder and named latitude and longitude for easy selection and use.One file is opened; the header of the file describes the number of samples, sampling rate, set magnitude, epicenter, and sampling points.Subsequently, the time record is provided for the next use.

Discussion
The trigonometric series method is a widely used method for simulating ground motion in engineering.To compare the results of this paper with those of this method, the ground-motion synthesis is carried out using the trigonometric series method.The set of seismic information required for synthesizing ground motion and the matching of duration and response spectrum are shown in Table 5. Figure 5 shows the ground-motion time Finally, one feature of the software is the provision of ground-motion records.After clicking the RUN button, time course files are generated in the data folder and named latitude and longitude for easy selection and use.One file is opened; the header of the file describes the number of samples, sampling rate, set magnitude, epicenter, and sampling points.Subsequently, the time record is provided for the next use.

Discussion
The trigonometric series method is a widely used method for simulating ground motion in engineering.To compare the results of this paper with those of this method, the ground-motion synthesis is carried out using the trigonometric series method.The set of seismic information required for synthesizing ground motion and the matching of duration and response spectrum are shown in Table 5. Figure 5 shows the ground-motion time history and duration curves, and the matching error of the response spectrum synthesized by the two methods.The ground motions synthesized by the software In this paper can match the spectrum and duration well, compared to the traditional methods.However, the method based on PCA and multi-objective genetic algorithm has some limitations.Therefore, it is necessary to discuss the scope of application in this software here.Firstly, for areas with real records, the ground-motion database of the software can be updated to apply to the target area, while the method has some limitations for areas lacking records.For areas lacking records, ground motions from areas with similar sources, propagation paths, and site conditions can be selected as the database of the software, which is of some significance for areas lacking data.Secondly, because the synthetic ground-motion field needs to depend on the ground-motion model, areas lacking records should first establish the ground-motion model, which is out of the scope of this study.Thirdly, due to the regional characteristic ground motions of the method in this study, only a small sample was selected for testing because of the limited number of records currently available in a specific small area.
The synthesis results of this paper's method and the trigonometric series method can be seen in the comparison; the trigonometric series method considered by matching with the spectrum can achieve the ground-motion amplitude and spectrum constraints, but cannot be bound to the duration.In contrast, the ground-motion synthesis method of this paper can well-reflect the regional ground-motion characteristics reflected by the regional ground-motion prediction equation in the synthesis results under the control of the constraint conditions and evaluation criteria.

Conclusions
A regional ground-motion synthesis software was developed in this study.The software extracts characteristic ground motions using PCA and a linear combination of algorithms that perform genetic algorithm optimization for obtaining time history records, satisfying real requirements and verifying their accuracy.
Combined with the machine learning method, the synthesis method of this procedure considers matching both the target response spectrum and target duration compared to the traditional simulation method, and it satisfies engineering demands for achieving reasonable ground motions.The software also offers regional amplitude fields and time history records for larger scenarios.
The software was designed entirely in a MATLAB GUI environment.A clear target area can be drawn via the visualization interface and provided parameters (such as seismic magnitude, site, and latitude and longitude of the target area) to improve the user's understanding; furthermore, amplitude intensity fields of the main periods are provided, while the time-history records are generated in the target folder.In addition, the software provides a user-friendly interface for users to obtain artificial regional ground-motion fields as per their requirements.Amplitude, spectrum, and duration are the three most important features of ground motion.Amplitude and spectrum are usually matched in engineering.Therefore, we introduce duration as a matching restriction.However, other intensity metrics like Arias intensity, CAV, and PGV are also significant, and we will continue to investigate them in the next works.

Figure 1 .
Figure 1.Framework of the proposed ground-motion simulation method.

Figure 1 .
Figure 1.Framework of the proposed ground-motion simulation method.

Figure 2 .
Figure 2. Epicenters, station distribution, and focal mechanism parameters of the selected Changning mainshock and aftershocks.(a) Location of epicenter and stations, and the intensity distribution map.(b) Epicenter and source mechanism.

Figure 2 .
Figure 2. Epicenters, station distribution, and focal mechanism parameters of the selected Changning mainshock and aftershocks.(a) Location of epicenter and stations, and the intensity distribution map.(b) Epicenter and source mechanism.

Figure 3 .
Figure 3. Top eight time histories and time-frequency analyses of characteristic ground motion.

Figure 3 .
Figure 3. Top eight time histories and time-frequency analyses of characteristic ground motion.

Figure 5 .Figure 5 .
Figure 5.Comparison with real ground motions: (a) Comparison of the time-history and duration of real ground-motion records and synthetic ground motion; (b) Error distribution of the optimal solution set for multi-objective optimization; (c) Matching of response spectrum.

Figure 6 .
Figure 6.Framework of the ground-motion simulation software.

Figure 7 .
Figure 7. (a) Input parameter module in the panel; (b) area module in the panel.

Figure 6 .
Figure 6.Framework of the ground-motion simulation software.

Figure 6 .
Figure 6.Framework of the ground-motion simulation software.

Figure 7 .
Figure 7. (a) Input parameter module in the panel; (b) area module in the panel.Figure 7. (a) Input parameter module in the panel; (b) area module in the panel.

Figure 7 .
Figure 7. (a) Input parameter module in the panel; (b) area module in the panel.Figure 7. (a) Input parameter module in the panel; (b) area module in the panel.

Figure 8 .
Figure 8. Different period field simulation in the panel: (a) MAP's module in the panel; (b) Different period button.

Figure 9 .
Figure 9. Acquiring time-history module in the panel.

Figure 8 .
Figure 8. Different period field simulation in the panel: (a) MAP's module in the panel; (b) Different period button.

Figure 8 .
Figure 8. Different period field simulation in the panel: (a) MAP's module in the panel; (b) Different period button.

Figure 9 .
Figure 9. Acquiring time-history module in the panel.

Figure 9 .
Figure 9. Acquiring time-history module in the panel.

18 Figure 10 .
Figure 10.Example of MAPs in the panel.

Figure 10 . 18 Figure 10 .
Figure 10.Example of MAPs in the panel.
Note: Information on seismic events listed in the table comes from the China Earthquake Network Center (CENC).Appl.Sci.2023, 13, 8232 7 of 18 Appl.Sci.2023, 13, x FOR PEER REVIEW 7 of 18

Table 2 .
Proportion of information retained by the extracted ground motion mother waves.

Table 2 .
Proportion of information retained by the extracted ground motion mother waves.

Table 3 .
Basic parameters required for the synthetic ground motion and match of the duration.

Table 4 .
Meanings of parameters in the software.

Table 5 .
The time and response spectrum matching of two synthetic methods.