Optical storage multi-port bidirectional power control method and system based on port state recognition

CN122992937APending Publication Date: 2026-10-27JIANGSU SMART ENERGY LOW CARBON TECH RES INST CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611426872.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-15
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

现有光储功率控制方法通常依据端口瞬时功率、开关状态或预设运行模式划分端口功能,难以综合反映端口功率变化趋势、投退切换稳定性及剩余调节能力

Benefits of technology

1、通过对端口有功功率趋势、投退切换稳定性和端口能力匹配关系进行联合校验,识别各端口的供能角色、受能角色或支撑角色,并融合功率趋势偏移、状态稳定程度及能力裕度计算角色跃迁置信度,能够由静态角色判断扩展至端口运行趋势识别,降低瞬时扰动、开关抖动及能力边界变化引起的角色误判和频繁切换,提高端口状态识别的准确性与连续性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122992937A_ABST
    Figure CN122992937A_ABST
Patent Text Reader

Abstract

The application discloses a light storage multi-port bidirectional power control method and system based on port state recognition, relates to the technical field of energy storage coordination control, obtains the on-off state, active power, available power of photovoltaic and SOC of energy storage of an alternating current port, a photovoltaic port and an energy storage port, forms a port operation data set, checks the port power trend, on-off switching stability and capacity matching relationship, identifies the port role and calculates the role transition confidence, and constructs a port state matrix; determines the alternating current mutual aid capacity, the releasable power of photovoltaic and the safe adjustment power of energy storage according to the port state matrix, generates the adjustable power boundary of the port in combination with the port exit, the critical SOC of energy storage and the power direction reversal situation; determines the adjustment sequence and the power sharing amount in the order of photovoltaic consumption, alternating current mutual aid and energy storage support, generates a bidirectional power coordination instruction and controls execution, thereby improving the accuracy of port state recognition, the safety, stability and cooperativity of multi-port power adjustment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of energy storage coordinated control technology, specifically to a photovoltaic-energy storage multi-port bidirectional power control method and system based on port status identification. Background Technology

[0002] When photovoltaic (PV) power generation and energy storage devices are connected to AC systems via multi-port converters, the active power needs to be bidirectionally adjusted based on the real-time power supply capacity, energy receiving capacity, and power demand of each port. Existing PV-storage power control methods typically classify port functions based on instantaneous power, switching status, or preset operating modes, making it difficult to comprehensively reflect port power change trends, switching stability, and remaining regulation capacity. When a port is in a state of switching, rapid power fluctuation, or nearing its operating capacity limit, port role recognition lag or frequent switching can easily occur, leading to repeated adjustments of control commands and port power oscillations.

[0003] Meanwhile, existing methods mostly use fixed power limits or single energy storage state of charge thresholds to constrain power allocation, lacking unified handling for different constraint scenarios such as port exit, energy storage SOC criticality, and power direction reversal. When photovoltaic output, AC supply and demand, and energy storage regulation capabilities change simultaneously, fixed control boundaries are difficult to accurately characterize the actual adjustable range of each port, and it is also difficult to reasonably determine the regulation sequence and power sharing among photovoltaic consumption, AC mutual assistance, and energy storage support, affecting the safety, continuity, and coordination of multi-port power regulation.

[0004] Therefore, there is an urgent need for a multi-port bidirectional power control technology that can dynamically identify the operating roles of each port and their transition trends, adaptively determine the adjustable power boundary based on operating conditions such as port exit, energy storage SOC criticality, and power direction reversal, and achieve orderly power allocation and smooth switching of AC ports, photovoltaic ports, and energy storage ports. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention proposes a method and system for bidirectional power control of optical storage multi-port based on port status recognition.

[0006] The technical solution to achieve the purpose of this invention is as follows: On the one hand, the optical storage multi-port bidirectional power control method based on port status identification includes the following steps: The system acquires the commissioning / discharge status, active power, available photovoltaic power, and SOC of AC ports, photovoltaic ports, and energy storage ports to form a port operation dataset. Based on the port operation dataset, the active power trend, switching stability and port capacity matching relationship of the ports are verified, the power supply role, power receiving role or support role of each port is determined, and the role transition confidence is calculated to generate the port state matrix. The reference adjustable power range is determined based on the port state matrix, and the port adjustable power boundary is generated by combining the port exit, energy storage SOC criticality and power direction reversal scenarios. Based on the port adjustable power boundary and role transition confidence, the power sharing is determined in the order of photovoltaic consumption, AC mutual assistance and energy storage support, and bidirectional power coordination commands are generated and controlled for execution.

[0007] Furthermore, the generation of the port state matrix includes: The active power sequence of the port is extracted from the port operation dataset, and the slope of the power change is obtained by first-order linear fitting. The arithmetic mean of the active power sequence of the port is used as the reference power value to determine the main direction of power transfer and the degree of deviation of the power trend. Extract the deployment and withdrawal status sequence, count the number of transitions in the deployment and withdrawal status within the time window and the number of consecutive sampling periods of the current valid deployment and withdrawal status, and calculate the reliability of the deployment and withdrawal status; The port capability matching relationship is verified by single-port self-capability matching and multi-port supply and demand coupling verification. The power supply role, power receiving role or support role is determined by combining the main direction of power transfer, the reliability of the power-on / off status and the port capability margin. The confidence level of role transition is calculated based on the power change slope, the confidence level of the deployment / retreat status, and the capability margin corresponding to the current role, and a port state matrix is ​​generated.

[0008] Furthermore, the generation of the port adjustable power boundary includes: Extract the deployment / retreat status, current role, role transition confidence, baseline power value, and capability margin from the port status matrix, and convert the capability margin into a baseline adjustable power quantity. Determine the power deficit or available capacity of the AC port, the release power of the photovoltaic port, and the safe adjustable power of the energy storage port respectively to form a benchmark adjustable power range; Based on the port exit, energy storage SOC criticality and power direction reversal scenarios, the boundary corresponding to the reference adjustable power range is corrected. The corrected upper and lower boundaries are integrated and constraint marks are added to generate the port adjustable power boundary.

[0009] Furthermore, the determination of the power sharing amount includes: Determine whether the power deficit or power surplus operating conditions are determined based on the global power supply and demand difference. In the power deficit condition, the power that can be released at the photovoltaic port, the power deficit at the AC port, and the positive adjustable upper limit at the energy storage port are called in sequence. In the power surplus condition, the capacity that can be taken up at the AC port and the negative adjustable lower limit at the energy storage port are called in sequence. The maximum allowable adjustment step size is determined based on the amplitude of the adjustable power range of the port and the confidence level of the role transition, and the target adjustment amount of each port is limited.

[0010] Furthermore, the calculation of the confidence level for role transitions includes: The power trend offset factor is obtained by taking the absolute value of the power change slope and the ratio of the rated power of the corresponding port, and then performing normalized limiting processing. The stability factor is calculated based on the credibility of the deployment and withdrawal status. The lower the credibility of the deployment and withdrawal status, the larger the stability factor. The energy supply role selects the energy supply margin, the energy receiving role selects the energy receiving margin, and the support role selects the smaller value between the energy supply margin and the energy receiving margin. The capacity margin factor is calculated based on the selected capacity margin. The smaller the capacity margin, the larger the capacity margin factor. The confidence level of role transition is obtained by weighting and summing the power trend offset factor, state stability factor, and capability margin factor.

