A ship power supply interface detection method and system based on contact voltage monitoring

By acquiring the transient voltage and current sequences of the ship's shore power system, and combining sliding cross-correlation and phase compensation, the particle swarm optimization algorithm is used for iterative optimization. This solves the impedance drift problem caused by multiple plugs in parallel and environmental factors, and achieves high-precision interface status detection and safety assurance.

CN122109933APending Publication Date: 2026-05-29HANGZHOU HAICHUANGAUTOMATION CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HANGZHOU HAICHUANGAUTOMATION CO LTD
Filing Date
2026-04-30
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing technologies cannot effectively address the equivalent impedance drift caused by multiple plugs in parallel and the nonlinear changes caused by ambient temperature and humidity in ship shore power supply systems, leading to missed detections of misconnections or false alarms for legitimate plugs, posing safety hazards.

Method used

By acquiring the transient voltage sequence of the power socket and the transient current sequence of the power supply bus, three-dimensional features are extracted using sliding cross-correlation calculation and phase compensation. Combined with environmental mutation and particle swarm optimization algorithm, the optimal activation weight and real-time cluster center are generated to accurately identify the abnormal contact state of the interface.

Benefits of technology

It improves the accuracy and safety of condition detection, can quickly identify and disconnect dangerous circuits, actively adapt to environmental changes, and ensure the stability and reliability of the power supply system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122109933A_ABST
    Figure CN122109933A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of ship shore power interface detection, and particularly relates to a ship power supply interface detection method and system based on contact voltage monitoring, which comprises the following steps: acquiring a transient voltage sequence of a power socket and a transient current sequence of a power supply bus; acquiring voltage drop, real correlation degree and time lag of a current power plug, and pressing three-dimensional feature coordinate points composed of the voltage drop, the real correlation degree and the time lag into a historical feature queue; using an optimization algorithm to iteratively optimize the historical feature queue to obtain optimal activation weights and real-time clustering centers of each dimension; calculating topological distances from three-dimensional feature coordinate points to real-time clustering centers of each state cluster according to the optimal activation weights, taking a state cluster corresponding to the minimum topological distance as a target state cluster, and generating a control instruction according to the target state cluster. The application can exclude environmental fluctuation interference and accurately identify an abnormal contact state of the interface.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of ship shore power interface testing technology. More specifically, this application relates to a method and system for testing ship power interfaces based on contact voltage monitoring. Background Technology

[0002] In shipboard shore power systems, multiple parallel power plugs are typically used to connect to shore-side box-type power supplies to meet the high-power, high-current charging and discharging requirements of the ship. Because shore power interfaces are constantly exposed to the complex and variable marine climate, and the frequency of insertion and removal of each parallel plug varies with operating conditions, the contacts are highly susceptible to oxidation, wear, and asymmetrical aging and degradation. To ensure the safe and stable operation of the high-current power supply network, there is an urgent need for a mis-insertion prevention monitoring technology capable of accurately and reliably detecting the physical contact status of multiple parallel plug interfaces.

[0003] To meet the aforementioned testing requirements for shore power interfaces, the industry currently widely employs fixed threshold testing technology based on static parameters. This traditional method primarily involves deploying basic electrical measuring instruments in the power supply circuit to directly read the contact resistance or absolute voltage values ​​at the instant of plug connection or in a steady state. Subsequently, the read static electrical values ​​are mechanically compared with a single fixed safety threshold preset by the system. When the measured absolute value exceeds this fixed boundary, the system determines that the plug has poor contact or there is a risk of mis-insertion, thereby triggering circuit breaker protection.

[0004] However, this traditional fixed threshold detection method has significant drawbacks in the complex physical environment of multi-plug parallel connections. Firstly, in a multi-plug parallel architecture, each new plug connection alters the equivalent impedance of the entire network, causing a systematic dynamic drift in the absolute voltage reference at each contact, rendering the single fixed threshold ineffective. Secondly, the drastic temperature and humidity fluctuations in the marine environment induce nonlinear drift in the metal resistance of the contact surface, and traditional methods are completely unable to capture the subthreshold changes caused by the progressive aging of the contacts. These drawbacks easily lead to frequent false alarms for legitimate plugs or serious missed detections of dangerous mis-plugging, ultimately causing safety accidents such as faulty power supply or even cross-voltage short circuits. Summary of the Invention

[0005] To address the technical problem that fixed threshold detection methods in ship shore power supply systems cannot adapt to the equivalent impedance drift caused by multiple plugs in parallel and the nonlinear changes caused by environmental temperature and humidity, which easily leads to missed detection of mis-plugs or false alarms of legitimate plugs, this application proposes a ship power interface detection method and system based on contact voltage monitoring, which can eliminate environmental fluctuation interference and accurately identify abnormal contact states of the interface.

