A parallel whale optimization algorithm for engine system identification

By parallelizing the Whale Optimization Algorithm (WOA) on a GPU, and utilizing CUDA parallel computing and optimized information exchange strategies, the time consumption problem of WOA on a single CPU was solved, achieving efficient parallel computing for engine system identification and improving the algorithm's time efficiency and accuracy.

CN116484715BActive Publication Date: 2026-05-19DALIAN UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
DALIAN UNIV OF TECH
Filing Date
2023-03-14
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

The Whale Optimization Algorithm (WOA) is extremely time-consuming to execute on a single CPU, making it difficult to efficiently solve complex optimization problems such as engine system identification. In particular, its high time complexity in large-scale population iterative computation limits its practical value.

Method used

We employ CUDA parallel computing and use the parallel whale optimization algorithm (WOA) on the GPU to identify the engine system. By leveraging CUDA's parallel thread and memory management, we optimize the information exchange strategy, reduce global thread synchronization and data transfer overhead, and improve algorithm efficiency.

Benefits of technology

It significantly improves the time efficiency of engine system identification, realizes real-time identification of engine linear models, enhances the parallelism and computational efficiency of the algorithm, and reduces the overhead of data transmission and synchronization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116484715B_ABST
    Figure CN116484715B_ABST
Patent Text Reader

Abstract

The application belongs to the field of high-performance computing, and discloses a parallel whale optimization algorithm for engine system identification. On the one hand, after the initial setting of the population is completed, a unified computing architecture is used for parallelism, and the parallel process is executed by a GPU, thereby reducing the overhead of kernel start, thread synchronization and data transmission. On the other hand, for the parallel process of extreme value seeking and population data mixing in the whale optimization algorithm, an information interaction strategy without global thread synchronization is proposed. The extreme value seeking process adopts a strategy of sub-population optimization and global communication of extreme values, and the population data mixing adopts a strategy of opening a global memory synchronous shared memory. The application can be used for solving engine linear model identification, and can achieve significant time shortening benefit without sacrificing accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the fields of high-performance computing and heuristic optimization algorithms, and in particular relates to a parallel whale optimization algorithm for engine system identification. Background Technology

[0002] Many complex non-convex optimization problems exist in modern science and engineering, requiring appropriate optimization algorithms for solution. Traditional numerical optimization algorithms, such as Newton's method, gradient descent, and interior-point methods, can only obtain local optima through rigorous iterative calculations and require the use of derivative information, which greatly limits their global convergence and problem complexity. In contrast, heuristic optimization algorithms have advantages such as simplicity, flexibility, strong search capabilities, and good global convergence, effectively solving complex non-convex optimization problems. In recent years, ant colony optimization, particle swarm optimization, differential evolution, and gray wolf optimization algorithms have emerged, becoming a bridge between scientific computing and human capabilities.

[0003] The Whale Optimization Algorithm (WOA) is a relatively new heuristic optimization algorithm inspired by the hunting behavior of humpback whales. It simulates three hunting methods of humpback whales: surrounding prey, random search, and using a spiral bubble strategy. WOA is characterized by its simple structure, few conditional parameters, fast convergence speed, and strong global search capability.

[0004] While Work-Analog Calculations (WOA) can effectively solve complex optimization problems, it relies on iterative computation with large populations, resulting in high time complexity and significant execution time on a single CPU, thus reducing the algorithm's practical value. For computations involving such high-density data, increasing CPU clock speed has gradually become a bottleneck due to power consumption limitations. Utilizing GPU parallel computing, leveraging its inherent parallelism, is an effective method to improve computational efficiency and performance.

[0005] In the field of GPU computing, the Compute Unified Device Architecture (CUDA) is highly flexible and offers superior performance, making it the most widely used technology framework. CUDA uses the GPU as a coprocessor, providing abundant computing resources, enabling parallel threads, and hiding data storage latency. Kernel functions are the core units for performing GPU computations, called by the CPU, and modified with the qualifier `__global__`. Device functions are called by the CPU and modified with `__device__`. CUDA defines an abstract hierarchical concept for memory allocation and management, where threads launched by the kernel are collectively called grids. A grid consists of multiple thread blocks, and a block consists of a group of threads. Users can achieve reasonable allocation of computing resources to achieve higher performance efficiency.