[0011] Further modifications to the reference adjustable power range include: When a port is in an exited state, cancel the adjustable power of the corresponding port; When the energy storage SOC reaches the charging threshold, the charging power amplitude is reduced proportionally to the difference between the energy storage SOC and the charging upper limit; when the energy storage SOC reaches the discharging threshold, the discharging power amplitude is reduced proportionally to the difference between the energy storage SOC and the discharging lower limit. When the target adjustment direction is opposite to the positive or negative direction of the reference power value, the smaller value between the product of the role transition confidence and the port rated power and the port rated power ratio is taken to determine the maximum allowable amplitude of the reverse adjustment and correct the corresponding adjustable power boundary.

[0012] Further verification of port capability matching includes: Calculate the photovoltaic output margin based on the available photovoltaic power and the active power at the photovoltaic port; The energy storage discharge margin and energy storage charging margin are calculated based on the energy storage SOC, the active power of the energy storage port, the rated capacity of the energy storage, and the rated power of the energy storage port. Calculate the power output margin and power absorption margin of the AC port based on the active power and rated power of the AC port. Summarize the total available power supply and total power to be consumed by the ports in the activation status, determine the global power supply-demand difference, and determine the port operation role by combining the main direction of power transmission, the reliability of activation / deactivation status and the corresponding capacity margin.

[0013] Furthermore, the formation of the port running dataset includes: Using a global synchronous clock source as a unified sampling trigger reference, the power-on / off status and active power of each port are collected synchronously to obtain the available photovoltaic power and energy storage SOC, and a local time identifier is added to the collected data. The collected data is mapped to the same time axis, anti-shake filtering is applied to the power on / off status, the validity of the active power at the port, the available power of photovoltaics and the SOC of energy storage are verified, abnormal and sudden data are removed, and missing data is filled in by linear interpolation based on adjacent valid sampling points. The data, after being aggregated and processed according to the time index layer, port parameter layer, and data quality layer, forms the port operation dataset.

[0014] Furthermore, the generation and execution of bidirectional power coordination commands include: The target adjustment values ​​of each port are superimposed on the reference power value of the corresponding port to obtain the target active power value of each port; Based on the adjustable power boundary of the port, the target active power value of each port is checked, the adjustment components that exceed the adjustable power boundary range of the port are eliminated, and a two-way power coordination command is generated. The bidirectional power coordination command is sent to the local measurement and control device corresponding to each port, driving the strain gauge to perform active power regulation.

[0015] Secondly, the optical storage multi-port bidirectional power control system based on port status recognition includes: The port acquisition module acquires the commissioning and decommissioning status, active power, available photovoltaic power, and energy storage SOC of AC ports, photovoltaic ports, and energy storage ports to form a port operation dataset; The status recognition module verifies the active power trend, switching stability and port capability matching relationship of the port based on the port operation dataset, determines the power supply role, power receiving role or support role of each port, calculates the role transition confidence, and generates a port status matrix. The boundary generation module determines the baseline adjustable power range based on the port state matrix, and generates the port adjustable power boundary by combining the port exit, energy storage SOC criticality and power direction reversal scenarios. Based on the port-adjustable power boundary and role transition confidence, the command control module determines the power sharing amount according to the order of photovoltaic consumption, AC mutual assistance and energy storage support, generates bidirectional power coordination commands and controls their execution.

[0016] Compared with the prior art, the advantages of this invention are as follows: 1. By jointly verifying the active power trend, switching stability, and port capacity matching relationship of the port, the power supply role, power receiving role, or support role of each port is identified. The confidence of role transition is calculated by integrating power trend deviation, state stability, and capacity margin. This can extend from static role judgment to port operation trend recognition, reduce role misjudgment and frequent switching caused by instantaneous disturbances, switching jitter, and changes in capacity boundaries, and improve the accuracy and continuity of port status recognition.

[0017] 2. Determine the baseline adjustment range based on the power deficit or available capacity of the AC port, the releaseable power of the photovoltaic port, and the safe adjustment power of the energy storage port. Dynamically correct the adjustable power boundary of the port for port exit, energy storage SOC criticality, and power direction reversal. Within this boundary, combine the role transition confidence level and allocate power in a coordinated order of photovoltaic consumption, AC mutual assistance, and energy storage support to achieve safe complementarity and smooth switching between different ports, and reduce reverse adjustment impact and power oscillation. Attached Figure Description

[0018] Figure 1 This is a flowchart of the optical storage multi-port bidirectional power control method based on port status recognition in this invention; Figure 2 This is a flowchart of the port status identification and port status matrix construction process in this invention; Figure 3 This is a schematic diagram of the generation and dynamic correction of the adjustable power boundary at the port in this invention; Figure 4 This is a flowchart of the hierarchical power sharing and bidirectional power coordination instruction generation process in this invention. Detailed Implementation

[0019] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments.

[0020] Example 1: This invention discloses a multi-port bidirectional power control method for optical storage based on port status recognition, comprising the following steps: S1: Obtain the activation / deactivation status, active power, available photovoltaic power, and SOC of AC ports, photovoltaic ports, and energy storage ports to form a port operation dataset.

[0021] S2: Based on the port operation dataset, verify the port active power trend, switching stability and port capability matching relationship, determine the power supply role, power receiving role or support role of each port, calculate the role transition confidence, and generate the port state matrix.

[0022] S3: Based on the port state matrix, determine the power deficit or available capacity of the AC port, the release power of the photovoltaic port, and the safe adjustment power of the energy storage port. Combined with port exit, energy storage SOC criticality, and power direction reversal scenarios, generate the port adjustable power boundary.

[0023] S4: Based on the adjustable power boundary of the port and the confidence level of role transition, determine the port adjustment sequence and power sharing according to the coordinated sequence of photovoltaic consumption, AC mutual assistance and energy storage support, generate bidirectional power coordination commands and control each port to execute them.

[0024] refer to Figure 1 , Figure 1This is a flowchart of a multi-port bidirectional power control method for optical storage based on port status recognition.

[0025] Figure 1 This paper illustrates the overall control process of acquiring operational data from AC ports, photovoltaic ports, and energy storage ports, and sequentially performing port status identification, generating adjustable power boundaries for ports, and generating bidirectional power coordination commands. This process is used to demonstrate the technical process of power coordination control from status perception in a photovoltaic-storage multi-port system.

[0026] It should be noted that, Figure 1 This is for illustrative purposes only, intended to help understand the process structure and data organization, and does not represent the precise working state in actual operation.

[0027] In step S1, the commissioning / discharge status, active power, available photovoltaic power, and energy storage SOC of the AC port, photovoltaic port, and energy storage port are obtained to form a port operation dataset, including: S101: Synchronous acquisition of multi-port operating parameters.

