Artificial intelligence-based multi-objective optimization control method for ship gas turbine

By embedding a K-means clustering algorithm with fair and balanced constraints and a multi-task learning model, the problems of insufficient accuracy in gas turbine operating condition classification and poor collaborative learning ability are solved, and high-precision operating condition classification and multi-task prediction optimization of gas turbines are achieved.

CN120762293BActive Publication Date: 2025-11-07HARBIN MARINE BOILER & TURBINE RES INST (NO 703 RES INST OF CHINA STATE SHIPBUILDING CORP)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511286566.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-10
Publication Date
2025-11-07
Estimated Expiration
2045-09-10

AI Technical Summary

Technical Problem

Existing gas turbine operating condition identification methods suffer from insufficient accuracy in operating condition classification and poor collaborative learning capabilities, leading to the misclassification of extreme operating conditions and affecting prediction and optimization results.

Method used

The K-means clustering algorithm with embedded fairness and balance constraints is used for operating condition classification. A shared backbone network is designed through a multi-task learning model to achieve information sharing and feature complementarity for fuel consumption, emission index estimation, response speed control and remaining life prediction.

Benefits of technology

It improves the accuracy of operating condition classification and the precision of multi-task prediction, and optimizes the fuel consumption, emission indicators and equipment life of gas turbines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120762293B_ABST
    Figure CN120762293B_ABST
Patent Text Reader

Abstract

The present application relates to the field of ship power system control, and particularly relates to a ship gas turbine multi-objective optimization control method based on artificial intelligence, which comprises data acquisition and feature construction, working condition clustering driven by fair constraint and balance constraint, multi-task learning-based multi-objective modeling and multi-objective optimization strategy generation, the scheme introduces a K-means clustering algorithm embedded with fair constraint and balance constraint, effectively solving the problems of class imbalance and feature distribution deviation in traditional working condition classification, making the working condition classification result more reasonable and accurate, and providing a reliable foundation for subsequent multi-task prediction and optimization control; in view of the poor collaborative learning ability, the present application adopts a multi-task learning model, designs a shared backbone network, establishes multiple task branches of fuel consumption prediction, emission index estimation, response speed control and residual life prediction on the basis of shared features, realizes information sharing and feature complementation among tasks, and improves the prediction accuracy and generalization ability.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of ship power system control, in particular to a ship gas turbine multi-objective optimization control method based on artificial intelligence. BACKGROUND

[0002] With the development of ships towards high performance, high efficiency and intelligence, as the main power device of the ship, the gas turbine needs to realize the comprehensive optimization of fuel consumption, emission indicators, response speed and equipment life under different task scenarios. The existing gas turbine working condition recognition method has the problem of insufficient working condition classification accuracy. Traditional K-means clustering or classification method based on experience rules is mostly used, which cannot effectively solve the problems of class imbalance and feature distribution deviation, resulting in partial extreme working conditions being misclassified, affecting the subsequent prediction and optimization effect. The existing prediction method has the problem of poor collaborative learning ability. Single task model is used to predict fuel consumption, emission indicators or life parameters, resulting in low prediction result accuracy. SUMMARY

[0003] In view of the above situation, in order to overcome the defects of the prior art, the present application provides a ship gas turbine multi-objective optimization control method based on artificial intelligence. In view of the problem of insufficient working condition classification accuracy, the present application introduces a K-means clustering algorithm embedded with fairness constraints and balance constraints, effectively solving the problems of class imbalance and feature distribution deviation in traditional working condition classification, making the working condition classification result more reasonable and accurate, and providing a reliable foundation for subsequent multi-task prediction and optimization control. In view of the problem of poor collaborative learning ability, the present application uses a multi-task learning model, designs a shared backbone network, establishes fuel consumption prediction, emission indicator estimation, response speed control and residual life prediction multiple task branches on the basis of shared features, realizes information sharing and feature complementation between tasks, and improves the accuracy and generalization ability of prediction.

[0004] The technical scheme adopted by the present application is as follows: the ship gas turbine multi-objective optimization control method based on artificial intelligence provided by the present application comprises the following steps:

[0005] Step S1: data acquisition and feature construction, acquiring multi-source data of the ship gas turbine, including operating parameters, working condition data, task state, health indicators and environmental information, dividing into labeled data and unlabeled data, constructing multi-scale features for the labeled data, forming the input data set of clustering and multi-task model, the labeled data refers to the data with fuel consumption, emission indicators, response speed and residual life information, the unlabeled data refers to the operating data without information;

[0006] Step S2: Work condition clustering using fairness constraints and balance constraints, using a K-means clustering algorithm embedded with fairness constraints and balance constraints to classify the input data set into work conditions, and obtaining a work condition classification result;

[0007] Step S3: Multi-objective modeling based on multi-task learning, designing a shared backbone network based on a deep neural network that integrates time series feature extraction and multi-dimensional sensor feature encoding, and constructing a multi-task model, wherein multiple task branches are constructed, including fuel consumption prediction, emission index estimation, response speed control, and remaining life prediction, and obtaining prediction results through a global weight merging strategy and a hierarchical weight merging strategy;

[0008] Step S4: Multi-objective optimization strategy generation, based on the prediction results, constructing a multi-objective optimization problem containing fuel consumption, emission index, response speed, and life consumption, and using an MPC control algorithm to generate an optimal strategy set;

[0009] Step S5: Online control and adaptive adjustment, based on the work condition classification result, the prediction result, and the optimal strategy set for real-time control.

[0010] Further, step S2 specifically includes the following steps:

[0011] Step S21: Work condition sample generation, dividing the input data set into segments, each segment forming a work condition sample, and constructing a work condition sample set;

[0012] Step S22: Vector representation, extracting multi-dimensional features from each work condition sample, and combining all multi-dimensional features into high-dimensional feature vectors, each high-dimensional feature vector corresponding to a work condition sample;