[0006] In a first aspect, this application provides a method for detecting a ship's power interface based on contact voltage monitoring, comprising: acquiring a transient voltage sequence of a power socket and a transient current sequence of a power supply bus; acquiring the voltage drop, true correlation, and time lag of the current power plug based on the transient voltage sequence and the transient current sequence, and pushing the voltage drop, true correlation, and time lag into a three-dimensional feature coordinate point and a historical feature queue; iteratively optimizing the historical feature queue using an optimization algorithm to obtain the optimal activation weight and real-time cluster center for each dimension; calculating the topological distance from the three-dimensional feature coordinate point to the real-time cluster center of each state cluster based on the optimal activation weight, taking the state cluster corresponding to the minimum topological distance as the target state cluster, and generating control commands based on the target state cluster.

[0007] By employing the above technical solution, three-dimensional features are extracted from transient sequences, and the optimal activation weights and real-time cluster centers are obtained through algorithm iteration. State clusters are then locked based on topological distance. This method maps underlying physical features to a dynamic clustering space, enabling comprehensive evaluation of multi-dimensional states. It overcomes the vulnerability of single fixed thresholds and significantly improves the accuracy of state detection.

[0008] Preferably, obtaining the voltage drop, true correlation, and time lag of the current power plug based on the transient voltage sequence and the transient current sequence includes: obtaining the bus reference voltage; subtracting the bus reference voltage from the transient voltage sequence and taking the mean of the sequence as the voltage drop; performing a sliding cross-correlation calculation on the transient voltage sequence and the transient current sequence, and extracting the time corresponding to the peak value of the cross-correlation function as the time lag; using the time lag to perform phase compensation on the transient voltage sequence, and taking the Pearson correlation coefficient between the phase-compensated transient voltage sequence and the transient current sequence as the true correlation.

[0009] By adopting the above technical solution, the time lag is extracted by sliding cross-correlation calculation of transient sequences, and the Pearson correlation coefficient is calculated after phase compensation. This effectively removes the waveform misalignment artifacts caused by time delay, obtains high-fidelity dynamic electrical characteristics, and ensures the objectivity and authenticity of the input data of the subsequent state assessment model.

[0010] Preferably, after extracting the time corresponding to the peak of the cross-correlation function as the time lag, the detection method further includes: determining whether the absolute value of the time lag is less than a time safety threshold; in response to the absolute value of the time lag being less than the time safety threshold, performing the step of using the time lag to perform phase compensation on the transient voltage sequence, and using the Pearson correlation coefficient between the phase-compensated transient voltage sequence and the transient current sequence as the true correlation.

[0011] By adopting the above technical solution, the absolute value of the time lag before obtaining the true relevance is determined, and the underlying hardware interlock signal is directly triggered when the limit is exceeded. This constructs a high-speed cascade blocking mechanism between the software algorithm and the physical hardware, which can quickly cut off the extremely dangerous mis-insertion loop in the early stage of feature extraction, greatly improving the physical layer response speed of the system.

[0012] Preferably, the environmental change is calculated based on the current real-time temperature, current real-time humidity, reference temperature, and reference humidity.

[0013] Preferably, calculating the environmental abrupt change based on the current real-time temperature, the current real-time humidity, the reference temperature, and the reference humidity includes: obtaining a temperature reference value and a humidity reference value; calculating the temperature deviation between the current real-time temperature and the reference temperature, and calculating the humidity deviation between the current real-time humidity and the reference humidity; multiplying the square of the ratio of the temperature deviation to the temperature reference value by a first weighting coefficient to obtain a temperature change component; multiplying the square of the ratio of the humidity deviation to the humidity reference value by a second weighting coefficient to obtain a humidity change component; and using the sum of the temperature change component and the humidity change component as the environmental abrupt change.

[0014] By adopting the above technical solution, the temperature and humidity deviations are compared with the reference value and squared, and then summed by different weighting coefficients. This fully considers the asymmetric sensitivity of the metal material of the contact surface to temperature and humidity. Nonlinear amplification is used to characterize the comprehensive impact of extreme weather on the bottom impedance, enabling the system to have the ability to perceive drastic environmental changes.

[0015] Preferably, the method further includes: obtaining the initial cluster center of the previous round of latching; in response to the environmental mutation amount being greater than a first threshold, using the difference between the current real-time temperature and the reference temperature to obtain a trend guidance vector considering the parallel flow characteristics, and physically guiding the initial cluster center to obtain a guided cluster center; adding the guided cluster center as the starting preferred solution for the iterative optimization to the historical feature queue.

[0016] Preferably, the difference between the current real-time temperature and the reference temperature is used to obtain a trend guidance vector that considers the parallel shunting characteristics, and the initial cluster center is physically oriented to obtain the oriented cluster center. This includes: subtracting the reference temperature from the current real-time temperature to obtain the temperature range; obtaining the shunting correction factor, temperature resistivity, and average voltage drop of legally accessed samples in the historical feature queue for the metal conductor in parallel state; multiplying the shunting correction factor, temperature range, temperature resistivity, and average voltage drop to obtain the voltage traction amount; adding the voltage traction amount to the voltage dimension component of the initial cluster center, while keeping other dimension components unchanged, to obtain the oriented cluster center.