[0006] Engine system identification involves highly complex, strongly nonlinear controlled objects with significant uncertainty and time-varying characteristics. Establishing accurate mathematical models is extremely difficult. Data-driven methods, however, do not rely on physical models. By collecting data during engine operation, real-time model building is achieved, enabling timely control and risk mitigation. Two-dimensional linear engine system identification is one such data-driven modeling method. It collects input and output data to identify the engine's state-space model. Utilizing a WOA (State-Space Architecture) constructed intuitively or empirically, optimal system parameters can be obtained through search and optimization based on actual data. The speed of system identification significantly impacts actual flight control. Controllers need to be designed based on the engine's dynamic model to adapt promptly to changes in engine characteristics, meeting performance requirements under various flight conditions and improving flight safety and efficiency. Summary of the Invention

[0007] The purpose of this invention is to address the time complexity issue faced by Word of Arithmetic (WOA) in solving complex problems by proposing a method to parallelize the algorithm using CUDA, thereby significantly improving the algorithm's time efficiency. Parallel WOA is used to identify parameters of a two-input two-output linear model of an engine, and the results are compared with a serial program to further verify the effectiveness and feasibility of the proposed solution.

[0008] The technical solution of this invention:

[0009] A parallel whale optimization algorithm for engine system identification, comprising the following steps:

[0010] S1 establishes the fitness function, which is an error identification function for the parameters of a two-input two-output linear model of an engine under a certain operating condition.

[0011] S2 sets WOA parameters: population size n, location vector dimension n jMaximum number of iterations T, spiral coefficient b, and predation mode selection probability p r Population initialization is achieved by generating random numbers;

[0012] Before the S3 parallel WOA, the initial population data and engine data are transferred from the CPU to the GPU. CUDA parallelism is used, and the data is transferred from the global memory space to the shared memory space. The input and output data identified by the engine are stored in the global memory. Threads are allocated to individuals in the population before the kernel is executed.

[0013] S4 determines whether the parallel WOA has reached the maximum number of iterations. If yes, proceed to step S7; otherwise, proceed to steps S4 to S6.

[0014] S5 calculates the optimal position of the WOA population by employing a strategy of group optimization and global communication for extreme values. It performs reduction optimization for each block and transmits the optimal position within the block to the global memory space for global information exchange.

[0015] S6 updates the individual position of each whale according to the iterative formula of the individual whale position. The population data mixing adopts a strategy of opening global memory and synchronizing shared memory. During the iteration process, the information of other individual whales is obtained from global memory. After the update is completed, the information in shared memory is kept synchronized with global memory, so that other subpopulation individuals have access to all group information.

[0016] S7 obtains the globally optimal position through WOA, and the data is transmitted from the GPU back to the CPU. The entire parallel process of the algorithm is delivered to the GPU for execution, and control is returned to the CPU after parallelism is completed. The parallel strategy of finding the extremum in step S5 and the population mixing in step S6 reduces the global thread synchronization required for the information interaction process, while also reducing the overhead of kernel startup and data transmission, thus improving time efficiency.

[0017] S8 compares the experimental results of using serial and parallel WOA to optimize the solution of two fitness functions and to identify the linear model system of the engine, verifying the performance improvement brought by the parallel algorithm.

[0018] Optionally, the parameters in S2 can be selected as shown in the table below:

[0019] Table 1 Parameter Selection

[0020]

[0021]

[0022] Optionally, the calculation of the optimal position of the population in S5 includes the following steps:

[0023] S5.1 The population is divided into subpopulations according to Block. Each subpopulation performs a reduction in shared memory, compares and reduces the active Threads in a loop. Finally, the best value in the subpopulation is stored in the space with ThreadId 0. Since the reduction will destroy the original information, a temporary copy of the population information needs to be created in shared memory.