[0028] Relying on local monitoring and control devices deployed at each port, and using a global synchronous clock source as the unified sampling trigger reference, various operating parameters of the AC port, photovoltaic port, and energy storage port are synchronously collected according to a preset fixed sampling period of 100ms. This sampling period is set based on the control response bandwidth of the photovoltaic-energy storage converter and the typical time scale of grid power fluctuations, which can take into account both data acquisition density and device computing load.

[0029] For AC ports, the open / closed status of their grid-connected circuit breakers is collected as the port's on / off status. Simultaneously, the instantaneous active power of the AC port is collected through an AC sampling circuit. For photovoltaic (PV) ports, the open / closed status of their grid-connected switches is collected as the port's on / off status. Simultaneously, the real-time output active power of the PV port is collected, and the maximum output power under the current operating conditions is calculated using the PV array's maximum power point tracking unit based on the current module temperature, irradiance, and module voltage-current characteristics, serving as the PV's usable power. For energy storage ports, the open / closed status of their energy storage converter's grid-connected switches is collected as the port's on / off status. Simultaneously, the real-time charging and discharging active power of the energy storage port is collected, and the battery state of charge (SOC) is calculated using the energy storage battery management system based on individual cell voltage, charging / discharging current, and internal resistance parameters.

[0030] All raw data acquisition data is accompanied by a local time identifier corresponding to the sampling time, which is used for subsequent time synchronization and alignment processing.

[0031] S102: Standardization and preprocessing of raw collected data.

[0032] The raw data acquired synchronously are sequentially processed for time alignment, status debouncing, and value verification to complete the standardization correction of the raw data and ensure the accuracy and consistency of the input data.

[0033] Perform time synchronization and alignment of multi-source data. Using a global synchronization clock source as a reference, map all raw data with local time identifiers from all ports to the same time axis. Mark each group of sampled data with a standard timestamp consistent with the global synchronization clock source, eliminate clock deviations between different acquisition devices, and achieve time axis unification of multi-source data.

[0034] Implement anti-jitter filtering for enabled / disabled status. For the enabled / disabled status switch data of the three types of ports, a continuous periodic judgment rule is adopted for anti-jittering. Only when the status value remains consistent for at least three consecutive sampling periods is it determined to be a valid enabled / disabled status. The number of consecutive judgment periods is set to three, based on the typical duration of electromagnetic interference in industrial environments. This effectively filters out millisecond-level instantaneous false trigger signals without affecting the recognition and response speed of normal enabled / disabled statuses.

[0035] Perform continuous value validity verification. For continuously changing parameters such as port active power, photovoltaic available power, and energy storage SOC, a rationality verification is conducted based on the rated physical range of each parameter and the historical operational statistical threshold range. When the rate of change of a single sampling point data compared to the adjacent sampling points exceeds the preset mutation threshold, it is judged as abnormal mutation data and is removed. The mutation threshold for port active power is set at 20% of the rated power of the corresponding port. This threshold is set based on the maximum fluctuation rate of port power under normal operating conditions, which can accurately identify jump data caused by sampling faults. For short-term missing data of a single sampling point, a linear interpolation method based on two adjacent valid sampling points is used to complete the data, ensuring the integrity and continuity of the data sequence.

[0036] S103: Port runs the structured construction of the dataset.

[0037] The standardized preprocessed operating parameters are categorized and aggregated according to the port dimension, and a three-level structured port operating dataset is constructed using the standard timestamp as the index key.

[0038] The first level is the time index layer, which stores the global standard timestamps corresponding to each sampling point, serving as the time-series correlation benchmark for the full data and enabling time-series alignment calls for different port parameters.

[0039] The second level is the port parameter layer, which stores the corresponding operating parameters according to the port type. Among them, the AC port partition stores its commissioning / discharge status and port active power, the photovoltaic port partition stores its commissioning / discharge status, port active power and photovoltaic available power, and the energy storage port partition stores its commissioning / discharge status, port active power and energy storage SOC.

[0040] The third level is the data quality layer, which attaches data validity labels and anomaly correction labels to the corresponding data entries for each sampling point. The data validity labels are divided into three categories: valid, corrected, and invalid, used to identify the reliability level of the data set. The anomaly correction labels record the types of correction operations performed to complete or remove data, enabling traceability of data quality. Ultimately, this forms a time-consistent, parameter-complete, and quality-traceable port operation dataset, providing fundamental data support for subsequent port role determination and power collaborative control.

[0041] In step S2, based on the port operation dataset, the active power trend, switching stability, and port capacity matching relationship of the ports are verified to determine the power supply role, power receiving role, or support role of each port, and the role transition confidence is calculated to generate a port state matrix, including: S201: Port active power trend verification and power direction quantification determination.

[0042] From the port operation dataset, extract the active power sequence of the port for 10 consecutive sampling periods before the current sampling time. The length of this sequence corresponds to 1 second of operation time. Based on the typical frequency of power ripple of the photovoltaic-storage converter and the response speed requirements for trend identification, it can effectively filter out switching frequency ripple and instantaneous disturbances, while ensuring the real-time performance of status identification.

[0043] A pre-defined positive power direction convention is established: active power at a port is considered positive when flowing out of the port and negative when flowing into the port, serving as a unified benchmark for determining the power direction throughout the entire process. This applies to AC ports. Photovoltaic port Energy storage port They are respectively denoted as ports ,in The corresponding active power sequence at the port is denoted as ,in, For port At the current sampling time The corresponding active power, This is the sequence number of the current sampling time.

[0044] The least squares method is used to perform a first-order linear fit on the active power sequence of each port. The fitting expression is: , in, This is a dimensionless normalized index for the sampling time sequence number, with an integer value from 0 to 9, corresponding to the offset sequence number of the sampling point within the sequence; For port The slope of the power change characterizes the rate of power change within a unit sampling period; This is the fitting intercept. The slope of the power change at each port is obtained through fitting calculations. Simultaneously, the arithmetic mean of the active power sequence is calculated as the port reference power value. The calculation formula is: , Based on the reference power value The positive or negative value of the reference power determines the current main direction of power transfer at the port: a positive reference power value indicates an outflow port, while a negative reference power value indicates an inflow port; the direction is determined by the slope of the power change. The ratio of the absolute value of the value to the rated power of the corresponding port quantifies the degree of deviation in the power trend. The larger the ratio, the faster the power change rate and the greater the degree of deviation of the trend from the current operating state, thus completing the port active power trend verification.

[0045] S202: Stability verification and state reliability quantification calculation for commissioning / decommissioning switching.

[0046] From the port operation dataset, extract the engagement / disengagement state sequence for the 30 consecutive sampling cycles prior to the current sampling time. This time window corresponds to a 3-second operating duration and is set based on the typical duration of switch malfunctions caused by electromagnetic interference in industrial settings and the transition time of normal engagement / disengagement operations. This allows for accurate differentiation between instantaneous interference jitter and actual operating condition switching. The engagement / disengagement state sequence is composed of the engagement / disengagement states at the corresponding sampling time arranged in chronological order.

