You are on page 1of 8

BLIND AUDIO SOURCE

SEPARATION
Report of Dirty Implementation

Group 6
Jayraj Dave: 131018
Kavi Pandya: 131020
Parth Patel: 131033
Shreedhar Dalal: 131052

Outline
1. Introduction
2. Algorithm of Dirty Implementation
3. Result
4. Mat lab Code
5. References

1. Introduction:
We have implemented the Blind Audio Source Separation concept described
in section 1 of the paper [1] by Smaragdis. This algorithm assumes
instantaneous mixtures and uses the Matrix updating formula as described
in paper [2]. The updation algorithm mentioned in this paper minimizes a
statistical dependency among outputs is derived for blind separation of
mixed signals. The dependency is measured by the average mutual
information (MI) of the outputs. The Gram-Charlier expansion is used in
evaluating the MI. The natural gradient approach is used to minimize the MI.

2. Algorithm of Dirty Implementation


Step-1: As per the simulation example given in the paper, here, we are
taking synthetic source signals and random mixing matrix.
Source signal:
S = [ signl1; signal2; signal3];
Where,
signal1 = 5*sin(40t);
signal2 = 0.1*sin(400t) .*cos(30t);
signal3 = 0.01*sign(sin(500t) + 9*cos(40t));
Step-2: Original Mixing Matrix:
Here, A is a mixing matrix. We are taking Random mixing matrix (A)
distributed within the Interval [-1,1]. Here the elements of mixing matrix A
will be randomly choose from in [-1,1].
Step-3: Mixture:
X = A*S is a mixed signal. It is the only known parameter of our equation.

Step-4: Estimated Unmixing Matrix:


W is an estimated matrix which acts as an inverse of A. It is to be noted
that we have no apriori information of A and for the same we aim to find
the values of W so that they are close estimate of the inverse of A. The
elements of estimated unmixing matrix W will be randomly choose from in
[-1,1].
Step-5: Approximate Source Matrix:
Y is the approximation calculated of our actual source matrix. It is computed
Y = W*X.
Step-6: Updating Unmixing Matrix:
For each time instant we are using the sample from matrix Y and computing
the best suitable unmixing matrix for that instant using the updating rule
given in paper [2]. For each time instant we update unmixing matrix 10 times
to get its improved version. We follow this step for all the time instances.

3. Result:

Figure 1: Source Signal 1 and Recovered Signal 1

Here, in figure 1, we can see the similarity in the source signal and the
recovered signal. It might be slightly shifted in terms of time. But for the 1st
feature of source and recovered signal it seems similar. Thus, we can say
that the estimated unmixing matrix (W) closely matches with the inverse of
mixing matrix (A).

Figure 2: Source Signal 2 and Recovered Signal 2

Figure 3: Source Signal 3 and Recovered Signal 3

In figure 2 and 3, there is not much of a similarity between Source signal


and recovered signal. Here, the recovered signal is permutated of original
source signal.

4. Mat lab Code:


% A new learning algorithm for blind signal separation
clc;
clear all;
close all;
I = [1 0 0; 0 1 0; 0 0 1]; %Identity matrix
A = zeros(3,3); %mixing matrix
W = zeros(3,3); %estimated unmixing matrix
n =100;%number of samples
signal1 = 5*sin((0:n)*40);%source signal1
signal2 = 0.1*sin((0:n)*400).*cos(30*(0:n));%source signal2
signal3 = 0.01*sign(sin((0:n)*500) + 9*cos(40*(0:n)));%source signal3
S = [signal1; signal2; signal3];%source signal
%lower limit and upper limit for random value generation
a = -1;
b = 1;
%generating random value of A between [-1,1]
A(1,:) = ((b-a)*rand(3,1) + a)';
A(2,:) = ((b-a)*rand(3,1) + a)';
A(3,:) = ((b-a)*rand(3,1) + a)';
%generating random value of W between [-1,1]
W(1,:) = ((b-a)*rand(3,1) + a)';
W(2,:) = ((b-a)*rand(3,1) + a)';

W(3,:) = ((b-a)*rand(3,1) + a)';


x = A*S; % mixture matrix
y = W*x; % approximate source matrix

%Updating unmixing matrix


for t=0:n
for i=1:10
%calculating delta W
dW = (250*exp(-5*t)).*(I - (tanh(y(:,t+1))*y(:,(t+1))'))*W;
W = W + dW; %Reassigning W
end
end
y = W*x; %output signal
%plot of the source and output signal 1
subplot(2,1,1);
plot(0:n,S(1,:),'r');
xlabel('Time');
ylabel('Value of signal');
title('Source Signal 1');
subplot(2,1,2);
plot(0:n,y(1,:),'b');
xlabel('Time');
ylabel('Value of signal');
title('Recovered Signal 1');
%plot of the source and output signal 2
subplot(2,1,1);
plot(0:n,S(2,:),'r');

xlabel('Time');
ylabel('Value of signal');
title('Source Signal 2');
subplot(2,1,2);
plot(0:n,y(2,:),'b');
xlabel('Time');
ylabel('Value of signal');
title('Recovered Signal 2');
%plot of the source and output signal 3
subplot(2,1,1);
plot(0:n,S(3,:),'r');
xlabel('Time');
ylabel('Value of signal');
title('Source Signal 3');
subplot(2,1,2);
plot(0:n,y(3,:),'b');
xlabel('Time');
ylabel('Value of signal');
title('Recovered Signal 3');

5. References:
1. Smaragdis, Paris. "Blind separation of convolved mixtures in the
frequency domain." Neurocomputing 22.1 (1998): 21-34.
2. Amari, Shun-ichi, Andrzej Cichocki, and Howard Hua Yang. "A new
learning algorithm for blind signal separation." Advances in neural
information processing systems (1996): 757-763.

You might also like