A Method and System for Predicting the Operation Status of Port Shore Power Systems Based on Digital Twins
By constructing a digital twin-based method for predicting the operating status of port shore power systems and utilizing an adaptive kernel bandwidth function to adjust the model, the problem of inaccurate predictions by fixed-structure models under different operating conditions was solved. This method achieves high-precision load forecasting and risk identification, thereby improving the safety and reliability of port shore power systems.
Patent Information
- Application Number
- CN202511517094.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-23
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2045-10-23
AI Technical Summary
Existing port shore power system load forecasting methods, due to their use of fixed structure models, are difficult to adapt to the differences in dynamic characteristics under different operating conditions, resulting in inaccurate forecasts in high-risk areas and failing to meet the safety and reliability requirements of the power supply system.
A method for predicting the operational status of port shore power systems based on digital twins is constructed. By acquiring historical power and environmental data, a joint feature space is established, which is discretized into grid points. Dynamic instability is calculated, an adaptive kernel bandwidth function is constructed, the kernel function bandwidth is adaptively adjusted, and local weighted least squares solution is performed to generate a dedicated state transition matrix and environmental impact matrix, thereby achieving adaptive load prediction.
It achieves high-precision load forecasting under different operating conditions, can identify potential risks in advance, improve system safety and reliability, adapt to complex and variable operating conditions, and enhance forecasting capabilities.
Smart Images