[0047] For ports Count the number of times the throw / retirement status changes within this time window. At the same time, the number of consecutive sampling periods for the current effective deployment and withdrawal status is counted. The reliability of the surrender / retreat status is quantitatively calculated based on the above two parameters. The calculation formula is: , The confidence level of the throw / retreat status ranges from 0 to 1, with a higher value indicating a more stable throw / retreat status. When the throw / retreat status remains unchanged throughout the time window, the confidence level is set to the maximum value of 1; when the status changes frequently, the confidence level decreases accordingly.

[0048] The stability level of surrender / retreat is classified according to the state credibility value: when... When the state of surrender is stable, it is determined that the surrender status is stable; when When, it is determined to be a handover transition transient; when When the switching is unstable, it is determined to be an unstable switching state. The above-mentioned grading thresholds are set according to the general engineering principles for identifying the status of switch quantities in the field of industrial measurement and control. 0.8 is the conventional confidence threshold for steady-state determination, which can ensure the anti-disturbance reliability of the status output; 0.3 is the lower limit threshold for status credibility. Below this value, the switching state no longer has steady-state reference value. The three-level division can accurately correspond to three typical operating conditions: normal operation, operating condition switching, and interference jitter. The credibility of the switching state will be used as a weighting coefficient in subsequent role determination and confidence calculation to complete the stability verification of the switching state.

[0049] S203: Dual-layer verification of port capability matching relationship and initial judgment of running role.

[0050] A two-layer verification mechanism combining single-port self-consistent verification and multi-port coupled verification is adopted to complete the verification of port capability matching relationship. The capability boundary of the port is clarified from two dimensions: its own operation constraints and global supply and demand constraints, providing a quantitative basis for role determination.

[0051] Conduct single-port self-capability matching verification. For photovoltaic ports, extract the available photovoltaic power from the port's operating dataset. With current photovoltaic port active power Calculate the photovoltaic output margin The calculation formula is: , The photovoltaic (PV) output margin ranges from 0 to 1, representing the percentage of remaining upgradable power supply capacity at the PV terminal. To avoid calculation anomalies where the denominator is zero under zero output conditions, a boundary judgment rule is added: when the available PV power is less than or equal to 1% of the rated power of the PV terminal, it is judged as a zero output condition, and the PV output margin is directly set to 0 without performing division operations; this threshold is set based on the minimum starting power of the PV module and the lower limit of measurement error. By calculating the margin, it is verified that the current active power of the terminal is within a reasonable range of available PV power, thus clarifying the remaining power supply capacity of the PV terminal.

[0052] For the energy storage port, extract the energy storage SOC and the current active power of the energy storage port from the port's operating dataset. Combined with the lower discharge limit of energy storage batteries Charging limit Rated energy storage capacity With the rated power of the energy storage port Calculate the energy storage discharge power margin separately. Energy storage charging energy margin The formula for calculating the discharge power margin is as follows: , In the formula, To control the period, a value of 100ms is set, consistent with the sampling period; The value is set to 0.1, based on the cycle life protection requirements of energy storage batteries, to avoid damage to the battery from deep discharge. The energy storage charging margin uses the same logic, based on the charging upper limit. The calculations yielded the results. By verifying the matching between the current charge / discharge power and the energy storage SOC through bidirectional margin checks, the bidirectional adjustment capability range of the energy storage port was clarified.

[0053] For the AC port, the current reference power value of the AC port is extracted. Combined with the rated power of the AC port, the power output margin and power absorption margin of the AC port are calculated respectively. The power output margin represents the proportion of the AC port's remaining ability to output power. It is calculated by dividing the difference between the AC port's rated power and the current reference power value by the AC port's rated power. A larger value indicates a more sufficient adjustment margin for the remaining positive power output. The power absorption margin represents the proportion of the AC port's remaining ability to absorb power. It is calculated by dividing the difference between the current reference power value and the lower limit of the AC port's negative power value by the AC port's rated power. A larger value indicates a more sufficient adjustment margin for the remaining negative power absorption. The lower limit of the AC port's negative power value is the negative value of the AC port's rated power, symmetrical to the positive power output amplitude. The rationality of the current transmission power is verified through bidirectional margin checks, clarifying the bidirectional mutual support capability range of the AC port.

[0054] Conduct multi-port supply and demand coupling verification. Calculate the total available power supply and total power to be absorbed for all ports in operation: for ports with a positive reference power value, the reference power value is included in the total available power supply, representing the active power currently injected into the system; for ports with a negative reference power value, the absolute value of the reference power value is included in the total power to be absorbed, representing the active power currently absorbed from the system. The difference between the total available power supply and the total power to be absorbed is the global supply and demand power difference. A positive global supply and demand power difference indicates that the overall active power injection exceeds active power absorption, indicating a power surplus; a negative global supply and demand power difference indicates that the overall active power absorption exceeds active power injection, indicating a power deficit. This difference is used to verify the matching degree of power supply and absorption capabilities among multiple ports, clarifying the overall power surplus or deficit status.

[0055] Based on the main direction of power transmission, the reliability of the power on / off status, and the port capacity margin, the operational role of each port is initially determined, and the role types are divided into three categories: power supply role, power receiving role, and support role. Among them, the power supply role refers to the port that continuously outputs active power and has a positive power supply margin; the power receiving role refers to the port that continuously absorbs active power and has a negative power receiving margin; and the support role refers to the port that has bidirectional power regulation capability and can flexibly switch between power supply and power receiving states.

[0056] The specific judgment rules are as follows: When the port is in the "on" state, the main direction of power transmission is outflow, and the corresponding power supply margin is greater than 0.1, it is initially judged as a power supply role; when the port is in the "on" state, the main direction of power transmission is inflow, and the corresponding power receiving margin is greater than 0.1, it is initially judged as a power receiving role; when the port is in the "on" state, both bidirectional adjustment margins are greater than 0.2, and the current operating point is within the bidirectional adjustment range, it is initially judged as a support role. The bidirectional adjustment range refers to the continuous power operating range defined by the port's maximum negative absorption power and maximum positive output power, corresponding to the port's full-stroke bidirectional power adjustment range. The current operating point is the port's current reference power value; if the reference power value falls within this range, it indicates that the port has not reached the bidirectional power boundary and still has room for bidirectional adjustment. The above margin judgment thresholds are set based on the minimum effective adjustment margin in engineering operation to avoid frequent fluctuations in role judgment when the margin is too small.

[0057] S204: Calculation of confidence in role transitions through multi-factor fusion.

[0058] The role transition confidence score quantifies the probability that a port will switch from its current role to another role during a subsequent control cycle. The score ranges from 0 to 1, with higher values ​​indicating a higher probability of a role transition. Compared to traditional static role classification methods based on instantaneous operating conditions, this quantification method can effectively predict operating condition shift trends and avoid power oscillations caused by frequent role switching. This index is calculated through a weighted fusion of three dimensions: power trend shift factor, state stability factor, and capability margin factor.