[0013] Step S23: Predefine fairness rules, set a fairness measure function as follows:

[0014] ;

[0015] Wherein, is the fairness measure function, is the number of clusters, is the number of categories, represents the th cluster, is the total number of work condition samples in the th cluster, is the number of work condition samples in the th category in the th cluster;

[0016] Step S24: Add balance constraints, design a balance measure function as follows:

[0017] ;

[0018] wherein, is the balance metric function, is the total number of operating condition samples;

[0019] Step S25: modify the K-means objective function, embed the fairness metric function as a regularization term in the K-means objective function, and add the balance metric function as a balance constraint term, the modified K-means objective function is as follows:

[0020] ;

[0021] wherein, is the modified K-means objective function, is the center of the cluster, is the weight coefficient of the fairness rule, is the weight coefficient of the balance constraint, represents the high-dimensional feature vector of the operating condition sample;

[0022] Step S26: initialization, randomly select initial cluster centers , , , initialize the values of and ;

[0023] Step S27: iterative optimization of clustering, set the maximum number of iterations, and perform iterative optimization according to the modified K-means objective function, optimize the cluster center and sample assignment through iteration, until the maximum number of iterations is reached, and the operating condition classification result is obtained;

[0024] Step S28: output the result, output the operating condition classification result.

[0025] Further, step S3 specifically includes the following steps:

[0026] Step S31: collect the data set, introduce the operating condition classification result, set the label information of fuel consumption, emission index, response speed and life prediction, and obtain the data set containing the label;

[0027] Step S32: initialize the model, initialize the multi-task learning model, wherein the ResNet model is used as the shared backbone network, including the initial layer, the middle layer and the high-level layer, four task branches are constructed in the high-level layer, including the fuel consumption prediction branch, the emission index estimation branch, the response speed control branch and the remaining life prediction branch;

[0028] Step S33: Task vector extraction, jointly train four task branches using labeled dataset, get global task vectors, including fuel consumption prediction vector , emission index estimation vector , response speed control vector and remaining life prediction vector , extract task vectors of each global task vector at different layers in the shared backbone network as 、 、 and , wherein represents the number of layers;

[0029] Step S34: Distribution merging coefficient, assign a learnable merging coefficient to each global task vector, and the global merging formula is as follows:

[0030] ;

[0031] wherein is the parameter of the multi-task learning model, is the pre-training parameter of the shared backbone network, 、 、 and is the global merging weight of the four global task vectors, is the operation of removing parameter redundancy and symbol conflict;

[0032] Step S35: Assign hierarchical coefficients, assign independent weights to the task vectors of each layer, and the hierarchical merging formula is as follows:

[0033] ;

[0034] wherein is the parameter of the multi-task learning model at the layer, is the pre-training parameter of the shared backbone network at the layer, 、 、 and is the hierarchical weight;

[0035] Step S36: Entropy minimization target, use the unlabeled data in step S1 as unlabeled test samples, define the optimization target as minimizing the entropy of the test samples to optimize the merging weight, and the formula used is as follows:

[0036] ;

[0037] wherein is the number of unlabeled test samples, a prediction output of the multi-task learning model for an unlabeled test sample, a calculation formula of the entropy, specifically , , a class index, including a fuel consumption, an emission index, a response speed, and a life prediction, a probability predicted as the class .

[0038] Step S37: model evaluation, evaluating the multi-task learning model, setting an evaluation target, continuing the iteration of steps S33 to S36 when the evaluation target is not reached, until the evaluation target is reached, and outputting the evaluated multi-task learning model.

[0039] The beneficial effects achieved by the present application using the above-mentioned scheme are as follows:

[0040] (1) In view of the problem of insufficient working condition classification accuracy, the present application introduces a K-means clustering algorithm embedded with fairness constraints and balance constraints, effectively solving the problems of class imbalance and feature distribution deviation in traditional working condition classification, making the working condition classification result more reasonable and accurate, and providing a reliable foundation for subsequent multi-task prediction and optimization control.

[0041] (2) In view of the problem of poor collaborative learning ability, the present application uses a multi-task learning model, designs a shared backbone network, and establishes multiple task branches of fuel consumption prediction, emission index estimation, response speed control, and remaining life prediction on the basis of shared features, realizes information sharing and feature complementation among tasks, and improves the accuracy and generalization ability of prediction. BRIEF DESCRIPTION OF DRAWINGS

[0042] Figure 1 The flowchart of the ship gas turbine multi-objective optimization control method based on artificial intelligence provided by the present application.

[0043] The accompanying drawings are used to provide a further understanding of the present application, and constitute a part of the specification, together with the embodiments of the present application, to explain the present application, and do not constitute a limitation on the present application. DETAILED DESCRIPTION

[0044] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0045] In the description of the present application, it should be understood that the terms "upper", "lower", "front", "back", "left", "right", "top", "bottom", "inner", "outer" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application.

[0046] Embodiment one, refer to Figure 1 The present application provides a ship gas turbine multi-objective optimization control method based on artificial intelligence, which comprises the following steps:

[0047] Step S1: data acquisition and feature construction, collecting multi-source data of the ship gas turbine, including operating parameters, working condition data, task state, health indicators and environmental information, dividing into labeled data and unlabeled data, constructing multi-scale features for the labeled data, forming the input data set of the clustering and multi-task model, the labeled data refers to the data with fuel consumption, emission indicators, response speed and residual life information, the unlabeled data refers to the operating data without information;

[0048] Step S2: using fairness constraints and balance constraints for working condition clustering, using K-means clustering algorithm embedded with fairness constraints and balance constraints to classify the input data set, and obtaining the working condition classification result;

[0049] Step S3: multi-objective modeling based on multi-task learning, designing a shared backbone network based on deep neural network fusion of time sequence feature extraction and multi-dimensional sensor feature encoding, and constructing a multi-task model, wherein a plurality of task branches are constructed, including fuel consumption prediction, emission indicator estimation, response speed control and residual life prediction, and the prediction result is obtained through global weight merging strategy and hierarchical weight merging strategy;