[0024] If the extreme value information obtained by all subgroups in S5.2 is better than the historical extreme value, it will be transmitted to the global memory. The current subgroup traverses the information from the global memory space and obtains a value better than itself to replace it. The global optimal value is spread to each block during the iteration process.

[0025] Optionally, in step S6, the individual whale positions are updated, and the population positions are represented by vectors. Let i = 1, 2, 3, ..., n, be a vector. The specific steps are as follows:

[0026] S6.1 Whales determine their predation behavior using p and |A|, where p is a random number in [0,1]. Represents 1×n j The coefficient vector of dimension is calculated as follows:

[0027] A j =2a×rand(0,1)-a

[0028] Among them, the value of 'a' decreases linearly from 2 to 0 as the iteration progresses;

[0029] S6.2 updates the location of the whale pod as follows:

[0030] When p <p r And when |A|≥1, a random search is performed. The formula for the random search is:

[0031]

[0032] in, This represents the population's optimal position vector. This measures the distance between an individual whale and the current best individual. Represents 1×n j The coefficient vector of dimension is calculated as follows:

[0033] C j = 2×rand(0,1)

[0034] When p <p r When |A|<1, surround the prey. The formula for surrounding the prey is:

[0035]

[0036] in, This represents a vector representing the location of a random individual.

[0037] When p≥p r Spiral bubble nets are used for predation. The formula for spiral bubble net predation is:

[0038]

[0039] Where c is a uniformly random number in the range [-1, 1], and as the iteration proceeds, the lower bound of the range of c will decrease to -2;

[0040] S6.3 Calculate the fitness value of individual whales in a pod whose spatial location has been updated.

[0041] The beneficial effects of this invention are as follows: This invention provides a parallel whale optimization algorithm for engine system identification, in which all data is delivered to the GPU for parallel processing. The algorithm's information exchange parallel strategy effectively solves the parallel challenges, resulting in significant time efficiency improvements. This method can effectively enable WOA to solve high-data-density optimization problems such as real-time identification of linear engine models, and has important significance in engineering applications. Attached Figure Description

[0042] Figure 1 This is a diagram of the CUDA parallel structure of the algorithm of this invention;

[0043] Figure 2 This is a diagram of the extremum solution structure of the algorithm of this invention;

[0044] Figure 3 This is a data fusion structure diagram of the algorithm of this invention;

[0045] Figure 4 This is a simulation comparison chart of the speedup ratio of the algorithm of this invention. Detailed Implementation

[0046] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings and technical solutions.

[0047] See Figure 1 This is a diagram illustrating the CUDA parallel architecture used in the algorithm of this invention. The specific steps of the improved whale optimization algorithm based on parallel computing provided by this invention are as follows:

[0048] S1 establishes the fitness function, which is an error function for identifying the parameters of a two-input two-output linear model of the engine under a certain operating condition, denoted by f;

[0049] In practice, for the model identification part, the data comes from a ground test bench for a certain type of turbofan engine. The input control variables are the exhaust nozzle area and fuel quantity, and the outputs are the high-pressure turbine speed and turbine pressure ratio. The model to be identified is as follows:

[0050]

[0051] Where X1 and X2 represent state variables, which describe the engine output; x1 to x8 represent the eight matrix coefficients that the engine model needs to identify; U1 and U2 represent the input control variables; and the fitness function f is a measure of the model's error.

[0052]

[0053] Where Z1 and Z2 represent the actual state values, i.e. the actual output values.

[0054] In practice, since the parallel process is implemented on the GPU, the fitness function will be defined in the form of __device__ so that it can be called by the kernel.

[0055] S2 sets WOA parameters: population size n, location vector dimension n j Spiral coefficient b, predation mode selection probability p r The maximum number of iterations is T, and the population is initialized using random numbers;

[0056] In specific implementation, the parameter selection in S2 is shown in the table below:

[0057] Table 1 Parameter Selection

[0058]