[0017] By adopting the above technical solution, and combining the temperature difference, the temperature resistivity of the metal, and the average voltage drop to calculate the traction, the cluster centers are superimposed in a single dimension. This follows Ohm's law and the physical laws of temperature effects, allowing the model to adapt to the impedance drift caused by the environment before iteration, accelerating the convergence of the algorithm and preventing the clustering results from deviating from the real physical space.

[0018] Preferably, the iterative optimization of the historical feature queue using an optimization algorithm includes: normalizing the data in the historical feature queue to generate normalized data; using a particle swarm optimization algorithm to use particles as activation weights for each dimension, and performing trial clustering based on the normalized data; constructing a fitness function and performing iterative optimization with the goal of maximizing fitness, wherein the fitness is positively correlated with the inter-cluster distance of the trial clustering and negatively correlated with the intra-cluster distance of the trial clustering; and outputting the optimal activation weights for each dimension and the real-time cluster centers of each state cluster when the iteration stops.

[0019] Preferably, calculating the topological distance from the three-dimensional feature coordinate points to the real-time clustering centers of each state cluster based on the optimal activation weights includes: normalizing the three-dimensional feature coordinate points; using the optimal activation weights of each dimension, calculating the weighted spatial deviation of the normalized three-dimensional feature coordinate points from the normalized real-time clustering centers of each state cluster in each dimension; the topological distance is positively correlated with the weighted spatial deviation.

[0020] Secondly, this application provides a ship power interface detection system based on contact voltage monitoring, including a processor and a memory. The memory stores computer program instructions, which, when executed by the processor, implement the aforementioned ship power interface detection method based on contact voltage monitoring.

[0021] By adopting the above technical solution, a computer program for detecting ship power interfaces based on contact voltage monitoring is generated and stored in a memory so that it can be loaded and executed by a processor. This allows for the creation of terminal devices based on the memory and processor, making them convenient to use.

[0022] The beneficial effects of this application are as follows: This application extracts multidimensional electrical features by acquiring transient voltage and current sequences, combines this with environmental abrupt changes to physically orient cluster centers, and utilizes a particle swarm optimization algorithm to optimize weight allocation and calculate topological distances. This method effectively eliminates interference from impedance drift in multi-parallel networks and temperature and humidity fluctuations, accurately identifying interface aging and mis-insertion states. By mapping underlying physical features to a dynamic clustering space, it overcomes the vulnerability of single fixed thresholds, significantly improving the detection accuracy and operational safety of ship power supply systems.

[0023] Furthermore, by employing sliding cross-correlation calculations and phase compensation, waveform misalignment caused by time delays is eliminated, resulting in high-fidelity dynamic features. The embedded cascaded blocking mechanism can quickly identify and cut off dangerous loops in the early stages of feature extraction, improving the physical layer response speed. In addition, the temperature resistance effect is used to assess environmental abrupt changes and provide physical orientation guidance, enabling the model to actively adapt to impedance drift caused by climate, accelerating algorithm convergence and preventing clustering from deviating from the real physical space, thus achieving highly stable adaptive classification of interface states. Attached Figure Description

[0024] Figure 1 This is a flowchart of a ship power interface detection method based on contact voltage monitoring in this application; Figure 2 The graph shows a comparison of the fitness convergence process between the traditional method and the optimization algorithm of this application. Figure 3 This is a comparison diagram of the distribution of state clusters in the three-dimensional feature space between the traditional method and the present application. Detailed Implementation

[0025] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.

[0026] This application discloses a method for detecting ship power interfaces based on contact voltage monitoring, referring to... Figure 1 This includes steps S1-S4: S1. Obtain the transient voltage sequence of the power socket and the transient current sequence of the power supply bus.

[0027] In one optional embodiment, this application relates to a method for detecting ship power interfaces based on contact voltage monitoring. This method is mainly applied to the practical physical scenario where ships are docked at a pier and use multi-connector parallel plugs to connect box-type power supplies for high-current charging and discharging. During long-term service, the drastic fluctuations in temperature and humidity in the marine environment and the complexity of the multi-plug parallel architecture inevitably lead to differential degradation of the contact resistance of each plug. To accurately detect mis-insertion of the interface in a physical environment with multiple plugs in parallel and asymmetric aging, the following steps are required.

[0028] In one embodiment, in order to accurately capture the underlying physical characteristics at the moment of plugging and unplugging, the transient voltage sequence of the power socket and the transient current sequence of the power supply bus are acquired.