[0050] Step S4: multi-objective optimization strategy generation, based on the prediction result, constructing a multi-objective optimization problem containing fuel consumption, emission indicators, response speed and life consumption, and using MPC control algorithm to generate an optimal strategy set;

[0051] Step S5: online control and adaptive adjustment, based on the working condition classification result, the prediction result and the optimal strategy set for real-time control.

[0052] In this embodiment, 6 months of operating data are collected, a total of 4500 hours, with a sampling frequency of 1 Hz;

[0053] The data includes 25 operating parameters such as fuel flow, combustion chamber temperature, compressor speed, exhaust temperature, vibration signal, turbine pressure ratio and environmental temperature and humidity;

[0054] The running data was processed using a sliding window, with a window length of 300s and a step size of 50s, resulting in 300,000 working condition samples.

[0055] Frequency domain features were extracted using wavelet transform, and component health indicators were obtained using degradation analysis based on a physical model.

[0056] Set the number of clusters K=5, corresponding to low load cruise, medium load cruise, high load acceleration, tactical maneuver and idle speed respectively;

[0057] The fairness constraint has a weight of 0.1, and the balance constraint has a weight of 0.05.

[0058] After 50 iterations of optimization, the clustering results show that the sample size ratio of each working condition cluster is [18%, 25%, 27%, 20%, 10%], the fairness metric is 0.015, the balance metric is 0.008, which meets the preset threshold ≤ 0.02;

[0059] A ResNet50+Bi-LSTM architecture is used as the shared backbone network. The input consists of multi-scale features, including time-series, frequency-domain, and health indicators. The output consists of four task branches.

[0060] Fuel consumption forecast: Unit: kg / kWh, forecasting average fuel consumption over the next 20 minutes;

[0061] Emission target estimates: NOx and CO2 emission concentrations, in ppm;

[0062] Response speed control: The time required for power to switch from 50% to 80%, in seconds;

[0063] Remaining life prediction: High-pressure turbine blades, in hours;

[0064] Model training data: 80% used for training, 20% used for validation;

[0065] After 100 training rounds, the prediction errors on the validation set were: fuel consumption 2.5%, emissions 3.1%, response speed 4.0%, and lifespan prediction 5.2%.

[0066] The goals are to minimize fuel consumption, minimize emissions, minimize response time, and maximize lifespan;

[0067] The MPC control algorithm is used to update the predicted value and generate the optimal control command every 5 seconds;

[0068] In the simulated scenario, with a speed of 22 knots and a power output of 15MW, the optimized system reduced fuel consumption by 4.8%, NOx emissions by 5.5%, power response time by 6.2%, and lifespan consumption by 7.3%.

[0069] In actual operation, the control system recalculates the working condition classification and adjusts the control strategy every 60s;

[0070] If the working condition deviation or model prediction error exceeds 8%, the retraining process is automatically triggered;

[0071] After 100 hours of real ship testing, the system saves an average of 4.5% fuel, reduces emissions by 5.1%, improves dynamic response performance by 6%, and prolongs life by 6.8%.

[0072] Embodiment two, based on the above embodiment, step S2, specifically includes the following steps:

[0073] Step S21: Working condition sample generation, the input data set is divided into segments, each segment forms a working condition sample, and a working condition sample set is constructed;

[0074] Step S22: Vector representation, extract multi-dimensional features from each working condition sample, combine all multi-dimensional features into high-dimensional feature vectors, and each high-dimensional feature vector corresponds to a working condition sample;

[0075] Step S23: Predefine fairness rules, set a fairness measure function as follows:

[0076] ;

[0077] Wherein, is the fairness measure function, is the number of clusters of clustering, is the number of categories, represents the th cluster, is the total number of working condition samples in the th cluster, is the number of working condition samples of the th category in the th cluster;

[0078] Step S24: Add balance constraints, design a balance measure function as follows:

[0079] ;

[0080] Wherein, is the balance measure function, is the total number of working condition samples;

[0081] Step S25: Modify the K-means objective function, embed the fairness measure function as a regularization term into the K-means objective function, and add the balance measure function as a balance constraint term, the modified K-means objective function is as follows:

[0082] ;

[0083] wherein, is the modified K-means objective function, is the center of the cluster, is the weight coefficient of the fairness rule, is the weight coefficient of the balance constraint, represents the high-dimensional feature vector of the working condition sample;

[0084] Step S26: initialization, randomly selecting initial cluster centers , , , initializing the values of and ;

[0085] Step S27: iterative optimization of clustering, setting the maximum number of iterations, performing iterative optimization according to the modified K-means objective function, optimizing the cluster center and sample assignment in an iterative manner until the maximum number of iterations is reached, and obtaining the working condition classification result;

[0086] Step S28: outputting the result, outputting the working condition classification result.

[0087] In this embodiment, 4000 hours of operation data are collected, the sampling frequency is 1 Hz, and a total of 144 million original data records are obtained;

[0088] The data are segmented into segments with a length of 300 s using the sliding window method, and each segment forms a working condition sample;

[0089] A total of 48000 working condition samples are obtained as the basic data for subsequent clustering analysis;

[0090] The following multi-dimensional features are extracted for each working condition sample:

[0091] Time series statistical features: mean, variance, skewness and kurtosis, a total of 10 dimensions;

[0092] Frequency domain features: FFT is used to extract the main frequency amplitude and energy distribution, a total of 8 dimensions;

[0093] Health indicators: compressor efficiency, turbine efficiency, temperature rise coefficient, a total of 5 dimensions;

[0094] Each working condition sample finally forms a 23-dimensional high-dimensional feature vector;

[0095] The number of clustering clusters K is set to 5, and the number of categories M is set to 4, corresponding to the low-load cruise, medium-load cruise, high-load maneuver and idle modes;