[0059] Population dimension n j In engine model identification, the acceleration benefits of different population sizes are set to 800, 1600, 2400, and 3200. The position vector dimension n is set to 8 based on the number of matrix parameters to be identified. The maximum number of iterations T is set to 5000 to enable the algorithm to achieve global convergence.

[0060] Before the S3 parallel WOA, population data and engine data are transferred from the CPU to the GPU. CUDA parallelism is used, and data is transferred from the global memory space to the shared memory space. The input and output data identified by the engine are stored in the global memory. Threads are allocated to individuals in the population before the kernel is executed.

[0061] In practice, the population data is generated on the CPU through random initialization, with a data range of [0,1]. The engine data comes from 1,500 sets of input and output data from the ground test bench.

[0062] In practice, WOA assigns one Thread to each individual, and the Block size is set to a multiple of 32 to improve the activity of the Thread. The number of Blocks is set in a trade-off based on the number of GPU Streaming Multiprocessors (SM) and CUDA Cores (SP).

[0063] WOA involves only two information exchange processes: finding the extreme value and population mixing. Through effective information exchange strategies, each individual can gain access to the necessary information without interfering with other individuals, thus improving the independence of individuals within the population. In this case, the iterative processes of each whale individual, including surrounding prey, random searching, and spiral bubble-net hunting, can be handled by a single SP, effectively improving the algorithm's parallelism.

[0064] S4 determines whether the parallel WOA has reached the maximum number of iterations. If yes, proceed to step S7; otherwise, proceed to steps S4 to S6.

[0065] S5 calculates the optimal position of the WOA population by employing a strategy of group optimization and global communication for extreme values. It performs reduction optimization for each block and transmits the optimal position within the block to the global memory space for global information exchange.

[0066] In practice, the method for finding the WOA extreme value is as follows: Figure 2 As shown, the specific steps are as follows:

[0067] S5.1 The population is divided into subpopulations according to Block. Each subpopulation performs a reduction in shared memory, compares and reduces the active Threads in a loop. Finally, the best value in the subpopulation is stored in the space with ThreadId 0. Since the reduction will destroy the original information, a temporary copy of the population information needs to be created in shared memory.

[0068] If the extreme value information obtained by all subgroups in S5.2 is better than the historical extreme value, it will be transmitted to the global memory. The current subgroup traverses the information from the global memory space and obtains a value better than itself to replace it. The global optimal value is spread to each block during the iteration process.

[0069] S6 updates the individual position of each whale according to the iterative formula of the individual whale position. The population data mixing adopts a strategy of opening global memory and synchronizing shared memory. During the iteration process, the information of other individual whales is obtained from global memory. After the update is completed, the information in shared memory is kept synchronized with global memory, so that other subpopulation individuals have access to all group information.

[0070] In specific implementation, the WOA population data mixing method is as follows: Figure 3 As shown.

[0071] The position of an individual whale is represented by a vector. Let i = 1, 2, 3, ..., n, be the position vector. The location update steps are as follows:

[0072] S6.1 Determines predation behavior using p and |A|, where p is a random number in [0,1]. Represents 1×n j The coefficient vector of dimension is calculated as follows:

[0073] A j =2a×rand(0,1)-a

[0074] The value of a decreases linearly from 2 to 0 as the number of iterations increases;

[0075] S6.2 updates the location of the whale pod as follows:

[0076] When p <p r And when |A|≥1, a random search is performed. The formula for the random search is:

[0077]

[0078] in, This represents the population's optimal position vector. Represents 1×n j The coefficient vector of dimension is calculated as follows:

[0079] C j = 2×rand(0,1)

[0080] When p <p r When |A|<1, surround the prey. The formula for surrounding the prey is:

[0081]

[0082] in, This represents a vector representing the location of a random individual.

[0083] When p≥p r Spiral bubble nets are used for predation. The formula for spiral bubble net predation is:

[0084]

[0085] Where c is a uniformly random number in the range [-1, 1], and as the iteration proceeds, the lower bound of the range of c will decrease to -2;

[0086] S6.3 Calculate the fitness value of individual whales in a pod whose spatial location has been updated.