[0059] Calculate the power trend offset factor Take the slope of the power change. The ratio of the absolute value of the value to the rated power of the corresponding port, after normalization and limiting, yields the power trend offset factor, with an upper limit set at 0.4. This factor characterizes the driving strength of the power trend deviating from the current role; the faster the power change rate, the stronger the internal driving force for role transition. The calculation formula is: , in, For port Rated power.

[0060] Calculate the state stability factor The reliability of selecting 1 and the surrender / retreat status. The difference is used as the state stability factor, and the calculation formula is: , This factor characterizes the degree of risk of unexpected role transitions due to unstable state of engagement / disengagement; the lower the state credibility, the higher the risk of transition.

[0061] Computational margin factor The difference between 1 and the current character's corresponding ability margin is taken as the ability margin factor. If the current character is a power supplier, the corresponding power supply margin is used; if the current character is a power receiver, the corresponding power receiver margin is used; if the current character is a support character, the smaller value between the power supply margin and the power receiver margin is used. The calculation formula is: , in, For port The current character's capability margin. This factor represents the probability that a character will be forced to transition after the port reaches its operational capability boundary. The smaller the capability margin, the higher the transition probability.

[0062] Assign weight coefficients to the three factors mentioned above. , , The role transition confidence of each port is obtained after weighted summation. The calculation formula is: , The weight allocation is based on the following: power trend is the core driving factor for role transition, while state stability and capacity margin are auxiliary constraints, which are consistent with the actual operating characteristics of multi-port optical storage.

[0063] S205: Structured port status matrix construction and synchronous refresh.

[0064] A two-dimensional structured port state matrix is ​​constructed, with AC port, photovoltaic port, and energy storage port as the row dimensions, and the row order being AC port, photovoltaic port, and energy storage port, respectively; and the column dimensions being commissioning / decommissioning status, current role, role transition confidence level, baseline power value, and port capacity margin. The matrix has a size of 3 rows and 5 columns, enabling unified carrying and fast indexing of multi-dimensional state information.

[0065] The elements of the port status matrix are defined as: the... Line 1 Column elements Corresponding to the The first port Item status attributes. Non-numerical attributes are uniformly numerically encoded: in the input / output attribute, the input status is encoded as 1 and the output status is encoded as 0; in the role attribute, the power supply role is encoded as 1, the power receiving role is encoded as -1, and the support role is encoded as 0, realizing the numerical storage and batch calculation of status attributes.

[0066] Each sampling period completes a full refresh of the port status matrix, writing the latest verification results and calculated values ​​into the corresponding matrix elements to ensure that the port status matrix is ​​updated synchronously with the port operation dataset, providing accurate status input basis for subsequent port adjustable power boundary calculation and bidirectional power coordinated control.

[0067] refer to Figure 2 , Figure 2 A flowchart for port status identification and port status matrix construction.

[0068] Figure 2 The paper illustrates the data processing procedure based on the port operation dataset, which analyzes the active power trend, switching stability, and port capability matching relationship of ports. Based on the analysis results, the port roles are determined and the role transition confidence is calculated. The paper further constructs a port state matrix containing port state information.

[0069] It should be noted that, Figure 2 This is for illustrative purposes only, intended to help understand the process structure and data organization, and does not represent the precise working state in actual operation.

[0070] In step S3, based on the port state matrix, the power deficit or available capacity of the AC port, the releaseable power of the photovoltaic port, and the safe adjustable power of the energy storage port are determined. Combining port exit, energy storage SOC criticality, and power direction reversal scenarios, the adjustable power boundary of the port is generated, including: S301: Port status matrix analysis and baseline parameter extraction.

[0071] From the structured port state matrix, the full state attributes corresponding to AC ports, photovoltaic ports, and energy storage ports are extracted sequentially according to the row index. The activation / deactivation status code, current role code, role transition confidence, baseline power value, and port capacity margin for each port are then obtained. The correspondence between row indices and ports is consistent with the port state matrix construction rules: row 1 corresponds to AC ports, row 2 to photovoltaic ports, and row 3 to energy storage ports.

[0072] By combining the rated power parameters of each port, the normalized port capacity margin is converted into the absolute value of the reference adjustable power quantity, thus completing the basic parameter preparation for the adjustable power boundary calculation and ensuring the consistency of the input parameters with the previous state identification process.

[0073] S302: Calculation of adjustable power range for port reference.

[0074] Assuming normal operating conditions with no critical constraints and all ports in operation, the upper and lower limits of the baseline adjustable power for the three types of ports are calculated respectively, yielding the corresponding power deficit and capacity of the AC ports, the release power of the photovoltaic ports, and the safe adjustment power of the energy storage ports. The positive power direction is consistent with the preceding steps, i.e., the outflow port is the positive direction and the inflow port is the negative direction.

[0075] For the AC port, the rated power of the AC port is used as the upper limit of the bidirectional transmission amplitude. The positive adjustable upper limit and negative adjustable lower limit are calculated under the baseline operating condition. The positive adjustable upper limit corresponds to the maximum power that the AC port can output. The difference between this upper limit and the baseline power value is the AC port power deficit, representing the power gap that the AC side can fill. The negative adjustable lower limit corresponds to the maximum power that the AC port can absorb internally. The absolute value of the difference between this lower limit and the baseline power value is the AC port's capacity margin, representing the power surplus that the AC side can absorb. The positive adjustable upper limit is taken as the rated power of the AC port, and the negative adjustable lower limit is taken as the negative value of the rated power of the AC port. The symmetrical setting of the bidirectional rated amplitude is based on the bidirectional symmetrical capacity characteristics of the AC port converter, ensuring consistent energy transmission and reception capabilities.

[0076] For photovoltaic (PV) ports, the available PV power is used as the upper limit for positive output, and 0 is used as the lower limit for positive output. PV ports only have unidirectional power output capability and cannot absorb power. The difference between the available PV power and the reference power value represents the power that the PV port can release, indicating the remaining potential for increased output capacity.

[0077] For the energy storage port, considering the rated power of the energy storage port, the current energy storage SOC, the rated energy storage capacity, and the control cycle, the upper limit of the positive adjustment in the discharge direction and the lower limit of the negative adjustment in the charging direction are calculated respectively. The continuous interval formed by these two limits is the safe adjustment power range of the energy storage port. During the calculation, the energy corresponding to the remaining chargeable / dischargeable capacity of the battery is first converted into the power value that can be continuously output or absorbed within a single control cycle. This value is then compared with the rated power of the inverter, taking into account both inverter device constraints and battery energy constraints. Specifically, in the discharge direction, the maximum discharge power under energy constraints is first calculated: the difference between the current energy storage SOC and the lower discharge limit multiplied by the rated capacity, then divided by the control cycle. This value is compared with the rated power of the energy storage port, and the smaller of the two is taken as the upper limit of the positive adjustment. In the charging direction, the maximum charging power under energy constraints is first calculated: the difference between the upper limit of charging and the current energy storage SOC multiplied by the rated capacity, then divided by the control cycle. This value is compared with the rated power of the energy storage port, and the smaller of the two is taken as the lower limit of the negative adjustment. The lower discharge limit is set to 0.1, and the upper charge limit is set to 0.9, based on the conventional charge and discharge protection thresholds of lithium iron phosphate energy storage batteries, to avoid overcharging and over-discharging damage to the cells and ensure battery cycle life; the control period is set to 100ms, consistent with the sampling period.