[0096] Five working condition samples are randomly selected as initial cluster centers;

[0097] Final operating condition classification results:

[0098] Low load cruise: 20%;

[0099] Medium load cruise: 25%;

[0100] High load maneuver: 28%;

[0101] Idle mode: 27%.

[0102] Example three, based on the above example, step S3, specifically includes the following steps:

[0103] Step S31: Collecting a data set, introducing operating condition classification results, setting label information of fuel consumption, emission indicators, response speed and life prediction, and obtaining a data set containing labels;

[0104] Step S32: Initialize the model, initialize the multi-task learning model, wherein the ResNet model is used as the shared backbone network, including the initial layer, the intermediate layer and the high-level layer, and four task branches are constructed in the high-level layer, including the fuel consumption prediction branch, the emission indicator estimation branch, the response speed control branch and the remaining life prediction branch;

[0105] Step S33: Task vector extraction, using the data set containing labels to jointly train the four task branches, obtaining global task vectors, including fuel consumption prediction vector , emission indicator estimation vector , response speed control vector and remaining life prediction vector , extracting the task vectors of each global task vector in different layers of the shared backbone network as , , and , wherein, represents the number of layers;

[0106] Step S34: Merge coefficient, assign a learnable merging coefficient to each global task vector, and the global merging formula is as follows:

[0107] ;

[0108] wherein, is the parameter of the multi-task learning model, is the pre-training parameter of the shared backbone network, , , and are the global merging weights of the four global task vectors, is an operation for removing parameter redundancy and symbol conflict;

[0109] Step S35: Assign hierarchical coefficients, assign independent weights to the task vectors of each layer, and the hierarchical merging formula is as follows:

[0110] ;

[0111] , is the parameter of the multi-task learning model in the layer, is the pre-training parameter of the shared backbone network in the layer, , , and are hierarchical weights;

[0112] Step S36: Entropy minimization target, use the unlabeled data in step S1 as unlabeled test samples, define the optimization target as minimizing the entropy of the test samples to optimize the merging weight, and the formula used is as follows:

[0113] ;

[0114] , is the number of unlabeled test samples, is the prediction output of the multi-task learning model for the unlabeled test sample, is the calculation formula of the entropy, which is , is the class index, including the categories of fuel consumption, emission indicators, response speed and life prediction, is the probability of being predicted as the category ;

[0115] Step S37: Model evaluation, evaluate the multi-task learning model, set the evaluation target, and continue the iteration of steps S33 to S36 when the evaluation target is not reached, until the evaluation target is reached, and output the evaluated multi-task learning model.

[0116] In this embodiment, the code used is as follows:

[0117] import math

[0118] import random

[0119] from dataclasses import dataclass

[0120] from typing import Dict, Tuple, List

[0121] import torch

[0122] import torch.nn as nn

[0123] import torch.nn.functional as F

[0124] from torch.utils.data import Dataset, DataLoader, random_split

[0125] # =========================

[0126] # 1) Dataset (synthesis, shape simulation)

[0127] # =========================

[0128] class SyntheticTurbineDataset(Dataset):

[0129] """

[0130] Multi-source time-series data simulating ship gas turbines:

[0131] - X: [channels=25, seq_len=300]

[0132] - Four task categories: T1 (10 categories), T2 (10 categories), T3 (8 categories), T4 (12 categories)

[0133] - A portion of the samples are unlabeled. Used for entropy minimization.

[0134] """

[0135] def __init__(self, n_samples=6000, labeled_ratio=0.7, seed=42):

[0136] g = torch.Generator().manual_seed(seed)

[0137] self.X = torch.randn(n_samples, 25, 300, generator=g) # 25 channels, 300 steps

[0138] # Let's mix some "separability" into the data

[0139] for i in range(n_samples):

[0140] # Inject different distributions based on the hidden factor

[0141] mode = i % 5

[0142] self.X[i, mode*5:mode*5+5] += (mode + 1) * 0.4

[0143] # Generate labels for the four tasks

[0144] # Here we construct "ground truth" through some channel energy for multi-task correlation

[0145] feat_energy = self.X.pow(2).mean(dim=(1,2)) # [n]

[0146] t1_cont = feat_energy + 0.3*torch.randn(n_samples, generator=g)

[0147] t2_cont = 0.7*feat_energy + 0.3*torch.randn(n_samples,generator=g)

[0148] t3_cont = -0.5*feat_energy + 0.4*torch.randn(n_samples,generator=g)

[0149] t4_cont = 1.5*feat_energy + 0.2*torch.randn(n_samples,generator=g)

[0150] def to_bins(x, n_bins):

[0151] # Bin to [0, n_bins-1]

[0152] q = torch.quantile(x, torch.linspace(0, 1, n_bins+1,generator=g))

[0153] # Handle repeated quantiles

[0154] q = torch.unique(q, sorted=True)

[0155] # If the number of unique quantiles is insufficient, make a small perturbation.

[0156] while len(q) < n_bins + 1:

[0157] q = torch.sort(torch.cat([q, q[-1:] + 1e-6]))[0]

[0158] idx = torch.bucketize(x, q[1:-1])

[0159] idx = torch.clamp(idx, 0, n_bins-1)

[0160] return idx

[0161] self.y1 = to_bins(t1_cont, 10)

[0162] self.y2 = to_bins(t2_cont, 10)

[0163] self.y3 = to_bins(t3_cont, 8)

[0164] self.y4 = to_bins(t4_cont, 12)

[0165] # Construct a mask: Determine if a sample has a label

[0166] n_labeled = int(n_samples * labeled_ratio)

[0167] self.is_labeled = torch.zeros(n_samples, dtype=torch.bool)

[0168] self.is_labeled[:n_labeled] = True

[0169] # Shuffle

[0170] perm = torch.randperm(n_samples, generator=g)

[0171] self.X = self.X[perm]

[0172] self.y1 = self.y1[perm]

[0173] self.y2 = self.y2[perm]

