Method and system for controlling light transmittance of a marine variable color fireproof window based on photovoltaic power supply
The photovoltaic-powered marine color-changing fireproof window transmittance control system solves the problems of limited environmental perception and fire safety hazards associated with marine dimming glass, achieving efficient, energy-saving, and safe transmittance control, and improving the fire safety level of ships.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WUXI HAILIAN MARINE EQUIP CO LTD
- Filing Date
- 2026-03-19
- Publication Date
- 2026-06-19
AI Technical Summary
Existing control methods for marine smart glass have limited environmental perception, poor anti-interference capabilities, and lack multi-dimensional coupling control strategies. They cannot balance heat insulation and energy saving, and lack fire safety linkage mechanisms, posing safety hazards in the event of a fire.
A photovoltaic-powered marine color-changing fireproof window transmittance control system is adopted. By collecting environmental data and performing Kalman filtering, and combining temperature and power data, the transmittance command is calculated. The transmittance of the electrochromic film is controlled by a PID algorithm, and the connection between the inverter module and the color-changing drive component is cut off in the event of a fire to achieve physical isolation of the battery pack.
It improves the ship's fire safety level, avoids frequent window flickering, achieves high energy efficiency and visual comfort, reduces dependence on the ship's electrical grid, and conforms to the trend of green and energy-saving development.
Smart Images

