The sparrow search algorithm SCSSA, which combines sine and cosine and Cauchy mutation, is combined with VMD to optimize its two parameters k and penalty coefficient.

?About the author: A Matlab simulation developer who loves scientific research. He cultivates his mind and improves his technology simultaneously.

For code acquisition, paper reproduction and scientific research simulation cooperation, please send a private message.

Personal homepage: Matlab Research Studio

Personal credo: Investigate things to gain knowledge.

For more complete Matlab code and simulation customization content, click

Intelligent optimization algorithm Neural network prediction Radar communication Wireless sensor Power system

Signal processing Image processing Path planning Cellular automaton Drone

Content introduction

Signal denoising has always been an important research direction in the field of digital signal processing. In practical applications, since signals are affected by various interferences and noises, the signals need to be denoised to improve the quality and reliability of the signals. This article will introduce an algorithm process for optimizing variational mode decomposition SCSSA-VMD to achieve signal denoising based on the fusion of sine-cosine and Cauchy mutation sparrow algorithms.

First, let’s introduce the SCSSA-VMD algorithm. SCSSA-VMD is a signal denoising algorithm based on variational mode decomposition (VMD), which can decompose the signal into a series of intrinsic mode functions (IMF). These IMFs are signal components of different frequencies, and the original signal can be reconstructed by taking a weighted sum of these IMFs. The SCSSA-VMD algorithm adds the constraints of sine and cosine functions in the VMD decomposition process to enhance the stability and accuracy of the decomposition.

Then, let’s introduce the Cauchy mutation sparrow algorithm. The Cauchy mutation sparrow algorithm is an optimization algorithm that searches for the optimal solution by randomly mutating and selecting candidate solutions based on the Cauchy distribution and mutation strategy. The Cauchy distribution has long-tail characteristics, which can prevent the algorithm from falling into the local optimal solution. The mutation strategy can ensure the global search capability of the algorithm.

Next, we will introduce the algorithm process of optimizing SCSSA-VMD by merging sine-cosine and Cauchy mutated sparrow algorithms. First, the signal to be processed is decomposed by SCSSA-VMD to obtain a series of IMFs. Then, the sine and cosine functions are added to the VMD decomposition process to obtain the IMF under the sine and cosine constraints. Next, the Cauchy mutation sparrow algorithm is applied to the weighted sum of IMFs to optimize the quality and reliability of the reconstructed signal. Finally, the denoised signal is obtained by performing a weighted sum of the optimized IMFs.

In summary, the fusion of sine-cosine and Cauchy mutation sparrow algorithm optimized SCSSA-VMD is an effective signal denoising algorithm. It can not only improve the quality and reliability of the signal, but also ensure the global search capability and stability of the algorithm. In practical applications, different parameters and algorithm processes can be selected according to specific circumstances to achieve the best results.

Part of the code