[0078] S303: Adjustable power boundary correction under multiple constraints.

[0079] Three types of constraint scenarios are introduced in sequence: port exit, energy storage SOC criticality, and power direction reversal. The reference adjustable power range is dynamically corrected, the boundary range is tightened, and the safety and stability of the device operation are ensured.

[0080] Port exit correction is implemented. When the port's status code is 0 (i.e., exited), both the upper and lower limits of the port's adjustable power are set to 0, meaning the port does not participate in power regulation and its adjustable power is 0. This correction rule is based on the electrical characteristics of the port being physically disconnected and having no power transmission channel after exiting.

[0081] Perform SOC (State of Charge) critical condition correction for energy storage. Set critical thresholds for charging and discharging of energy storage SOC, with the charging threshold set to 0.85 and the discharging threshold set to 0.15. These thresholds are set with a 0.05 buffer space based on the battery protection threshold to prevent unplanned shutdowns caused by the energy storage SOC triggering the cell protection threshold during adjustment. When the energy storage SOC is greater than or equal to the charging critical threshold, it is determined to be a critical charging condition. A charging critical correction coefficient is introduced to linearly scale the reference negative adjustable lower limit, raising the lower boundary of adjustable power and limiting charging regulation capability. When the energy storage SOC is less than or equal to the discharging critical threshold, it is determined to be a critical discharging condition. A discharging critical correction coefficient is introduced to linearly scale the reference positive adjustable upper limit, lowering the upper boundary of adjustable power and limiting discharging regulation capability. The charging critical correction coefficient is the difference between the charging upper limit and the current energy storage SOC, divided by the difference between the charging upper limit and the charging critical threshold, and then multiplied by the base negative adjustable lower limit to obtain the corrected lower boundary; the discharging critical correction coefficient is the difference between the current energy storage SOC and the discharging lower limit, divided by the difference between the discharging critical threshold and the discharging lower limit, and then multiplied by the base positive adjustable upper limit to obtain the corrected upper boundary.

[0082] Correction is applied for power direction reversal scenarios. Power direction reversal refers to a situation where the target adjustment direction is opposite to the positive or negative direction of the current reference power value. To avoid power oscillations caused by sudden power direction changes, the reverse adjustment amplitude is dynamically constrained based on the role transition confidence level. Within a single control cycle, the maximum allowable amplitude of reverse adjustment is the smaller of two values: one is the product of the role transition confidence level and the port's rated power, and the other is 20% of the port's rated power. This constraint dynamically relaxes the reverse adjustment authority based on the confidence level of the operating condition transition, ensuring both the response speed when the operating condition truly reverses and suppressing power surges caused by misjudgments. The specific correction rules are as follows: if the reference power value is positive (i.e., outflow is dominant), the lower limit of negative adjustment must not be lower than the reference power value minus the maximum allowable amplitude of reverse adjustment; if the reference power value is negative (i.e., inflow is dominant), the upper limit of positive adjustment must not be higher than the reference power value plus the maximum allowable amplitude of reverse adjustment.

[0083] S304: Port-adjustable power boundary integration generation.

[0084] The upper and lower boundaries of the adjustable power at each port, after being corrected by the three types of constraints, are integrated to form the final adjustable power boundary at the port. Each port corresponds to a set of bidirectional power ranges formed by the lower and upper boundaries, where positive values ​​correspond to the power adjustment range of the outflow port and negative values ​​correspond to the power adjustment range of the inflow port.

[0085] Simultaneously, constraint markers are added to the adjustable power boundaries of each port, recording the effective status of three types of constraints: port exit, energy storage SOC criticality, and direction reversal. This provides a boundary constraint basis for subsequent power collaborative allocation. The final generated port adjustable power boundaries cover the bidirectional adjustment capabilities of the three types of ports, balancing operational safety and adjustment flexibility, and providing clear execution boundaries for bidirectional power collaborative control.

[0086] refer to Figure 3 , Figure 3 This is a schematic diagram illustrating the generation and dynamic correction of the adjustable power boundary at the port.

[0087] Figure 3 The process of extracting port state parameters based on the port state matrix, determining the baseline adjustable power range according to the power deficit or margin of the AC port, the release power of the photovoltaic port, and the safe adjustment power of the energy storage port, and correcting the power boundary by combining the port exit, energy storage SOC criticality, and power direction reversal, is shown to generate the port adjustable power boundary.

[0088] It should be noted that, Figure 3 This is for illustrative purposes only, intended to help understand the process structure and data organization, and does not represent the precise working state in actual operation.

[0089] In step S4, based on the port adjustable power boundary and role transition confidence, the port adjustment sequence and power sharing are determined according to the coordinated order of photovoltaic consumption, AC mutual assistance, and energy storage support. A bidirectional power coordination command is generated and executed by each port, including: S401: Global power regulation demand identification and regulation direction determination.

[0090] From the port state matrix and the port adjustable power boundary, the reference power value, adjustable power range, and global supply-demand power difference of each port are extracted. The global supply-demand power difference is used as the global total adjustment demand to determine the current adjustment condition and direction. The positive power direction is consistent with the previous steps, i.e., the outflow port is the positive direction and the inflow port is the negative direction. When the global supply-demand power difference is positive, it is determined to be a power surplus condition, corresponding to the overall active power output exceeding the energy demand, and the excess active power needs to be absorbed through port adjustment; when the global supply-demand power difference is negative, it is determined to be a power deficit condition, corresponding to the overall energy demand exceeding the active power output, and the active power deficit needs to be filled through port adjustment.

[0091] S402: Hierarchical power sharing calculation based on cooperative priority.

[0092] Strictly following the priority order of photovoltaic consumption, AC mutual assistance, and energy storage support, the adjustable power capacity of the corresponding port is called up layer by layer according to the current operating condition, and the total regulation demand is shared in turn to obtain the target regulation amount of each port; the regulation amount of each level does not exceed the adjustable power boundary of the corresponding port, ensuring that the regulation process is within the safe operating range throughout.