Figure CN120996298B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing. More specifically, this invention relates to a method and system for predicting the operational status of port shore power systems based on digital twins. Background Technology
[0002] As a key facility connecting ships and the land-based power grid, the accuracy of port shore power systems directly impacts power supply security and energy efficiency. With the deepening development of industrial automation and intelligence, digital twin technology, as an innovative method that deeply integrates the physical world with virtual models, is providing a new perspective for the monitoring, analysis, and prediction of complex systems. Digital twins construct virtual mirror images of physical systems, enabling real-time data interaction and synchronization between physical entities and virtual models, thereby accurately representing and predicting the state of the physical system.
[0003] Existing port load forecasting methods mostly use fixed structure models. Such models are difficult to adapt to the dynamic characteristics of port shore power systems under different operating conditions. For example, under the same high temperature and high humidity weather conditions, the load response characteristics of a shore power system under a light load with a single ship are fundamentally different from those of a system under a full load with multiple ships. The former may only show small fluctuations, while the latter may be extremely sensitive to environmental changes and easily enter an unstable state. When multiple large ships are connected at the same time and the system approaches the upper limit of power supply capacity, its dynamic law becomes extremely sensitive to small disturbances.
[0004] Traditional methods lack the ability to identify the dynamic stability of a system. When faced with different operating scenarios, they cannot adaptively adjust their modeling strategies, resulting in inaccurate predictions when the system is in a critical region, while overfitting may occur in a stable region. This limits the overall prediction performance and makes it difficult to meet the high requirements of modern ports for the safety and reliability of power supply systems. Summary of the Invention
[0005] To address the technical problem that existing prediction methods, which employ fixed-structure models, are ill-suited to the dynamic characteristics of port shore power systems under different operating conditions, this invention provides solutions in the following aspects.
[0006] In a first aspect, the present invention provides a method for predicting the operating status of a port shore power system based on digital twins, comprising:
[0007] Historical power data of the port shore power system is used to construct an endogenous state vector sequence, and external environmental monitoring data is used to construct an environmental parameter vector sequence. A joint feature space is constructed based on the endogenous state vector and the environmental parameter vector.
[0008] The joint feature space is discretized into a set of grid points; for each grid point, a local state transition matrix is estimated using historical data in the neighborhood of the grid point; the difference between the state transition matrix at each grid point and the state transition matrices of its neighboring grid points is calculated to obtain the dynamic instability of that grid point; the dynamic instability of all grid points is nonlinearly fitted to obtain a dynamic instability map;
[0009] An adaptive kernel bandwidth function is constructed based on the dynamic instability map. The adaptive kernel bandwidth function is used to adaptively adjust the kernel function bandwidth for the endogenous state vector and the kernel function bandwidth for the environment parameter vector according to the dynamic instability of the current system situation.
[0010] Obtain the joint feature points of the system at the current moment, calculate the kernel function bandwidth at the current moment based on the joint feature points and the adaptive kernel bandwidth function, use the kernel function bandwidth at the current moment to weight the historical data, solve the local weighted least squares problem, and obtain the state transition matrix and environmental influence matrix specific to the current moment.
[0011] Based on the current state transition matrix and environmental impact matrix, the future operating status of the port shore power system is predicted.
[0012] Preferably, the step of constructing a joint feature space based on the endogenous state vector and the environmental parameter vector includes:
[0013] For any target time Define a joint feature point ;
[0014] in, Indicates the target time The joint feature points; This represents the endogenous state vector of the previous time step; This represents the environmental parameter vector at the current moment.
[0015] Preferably, estimating a local state transition matrix using historical data within the neighborhood of a grid point includes:
[0016] For each grid point in the set, the weights of historical samples in the neighborhood are calculated using a preset initial kernel function bandwidth, and the local weighted least squares problem is solved to obtain the state transition matrix at that grid point.
[0017] Preferably, the dynamic instability satisfies the expression:
[0018] ;
[0019] In the formula, Represents grid points Dynamic instability at the location; Represents grid points The set of topological neighborhoods; Represents grid points and Distance weights between them; Represents grid points The state transition matrix at the location; Represents grid points The state transition matrix at the location; This represents the Frobenius norm.
[0020] Preferably, the adaptive kernel bandwidth function satisfies the expression:
[0021] ;
[0022] ;
[0023] In the formula, Indicates at joint feature points Used for endogenous state vectors kernel function bandwidth; Indicates at joint feature points Used for environmental parameter vectors kernel function bandwidth; Indicates at point Dynamic instability at the location; Represents the global scaling constant of the state space; Represents the global scaling constant of the environment space; For hyperparameters used when the denominator is 0; This represents the minimum value of the state kernel bandwidth; This represents the maximum value of the state kernel bandwidth; This represents the minimum value of the environment's kernel bandwidth; This indicates the maximum value of the environment's kernel bandwidth.
[0024] Preferably, the historical data is weighted using the kernel function bandwidth at the current moment, including:
[0025] Based on the kernel function bandwidth at the current moment, a multiplicative double kernel function consisting of a state kernel function and an environment kernel function is constructed; the weight of each moment in the historical data is calculated using the multiplicative double kernel function.
[0026] Preferably, the weight of each moment in the historical data is calculated, including:
[0027] ;
[0028] In the formula, Indicates time Unnormalized weights; Represents the state kernel function; Represents the environment kernel function; Representing historical moments The endogenous state vector; This represents the endogenous state vector of the previous time step at the current time step; Representing historical moments The environmental parameter vector; This represents the environmental parameter vector at the current moment; Indicates the state kernel bandwidth; This indicates the environmental kernel bandwidth.
[0029] Preferably, solving the local weighted least squares problem to obtain the state transition matrix and environmental influence matrix specific to the current time step includes:
[0030] ;
[0031] In the formula, Represents the state transition matrix; Represents the environmental impact matrix; Indicates the normalized weights; Representing historical moments The endogenous state vector; Representing historical moments The endogenous state vector; Representing historical moments The environment parameter vector.
[0032] Preferably, the step of predicting the future operating state of the port shore power system based on the current-time-specific state transition matrix and environmental influence matrix includes:
[0033] Utilizing the state transition matrix specific to the current moment Environmental Impact Matrix In combination with the latest historical situation Based on predictions of future environmental inputs, the predicted values of future states are calculated using a vector autoregressive exogenous model:
[0034] ;
[0035] In the formula, express Predicted value after step; This represents the state transition matrix specific to the current moment; express Predicted value after step; This represents the environmental impact matrix specific to the current moment. express The environmental parameter vector after the step; This indicates the prediction step size.
[0036] Secondly, the present invention provides a port shore power system operation status prediction system based on digital twins, including a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned port shore power system operation status prediction method based on digital twins is implemented.
[0037] By adopting the above technical solution, the above-mentioned method for predicting the operating status of port shore power systems based on digital twins is generated into a computer program and stored in a memory so that it can be loaded and executed by a processor. In this way, a terminal device can be made based on the memory and the processor for convenient use.
[0038] The beneficial effects of this invention are as follows: This invention comprehensively characterizes the operating conditions of a port shore power system by constructing a joint feature space that integrates endogenous state vectors and environmental parameter vectors, providing a complete initial condition description for subsequent modeling; this invention analyzes historical data through an offline learning process to construct a dynamic instability map, reflecting the sensitivity of the system to changes in its inherent laws under different operating conditions, providing key prior knowledge for the online adaptive adjustment of the model; this invention designs an adaptive kernel bandwidth function that is inversely proportional to the system's dynamic instability, enabling the model to automatically improve resolution in high-risk critical regions and automatically expand the observation field in stable regions; this invention customizes a specific prediction model for the current situation through an adaptively adjusted dual kernel function, achieving adaptive load prediction; this invention integrates real-time prediction functionality into the digital twin model of the port shore power system, achieving real-time synchronization between the physical system and the digital model. This invention effectively solves the problem that traditional fixed-scale models struggle to balance accuracy and robustness under complex and variable operating conditions. It enables the model to dynamically adjust its prediction accuracy based on the current operating state, focusing on potential abnormal behaviors of the system in high-risk areas and improving prediction efficiency in stable areas. This significantly enhances the predictive ability for critical fluctuation periods, providing reliable data support for the safe, efficient, and economical operation of port shore power systems. It also enables shore power systems to identify potential risks in advance and take preventative measures, thereby improving the safety and reliability of the system. Attached Figure Description
[0039] Figure 1 This is a flowchart illustrating the port shore power system operation status prediction method based on digital twins in this invention;
[0040] Figure 2 This is a comparison chart of the final predicted results and the actual load curve. Detailed Implementation
[0041] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0042] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0043] This invention discloses a method for predicting the operating status of port shore power systems based on digital twins, referring to... Figure 1 This includes steps S1-S4:
[0044] S1. Obtain historical power data of the port shore power system to form an endogenous state vector sequence, and external environmental monitoring data to form an environmental parameter vector sequence. Construct a joint feature space based on the endogenous state vector and the environmental parameter vector.
[0045] It should be noted that the dynamic behavior of port shore power systems is simultaneously influenced by both internal operating conditions and external environmental factors. Considering only a single dimension will fail to fully characterize the system's evolution at any given moment. For example, under the same high temperature and humidity conditions, the load response characteristics of a shore power system operating with a single vessel under light load differ significantly from those of a system operating with multiple vessels under full load. The former may exhibit only minor fluctuations, while the latter may be extremely sensitive to environmental changes and prone to instability. Therefore, to accurately describe the system's operating conditions, this invention constructs a joint feature space that integrates the system's internal state and external environment. This joint feature space includes a high-frequency endogenous state vector reflecting the system's current power state and a slowly varying environmental parameter vector characterizing external conditions, thus providing a complete initial condition description for subsequent dynamic modeling.
[0046] Specifically, high-frequency historical power data of the port shore power system is acquired to construct an endogenous state vector sequence, wherein the endogenous state vector at each time step is... It is a multi-dimensional column vector, and the endogenous state vector includes the total active power, total reactive power, average three-phase voltage of A / B / C, average three-phase current of A / B / C, and system power factor.
[0047] Simultaneously acquire external environmental monitoring data within the same time period as high-frequency historical power data to construct a slowly varying environmental parameter vector sequence, where the environmental parameter vector at each moment... As a multi-dimensional column vector, the environmental parameter vector includes real-time ambient temperature, relative humidity, wind speed, wind direction, and astronomical tidal height of the port location. Optionally, the environmental parameter vector also includes scheduling data reflecting the intensity of port operations, such as the number of ships currently in port and the number of containers planned for operation, after quantification.
[0048] Before constructing joint feature points, this invention examines the endogenous state vector. and environmental parameter vector Each dimension is standardized to have zero mean and unit variance, thus eliminating the impact of dimensional differences on subsequent calculations.
[0049] Furthermore, for any target time... Define a joint feature point that can completely describe the initial conditions of its dynamic evolution:
[0050]
[0051] in, Indicates the target time The joint feature points; This represents the endogenous state vector of the previous time step; This represents the environmental parameter vector at the current moment. Entering the system The initial state at a given moment directly determines the system's performance. The dynamic response characteristics at any given time, and These external environmental conditions characterize the system's behavior, and together they constitute the complete boundary conditions for the system's dynamic evolution. For example, in a port shore power system, when... The total active power value is relatively large and When the wind speed is high, the system is often in a high-risk critical state, and at this time the system's dynamics are extremely sensitive to small disturbances.
[0052] This invention adopts Instead As a characteristic because Direct characterization system entry The initial dynamic state at time t, while avoiding real-time prediction. To address the issue of future information leakage due to unknown factors, this invention combines endogenous state vectors and environmental parameter vectors to construct a joint feature space that integrates the internal operating state of the system with the influence of the external environment, laying the foundation for subsequent accurate modeling. This joint feature space is the core data foundation for constructing a digital twin model of a port shore power system. By synchronizing the physical system state to the digital twin model in real time, it enables precise mapping of the physical system.
[0053] S2. Discretize the joint feature space into a set of grid points. For each grid point, estimate a local state transition matrix using historical data in the neighborhood of the grid point. Calculate the difference between the state transition matrix at each grid point and the state transition matrices of its neighboring grid points to obtain the dynamic instability of the grid points. Perform nonlinear fitting on the dynamic instability of all grid points to obtain a dynamic instability map.
[0054] It should be noted that the dynamic stability of a system is not constant under different operating conditions. When the system is in a critical state, its inherent laws become extremely sensitive to small disturbances. If a fixed-scale modeling method is used, it is difficult to accurately capture such dynamic characteristics. For example, in a port shore power system, when the system is in a combined area of high temperature, full load, and high tidal level, its load fluctuation characteristics often become abnormally drastic and extremely sensitive to small disturbances. If a fixed-scale modeling method is still used at this time, it will be unable to accurately capture this critical behavior, leading to inaccurate predictions. Therefore, this invention uses an offline learning process to pre-construct a dynamic instability map that can depict the rate of change of dynamic laws across the entire space, providing crucial prior knowledge for the subsequent online adaptive adjustment of the model.
[0055] Specifically, all joint feature points in historical data The constructed space is discretized at multiple levels based on the empirical distribution percentiles of variables in each dimension, generating a representative set of multidimensional grid points. ,in, The number of grid points should be set reasonably based on the amount of historical data and computing resources. For a typical port shore power system, the initial setting is... to In other embodiments, the implementer may select the number of grid points based on the actual implementation situation.
[0056] For each grid point in the set Using its coordinates as the center, historical samples are selected from the neighborhood within the global scope. And using a preset initial kernel bandwidth Calculate the weight of each sample Then, the local weighted least squares problem is solved to obtain the state transition matrix and the environmental influence matrix:
[0057]
[0058] in, This represents a local estimate of the state transition matrix; This represents a local estimate of the environmental impact matrix; Indicates at grid points First The weights of each sample; Indicates the first The endogenous state vector at time t; Indicates the first The endogenous state vector at time t; Indicates the first The environment parameter vector at any given time; Indicates the initial kernel function bandwidth; Indicates the first Grid points.
[0059] Among them, weight Calculated using the Gaussian kernel function:
[0060]
[0061] in, Indicates the first Joint feature points of historical samples; Indicates the first 1 grid point; Denotes the Euclidean norm; This represents the initial kernel bandwidth. It should be noted that the initial kernel bandwidth... The value of should be small enough to ensure the accuracy of local estimation. In this embodiment, it is set to the joint feature space diameter. In other embodiments, the implementer can set the value according to the actual implementation situation. For example, set as the diameter of the joint feature space. to The value is 1 times the value of the joint feature space diameter, which is the maximum Euclidean distance between any two points in the joint feature space.
[0062] This invention estimates the values at grid points using a locally weighted least squares method. Within a small, nearby area, the linear relationship between the system state and environmental factors on the system state at the next moment is observed. For example, in a port shore power system, when... When the absolute values of some elements are large, it indicates that the system state has strong autocorrelation, and the system may be in a stationary region; when When the element values change drastically, it indicates that the system is in a dynamically unstable region. The greater the change in element values, the more difficult it is to predict the dynamic behavior of the system in that region.
[0063] Furthermore, for each grid point Calculate its state transition matrix All topologically adjacent grid points State transition matrix Frobenius norm difference between These differences are then averaged over the number of neighbors to obtain the preliminary dynamic instability of the point:
[0064]
[0065] in, Represents grid points Dynamic instability at the location; Represents grid points The set of topological neighborhoods; Represents grid points and Distance weights between them; Represents grid points The state transition matrix at the location; Represents grid points The state transition matrix at the location; This represents the Frobenius norm. In this invention, the topological neighborhood set... Defined as the relationship between grid points in grid space. All grid points with a Manhattan distance of 1, distance weight Defined as grid point and The reciprocal of the Euclidean distance between them.
[0066] It should be noted that this invention reflects the sensitivity of the system's dynamic laws by measuring the rate of change of local parameters in space. In port shore power systems, when A large value indicates that the system's dynamics in that region are extremely sensitive to small disturbances, and it is in a critically unstable state. For example, this occurs when the system is in a combined region of high temperature, full load, and high tidal levels. Often reaching its peak, the larger the value of this indicator, the more difficult it is to predict the dynamic behavior of the system in that region, requiring more refined modeling and processing; when When the value approaches zero, it indicates that the dynamic changes of the system in that region are gradual, and the system is in a stable state. This invention uses a weighted average instead of a simple average, which avoids the problem of the instability index being systematically low due to the small number of neighbors at the boundary grid points.
[0067] Furthermore, the original instability indices of all grid points are... Perform maximum and minimum value normalization to obtain the normalized index:
[0068]
[0069] in, This represents the instability index after normalization. This represents the original instability index; This represents the minimum instability index value among all grid points; This represents the maximum instability index value among all grid points. This invention maps the original instability index to... The interval facilitates the subsequent design and calculation of the bandwidth function. In port shore power systems, the normalized interval... Value close to These areas typically correspond to high-risk critical zones in system operation, such as combined areas of high temperature, full load, and strong winds. near When this occurs, it indicates that the system is in a high-risk area and requires more refined modeling and processing; when near When the system is in a stable region, a wider modeling scale can be used.
[0070] Furthermore, using the coordinates of all grid points The input features are their corresponding normalized instability indices. To obtain the output label, a Gaussian process regression model is used for nonlinear fitting, ultimately yielding a continuous function covering the entire joint feature space. :
[0071]
[0072] in, Represents a function of dynamic instability; Represents any joint feature points; This represents a Gaussian process regression model. The dynamic instability function is the system's dynamic instability map, and its output accurately reflects any given situation. The dynamic instability function, which measures the drastic changes in the inherent laws of the system, can clearly identify high-risk areas in port shore power systems, providing crucial guidance for subsequent adaptive modeling. A larger value indicates that the dynamics of the system in that region are changing drastically, requiring more refined modeling.
[0073] S3. Construct an adaptive kernel bandwidth function based on the dynamic instability map. The adaptive kernel bandwidth function is used to adaptively adjust the kernel function bandwidth for the endogenous state vector and the kernel function bandwidth for the environment parameter vector according to the dynamic instability of the current system situation.
[0074] It should be noted that the dynamic instability map constructed based on dynamic instability provides crucial prior knowledge for the model, enabling it to identify the risk level of the current operating situation and adaptively adjust the observation scale accordingly. In port shore power systems, when the system is in a high-risk area during the midday peak when multiple container ships are simultaneously pre-cooling refrigerated containers, its load fluctuation characteristics often become exceptionally drastic. Using a fixed-bandwidth modeling method at this time will fail to accurately capture such drastic fluctuations. Therefore, this invention proposes an adaptive kernel bandwidth function based on the inverse relationship of instability, enabling the model to automatically adjust the observation scale according to the current operating situation, improving resolution in high-risk areas and enhancing statistical robustness in stable areas.
[0075] Specifically, define the state kernel bandwidth. and environmental core bandwidth :
[0076]
[0077]
[0078] in, Indicates at joint feature points Used for endogenous state vectors kernel function bandwidth; Indicates at joint feature points Used for environmental parameter vectors kernel function bandwidth; Indicates at point Dynamic instability at the location; Represents the global scaling constant of the state space; Represents the global scaling constant of the environment space; This represents a hyperparameter, which is a very small positive integer used to prevent the denominator from being zero and to ensure the numerical stability of the calculation. This represents the minimum value of the state kernel bandwidth; This represents the maximum value of the state kernel bandwidth; This represents the minimum value of the environment's kernel bandwidth; This indicates the maximum value of the environment's kernel bandwidth; and This is to prevent insufficient bandwidth from resulting in a lack of historical data for effective modeling. and This is to prevent excessive bandwidth from causing the inclusion of too much irrelevant historical data.
[0079] It should be noted that this invention achieves adaptive adjustment of the model's observation scale by establishing an inverse relationship between dynamic instability and the observation scale. In port shore power systems, when... A large value indicates that the system is in a high-risk critical region. and Significant bandwidth contraction allows subsequent locally weighted regressions to focus only on a small number of historical data points highly similar to the current situation, thus precisely capturing the unique dynamics under critical conditions. For example, when the system is in a combined region of high temperature, full load, and strong winds, the bandwidth automatically contracts, allowing the model to focus on load fluctuation characteristics under similar historical scenarios; conversely, when... A smaller value indicates that the system is in a stable region. In this case, the bandwidth is automatically widened to incorporate more historical data to obtain a more statistically robust estimate. For example, under stable operating conditions with light nighttime loads, the model will use a larger bandwidth and more extensive historical data for prediction, improving the stability of the prediction results. This invention achieves adaptive adjustment of the observation scale of the model under different risk regions, effectively balancing the model's accuracy and robustness.
[0080] It should be noted that the global scaling constant and The value of is determined based on the distribution range of historical data. For a typical port shore power system, this embodiment uses a global scaling constant. and Initially set to the diameter of the joint feature space In other embodiments, the implementer can set the value according to the actual implementation situation. and For example, set as the diameter of the joint feature space. to Times. Bandwidth upper and lower limits. , , and This embodiment ensures the stability of the model under extreme conditions. and Set as the diameter of the joint feature space times, will and Set as the diameter of the joint feature space In other embodiments, the implementer can select the upper and lower bandwidth limits based on the actual implementation situation. Hyperparameters To prevent the denominator from being zero, this embodiment is set as follows: In other embodiments, implementers may set the appropriate parameters according to the actual implementation situation. For example, set to to .
[0081] This invention integrates an adaptive kernel bandwidth function into the digital twin model of a port shore power system, enabling the digital twin model to dynamically adjust its prediction accuracy based on the current operating state. When the digital twin model detects that the system has entered a high-risk area, it automatically increases its prediction resolution, focusing on possible abnormal behaviors of the system. When the system is in a stable area, the digital twin model adopts a broader observation scale to improve prediction efficiency. This adaptive mechanism allows the digital twin model to more accurately reflect the real-time state of the physical system, providing a reliable guarantee for the safe operation of the shore power system.
[0082] S4. Obtain the joint feature points of the system at the current moment, calculate the kernel function bandwidth at the current moment based on the joint feature points and the adaptive kernel bandwidth function, use the kernel function bandwidth at the current moment to weight the historical data, solve the local weighted least squares problem, obtain the state transition matrix and environmental influence matrix specific to the current moment, and predict the future operating state of the port shore power system based on the state transition matrix and environmental influence matrix specific to the current moment.
[0083] It should be noted that in port shore power systems, when the system is in a high-risk situation where multiple large ships are simultaneously connected near a typhoon, extra caution is required. Operational experience from similar historical scenarios should be referenced only, rather than blindly adopting all historical data. Therefore, this invention uses an adaptively adjusted dual kernel function to customize a specific prediction model for the current situation, achieving high-precision, adaptive load forecasting.
[0084] Specifically, at the current moment when real-time prediction is required. Obtain its corresponding joint feature points:
[0085]
[0086] in, Represents the joint feature points at the current moment; This represents the endogenous state vector of the previous time step at the current time step; This represents the environmental parameter vector at the current moment.
[0087] Current feature point Substituting into the adaptive kernel bandwidth function, the optimal kernel bandwidth value specific to the current moment is calculated in real time. and .
[0088] Furthermore, based on the adaptive kernel bandwidth value, a kernel function is constructed. and environment kernel function The multiplicative double kernel function, specifically, calculates the kernel for each moment in the historical data. Unnormalized weights:
[0089]
[0090] in, Indicates time Unnormalized weights; Represents the state kernel function; Represents the environment kernel function; Representing historical moments The endogenous state vector; This represents the endogenous state vector of the previous time step at the current time step; Representing historical moments The environmental parameter vector; This represents the environmental parameter vector at the current moment; Indicates the state kernel bandwidth; This indicates the environmental kernel bandwidth.
[0091] in, and The preferred kernel functions are Gaussian kernel functions, namely:
[0092]
[0093]
[0094] in, Represents the state kernel function; Represents the environment kernel function; Represents the natural exponential function; Denotes the Euclidean norm; Representing historical moments The endogenous state vector; This represents the endogenous state vector of the previous time step at the current time step; Representing historical moments The environmental parameter vector; This represents the environmental parameter vector at the current moment; Indicates the state kernel bandwidth; This represents the environmental kernel bandwidth. This invention measures the similarity between historical samples and the current context using a dual kernel function; the higher the similarity, the greater the weight. and When the value is small, the kernel function decays faster, and only historical samples that are very similar to the current situation will receive significant weight. For example, when the system is under high temperature and full load, only historical situations that are also under high temperature and full load will be given high weight.
[0095] For all unnormalized weights After normalization, the final normalized weights are obtained:
[0096]
[0097] in, Indicates the normalized weights; Indicates unnormalized weights; Indicates a historical moment index; This represents the sum of all unnormalized weights, thus ensuring that the sum of the normalized weights is equal to the sum of all unnormalized weights. .
[0098] Using the obtained normalized weights Solve the locally weighted least squares problem:
[0099]
[0100] in, Represents the state transition matrix; Represents the environmental impact matrix; Indicates the normalized weights; Representing historical moments The endogenous state vector; Representing historical moments The endogenous state vector; Representing historical moments The environment parameter vector.
[0101] Get the current time Optimal model coefficient matrix and :
[0102]
[0103]
[0104] in, This represents the state transition matrix at the current moment; This represents the environmental impact matrix at the current moment. Indicates the normalized weights; Representing historical moments The endogenous state vector; Representing historical moments The endogenous state vector; Representing historical moments The environment parameter vector.
[0105] This invention utilizes normalized weights to weight historical data, obtaining the most suitable local model parameters for the current situation. When the system is in a high-risk region, It will better reflect the dynamic characteristics unique to that region, such as increased load fluctuations and longer response delays; when the system is in a stable region, It will reflect smoother dynamic characteristics.
[0106] Using the state transition matrix Environmental Impact Matrix In combination with the latest historical situation and input to the future environment The predictions are obtained by calculating the predicted values of future states using the VARX model:
[0107]
[0108] in, express Predicted value after step; This represents the state transition matrix at the current moment; express Predicted value after step; This represents the environmental impact matrix at the current moment. express The environmental parameter vector after the step; This indicates the prediction step size.
[0109] This invention utilizes a currently customized state transition matrix Environmental Impact Matrix Multi-step forecasting allows for a more accurate reflection of future load changes under the current operating conditions, particularly in high-risk critical areas where forecasting accuracy is significantly improved. For example, during the load surge phase before a typhoon, this method can accurately predict load peaks in advance, providing a reliable basis for scheduling decisions. For instance, Figure 2 The comparison chart of the final prediction results and the actual load curve shows that the prediction curve of the present invention and the actual load curve exhibit a high degree of consistency in overall trend, fluctuation period, and peak and trough positions.
[0110] During the forecasting process, future environmental parameter vectors can be obtained from external information sources such as weather forecasting systems and port scheduling plans, with a forecasting step size. The value is determined based on actual application requirements. For port shore power system load forecasting, short-term forecasting is usually set to [value missing]. to In other embodiments, the implementer can set the prediction step size according to the actual implementation situation, for example, set to 1 hour. minutes to Hour.
[0111] This invention integrates real-time prediction functionality into the digital twin model of a port shore power system, achieving real-time synchronization between the physical system and the digital model. The digital twin model continuously receives real-time data from the physical system, dynamically updates its internal state, and generates high-precision prediction results using an adaptive kernel bandwidth function. These prediction results can not only be used for load management of the shore power system but also fed back into the digital twin model for continuous optimization and calibration. This enables the shore power system to identify potential risks in advance, take preventative measures, and significantly improve the system's safety and reliability.
[0112] The present invention also discloses a port shore power system operation status prediction system based on digital twins, including a processor and a memory. The memory stores computer program instructions, and when the computer program instructions are executed by the processor, the port shore power system operation status prediction method based on digital twins according to the present invention is implemented.
[0113] The system also includes other components well known to those skilled in the art, such as communication buses and communication interfaces, the settings and functions of which are known in the art and will not be described in detail here.
[0114] In the description of this specification, "multiple" or "several" means at least two, such as two, three or more, unless otherwise expressly and specifically defined.
[0115] While this specification has shown and described numerous embodiments of the invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many modifications, alterations, and alternatives will occur to those skilled in the art without departing from the spirit and essence of the invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in the practice of this invention.
Claims
1. A port shore power system operation state prediction method based on digital twinning, characterized in that, The method comprises: acquiring a historical power data of a port shore power system to form an endogenous state vector sequence, and acquiring external environment monitoring data to form an environment parameter vector sequence, and constructing a joint feature space according to the endogenous state vector and the environment parameter vector; discretizing the joint feature space into a set of grid points; for each grid point, estimating a local state transition matrix by using historical data in a neighborhood of the grid point; a difference between the state transition matrix at each grid point and the state transition matrix of its neighboring grid points, to obtain a dynamic instability of the grid point, the dynamic instability satisfying an expression: ; in the expression, denotes a dynamic instability at a grid point ; in the expression, denotes a topological neighborhood set of a grid point ; in the expression, denotes a distance weight between a grid point and ; in the expression, denotes a state transition matrix at a grid point ; in the expression, denotes a state transition matrix at a grid point ; in the expression, denotes a Frobenius norm; and performing a nonlinear fitting on the dynamic instabilities of all grid points to obtain a dynamic instability map. constructing an adaptive kernel bandwidth function based on the dynamic instability map, the adaptive kernel bandwidth function being used to adaptively adjust a kernel function bandwidth for the endogenous state vector and a kernel function bandwidth for the environment parameter vector according to dynamic instability of a current situation of the system, the adaptive kernel bandwidth function satisfying an expression: ; ; where denotes the kernel bandwidth at the joint feature point for the endogenous state vector ; denotes the kernel bandwidth at the joint feature point for the environmental parameter vector ; denotes the dynamic instability at the point ; denotes the global scaling constant for the state space; denotes the global scaling constant for the environmental space; is a hyperparameter for the denominator being zero; denotes the minimum value of the state kernel bandwidth; denotes the maximum value of the state kernel bandwidth; denotes the minimum value of the environmental kernel bandwidth; denotes the maximum value of the environmental kernel bandwidth; acquiring a joint feature point at a current time, calculating a kernel function bandwidth at the current time according to the joint feature point and the adaptive kernel bandwidth function, weighting historical data by using the kernel function bandwidth at the current time, and solving a local weighted least square problem to obtain a current time-specific state transition matrix and an environment influence matrix; Based on the current-time-specific state transition matrix and environmental impact matrix, the future operating state of the port shore power system is predicted, including: using the current-time-specific state transition matrix... Environmental Impact Matrix In combination with the latest historical situation Based on predictions of future environmental inputs, the predicted values of future states are calculated using a vector autoregressive exogenous model: ; wherein represents the predicted value at step represents the state transition matrix specific to the current time instant; represents the predicted value at step represents the environmental influence matrix specific to the current time instant; represents the environmental parameter vector at step represents the prediction step.
2. The port shore power system operating state prediction method based on digital twinning according to claim 1, characterized in that, the joint feature space is constructed according to the endogenous state vector and the environment parameter vector, and comprises: For any target time instant , a joint feature point is defined; wherein, denotes a joint feature point at a target time instant ; denotes an endogenous state vector at a previous time instant; denotes an environmental parameter vector at a current time instant.
3. The port shore power system operation state prediction method based on digital twinning of claim 1, characterized in that, the local state transition matrix is estimated by using historical data in a neighborhood of the grid point, and comprises: for each grid point in the set, an initial kernel function bandwidth is used to calculate weights of historical samples in the neighborhood, a local weighted least square problem is solved, and a state transition matrix at the grid point is obtained.
4. The port shore power system operation state prediction method based on digital twinning of claim 1, characterized in that, the historical data is weighted by using the kernel function bandwidth at the current time, and comprises: a multiplicative double kernel function composed of a state kernel function and an environment kernel function is constructed according to the kernel function bandwidth at the current time; the multiplicative double kernel function is used to calculate a weight of each time in the historical data.
5. The port shore power system operating state prediction method based on digital twinning according to claim 4, characterized in that, the weight of each time in the historical data is calculated, and comprises: ; wherein denotes the unnormalized weight at time ; denotes the state kernel function; denotes the environment kernel function; denotes the endogenous state vector at time ; denotes the endogenous state vector at the previous time before the current time; denotes the environment parameter vector at time ; denotes the environment parameter vector at the current time; denotes the state kernel bandwidth; denotes the environment kernel bandwidth.
6. The port shore power system operating state prediction method based on digital twinning according to claim 1, characterized in that, the local weighted least square problem is solved to obtain the current time-specific state transition matrix and the environment influence matrix, and comprises: ; wherein denotes the state transition matrix; denotes the environmental influence matrix; denotes the normalization weight; denotes the endogenous state vector at time ; denotes the endogenous state vector at time ; denotes the environmental parameter vector at time .
7. A port shore power system operating state prediction system based on digital twinning, characterized in that, The method comprises: a processor and a memory, the memory storing computer program instructions, when the computer program instructions are executed by the processor, realizing the port shore power system operation state prediction method based on digital twinning according to any one of claims 1-6.
Citation Information
Patent Citations
Digital twin hydraulic engineering dynamic prediction and simulation method based on AI technology
CN119990929A
Intelligent analysis and remote control algorithm based on digital twinning
CN120255354A