[0174] self.y3 = self.y3[perm]

[0175] self.y4 = self.y4[perm]

[0176] self.is_labeled = self.is_labeled[perm]

[0177] def __len__(self):

[0178] return self.X.size(0)

[0179] def __getitem__(self, idx):

[0180] item = {

[0181] "x": self.X[idx],

[0182] "is_labeled": self.is_labeled[idx],

[0183] "y1": self.y1[idx],

[0184] "y2": self.y2[idx],

[0185] "y3": self.y3[idx],

[0186] "y4": self.y4[idx],

[0187] }

[0188] return item

[0189] # ==========================================

[0190] # 2) ResNet-style 1D shared backbone + four-task branches

[0191] # Learnable merging coefficients λ with hierarchical / global

[0192] # ==========================================

[0193] class ResidualBlock1D(nn.Module):

[0194] def __init__(self, in_ch, out_ch, k=3, stride=1):

[0195] super().__init__()

[0196] pad = k / / 2

[0197] self.conv1 = nn.Conv1d(in_ch, out_ch, kernel_size=k, stride=stride, padding=pad)

[0198] self.bn1 = nn.BatchNorm1d(out_ch)

[0199] self.conv2 = nn.Conv1d(out_ch, out_ch, kernel_size=k, stride=1, padding=pad)

[0200] self.bn2 = nn.BatchNorm1d(out_ch)

[0201] self.proj = None

[0202] if in_ch!= out_ch or stride!= 1:

[0203] self.proj = nn.Sequential(

[0204] nn.Conv1d(in_ch, out_ch, kernel_size=1, stride=stride),

[0205] nn.BatchNorm1d(out_ch) )

[0207] def forward(self, x):

[0208] identity = x

[0209] out = F.relu(self.bn1(self.conv1(x)))

[0210] out = self.bn2(self.conv2(out))

[0211] if self.proj is not None:

[0212] identity = self.proj(identity)

[0213] out = F.relu(out + identity)

[0214] return out

[0215] class SharedBackbone(nn.Module):

[0216] """

[0217] A three-tiered backbone, with each tier outputting a "tiered feature vector".

[0218] As the source of T_k^L, it is used for hierarchical merging.

[0219] """

[0220] def __init__(self, in_ch=25):

[0221] super().__init__()

[0222] self.stage1 = nn.Sequential(

[0223] ResidualBlock1D(in_ch, 64, k=7, stride=2),

[0224] ResidualBlock1D(64, 64), )

[0226] self.stage2 = nn.Sequential(

[0227] ResidualBlock1D(64, 128, stride=2),

[0228] ResidualBlock1D(128, 128), )

[0230] self.stage3 = nn.Sequential(

[0231] ResidualBlock1D(128, 256, stride=2),

[0232] ResidualBlock1D(256, 256), )

[0234] self.pool = nn.AdaptiveAvgPool1d(1)

[0235] def forward(self, x):

[0236] # x: [B,25,300]

[0237] h1 = self.stage1(x) # Initial stage

[0238] h2 = self.stage2(h1) # Intermediate layer

[0239] h3 = self.stage3(h2) # Higher level

[0240] g1 = self.pool(h1).squeeze(-1) # [B,64]

[0241] g2 = self.pool(h2).squeeze(-1) # [B,128]

[0242] g3 = self.pool(h3).squeeze(-1) # [B,256]

[0243] return (g1, g2, g3) # As a "shared feature" across layers

[0244] class MTLHeads(nn.Module):

[0245] """

[0246] Four-task branch. Each task generates a task vector T_k^L at each level.

[0247] Then, the hierarchical coefficient λ_k^L is used for merging; each task also has a global coefficient λ_k for final merging.

[0248] Here, an "adapter" is used to simulate ∅(·) for redundancy removal and sign conflict correction.

[0249] """

[0250] def __init__(self, dims=(64,128,256), n_classes=(10,10,8,12)):

[0251] super().__init__()

[0252] d1,d2,d3 = dims

[0253] c1,c2,c3,c4 = n_classes

[0254] def adapter(in_dim, out_dim):

[0255] return nn.Sequential(

[0256] nn.LayerNorm(in_dim),

[0257] nn.Linear(in_dim, out_dim),

[0258] nn.ReLU(), )

[0260] # Each layer assigns an adapter to each task to obtain T_k^L

[0261] self.adp_t1_l1 = adapter(d1, 64); self.adp_t1_l2 = adapter(d2, 64); self.adp_t1_l3 = adapter(d3, 64)

[0262] self.adp_t2_l1 = adapter(d1, 64); self.adp_t2_l2 = adapter(d2, 64); self.adp_t2_l3 = adapter(d3, 64)

[0263] self.adp_t3_l1 = adapter(d1, 64); self.adp_t3_l2 = adapter(d2, 64); self.adp_t3_l3 = adapter(d3, 64)

[0264] self.adp_t4_l1 = adapter(d1, 64); self.adp_t4_l2 = adapter(d2, 64); self.adp_t4_l3 = adapter(d3, 64)

[0265] # Layer-wise coefficients λ_k^L initialized to uniform

[0266] self.lambda_l_t1 = nn.Parameter(torch.tensor([0.33,0.33,0.34], dtype=torch.float))

[0267] self.lambda_l_t2 = nn.Parameter(torch.tensor([0.33,0.33,0.34], dtype=torch.float))

[0268] self.lambda_l_t3 = nn.Parameter(torch.tensor([0.33,0.33,0.34], dtype=torch.float))

[0269] self.lambda_l_t4 = nn.Parameter(torch.tensor([0.33,0.33,0.34], dtype=torch.float))

[0270] # Global coefficient λ_k initialized to 1 / 4

[0271] self.lambda_g = nn.Parameter(torch.tensor([0.25,0.25,0.25,0.25], dtype=torch.float))

[0272] # Final classification heads

[0273] self.head1 = nn.Linear(64, c1)