[0093] Under power deficit conditions, the power gap is filled sequentially from highest to lowest priority. The first level is photovoltaic (PV) absorption, prioritizing the use of the PV port's release capacity, with the PV port's forward adjustable upper limit as the adjustment limit. The power deficit is filled primarily by increasing PV output. If the PV port's release capacity is greater than or equal to the total deficit, the PV port assumes all the deficit adjustment, while the other ports have zero adjustment. If the PV port's release capacity is insufficient to cover the total deficit, the PV port adjusts at its maximum release capacity, and the remaining unfilled deficit is transferred to the next level. The second level is AC mutual assistance. For the remaining deficit, the adjustable capacity corresponding to the AC port's power deficit is utilized, with the AC port's forward adjustable upper limit as the adjustment limit. The deficit is filled by increasing the AC port's output power. If the AC port's supplementary power is greater than or equal to the remaining deficit, the AC port assumes all remaining adjustment, while the energy storage port has zero adjustment. If an unfilled deficit still exists, the process is transferred to the next level. The third level is energy storage support. The remaining power deficit is entirely borne by the energy storage port, with the upper limit of the positive adjustable range of the energy storage port as the adjustment limit. The remaining power deficit is filled by energy storage discharge.

[0094] Under power surplus conditions, the power surplus is absorbed in descending order of priority. The first level is photovoltaic (PV) absorption, prioritizing the current output level of the PV terminals, without actively reducing PV active power output, retaining the baseline power value of the PV terminals, and directly transferring all surplus power to the next level for absorption, reflecting the priority principle of full PV output absorption. The second level is AC mutual assistance, utilizing the adjustable capacity corresponding to the AC port's capacity, using the negative adjustable lower limit of the AC port as the adjustment lower limit, and absorbing power surplus by increasing the AC port's internal power absorption. If the AC port's capacity is greater than or equal to the total surplus, the AC port undertakes all surplus adjustment, and the energy storage port's adjustment is 0; if there is still unabsorbed surplus power, it is transferred to the next level. The third level is energy storage support, where the remaining surplus is entirely absorbed by the energy storage ports, using the negative adjustable lower limit of the energy storage ports as the adjustment lower limit, and absorbing the remaining power surplus through energy storage charging.

[0095] S403: Adjusted smoothing constraint incorporating character transition confidence.

[0096] To avoid power oscillations caused by sudden changes in port roles, the port adjustment step size within a single control cycle is dynamically constrained based on the role transition confidence of each port, ensuring both adjustment response speed and operational stability. Within a single control cycle, the maximum allowable adjustment step size for each port is determined jointly by the port's adjustable power range amplitude and the role transition confidence: a lower role transition confidence indicates a more stable current port role and a lower probability of operating condition reversal, corresponding to a larger maximum allowable adjustment step size and faster adjustment response; a higher role transition confidence indicates a more pronounced port role transition trend and stronger operating condition uncertainty, corresponding to a smaller maximum allowable adjustment step size, which can prevent excessive adjustment from causing reverse oscillations. Specifically, the maximum allowable adjustment step size is equal to the difference between the port's adjustable power range amplitude multiplied by 1 and the product of the role transition confidence and the adjustment suppression coefficient; the adjustment suppression coefficient is set to 0.7, based on typical transition times for photovoltaic-storage converter operating condition switching and engineering experience in power oscillation suppression, achieving an optimal balance between response speed and operational stability. The target adjustment amount of each port obtained by the hierarchical calculation is compared with the maximum allowable adjustment step size of the corresponding port. If the absolute value of the target adjustment amount exceeds the step size limit, the adjustment of the current control cycle is performed according to the maximum allowable adjustment step size. The remaining unfinished adjustment amount is carried over to the subsequent control cycle to be completed gradually, so as to achieve a smooth transition during the switching of operating conditions.

[0097] S404: Bidirectional power coordination command generation and execution.

[0098] The target adjustment values ​​of each port, after smoothing constraints, are superimposed onto the corresponding port's base power value to obtain the target active power value for each port. These are then integrated to generate a bidirectional power coordination command. After command generation, boundary compliance verification is performed, checking whether the target active power of each port is within the upper and lower limits of the port's adjustable power boundary, eliminating out-of-limit components, and ensuring that the command complies with operational constraints throughout. Once verification is successful, the bidirectional power coordination command is sent to the local monitoring and control device corresponding to each port. The local monitoring and control device then drives the corresponding strain gauge to perform active power adjustment, completing the bidirectional power coordination control for a single control cycle.

[0099] refer to Figure 4 , Figure 4 A flowchart for generating hierarchical power sharing and bidirectional power coordination commands.

[0100] Figure 4 The control flow is shown to determine the global regulation requirements based on the port state matrix and the port adjustable power boundary, call different port regulation capabilities under power deficit or surplus conditions, and generate bidirectional power coordination commands in combination with power constraints.

[0101] It should be noted that, Figure 4This is for illustrative purposes only, intended to help understand the process structure and data organization, and does not represent the precise working state in actual operation.

[0102] This embodiment identifies the port's operating role by verifying the port power trend, the stability of the switching between power supply and decommissioning, and the capacity matching relationship. It characterizes the port's state change trend based on the confidence level of the role transition, and generates the port's adjustable power boundary by combining port decommissioning, energy storage SOC criticality, and power direction reversal constraints. It determines the power sharing amount according to the coordinated order of photovoltaic consumption, AC mutual assistance, and energy storage support, so as to realize the orderly allocation, safe adjustment, and smooth control of bidirectional power of photovoltaic and energy storage multi-port.

[0103] Example 2: This invention discloses a multi-port bidirectional power control system for optical energy storage based on port status recognition, comprising a port acquisition module, a status recognition module, a boundary generation module, and a command control module: The port acquisition module obtains the activation / deactivation status, active power, available photovoltaic power, and energy storage SOC of AC ports, photovoltaic ports, and energy storage ports, forming a port operation dataset.

[0104] The status recognition module verifies the active power trend, switching stability, and port capability matching relationship of the port based on the port operation dataset, determines the power supply role, power receiving role, or support role of each port, calculates the role transition confidence, and generates a port status matrix.

[0105] The boundary generation module determines the power deficit or available capacity of AC ports, the release capacity of photovoltaic ports, and the safe adjustment capacity of energy storage ports based on the port state matrix. It also generates the adjustable power boundary of ports by combining port exit, energy storage SOC criticality, and power direction reversal scenarios.

[0106] Based on the adjustable power boundary of the port and the confidence level of role transition, the command control module determines the port adjustment sequence and power sharing according to the coordinated sequence of photovoltaic consumption, AC mutual assistance and energy storage support, generates bidirectional power coordination commands and controls each port to execute them.

[0107] The specific functional implementation of each of the above modules refers to the relevant content in the optical storage multi-port bidirectional power control method based on port status recognition described in Embodiment 1, and will not be repeated here.

[0108] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.

Claims

1. A multi-port bidirectional power control method for optical storage based on port status recognition, characterized in that, Includes the following steps: The system acquires the commissioning / discharge status, active power, available photovoltaic power, and SOC of AC ports, photovoltaic ports, and energy storage ports to form a port operation dataset. Based on the port operation dataset, the active power trend, switching stability and port capacity matching relationship of the ports are verified, the power supply role, power receiving role or support role of each port is determined, and the role transition confidence is calculated to generate the port state matrix. The reference adjustable power range is determined based on the port state matrix, and the port adjustable power boundary is generated by combining the port exit, energy storage SOC criticality and power direction reversal scenarios. Based on the port adjustable power boundary and role transition confidence, the power sharing is determined in the order of photovoltaic consumption, AC mutual assistance and energy storage support, and bidirectional power coordination commands are generated and controlled for execution.