[0029] For example, high-frequency voltage sensors are fixedly installed at the contacts of each power socket in the ship's shore power box, while high-frequency current sensors are installed on the common power supply bus connecting all power sockets. Preferably, the sampling frequency of both the high-frequency voltage and high-frequency current sensors is set to 1000 Hz to meet the requirements for capturing extremely high-frequency transient signals. The selection of this sampling value is based on the fact that the sudden change in contact resistance and electrical transient processes at the moment of plug insertion typically occur and decay within milliseconds, and a sampling frequency of 1000 Hz can ensure that sufficiently dense and distortion-free data points are acquired in a very short time.

[0030] When a new power plug is detected being inserted into the power socket, the underlying hardware immediately triggers a synchronous sampling mechanism. A high-frequency voltage sensor continuously collects voltage values ​​at the contact point within a preset time window, combining these voltage values ​​in chronological order to obtain a transient voltage sequence. Simultaneously, a high-frequency current sensor continuously collects current values ​​on the bus within the same preset time window, combining them in chronological order to obtain a transient current sequence. Preferably, the preset time window is set to 50 milliseconds before and after the moment the plug contacts the socket; this time range is determined to fully cover the entire transient transition process from abrupt change to initial stability in the circuit state.

[0031] S2. Based on the transient voltage sequence and the transient current sequence, obtain the voltage drop, true correlation and time lag of the current power plug, and push the voltage drop, true correlation and time lag into the historical feature queue to form a three-dimensional feature coordinate point.

[0032] In an optional embodiment, in order to accurately represent the electrical characteristics of newly connected plugs in a multi-plug parallel network in a complex charging and discharging physical environment and thus determine their contact status, it is necessary to perform deep feature extraction on the high-frequency sampling data acquired by the underlying sensors and embed an early hardware blocking mechanism.

[0033] Based on this, mathematical analysis and time-domain analysis are performed on the acquired underlying high-frequency sequences to extract key electrical state characterization quantities. Obtaining the voltage drop, true correlation, and time lag of the current power plug based on the transient voltage and transient current sequences includes: obtaining the bus reference voltage; subtracting the bus reference voltage from the transient voltage sequence to obtain the average of the resulting sequence as the voltage drop; performing a sliding cross-correlation calculation on the transient voltage and transient current sequences, extracting the time corresponding to the peak value of the cross-correlation function as the time lag; using the time lag to perform phase compensation on the transient voltage sequence, and using the Pearson correlation coefficient between the phase-compensated transient voltage and transient current sequences as the true correlation.

[0034] The bus reference voltage is the measured steady-state no-load nominal voltage value on the main distribution board of the ship's power supply system. The difference is calculated by subtracting this bus reference voltage from each voltage sampling point in the transient voltage sequence, and then averaging all the differences. The resulting voltage drop directly characterizes the static ohmic loss caused by oxidation or wear of the plug contact surface. Sliding cross-correlation calculation involves shifting the transient voltage sequence and transient current sequence point by point on the time axis and calculating their inner product. The time difference at which the waveform matching degree is highest is found is the time lag. The time lag reflects the capacitive or inductive transient delay characteristics caused by the nonlinear impedance due to loose contact surfaces.

[0035] After calculating the time lag, to prevent transient arcing or irreversible short-circuit faults caused by extremely poor physical contact conditions, a high-speed cascaded blocking mechanism must be established between the software algorithm layer and the hardware control layer. After extracting the time corresponding to the peak value of the cross-correlation function as the time lag, the detection method further includes: determining whether the absolute value of the time lag is less than a time safety threshold; in response that the absolute value of the time lag is not less than the time safety threshold, stopping the acquisition of the true correlation, triggering an alarm signal and outputting a hardware interlock signal; in response that the absolute value of the time lag is less than the time safety threshold, performing phase compensation on the transient voltage sequence using the time lag, and using the Pearson correlation coefficient between the phase-compensated transient voltage sequence and the transient current sequence as the true correlation.

[0036] It should be noted that a hyperparameter, the time safety threshold, is introduced at this stage, with a preferred value of 2.0 milliseconds. This value is based on extensive experiments involving the plugging and unplugging of shore power devices on ships. When the transient delay exceeds this time limit, the generated high-frequency harmonics are sufficient to cause hardware damage to the power supply bus. When the absolute value of the time lag reaches or exceeds this threshold, it means that the contact state of the plug is on the verge of extreme danger. At this point, the system directly interrupts all subsequent complex feature calculations, triggering not only visual and audible alarm signals at the control terminal but also simultaneously outputting a hardware interlock signal to the underlying circuit breaker of the shore power box, forcibly cutting off the main power supply circuit of the current socket, thus achieving physical layer protection.

[0037] Conversely, if the absolute value of the time lag is within a safe range, it indicates that the contact state is worthy of further comprehensive evaluation. In this case, phase compensation is performed by shifting the transient voltage sequence in the reverse direction along the time axis by the time lag, eliminating waveform misalignment interference in the time dimension. Subsequently, the existing standard Pearson correlation coefficient calculation formula is used to obtain the true correlation. This true correlation eliminates the illusion of time delay and accurately reflects the waveform similarity of voltage and current during dynamic evolution. Finally, the calculated voltage drop, true correlation, and time lag—three independent and complementary physical quantities—are combined into a three-dimensional feature coordinate point and pushed into the historical feature queue in system memory for later use.

