A Flexible Sensor Signal Decoupling Method and System Based on Improved SSA-BP Algorithm
Through the improved SSA-BP algorithm, the problems of high computational complexity and long training time in signal decoupling of BP neural network algorithm are solved, achieving more efficient and accurate signal decoupling effect.
Patent Information
- Application Number
- CN202411676017.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2044-11-22
AI Technical Summary
The existing BP neural network algorithms have problems such as high computational complexity, easy to fall into local optimality, long training time and sensitivity to initial weights in the decoupling of sensor signals, and it is difficult to effectively decouple complex multi-channel and nonlinear signals.
The improved SSA-BP algorithm is used to determine the weight and threshold of the network model through the improved Sparrow Search algorithm (SSA), and the improved BP neural network algorithm is used for training to build a signal decoupling model, reducing noise interference and improving signal detection accuracy.
It reduces the computational complexity, shortens the training time, improves the accuracy and efficiency of signal decoupling, and enhances the practicality of sensor signal detection.
Smart Images

Figure CN119179885B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of sensor signal processing, and particularly relates to a flexible sensor signal decoupling method and system based on an improved SSA-BP algorithm. Background Art
[0002] In modern electronic and sensor technologies, since flexible sensors are a new type of sensor technology with high flexibility and scalability, and can work under various conditions of bending, stretching, and deformation, they are widely used in fields such as wearable devices, intelligent textiles, environmental perception, and health monitoring systems. However, in practical applications, the output signals of flexible sensors are often affected by various interferences and noises, and may simultaneously sense the influences of multiple physical quantities. These signals are usually the superposition of the output signals of multiple sensors, containing the mixed effects of multiple information sources. To accurately interpret the independent signals of each sensor, the signal decoupling problem must be solved. Although traditional signal decoupling methods (such as filters, statistical methods, etc.) are effective in some cases, they often show limitations when dealing with complex multi-channel and non-linear signals. These methods usually require manual adjustment and optimization for specific signals, with low efficiency and difficulty in adapting to changing application environments.
[0003] According to current research results, the BP neural network algorithm is an effective artificial neural network model that can be applied to the sensor signal decoupling problem; however, the BP neural network algorithm has the following deficiencies: (1) high computational complexity; (2) prone to falling into local optima; (3) long training time; (4) sensitive to initial weights; therefore, the BP neural network algorithm still has some defects, making it often unable to achieve ideal results when performing signal decoupling of sensors. Summary of the Invention
[0004] The present invention provides a flexible sensor signal decoupling method and system based on an improved SSA-BP algorithm, which is used to solve at least one of the above technical problems existing in the existing BP neural network algorithm, and can reduce the computational complexity, shorten the training time, and effectively decouple the signals at the same time.
[0005] In a first aspect, the present invention provides a flexible sensor signal decoupling method based on an improved SSA-BP algorithm, including:
[0006] Using the improved SSA algorithm to determine the weights and thresholds of a pre-constructed network model;
[0007] According to the weights and the thresholds, using the improved BP neural network algorithm to train the network model to obtain a final signal decoupling model;
[0008] Obtain the electrical signal data of the flexible sensor, and construct an initial signal sequence according to the electrical signal data;
[0009] Input the initial signal sequence into the signal decoupling model, and the signal decoupling model outputs a decoupling result.
[0010] In a second aspect, the present invention provides a flexible sensor signal decoupling system based on an improved SSA-BP algorithm, including:
[0011] A determination module configured to determine the weights and thresholds of a pre-constructed network model by using an improved SSA algorithm;
[0012] A training module configured to train the network model by using an improved BP neural network algorithm according to the weights and the thresholds to obtain a final signal decoupling model;
[0013] A construction module configured to obtain the electrical signal data of the flexible sensor and construct an initial signal sequence according to the electrical signal data;
[0014] An output module configured to input the initial signal sequence into the signal decoupling model, and the signal decoupling model outputs a decoupling result.
[0015] In a third aspect, there is provided an electronic device, which includes: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the steps of the flexible sensor signal decoupling method based on the improved SSA-BP algorithm according to any embodiment of the present invention.
[0016] In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the program instructions are executed by a processor, the processor is enabled to execute the steps of the flexible sensor signal decoupling method based on the improved SSA-BP algorithm according to any embodiment of the present invention.
[0017] The flexible sensor signal decoupling method and system based on the improved SSA-BP algorithm of the present application obtain the electrical signal data of the sensor and construct an initial sequence of the signal; use the improved sparrow search algorithm (SSA) to obtain accurate weights and thresholds; enable the calculated weights and thresholds to construct a network model through the improved BP neural network algorithm and train the BP neural network model; apply the trained network model to decouple the signal. The present application reduces the interference of noise signals, improves the signal detection accuracy and accuracy of the sensor, enhances the practicability, and is beneficial to the application of detecting various required signals. Description of the Drawings
[0018] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0019] Figure 1 The flowchart of a flexible sensor signal decoupling method based on an improved SSA-BP algorithm provided by an embodiment of the present invention;
[0020] Figure 2 The structural block diagram of a flexible sensor signal decoupling system based on an improved SSA-BP algorithm provided by an embodiment of the present invention;
[0021] Figure 3 It is a schematic structural diagram of an electronic device provided by an embodiment of the present invention. Detailed implementation manners
[0022] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts fall within the scope of protection of the present invention.
[0023] Please refer to Figure 1 , which shows the flowchart of a flexible sensor signal decoupling method based on an improved SSA-BP algorithm of the present application.
[0024] As Figure 1 shown, the flexible sensor signal decoupling method based on the improved SSA-BP algorithm specifically includes the following steps:
[0025] Step S101, use the improved SSA algorithm to determine the weights and thresholds of the pre-constructed network model.
[0026] In this step, the discoverer fitness provides the overall search range and direction for the sparrow population. The solutions of discoverers with high fitness are of better quality, and the solutions of these individuals can be used as search targets to guide other individuals to approach high-quality regions. Discoverers with high fitness can accelerate the convergence process of the algorithm. The high-quality solutions provided by discoverers provide a good direction for the algorithm, thereby reducing ineffective searches and improving the convergence speed. The fitness values of all sparrows are expressed as:
[0027] ,
[0028] where, is the fitness value, is the population of sparrows, n represents the dimension of the variables of the problem to be optimized, and k represents the number of sparrows;
[0029] The discoverers with better fitness values will obtain food first during the search process. In addition, since the discoverers are responsible for finding food for the entire sparrow population and providing the foraging direction for all joiners. Therefore, the discoverers can have a larger foraging search range than the joiners.
[0030] Specifically, during each iteration, the position of the discoverer is updated, and the expression is:
[0031] ,
[0032] In the formula, is the position of the next discoverer in the global search, is the position of the current discoverer, is the current iteration number, is a random number, is the maximum number of iterations, is a safety value belonging to [0.5, 1], is a warning value belonging to [0, 1], is a 1×d matrix, is a random number obeying the normal distribution, is the dimension of the signal, is the signal quantity of the same dimension;
[0033] When , it means that there are no predators around the discoverer at this time, and it is in a safe environment, and the discoverer can continue to expand the search range. When , it means that there are predators around the discoverer at this time, and it is in a dangerous state, and the discoverer will issue an alarm to the sparrow population and quickly fly to other safe places to find food.
[0034] The normal folding mapping hybrid search strategy is introduced. In the standard SSA, relying solely on global search, the accuracy of the obtained solution is not high, and the convergence speed is slow, and it is easy to fall into local optimum. In order to improve the accuracy and convergence speed and avoid falling into local optimum, the normal folding mapping hybrid search strategy is introduced. The specific content refers to: performing normal folding mapping hybrid search and combining the solutions of the global search and local search of the SSA algorithm to obtain a new solution. The normal folding mapping hybrid search includes normal folding mapping local search, and the expression is:
[0035] ,
[0036] In the formula, is the current discoverer position obtained by normal folding mapping local search, is a random variable following a normal distribution, is the local worst solution, is the previous discoverer position of normal folding mapping local search, is the weight of the local optimal solution, is the local optimal solution, is the weight function of the first random body in the population, is the first random body in the population, is the weight function of the second random body in the population, is the second random body in the population;
[0037] ,
[0038] wherein, is the weight function, is the first dynamic factor, is the second dynamic factor, is the first constant, is the second constant, is the third constant, is the current iteration number;
[0039] The normal folding mapping hybrid search includes normal folding mapping local neighborhood search, and the expression is:
[0040] ,
[0041] wherein, is the adjustment factor, is the number of signals, is the position of the next discoverer in the global search, is the current discoverer position obtained by normal folding mapping local search, is the next discoverer position obtained by normal folding mapping local search, is the local optimal solution of the current individual, is the search precision difference factor;
[0042] Combining the new solution obtained by normal folding mapping local search, the position of the sparrow discoverer is updated by weighted average, and the expression is:
[0043] ,
[0044] ,
[0045] wherein, is the position of the next discoverer in the normal folding mapping hybrid search, The weight vector 1 for the trend of the current individual moving towards the optimal individual The position of the next discoverer in the global search The search weight The position of the next discoverer obtained by normal folding mapping local search The weight vector 1 for the trend of the current individual moving towards the optimal individual The constant for the degree to which the current individual follows the optimal individual The number of iterations The maximum number of iterations The random number conforming to the normal distribution The lower limit of the search range;
[0046] During the process of searching for food, the joiner will constantly monitor the status of the discoverer. Once they find that the discoverer has found better food, the joiner will fly to compete for the discoverer's food. If the joiner wins, the joiner will obtain the discoverer's food; otherwise, it will continue to update its position. The position update expression of the joiner is:
[0047] ,
[0048] In the formula, The position of the next joiner The position of the worst joiner in the global The position of the current joiner The optimal position occupied by the next discoverer A 1×d matrix The transpose of matrix A A 1×d row vector, where d is a positive integer;
[0049] Suppose that sparrows that can sense danger account for one-tenth of the total population. This part of the sparrows is called the vigilant ones. The initial positions of the vigilant ones are randomly generated. The position update expression of the vigilant ones is:
[0050] ,
[0051] In the formula, The position of the next vigilant one The position of the current vigilant one The position of the global optimal solution The step size control parameter The fitness value of the i-th sparrow The global optimal fitness value The random number The position of the global worst solution The global worst fitness value is a constant;
[0052] Set the position of the sparrows as the weights and thresholds of the neural network, and define the fitness function as the error function of the neural network. The expression is:
[0053] ,
[0054] In the formula, is the set of positions of each sparrow, is the set of weights of the hidden layer and the thresholds of the hidden layer, is the weight of the hidden layer, is the threshold of the hidden layer, is the fitness function, is the fitness coefficient, is the true output value, is the output value of the network, is the size of the sample.
[0055] Step S102: According to the weights and the thresholds, train the network model by using an improved BP neural network algorithm to obtain a final signal decoupling model.
[0056] In this step, the input layer data is x, and the input data has multi-dimensional complexity. If the obtained data is directly input into the input layer of the BP neural network, the training time will be too long, and the stability of the trained model is low. Therefore, adding gradient consistency normalization processing can improve the training rate and the stability of the model, making the gradient update during the training process more consistent. First, perform gradient consistency normalization processing on the input data. The expression is:
[0057] ,
[0058] ,
[0059] In the formula, is the data value after ordinary normalization, is the original input data, is the time constant, is the input value after gradient consistency normalization processing, is the gradient scaling factor, is the bias term, is the maximum value in the input data, is the gradient scaling rate, is the gradient scaling step size, is the minimum value in the input data, is the preset parameter, is the natural constant, is the current iteration number;
[0060] Since the initial thresholds and weights of the BP neural network are randomly selected, training with a large data sample will consume a large amount of time and more computing resources, and it is easy to fall into local extrema. Therefore, an improved SSA algorithm is adopted to initialize the weights and bias terms in the BP neural network according to the weights and thresholds of the network model, and perform weighted sum calculations. Among them, the weights and bias terms are respectively denoted as , , and , and the expression for the weighted sum calculation is:
[0061] ,
[0062] In the formula, is the input of the th layer, is the weight between the th layer neuron i and the th layer neuron j, is the activation value of the th layer neuron j, is the bias term of the th layer neuron i;
[0063] Activate the forward propagation, perform loss calculation, obtain the expected values of the outputs of each layer and the loss function, and calculate the loss between the network output and the actual target value. Among them, the loss function has the following expression:
[0064] ,
[0065] In the formula, is to take the average of the total error value, is the true value, is the network prediction value;
[0066] In backpropagation, the weights and biases in the neural network are the parameters of the training model. The chain rule is used to calculate the loss function, and the gradient value of each parameter is calculated according to the loss function; the error of the output layer reflects the difference between the predicted value of each output neuron and the actual target value. For the calculation of the output layer error, it is first necessary to determine the gap between the activation value of the network output and the true label. For each output neuron k, its output error is:
[0067] ,
[0068] In the formula, is the activation value of the kth neuron in the output layer, is the actual target value of the k-th neuron, is the derivative of the activation function in the output layer;
[0069] The calculation of the hidden layer error needs to use the output layer error for backpropagation to pass the error back to the previous layer. For the i-th neuron in the hidden layer, its error is obtained by weighted sum, where the weighting factor comes from the error of the next layer. The expression for calculating the hidden layer error is
[0070] ,
[0071] In the formula, is the error of the i-th neuron in the layer, is the error of the j-th neuron in the layer, is the weight between the i-th neuron in the layer and the j-th neuron in the layer, is the derivative of the activation function of the layer;
[0072] According to the calculated gradient, the weights and biases of the neural network are updated by the gradient descent method. The expression is:
[0073] ,
[0074] ,
[0075] In the formula, is the updated weight of the layer, is the weight of the layer, is the learning rate, is the updated bias term of the layer, is the bias term of the layer;
[0076] If the network does not reach the set number of iterations, the processes of forward propagation, loss calculation, backpropagation, and weight update will be repeated until the loss function converges or the set number of iterations is reached.
[0077] Step S103: Obtain the electrical signal data of the flexible sensor and construct an initial signal sequence according to the electrical signal data.
[0078] In this step, the electrical signal data of the flexible sensor is obtained according to the preset multi-dimensional complex cross-linked signal acquisition strategy to obtain a multi-dimensional signal matrix. Among them, the expression of the multi-dimensional complex cross-linked signal acquisition strategy is:
[0079] ,
[0080] wherein, is a multi-dimensional signal matrix, is a set of signals of the same dimension, is a signal acquisition time constant, is a set of signals of the i-th dimension, is a signal offset coefficient, is the dimension, is the offset of the i-th signal, is the signal acquisition time constant minus one, is a frequency-domain signal matrix, is the i-th dimensional signal vector, is the j-th dimensional signal vector;
[0081] Perform weighted processing on the multi-dimensional signal matrix, and perform Fourier transform on the processed multi-dimensional signal matrix. The expression is:
[0082] ,
[0083] wherein, is the value after Fourier transform of the i-th signal, is the k-th signal value, is the (k - 1)-th signal value, is a multi-dimensional signal matrix, is the weighting matrix of the i-th signal, is the frequency-domain system matrix of the i-th signal, is the frequency-domain noise matrix of the i-th signal, is the inverse Fourier transform;
[0084] Construct an initial signal sequence based on the signal data after Fourier transform. The expression of the initial signal sequence is:
[0085] ,
[0086] wherein, is the initial signal sequence of the signal data, is the first acquired data of the first dimension, is the second acquired data of the first dimension, is the j-th acquired data of the first dimension, is the first acquired data of the second dimension, is the second acquired data of the second dimension, is the j-th acquired data of the second dimension, is the first acquired data of the i-th dimension, is the second acquisition data for the i-th dimension, is the j-th acquisition data for the i-th dimension.
[0087] Step S104: Input the initial signal sequence into the signal decoupling model, and the signal decoupling model outputs a decoupling result.
[0088] In summary, the method of the present application obtains the electrical signal data of the sensor, constructs the initial sequence of the signal, uses the improved Sparrow Search Algorithm (SSA) to obtain accurate weights and thresholds, enables the calculated weights and thresholds to construct a network model through the improved BP neural network algorithm, trains the BP neural network model, and applies the trained network model to decouple the signal. It reduces the interference of noise signals, improves the signal detection accuracy and accuracy of the sensor, enhances the practicability, and is conducive to being applied to detect various required signals.
[0089] Please refer to Figure 2 , which shows the structural block diagram of a flexible sensor signal decoupling system based on the improved SSA-BP algorithm of the present application.
[0090] As Figure 2 shown, the flexible sensor signal decoupling system 200 includes a determination module 210, a training module 220, a construction module 230, and an output module 240.
[0091] Among them, the determination module 210 is configured to determine the weights and thresholds of a pre-constructed network model by using the improved SSA algorithm; the training module 220 is configured to train the network model by using the improved BP neural network algorithm according to the weights and the thresholds to obtain a final signal decoupling model; the construction module 230 is configured to obtain the electrical signal data of the flexible sensor and construct an initial signal sequence according to the electrical signal data; the output module 240 is configured to input the initial signal sequence into the signal decoupling model, and the signal decoupling model outputs a decoupling result.
[0092] It should be understood that Figure 2 the various modules recorded in Figure 1 correspond to the respective steps in the method described with reference to Figure 2 . Therefore, the operations, features, and corresponding technical effects described above for the method also apply to
[0093] the various modules in
[0094] As an implementation manner, the computer-readable storage medium of the present invention stores computer-executable instructions, and the computer-executable instructions are set as follows:
[0095] Using an improved SSA algorithm to determine the weights and thresholds of a pre-constructed network model;
[0096] According to the weights and the thresholds, using an improved BP neural network algorithm to train the network model to obtain a final signal decoupling model;
[0097] Obtaining the electrical signal data of a flexible sensor, and constructing an initial signal sequence according to the electrical signal data;
[0098] Inputting the initial signal sequence into the signal decoupling model, and the signal decoupling model outputs a decoupling result.
[0099] The computer-readable storage medium may include a storage program area and a storage data area. Among them, the storage program area may store an operating system and application programs required for at least one function; the storage data area may store data created according to the use of the flexible sensor signal decoupling system based on the improved SSA-BP algorithm, etc. In addition, the computer-readable storage medium may include a high-speed random access memory, and may also include a memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some embodiments, the computer-readable storage medium may optionally include a memory remotely provided with respect to the processor, and these remote memories may be connected to the flexible sensor signal decoupling system based on the improved SSA-BP algorithm through a network. Examples of the above networks include but are not limited to the Internet, enterprise intranets, local area networks, mobile communication networks, and combinations thereof.
[0100] Figure 3 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention, as Figure 3 shown, the device includes: a processor 310 and a memory 320. The electronic device may further include: an input device 330 and an output device 340. The processor 310, the memory 320, the input device 330, and the output device 340 may be connected through a bus or other means, Figure 3 taking the connection through the bus as an example. The memory 320 is the above-mentioned computer-readable storage medium. The processor 310 executes various functional applications and data processing of the server by running non-volatile software programs, instructions, and modules stored in the memory 320, that is, implements the flexible sensor signal decoupling method based on the improved SSA-BP algorithm in the above method embodiment. The input device 330 may receive input digital or character information, and generate key signal inputs related to the user settings and function controls of the flexible sensor signal decoupling system based on the improved SSA-BP algorithm. The output device 340 may include a display device such as a display screen.
[0101] The above-mentioned electronic device can execute the method provided by the embodiments of the present invention, and has the corresponding functional modules and beneficial effects for executing the method. For the technical details not described in detail in this embodiment, reference can be made to the method provided by the embodiments of the present invention.
[0102] As an implementation manner, the above-mentioned electronic device is applied to a flexible sensor signal decoupling system based on an improved SSA-BP algorithm and is used for a client, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to:
[0103] Determine the weights and thresholds of a pre-constructed network model by using an improved SSA algorithm;
[0104] Train the network model by using an improved BP neural network algorithm according to the weights and the thresholds to obtain a final signal decoupling model;
[0105] Obtain the electrical signal data of the flexible sensor and construct an initial signal sequence according to the electrical signal data;
[0106] Input the initial signal sequence into the signal decoupling model, and the signal decoupling model outputs a decoupling result.
[0107] Through the description of the above implementation manners, those skilled in the art can clearly understand that each implementation manner can be realized by means of software plus a necessary general hardware platform, and of course, it can also be realized by hardware. Based on such an understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiments.
[0108] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of each embodiment of the present invention.
Claims
1. A flexible sensor signal decoupling method based on an improved SSA-BP algorithm, characterized in that: include: The improved SSA algorithm is used to determine the weight and threshold of the pre-constructed network model, wherein the improved SSA algorithm is used to determine the weight and threshold of the pre-constructed network model, including: In each iteration, the position of the finder is updated, and the expression is: , In the formula, is the position of the next finder in the global search, is the current finder's position, is the current iteration number, is a random number, is the maximum number of iterations, is a safe value belonging to [0.5,1], is the warning value belonging to [0,1], is a 1×d matrix, is a random number that follows a normal distribution, is the dimension of the signal, is the signal quantity at the same latitude; A normal folding mapping hybrid search is performed, and a new solution is obtained by combining the global search and local search solutions of the SSA algorithm. The normal folding mapping hybrid search includes a normal folding mapping local search, and the expression is: , In the formula, is the current finder position obtained by local search of the normal folding map, is a random quantity that follows a normal distribution, is the local worst solution, The previous finder position for the local search of the normal fold map, is the weight of the local optimal solution, is the local optimal solution, is the weight function of the random body of the population, is a random entity in the population, is the weight function of the second random entity in the population, is the random body 2 in the population; , In the formula, is the weight function, is the dynamic factor 1, is the dynamic factor 2, is a constant of one, is the constant 2, is the constant three, is the current iteration number; The normal folding mapping hybrid search includes a normal folding mapping local area search, and the expression is: , In the formula, is the adjustment factor, is the number of signals, is the position of the next finder in the global search, is the current finder position obtained by local search of the normal folding map, is the next finder position obtained by local search of the normal folding map, is the local optimal solution of the current individual, is the search precision difference factor; Combined with the new solution obtained by local search of normal folding mapping, the position of the sparrow finder is updated by weighted average, and the expression is: , , In the formula, is the position of the next finder in the normal fold map hybrid search, is the weight vector of the trend of the current individual moving toward the optimal individual, is the position of the next finder in the global search, is the search weight, is the next finder position obtained by local search of the normal folding map, is the weight vector of the trend of the current individual moving toward the optimal individual, is a constant indicating the degree to which the current individual follows the optimal individual, is the number of iterations, is the maximum number of iterations, is a random number that conforms to the normal distribution. is the lower limit of the search range; In the process of searching for food, the joiners will always monitor the status of the discoverers. Once they find that the discoverers have found better food, the joiners will fly to compete for the finders' food. If the joiner wins, the joiner gets the finders' food, otherwise it will continue to update its position. The position update expression of the joiner is: , In the formula, The position of the next joiner, is the global worst joiner position, is the position of the current joiner, The optimal position for the next discoverer to occupy, is a 1×d matrix, is the transpose of matrix A, is a 1×d row vector, where d is a positive integer; Assume that sparrows that are aware of danger account for one tenth of the total population. These sparrows are called alerters. The initial position of the alerter is randomly generated. The expression for updating the position of the alerter is: , In the formula, For the next sentinel's position, is the current position of the sentinel, is the position of the global optimal solution, is the step size control parameter, is the fitness value of the i-th sparrow, is the global optimal fitness value, is a random number, is the position of the global worst solution, is the global worst fitness value, is a constant; The position of the sparrow is set as the weight and threshold of the neural network, and the fitness function is defined as the error function of the neural network, expressed as: , In the formula, is the position set of each sparrow, is the set of hidden layer weights and hidden layer thresholds, is the weight of the hidden layer, is the threshold of the hidden layer, is the fitness function, is the fitness coefficient, is the true output value, is the output value of the network, is the sample size; According to the weight and the threshold, the network model is trained using an improved BP neural network algorithm to obtain a final signal decoupling model; Acquiring electrical signal data of the flexible sensor, and constructing an initial signal sequence according to the electrical signal data; The initial signal sequence is input into the signal decoupling model, and the signal decoupling model outputs a decoupling result.
2. According to claim 1, a flexible sensor signal decoupling method based on an improved SSA-BP algorithm is characterized in that: The method of training the network model using an improved BP neural network algorithm according to the weight and the threshold to obtain a final signal decoupling model includes: The input data is normalized for gradient consistency, and the expression is: , , In the formula, is the data value after normalization. is the original input data, is the time constant, is the input value after gradient consistency normalization, is the gradient scaling factor, is the bias term, is the maximum value of the input data. is the gradient scaling rate, is the gradient scaling step size, is the minimum value in the input data. is the preset parameter, is a natural constant, is the current iteration number; The improved SSA algorithm is used to initialize the weights and bias terms in the BP neural network according to the weights and thresholds of the network model, and perform weighted sum calculations, where the weights and bias terms are recorded as , , the expression for weighted sum calculation is: , In the formula, For the l The input of the layer, For the l The neurons in layer i and l -1 weights between neurons in layer j, For the l -1 layer neuron j’s activation value, For the l The bias term of neuron i in layer; Activate forward propagation, perform loss calculation, obtain the expected value of each layer output and loss function, and calculate the loss between the network output and the actual target value. The loss function The expression is: , In the formula, To average the total error values, is the true value, is the network prediction value; In back propagation, the weights and biases in the neural network are the parameters of the training model. The loss function is calculated using the chain rule, and the gradient value of each parameter is calculated based on the loss function. According to the calculated gradient, the weights and biases of the neural network are updated using the gradient descent method, and the expression is: , , In the formula, For the l The updated weights of the layer, For the l The weight of the layer, is the learning rate, For the l The bias term after the layer update, For the l The bias term of the layer; If the network does not reach the set number of iterations, the process of forward propagation, loss calculation, backpropagation, and weight update will be repeated until the loss function converges or the set number of iterations is reached.
3. According to claim 1, a flexible sensor signal decoupling method based on an improved SSA-BP algorithm is characterized in that: The step of acquiring electrical signal data of the flexible sensor and constructing an initial signal sequence according to the electrical signal data includes: The electrical signal data of the flexible sensor is obtained according to a preset multi-dimensional complex cross-linking signal acquisition strategy to obtain a multi-dimensional signal matrix, wherein the expression of the multi-dimensional complex cross-linking signal acquisition strategy is: , In the formula, is a multidimensional signal matrix, is a set of signals of the same dimension, is the signal acquisition time constant, is the signal set of the i-th dimension, is the signal deviation coefficient, is the dimension, is the offset of the ith signal, is the signal acquisition time constant minus one, is the frequency domain signal matrix, is the i-th dimension signal vector, is the j-th dimension signal vector; The multidimensional signal matrix is weighted and the processed multidimensional signal matrix is Fourier transformed, and the expression is: , In the formula, is the value of the Fourier transform of the ith signal, For the k signal value, For the k-1 signal value, is a multidimensional signal matrix, is the weighting matrix of the ith signal, is the frequency domain system matrix of the ith signal, is the frequency domain noise matrix of the ith signal, is the inverse Fourier transform; The initial signal sequence is constructed according to the signal data after Fourier transformation. The expression of the initial signal sequence is: , In the formula, is the initial signal sequence of the signal data, Collect data for the jth item in the i-th dimension.
4. According to claim 1, a flexible sensor signal decoupling method based on an improved SSA-BP algorithm is characterized in that: The electrical signal data includes compression deformation signal data, tension deformation signal data and twist deformation signal data.
5. A flexible sensor signal decoupling system based on an improved SSA-BP algorithm, characterized in that: include: A determination module is configured to use an improved SSA algorithm to determine the weight and threshold of the pre-constructed network model, wherein the use of the improved SSA algorithm to determine the weight and threshold of the pre-constructed network model includes: In each iteration, the position of the finder is updated, and the expression is: , In the formula, is the position of the next finder in the global search, is the current finder's position, is the current iteration number, is a random number, is the maximum number of iterations, is a safe value belonging to [0.5,1], is the warning value belonging to [0,1], is a 1×d matrix, is a random number that follows a normal distribution, is the dimension of the signal, is the signal quantity at the same latitude; A normal folding mapping hybrid search is performed, and a new solution is obtained by combining the global search and local search solutions of the SSA algorithm. The normal folding mapping hybrid search includes a normal folding mapping local search, and the expression is: , In the formula, is the current finder position obtained by local search of the normal folding map, is a random quantity that follows a normal distribution, is the local worst solution, The previous finder position for the local search of the normal fold map, is the weight of the local optimal solution, is the local optimal solution, is the weight function of the random body of the population, is a random entity in the population, is the weight function of the second random entity in the population, is the random body 2 in the population; , In the formula, is the weight function, is the dynamic factor 1, is the dynamic factor 2, is a constant of one, is the constant 2, is the constant three, is the current iteration number; The normal folding mapping hybrid search includes a normal folding mapping local area search, and the expression is: , In the formula, is the adjustment factor, is the number of signals, is the position of the next finder in the global search, is the current finder position obtained by local search of the normal folding map, is the next finder position obtained by local search of the normal folding map, is the local optimal solution of the current individual, is the search precision difference factor; Combined with the new solution obtained by local search of normal folding mapping, the position of the sparrow finder is updated by weighted average, and the expression is: , , In the formula, is the position of the next finder in the normal fold map hybrid search, is the weight vector of the trend of the current individual moving toward the optimal individual, is the position of the next finder in the global search, is the search weight, is the next finder position obtained by local search of the normal folding map, is the weight vector of the trend of the current individual moving toward the optimal individual, is a constant indicating the degree to which the current individual follows the optimal individual, is the number of iterations, is the maximum number of iterations, is a random number that conforms to the normal distribution. is the lower limit of the search range; In the process of searching for food, the joiners will always monitor the status of the discoverers. Once they find that the discoverers have found better food, the joiners will fly to compete for the finders' food. If the joiner wins, the joiner gets the finders' food, otherwise it will continue to update its position. The position update expression of the joiner is: , In the formula, The position of the next joiner, is the global worst joiner position, is the position of the current joiner, The optimal position for the next discoverer to occupy, is a 1×d matrix, is the transpose of matrix A, is a 1×d row vector, where d is a positive integer; Assume that sparrows that are aware of danger account for one tenth of the total population. These sparrows are called alerters. The initial position of the alerter is randomly generated. The expression for updating the position of the alerter is: , In the formula, For the next sentinel's position, is the current position of the sentinel, is the position of the global optimal solution, is the step size control parameter, is the fitness value of the i-th sparrow, is the global optimal fitness value, is a random number, is the position of the global worst solution, is the global worst fitness value, is a constant; The position of the sparrow is set as the weight and threshold of the neural network, and the fitness function is defined as the error function of the neural network, expressed as: , In the formula, is the position set of each sparrow, is the set of hidden layer weights and hidden layer thresholds, is the weight of the hidden layer, is the threshold of the hidden layer, is the fitness function, is the fitness coefficient, is the true output value, is the output value of the network, is the sample size; A training module is configured to train the network model using an improved BP neural network algorithm according to the weight and the threshold to obtain a final signal decoupling model; A construction module configured to obtain electrical signal data of the flexible sensor and construct an initial signal sequence according to the electrical signal data; The output module is configured to input the initial signal sequence into the signal decoupling model, and the signal decoupling model outputs a decoupling result.
6. An electronic device, characterized in that: include: At least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in any one of claims 1 to 4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Indoor three-dimensional positioning method for optimizing GRNN based on improved sparrow algorithm
CN114690117A
Air quality index prediction method based on improved sparrow search algorithm optimization
CN115374689A