2. The optical storage multi-port bidirectional power control method based on port status recognition as described in claim 1, characterized in that, The generation of the port status matrix includes: The active power sequence of the port is extracted from the port operation dataset, and the slope of the power change is obtained by first-order linear fitting. The arithmetic mean of the active power sequence of the port is used as the reference power value to determine the main direction of power transfer and the degree of deviation of the power trend. Extract the deployment and withdrawal status sequence, count the number of transitions in the deployment and withdrawal status within the time window and the number of consecutive sampling periods of the current valid deployment and withdrawal status, and calculate the reliability of the deployment and withdrawal status; The port capability matching relationship is verified by single-port self-capability matching and multi-port supply and demand coupling verification. The power supply role, power receiving role or support role is determined by combining the main direction of power transfer, the reliability of the power-on / off status and the port capability margin. The confidence level of role transition is calculated based on the power change slope, the confidence level of the deployment / retreat status, and the capability margin corresponding to the current role, and a port state matrix is ​​generated.

3. The optical storage multi-port bidirectional power control method based on port status recognition as described in claim 2, characterized in that, The generation of the port adjustable power boundary includes: Extract the deployment / retreat status, current role, role transition confidence, baseline power value, and capability margin from the port status matrix, and convert the capability margin into a baseline adjustable power quantity. Determine the power deficit or available capacity of the AC port, the release power of the photovoltaic port, and the safe adjustable power of the energy storage port respectively to form a benchmark adjustable power range; Based on the port exit, energy storage SOC criticality and power direction reversal scenarios, the boundary corresponding to the reference adjustable power range is corrected. The corrected upper and lower boundaries are integrated and constraint marks are added to generate the port adjustable power boundary.

4. The optical storage multi-port bidirectional power control method based on port status recognition as described in claim 1, characterized in that, Determining the power sharing amount includes: Determine whether the power deficit or power surplus operating conditions are determined based on the global power supply and demand difference. In the power deficit condition, the power that can be released at the photovoltaic port, the power deficit at the AC port, and the positive adjustable upper limit at the energy storage port are called in sequence. In the power surplus condition, the capacity that can be taken up at the AC port and the negative adjustable lower limit at the energy storage port are called in sequence. The maximum allowable adjustment step size is determined based on the amplitude of the adjustable power range of the port and the confidence level of the role transition, and the target adjustment amount of each port is limited.

5. The optical storage multi-port bidirectional power control method based on port status recognition as described in claim 2, characterized in that, The calculation of the confidence level for character transitions includes: The power trend offset factor is obtained by taking the absolute value of the power change slope and the ratio of the rated power of the corresponding port, and then performing normalized limiting processing. The stability factor is calculated based on the credibility of the deployment and withdrawal status. The lower the credibility of the deployment and withdrawal status, the larger the stability factor. The energy supply role selects the energy supply margin, the energy receiving role selects the energy receiving margin, and the support role selects the smaller value between the energy supply margin and the energy receiving margin. The capacity margin factor is calculated based on the selected capacity margin. The smaller the capacity margin, the larger the capacity margin factor. The confidence level of role transition is obtained by weighting and summing the power trend offset factor, state stability factor, and capability margin factor.

6. The optical storage multi-port bidirectional power control method based on port status recognition as described in claim 3, characterized in that, Corrections to the reference adjustable power range include: When a port is in an exited state, cancel the adjustable power of the corresponding port; When the energy storage SOC reaches the charging threshold, the charging power amplitude is reduced proportionally to the difference between the energy storage SOC and the charging upper limit; when the energy storage SOC reaches the discharging threshold, the discharging power amplitude is reduced proportionally to the difference between the energy storage SOC and the discharging lower limit. When the target adjustment direction is opposite to the positive or negative direction of the reference power value, the smaller value between the product of the role transition confidence and the port rated power and the port rated power ratio is taken to determine the maximum allowable amplitude of the reverse adjustment and correct the corresponding adjustable power boundary.

7. The optical storage multi-port bidirectional power control method based on port status recognition as described in claim 2, characterized in that, Port capability matching verification includes: Calculate the photovoltaic output margin based on the available photovoltaic power and the active power at the photovoltaic port; The energy storage discharge margin and energy storage charging margin are calculated based on the energy storage SOC, the active power of the energy storage port, the rated capacity of the energy storage, and the rated power of the energy storage port. Calculate the power output margin and power absorption margin of the AC port based on the active power and rated power of the AC port. Summarize the total available power supply and total power to be consumed by the ports in the activation status, determine the global power supply-demand difference, and determine the port operation role by combining the main direction of power transmission, the reliability of activation / deactivation status and the corresponding capacity margin.

8. The optical storage multi-port bidirectional power control method based on port status recognition as described in claim 1, characterized in that, The formation of the port running dataset includes: Using a global synchronous clock source as a unified sampling trigger reference, the power-on / off status and active power of each port are collected synchronously to obtain the available photovoltaic power and energy storage SOC, and a local time identifier is added to the collected data. The collected data is mapped to the same time axis, anti-shake filtering is applied to the power on / off status, the validity of the active power at the port, the available power of photovoltaics and the SOC of energy storage are verified, abnormal and sudden data are removed, and missing data is filled in by linear interpolation based on adjacent valid sampling points. The data, after being aggregated and processed according to the time index layer, port parameter layer, and data quality layer, forms the port operation dataset.

9. The optical storage multi-port bidirectional power control method based on port status recognition as described in claim 4, characterized in that, The generation and execution of bidirectional power coordination commands include: The target adjustment values ​​of each port are superimposed on the reference power value of the corresponding port to obtain the target active power value of each port; Based on the adjustable power boundary of the port, the target active power value of each port is checked, the adjustment components that exceed the range of the adjustable power boundary of the port are eliminated, and a two-way power coordination command is generated. The bidirectional power coordination command is sent to the local measurement and control device corresponding to each port, driving the strain gauge to perform active power regulation.

10. A multi-port bidirectional power control system for optical storage based on port status recognition, used to implement the multi-port bidirectional power control method for optical storage based on port status recognition as described in any one of claims 1-9, characterized in that, include: The port acquisition module acquires the commissioning and decommissioning status, active power, available photovoltaic power, and energy storage SOC of AC ports, photovoltaic ports, and energy storage ports to form a port operation dataset; The status recognition module verifies the active power trend, switching stability and port capability matching relationship of the port based on the port operation dataset, determines the power supply role, power receiving role or support role of each port, calculates the role transition confidence, and generates a port status matrix. The boundary generation module determines the baseline adjustable power range based on the port state matrix, and generates the port adjustable power boundary by combining the port exit, energy storage SOC criticality and power direction reversal scenarios. Based on the port-adjustable power boundary and role transition confidence, the command control module determines the power sharing in the order of photovoltaic consumption, AC mutual assistance and energy storage support, generates bidirectional power coordination commands and controls their execution.