[0274] self.head2 = nn.Linear(64, c2)

[0275] self.head3 = nn.Linear(64, c3)

[0276] self.head4 = nn.Linear(64, c4)

[0277] def _combine_layerwise(self, lambdas, t_l1, t_l2, t_l3):

[0278] # Softmax-normalized layer coefficients

[0279] w = F.softmax(lambdas, dim=0)

[0280] return w[0]*t_l1 + w[1]*t_l2 + w[2]*t_l3

[0281] def forward(self, g1, g2, g3):

[0282] # Generate T_k^L for each task

[0283] t1_l1 = self.adp_t1_l1(g1); t1_l2 = self.adp_t1_l2(g2); t1_l3= self.adp_t1_l3(g3)

[0284] t2_l1 = self.adp_t2_l1(g1); t2_l2 = self.adp_t2_l2(g2); t2_l3= self.adp_t2_l3(g3)

[0285] t3_l1 = self.adp_t3_l1(g1); t3_l2 = self.adp_t3_l2(g2); t3_l3= self.adp_t3_l3(g3)

[0286] t4_l1 = self.adp_t4_l1(g1); t4_l2 = self.adp_t4_l2(g2); t4_l3= self.adp_t4_l3(g3)

[0287] # Layerwise combination, corresponding to the integration of θ_MTL^L

[0288] T1 = self._combine_layerwise(self.lambda_l_t1, t1_l1, t1_l2,t1_l3)

[0289] T2 = self._combine_layerwise(self.lambda_l_t2, t2_l1, t2_l2,t2_l3)

[0290] T3 = self._combine_layerwise(self.lambda_l_t3, t3_l1, t3_l2,t3_l3)

[0291] T4 = self._combine_layerwise(self.lambda_l_t4, t4_l1, t4_l2,t4_l3)

[0292] # Global merge, corresponding to the idea of θ_MTL = θ_pre + Σ λ_k ∅(T_k)

[0293] wg = F.softmax(self.lambda_g, dim=0) # Normalize global weights

[0294] # Here, "convex combination" is used to express the idea of global merging; at the implementation level, output each task's own head,

[0295] # while allowing λ_g to be optimized in the semi-supervised entropy stage.

[0296] y1 = self.head1(T1)

[0297] y2 = self.head2(T2)

[0298] y3 = self.head3(T3)

[0299] y4 = self.head4(T4)

[0300] aux_global_feature = wg[0]*T1 + wg[1]*T2 + wg[2]*T3 + wg[3]*T4 # If needed, you can connect a comprehensive head again

[0301] return (y1,y2,y3,y4), (T1,T2,T3,T4), aux_global_feature

[0302] class MTLModel(nn.Module):

[0303] def __init__(self):

[0304] super().__init__()

[0305] self.backbone = SharedBackbone(in_ch=25)

[0306] self.heads = MTLHeads(dims=(64,128,256), n_classes=(10,10,8,12))

[0307] def forward(self, x):

[0308] g1, g2, g3 = self.backbone(x)

[0309] (y1,y2,y3,y4), (T1,T2,T3,T4), g = self.heads(g1,g2,g3)

[0310] return (y1,y2,y3,y4), (T1,T2,T3,T4), g

[0311] # =========================

[0312] #3) Training and Assessment

[0313] # =========================

[0314] @dataclass

[0315] class TrainConfig:

[0316] batch_size:int = 64

[0317] lr:float = 1e-3

[0318] epochs_supervised:int = 5

[0319] epochs_entropy:int = 3

[0320] device:str = "cuda" if torch.cuda.is_available() else "cpu"

[0321] def entropy_minimization_loss(logits_list: List[torch.Tensor]) ->torch.Tensor:

[0322] For unlabeled samples: Minimize the entropy of the prediction distribution for each task.

[0323] loss = 0.0

[0324] for logits in logits_list:

[0325] p = F.softmax(logits, dim=1)

[0326] ent = -(p * (p.clamp_min(1e-8)).log()).sum(dim=1) # H(p) = -Σ p log p

[0327] loss = loss + ent.mean()

[0328] return loss / len(logits_list)

[0329] def accuracy(logits, y):

[0330] pred = logits.argmax(dim=1)

[0331] return (pred == y).float().mean().item()

[0332] def run():

[0333] cfg = TrainConfig()

[0334] ds = SyntheticTurbineDataset(n_samples=6000, labeled_ratio=0.7,seed=123)

[0335] # Divide into training / validation

[0336] n_train = int(0.8*len(ds))

[0337] n_val = len(ds) - n_train

[0338] ds_train, ds_val = random_split(ds, [n_train, n_val], generator=torch.Generator().manual_seed(1))

[0339] dl_train = DataLoader(ds_train, batch_size=cfg.batch_size, shuffle=True, drop_last=True)

[0340] dl_val = DataLoader(ds_val, batch_size=cfg.batch_size, shuffle=False)

[0341] model = MTLModel().to(cfg.device)

[0342] opt = torch.optim.AdamW(model.parameters(), lr=cfg.lr)

[0343] ce = nn.CrossEntropyLoss()

[0344] # -------- Stage 1: Joint training with labels, corresponding to S31~S35 --------

[0345] print("== Supervised joint training ==")

[0346] for epoch in range(cfg.epochs_supervised):

[0347] model.train()

[0348] for batch in dl_train:

[0349] x = batch["x"].to(cfg.device)

[0350] y1 = batch["y1"].to(cfg.device)

[0351] y2 = batch["y2"].to(cfg.device)

[0352] y3 = batch["y3"].to(cfg.device)

[0353] y4 = batch["y4"].to(cfg.device)

[0354] is_labeled = batch["is_labeled"].to(cfg.device)

[0355] (o1, o2, o3, o4) = model(x)

[0356] # Only compute cross entropy for labeled samples

[0357] mask = is_labeled

[0358] if mask.any():

[0359] loss = 0.0

