Method, system and device for controlling a photovoltaic charging relay and storage medium
By introducing a sliding time window mechanism and locked state management into the photovoltaic charging circuit, the problem of frequent operation of the main relay is solved, stable control is achieved under photovoltaic input fluctuation conditions, device life is extended, and system stability and user experience are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN POWEROAK NEWENER CO LTD
- Filing Date
- 2026-01-16
- Publication Date
- 2026-05-08
AI Technical Summary
In existing photovoltaic charging circuits, the main relay frequently engages and disengages when the photovoltaic input voltage fluctuates, leading to system instability, severe wear of relay contacts, and noise generation. Furthermore, existing hardware improvement solutions increase system complexity and energy consumption.
By introducing a sliding time window mechanism into the photovoltaic charging circuit, the number of times the main relay disconnects is recorded. When the threshold is reached, the system enters a locked state, prohibiting the activation control. The voltage threshold and voltage trend judgment are dynamically adjusted through the lockout exit condition to ensure stable operation of the system when the photovoltaic input fluctuates.
It effectively avoids frequent operation of the main relay, extends device life, improves system stability and user experience, reduces noise interference, and does not require additional hardware costs.
Smart Images

Figure CN121643192B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of photovoltaic power generation and energy storage technology, and in particular to a control method, system, device and storage medium for a photovoltaic charging relay. Background Technology
[0002] In photovoltaic (PV) energy storage systems, the PV charging circuit is responsible for introducing the DC power output from the solar modules into the energy storage battery or inverter system. Its control performance directly affects charging efficiency and system stability. A typical PV charging circuit includes a pre-charge branch and a main relay. The pre-charge branch buffers the charging of the energy storage capacitor through a current-limiting resistor during system startup. The main relay engages when the energy storage capacitor voltage approaches the PV panel output voltage, thus establishing the main charging circuit. Existing circuit control methods generally employ a fixed voltage threshold judgment logic: when the PV input voltage exceeds the set threshold, pre-charging is initiated; if pre-charging fails or the voltage drops, the relay is disconnected and the system waits again. However, in scenarios with frequently changing sunlight conditions, the PV input voltage fluctuates significantly. When the PV input voltage is within the threshold range, the main relay is prone to frequent engagement and disengagement, causing the system to repeatedly perform startup and shutdown operations within a short period.
[0003] In practice, the frequent switching on and off of the main relay not only causes arcing and mechanical wear on the relay contacts, significantly shortening its lifespan, but also generates continuous mechanical noise, affecting the product's quiet operation and user experience. Simultaneously, system energy is consumed during multiple ineffective startups, resulting in a decrease in overall charging efficiency and making stable charging difficult. To address these issues, existing technologies attempt to improve the frequent relay jitter by adding hardware circuitry. Specifically, a low-power load branch consisting of a MOSFET and a current-limiting resistor is connected in parallel at the photovoltaic input. When the photovoltaic input voltage fluctuates or the illumination is unstable, the load branch is first turned on to absorb a weak current, thereby pulling the photovoltaic panel's operating point from the unstable high-voltage range under no-load conditions into a loaded state, stabilizing its output voltage. This method can, to some extent, prevent the main relay from being accidentally triggered by a short-term voltage rise or disconnected by a brief voltage drop, thus reducing the jitter frequency.
[0004] However, the improved design requires additional low-power load branches, making the system structure more complex and increasing manufacturing costs and board layout difficulties. Furthermore, the low-power load branches continuously consume energy during operation, resulting in unnecessary energy loss during low-light or standby phases. Additionally, to coordinate the start-up and shutdown processes of the low-power load branches and the main relay, the control logic must incorporate more decision-making steps, further increasing software design complexity. Therefore, achieving stable control of the main relay under fluctuating photovoltaic input conditions without increasing additional hardware costs, and minimizing system instability and device losses caused by frequent switching, has become a pressing problem in this field. Summary of the Invention
[0005] This application provides a control method, system, device, and storage medium for a photovoltaic charging relay, which can achieve stable control of the main relay under photovoltaic input fluctuation conditions, and minimize system instability and device damage caused by frequent switching. This application provides the following technical solution:
[0006] In a first aspect, this application provides a control method for a photovoltaic charging relay, comprising the following steps:
[0007] Under normal conditions, the main relay in the photovoltaic charging circuit is controlled to perform activation and deactivation operations, and the number of times the main relay is deactivated when the photovoltaic input voltage is lower than the preset voltage activation threshold is recorded.
[0008] Within a preset time window, when the number of times the main relay disconnects reaches a preset threshold, the control system enters a locked state, during which the activation control of the main relay is prohibited.
[0009] In the locked state, at least one preset lock-out condition is monitored. When any of the lock-out conditions is met, the control system exits the locked state, restores the normal state, and controls the engagement and disengagement of the main relay.
[0010] In one specific implementation scheme, the preset lock exit conditions include a first lock exit condition, a second lock exit condition, and a third lock exit condition;
[0011] The first lock-out condition is that the current time period is in a preset invalid time period;
[0012] The second lockout condition is that the photovoltaic input voltage is higher than the preset voltage turn-on threshold and continues to reach the first preset duration, and the change trend of the photovoltaic input voltage is characterized as a non-decreasing trend;
[0013] The third lockout exit condition is that the photovoltaic input voltage is lower than the preset no-light determination threshold and continues to reach the second preset duration.
[0014] In one specific implementation, under the locked state, the first lock exit condition, the second lock exit condition, and the third lock exit condition are executed sequentially in descending order of priority.
[0015] When a higher-priority lock exit condition is met, the evaluation of lower-priority lock exit conditions is stopped, and the system is controlled to exit the lock state.
[0016] In one specific implementation, in the second lockout condition, the trend of the photovoltaic input voltage is obtained by calculating the difference between the photovoltaic input voltages in adjacent sampling periods. When the difference is greater than or equal to zero, the trend is determined to be a non-decreasing trend.
[0017] In one specific implementation scheme, in the second lockout condition, the voltage activation threshold and the first preset duration are set to be dynamically adjusted according to the current time period;
[0018] When the current time is a low-light period, the voltage activation threshold is increased and the first preset duration is extended;
[0019] When the current time is during a period of strong light, maintain or reduce the voltage activation threshold and shorten the first preset duration.
[0020] In one specific implementation scheme, before controlling the main relay in the photovoltaic charging circuit to perform the engaging and disengaging operations, the following steps are also included:
[0021] Under normal conditions, the photovoltaic input voltage is continuously collected, and the photovoltaic input is determined to be stable and effective only when the photovoltaic input voltage is higher than the preset voltage threshold and continues to reach the third preset time, thereby performing the pre-charge judgment;
[0022] The difference between the photovoltaic input voltage and the pre-charge capacitor voltage is compared. When the difference does not exceed a preset voltage difference threshold and continues to reach a fourth preset duration, the pre-charge is determined to be complete. When the difference exceeds the preset threshold and continues to reach a fifth preset duration, the pre-charge is determined to be failed, wherein the fifth preset duration is longer than the fourth preset duration.
[0023] In one specific implementation, after determining that the pre-charge has failed, when the photovoltaic input voltage is lower than the voltage activation threshold and continues to be lower than the voltage threshold for a sixth preset duration, the pre-charge failure state is cleared and the acquisition of the photovoltaic input voltage is re-executed.
[0024] Secondly, this application provides a control system for a photovoltaic charging relay, the control system comprising:
[0025] The status control module is used to control the main relay in the photovoltaic charging circuit to perform activation and deactivation operations under normal conditions, and to record the number of times the main relay is deactivated when the photovoltaic input voltage is lower than the preset voltage activation threshold.
[0026] The locking determination module is used to control the system to enter a locked state when the number of disconnections of the main relay reaches a preset threshold within a preset time window. In the locked state, the activation control of the main relay is prohibited.
[0027] The lock release module is used to monitor at least one preset lock exit condition in the locked state. When any of the lock exit conditions is met, the system exits the locked state, restores the normal state, and controls the engagement and disengagement of the main relay.
[0028] Thirdly, this application provides an electronic device, including a processor and a memory, wherein the memory stores a program, which is loaded and executed by the processor to implement the aforementioned control method for a photovoltaic charging relay.
[0029] Fourthly, this application provides a computer-readable storage medium storing a program that, when executed by a processor, is used to implement the aforementioned control method for a photovoltaic charging relay.
[0030] This application proposes a control method for a photovoltaic charging relay. During the normal operation of controlling the main relay's engagement and disengagement, the method continuously monitors the cumulative number of times the main relay disconnects due to insufficient photovoltaic input voltage within a preset time window. When the number of disconnections reaches a preset threshold, the system determines that the current photovoltaic input voltage is in an unstable critical range and immediately enters a locked state. In this state, the engagement control of the main relay is directly prohibited until a specific exit condition is met, at which point normal operation resumes. In this way, this application can proactively identify and block repeated start-up attempts of the main relay when there are significant fluctuations in the photovoltaic input voltage, effectively avoiding the frequent engagement and disengagement jitter of the main relay in a short period. This solves the problems of severe contact mechanical wear and continuous mechanical noise caused by frequent relay operation in existing technologies, extending the device's lifespan and improving the user experience.
[0031] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, the preferred embodiments of this application are described in detail below with reference to the accompanying drawings. Attached Figure Description
[0032] Figure 1 This is a schematic diagram of the photovoltaic charging circuit in the embodiments of this application.
[0033] Figure 2 This is a flowchart illustrating the control method of the photovoltaic charging relay in the embodiments of this application.
[0034] Figure 3 This is a structural block diagram of the control system of the photovoltaic charging relay in the embodiments of this application.
[0035] Figure 4 This is a block diagram of the electronic device controlling the photovoltaic charging relay in the embodiments of this application. Detailed Implementation
[0036] The specific embodiments of this application will be described in further detail below with reference to the accompanying drawings and examples. The following examples are used to illustrate this application, but are not intended to limit the scope of this application.
[0037] This application provides a control method for a photovoltaic charging relay, used to control the main relay in a photovoltaic charging circuit, referring to... Figure 1 Figure 1 shows the circuit structure of the photovoltaic charging circuit in this embodiment. As shown in the figure, the photovoltaic charging circuit mainly includes a photovoltaic input terminal, a pre-charge branch, a main relay, and an energy storage capacitor. The pre-charge branch is connected in parallel with the main relay. It should be noted that in this embodiment, a PTC resistor is preferably used as the pre-charge element. However, the design of the pre-charge branch is not limited to the structure shown in the figure. Other existing pre-charge circuit schemes can also be used. This application does not limit the specific implementation of the pre-charge branch.
[0038] In implementation, after the system powers on, it first executes an initialization process. The system defines and maintains a core state machine, which includes at least a normal state and a locked state. The normal state allows the system to execute a complete charging sequence, including pre-charge determination and the main relay's activation and deactivation. The locked state prohibits the main relay from activating. After initialization, the system defaults to the normal state. At this time, the main relay is initially in the open state, and the current flows through the PTC resistor in the pre-charge branch to charge the downstream energy storage capacitor, gradually building up the photovoltaic input voltage and providing a voltage basis for subsequent pre-charge determination. When the system determines that pre-charge is complete and controls the main relay to close to establish the main charging circuit, the main circuit current flows through the main relay. The PTC resistor, due to its bypass function, exhibits a high resistance state, allowing only a small leakage current to pass through, thus maintaining a low power consumption state. The physical characteristics of the circuit naturally cut off the pre-charge power consumption.
[0039] Reference Figure 2This is a flowchart illustrating a control method for a photovoltaic charging relay provided in one embodiment of this application. The control method includes at least the following steps:
[0040] Step S101: Under normal conditions, control the main relay in the photovoltaic charging circuit to perform activation and deactivation operations, and record the number of times the main relay is deactivated when the photovoltaic input voltage is lower than the preset voltage activation threshold.
[0041] In step S101, once the system is in a normal state (State_Normal) and the main relay has been closed to enter the operation phase, the system will activate real-time monitoring logic to continuously sample and monitor the photovoltaic input voltage (Vpv) and the operating status of the entire charging process. During this period, if the system detects that any of the following conditions are met, it will determine that the conditions for continuing charging are not met, and thus control the main relay to open:
[0042] First, the currently sampled photovoltaic input voltage is lower than the preset voltage turn-on threshold Von and continues to reach the preset voltage turn-off determination time.
[0043] Secondly, a circuit fault occurs during the photovoltaic charging process (such as overcurrent, overtemperature, or other abnormalities), or the preset normal charging stop conditions are met (such as the battery being charged to 100%).
[0044] When any of the above situations occur, the system will immediately perform a disconnection operation, controlling the main relay to switch from the closed state to the open state to cut off the main charging circuit. At the same time, in order to count the frequency of system switching, the system will increment the main relay disconnection count counter by one during the disconnection operation, thereby recording the number of times the main relay disconnects.
[0045] Step S102: Within a preset time window, when the number of times the main relay disconnects reaches a preset threshold, the control system enters a locked state, and in the locked state, the activation control of the main relay is prohibited.
[0046] In step S102, in order to accurately identify whether there is an oscillation phenomenon in the photovoltaic input that causes the main relay to operate frequently, the system maintains a sliding time window with a preset time window length, and records and updates the cumulative number of times the main relay disconnects within the window in real time.
[0047] Specifically, the system continuously monitors the relationship between the current number of disconnections and a preset threshold. If the recorded number of disconnections reaches or exceeds the preset threshold within the current time window, the system determines that the main relay is in a high-frequency oscillation state and immediately controls the core state machine to transition from the normal state to the locked state. Upon entering the locked state, the system forcibly locks the main relay in the disconnected state and prohibits the execution of any activation control commands for the main relay, thereby eliminating noise and impact on the devices caused by frequent opening and closing. Conversely, if the number of disconnections within the current time window does not reach the preset threshold, the system remains in the normal state and maintains the counter by clearing historical disconnection records that exceed the current time window, ensuring that the disconnection count only reflects the event frequency within the most recent time window. The system then returns to step S101 to continue real-time monitoring of the photovoltaic input voltage and system operating status.
[0048] Step S103: In the locked state, monitor at least one preset lock-out condition. When any lock-out condition is met, control the system to exit the locked state, restore the normal state, and control the activation and deactivation of the main relay.
[0049] In step S103, to ensure the system can accurately and timely recover from the locked state, the system presets lock exit conditions, including a first lock exit condition, a second lock exit condition, and a third lock exit condition. In the locked state, the first, second, and third lock exit conditions are evaluated sequentially in descending order of priority: the first lock exit condition is evaluated first, then the second lock exit condition if it is not met, and finally the third lock exit condition. When a higher-priority lock exit condition is met, the evaluation of lower-priority lock exit conditions stops, and the system exits the locked state. Simultaneously, relevant counters and timers are cleared to return to the normal state (State_Normal) and restart monitoring. Specifically, the implementation details of each lock exit condition are as follows:
[0050] The first lock-out condition is that the current time falls within a preset invalid time period. The system reads the RTC time, and if it determines that the current time falls within a preset invalid time period, such as nighttime hours typically from 8:00 PM to 6:00 AM the next day, then the first lock-out condition is met. This condition is designed to unconditionally force the system to exit the lock state in application scenarios where users charge the device using other DC sources or in nighttime scenarios, preventing the system from waiting or deadlocking unnecessarily during non-light-time periods.
[0051] The second lockout exit condition is that the photovoltaic input voltage is higher than the preset voltage threshold Von and remains above it for a first preset duration, and the trend of the photovoltaic input voltage change is not a decreasing trend. In the second lockout exit condition, firstly, the voltage threshold Von and the first preset duration are dynamically adjusted according to the current time period. The system reads the RTC time; if the current time is during a low-light period, the voltage threshold Von is increased and the first preset duration is extended to avoid misjudgments due to slight fluctuations in light. If the current time is during a high-light period, the voltage threshold Von is maintained or decreased and the first preset duration is shortened to accelerate the system recovery speed.
[0052] Subsequently, the trend of photovoltaic input voltage change is obtained by calculating the difference between photovoltaic input voltages in adjacent sampling periods. The system sets a fixed time interval ΔT (e.g., 10 seconds) as the sampling period and calculates the instantaneous slope of voltage change according to formula (1):
[0053] Slope=(Vcurrent-Vprevious) / ΔT (1);
[0054] Where Vcurrent is the current photovoltaic input voltage sample value, and Vprevious is the historical photovoltaic input voltage sample value ΔT time ago. After the calculation is completed, the system determines the trend based on the slope value. When the calculated instantaneous slope (i.e., voltage difference) is greater than or equal to zero, the system determines that the current photovoltaic input voltage change trend is a non-decreasing trend.
[0055] Finally, the system performs a comprehensive judgment. Only when the photovoltaic input voltage is detected to be higher than the dynamically adjusted voltage opening threshold Von and continues to reach the adjusted first preset duration, and the instantaneous slope calculated within the sampling period is greater than or equal to zero, is the second lock-out condition determined to be met. The system immediately exits the lock-out state and returns to the normal state, while clearing all counters and timers. Otherwise, if any condition is no longer met during the timing process, the timing for the first preset duration is immediately cleared, and the system waits for the next time when the condition is met.
[0056] The third lockout exit condition is that the photovoltaic input voltage is lower than a preset no-light determination threshold and remains below it for a second preset duration. This condition serves as an auxiliary exit mechanism to handle situations where the photovoltaic input is inactive for an extended period. Specifically, to prevent the state from oscillating at the critical point, the no-light determination threshold Voff is set lower than the aforementioned voltage on threshold Von, thus creating a hysteresis judgment interval. When the photovoltaic input voltage is detected to be continuously lower than the no-light determination threshold Voff for a second preset duration, the system determines that the current environment is completely dark (e.g., entering nighttime), thus confirming that the third lockout exit condition is met. At this time, the system performs a state reset operation, immediately exiting the lockout state and returning to the normal state, while clearing all counters and timers so that the system can restart the normal detection process when sunlight is restored.
[0057] In implementation, to ensure that the main circuit is established only when the photovoltaic input is stable and the pre-charge is sufficient, a pre-charge determination step is included before the main relay in the photovoltaic charging circuit performs the energizing and de-energizing operations:
[0058] Step S100: Under normal conditions, continuously collect the photovoltaic input voltage and perform pre-charge judgment.
[0059] Specifically, after system initialization is complete, the system defaults to normal operation. At this time, the main relay is in the off position, and the photovoltaic input charges the energy storage capacitor through the pre-charge branch (PTC resistor). The system then initiates the pre-charge determination. Step S100 includes at least the following sub-steps:
[0060] Step S1001: Under normal conditions, the photovoltaic input voltage is continuously collected. The photovoltaic input is determined to be stable and effective only when the photovoltaic input voltage exceeds a preset voltage threshold Von and remains above it for a third preset duration, thus triggering a pre-charge judgment. If the above conditions are not met, the system waits and continues to collect the photovoltaic input voltage.
[0061] Step S1002: In the pre-charge judgment, the difference between the photovoltaic input voltage and the pre-charge capacitor voltage is compared. When the difference does not exceed the preset voltage difference threshold and continues for a fourth preset time, the pre-charge is determined to be complete, and the system immediately controls the main relay to close to establish the main charging circuit. When the difference exceeds the preset threshold and continues for a fifth preset time, the pre-charge is determined to have failed. The fifth preset time is longer than the fourth preset time. The fourth preset time is intended to perform a short-term stability confirmation after the voltage difference meets the condition, so as to respond quickly and establish a connection under normal circumstances. However, the pre-charge process may be relatively slow due to the influence of photovoltaic input power and load capacitance. Therefore, the fifth preset time, as the fault judgment window for pre-charge timeout, must be set significantly longer than the fourth preset time to give the capacitor voltage sufficient physical rise time in low light environment, preventing the system from misjudging the normal slow charging process as a pre-charge failure, thus balancing the system's startup response speed and environmental adaptability.
[0062] Step S1003: After determining that pre-charge has failed, when the photovoltaic input voltage is lower than the voltage threshold Von and remains below it for a sixth preset time, the pre-charge failure state is cleared and the photovoltaic input voltage acquisition is restarted. The advantage of this setting is that it prevents the system from repeatedly attempting to start under abnormal pre-charge failure conditions and falling into an infinite loop. By requiring the photovoltaic input voltage to drop below the voltage threshold for a sixth preset time, it ensures that the system only clears the fault flag and restarts acquisition after confirming that the current input process has ended and the state has been reset. This ensures that the next pre-charge judgment is performed after the system has been completely reset, improving the stability and safety of the control logic.
[0063] It should be noted that if the system is currently in a locked state (State_Lockout), the precharge check will not be performed, and the system will simply continue to wait.
[0064] In summary, this application first performs a pre-charge judgment step before controlling the main relay to close. It continuously collects the photovoltaic input voltage, and only when the photovoltaic input voltage is higher than a preset voltage threshold and remains above it for a first preset duration is the input deemed valid and a pre-charge judgment is performed. The difference between the photovoltaic input voltage and the pre-charge capacitor voltage is compared to determine whether pre-charge is complete or has failed. If pre-charge fails, the photovoltaic input voltage is required to be lower than the voltage threshold and remain below it for a sixth preset duration to clear the pre-charge failure state. After pre-charge is complete and the main relay is activated, the system continuously monitors operating conditions. When the photovoltaic input voltage is detected to be lower than the voltage threshold and remains below it for a voltage disconnection judgment duration, the system... When a charging fault or charging stop condition is detected, the main relay is disconnected and the number of disconnections is recorded. Subsequently, the system counts the number of disconnections in real time within a preset time window. If the number of disconnections reaches a preset threshold, it is determined that there is oscillation and the system enters a locked state to prevent the main relay from engaging. Finally, in the locked state, the system monitors the lockout conditions in priority order. When the first lockout condition (current time is in a preset invalid period) is met, or the second lockout condition (combining dynamic parameter adjustment and voltage non-decreasing trend determination) is met, or the third lockout condition (photovoltaic input voltage is continuously lower than the no-light determination threshold) is met, the system exits the locked state and resumes control of the main relay.
[0065] Firstly, to address the noise and lifespan reduction issues caused by frequent relay operation, this application introduces a counting mechanism based on a sliding time window and a locking state. By counting the number of times the main relay disconnects in real time, the system can proactively identify and avoid high-frequency oscillation conditions. Once oscillation characteristics are detected, the system is forced into a locking state, thereby eliminating the noise caused by frequent main relay engagement in low-light environments at its source and significantly reducing the number of invalid and potentially harmful operations of the main relay, thus significantly improving the mechanical and electrical lifespan of the system.
[0066] Secondly, to address the challenge of accurately determining the timing of solar irradiance recovery using traditional control logic, this application integrates RTC dynamic parameter adjustment and voltage slope trend judgment technologies. Utilizing an RTC time window strategy, the system dynamically adjusts the voltage activation threshold and delay parameters based on the current period of strong or weak sunlight, achieving differentiated management across different time periods. Simultaneously, combined with real-time analysis of photovoltaic voltage change trends (instantaneous slope), the system can accurately distinguish between brief voltage disturbances and genuine solar irradiance recovery processes, ensuring intelligent exit from locking only at the optimal time when the trend is not decreasing and the voltage is stable, thereby maximizing energy harvesting efficiency.
[0067] Furthermore, by incorporating pre-charge determination logic and a no-light determination mechanism including a hysteresis interval, this application utilizes a state machine model to precisely manage the system's operational phases. This enables the system to dynamically adapt to the illumination characteristics at different times, effectively preventing repeated oscillations at the critical voltage point and demonstrating excellent environmental adaptability and robustness under various complex environments. Finally, all functions of this solution are implemented through software algorithms, requiring no additional external hardware. Without increasing material costs or design complexity, it achieves stable control of the main relay under photovoltaic input fluctuations.
[0068] Figure 3 This is a structural block diagram of a photovoltaic charging relay control system provided in one embodiment of this application. The control system includes at least the following modules:
[0069] The status control module is used to control the main relay in the photovoltaic charging circuit to perform activation and deactivation operations under normal conditions, and to record the number of times the main relay is deactivated when the photovoltaic input voltage is lower than the preset voltage activation threshold.
[0070] The lockout determination module is used to lock the control system when the number of times the main relay disconnects reaches a preset threshold within a preset time window. In the lockout state, the main relay is prohibited from being activated.
[0071] The lock release module is used to monitor at least one preset lock exit condition when the lock is in the locked state. When any lock exit condition is met, the control system exits the locked state, restores the normal state, and controls the activation and deactivation of the main relay.
[0072] For relevant details, please refer to the above method implementation examples.
[0073] Figure 4 This is a block diagram of an electronic device provided in one embodiment of the present application, the device including at least a processor 401 and a memory 402.
[0074] Processor 401 may include one or more processing cores, such as a quad-core, octa-core, or other multi-core processor. Processor 401 may be implemented using an MCU (Microcontroller Unit), DSP (Digital Signal Processor), FPGA (Field-Programmable Gate Array), or any combination of the above hardware forms. In some embodiments, processor 401 is specifically configured to execute the core control logic of the photovoltaic charging system, including the acquisition and validity determination of the photovoltaic input voltage, the timing control of the pre-charging circuit and the main relay, and oscillation detection and lockout state management based on a sliding time window. Furthermore, processor 401 may also integrate or be connected to an RTC (Real-Time Clock) module to provide accurate real-time time information, so that processor 401 can dynamically adjust the voltage opening threshold and preset duration according to the current time period (such as a low-light period or a high-light period), thereby realizing intelligent lockout control of the main relay.
[0075] The memory 402 may include one or more computer-readable storage media, which may be non-transitory, for storing program code, system parameters, and historical state information. Specifically, the memory 402 stores various key control parameters, including but not limited to voltage on threshold (Von), no-light threshold (Voff), preset voltage difference threshold, and first to fifth preset durations; simultaneously, the memory 402 is also used to record the number of times the main relay is disconnected, the timing data of the sliding time window, and the current system state (such as normal state, locked state, or pre-charge failure state). In some embodiments, the non-transitory storage medium in the memory 402 may store at least one instruction set, which is executed by the processor 401 to implement the photovoltaic charging relay control method provided in the above-described method embodiments of this application, including the pre-charge determination in step S100, the operation monitoring and disconnection counting in step S101, the locked state determination in step S102, and the locked exit mechanism in step S103.
[0076] In some embodiments, the electronic device may also optionally include a peripheral device interface and at least one peripheral device, with the processor 401, memory 402, and peripheral device interface connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface via a bus, signal line, or circuit board. Indicatively, for the application scenario of this application, the peripheral device includes at least: an analog-to-digital converter (ADC) interface for connecting to a voltage sampling circuit to acquire the photovoltaic input voltage and pre-charge capacitor voltage in real time; a GPIO (General Purpose Input / Output) interface for outputting control signals to drive the main relay and the pre-charge circuit to close and open; and a communication module for reporting the current charging status, fault information, or relay operation records to a host computer or user terminal.
[0077] Of course, electronic devices may also include fewer or more components, and this embodiment does not limit this.
[0078] Optionally, this application also provides a computer-readable storage medium storing a program that is loaded and executed by a processor to implement the control method of the photovoltaic charging relay in the above method embodiments.
[0079] Optionally, this application also provides a computer product including a computer-readable storage medium storing a program, which is loaded and executed by a processor to implement the control method of the photovoltaic charging relay described in the above method embodiments.
[0080] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0081] The above embodiments merely illustrate several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A control method for a photovoltaic charging relay, characterized in that, Includes the following steps: Under normal conditions, the main relay in the photovoltaic charging circuit is controlled to perform activation and deactivation operations, and the number of times the main relay is deactivated when the photovoltaic input voltage is lower than the preset voltage activation threshold is recorded. Within a preset time window, when the number of times the main relay disconnects reaches a preset threshold, the control system enters a locked state, during which the activation control of the main relay is prohibited. In the locked state, at least one preset lock-out condition is monitored. When any of the lock-out conditions is met, the control system exits the locked state, restores the normal state, and controls the engagement and disengagement of the main relay. The preset lock exit conditions include a first lock exit condition, a second lock exit condition, and a third lock exit condition; The first lock-out condition is that the current time period is in a preset invalid time period; The second lockout condition is that the photovoltaic input voltage is higher than the preset voltage turn-on threshold and continues to reach the first preset duration, and the change trend of the photovoltaic input voltage is characterized as a non-decreasing trend; The third lockout exit condition is that the photovoltaic input voltage is lower than the preset no-light determination threshold and continues to reach the second preset duration.
2. The control method according to claim 1, characterized in that, In the locked state, the first lock exit condition, the second lock exit condition, and the third lock exit condition are executed sequentially in descending order of priority. When a higher-priority lock exit condition is met, the evaluation of lower-priority lock exit conditions is stopped, and the system is controlled to exit the lock state.
3. The control method according to claim 2, characterized in that, In the second lockout exit condition, the trend of the photovoltaic input voltage is obtained by calculating the difference between the photovoltaic input voltages in adjacent sampling periods. When the difference is greater than or equal to zero, the trend is determined to be a non-decreasing trend.
4. The control method according to claim 3, characterized in that, In the second lockout condition, the voltage activation threshold and the first preset duration are set to be dynamically adjusted according to the current time period. When the current time is a low-light period, the voltage activation threshold is increased and the first preset duration is extended; When the current time is during a period of strong light, maintain or reduce the voltage activation threshold and shorten the first preset duration.
5. The control method according to any one of claims 1-4, characterized in that, Before controlling the main relay in the photovoltaic charging circuit to perform the engaging and disengaging operations, the following steps are also included: Under normal conditions, the photovoltaic input voltage is continuously collected, and the photovoltaic input is determined to be stable and effective only when the photovoltaic input voltage is higher than the preset voltage threshold and continues to reach the third preset time, thereby performing the pre-charge judgment; The difference between the photovoltaic input voltage and the pre-charge capacitor voltage is compared. When the difference does not exceed a preset voltage difference threshold and continues to reach a fourth preset duration, the pre-charge is determined to be complete. When the difference exceeds the preset threshold and continues to reach a fifth preset duration, the pre-charge is determined to be failed, wherein the fifth preset duration is longer than the fourth preset duration.
6. The control method according to claim 5, characterized in that, After a pre-charge failure is determined, if the photovoltaic input voltage is lower than the voltage activation threshold and continues to be lower than the sixth preset time, the pre-charge failure state is cleared and the photovoltaic input voltage acquisition is re-executed.
7. A control system for a photovoltaic charging relay, characterized in that, The control system includes: The status control module is used to control the main relay in the photovoltaic charging circuit to perform activation and deactivation operations under normal conditions, and to record the number of times the main relay is deactivated when the photovoltaic input voltage is lower than the preset voltage activation threshold. The locking determination module is used to control the system to enter a locked state when the number of disconnections of the main relay reaches a preset threshold within a preset time window. In the locked state, the activation control of the main relay is prohibited. The lock release module is used to monitor at least one preset lock exit condition in the locked state. When any of the lock exit conditions is met, the system exits the locked state, restores the normal state, and controls the engagement and disengagement of the main relay. The preset lock exit conditions include a first lock exit condition, a second lock exit condition, and a third lock exit condition; The first lock-out condition is that the current time period is in a preset invalid time period; The second lockout condition is that the photovoltaic input voltage is higher than the preset voltage turn-on threshold and continues to reach the first preset duration, and the change trend of the photovoltaic input voltage is characterized as a non-decreasing trend; The third lockout exit condition is that the photovoltaic input voltage is lower than the preset no-light determination threshold and continues to reach the second preset duration.
8. An electronic device, characterized in that, It includes a processor and a memory, wherein the memory stores a program that is loaded and executed by the processor to implement the control method of the photovoltaic charging relay as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program that, when executed by a processor, is used to implement the control method for the photovoltaic charging relay as described in any one of claims 1-6.
Citation Information
Patent Citations
Power supply circuit, control method thereof and energy storage equipment
CN116667495A
Photovoltaic hybrid inverter, control method of photovoltaic hybrid inverter and related equipment
CN121076972A