[0038] Thus, by introducing a sliding cross-correlation and phase compensation mechanism in the underlying feature extraction stage, phase misalignment interference in transient signals is effectively removed, and high-fidelity three-dimensional electrical features are obtained. At the same time, the embedded cascaded safety decision logic can quickly identify and block extremely dangerous mis-insertion behavior in the early stage of feature extraction, avoiding ineffective computing power consumption and greatly improving the hardware security and real-time response of the multi-plug parallel power supply system.

[0039] S3. Use an optimization algorithm to iteratively optimize the historical feature queue to obtain the optimal activation weights and real-time cluster centers for each dimension.

[0040] In one optional embodiment, the ship-to-shore power system operates in a complex and variable marine climate. Drastic fluctuations in temperature and humidity alter the physical properties of the metal materials at the contacts of the multi-parallel plugs, leading to nonlinear drift in the distribution of electrical characteristics in the historical feature queue. To eliminate the misleading influence of this environmental physical interference on the subsequent optimization algorithm, the drastic environmental changes must be characterized before formally initiating iterative optimization. The environmental mutation amount is calculated based on the current real-time temperature, current real-time humidity, reference temperature, and reference humidity. Calculating the environmental mutation amount based on the current real-time temperature, current real-time humidity, reference temperature, and reference humidity includes: obtaining a temperature reference value and a humidity reference value; calculating the temperature deviation between the current real-time temperature and the reference temperature, and calculating the humidity deviation between the current real-time humidity and the reference humidity; multiplying the square of the ratio of the temperature deviation to the temperature reference value by a first weighting coefficient to obtain the temperature change component; multiplying the square of the ratio of the humidity deviation to the humidity reference value by a second weighting coefficient to obtain the humidity change component; and using the sum of the temperature change component and the humidity change component as the environmental mutation amount.

[0041] Understandably, since temperature and humidity have drastically different mechanisms affecting contact surface oxidation and metal lattice thermal vibrations, they need to be evaluated separately using a weighted approach. To accurately characterize the degree of drastic environmental degradation, the environmental abrupt change satisfies the following relationship: ; In the formula, E represents the environmental mutation amount; a represents the first weighting coefficient; b represents the second weighting coefficient; This represents the calculated temperature deviation; This represents the obtained temperature reference value; This represents the calculated humidity deviation; This represents the obtained humidity baseline value. In this scenario, the metal resistance is significantly more sensitive to temperature than humidity; therefore, it is preferable to set the first weighting coefficient to 0.7 and the second weighting coefficient to 0.3. Simultaneously, based on the safe operating limits of typical marine environments, it is preferable to set the temperature baseline value to 50 degrees Celsius and the humidity baseline value to 100%. By constructing the above-mentioned mutation formula, the originally independent temperature and humidity deviations are transformed into a dimensionless unified evaluation index. The nonlinear amplification of the square term amplifies the penalty weight of extreme weather conditions, accurately characterizing the comprehensive impact of climate change on electrical systems.

[0042] After assessing the degree of drastic change in the current environment, in order to enable the feature model to actively adapt to the physical impedance drift caused by this climate and avoid misjudgments due to the historical cluster centers lagging significantly behind the current physical state, the detection method further includes: obtaining the initial cluster centers latched in the previous round; in response to the environmental mutation amount being greater than a first threshold, using the difference between the current real-time temperature and the reference temperature to physically orient the initial cluster centers to obtain oriented cluster centers; and adding the oriented cluster centers to the historical feature queue to participate in the iterative optimization. The method of physically orienting the initial cluster center using the difference between the current real-time temperature and the reference temperature to obtain the induced cluster center includes: subtracting the reference temperature from the current real-time temperature to obtain the temperature range; obtaining the temperature resistivity of the metal conductor and the average voltage drop of legally accessed samples in the historical feature queue; multiplying the temperature range, the temperature resistivity, and the average voltage drop to obtain the voltage traction amount; adding the voltage dimensional component of the initial cluster center to the voltage traction amount, while keeping other dimensional components unchanged, and physically orienting the initial cluster center to obtain the induced cluster center.

