Extract signal components from mixed signal
49 views (last 30 days)
I have signal that is consists of three individual signals. How can I separate these individual signals from the mixed signal. I did the FFT and then IFFT to get back to the original signal. The same way I wanna get the three individual signals (I_first, I_second, I_third) by performing FFT and IFFT.
The code I used:
m=1000; I1=0.5; I2=0.3; I3=0.2; L1=100*m; L2=1000*m; n1=1; n2=1.446;
I_first=I1+I2+2*sqrt(I1*I2).*cos(Q12); % first signal
I_second=I2+I3+2*sqrt(I2*I3).*cos(Q23); % second signal
I_third=I1+I3+2*sqrt(I1*I3).*cos(Q13); % third signal
I=I1+I2+I3+2*sqrt(I1*I2).*cos(Q12)+2*sqrt(I2*I3).*cos(Q23)+2*sqrt(I1*I3).*cos(Q13); % Mixed signal
Edited: Wayne King on 23 Dec 2020
Hi Sohel, May I first suggest that you clean this code up a bit. It isn't easy to follow exactly what kind of signals you are creating. For example, instead of
Why not just ?
t = linspace(1530,1565,1024);
It appears from your code above you are using "lam" as your time vector. Then, you seemingly create a sine wave wtih expressions like in the case of I_first where I have used t for your "lam". What exactly are you trying to do here? A little explanation about what signal you are trying to create would help us determine if perhaps you have an inadvertent error in the signal model.
Note the equivalence of the following:
t = linspace(1530,1565,1024);
angle = 4*pi*1e5./t;
% Then you basically do
Were you trying to create a frequency-modulated signal with the above?
At any rate, I don't see how you can cleanly separate I_second from I_third. The frequencies of these two components are so close, whether intentional or not, that you have essentially just created one amplitude modulated signal. Note
Now if I plot the sum of those two in time, you see the amplitude modulated signal
With respect to bandpass filtering, you are not going to be able to separate these components in a way that when you sum them back you get the original signal. You can however accomplish that with multiresolution techniques. In this case I would recommend a wavelet packet technique, modwptdetails. Please see Practical MRA for a introduction.
mra = modwptdetails(I,5,'fk18');
% first component
% second and third component together
Again, you cannot expect to separate I_second and I_third with any technique I know of. Now note that if I sum all the mra components back together
ts = sum(mra);
I get back the original signal perfectly. Now if you compare the extracted MRA components, you see that except for the expected DC shifts (shifts in the mean), they quite accurately reproduce, I_first and I_second+I_third
plot([mra(1,:)' I_first']), title('First');
plot([mra(3,:)' (I_second+I_third)']), title('Second+Third')
To see that more clearly, let's add the DC shift in and compare the AM component extracted by the wavelet packet MRA with the original.
mu = mean(I_second+I_third);
title('Comparison of wavelet packet with original')
Hope that helps,
More Answers (2)
Abhishek Gupta on 17 Dec 2020
As per my understanding, you want to extract different components of a mixed signal. This task can be done in the following steps: -
- Retrieve frequencies of the components using Fast Fourier Transform (FFT)
- Use bandpass() or highpass() filter to extract different components out of the mixed signal.
Also, referring to the following MATLAB Answers, which might help you in achieving the task: -
Hi Sohel, for the given frequencies and signal lengths, the spectra of I_second and I_third are not delta functions in frequency. So the fact that their peaks are slightly different isn't going to be sufficient. If you knew they were sine waves and knew what their frequencies were, perhaps it would be possible to resample them in such as way that their respective frequencies (with all their associated energy) fell exactly on a DFT bin (and separate DFT bins) and then you could perhaps separate them, but here there is considerable overlap so I don't see how you are going to separate them as you hope to. I'm sorry I don't have time to read those papers, but if those papers contain the work of people constructing signals exactly like yours and claiming to separate I_second and I_third perfectly, perhaps contacting them directly? Maybe they would help.