function [u, u_hat, omega] = VMD(signal, alpha, tau, K, DC, init, tol)</code><code>%</code><code>%</code><code>% Input and Parameters:</code><code>% --------------------------</code><code>% signal - the time domain signal ( 1D) to be decomposed</code><code>% alpha - the balancing parameter of the data-fidelity constraint</code><code>% tau - time-step of the dual ascent (pick 0 for noise-slack)</code><code>% K - the number of modes to be recovered</code><code>% DC - true if the first mode is put and kept at DC (0-freq)</code><code>% init - 0 = all omegas start at 0</code><code>% 1 = all omegas start uniformly distributed</code><code>% 2 = all omegas initialized randomly</code><code>% tol - tolerance of convergence criterion; typically around 1e-6</code><code>%</code><code>% Output:</code><code>% -------</code><code>% u - the collection of decomposed modes</code><code>% u_hat - spectra of the modes</code><code>% omega - estimated mode center-frequencies</code><code>%------- --- Preparations</code><code>?</code><code>% Period and sampling frequency of input signal</code><code>save_T = length(signal);</code><code>fs = 1/save_T;</code><code>?</code><code>% extend the signal by mirroring</code><code>T = save_T;</code><code>f_mirror(1:T/2 ) = signal(T/2:-1:1);</code><code>f_mirror(T/2 + 1:3*T/2) = signal;</code><code>f_mirror(3*T /2 + 1:2*T) = signal(T:-1:T/2 + 1);</code><code>f = f_mirror;</code><code>?</code><code> % Time Domain 0 to T (of mirrored signal)</code><code>T = length(f);</code><code>t = (1:T)/T;</code><code>? </code><code>% Spectral Domain discretization</code><code>freqs = t-0.5-1/T;</code><code>?</code><code>% Maximum number of iterations (if not converged yet, then it won't anyway)</code><code>N = 500;</code><code>?</code><code>% For future generalizations: individual alpha for each mode</code><code>Alpha = alpha*ones(1,K);</code><code>?</code><code>% Construct and center f_hat</code><code>f_hat = fftshift((fft(f )));</code><code>f_hat_plus = f_hat;</code><code>f_hat_plus(1:T/2) = 0;</code><code>?</code><code>% matrix keeping track of every iterant // could be discarded for mem</code><code>u_hat_plus = zeros(N, length(freqs), K);</code><code>?</code><code>% Initialization of omega_k</code><code>omega_plus = zeros(N, K);</code><code>switch init</code><code> case 1</code><code> for i = 1:K</code><code> omega_plus(1,i) = (0.5/K)*(i-1);</code><code> end</code><code> case 2</code><code> omega_plus (1,:) = sort(exp(log(fs) + (log(0.5)-log(fs))*rand(1,K)));</code><code> otherwise</code><code> omega_plus(1,:) = 0;</code><code>end</code><code>?</code><code>% if DC mode imposed, set its omega to 0</code><code>if DC</code><code>omega_plus(1,1) = 0;</code><code>end</code><code>?</code><code>% start with empty dual variables</code><code>lambda_hat = zeros(N, length(freqs));</code><code>?</code><code>% other inits</code><code>uDiff = tol + eps; % update step</code><code>n = 1; % loop counter</code><code>sum_uk = 0; % accumulator</code><code>?</code><code>?</code><code>?</code><code>% ----------- Main loop for iterative updates</code><code>?</code><code>?</code><code>? </code><code>?</code><code>while ( uDiff > tol & amp; & amp; n < N ) % not converged and below iterations limit </code><code> </code><code> % update first mode accumulator</code><code> k = 1;</code><code> sum_uk = u_hat_plus(n,:,K) + sum_uk - u_hat_plus(n,:,1);</code> <code> </code><code> % update spectrum of first mode through Wiener filter of residuals</code><code> u_hat_plus(n + 1,:,k) = (f_hat_plus - sum_uk - lambda_hat(n,:) /2)./(1 + Alpha(1,k)*(freqs - omega_plus(n,k)).^2);</code><code> </code><code> % update first omega if not held at 0</code><code> if ~DC</code><code> omega_plus(n + 1,k) = (freqs(T/2 + 1:T)*(abs(u_hat_plus(n + 1, T/2 + 1:T, k)).^2)')/sum(abs(u_hat_plus(n + 1,T/2 + 1:T,k)).^2);</code><code> end</code><code> </code><code> % update of any other mode</code><code> for k=2:K</code><code> </code><code> % accumulator</code><code> sum_uk = u_hat_plus(n + 1,:,k-1) + sum_uk - u_hat_plus(n,:,k);</code><code> </code><code> % mode spectrum</code><code> u_hat_plus(n + 1,:,k) = (f_hat_plus - sum_uk - lambda_hat(n,:)/2)./(1 + Alpha(1,k)*(freqs - omega_plus( n,k)).^2);</code><code> </code><code> % center frequencies</code><code> omega_plus(n + 1,k) = (freqs(T/2 + 1:T)*(abs(u_hat_plus(n + 1, T/2 + 1:T, k)).^2)')/sum(abs(u_hat_plus(n + 1,T/2 + 1:T, k)).^2);</code><code> </code><code> end</code><code> </code><code> % Dual ascent</code><code> lambda_hat(n + 1,:) = lambda_hat(n,:) + tau*(sum(u_hat_plus(n + 1,:,:),3) - f_hat_plus);</code><code> </code><code> % loop counter</code><code> n = n + 1;</code><code> </code><code> % converged yet?</code><code> uDiff = eps;</code><code> for i=1:K</code><code> uDiff = uDiff + 1/T*(u_hat_plus(n,:,i)-u_hat_plus(n-1,:,i))*conj((u_hat_plus(n ,:,i)-u_hat_plus(n-1,:,i)))';</code><code> end</code><code> uDiff = abs(uDiff);</code><code> </code><code>end</code><code>?</code><code>?</code><code>%------ Postprocessing and cleanup</code><code>?</code><code>?</code><code>% discard empty space if converged early</code><code>N = min(N,n);</code><code>omega = omega_plus(1:N ,:);</code><code>?</code><code>% Signal reconstruction</code><code>u_hat = zeros(T, K);</code><code>u_hat((T/ 2 + 1):T,:) = squeeze(u_hat_plus(N,(T/2 + 1):T,:));</code><code>u_hat((T/2 + 1):-1: 2,:) = squeeze(conj(u_hat_plus(N,(T/2 + 1):T,:)));</code><code>u_hat(1,:) = conj(u_hat(end,:) );</code><code>?</code><code>u = zeros(K,length(t));</code><code>?</code><code>for k = 1:K </code><code> u(k,:)=real(ifft(ifftshift(u_hat(:,k))));</code><code>end</code><code>?</code> <code>% remove mirror part</code><code>u = u(:,T/4 + 1:3*T/4);</code><code>?</code><code>% recompute spectrum</code><code>clear u_hat;</code><code>for k = 1:K</code><code> u_hat(:,k)=fftshift(fft(u(k,:))) ';</code><code>end</code><code>?</code><code>end

Operation results

References

[1] Wei Yonghe, Gong Junyu. Rolling bearing fault diagnosis based on CNN-LSTM-Attention [J]. Journal of Shenyang Ligong University, 2022(004):041.

[2] Li Ailian, Quan Lingxiang, Cui Guimei, et al. Sparrow search algorithm integrating sine, cosine and Cauchy mutation [J]. Computer Engineering and Applications, 2022, 58(3):9.DOI:10.3778/j.issn .1002-8331.2106-0148.

[3] Ran Limin, Li Jianwei, Du Juan, et al. Research on ground penetrating radar signal denoising based on variational mode decomposition algorithm [J]. World Geology, 2022(001):041.

Some theories are quoted from online literature. If there is any infringement, please contact the blogger to delete it
Follow me to receive massive matlab e-books and mathematical modeling materials

Private message complete code, paper reproduction, journal cooperation, paper tutoring and scientific research simulation customization

1 Improvements and applications of various intelligent optimization algorithms
Production scheduling, economic scheduling, assembly line scheduling, charging optimization, workshop scheduling, departure optimization, reservoir scheduling, three-dimensional packing, logistics location selection, cargo space optimization, bus scheduling optimization, charging pile layout optimization, workshop layout optimization, Container ship stowage optimization, water pump combination optimization, medical resource allocation optimization, facility layout optimization, visible area base station and drone site selection optimization
2 Machine learning and deep learning
Convolutional neural network (CNN), LSTM, support vector machine (SVM), least squares support vector machine (LSSVM), extreme learning machine (ELM), kernel extreme learning machine (KELM), BP, RBF, width Learning, DBN, RF, RBF, DELM, XGBOOST, TCN realize wind power prediction, photovoltaic prediction, battery life prediction, radiation source identification, traffic flow prediction, load prediction, stock price prediction, PM2.5 concentration prediction, battery health status prediction, water body Optical parameter inversion, NLOS signal identification, accurate subway parking prediction, transformer fault diagnosis
2. Image processing
Image recognition, image segmentation, image detection, image hiding, image registration, image splicing, image fusion, image enhancement, image compressed sensing
3 Path planning
Traveling salesman problem (TSP), vehicle routing problem (VRP, MVRP, CVRP, VRPTW, etc.), UAV three-dimensional path planning, UAV collaboration, UAV formation, robot path planning, raster map path planning , multimodal transportation problems, vehicle collaborative UAV path planning, antenna linear array distribution optimization, workshop layout optimization
4 UAV applications
UAV path planning, UAV control, UAV formation, UAV collaboration, UAV task allocation, and online optimization of UAV safe communication trajectories
5 Wireless sensor positioning and layout
Sensor deployment optimization, communication protocol optimization, routing optimization, target positioning optimization, Dv-Hop positioning optimization, Leach protocol optimization, WSN coverage optimization, multicast optimization, RSSI positioning optimization
6 Signal processing
Signal recognition, signal encryption, signal denoising, signal enhancement, radar signal processing, signal watermark embedding and extraction, electromyographic signal, EEG signal, signal timing optimization
7 Power system aspects
Microgrid optimization, reactive power optimization, distribution network reconstruction, energy storage configuration
8 Cellular Automata
Traffic flow, crowd evacuation, virus spread, crystal growth
9 Radar aspect
Kalman filter tracking, track correlation, track fusion

The knowledge points of the article match the official knowledge files, and you can further learn related knowledge. Algorithm skill tree Home page Overview 57307 people are learning the system