[0087] In practice, when calculating the fitness of engine model identification, the optimal vector position of the current population is used as the identification coefficient of the matrix. Under given input conditions, the output at all times is obtained through discrete state equation iteration, and the identification accuracy is evaluated through an error measurement function.

[0088] S7 obtains the globally optimal position through WOA, and the data is transmitted from the GPU back to the CPU. The entire parallel process of the algorithm is delivered to the GPU for execution, and control is returned to the CPU after parallelism is completed. The parallel strategy of finding the extremum in step S5 and the population mixing in step S6 reduces the global thread synchronization required for the information interaction process, while also reducing the overhead of kernel startup and data transmission, thus improving time efficiency.

[0089] S8 compares the experimental results of using serial and parallel WOA to optimize the solution of two fitness functions and to identify the linear model system of the engine, verifying the performance improvement brought by the parallel algorithm.

[0090] In practice, serial programs are implemented on the CPU using C code, while parallel programs are implemented on the GPU using C-CUDA.

[0091] In this implementation, the CPU clock frequency used was 2.42GHz, and the GPU was an NVIDIA GeForce MX450 graphics card based on the Turing architecture, with 2GB of video memory, a maximum clock frequency of 1.58GHz, 14 SMs, and a total of 896 SPs. Regarding the software version, CUDA version 11.4 was installed, with a computing power of 7.5.

[0092] Based on the hardware conditions of SP and SM in this paper, a reasonable block size was set during the implementation of linear model identification of the engine. The block size was set to 64, 128, 192, and 256 for population dimensions of 800, 1600, 2400, and 3200, respectively. The large amount of input and output data used for engine system identification is unsuitable for transfer to shared memory; therefore, it is stored in global memory, i.e., video memory.

[0093] In practice, the timing method for measuring time efficiency adopted the high-precision time function provided by Visual C++, and implemented a large number of random numbers required in the iteration process through the device-side interface function. The experimental results were obtained by averaging 10 experiments.

[0094] Table 2 compares the convergence accuracy of CPU serial programs and CUDA parallel programs in identifying linear engine models under different population sizes. It is evident that the error obtained by using parallel algorithms for engine model identification is not higher than that obtained by using serial algorithms. The time efficiency brought by parallel algorithms is not at the expense of accuracy, which well demonstrates the feasibility of parallel methods.

[0095] Table 2 Comparison of Algorithm Accuracy

[0096]

[0097] Table 3 shows a comparison of the time taken by the CPU serial program and the CUDA parallel program for identifying the linear engine model under different population sizes. It can be seen that the time benefit of parallel WOA is significant, reaching a speedup of over 350 times. The complexity of the fitness function affects the parallel speedup ratio of the algorithm. The fitness function, which is relatively simple to compute, has lower update computation time, thus highlighting the increased time contribution of data transmission and thread synchronization processes in the overall parallel process, leading to a decrease in speedup benefits. The error accumulation of the output at each sampling point in the engine model identification process introduces a certain amount of computation, making the time benefit of parallelism very considerable.

[0098] Table 3 Comparison of Algorithm Time (ms) under Test Function f

[0099]

[0100]

[0101] in addition, Figure 4 The parallel speedup curve of the WOA identification engine linear model was plotted. As the population size gradually increased from the initial stage, the algorithm's parallel speedup also showed an increasing trend, indicating that the GPU's computing power was not yet saturated. With the increase in data size, the benefits of parallel iteration outweighed the losses from data transfer and thread synchronization. The allocation of more threads led to a simultaneous increase in thread utilization, and the parallel efficiency began to improve significantly. However, this trend began to slow down after the population size reached a certain level, at which point the GPU's computing power started to approach saturation.

[0102] In summary, this invention provides a parallel whale optimization algorithm for engine system identification, offering a solution to the time-consuming problem of large-scale population iteration. This invention employs CUDA for parallel processing of the algorithm, with the entire parallel process handled by the GPU. Furthermore, for the information interaction part of WOA (Whale Algorithm), a corresponding information interaction strategy is proposed, reducing data dependencies in individual iteration processes and improving algorithm parallelism. Moreover, this invention uses WOA to implement linear engine model identification, comparing the convergence accuracy and time efficiency of serial and parallel programs, verifying the feasibility and effectiveness of the parallel method, and possessing significant practical value in engineering applications.