[0360] loss += ce(o1[mask], y1[mask])

[0361] loss += ce(o2[mask], y2[mask])

[0362] loss += ce(o3[mask], y3[mask])

[0363] loss += ce(o4[mask], y4[mask])

[0364] loss = loss / 4.0

[0365] else:

[0366] loss = torch.zeros([], device=cfg.device)

[0367] opt.zero_grad(set_to_none=True)

[0368] loss.backward()

[0369] opt.step()

[0370] # Validation set evaluation

[0371] model.eval()

[0372] n = 0

[0373] accs = [0,0,0,0]

[0374] with torch.no_grad():

[0375] for batch in dl_val:

[0376] x = batch["x"].to(cfg.device)

[0377] y1 = batch["y1"].to(cfg.device)

[0378] y2 = batch["y2"].to(cfg.device)

[0379] y3 = batch["y3"].to(cfg.device)

[0380] y4 = batch["y4"].to(cfg.device)

[0381] (o1,o2,o3,o4) = model(x)

[0382] accs[0] += accuracy(o1,y1)*x.size(0)

[0383] accs[1] += accuracy(o2,y2)*x.size(0)

[0384] accs[2] += accuracy(o3,y3)*x.size(0)

[0385] accs[3] += accuracy(o4,y4)*x.size(0)

[0386] n += x.size(0)

[0387] accs = [a / n for a in accs]

[0388] print(f"Epoch {epoch+1} / {cfg.epochs_supervised} Val Acc T1 / T2 / T3 / T4: ​​"

[0389] f"{accs[0]:.3f} / {accs[1]:.3f} / {accs[2]:.3f} / {accs[3]:.3f}")

[0390] # -------- Phase 2: Minimizing the Entropy of Unlabeled Samples (S36) --------

[0391] # Optimizing only the learnable λ is also feasible; here we simplify to optimizing the parameters of the entire model, focusing on the adaptive changes of λ.

[0392] print("\n== Entropy minimization on unlabeled data ==")

[0393] # To make it closer to "optimize lambda", let lambda parameters participate in optimization, and the rest are frozen.

[0394] for p in model.parameters():

[0395] p.requires_grad_(False)

[0396] # Make lambda related parameters learnable

[0397] for p in [model.heads.lambda_g,

[0398] model.heads.lambda_l_t1,

[0399] model.heads.lambda_l_t2,

[0400] model.heads.lambda_l_t3,

[0401] model.heads.lambda_l_t4]:

[0402] p.requires_grad_(True)

[0403] opt_lambda = torch.optim.Adam([model.heads.lambda_g,

[0404] model.heads.lambda_l_t1,

[0405] model.heads.lambda_l_t2,

[0406] model.heads.lambda_l_t3,

[0407] model.heads.lambda_l_t4], lr=1e-2)

[0408] for epoch in range(cfg.epochs_entropy):

[0409] for batch in dl_train:

[0410] x = batch["x"].to(cfg.device)

[0411] is_labeled = batch["is_labeled"].to(cfg.device)

[0412] # Only entropy minimization on "unlabeled samples"

[0413] mask_u = ~is_labeled

[0414] if not mask_u.any():

[0415] continue

[0416] (o1,o2,o3,o4) = model(x)

[0417] logits_u = [o1[mask_u], o2[mask_u], o3[mask_u], o4[mask_u]]

[0418] loss_ent = entropy_minimization_loss(logits_u)

[0419] opt_lambda.zero_grad(set_to_none=True)

[0420] loss_ent.backward()

[0421] opt_lambda.step()

[0422] lg = F.softmax(model.heads.lambda_g.detach().cpu(), dim=0).tolist()

[0423] print(f"Epoch {epoch+1} / {cfg.epochs_entropy_entropy} entropyminimized. "

[0424] f"Global lambdas (softmax): {', '.join(f'{v:.3f}' for vin lg)}")

[0425] # -------- Stage 3: Final evaluation (S37)--------

[0426] # Unfreeze, do one joint evaluation

[0427] for p in model.parameters():

[0428] p.requires_grad_(True)

[0429] print("\n== Final evaluation on validation set ==")

[0430] model.eval()

[0431] n = 0

[0432] accs = [0,0,0,0]

[0433] with torch.no_grad():

[0434] for batch in dl_val:

[0435] x = batch["x"].to(cfg.device)

[0436] y1 = batch["y1"].to(cfg.device)

[0437] y2 = batch["y2"].to(cfg.device)

[0438] y3 = batch["y3"].to(cfg.device)

[0439] y4 = batch["y4"].to(cfg.device)

[0440] (o1,o2,o3,o4) = model(x)

[0441] accs[0] += accuracy(o1,y1)*x.size(0)

[0442] accs[1] += accuracy(o2,y2)*x.size(0)

[0443] accs[2] += accuracy(o3,y3)*x.size(0)

[0444] accs[3] += accuracy(o4,y4)*x.size(0)

[0445] n += x.size(0)

[0446] accs = [a / n for a in accs]

[0447] print(f"Final Val Acc T1 / T2 / T3 / T4: {accs[0]:.3f} / {accs[1]:.3f} / {accs[2]:.3f} / {accs[3]:.3f}")

[0448] if __name__ == "__main__":

[0449] run()。

[0450] It is to be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting. It is also possible in the present application that units and elements are combined to provide further functionality than that described herein. For example, a UMTS network element can also be used in a GSM network. Further combinations are envisioned. Moreover, although the application has been described in some detail with reference to certain embodiments thereof, it is not intended to limit or restrict the application in any way but rather for the purposes of illustration only. Various modifications to the embodiments described herein will be apparent to those skilled in the art from this description and the accompanying drawings without departing from the spirit and scope of the application as described by the appended claims. Therefore, it is the intent that the application not be limited to the described embodiments but encompass modifications and variations of the described embodiments consistent with the principles of the application.