[0043] It should be noted that the first threshold is a hyperparameter that determines whether to initiate physical directional traction, and its preferred value is 0.15. When the environmental abrupt change is greater than 0.15, it indicates that the drastic change in the external environment is sufficient to trigger macroscopic impedance drift. At this time, a correction logic is constructed based on the physical properties of the metallic conductor, and the voltage traction amount satisfies the following relationship: ; In the formula, The current shunting sensitivity coefficient is preferably in the range of 0.6 to 0.8, and is used to compensate for the suppression effect of the voltage drop caused by the dynamic redistribution of current due to the change in the resistance of the parallel branch. This represents the calculated voltage traction amount; This represents the temperature range obtained by subtracting the reference temperature from the current real-time temperature. The temperature resistivity of a metallic conductor; This represents the average voltage drop across legitimate access samples in the historical feature queue. Since shore power plug contacts are generally made of silver-plated copper, the temperature resistivity of the metal conductor is preferably set to 0.00393. The physical meaning of this formula is that it does not aim to precisely calculate the absolute voltage drop after being affected by multiple nonlinear factors, but rather uses Ohm's law and the linear trend of the temperature coefficient to obtain a predicted offset direction that conforms to the logic of physical evolution. Using the voltage pull as the physical prior starting point when iterating the cluster centers in the optimization algorithm can guide the algorithm to quickly cross the non-interesting solution space caused by environmental drift, thereby accelerating convergence and preventing logical deviation of the cluster centers under extreme temperature differences. Even if there are model simplification errors between this initial pull and the actual physical value, the optimization algorithm will still perform nonlinear correction based on real-time sampled data to ensure that the final output cluster centers conform to the true physical state.

[0044] Since the true correlation and time lag are waveform characteristics on the time axis and are almost unaffected by ambient temperature, it is only necessary to unidirectionally superimpose the calculated voltage pull on the voltage dimension component of the initial cluster center. Through this physically oriented pull, the cluster center has been dragged to a reasonable spatial position that conforms to the current temperature physical laws before the iteration, which greatly accelerates the subsequent optimization convergence and avoids cluster deviation.

[0045] After completing environmental physical compensation and dynamic updating of the feature queue, the core adaptive state recognition stage is then entered. Iterative optimization of the historical feature queue using an optimization algorithm includes: normalizing the data in the historical feature queue to generate normalized data; using a particle swarm optimization algorithm to use particles as activation weights for each dimension, and performing trial clustering based on the normalized data; constructing a fitness function and iteratively optimizing it with the goal of maximizing fitness, where fitness is positively correlated with the inter-cluster distance of the trial clusters and negatively correlated with the intra-cluster distance; and outputting the optimal activation weights for each dimension and the real-time cluster centers of each state cluster when the iteration stops.

[0046] To eliminate computational biases caused by differences in voltage, correlation coefficient, and time dimensions, all dimensional values ​​of the three-dimensional feature coordinates must be mapped to a dimensionless interval of zero to one. The particle swarm optimization algorithm's task here is to find the optimal three-dimensional feature activation weights. To guide the particle swarm towards the clearest classification, the fitness function must balance intra-cluster compactness and inter-cluster separation. The fitness is obtained as follows: ; In the formula, F represents the calculated fitness; This represents the average Euclidean distance between the cluster centers of all states after the trial clustering, i.e., the inter-cluster distance. represents the average Euclidean distance from each sample point within a cluster to its respective cluster center after trial clustering, i.e., the intra-cluster distance; e represents a small constant to prevent the denominator from being zero, with a preferred value of 0.00001. By driving iteration with the goal of maximizing fitness, the algorithm adaptively assigns greater weights to feature dimensions with high discriminative power and strong anti-interference capabilities. When the population tends to stabilize and iteration stops, the system can output, unsupervised, the optimal activation weights for each dimension that accurately reflect the characteristics of the current parallel network, as well as high-precision real-time cluster centers.

[0047] Reference Figure 2 Compared with traditional clustering methods that do not introduce physical orientation traction, the detection method of this application, under the compensation effect of environmental mutation, not only significantly improves the convergence speed, but also the maximum fitness value obtained by the final optimization is greater than the maximum fitness value corresponding to the traditional clustering method, which proves that the algorithm of this application has a better feature space partitioning ability in complex impedance drift networks.

[0048] Thus, by innovatively introducing an environmental mutation assessment and physical orientation traction mechanism based on the temperature resistance effect, the clustering algorithm acquires adaptive immunity against severe ocean temperature and humidity drift. At the same time, by combining the particle swarm optimization algorithm to adaptively allocate the optimal activation weights of multi-dimensional features, the limitations of traditional static fixed threshold detection and rigid empirical weights are effectively reduced, enabling the solution to achieve highly stable and high-precision adaptive classification of interface states in asymmetric aging multi-plug parallel power supply networks.

[0049] S4. Calculate the topological distance from the three-dimensional feature coordinate points to the real-time clustering center of each state cluster based on the optimal activation weight, take the state cluster corresponding to the minimum topological distance as the target state cluster, and generate control commands based on the target state cluster.

[0050] In an optional embodiment, after the aforementioned iterative optimization operation, an optimal evaluation benchmark that is fully adaptive to the current marine temperature and humidity environment and the underlying physical state of the multi-plug parallel network has been obtained. To make a final determination on the contact health status of the most recently inserted power plug, its real-time extracted three-dimensional features need to be mapped to this evaluation benchmark for spatial similarity comparison. Calculating the topological distance from the three-dimensional feature coordinate points to the real-time cluster centers of each state cluster based on the optimal activation weights includes: normalizing the three-dimensional feature coordinate points; using the optimal activation weights of each dimension, calculating the weighted spatial deviation of the normalized three-dimensional feature coordinate points from the normalized real-time cluster centers of each state cluster in each dimension; the topological distance is positively correlated with the weighted spatial deviation.