Claims

1. A parallel whale optimization algorithm for engine system identification, characterized in that, The steps are as follows: S1 establishes the fitness function, which is an error identification function for the parameters of a two-input two-output linear model of the engine under a certain operating condition. S2 sets WOA parameters: population size n, location vector dimension Maximum number of iterations T, spiral coefficient b, and probability of choosing predation method. Population initialization is achieved by generating random numbers; Before the S3 parallel WOA, the initial population data and engine data are transferred from the CPU to the GPU. CUDA parallelism is used, and the data is transferred from the global memory space to the shared memory space. The input and output data identified by the engine are stored in the global memory. Threads are allocated to individuals in the population before the kernel is executed. S4 determines whether the parallel WOA has reached the maximum number of iterations. If yes, proceed to step S7; otherwise, proceed to steps S4-S6. S5 calculates the optimal position of the WOA population by employing a strategy of group optimization and global communication for extreme values. It performs reduction optimization for each block and transmits the optimal position within the block to the global memory space for global information exchange. The specific steps for calculating the optimal position of the population in S5 are as follows: S5.1 The population is divided into subpopulations according to Block. Each subpopulation performs a reduction in shared memory, compares and reduces the number of active Threads in a loop. Finally, the best value in the subpopulation is stored in the space with ThreadId 0. Since the reduction will destroy the original information, a temporary copy of the population information needs to be created in shared memory. S5.2 If the extreme value information obtained by all subgroups is better than the historical extreme value, it will be transmitted to the global memory. The current subgroup traverses the information from the global memory space and obtains a value better than itself to replace it. The global optimal value is spread to each block during the iteration process. S6 updates the individual position of each whale according to the iterative formula of the individual whale position. The population data mixing adopts a strategy of opening global memory and synchronizing shared memory. During the iteration process, the information of other individual whales is obtained from global memory. After the update is completed, the information in shared memory is kept synchronized with global memory, so that other subpopulation individuals have access to all group information. S7 obtains the global optimal position through WOA, and the data is transmitted from the GPU to the CPU. The entire parallel process of the algorithm is delivered to the GPU for execution, and control is returned to the CPU after the parallel process is completed. The parallel strategy of finding the extreme value in step S5 and the population mixing in step S6 reduces the global thread synchronization link required for the information interaction process, while reducing the overhead of kernel startup and data transmission, thus improving time efficiency. S8 compares the experimental results of using serial and parallel WOA to optimize the solution of two fitness functions and to identify the linear model system of the engine, verifying the performance improvement brought by the parallel algorithm.

2. The parallel whale optimization algorithm for engine system identification according to claim 1, characterized in that, The parameters in S2 are selected as follows: The helix coefficient b takes values ​​from 1.0 to 2.0; the probability of predation mode selection. The value ranges from [0.2 to 0.8].

3. The parallel whale optimization algorithm for engine system identification according to claim 1, characterized in that, In S6, the individual whale positions are updated, and the population positions are represented by vectors. It means that, among them ,vector The specific steps are as follows: S6.1 Whale Passage and Determine predation behavior, Is Random numbers within, express The coefficient vector of dimension is calculated as follows: in, As the iteration progresses, its value decreases linearly from 2 to 0; S6.2 Updates the location of the whale pod as follows: when and A random search is performed at that time, and the formula for the random search is: in, This represents the population's optimal position vector. This measures the distance between an individual whale and the current best individual. express The coefficient vector of dimension is calculated as follows: when and When encircling prey, the formula for encircling prey is: in, Represents a vector of random individual positions; when Spiral bubble nets are used for predation. The formula for spiral bubble net predation is: in, Is Uniformly random numbers, as the iteration proceeds... The lower limit of the range will decrease to -2; S6.3 Calculate the fitness value of individual whales in a pod whose spatial location has been updated.