[0451] Although the present application has been described with reference to particular embodiments thereof, it is to be understood that these are not limiting examples of the application and that various changes in the details thereof can be made without departing from the spirit of the application. The scope of the application is defined by the appended claims and equivalents thereof.

[0452] The above description of the application and its embodiments is not intended to limit the application, and the drawings shown are only one of the embodiments of the application, and the actual structure is not limited thereto. In general, if a person skilled in the art is inspired by it, without departing from the purpose of the application, without creative design, similar structure and embodiments of the technical solution can be designed, which should belong to the protection scope of the application.

Claims

1. A ship gas turbine multi-objective optimization control method based on artificial intelligence, characterized in that: The method comprises the following steps: Step S1: data acquisition and feature construction, collecting multi-source data of the ship gas turbine, dividing into labeled data and unlabeled data, constructing multi-scale features for the labeled data, and forming an input data set of the clustering and multi-task model; Step S2: using fairness constraints and balance constraints for working condition clustering, using a K-means clustering algorithm embedded with fairness constraints and balance constraints to classify the input data set, and obtaining a working condition classification result; Step S3: multi-target modeling based on multi-task learning, designing a shared backbone network based on a deep neural network that fuses time sequence feature extraction and multi-dimensional sensor feature encoding, constructing a multi-task model, wherein a plurality of task branches are constructed, including fuel consumption prediction, emission index estimation, response speed control, and residual life prediction, and obtaining a prediction result through a global weight merging strategy and a hierarchical weight merging strategy; Step S4: multi-objective optimization strategy generation, based on the prediction result, constructing a multi-objective optimization problem, and generating an optimal strategy set using an MPC control algorithm; Step S5: online control and adaptive adjustment, based on the working condition classification result, the prediction result, and the optimal strategy set, performing real-time control.

2. The artificial intelligence-based multi-objective optimization control method for a marine gas turbine according to claim 1, characterized in that: Step S2, specifically comprising the following steps: Step S21: working condition sample generation, dividing the input data set into segments, each segment forming a working condition sample, and constructing a working condition sample set; Step S22: vectorization representation, extracting multi-dimensional features from each working condition sample, and combining all multi-dimensional features into a high-dimensional feature vector, each high-dimensional feature vector corresponding to a working condition sample; Step S23: predefining fairness rules, setting a fairness measurement function as follows: ; wherein, is a fairness metric function, is the number of clusters of the clustering, is the number of classes, denotes the th cluster, is the total number of working condition samples of the th cluster, is the number of working condition samples of the th class in the th cluster; Step S24: adding balance constraints, designing a balance measurement function as follows: ; wherein, is the balanced metric function, is the total number of working condition samples; Step S25: modifying the K-means objective function, embedding the fairness measurement function as a regularization term into the K-means objective function, and adding the balance measurement function as a balance constraint term, the modified K-means objective function being as follows: ; wherein, is the modified K-means objective function, is the center of the cluster, is the weight coefficient of the fairness rule, is the weight coefficient of the balance constraint, represents the high-dimensional feature vector of the working condition sample; Step S26: initialization, randomly select one initial cluster center , , , initialize and values; Step S27: iterative optimization clustering, setting a maximum number of iterations, and performing iterative optimization according to the modified K-means objective function, optimizing cluster centers and sample assignments through iteration until the maximum number of iterations is reached, and obtaining a working condition classification result; Step S28: output result, outputting the working condition classification result.

3. The artificial intelligence-based multi-objective optimization control method for a marine gas turbine according to claim 2, characterized in that: Step S3, specifically comprising the following steps: Step S31: collecting the data set, introducing the working condition classification result, setting label information for fuel consumption, emission index, response speed, and life prediction, and obtaining a data set containing labels; Step S32: initializing the model, initializing the multi-task learning model, wherein a ResNet model is used as a shared backbone network, including an initial layer, an intermediate layer, and a high-level layer, and four task branches are constructed in the high-level layer, including a fuel consumption prediction branch, an emission index estimation branch, a response speed control branch, and a residual life prediction branch; Step S33: task vector extraction, jointly training four task branches using a labeled dataset to obtain global task vectors, including fuel consumption prediction vector , emission index estimation vector , response speed control vector , and remaining life prediction vector , extracting the task vectors of each global task vector at different layers in the shared backbone network as 、 、 and , wherein represents the number of layers; Step S34: merging coefficient, assigning a learnable merging coefficient to each global task vector, and the global merging formula being as follows: ; wherein, are parameters of the multi-task learning model, are pre-training parameters of the shared backbone network, , , and are global merging weights of the four global task vectors, is an operation of removing parameter redundancy values and sign conflicts. Step S35: Assigning hierarchical coefficients, assigning independent weights to the task vectors of each layer, and the hierarchical merging formula is as follows: ; wherein, are pre-training parameters of the shared backbone network at the i-th layer, are parameters of the multi-task learning model at the i-th layer, are pre-training parameters of the shared backbone network at the i-th layer, are pre-training parameters of the shared backbone network at the i-th layer, , , and are hierarchical weights; Step S36: Entropy minimization target, using the unlabeled data in step S1 as unlabeled test samples, defining the optimization target as minimizing the entropy of the test samples to optimize the merging weight, and the formula used is as follows: ; in, The number of unlabeled test samples. For multi-task learning models to test unlabeled test samples The predicted output, The formula for calculating entropy is as follows: , The index is categorized, including categories such as fuel consumption, emissions metrics, response speed, and lifespan prediction. for Predicted as category The probability of; Step S37: Model evaluation, evaluating the multi-task learning model, setting the evaluation target, and continuing the iteration of steps S33 to S36 when the evaluation target is not reached, until the evaluation target is reached, and outputting the evaluation completed multi-task learning model.

Citation Information

Patent Citations

  • Vessel data relationship extraction method based on PGM and PSO clustering

    CN111626343A

  • Self-adaptive control method and system for ship gas turbine under complex working conditions

    CN116466567A