[Signal processing] signal separation based on matlab ICA algorithm [including Matlab source code 054]

1. Introduction

1) De-averaging the observation signal is the most basic and necessary preprocessing step of the ICA algorithm. The processing process is to subtract the signal mean vector from the observation so that the observation signal becomes a zero-mean variable. This preprocessing is just to simplify the ICA algorithm, and does not mean that the mean value cannot be estimated.

2) Under normal circumstances, the data obtained are all relevant, and it is usually required to perform preliminary whitening or spheroidization of the data, because the whitening process can remove the correlation between the observation signals, thereby simplifying the subsequent extraction of independent components. . Normally, compared to data whitening processing, the algorithm has better convergence and better stability than without data whitening processing.

3) For the estimation of multiple independent components, the maximum non-Gaussian method needs to be extended. The vectors corresponding to different independent components should be orthogonal in the whitening space. The sixth step of the algorithm uses compressed orthogonalization to ensure that the separated signals are different, but the disadvantage of this method is that the estimation error of the first vector will accumulate Go to the estimation of the subsequent vector.

Simply put, the fast ICA algorithm is completed in three steps: first, the observation signal is de-averaged; then, the observation signal after de-averaging is whitened; the first two steps can be regarded as preprocessing of the observed signal, through de-averaging and whitening The ICA algorithm can be simplified. Finally, the independent component extraction algorithm and implementation process are shown in the flowchart.

The output vector of the FastICA algorithm may be reversed and the output signal amplitude may change when the order is arranged. This is mainly due to two inherent uncertainties in the ICA algorithm:

1) The uncertainty of the order of the output vectors, that is, it is impossible to determine which component of the original signal source the extracted signal corresponds to;

2) The uncertainty of the output signal amplitude, that is, it cannot be restored to the true amplitude of the signal source.

But because the main information is contained in the output signal, these two uncertainties do not affect its application.

Second, the source code

 
clear all
%% --------------------------------- Set Parameters
N = 1;                              %The number of observed mixtures
Ns = 2;                             %The number of independent sources
Ls = 1000;                          %Sample size, i.e.: number of observations
finalTime = 40*pi;                  %Final sample time (s)
initialTime = 0;                    %Initial sample time (s)
 
%% --------------------------------- Generating Data for SSA-ICA
Amix = rand(N,Ns);                      %Amix is a random N x Ns mixing matrix
timeVector = initialTime:(finalTime-initialTime)/(Ls-1):finalTime;  %Vector of time coordinates
source1 = sin(1.1*timeVector);          %Independent source component 1, sin(a * t)
source2 = cos(0.25*timeVector);         %Independent source component 2, cos(b * t)
S = [source1;source2];                  %Source Matrix
 
figure
plot(timeVector,source1)                    %Plotting the N independent sources vs. time
xlabel('time (s)')
ylabel('Signal Amplitude') 
legend('source 1')
 
figure
plot(timeVector,source2)                    %Plotting the N independent sources vs. time
xlabel('time (s)')
ylabel('Signal Amplitude') 
legend('source 2')
 
Yobs = Amix*S;                              %Matrix consisting of M samples of N observed mixtures
 
figure
plot(timeVector,Yobs)                       %Plotting the observed signal vs. time
xlabel('time (s)')
ylabel('Signal Amplitude') 
legend('observed signal')
 
%% --------------------------------- Call SSA-ICA algorithm
M = 200;
Sest = SSA_ICA(Yobs,Ns,M);
 
%% ---------------------------------  Show results
figure
plot(timeVector, Sest(1,:))
xlabel('time (s)') 
ylabel('Signal Amplitude') 
legend('Source Estimation 1')
 
figure
plot(timeVector, Sest(2,:))
xlabel('time (s)') 
ylabel('Signal Amplitude') 
legend('Source Estimation 2')
 

Three, running results

Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here

Four, remarks

Complete code or writing add QQ2449341593 past review
>>>>>>
[Signal processing] Matlab HMM-based sleep detection [Include Matlab source code 050]
[Signal processing] Based on matlab CDR noise and reverberation suppression [Include Matlab source code 051 Issue]
[Signal processing] Solve the problem of sparse signal recovery based on matlab least squares method [Include Matlab source code 052]
[Signal processing] Audio watermark embedding and extraction based on matlab wavelet transform [Include Matlab source code 053]

Guess you like

Origin blog.csdn.net/TIQCmatlab/article/details/113088961