Fault detection method of solar street lamp
By constructing a fault detection model based on long short-term memory networks and radial basis networks, and utilizing historical data from solar streetlights, the problem of untimely fault detection in intelligent lighting systems was solved. This enabled timely identification and type determination of faulty solar streetlights, avoiding excessive load on normal streetlights and extending system lifespan.
Patent Information
- Application Number
- CN202510795171.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-15
- Publication Date
- 2025-11-11
AI Technical Summary
Existing technologies make it difficult to detect power supply circuit or power source faults in solar streetlights in a timely manner in intelligent lighting systems, resulting in untimely fault detection.
Based on historical maintenance data of solar streetlights, a fault detection model is constructed. Using long short-term memory networks and radial basis function networks, the model is trained through historical data on power transmission, storage, and changes in electrical parameters to identify faulty solar streetlights and determine the fault type.
It can detect and identify the fault type in a timely and effective manner when a faulty solar street light is powered by other street lights, thus avoiding overloading of normal solar street lights and extending the life of the overall intelligent lighting system.
Smart Images

Figure CN120928236A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of solar streetlights, and in particular to a fault detection method for solar streetlights. Background Technology
[0002] Solar streetlights use solar panels to convert solar energy into electrical energy during the day and store it in batteries. At night or in other scenarios requiring street lighting, a smart controller can release the energy from the batteries to power the streetlights.
[0003] The related technology provides an intelligent lighting system for solar streetlights. By electrically connecting the power sources of multiple solar streetlights in sequence, when a solar streetlight lacks power or has insufficient power supply, it can be powered by other solar streetlights connected to it, so as to ensure that the solar streetlights have a good lighting effect during a specific period of time.
[0004] Traditional fault detection methods rely on lighting conditions such as whether a streetlight is illuminating, its brightness, and the duration of illumination to determine if a streetlight is malfunctioning. However, in the aforementioned intelligent lighting system, when a solar streetlight's power supply circuit or power source fails, other solar streetlights can supply power to the malfunctioning streetlight, making it difficult for traditional fault detection methods to detect the faulty streetlight in a timely manner. Summary of the Invention
[0005] In view of this, the purpose of this invention is to provide a fault detection method for solar streetlights, which solves the problem in the prior art that it is difficult to detect solar streetlights with power supply circuit faults or power supply failures in intelligent lighting systems.
[0006] Firstly, this application provides a fault detection method for solar streetlights, including:
[0007] Identify faulty solar streetlights based on historical maintenance data.
[0008] A fault detection model is constructed based on the historical power transmission data, historical power storage data, and historical electrical parameter change data of the faulty solar street light.
[0009] The real-time power transmission data, real-time power storage data, and real-time electrical parameter change data of each solar street light are used as inputs to the fault detection model to obtain the fault probability distribution corresponding to each solar street light.
[0010] The target faulty solar street light is determined based on the fault probability distribution, and the fault type of the target faulty solar street light is determined.
[0011] In one embodiment, the step of constructing a fault detection model based on historical power transmission data, historical power storage data, and historical electrical parameter change data of the faulty solar street light specifically includes:
[0012] The time series of each target variable is determined based on the historical power transmission data, historical power storage data, and historical electrical parameter change data of the faulty solar street light.
[0013] Train a long short-term memory network based on the time series of the target variable, and obtain the target feature vector corresponding to the target variable output by the long short-term memory network;
[0014] The target feature vector is used as input to construct the fault detection model based on a preset radial basis function network structure.
[0015] In one embodiment, the historical power transmission data includes the historical power transmission start time and historical power transmission end time, historical power supply lamp identifiers and historical receiving lamp identifiers, and the historical power transmission value; the historical power storage data includes the daily charging amount, daily discharging amount, remaining power at different times, and charge / discharge cycle number of each faulty solar street light; the historical electrical parameter change data includes the current data, voltage data, and transmission resistance data between the faulty solar street light and adjacent solar street lights for each faulty solar street light.
[0016] In one embodiment, training a long short-term memory network based on the time series data of the target variable and obtaining the target feature vector corresponding to the target variable output by the long short-term memory network specifically includes:
[0017] The time series of the target variable is divided into a training set, a validation set, and a test set according to a preset ratio;
[0018] An initial long short-term memory network is obtained by training the training set, and the parameters of the initial long short-term memory network are adjusted by the validation set based on the preset mean squared error loss function, thereby obtaining a trained long short-term memory network.
[0019] The test set is input into the Long Short-Term Memory network for training to obtain the predicted value of the target variable, and the target feature vector is obtained based on the predicted value of the target variable and the output of the hidden layer of the Long Short-Term Memory network.
[0020] In one embodiment, before training the initial long short-term memory network using the training set, the method further includes:
[0021] The number of nodes in the input layer of the Long Short-Term Memory network is determined based on the historical power transmission data, the historical power storage data, and the historical electrical parameter change data.
[0022] Based on the historical power transmission data, the historical power storage data, the historical electrical parameter change data, and expert suggestion data, the number of LSTM layers and the number of hidden units in the Long Short-Term Memory network are defined.
[0023] The output of the LSTM layer is connected to a fully connected layer to generate the output layer of the Long Short-Term Memory network, and the output dimension of the fully connected layer is set to match the input dimension of the preset radial basis network structure.
[0024] The network structure of the initial short-term memory network is constructed based on the input layer of the long short-term memory network, the LSTM layer, and the output layer of the long short-term memory network.
[0025] In one embodiment, the radial basis function (RBF) network structure includes an RBF input layer, an RBF hidden layer, and an RBF output layer, wherein the dimension of the RBF input layer is consistent with the dimension of the long short-term memory (LSTM) network; the fault detection model is constructed based on the preset RBF network structure by using the target feature vector as input, and is trained using the following method:
[0026] Cluster analysis is performed on the historical power transmission data, the historical power storage data, and the historical electrical parameter change data, and the cluster center is used as the center of the hidden layer neurons.
[0027] The width of a hidden layer neuron is determined based on the distance between the centers of multiple hidden layer neurons and the number of hidden layer neurons; the centers and widths of the hidden layer neurons are used to define the hidden layers of a radial basis function network.
[0028] Using the target feature vector as input, the weights and biases of the output layer are trained based on the least squares method; the weights and biases are used to define the prediction calculation function of the radial basis function network output layer.
[0029] The fault detection model is constructed using the radial basis function and the prediction calculation function.
[0030] In one embodiment, the expression for the radial basis function is:
[0031]
[0032] The expression for the prediction calculation function is:
[0033] W T = [ω1, ω2, ..., ω j ,…,ω K ] T
[0034]
[0035] Among them, the Let x be the output value of the j-th hidden layer neuron; let x be the output target feature vector; let c be the output value of the j-th hidden layer neuron. j It is the center of the j-th hidden layer neuron; the σ j It is the width of the j-th hidden layer neuron; Let K be the vector of the j-th predicted fault type; K is the number of neurons in the hidden layer; ω j is the weight of the output layer of the j-th hidden layer neuron; b is the bias of the output layer.
[0036] In one embodiment, determining the target faulty solar street light based on the fault probability distribution and determining the fault type of the target faulty solar street light specifically includes:
[0037] The parameter values for each type of fault are determined based on the fault probability distribution, and the parameter values are compared with the fault thresholds for each type of fault.
[0038] Solar streetlights whose parameter values exceed the fault threshold are identified as target solar streetlights, and the fault type of the target solar streetlights is determined according to the fault probability distribution.
[0039] Secondly, this application provides a fault detection system for a solar street light, including a processor and a memory; wherein the memory stores a computer program, which is loaded by the processor and executed as described in any one of the first aspects of the fault detection method for a solar street light.
[0040] Thirdly, this application provides a computer-readable storage medium storing instructions for loading by a processor and executing the fault detection method for a solar street light as described in any one of the first aspects.
[0041] In the fault detection method for solar streetlights in this embodiment, a fault detection model is constructed by using the historical power transmission data, historical power storage data, and historical electrical parameters of the faulty solar streetlight. The fault detection model can detect abnormal fluctuations of the faulty solar streetlight when it is powered by other streetlights. Even when the faulty solar streetlight is powered by other streetlights and is illuminating normally, the target faulty solar streetlight can be identified in a timely and effective manner based on the real-time power transmission data, real-time power storage data, and real-time electrical parameter change data of the solar streetlight, and the fault type of the target faulty solar streetlight can be determined. This avoids overloading of other normal solar streetlights, which would affect the lifespan of the overall intelligent lighting system. Attached Figure Description
[0042] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0043] Figure 1 This is a flowchart illustrating a fault detection method for a solar street light provided in one embodiment of this application.
[0044] Figure 2 This is a schematic diagram of the structure of an electronic device provided in one embodiment of this application. Detailed Implementation
[0045] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some, not all, of the embodiments of the present invention. Based on the description of the present invention, all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of the present invention.
[0046] In the description of this invention, unless otherwise explicitly specified and limited, the terms "set," "install," "connect," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms according to the specific circumstances.
[0047] The terms “upper,” “lower,” “left,” “right,” “front,” “back,” “top,” “bottom,” “inner,” and “outer,” etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship commonly used when the product of the invention is in use. They are only for the convenience of description and simplification, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the present invention.
[0048] The terms “first,” “second,” “third,” etc., are used merely to distinguish elements with similar properties, not to indicate or imply relative importance or a specific order.
[0049] The terms “include,” “comprising,” or any other variation thereof are intended to cover non-exclusive inclusion, which includes not only the elements listed but also other elements not expressly listed.
[0050] The fault detection method for solar streetlights in this embodiment is applied to the intelligent control system of solar streetlights. The intelligent control system includes multiple solar streetlights, and the power supplies of the multiple solar streetlights are electrically connected sequentially along the road path. When the solar power supply of a certain streetlight is insufficient due to weather or power failure, it can be powered by the support of other streetlights to meet the lighting brightness and duration of the streetlight.
[0051] like Figure 1 As shown in the figure, this embodiment provides a fault detection method for solar street lights, including:
[0052] Step S10: Identify faulty solar streetlights based on historical maintenance data of the solar streetlights;
[0053] Step S20: Construct a fault detection model based on the historical power transmission data, historical power storage data, and historical electrical parameter change data of the faulty solar street light;
[0054] Step S30: Use the real-time power transmission data, real-time power storage data and real-time electrical parameter change data of each solar street light as input to the fault detection model to obtain the fault probability distribution corresponding to each solar street light;
[0055] Step S40: Determine the target faulty solar street light based on the fault probability distribution, and determine the fault type of the target faulty solar street light.
[0056] In the fault detection method for solar streetlights in this embodiment, a fault detection model is constructed by using the historical power transmission data, historical power storage data, and historical electrical parameters of the faulty solar streetlight. The fault detection model can detect abnormal fluctuations of the faulty solar streetlight when it is powered by other streetlights. Even when the faulty solar streetlight is powered by other streetlights and is illuminating normally, the target faulty solar streetlight can be identified in a timely and effective manner based on the real-time power transmission data, real-time power storage data, and real-time electrical parameter change data of the solar streetlight, and the fault type of the target faulty solar streetlight can be determined. This avoids overloading of other normal solar streetlights, which would affect the lifespan of the overall intelligent lighting system.
[0057] Step S10: Identify faulty solar streetlights based on historical maintenance data of the solar streetlights.
[0058] The maintenance management system for solar streetlights stores historical maintenance data, including the streetlight's code number, maintenance time, fault type, and power supply status. Each solar streetlight has a unique code number upon installation. A mapping relationship is established between the maintenance time and fault type of the solar streetlight and its code number on a remote server. Solar streetlights with a power supply status of "being powered" and a corresponding fault type can be marked as faulty by querying the historical maintenance data.
[0059] Step S20: Construct a fault detection model based on the historical power transmission data, historical power storage data, and historical electrical parameter change data of the faulty solar street light.
[0060] The historical power transmission data includes the historical power transmission start time, historical power transmission end time, historical power supply light identifiers, historical power receiving light identifiers, and the historical power transmission value. The historical power storage data includes the daily charging amount, daily discharging amount, remaining power at different times, and charge / discharge cycle number of each faulty solar street light. The historical electrical parameter change data includes the current data, voltage data, and transmission resistance data between the faulty solar street light and adjacent solar street lights for each faulty solar street light.
[0061] The historical power transmission start time refers to the starting point when the receiving lamp begins receiving power from the supplying lamp, and the historical power transmission end time refers to the ending point when the receiving lamp stops receiving power from the supplying lamp. The solar street light controller is equipped with a system clock. Each time the receiving lamp receives power from the supplying lamp, the system clock records the start time; and each time power transmission ends, the system clock records the end time.
[0062] An energy metering module is installed in the connection line of each solar street light. This module monitors the energy transfer between the solar street light and other connected solar street lights in real time. When a solar street light supplies power to an adjacent solar street light, it marks the corresponding street light as the supplying light and uses its code number as the historical supplying light identifier. The corresponding receiving light's code number becomes the historical receiving light identifier. After the supplying light finishes transferring energy to the receiving light, the energy metering module records the total amount of energy transferred during this process as the historical energy value.
[0063] The solar streetlights are equipped with a battery management system (BMS). This system monitors the charging and discharging of the power supply using current sensors, allowing it to determine the daily charging and discharging amounts of any faulty solar streetlight. Additionally, the BMS includes a voltage sensor that obtains battery voltage data. This voltage data, combined with the current data measured by the current sensor, is used to determine the remaining power capacity at different times using an ampere-hour integration method. The BMS also includes a counter module that records the number of complete charge-discharge cycles.
[0064] Current and voltage sensors are installed in the main circuit of the solar streetlights. These sensors can collect current and voltage data in real time, respectively, and convert them into digital signals that the control system can recognize through an ADC module. Furthermore, when two solar streetlights are in a power supply and receiving relationship, the control system periodically sends low-voltage test signals to the two adjacent streetlights. This allows the control system to determine the transmission resistance between the faulty solar streetlight and its adjacent streetlights based on real-time measured current and voltage data.
[0065] Because the solar streetlights in this embodiment have a mutual power supply mode, it is not possible to promptly and effectively identify whether a solar streetlight is malfunctioning simply by observing its lighting status, such as brightness and duration. Furthermore, while the lack of power in normal solar streetlights is mostly due to short-term power shortages caused by weather factors, the power shortage in malfunctioning solar streetlights is long-term. In particular, when the power supply circuit of a malfunctioning solar streetlight fails, the power supply from adjacent solar streetlights becomes subject to certain temporal and spatial characteristics.
[0066] Therefore, this embodiment trains a fault detection model based on a long short-term memory (LSTM) network combined with a radial basis function (RBF) network. The LSTM network captures long-term dependencies (such as daily charging cycles and nighttime discharge patterns) in time-series data of power transmission time, power fluctuations, and remaining power of the faulty solar streetlight during power transmission. This identifies the temporal differences between normal and faulty power supply to filter out environmental interference (such as power fluctuations caused by weather changes). Furthermore, the RBF network is sensitive to sudden anomalies (such as voltage drops or resistance surges), enabling rapid location of faulty nodes. By learning normal power supply patterns from historical mutual power supply data, it distinguishes fault-driven abnormal power supply requests.
[0067] The fault detection model is constructed based on the historical power transmission data, historical power storage data, and historical electrical parameter change data of the faulty solar street light, specifically including:
[0068] Step S201: Determine the time series of each target variable based on the historical power transmission data, historical power storage data, and historical electrical parameter change data of the faulty solar street light;
[0069] Step S202: Train a long short-term memory network based on the time series of the target variable, and obtain the target feature vector corresponding to the target variable output by the long short-term memory network;
[0070] Step S203: Using the target feature vector as input, construct the fault detection model based on the preset radial basis function network structure.
[0071] In step S201, the target variables include eight indicators: transmission power fluctuation, mutual supply frequency, transmission efficiency, remaining power trend, cycle count growth rate, voltage deviation rate, current fluctuation amplitude, and transmission resistance change rate. Transmission power fluctuation is the rate of change of transmission power per unit time, which can be determined by historical power values within that unit time. Mutual supply frequency is the number of times a faulty solar street light requests power as a receiving end within a unit time (high-frequency requests may indicate battery or power supply failure), which can be determined by the number of times the faulty solar street light's historical receiving light markers are displayed within a unit time. Transmission efficiency is the ratio of actual transmitted power to theoretically transmittable power, which can be determined by historical power values of the powered and faulty solar street lights within a unit time. Remaining power trend refers to the difference in remaining power at consecutive time points (a continuously increasing negative value may indicate battery aging), which can be determined by the remaining power at different times within a unit time. Cycle count growth rate is the increment of the number of charge / discharge cycles within a unit time (abnormal growth may be caused by battery capacity decay). The voltage deviation rate is the percentage difference between the voltage data (historical real-time voltage) and the rated voltage (usually between 110V and 220V, set according to the street light's factory specifications) (exceeding the threshold may indicate a circuit fault). The current fluctuation amplitude is the absolute difference between current data at adjacent moments (a sudden increase may indicate a short circuit or abnormal load). The transmission resistance change rate is the percentage difference between transmission resistance data at adjacent moments (a continuous increase in resistance may be caused by poor line contact).
[0072] Based on this, the time series of the target variables include the time series of transmission power fluctuation, mutual supply frequency, transmission efficiency, remaining power change trend, cycle number growth rate, voltage deviation rate, current change amplitude, and transmission resistance change rate.
[0073] To ensure that the time series data format is suitable for the input of the Long Short-Term Memory (LSTM) network, the input data is a three-dimensional tensor with the shape (batch_size, time_steps, input_dim). `batch_size` represents the number of samples input into the model each time (this can be adjusted according to hardware resources and data characteristics; common values are 16, 32, 64, etc.); `time_steps` represents the number of consecutive data acquisitions in the time series (e.g., if data is collected every 5 minutes, and 10 consecutive acquisitions are considered as a sequence for analysis, then `time_steps` is 10). `input_dim` represents the number of features at each time step (the total number of input layer nodes, including various features such as power transmission, power storage, and electrical parameters).
[0074] In step S202, the Long Short-Term Memory network extracts features and learns patterns from the time series of the input target variables and outputs a target feature vector. The target feature vector captures the long-term dependencies and complex features in the time series of each target variable and can be used as input to the radial basis function network for further classification in fault judgment.
[0075] The step of training a long short-term memory network based on the time series data of the target variable and obtaining the target feature vector corresponding to the target variable output by the long short-term memory network specifically includes:
[0076] Step S2021: Divide the time series of the target variable into a training set, a validation set, and a test set according to a preset ratio;
[0077] Step S2022: Train an initial long short-term memory network using the training set, and adjust the parameters of the initial long short-term memory network using the validation set based on a preset mean squared error loss function, thereby obtaining a trained long short-term memory network.
[0078] Step S2023: Train the Long Short-Term Memory network with the input of the test set to obtain the predicted value of the target variable, and obtain the target feature vector based on the predicted value of the target variable and the output of the hidden layer of the Long Short-Term Memory network.
[0079] In step S2021, the time series can be divided into a training set, a validation set, and a test set in a 7:2:1 ratio (or other ratios as needed), with the training set comprising 70%, the validation set 20%, and the test set 10%. The training set is used to train the Long Short-Term Memory (LSTM) network to learn patterns and features in the time series data. The validation set is used to adjust the parameters of the LTM network to prevent overfitting. The test set is used to test the generalization ability of the trained LTM network and output the target feature vector.
[0080] In step S2022, before training the initial Long Short-Term Memory (LSTM) network, the network structure of the initial LSTM network must be defined. The network structure of the initial LSTM network includes an LSTM input layer, an LSTM layer, and an LSTM output layer.
[0081] Specifically, before training the initial long short-term memory network using the training set, the process further includes:
[0082] The number of nodes in the input layer of the Long Short-Term Memory network is determined based on the historical power transmission data, the historical power storage data, and the historical electrical parameter change data.
[0083] Based on the historical power transmission data, the historical power storage data, the historical electrical parameter change data, and expert suggestion data, the number of LSTM layers and the number of hidden units in the Long Short-Term Memory network are defined.
[0084] The output of the LSTM layer is connected to a fully connected layer to generate the output layer of the Long Short-Term Memory network, and the output dimension of the fully connected layer is set to match the input dimension of the preset radial basis network structure.
[0085] The network structure of the initial long short-term memory network is constructed based on the input layer of the long short-term memory network, the LSTM layer, and the output layer of the long short-term memory network.
[0086] In this embodiment, the structural parameters of the initial recurrent neural network are customized based on the characteristics of the time series data. Specifically, the number of neurons in the input layer is mainly set according to the feature dimensions of the time series. This embodiment includes eight dimensions: time series of transmission power fluctuation, time series of mutual supply frequency, time series of transmission efficiency, time series of remaining power change trend, time series of cycle number growth rate, time series of voltage deviation rate, time series of current change amplitude, and time series of transmission resistance change rate. Therefore, the input layer is set to have 8 neurons.
[0087] The number of neurons in the LSTM core layer typically needs to be larger than the input layer size to capture complex patterns; here, a bidirectional LSTM layer (128 units) + Dropout (0.2) is used. The input dimension parameter consists of three elements: batch size, time step, and feature dimension (set to 3 in this scenario). Considering the nonlinear coupling characteristics between multiple variables, the model is configured with 3 hidden layers. For activation function selection, the sigmoid function is used for gating to control information in the 0-1 range, while the tanh function is used for state updates to preserve both positive and negative bidirectional features. The output layer uses a fully connected layer to generate a 128-dimensional feature vector.
[0088] During model training, time-series data is processed step-by-step through LSTM layers to generate hidden states containing historical information. The synergistic effect of gating mechanisms (input gate / forget gate / output gate) enables the model to effectively capture dynamic dependencies among multiple variables. The training process employs backpropagation combined with an optimizer for iterative weight optimization, ultimately forming a Long Short-Term Memory network with temporal prediction capabilities.
[0089] The solar streetlights in this embodiment may experience malfunctions due to their own fuses, ballasts, or components in the power supply circuit. Faults may also occur in the power transmission lines between adjacent solar streetlights. Furthermore, these factors may exhibit complex nonlinear relationships. (For example, during a short-circuit fault, the nonlinear characteristics of inductors, capacitors, and the arc at the fault point cause complex nonlinear interactions between current, voltage, and resistance. Moreover, the degree and manner of the impact of short-circuit faults at different locations on these parameters vary, increasing the complexity of their relationship with the fault type. Another example is leakage faults. While the resistance of a metallic conductor increases with temperature, this increase is not linear; rising temperature may lead to increased line resistance, but rather follows a specific temperature coefficient of resistance curve. Simultaneously, increased humidity may degrade the insulation performance of the line, leading to increased leakage current. The relationship between leakage current and humidity is influenced by various factors, such as the characteristics of the line insulation material and the degree of surface contamination, exhibiting a complex nonlinear relationship.) Long Short-Term Memory (LSTM) networks, through multi-layered neurons and gating mechanisms, can automatically learn these implicit association patterns. It can process real-time data step by step, dynamically update the internal status, and support real-time control of solar street light systems. By adjusting the input sequence length and prediction step size, it can predict the changes in data such as the fluctuation of transmitted power, mutual supply frequency, transmission efficiency, remaining power change trend, cycle number growth rate, voltage deviation rate, current change amplitude, and transmission resistance change rate of solar street lights in the next moment.
[0090] In this embodiment, the loss function used is the mean squared error loss function, the expression of which is: Where L is the mean squared error, n is the number of samples, and y i The true value of the target variable. It is the predicted value of the target variable.
[0091] During training, the training set data is input into the initial Long Short-Term Memory (LSTM) network in batches according to the sample size. In each training batch, the data is forward-propagated through the LSTM layer and the output layer, and the mean squared error loss between the predicted and true values is calculated. Then, the gradient of the loss function with respect to the network parameters (weights and biases) is calculated using the backpropagation algorithm, and the network parameters are updated based on the gradient using the Adam optimizer. This process is repeated for multiple training epochs, allowing the model to gradually learn the patterns and features in the time series of the target variable. The Adam optimizer adaptively adjusts the learning rate of each parameter, which helps the LSM network converge quickly and improves the accuracy of the predictions.
[0092] After each training cycle, the model is evaluated using a validation set. The validation set data is input into the trained Long Short-Term Memory (LSTM) network, and the mean squared error loss on the validation set is calculated. If the validation set loss stops decreasing or begins to increase over multiple consecutive cycles, it indicates that the model may be overfitting or trapped in a local optimum. In this case, the parameters of the LSTM network can be adjusted by modifying the learning rate, adjusting the LSTM layer structure, and adding a regularization term. For example, if the model converges slowly, the learning rate can be increased appropriately; if oscillations or overfitting occur, the learning rate can be decreased to 0.1 times its original value, and training can be re-run. Another example is adding a regularization term λ∑ to the loss function. ω∈W ω 2 (Where λ is the regularization coefficient, which can be adjusted experimentally, and W is the set of model parameters) to make the model parameters smoother.
[0093] Training can be stopped when the training cycle reaches the maximum cycle threshold or the loss function converges, and the trained Long Short-Term Memory network can be obtained.
[0094] In step S2023, the predicted values are first obtained by testing with a test set. The test set data is adjusted to the training format and input into the trained Long Short-Term Memory (LSTM) network. The predicted values of the target variable are calculated through forward propagation. Then, the outputs of the hidden layers of the LSTM network are obtained. The hidden layer outputs contain the results of feature extraction from the input time series data. These features capture important patterns and information in the target variable's time series. For example, if the last LSTM layer has 64 hidden units, then the shape of the hidden layer output is (batch_size, 64).
[0095] Finally, the target feature vector can be obtained through weighted fusion based on the predicted value of the target variable and the output of the hidden layer of the Long Short-Term Memory network. Since the hidden layer typically outputs a hidden layer vector used to predict trends, this vector can serve as a reference for predicting the value at the next time step. To ensure the target feature vector has excellent predictive power in the time dimension, the weights are corrected by incorporating the predicted values output after training on the test set. For example, assuming the predicted value is a scalar and the hidden layer output is a vector of shape (batch_size, 64), the predicted value can be expanded to the same batch_size dimension as the hidden layer output, and then concatenated along the feature dimension to obtain a target feature vector of shape (batch_size, 65). This target feature vector combines the model's prediction results and the feature representation of the input data, and is used as input to the radial basis function network for further processing to determine whether a fault has occurred and its type.
[0096] Because the Long Short-Term Memory (LSTM) network structure is relatively complex and its generalization ability has certain limitations, it is prone to overfitting when processing data. Therefore, a fault detection model is constructed by combining a radial basis function (RBF) network structure to further partition the target feature vector output by the LSTM network in a local manner. Since each hidden unit of the RBF network structure is only sensitive to local regions, it can make reasonable predictions based on local similarity when faced with new and unseen data, thereby improving the overall generalization performance of the model.
[0097] In step S203, the radial basis function (RBF) network structure includes a RBF input layer, a RBF hidden layer, and a RBF output layer. The dimension of the RBF input layer is consistent with the dimension of the long short-term memory (LSTM) network. The fault detection model is constructed based on the preset RBF network structure by using the target feature vector as input, and is trained using the following method:
[0098] Step S2031: Perform cluster analysis on the historical power transmission data, the historical power storage data, and the historical electrical parameter change data, and use the cluster center as the center of the hidden layer neurons;
[0099] Step S2032: Determine the width of the hidden layer neurons based on the distance between the centers of multiple hidden layer neurons and the number of hidden layer neurons; the centers and widths of the hidden layer neurons are used to define the hidden layers of the radial basis function network according to the radial basis function.
[0100] Step S2033: Using the target feature vector as input, train the weights and biases of the output layer based on the least squares method; the weights and biases are used to define the prediction calculation function of the radial basis function network output layer;
[0101] Step S2034: Construct the fault detection model using the radial basis function and the prediction calculation function.
[0102] In step 2031, the historical power transmission data, historical power storage data, and historical electrical parameter change data are divided into K clusters using the K-means clustering algorithm, so that the data points within each cluster have high similarity, while the data points between different clusters have low similarity.
[0103] In cluster analysis, K data points are first randomly selected as initial cluster centers (K is the pre-defined number of hidden layer neurons). Then, the data points are assigned using the Euclidean distance formula to calculate the distance from each data point to each cluster center, and each data point is assigned to the cluster containing the nearest cluster center. The expression for the Euclidean distance formula is: Where x is a data point; c i It is the i-th cluster center, c i =(c i1 ,c i2 ,…,c in ), c ij is the value of the i-th cluster center in the j-th dimension; n is the dimension of the data point (i.e., the number of features in historical power transmission data, historical power storage data, and historical electrical parameter change data). Next, the cluster centers are updated by recalculating the mean of the data points within each cluster and using this mean as the new cluster center. This process of assigning and updating cluster centers is repeated until the cluster centers no longer change or the preset maximum number of iterations is reached. The cluster centers at this point are then used as the centers of the final hidden layer neurons.
[0104] In step 2032, the centers (c1, c2, ..., c) of the hidden layer neurons are also calculated according to the Euclidean distance formula. n ), calculate the distance between the centers of any two hidden layer neurons, with the center c of the neuron as the reference point. i and c j For example: Where c ik and c jk The centers c of the hidden layer neurons are respectively i and c j The values of can be taken. This yields a K×K distance matrix (the distance matrix records the distances between all centers).
[0105] After obtaining the distance matrix, the maximum distance d among all distance values in the distance matrix is found using the max function. max Then according to the formula This allows us to determine the width σ of the hidden layer neurons.
[0106] When a target feature vector x is input, each neuron in the hidden layer calculates an output value based on its corresponding radial basis function. This value reflects the similarity between the input target feature vector and the center of that neuron. This embodiment uses a Gaussian function as the radial basis function, and its expression is:
[0107]
[0108] Among them, the Let x be the output value of the j-th hidden layer neuron; let x be the output target feature vector; let c be the output value of the j-th hidden layer neuron. j It is the center of the j-th hidden layer neuron; the σ j It is the width of the j-th hidden layer neuron.
[0109] In step 2033, for each input target feature vector x, each neuron j of the hidden layer is determined according to its radial basis function φ. j (x) Calculate the output value to obtain the output vector φ(x)=[φ1(x),φ2(x),…,φ K [x], where K is the number of neurons in the hidden layer.
[0110] Then, based on the output vector φ(x) of the hidden layer, the prediction calculation function can be defined, and the expression of the prediction calculation function is:
[0111]
[0112] W T = [ω1, ω2, ..., ω j ,…,ω K ] T
[0113]
[0114] Among them, the Let K be the vector of the j-th predicted fault type; K is the number of neurons in the hidden layer; ω j The weights of the output layer for the j-th hidden layer neuron are: b is the bias of the output layer; This is the output value of the j-th hidden layer neuron.
[0115] Error function that can be obtained through least squares method The weight ω is solved by the inverse of moments. j And bias b.
[0116] First, expand the error function:
[0117]
[0118] Then regarding E Find the partial derivative and set it to 0 to move to the position that minimizes the error.
[0119]
[0120] make but
[0121] Then you can get
[0122] in The first K elements are the weight vector W, and the last element is the bias b.
[0123] In step S2034, the defined radial basis function network (RBF) input layer (whose dimension is consistent with the dimension of the target feature vector output by the long short-term memory network), hidden layer (defined by the radial basis functions according to the determined center and width), and output layer (determined by the prediction calculation function based on the solved weights and biases) are integrated to form a fault detection model. The new target feature vector is input into the constructed fault detection model, first passing through the hidden layer of the RBF network. Each neuron calculates the output value according to the radial basis functions. These values then pass through the output layer, and the prediction result is obtained according to the prediction calculation function. This result can be expressed as the probability of different fault types occurring in the power transmission line of the solar street light or as a direct determination of whether a fault has occurred, thereby realizing the fault detection function.
[0124] Step S30: Use the real-time power transmission data, real-time power storage data, and real-time electrical parameter change data of each solar street light as input to the fault detection model to obtain the fault probability distribution corresponding to each solar street light.
[0125] Real-time power transmission data includes the current amount of power transmitted, the current transmission direction, and the current start and end times of power transmission. Real-time power storage data includes the battery's real-time remaining power, the current charging or discharging state, and the current charge / discharge amount. Real-time electrical parameter change data includes current data, voltage data, and transmission resistance data between the solar street light and adjacent solar street lights.
[0126] Since the fault model is trained by combining a long short-term memory network and a radial basis function network, the current transmitted power, current transmission direction, current power transmission start time, current power transmission end time, real-time remaining battery power, current charging or discharging state, current charging / discharging amount, current data, voltage data, and transmission resistance data between solar streetlights and adjacent solar streetlights are also converted into corresponding time series, so that the long short-term memory network can extract features and analyze the input real-time data.
[0127] After processing by each layer of the model, the final output layer yields a vector representing the probability distribution of the faults. Each element of this vector represents the probability of the solar street light corresponding to a different fault type. For example, if the model is trained to detect n fault types, the dimension of the output vector is n, and each value p in the vector... i (i = 1, 2, ..., n) represents the probability of the street light experiencing the i-th type of malfunction, and satisfies These probability values constitute the failure probability distribution of the solar street light.
[0128] Step S40: Determine the target faulty solar street light based on the fault probability distribution, and determine the fault type of the target faulty solar street light.
[0129] After obtaining the fault probability distribution of the solar street light, the fault threshold of each type of fault probability can be combined to identify the fault items corresponding to the parameters that exceed the fault threshold in the fault probability distribution as the fault type, and the solar street light can be identified as the target fault solar street light.
[0130] The step of determining the target faulty solar street light based on the fault probability distribution and determining the fault type of the target faulty solar street light specifically includes:
[0131] The parameter values for each type of fault are determined based on the fault probability distribution, and the parameter values are compared with the fault thresholds for each type of fault.
[0132] Solar streetlights whose parameter values exceed the fault threshold are identified as target solar streetlights, and the fault type of the target solar streetlights is determined according to the fault probability distribution.
[0133] For each solar street light's fault probability distribution, check if there exists a fault type with a probability value greater than a set threshold T. If such a probability value exists, the solar street light is identified as the target fault solar street light. For example, for a solar street light with a fault probability distribution of [0.1, 0.8, 0.05, 0.05], assuming the second category is fuse failure, with a threshold T = 0.7, since the second element 0.8 in the fault probability distribution is greater than 0.7, this street light is identified as the target fault solar street light, and its fault type is fuse failure.
[0134] In addition, in some cases, there may be multiple fault types with relatively high and similar probability values. In such cases, the operating status of the target solar street light and the probability of different fault types occurring simultaneously in historical fault data can be combined to assist in the judgment.
[0135] In summary, the fault detection method for solar streetlights in this embodiment has two main advantages. First, the fault detection model can detect abnormal fluctuations in a faulty solar streetlight when it is powered by other streetlights. Even when the faulty solar streetlight is powered by other streetlights and is illuminating normally, the model can still promptly and effectively identify the target faulty solar streetlight and determine its fault type based on real-time power transmission data, real-time power storage data, and real-time electrical parameter change data. This prevents other normal solar streetlights from being overloaded, thus affecting the lifespan of the overall intelligent lighting system. Second, in scenarios where solar streetlights mutually power each other, a fault in one solar streetlight may trigger a chain reaction, affecting the normal operation of other solar streetlights. Through real-time monitoring and fault probability analysis, potential problems can be detected in the early stages of a fault, and the target faulty streetlight and its fault type can be identified in a timely manner. This helps to quickly repair the fault, restore the normal power supply and lighting functions of the streetlight system, and improve the stability and reliability of the entire system.
[0136] Based on the same inventive concept as the above embodiments, this embodiment also provides a fault detection system for solar streetlights, which further includes a processor and a memory; wherein, the memory stores a computer program, which is used by the processor to load and execute the fault detection method for solar streetlights as described above.
[0137] like Figure 2 As shown, based on the same inventive concept as the above embodiments, this embodiment also provides a computer-readable storage medium storing instructions for loading and executing by a processor the above-described fault detection method for solar streetlights.
[0138] The embodiments of the mobile terminal and computer-readable storage medium provided in this application include all the technical features of the embodiments of the above control method. The extended and explanatory content of the specification is basically the same as that of the embodiments of the above method, and will not be repeated here.
[0139] This application also provides a computer program product, which includes computer program code. When the computer program code is run on a computer, it causes the computer to perform the methods described in the various possible implementations above.
[0140] This application also provides a chip, including a memory and a processor. The memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that a device with the chip installed performs the methods described in the various possible implementations above.
[0141] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0142] In this application, the same or similar terms, concepts, technical solutions and / or application scenario descriptions are generally described in detail only when they appear for the first time. When they appear again, they are generally not repeated for the sake of brevity. When understanding the technical solutions and other contents of this application, the same or similar terms, concepts, technical solutions and / or application scenario descriptions that are not described in detail later can be referred to their previous relevant detailed descriptions.
[0143] In this application, the descriptions of the various embodiments have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0144] The technical features of the present application 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 the present application.
[0145] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in the above-mentioned storage medium and includes several instructions to cause a terminal device to execute the methods of each embodiment of this application. The above are only preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made based on the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
[0146] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0147] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the appended claims.
Claims
1. A fault detection method for solar streetlights, characterized in that, include: Identify faulty solar streetlights based on historical maintenance data. A fault detection model is constructed based on the historical power transmission data, historical power storage data, and historical electrical parameter change data of the faulty solar street light. The real-time power transmission data, real-time power storage data, and real-time electrical parameter change data of each solar street light are used as inputs to the fault detection model to obtain the fault probability distribution corresponding to each solar street light. The target faulty solar street light is determined based on the fault probability distribution, and the fault type of the target faulty solar street light is determined.
2. The fault detection method for solar streetlights according to claim 1, characterized in that, The fault detection model is constructed based on the historical power transmission data, historical power storage data, and historical electrical parameter change data of the faulty solar street light, specifically including: The time series of each target variable is determined based on the historical power transmission data, historical power storage data, and historical electrical parameter change data of the faulty solar street light. Train a long short-term memory network based on the time series of the target variable, and obtain the target feature vector corresponding to the target variable output by the long short-term memory network; The target feature vector is used as input to construct the fault detection model based on a preset radial basis function network structure.
3. The fault detection method for solar streetlights according to claim 2, characterized in that, The historical power transmission data includes the historical power transmission start time and end time, historical power supply lamp identifiers and historical receiving lamp identifiers, and the historical power transmission value; the historical power storage data includes the daily charging amount, daily discharging amount, remaining power at different times, and number of charge / discharge cycles for each faulty solar street light; the historical electrical parameter change data includes the current data, voltage data, and transmission resistance data between the faulty solar street light and adjacent solar street lights for each faulty solar street light.
4. The fault detection method for solar streetlights according to claim 2, characterized in that, The step of training a long short-term memory network based on the time series data of the target variable and obtaining the target feature vector corresponding to the target variable output by the long short-term memory network specifically includes: The time series of the target variable is divided into a training set, a validation set, and a test set according to a preset ratio; An initial long short-term memory network is obtained by training the training set, and the parameters of the initial long short-term memory network are adjusted by the validation set based on the preset mean squared error loss function, thereby obtaining a trained long short-term memory network. The test set is input into the Long Short-Term Memory network for training to obtain the predicted value of the target variable, and the target feature vector is obtained based on the predicted value of the target variable and the output of the hidden layer of the Long Short-Term Memory network.
5. The fault detection method for solar streetlights according to claim 4, characterized in that, Before obtaining the initial long short-term memory network through the training set, the method further includes: The number of nodes in the input layer of the Long Short-Term Memory network is determined based on the historical power transmission data, the historical power storage data, and the historical electrical parameter change data. Based on the historical power transmission data, the historical power storage data, the historical electrical parameter change data, and expert suggestion data, the number of LSTM layers and the number of hidden units in the Long Short-Term Memory network are defined. The output of the LSTM layer is connected to a fully connected layer to generate the output layer of the Long Short-Term Memory network, and the output dimension of the fully connected layer is set to match the input dimension of the preset radial basis network structure. The network structure of the initial short-term memory network is constructed based on the input layer of the long short-term memory network, the LSTM layer, and the output layer of the long short-term memory network.
6. The fault detection method for solar streetlights according to claim 2, characterized in that, The radial basis function (RBF) network structure includes an input layer, hidden layers, and an output layer. The dimension of the input layer is the same as that of the long short-term memory (LSTM) network. The fault detection model, constructed based on the preset RBF network structure and using the target feature vector as input, is trained using the following method: Cluster analysis is performed on the historical power transmission data, the historical power storage data, and the historical electrical parameter change data, and the cluster center is used as the center of the hidden layer neurons. The width of a hidden layer neuron is determined based on the distance between the centers of multiple hidden layer neurons and the number of hidden layer neurons; the centers and widths of the hidden layer neurons are used to define the hidden layers of a radial basis function network. Using the target feature vector as input, the weights and biases of the output layer are trained based on the least squares method; the weights and biases are used to define the prediction calculation function of the radial basis function network output layer. The fault detection model is constructed using the radial basis function and the prediction calculation function.
7. The fault detection method for solar streetlights according to claim 6, characterized in that, The expression for the radial basis function is: The expression for the prediction calculation function is: W T =[ω1,ω2,…,ω j ,…,oh K ] T Among them, the Let x be the output value of the j-th hidden layer neuron; let x be the output target feature vector; let c be the output value of the j-th hidden layer neuron. j It is the center of the j-th hidden layer neuron; the σ j It is the width of the j-th hidden layer neuron; Let K be the vector of the j-th predicted fault type; K is the number of neurons in the hidden layer; ω j is the weight of the output layer of the j-th hidden layer neuron; b is the bias of the output layer.
8. The fault detection method for solar streetlights according to claim 1, characterized in that, The step of determining the target faulty solar street light based on the fault probability distribution and determining the fault type of the target faulty solar street light specifically includes: The parameter values for each type of fault are determined based on the fault probability distribution, and the parameter values are compared with the fault thresholds for each type of fault. Solar streetlights whose parameter values exceed the fault threshold are identified as target solar streetlights, and the fault type of the target solar streetlights is determined according to the fault probability distribution.
9. A fault detection system for solar streetlights, characterized in that, It includes a processor and a memory; wherein the memory stores a computer program for being loaded by the processor and executed as described in any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions for loading by a processor and executing the fault detection method for solar streetlights as described in any one of claims 1-8.