[0051] It should be noted that, in order to accurately measure state affiliation in multidimensional space, topological distance satisfies the following relationship: ; In the formula, This represents the calculated topological distance and is a dimensionless parameter. This represents the first weight in the optimal activation weights corresponding to the voltage dimension. This represents the voltage drop of the current power plug after normalization. This represents the voltage dimension component of the real-time cluster centers. This represents the second weight in the optimal activation weights corresponding to the relevance dimension; This represents the true relevance of the current power plug after normalization. This represents the component of the real-time cluster centers in the relevance dimension; This represents the third weight in the optimal activation weights corresponding to the time dimension; This represents the normalized time lag of the current power plug. This represents the time dimension component of the real-time cluster centers. Here, the sum of the first weight, the second weight, and the third weight is strictly equal to one.

[0052] Understandably, this formula nonlinearly amplifies the spatial deviation of each dimension through the squared term, while adaptively scaling different feature dimensions using the optimal activation weights output by the optimization algorithm. This step removes the interference of absolute dimensions through normalization and gives higher-discrimination dimensions stronger decision-making power through weight parameters, effectively constraining the interference of irrelevant features. This ensures that the final calculated topological distance can truly and objectively reflect the essential similarity between the current plug's physical characteristics and the known state clusters.

[0053] After calculating all topological distances, the final physical state is locked based on the principle of minimum spatial distance, and a closed-loop output is sent to the underlying hardware actuator. The state cluster corresponding to the minimum topological distance is taken as the target state cluster, and control commands are generated based on the target state cluster, including: comparing the topological distances from the three-dimensional feature coordinate points to each state cluster, and obtaining the topological distance with the smallest value; marking the state cluster corresponding to the minimum topological distance as the target state cluster; parsing the physical state attributes of the target state cluster; generating the control command to close the main loop in response to the physical state attribute being a legal access state; and generating the control command to trigger a circuit breaker alarm in response to the physical state attribute being a dangerous mis-insertion state or a severely aged state.

[0054] For example, when a currently inserted plug suffers from severe asymmetric aging leading to a loose connection, its three-dimensional feature points will move away from the legitimate access state cluster in the weighted topology space. This allows it to approach the dangerous mis-insertion state cluster with a smaller weighted Euclidean distance, thus classifying it into the dangerous mis-insertion cluster. Within milliseconds, a circuit breaker alarm command is generated and sent to the underlying programmable logic controller of the ship's shore power box, forcibly locking the contactor of the corresponding socket. Simultaneously, a directional warning of "severe contact degradation" pops up on the monitoring terminal, thereby blocking the physical process of power supply with the faulty plug. Conversely, if the plug's feature points are classified into the legitimate access cluster, the system closes the main circuit and automatically matches the charging and discharging current thresholds based on the number of safe access plugs, achieving closed-loop adaptive configuration of power supply parameters.

[0055] Reference Figure 3 , Figure 3 Part (a) shows that when impedance drift is caused by multi-plug parallel connection, the characteristic points of each state are severely overlapped and difficult to distinguish using traditional methods; Figure 3 Part (b) shows that after adaptive weight optimization and physical orientation traction, the feature points form three state clusters with clear boundaries in the three dimensions of voltage drop, true correlation and time lag, which significantly reduces the misclassification rate.

[0056] Thus, by integrating the optimal activation weights to construct a multi-dimensional weighted topological distance metric, accurate identification of progressive aging state and dangerous mis-insertion state is achieved; at the same time, by combining the target state cluster to directly generate control commands, the problem of mis-insertion and missed detection in multi-plug parallel environment is solved, ensuring the operational safety of ship high-power charging and discharging system.

[0057] This application also discloses a ship power interface detection system based on contact voltage monitoring, including a processor and a memory. The memory stores computer program instructions, which, when executed by the processor, implement a ship power interface detection method based on contact voltage monitoring according to this application.

[0058] 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.

[0059] 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.

Claims

1. A method for detecting ship power interfaces based on contact voltage monitoring, characterized in that, include: Obtain the transient voltage sequence of the power socket and the transient current sequence of the power supply bus; Based on the transient voltage sequence and the transient current sequence, the voltage drop, true correlation and time lag of the current power plug are obtained, and the voltage drop, true correlation and time lag are combined to form three-dimensional feature coordinate points and pushed into the historical feature queue. The historical feature queue is iteratively optimized using an optimization algorithm to obtain the optimal activation weights and real-time cluster centers for each dimension. The topological distance from the three-dimensional feature coordinate points to the real-time clustering center of each state cluster is calculated based on the optimal activation weight. The state cluster corresponding to the minimum topological distance is taken as the target state cluster, and control commands are generated based on the target state cluster.