Figure CN122239337A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of marine equipment technology, and specifically relates to a method and system for controlling the light transmittance of marine color-changing fireproof windows based on photovoltaic power supply. Background Technology
[0002] With the rise of green shipping and smart ship concepts, the shipbuilding industry has placed higher demands on the comfort, energy efficiency, and safety of cabin environments. Marine windows, as the most active part of the ship's enclosure in terms of heat exchange, directly affect cabin air conditioning energy consumption and the living experience due to their light transmittance and insulation performance. Meanwhile, the application of photovoltaic technology on ships is gradually expanding from auxiliary lighting to powering equipment. However, the complex and variable marine environment, with its high humidity, high salt spray, and strong sunlight, poses a severe challenge to the reliability and safety of marine electronic equipment.
[0003] Currently, most marine-grade smart windows use manual switches or simple light-sensing threshold controls, meaning they change color when the light level exceeds a set value and reset when it falls below. While this control method is logically simple, it has several drawbacks in practical applications: First, reflections from sea waves cause drastic fluctuations in the light sensor readings, leading to frequent window color flickering and affecting visual comfort; second, relying solely on light adjustment ignores temperature factors, making it ineffective for heat insulation in hot, humid weather conditions with low light levels; third, existing systems lack sophisticated energy management, often resulting in control failure due to insufficient battery power; and most importantly, traditional electronic dimming systems lack deep integration with ship fire suppression systems. In the event of a fire, electrified windows and battery packs could become sources of leakage, short circuits, or even combustion, posing serious safety hazards.
[0004] This shows that the existing technology has the following problems: 1. The environmental perception is singular and the anti-interference ability is poor, making it easy to be misled by the reflection of sea waves; 2. There is a lack of multi-dimensional coupling control strategy, which cannot take into account both heat insulation and energy saving; 3. The fire safety linkage mechanism is missing, and the safety under extreme working conditions cannot be guaranteed. Summary of the Invention
[0005] (a) Technical problems to be solved To address the problems in related technologies, this invention provides a method and system for controlling the light transmittance of marine color-changing fireproof windows based on photovoltaic power supply, thereby overcoming the aforementioned technical problems existing in the prior art.
[0006] (II) Technical Solution To solve the above-mentioned technical problems, the present invention is achieved through the following technical solution: S1. Collect ambient light intensity data, surface temperature data of laminated fireproof photochromic glass, and voltage, current, and remaining power data of lithium-ion battery pack; perform Kalman filtering on the ambient light intensity data and output effective light intensity values. S2. Real-time monitoring of the alarm signal status of the ship's fire protection system; when a fire alarm signal is received, execute the fire emergency response logic, cut off the connection circuit between the inverter module and the color-changing drive component, and control the lithium-ion battery pack to disconnect the main circuit contactor. S3. In the absence of a fire alarm signal, based on the voltage and current of the lithium-ion battery pack in S1, the duty cycle of the charging management module is adjusted using a perturbation observation algorithm to control the photovoltaic panel to charge the lithium-ion battery pack. S4. Calculate the real-time basic transmittance based on the effective light intensity value in S1, generate a temperature correction coefficient using the surface temperature data of the laminated fireproof photochromic glass, and calculate the power constraint factor by combining the remaining power data; calculate the target transmittance command by multiplying the real-time basic transmittance, temperature correction coefficient and power constraint factor. S5. Input the target transmittance command from S4 into the transmittance-driving voltage mapping model to obtain the target driving voltage amplitude and polarity. S6. Based on the target driving voltage amplitude and polarity, the PID algorithm is used to control the output driving voltage of the color-changing driving component and adjust the light transmittance of the electrochromic film; the surface temperature data is compared with the heat dissipation start threshold to control the start, stop and speed of the cooling fan.
[0007] Preferably, step S1 includes the following steps: S11. Initialize the sensor array sampling parameters; set the sampling frequency of the light intensity sensor, the sampling frequency of the temperature sensor, and the sampling frequency of the battery management unit. S12. Define the state prediction equation and the observation equation to obtain the one-dimensional Kalman filter equation. Using the one-dimensional Kalman filter equation, the light intensity estimate of the previous moment is taken as the prior state, and the original observation value of the sensor at the current moment is taken as the observation input. S13. Calculate the Kalman gain using the prediction error covariance and the measurement noise covariance. Then, perform weighted correction on the prior state and observation residuals based on the Kalman gain to obtain the effective illumination intensity value. Preferably, step S2 includes the following steps: S21. Set the time window and judgment period threshold for fire signal detection; read the level signal of the ship's fire protection system through the GPIO port in each time window. If the effective trigger level reaches the judgment period threshold, the fire alarm signal is deemed valid. S22. Within the first preset time after the fire alarm signal is determined to be valid, the enable pin level of the inverter module is lowered to stop the DC-to-AC power output. S23. Within a second preset time after the inverter module stops outputting, drive the normally closed DC contactor in the fireproof and explosion-proof box where the lithium-ion battery pack is located to disconnect the electrical connection between the positive terminal of the battery pack and the external load. Preferably, step S3 includes the following steps: S31. Calculate the output power and voltage change of the photovoltaic panel at the current moment; S32. Determine the sign relationship between the power change and the voltage change; if the power and voltage change in the same direction, determine that the operating point is to the left of the maximum power point, and control the charging management module to increase the PWM duty cycle; if the power and voltage change in opposite directions, determine that the operating point is to the right of the maximum power point, and control the charging management module to decrease the PWM duty cycle. S33. Set the dead zone threshold; when the absolute value of the power change is less than the dead zone threshold, keep the current PWM duty cycle unchanged, stop the disturbance, and lock the maximum power point; Preferably, step S4 includes the following steps: S41. Set a low light threshold and a high light threshold. When the effective light intensity value is less than the low light threshold, output the highest base transmittance as the real-time base transmittance. When the effective light intensity value is greater than the high light threshold, output the lowest base transmittance as the real-time base transmittance. When it is between the two, calculate the real-time base transmittance by linear interpolation. S42. Set a temperature intervention threshold. When the surface temperature data is less than the temperature intervention threshold, the temperature correction coefficient is set to 1. When the surface temperature data is greater than or equal to the temperature intervention threshold, the temperature correction coefficient decreases linearly with increasing temperature. S43. Set a low battery protection threshold. When the remaining battery level is lower than the low battery protection threshold, the battery constraint factor is set to 0; otherwise, it is set to 1. S44. Multiply the base transmittance, temperature correction coefficient and charge constraint factor to obtain the theoretical transmittance, and introduce hysteresis comparison logic to determine whether the difference between the theoretical transmittance and the current transmittance exceeds the adjustment dead zone. If so, update the target transmittance command; otherwise, maintain the original target transmittance command. Preferably, step S5 includes the following steps: S51. Construct the initial BP neural network model; set the initial parameters of the initial BP neural network model; S52. Collect historical transmittance data and the corresponding target driving voltage amplitude and polarity data; divide the data to obtain training data and test data; use the target driving voltage amplitude and polarity data as label data; S53. Use training data and test data to train and test the initial BP neural network model to obtain the transmittance-driving voltage mapping model; S54. Input the target transmittance command from S4 into the transmittance-driving voltage mapping model to obtain the target driving voltage amplitude and polarity. Preferably, step S53 includes the following steps: S531. Train the initial BP neural network model using training data, and obtain the trained BP neural network model by manually adjusting the learning rate of the initial BP neural network model. S532. Set the test accuracy threshold; input the test data into the trained BP neural network model to obtain the model prediction data, calculate the similarity between the model prediction data and the label data in the test data, and obtain the test accuracy; determine whether the test accuracy is ≥ the test accuracy threshold. If it is greater, then use the trained BP neural network model as the transmittance-driving voltage mapping model. Otherwise, the parameters of the trained BP neural network model are optimized using an optimization algorithm to obtain the optimal solution; the optimal solution is then used as the parameters of the trained BP neural network model to obtain the transmittance-driving voltage mapping model. Preferably, the step S532, which optimizes the parameters of the trained BP neural network model using an optimization algorithm to obtain the optimal solution, includes the following steps: S5321. Construct a bee population, set the total number of bees in the population; set the maximum number of optimization iterations; Based on the learning rate of the trained BP neural network model, the initial position of the bee population is randomly set to obtain the initial position set of the bee population. S5322. Define a fitness function and a fitness function formula based on the test accuracy threshold and the test accuracy. S5323. Perform iterative operations on the initial position set of the bee population; in each iteration, update the position of each bee in the initial position set of the bee population according to the fitness function, and obtain the best individual bee position and the global best bee position in the bee population in each iteration. S5324. Repeat S5323. When the maximum number of optimization iterations is reached, stop the iteration and take the global best bee position as the optimal solution. Preferably, step S6 includes the following steps: S61. Collect the actual output driving voltage of the color-changing driving component to obtain the actual color-changing driving voltage; calculate the deviation between the actual color-changing driving voltage and the target driving voltage amplitude, use the PID algorithm to calculate the control quantity, and adjust the voltage amplitude output by the inverter module. S62. When the surface temperature data exceeds the heat dissipation start threshold, a PWM control signal is generated to drive the cooling fan to run, and the PWM duty cycle is proportional to the temperature difference exceeding the heat dissipation start threshold.
[0008] Preferably, a photovoltaic-powered marine photochromic fireproof window light transmittance control system is provided to implement the photovoltaic-powered marine photochromic fireproof window light transmittance control method. The system includes: Data acquisition module: used to collect data on light intensity, temperature, and battery status, and perform Kalman filtering. Safety interlock module: used to monitor fire signals and execute inverter disconnection and battery isolation actions; Energy Management Module: Used to execute the MPPT algorithm and manage battery charging and discharging; Transmittance control module: used to run the transmittance decision model and PID drive algorithm; Actuators: including color-changing drive components, cooling fans, and contactors.
[0009] (III) Beneficial Effects The present invention has the following beneficial effects: This invention prioritizes safety and features a millisecond-level fire emergency response logic. By monitoring fire alarm signals in real time, it can instantly cut off the inverter's high-voltage circuit and physically isolate the lithium-ion battery pack in the event of a fire. Combined with an expansion-type fireproof and heat-insulating strip, it effectively blocks the risks of short circuits and battery thermal runaway. This dual protection mechanism, combining active power-off with passive isolation, addresses the pain point of traditional smart devices potentially causing secondary disasters in fires, significantly improving the fire safety level of ships.
[0010] This invention introduces a Kalman filter algorithm to smooth the illumination data, effectively filtering out high-frequency noise caused by wave reflections and avoiding frequent window flickering. By combining a temperature correction coefficient and a power constraint factor, it achieves an intelligent strategy of forced shading in high temperatures and ensuring continued operation when the battery is low. Combined with a neural network model optimized based on an artificial bee colony algorithm, it achieves accurate prediction of the driving voltage. This multi-dimensional intelligent control not only ensures the visual and thermal comfort of the cabin but also maximizes the energy efficiency of the system.
[0011] This invention utilizes an improved perturbation observation method to achieve efficient capture of photovoltaic energy, solving the tracking problem under dynamic illumination. At the execution level, PID closed-loop control ensures the precise stability of the drive voltage, and linear speed regulation of the temperature-controlled fan achieves a balance between heat dissipation and energy consumption. It realizes refined management from energy acquisition, storage to consumption, reduces dependence on the ship's power grid, and conforms to the development trend of green energy conservation.
[0012] Of course, any product implementing this invention does not necessarily need to achieve all of the advantages described above at the same time. Attached Figure Description
[0013] To more clearly illustrate the technical solutions of the embodiments of the invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the invention. For those skilled in the art, the drawings can be obtained from these drawings without creative effort.
[0014] Figure 1 This is a flowchart illustrating the method for controlling the light transmittance of marine color-changing fireproof windows based on photovoltaic power supply according to the present invention. Figure 2 This is a structural illustration of an energy-saving, color-changing marine fireproof window with photovoltaic panels and a lithium-ion intelligent energy storage system according to the present invention. Figure 3 This is a circuit block diagram of the lithium-ion intelligent energy storage system of the present invention; Figure 4 This invention presents a schematic diagram of the light transmittance control system for a marine color-changing fireproof window based on photovoltaic power supply. Detailed Implementation
[0015] The technical solutions of the embodiments of the invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the invention, and not all embodiments. Based on the embodiments of the invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the invention.
[0016] Before implementing this embodiment, we first introduce a smart energy-saving color-changing marine fireproof window with photovoltaic panels and a lithium-ion smart energy storage system on which the method of this application is based; please refer to Figure 2 The structure of an energy-saving, color-changing marine fireproof window with photovoltaic panels and a lithium-ion intelligent energy storage system is shown. Specifically, it includes: a fireproof window frame 1, laminated fireproof color-changing glass 2, a flexible thin-film photovoltaic panel assembly 3, a transparent fireproof protective layer 4, a fireproof heat insulation strip 5, a lithium-ion intelligent integrated system 6, a backup charging interface 7, and wires 8. The fireproof window frame 1 has a rectangular frame structure. The laminated fireproof color-changing glass 2 is embedded inside the window frame. The flexible thin-film photovoltaic panel assembly 3 is completely attached to the outer surface of the laminated fireproof color-changing glass 2. The transparent fireproof protective layer 4 covers the outer surface of the photovoltaic panel assembly 3. The fireproof heat insulation strip 5 fills the gap between the window frame and the glass. The lithium-ion battery energy storage box 6 is electrically connected to the photovoltaic panel assembly 3 via wires 8. The backup charging interface 7 protrudes from the upper part of the energy storage box 6. The core technology of this system lies in the integration of functions and the physical isolation of safety. The flexible thin-film photovoltaic panel module 3 and the electrochromic film are integrated onto the laminated fire-resistant photochromic glass 2 through a lamination process, forming an active energy conversion and dimming interface. The fire-resistant window frame 1 and the fire-resistant heat insulation strip 5 constitute a passive physical fire barrier. The lithium-ion intelligent integrated system 6 (including the battery) is designed as an independent module, connected to the window only through the fire-resistant wire 8, realizing the physical separation of energy storage and flammable sources. This architecture ensures that in the event of thermal runaway of the battery, the explosion-proof box can limit the fire without compromising the fire resistance integrity of the window. When the window is on fire, the control system can actively disconnect the connection to prevent the high temperature from igniting the battery through the wire, thus achieving deep decoupling and synergy between active energy management and passive fire safety. Furthermore, an energy-saving, color-changing marine fireproof window with a photovoltaic panel and a lithium-ion battery system includes a marine fireproof window body and a lithium-ion battery energy storage system. The fireproof window frame of the marine fireproof window body is made of 304 stainless steel, and the inner wall is coated with a 0.5mm thick fireproof and heat-insulating coating. The inner and outer fireproof glass layers of the laminated fireproof color-changing glass are both made of cesium potassium fireproof glass with a thickness of 5mm. An electrochromic film with a thickness of 0.3mm is sandwiched between the two layers of fireproof glass. The color-changing driving component uses a DC regulated driving power supply and is electrically connected to the electrochromic film.
[0017] The photovoltaic panel module uses flexible cadmium telluride thin-film photovoltaic panels with a thickness of 0.2mm, which are laminated onto the outer surface of the outer fireproof glass and covered with a 1mm thick transparent fireproof resin protective layer. The fireproof and heat-insulating strip uses intumescent graphite fireproof sealing strips, and the sealing components use nitrile rubber sealing strips.
[0018] The lithium-ion battery pack of the lithium-ion battery energy storage system is a lithium iron phosphate lithium-ion battery pack with a rated voltage of 48V and a rated capacity of 100Ah. The outer shell is made of fireproof and explosion-proof aluminum alloy and is installed in a fireproof and explosion-proof box at the bottom of the ship's cabin. The cooling fan in the fireproof and explosion-proof box has a rated power of 20W and is connected to the control module signal.
[0019] The charging management module uses a Schottky diode for reverse charging protection, a dedicated lithium battery protection chip for overcharge protection, and a linear voltage regulator chip for voltage regulation. The inverter module uses a sine wave inverter to convert 48V DC to 220V AC. The control module uses an STM32 microcontroller, with a built-in BH1750 light intensity sensor and a DS18B20 digital temperature sensor.
[0020] The backup charging interface uses an aviation plug, allowing connection to shore power or the ship's generator set. While the ship is at sea, the photovoltaic panels receive solar energy, which is stored in the lithium-ion battery pack via the charging management module. The control module automatically adjusts the transmittance of the electrochromic film based on data collected by a light intensity sensor: 10% transmittance when the light intensity is greater than 50,000 lux, and 90% when the light intensity is less than 10,000 lux. When the ship's fire protection system detects a fire, the control module immediately disconnects the inverter module from the electrochromic drive assembly, and the lithium-ion battery pack enters fire protection mode. Specifically: The main body of marine fireproof windows includes: fireproof window frame, laminated fireproof photochromic glass, photovoltaic panel assembly, sealing components and fireproof heat insulation strip; The fireproof window frame is made of stainless steel, and its inner wall is coated with a fireproof and heat-insulating coating, which can improve the heat insulation performance of the fireproof window frame.
[0021] Laminated fire-resistant photochromic glass is installed in a fire-resistant window frame and consists of an inner fire-resistant glass layer, an outer fire-resistant glass layer, and an electrochromic film sandwiched between the two. The electrochromic film is electrically connected to the photochromic drive component, which can adjust the light transmittance of the electrochromic film, with an adjustment range of 10% to 90%.
[0022] The photovoltaic (PV) panel is a flexible thin-film PV panel that is laminated onto the outer surface of laminated fire-resistant photochromic glass, allowing it to fully absorb solar energy for power generation. The surface of the PV panel is covered with a transparent fire-resistant protective layer made of fire-retardant transparent resin, which neither affects the light transmission of the PV panel nor hinders its fire protection.
[0023] Fire-resistant and heat-insulating strips are installed at the connection between the fire-resistant window frame and the laminated fire-resistant photochromic glass. These are intumescent fire-resistant sealing strips that rapidly expand to seal the gaps upon contact with fire, preventing the spread of smoke and flames. The sealant fills the gap between the fire-resistant and heat-insulating strip and the fire-resistant window frame, ensuring the watertightness and airtightness of the marine fire-resistant window.
[0024] Specifically: A lithium-ion battery energy storage system includes a lithium-ion battery pack, a charging management module, an inverter module, a control module, a power monitoring module, and a backup charging interface. Please refer to [link / reference]. Figure 3This diagram illustrates the circuit principle of a lithium-ion intelligent energy storage system, showing the connection relationships between various modules. The diagram also shows the signal interaction relationships of the control module, with the main control module as the core component. The power flow is as follows: photovoltaic panel assembly → charging management module → lithium-ion battery pack (connected to the power detection module) → inverter module → color-changing drive assembly. A light intensity sensor collects external light data, a temperature sensor collects the glass surface temperature, and the power monitoring module collects the battery pack voltage, current, and remaining power. When the ship's fire-fighting system sends a fire signal, the main control module immediately cuts off the inverter module's power supply and activates the battery pack's fire protection mode. The charging management module has a built-in anti-reverse charging circuit, overcharge protection circuit, and voltage regulator circuit. The lithium-ion battery pack is a lithium iron phosphate battery pack with a rated voltage of 48V and a rated capacity of 100Ah, housed in a fireproof and explosion-proof enclosure. The inverter module converts DC power to 220V AC power to power the color-changing drive assembly. A spare charging interface is connected in parallel to the input of the charging management module and can be connected to shore power. The lithium-ion battery pack is a lithium iron phosphate lithium-ion battery pack, which has high energy density and long cycle life. Its shell is made of fireproof and explosion-proof material and is installed in a special fireproof and explosion-proof box for ships. The fireproof and explosion-proof box is equipped with a cooling fan, which can effectively reduce the operating temperature of the lithium-ion battery pack and improve the safety of use.
[0025] The output terminal of the photovoltaic panel module is electrically connected to the input terminal of the charging management module. The charging management module includes a reverse charging protection circuit, an overcharge protection circuit, and a voltage regulator circuit. The reverse charging protection circuit prevents the current from the lithium-ion battery pack from flowing back into the photovoltaic panel module; the overcharge protection circuit automatically cuts off the charging circuit after the lithium-ion battery pack is fully charged to avoid damage from overcharging; the voltage regulator circuit stabilizes the output voltage of the photovoltaic panel module to ensure charging stability.
[0026] The output of the lithium-ion battery pack is electrically connected to the input of the inverter module. The inverter module converts the direct current output from the lithium-ion battery pack into alternating current to power the color-changing drive component of the laminated fire-resistant photochromic glass. The control module is connected to the photovoltaic panel module, power monitoring module, color-changing drive component, cooling fan, and ship fire protection system, and has built-in light intensity and temperature sensors.
[0027] A light intensity sensor collects data on the ambient light intensity. Based on this data, the control module automatically adjusts the light transmittance of the electrochromic film. When the light is too strong, the transmittance is reduced to decrease sunlight entering the cabin and lower air conditioning energy consumption; when the light is weak, the transmittance is increased to meet the cabin's lighting requirements. A temperature sensor collects data on the surface temperature of the laminated fire-resistant photochromic glass. When the temperature is too high, the control module promptly issues a warning signal.
[0028] The power monitoring module is connected to the lithium-ion battery pack to monitor the voltage, current and remaining power of the lithium-ion battery pack in real time, and feeds the monitoring data back to the control module.
[0029] The backup charging interface is electrically connected to the input of the charging management module. When the photovoltaic panel's power generation is insufficient, the lithium-ion battery pack can be charged via shore power or the ship's generator set. Furthermore, the control module is linked to the ship's fire protection system. When the fire protection system detects a fire signal, the control module immediately disconnects the connection circuit between the inverter module and the color-changing drive component, and controls the lithium-ion battery pack to enter fire protection mode, enhancing the system's fire safety.
[0030] Furthermore, to address the technical problems raised in the background section, please refer to... Figure 1 This invention provides a method and system for controlling the light transmittance of marine color-changing fireproof windows based on photovoltaic power supply, including: Example 1
[0031] S1. Collect ambient light intensity data, surface temperature data of laminated fireproof photochromic glass, and voltage, current, and remaining power data of lithium-ion battery pack; perform Kalman filtering on the ambient light intensity data and output effective light intensity values. S2. Real-time monitoring of the alarm signal status of the ship's fire protection system; when a fire alarm signal is received, execute the fire emergency response logic, cut off the connection circuit between the inverter module and the color-changing drive component, and control the lithium-ion battery pack to disconnect the main circuit contactor. S3. In the absence of a fire alarm signal, based on the voltage and current of the lithium-ion battery pack in S1, the duty cycle of the charging management module is adjusted using a perturbation observation algorithm to control the photovoltaic panel to charge the lithium-ion battery pack. S4. Calculate the real-time basic transmittance based on the effective light intensity value in S1, generate a temperature correction coefficient using the surface temperature data of the laminated fireproof photochromic glass, and calculate the power constraint factor by combining the remaining power data; calculate the target transmittance command by multiplying the real-time basic transmittance, temperature correction coefficient and power constraint factor. S5. Input the target transmittance command from S4 into the transmittance-driving voltage mapping model to obtain the target driving voltage amplitude and polarity. S6. Based on the target driving voltage amplitude and polarity, the PID algorithm is used to control the output driving voltage of the color-changing driving component and adjust the light transmittance of the electrochromic film; the surface temperature data is compared with the heat dissipation start threshold to control the start, stop and speed of the cooling fan. The above embodiments utilize a one-dimensional Kalman filter algorithm to filter out wave reflection noise and output effective illumination values; by combining temperature correction and power constraints, the target transmittance is intelligently calculated, and the driving voltage is accurately output using an optimized neural network model; in terms of safety, fire signals are monitored in real time, and once a fire is detected, emergency logic of inverter disconnection and battery physical isolation is immediately executed; this invention solves the problems of poor anti-interference, single function, and fire safety hazards of traditional control methods, and realizes intelligent dimming, high efficiency, energy saving, and safety in ship cabins.
[0032] The above embodiment S1 includes the following steps: S11. Initialize the sensor array sampling parameters; set the sampling frequency of the light intensity sensor to 1Hz, the sampling frequency of the temperature sensor to 0.2Hz, and the sampling frequency of the battery management unit to 10Hz. In specific implementation, the above embodiment S11 is as follows: After the system is powered on, the STM32 microcontroller is used as the core control module to configure the I2C bus to read the BH1750 light sensor, setting the resolution to high resolution of 0.5 lux and the timer interrupt period to 1000ms; a single bus is configured to read the DS18B20 temperature sensor, and due to the large thermal inertia of the 5mm thick glass, the reading period is set to 5000ms; a UART interface is configured to communicate with the battery management system (BMS), reading the total voltage of the lithium iron phosphate battery pack every 100ms. V bat Charging and discharging current I bat and SOC value; S12. Define the state prediction equation and the observation equation to obtain the one-dimensional Kalman filter equation. Using the one-dimensional Kalman filter equation, the light intensity estimate of the previous moment is taken as the prior state, and the original observation value of the sensor at the current moment is taken as the observation input. In specific implementation, the above embodiment S12 is as follows: Sea waves can cause sunlight reflection to form high-frequency flickering light noise. If the original data is used directly to control the color change, the window color will change frequently, affecting visual comfort and shortening the equipment life. Therefore, a one-dimensional Kalman filter equation is introduced. Define system state variables x k The actual illumination intensity is given; the state prediction equation is: x k = x k-1 + w k-1 ;in, x k-1 Indicates the previous moment k -1 is the actual light intensity; w k-1Indicates the previous moment k -1 is the system's own process noise; observation equation z k = x k + v k ,in, z k express k The raw values actually measured by the BH1750 light sensor at that moment; v k This indicates measurement noise caused by sea surface reflection and circuitry. Initialize the covariance matrix P 0 and initial state x 0; at every moment k Perform the prediction step; predict the state. x -1 k = x - k-1 ,in x -1 k-1 Indicates based on k All observations at time −1 and earlier, Kalman filter output pairs k The predicted value based on the state at time step; the prediction error covariance equation is: P - k = P - k-1 + Q ,in, P - k-1 This represents the covariance of the prior estimation error; Q The process noise covariance setting represents the expected change in system state; in this embodiment, it is set to 0.01. S13. Calculate the Kalman gain using the prediction error covariance and the measurement noise covariance. Then, perform weighted correction on the prior state and observation residuals based on the Kalman gain to obtain the effective illumination intensity value. In specific implementation, the above embodiment S13 specifically involves: calculating the Kalman gain. K k = P - k / ( P - k + R ),in RTo represent the measurement noise covariance, this embodiment introduces an adaptive adjustment mechanism under different sea areas and weather conditions: the control module calculates the variance of the most recent N=10 original illumination observations in real time. σ 2 ; Measurement noise covariance R It is no longer a constant, but is dynamically updated. R = σ 2 When sea conditions are rough and glare is intense, leading to increased observation variance... σ 2 When it increases, the corresponding R Increase or decrease Kalman gain K This makes the filter more confident in the model's predictions, enhancing its anti-interference ability; conversely, on calm sea surfaces, it reduces... R This improves the response speed to changes in lighting conditions; in this embodiment, the response speed is based on actual measurements of sea surface reflectance. R It is 0.5; Calculate the posterior state estimate x 1 k = x -1 k + K k ( z k - x -1 k Update error covariance. P k =(1− K k ) P - k ; final output x 1 k That is, the effective light intensity value. L eff Tests showed that this processing reduced the variance of illumination data by more than 90% and effectively filtered out spike noise caused by wave reflections. The above embodiments, by constructing an environmental perception model based on a multi-dimensional sensor array and a Kalman filter algorithm, achieve accurate acquisition of illumination, temperature, and battery status under complex sea conditions. In particular, by utilizing a one-dimensional Kalman filter equation, the high-frequency noise interference in illumination data caused by sea wave reflection and rapid cloud movement is effectively solved, reducing the variance of illumination data fluctuations by more than 90%. This not only provides a smooth and reliable input source for subsequent intelligent dimming and avoids frequent changes in window color, but also significantly extends the lifespan of electrochromic devices and improves the visual comfort of the crew.
[0033] The above embodiment S2 includes the following steps: S21. Set the time window and judgment period threshold for fire signal detection; read the level signal of the ship's fire protection system through the GPIO port in each time window. If the effective trigger level reaches the judgment period threshold, the fire alarm signal is deemed valid. In specific implementation, the above embodiment S21 is as follows: the control module is connected to the ship's fire alarm host through an optocoupler isolated input port; the detection cycle is set to 10ms, and the judgment threshold is 5 consecutive times; the judgment threshold of 5 consecutive times is set based on the system sampling frequency (10ms / time) and signal jitter requirements, and the high-level duration of 5 consecutive times is 50ms, which can effectively filter out transient electromagnetic pulse interference (usually <10ms) in the ship's electrical network, and ensure the real-time performance of the fire response (delay <100ms), meeting fire safety standards); that is, when a high-level signal is detected for 50ms consecutively, the fire alarm signal is determined to be valid, and this de-jittering logic prevents electromagnetic interference from triggering false alarms; S22. Within the first preset time after the fire alarm signal is determined to be valid, the enable pin level of the inverter module is lowered to stop the DC-to-AC power output. In specific implementation, the above embodiment S22 specifically involves: after determining that the fire alarm signal is valid, in t Within 5ms (first preset time), the GPIO connected to the EN pin of the sine wave inverter is set to low level; the internal PWM controller of the inverter stops working and cuts off the 220V AC high voltage (which is converted from 48V DC) to the laminated fireproof photochromic glass to prevent the risk of electric shock during fire fighting. S23. Within a second preset time after the inverter module stops outputting, drive the normally closed DC contactor in the fireproof and explosion-proof box where the lithium-ion battery pack is located to disconnect the electrical connection between the positive terminal of the battery pack and the external load. In specific implementation, the above embodiment S23 is as follows: the second preset time is set to 20ms (to provide a discharge buffer for the inverter capacitor); to ensure that the 200A DC contactor can complete the disconnection within 20ms, this embodiment selects a customized high-speed vacuum DC contactor, and applies a pulse of twice the rated voltage (lasting 5ms) at the moment of triggering to accelerate the coil engagement / disengagement. The measured average action time can reach 12-15ms, which meets the timing requirements; in response to the risk of seawater intrusion, the contactor is encapsulated in an IP68-level epoxy resin module, and the contact material is made of silver oxide tin alloy to prevent oxidation and adhesion; at the same time, the fireproof and explosion-proof box is equipped with a one-way vent valve, which can balance the internal and external air pressure to prevent sealing failure and prevent liquid seawater backflow, ensuring that the contactor can still operate reliably when the ship is tilted at 30 degrees; The control module outputs a signal to drive the 200A DC contactor coil located inside the aluminum alloy fireproof and explosion-proof enclosure. The contactor disconnects, physically isolating the 100Ah lithium iron phosphate battery pack inside the explosion-proof enclosure. At this point, the lithium-ion battery pack is completely isolated within the fireproof and explosion-proof enclosure. Even if an external short circuit or high temperature occurs, the battery energy will not leak out and cause a secondary fire. Combined with the expandable graphite fireproof and heat-insulating strips on the edge of the enclosure (with a thermal expansion rate >10 times), a completely sealed fireproof and heat-insulating space is formed, ensuring that the battery does not experience thermal runaway under high external temperatures. The electrochromic film selected in this embodiment has the characteristics of "power-off transparency" or "power-off retention". In fire mode, if it is the power-off transparency type, the window will automatically become transparent after the power is cut off, which is beneficial for firefighters to observe the situation inside the cabin; if it is the power-off retention type, it will maintain the current state and avoid consuming additional power due to the color-changing process. In this embodiment, the preferred configuration is that, before cutting off the power, if time permits (the battery is not overheated), a short pulse is sent to make the glass transparent, and then the power is completely cut off. The above embodiments establish the principle of maximizing safety through deeply integrated fire emergency response logic; utilize a collaborative interruption mechanism to achieve dual protection of inverter high-voltage cutoff and battery physical isolation; and combine the physical protection of intumescent fireproof and heat-insulating strips and battery explosion-proof boxes to effectively block the risk of short circuits and thermal runaway that may be caused by electronic equipment in a fire, solve the pain point that traditional smart devices may become a source of secondary disasters under extreme conditions, and significantly improve the overall fire safety level of ships.
[0034] The above embodiment S3 includes the following steps: S31. Calculate the output power and voltage change of the photovoltaic panel at the current moment; In specific implementation, the above embodiment S31 specifically involves: reading the output voltage of a flexible cadmium telluride thin-film photovoltaic panel with a thickness of 0.2 mm. V ( k ) and current I ( k ); Calculate the current power P ( k )= V ( k )× I ( k ); Calculate the power change Δ P = P ( k )− P ( k −1) and voltage change Δ V = V ( k )− V ( k -1); where, P ( k-1) represents the first k Power of -1 sample; V ( k -1) represents the first k -1 sampled output voltage of the photovoltaic panel; S32. Determine the sign relationship between the power change and the voltage change; if the power and voltage change in the same direction, determine that the operating point is to the left of the maximum power point, and control the charging management module to increase the PWM duty cycle; if the power and voltage change in opposite directions, determine that the operating point is to the right of the maximum power point, and control the charging management module to decrease the PWM duty cycle. In specific implementation, the above embodiment S32 specifically involves: using the perturbation observation method if Δ P >0 and Δ V A value >0 indicates that increasing the voltage increases the power, and the voltage should be increased further. For a Buck-type charging circuit, this means reducing the duty cycle (assuming a duty cycle of >0). D Inversely proportional to the input impedance, the specific value depends on the circuit topology; here, taking the logic of this embodiment as an example: increasing the duty cycle increases the output current of the photovoltaic panel and lowers the voltage; therefore, if an increase in voltage is required, the voltage at the next moment (the first...) is decreased. k +1 sampling) PWM duty cycle D ( k +1)= D ( k )− D step The charging management module, which includes a Schottky diode reverse charging circuit and a linear voltage regulator chip, is controlled to perform the above adjustments; wherein, D ( k ) indicates the current time (the th moment). k The PWM duty cycle (at the next sampling); D step This indicates the perturbation step size; in this embodiment, the perturbation step size is set. D step =0.5%, the perturbation step size = 0.5% is set based on the balance point between the output characteristics of the photovoltaic panel and the system response speed in this embodiment. Too large a step size will lead to large oscillation amplitude near the maximum power point and more energy loss; too small a step size will lead to slow tracking speed and difficulty in adapting to rapid changes in light. Experimental calibration shows that a step size of 0.5% has good dynamic response performance while ensuring tracking accuracy of over 98%; if Δ P >0 and Δ V A value less than 0 indicates that decreasing the voltage increases the power; therefore, the voltage should be further decreased, which would require increasing the PWM duty cycle. D ( k +1)=D( k )+ D step ; S33. Set the dead zone threshold; when the absolute value of the power change is less than the dead zone threshold, keep the current PWM duty cycle unchanged, stop the disturbance, and lock the maximum power point; In specific implementation, the above embodiment S33 specifically refers to: dead zone threshold. P dead =0.5W; The 0.5W dead zone threshold setting combines the IV characteristic curve of the flexible cadmium telluride photovoltaic panel with the efficiency curve of the DC-DC converter; near the maximum power point (MPP), the slope of the PV curve approaches zero. Experimental data shows that when the power deviation is less than 0.5W, the theoretical power gain from further adjusting the duty cycle is less than the additional switching losses (approximately 0.6W) caused by the switching frequency fluctuations of the DC-DC converter; therefore, setting a 0.5W dead zone can effectively avoid ineffective oscillations (hunting) near the MPP, preventing the system from paying a higher energy cost for a small power increase, thereby improving the overall system efficiency; when |Δ P When |<0.5W, it is determined that the maximum power point has been reached, and the disturbance is stopped to avoid oscillation loss near the steady state point; in addition, when S1 detects that the battery SOC>95%, it automatically exits the MPPT mode and switches to the constant voltage (CV) charging mode (at this time, the dedicated lithium battery protection chip in the overcharge protection circuit intervenes to monitor) to prevent the battery from being overcharged. The above embodiments achieve efficient capture and management of photovoltaic energy through an improved perturbation observation method. Addressing the characteristics of large changes in illumination angle and frequent shading during ship navigation, a dynamic step size and dead zone locking mechanism solve the problems of oscillation near steady state and slow dynamic tracking in traditional algorithms. Combined with anti-reverse charging and overcharge protection logic, energy self-sufficiency and battery life extension are achieved, reducing the ship's dependence on fuel-powered electricity generation and embodying the concept of green shipping.
[0035] The above embodiment S4 includes the following steps: S41. Set a low light threshold and a high light threshold. When the effective light intensity value is less than the low light threshold, output the highest base transmittance as the real-time base transmittance. When the effective light intensity value is greater than the high light threshold, output the lowest base transmittance as the real-time base transmittance. When it is between the two, calculate the real-time base transmittance by linear interpolation. In specific implementation, the above embodiment S41 specifically involves: setting a low light threshold. L min =10000 lux, high illumination threshold L max=50000 lux; Low light threshold = 10000 lux is the balance point between indoor artificial lighting and natural light. Below this value, natural light needs to be maximized to save lighting energy consumption; High light threshold = 50000 lux is the critical point where solar radiation heat increases significantly. Above this value, shading needs to be maximized to reduce air conditioning load; Base transmittance Tr base The calculation logic is as follows: If the effective light intensity value output by S1 is... L eff ≤10000, then Tr base =90% (high light transmittance, meeting lighting requirements); if L eff ≥50000, then Tr base =10% (low light transmittance, blocks radiation); if 10000 < L eff <50000, then Tr base =90−(( L eff (−10000) / 40000)×80; S42. Set a temperature intervention threshold. When the surface temperature data is less than the temperature intervention threshold, the temperature correction coefficient is set to 1. When the surface temperature data is greater than or equal to the temperature intervention threshold, the temperature correction coefficient decreases linearly with increasing temperature. In specific implementation, the above embodiment S42 specifically involves: setting a temperature intervention threshold. T th =35℃; Read the glass surface temperature of S1 T glass ;like T glass ≤35, then the temperature correction factor K t =1; if T glass >35, then K t =1−0.01×( T glass -35); for example, when T glass At 55℃, K t=0.8; This logic means that at high temperatures, the light transmittance is forcibly reduced to decrease the amount of heat entering the cabin; The value of the correction factor is based on the thermal performance test of glass with a transparent fire-retardant resin protective layer on the surface. Above 35°C, for every 1°C increase in temperature, the secondary radiant heat of the glass increases by about 2%, so the light transmittance needs to be reduced by 1% to compensate for the heat gain; The value of 0.8 (i.e., the light transmittance is reduced by 20%) is the optimized result after balancing the heat insulation effect with the minimum indoor lighting requirements (to avoid the interior being too dark) at a high temperature of 55°C; S43. Set a low battery protection threshold. When the remaining battery level is lower than the low battery protection threshold, the battery constraint factor is set to 0; otherwise, it is set to 1. In specific implementation, the above embodiment S53 specifically involves: setting a low battery protection threshold. SOC low =20%; Low battery protection threshold SOC low =20% is set based on the discharge characteristic curve of lithium iron phosphate batteries. Below 20%, the battery voltage drops extremely rapidly, and continuing high-power output can easily lead to over-discharge. Furthermore, some charge needs to be reserved for fire emergency response (such as disconnecting the contactor) to read the SOC value of S1. If SOC < 20%, then... K soc =0, K soc Setting it to 0 forces the disconnection of unnecessary loads. When the battery is critically low, light transmittance adjustment is a comfort function and should immediately give way to the system's survival functions (such as maintaining BMS monitoring). Setting it to 0 not only stops color changing but also restores the window to a power-off transparent state (low power state), minimizing standby power consumption. At this time, the system enters a low power protection mode, stopping active color changing or maintaining the most power-saving state (usually the power-off transparent state) to prevent damage from deep battery discharge. S44. Multiply the base transmittance, temperature correction coefficient and charge constraint factor to obtain the theoretical transmittance, and introduce hysteresis comparison logic to determine whether the difference between the theoretical transmittance and the current transmittance exceeds the adjustment dead zone. If so, update the target transmittance command; otherwise, maintain the original target transmittance command. In specific implementation, the above embodiment S54 specifically involves: calculating the theoretical transmittance. Tr calc = Tr base × K t × K soc Set adjustment dead zone Δ Tr =5%; Δ Tr=5% is based on the human eye's visual perception threshold (JND). The human eye generally cannot perceive brightness changes within 5%. Setting this dead zone prevents the drive circuit from frequently operating when there are slight fluctuations in light intensity, thus avoiding visual fatigue caused by flickering and reducing ineffective switching losses; if | Tr calc - Tr current If |>5%, then update the target transmittance command. Tr current = Tr calc Otherwise, keep Tr current Unchanged; this hysteresis logic prevents the window color from flickering frequently and noticeably near light or temperature thresholds. The above embodiments overcome the limitations of traditional single light control by constructing a light transmittance decision model that couples light, heat, and electricity in a multi-dimensional manner. By combining temperature correction and power constraint factors, an intelligent strategy of forced shading in high temperatures and maintaining continuous flight when power is low is realized, solving the problem of cabin overheating caused by simple light control on hot and cloudy days or system crashes caused by forced color changes when power is low; the introduction of hysteresis comparison logic further ensures the stability of control and a user-friendly experience.
[0036] The above embodiment S5 includes the following steps: S51. Construct the initial BP neural network model; set the initial parameters of the initial BP neural network model; In specific implementation, the above embodiment S51 is as follows: the number of input layer nodes is 1 (target transmittance instruction), the number of hidden layers is 2, the number of nodes in each layer is 10, and the number of output layer nodes is 2 (driving voltage amplitude and polarity); the activation function is the Sigmoid function, and the initial weights and biases are randomly initialized; S52. Collect historical transmittance data and the corresponding target driving voltage amplitude and polarity data; divide the data to obtain training data and test data; use the target driving voltage amplitude and polarity data as label data; In specific implementation, the above embodiment S52 specifically includes: historical transmittance data and the target driving voltage amplitude and polarity data corresponding to the historical transmittance data, including: driving voltage and polarity data required for the electrochromic film to achieve a specific transmittance at different temperatures (-10℃ to 60℃) and different aging degrees (from new film to 5 years after use); the tag data is the optimal driving voltage value calibrated by a precision instrument. The 10,000 sets of collected data samples are randomly divided into training set and test set in a 7:3 ratio, which are used for parameter iteration and generalization ability verification of the model, respectively. S53. Use training data and test data to train and test the initial BP neural network model to obtain the transmittance-driving voltage mapping model; The above embodiment S53 includes the following steps: S531. Train the initial BP neural network model using training data, and obtain the trained BP neural network model by manually adjusting the learning rate of the initial BP neural network model. S532. Set the test accuracy threshold; input the test data into the trained BP neural network model to obtain the model prediction data, calculate the similarity between the model prediction data and the label data in the test data, and obtain the test accuracy; determine whether the test accuracy is ≥ the test accuracy threshold. If it is greater than the threshold, the trained BP neural network model is used as the transmittance-driving voltage mapping model. In this embodiment, the test accuracy threshold is set to 98%. Through engineering requirements for color uniformity and response speed, it was found that when the voltage prediction accuracy is lower than 98%, the film may exhibit uneven color change or a response delay of more than 2 seconds, affecting the user experience. Otherwise, the parameters of the trained BP neural network model are optimized using an optimization algorithm to obtain the optimal solution; the optimal solution is then used as the parameters of the trained BP neural network model to obtain the transmittance-driving voltage mapping model. In the above embodiment S532, optimizing the parameters of the trained BP neural network model using an optimization algorithm to obtain the optimal solution includes the following steps: S5321. Construct a bee colony, setting the total number of bees in the colony to be... Z The bee population is then represented as ,in, U i Indicates the first in a bee population i One bee; set the maximum number of optimization iterations; Based on the learning rate of the trained BP neural network model, the initial positions of the bee population are randomly set, resulting in the initial position set of the bee population. ,in f i Indicates the first in a bee population i The position of the bee, that is, the first i A random learning rate; S5322, Based on the aforementioned test accuracy threshold g 1 and test accuracy g 2. Define the fitness function. The formula for the fitness function is as follows: ; S5323. Iterate over the initial location set of the bee population. The higher the fitness value, the better the location. In each iteration, calculate the fitness value of each location in the initial location set of the bee population according to the fitness function. Update the location of each bee in the initial location set of the bee population according to the fitness value from high to low. In each iteration, obtain the best individual bee location and the global best bee location in the bee population. The update is as follows: the locations of the bees with the fitness values in the top 10% directly enter the next iteration, the middle locations of the 10% to 50% of bees enter the next iteration, and the locations of the remaining bees are obtained by random flight of the bees and enter the next iteration. S5324. Repeat S5323. When the maximum number of optimization iterations is reached, stop the iteration and take the global best bee position as the optimal solution. In specific implementation, the above embodiment S532 is as follows: This embodiment uses the Artificial Bee Colony Algorithm (ABC) to optimize the weights and biases of the BP neural network; in S5321, the neural network parameters (weights and biases) to be optimized are encoded as bee position vectors, and the population size Z is set to 50; in S5322, the fitness function is designed as the reciprocal of the prediction error, the smaller the error, the higher the fitness; in S5323, iterative search is performed through three roles: hired bees, observer bees, and scout bees: hired bees search the neighborhood near the current solution, observer bees select high-quality solutions for neighborhood search based on fitness probability, and scout bees randomly reset solutions trapped in local optima. This global and local combined search strategy avoids the problem of traditional BP algorithms easily getting trapped in local minima, and quickly finds the optimal parameter combination that minimizes the prediction error. S54. Input the target transmittance command from S4 into the transmittance-driving voltage mapping model to obtain the target driving voltage amplitude and polarity. In specific implementation, the above embodiment S532 is as follows: the target transmittance command (e.g., 40%) calculated in S4 is used as the input vector and input into the BP neural network model trained and optimized in S53. The model output layer directly gives the corresponding optimal driving voltage amplitude of ±2.5V (± indicates polarity, and positive polarity represents coloring). Furthermore, the high humidity, high salt spray, and vibration environments of ships can lead to sensor drift and aging of the electrochromic film properties, making it difficult for models relying solely on offline training to maintain long-term stability. Therefore, this embodiment also includes an online calibration and edge deployment mechanism: The system uses the time when it automatically resets to a fully transparent state every night (light intensity <10 lux) as a reference point to measure the impedance characteristics of the thin film. If the impedance value drifts more than 5% relative to the factory calibration value, the parameter adaptive adjustment strategy is triggered, and a compensation bias ΔV is superimposed on the driving voltage output by the model to offset the performance degradation caused by salt spray aging. To adapt to the limited computing resources of STM32, the trained BP neural network is compressed using INT8 quantization, reducing the model size by 75%. A lookup table method containing fixed fire prevention rules is set as a fallback logic. If the neural network output value deviates from the lookup table value by more than 15%, it automatically switches to lookup table mode to prevent abnormal model output caused by data errors due to vibration. The above embodiments establish a high-precision transmittance-driving voltage mapping relationship by introducing a BP neural network model optimized based on the artificial bee colony algorithm. Compared with traditional lookup table methods or linear fitting, this model can effectively fit the nonlinear characteristics of the electrochromic film and its drift caused by temperature and aging. Through data-driven training and optimization, accurate prediction of the driving voltage is achieved, ensuring the accuracy and consistency of window color change under different operating conditions and improving the system's intelligence level.
[0037] The above embodiment S6 includes the following steps: S61. Collect the actual output driving voltage of the color-changing driving component to obtain the actual color-changing driving voltage; calculate the deviation between the actual color-changing driving voltage and the target driving voltage amplitude, use the PID algorithm to calculate the control quantity, and adjust the voltage amplitude output by the inverter module. In specific implementation, the above embodiment S61 specifically refers to: based on the target driving voltage obtained in S5 V ref =±2.5V (positive and negative indicate polarity, depending on the direction of coloring or decolorization); the actual output voltage of the inverter is acquired via ADC. V act ; Calculate voltage error e ( k )= V ref - V act ;in, V ref The target driving voltage amplitude is represented, and the PWM adjustment Δ is calculated using the incremental PID formula. u =Kp( e ( k )− e ( k −1))+Ki e ( k )+Kd( e ( k )−2 e ( k -1)+ e ( k -2)); where, e ( k ), e ( k -1) e (k -2) represent the voltage errors at the current time (kth sampling), the previous time, and the time before that, respectively; Kp, Ki, and Kd represent the proportional coefficient, integral coefficient, and derivative coefficient of the PID algorithm, respectively; adjust the modulation of the inverter's SPWM waveform to ensure that the voltage applied across the 0.3mm thick electrochromic film is precisely stabilized at the target value, with the error controlled within ±0.1V, to ensure uniform color change; S62. When the surface temperature data exceeds the heat dissipation start threshold, a PWM control signal is generated to drive the cooling fan to run, and the PWM duty cycle is proportional to the temperature difference exceeding the heat dissipation start threshold. In specific implementation, the above embodiment S53 specifically involves: setting a heat dissipation start threshold. T on =45℃; The heat dissipation start threshold is set to 45℃ based on the optimal operating temperature range of lithium-ion batteries (10-45℃); Above 45℃, battery aging accelerates and there is a risk of thermal runaway, ensuring an active heat dissipation mechanism before the battery enters the dangerous temperature zone; when S1 collects... T glass When the temperature exceeds 45℃, start the 20W rated power cooling fan inside the lithium-ion battery energy storage system enclosure; calculate the fan PWM duty cycle. D an =40%+( T glass -45)×10%; that is, at 45 degrees, it runs at a low speed and quietly at 40%, and the speed increases by 10% for every 1 degree increase, and runs at full speed at 51 degrees; when the temperature drops back to 40 degrees (hysteresis 5 degrees), the fan stops, which protects the battery life and saves precious battery power. The above embodiments achieve precision and efficiency at the execution level through PID closed-loop control and PWM fan speed regulation. The PID algorithm ensures millivolt-level stability of the drive voltage, preventing overvoltage damage to the diaphragm. The linear speed regulation logic of the temperature-controlled fan finds the optimal balance between heat dissipation and energy consumption / noise. Overall, this ensures perfect execution of control commands and guarantees long-term stable operation of the system. Example 2
[0038] A photovoltaic-powered marine color-changing fireproof window light transmittance control system is implemented, comprising the aforementioned photovoltaic-powered marine color-changing fireproof window light transmittance control method. The system includes: Data acquisition module: used to collect data on light intensity, temperature, and battery status, and perform Kalman filtering. Safety interlock module: used to monitor fire signals and execute inverter disconnection and battery isolation actions; Energy Management Module: Used to execute the MPPT algorithm and manage battery charging and discharging; Transmittance control module: used to run the transmittance decision model and PID drive algorithm; Actuators: including color-changing drive components, cooling fans, and contactors.
[0039] In the description of this specification, references to terms such as "an embodiment," "example," "specific example," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0040] The preferred embodiments of the invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention.
Claims
1. A method for controlling the light transmittance of marine color-changing fireproof windows based on photovoltaic power supply, characterized in that, Includes the following steps: S1. Collect ambient light intensity data, surface temperature data of laminated fireproof photochromic glass, and voltage, current, and remaining power data of lithium-ion battery pack; perform Kalman filtering on the ambient light intensity data and output effective light intensity values. S2. Real-time monitoring of the alarm signal status of the ship's fire protection system; when a fire alarm signal is received, execute the fire emergency response logic, cut off the connection circuit between the inverter module and the color-changing drive component, and control the lithium-ion battery pack to disconnect the main circuit contactor. S3. In the absence of a fire alarm signal, based on the voltage and current of the lithium-ion battery pack in S1, the duty cycle of the charging management module is adjusted using a perturbation observation algorithm to control the photovoltaic panel to charge the lithium-ion battery pack. S4. Calculate the real-time basic transmittance based on the effective light intensity value in S1, generate a temperature correction coefficient using the surface temperature data of the laminated fireproof color-changing glass, and calculate the power constraint factor in combination with the remaining power data. The target transmittance command is calculated by multiplying the real-time base transmittance, temperature correction factor, and electrical constraint factor. S5. Input the target transmittance command from S4 into the transmittance-driving voltage mapping model to obtain the target driving voltage amplitude and polarity. S6. Based on the target driving voltage amplitude and polarity, the PID algorithm is used to control the output driving voltage of the color-changing driving component and adjust the light transmittance of the electrochromic film. By comparing surface temperature data with the heat dissipation start threshold, the start / stop and speed of the cooling fan are controlled.
2. The method for controlling the light transmittance of marine color-changing fireproof windows based on photovoltaic power supply as described in claim 1, characterized in that, S1 includes the following steps: S11. Initialize the sensor array sampling parameters; set the sampling frequency of the light intensity sensor, the sampling frequency of the temperature sensor, and the sampling frequency of the battery management unit. S12. Define the state prediction equation and the observation equation to obtain the one-dimensional Kalman filter equation. Using the one-dimensional Kalman filter equation, the light intensity estimate of the previous moment is taken as the prior state, and the original observation value of the sensor at the current moment is taken as the observation input. S13. Calculate the Kalman gain using the prediction error covariance and the measurement noise covariance. Based on the Kalman gain, perform weighted correction on the prior state and the observation residual to obtain the effective illumination intensity value.
3. The method for controlling the light transmittance of marine color-changing fireproof windows based on photovoltaic power supply as described in claim 1, characterized in that, S2 includes the following steps: S21. Set the time window and judgment period threshold for fire signal detection; read the level signal of the ship's fire protection system through the GPIO port in each time window. If the effective trigger level reaches the judgment period threshold, the fire alarm signal is deemed valid. S22. Within the first preset time after the fire alarm signal is determined to be valid, the enable pin level of the inverter module is lowered to stop the DC-to-AC power output. S23. Within a second preset time after the inverter module stops outputting, drive the normally closed DC contactor in the fireproof and explosion-proof box containing the lithium-ion battery pack to disconnect the electrical connection between the positive terminal of the battery pack and the external load.
4. The method for controlling the light transmittance of marine color-changing fireproof windows based on photovoltaic power supply as described in claim 1, characterized in that, S3 includes the following steps: S31. Calculate the output power and voltage change of the photovoltaic panel at the current moment; S32. Determine the sign relationship between the power change and the voltage change; if the power and voltage change in the same direction, determine that the operating point is to the left of the maximum power point, and control the charging management module to increase the PWM duty cycle; if the power and voltage change in opposite directions, determine that the operating point is to the right of the maximum power point, and control the charging management module to decrease the PWM duty cycle. S33. Set the dead zone threshold; when the absolute value of the power change is less than the dead zone threshold, keep the current PWM duty cycle unchanged, stop the disturbance, and lock the maximum power point.
5. The method for controlling the light transmittance of marine color-changing fireproof windows based on photovoltaic power supply as described in claim 1, characterized in that, S4 includes the following steps: S41. Set a low light threshold and a high light threshold. When the effective light intensity value is less than the low light threshold, output the highest base transmittance as the real-time base transmittance. When the effective light intensity value is greater than the high light threshold, output the lowest base transmittance as the real-time base transmittance. When it is between the two, calculate the real-time base transmittance by linear interpolation. S42. Set a temperature intervention threshold. When the surface temperature data is less than the temperature intervention threshold, the temperature correction coefficient is set to 1. When the surface temperature data is greater than or equal to the temperature intervention threshold, the temperature correction coefficient decreases linearly with increasing temperature. S43. Set a low battery protection threshold. When the remaining battery level is lower than the low battery protection threshold, the battery constraint factor is set to 0; otherwise, it is set to 1. S44. Multiply the base transmittance, temperature correction coefficient and charge constraint factor to obtain the theoretical transmittance, and introduce hysteresis comparison logic to determine whether the difference between the theoretical transmittance and the current transmittance exceeds the adjustment dead zone. If so, update the target transmittance command; otherwise, keep the original target transmittance command.
6. The method for controlling the light transmittance of marine color-changing fireproof windows based on photovoltaic power supply as described in claim 1, characterized in that, S5 includes the following steps: S51. Construct the initial BP neural network model; set the initial parameters of the initial BP neural network model; S52. Collect historical transmittance data and the corresponding target driving voltage amplitude and polarity data; divide the data to obtain training data and test data; use the target driving voltage amplitude and polarity data as label data; S53. Use training data and test data to train and test the initial BP neural network model to obtain the transmittance-driving voltage mapping model; S54. Input the target transmittance command from S4 into the transmittance-driving voltage mapping model to obtain the target driving voltage amplitude and polarity.
7. The method for controlling the light transmittance of marine color-changing fireproof windows based on photovoltaic power supply as described in claim 1, characterized in that, S6 includes the following steps: S531. Train the initial BP neural network model using training data, and obtain the trained BP neural network model by manually adjusting the learning rate of the initial BP neural network model. S532. Set the test accuracy threshold; input the test data into the trained BP neural network model to obtain the model prediction data, calculate the similarity between the model prediction data and the label data in the test data, and obtain the test accuracy; determine whether the test accuracy is ≥ the test accuracy threshold. If it is greater, then use the trained BP neural network model as the transmittance-driving voltage mapping model. Otherwise, the parameters of the trained BP neural network model are optimized by an optimization algorithm to obtain the optimal solution; the optimal solution is used as the parameters of the trained BP neural network model to obtain the transmittance-driving voltage mapping model.
8. The method for controlling the light transmittance of marine color-changing fireproof windows based on photovoltaic power supply as described in claim 7, characterized in that, The steps in S532 to optimize the parameters of the trained BP neural network model and obtain the optimal solution include: S5321. Construct a bee population, set the total number of bees in the population; set the maximum number of optimization iterations; Based on the learning rate of the trained BP neural network model, the initial position of the bee population is randomly set to obtain the initial position set of the bee population. S5322. Define a fitness function and a fitness function formula based on the test accuracy threshold and the test accuracy. S5323. Perform iterative operations on the initial position set of the bee population; in each iteration, update the position of each bee in the initial position set of the bee population according to the fitness function, and obtain the best individual bee position and the global best bee position in the bee population in each iteration. S5324. Repeat S5323. When the maximum number of optimization iterations is reached, stop the iteration and take the globally optimal bee position as the optimal solution.
9. The method for controlling the light transmittance of marine color-changing fireproof windows based on photovoltaic power supply as described in claim 6, characterized in that, S6 includes the following steps: S61. Collect the actual output driving voltage of the color-changing driving component to obtain the actual color-changing driving voltage; calculate the deviation between the actual color-changing driving voltage and the target driving voltage amplitude, use the PID algorithm to calculate the control quantity, and adjust the voltage amplitude output by the inverter module. S62. When the surface temperature data exceeds the heat dissipation start threshold, a PWM control signal is generated to drive the cooling fan to run, and the PWM duty cycle is proportional to the temperature difference exceeding the heat dissipation start threshold.
10. A photovoltaic-powered marine color-changing fireproof window light transmittance control system, characterized in that, The system implementing the photovoltaic-powered marine color-changing fireproof window light transmittance control method as described in any one of claims 1-9, the system comprising: Data acquisition module: used to collect data on light intensity, temperature, and battery status, and perform Kalman filtering. Safety interlock module: used to monitor fire signals and execute inverter disconnection and battery isolation actions; Energy Management Module: Used to execute the MPPT algorithm and manage battery charging and discharging; Transmittance control module: used to run the transmittance decision model and PID drive algorithm; Actuators: including color-changing drive components, cooling fans, and contactors.