2. The method for detecting ship power interfaces based on contact voltage monitoring according to claim 1, characterized in that, The voltage drop, true correlation, and time lag of the current power plug are obtained based on the transient voltage sequence and the transient current sequence, including: Obtain the bus reference voltage, and use the average value of the transient voltage sequence after subtracting the bus reference voltage as the voltage drop; Perform sliding cross-correlation calculation on the transient voltage sequence and the transient current sequence, and extract the time corresponding to the peak value of the cross-correlation function as the time lag; The transient voltage sequence is phase-compensated using the time lag, and the Pearson correlation coefficient between the phase-compensated transient voltage sequence and the transient current sequence is taken as the true correlation.

3. The method for detecting ship power interfaces based on contact voltage monitoring according to claim 2, characterized in that, After extracting the time corresponding to the peak value of the cross-correlation function as the time lag, the detection method further includes: Determine whether the absolute value of the time lag is less than the time safety threshold; In response to the absolute value of the time lag being less than the time safety threshold, the step of performing phase compensation on the transient voltage sequence using the time lag and using the Pearson correlation coefficient between the phase-compensated transient voltage sequence and the transient current sequence as the true correlation is performed.

4. The method for detecting ship power interfaces based on contact voltage monitoring according to claim 1, characterized in that, Calculate the environmental mutation amount based on the current real-time temperature, current real-time humidity, reference temperature, and reference humidity.

5. The method for detecting ship power interfaces based on contact voltage monitoring according to claim 4, characterized in that, The calculation of environmental abrupt changes based on the current real-time temperature, the current real-time humidity, the reference temperature, and the reference humidity includes: Obtain a temperature reference value and a humidity reference value; calculate the temperature deviation between the current real-time temperature and the reference temperature, and calculate the humidity deviation between the current real-time humidity and the reference humidity; multiply the square of the ratio of the temperature deviation to the temperature reference value by a first weighting coefficient to obtain the temperature change component; multiply the square of the ratio of the humidity deviation to the humidity reference value by a second weighting coefficient to obtain the humidity change component; take the square root of the sum of the temperature change component and the humidity change component as the environmental abrupt change.

6. The method for detecting a ship's power interface based on contact voltage monitoring according to claim 4, characterized in that, Also includes: Obtain the initial cluster centers latched in the previous round; In response to the environmental mutation amount being greater than a first threshold, a trend guidance vector considering parallel flow characteristics is obtained by using the difference between the current real-time temperature and the reference temperature, and the initial cluster center is physically oriented to obtain the oriented cluster center. The traction cluster center is added to the historical feature queue as the starting preferred solution for the iterative optimization.

7. The method for detecting a ship's power interface based on contact voltage monitoring according to claim 6, characterized in that, Using the difference between the current real-time temperature and the reference temperature, a trend guidance vector considering parallel flow characteristics is obtained, and the initial cluster centers are physically oriented to obtain the guided cluster centers, including: The temperature range is obtained by subtracting the reference temperature from the current real-time temperature; the shunt correction factor, temperature resistivity, and average voltage drop of legally accessed samples in the historical feature queue are obtained for the metal conductor in parallel state; the shunt correction factor, temperature range, temperature resistivity, and average voltage drop are multiplied to obtain the voltage traction amount; the voltage dimension component of the initial cluster center is added to the voltage traction amount, while keeping other dimension components unchanged, to obtain the traction cluster center.

8. The method for detecting ship power interfaces based on contact voltage monitoring according to claim 1, characterized in that, Iterative optimization of the historical feature queue using an optimization algorithm includes: The data in the historical feature queue is normalized and mapped to generate normalized data; Using the particle swarm optimization algorithm, particles are used as activation weights for each dimension, and trial clustering is performed based on the normalized data. A fitness function is constructed, and iterative optimization is performed with the goal of maximizing fitness. The fitness is positively correlated with the inter-cluster distance of the trial cluster and negatively correlated with the intra-cluster distance of the trial cluster. When the iteration stops, the optimal activation weights for each dimension and the real-time cluster centers for each state cluster are output.

9. A method for detecting ship power interfaces based on contact voltage monitoring according to claim 1, characterized in that, The calculation of the topological distance from the three-dimensional feature coordinate points to the real-time clustering centers of each state cluster based on the optimal activation weights includes: The three-dimensional feature coordinate points are normalized. Using the optimal activation weights of each dimension, the weighted spatial deviation of the normalized three-dimensional feature coordinates and the normalized real-time cluster centers of each state cluster in each dimension is calculated; the topological distance is positively correlated with the weighted spatial deviation.

10. A ship power interface detection system based on contact voltage monitoring, characterized in that, include: A processor and a memory, the memory storing computer program instructions that, when executed by the processor, implement a method for detecting a ship power interface based on contact voltage monitoring according to any one of claims 1-9.