Wednesday, April 29, 2020

Microphone noice cancelation in ubantu

This will help to remove background noise when you record, usually in windows with Realtek audio do this job perfectly. but in ubuntu we gonna do it as follows, 

1. Open Nano editor,

        $  sudo nano /etc/pulse/default.pa

2. Now move down to any lines and add the following line to enable Noise cancellation module.

         $  load-module module-echo-cancel

3. Restart Pulse Audio for Noise Cancelling Linux System 
          $ pulseaudio -k 
          $ pulseaudio --start

4.
Set Default Sound Device





Friday, April 17, 2020

ECG singanal simulation using MATLAB

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 h=input('Input your heart rate (in beats per minute)= ');
 p=input('Input desired Peak voltage(in mV)= ');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%t1=10;
% t1=10 seconds is preferred to enable us have clearer RR tachograms.
% indicates the duration
x1 = p*ecg(6000).' ;
% denoising ecg signals with savitsky-golay filter for us to
% get noiseless or ideal ECG
y1 = sgolayfilt(kron(ones(1,19),x1),0,25);
m = round(h/6);
disp('Number of heart beats per 10 seconds=' )
m
            if h <= 105;
            if m==5;
                n1=32000;
            elseif m==6;
                n1=37000;
                m==7;
                n1=43000;
            elseif m==8;
                n1=49000;
            elseif m==9;
                n1=55000;
            elseif m==10;
                n1=60000;
            elseif m==11;
                n1=66000;
            elseif m==12;
                n1=75000;
           elseif m==13;
                n1=80000;
           elseif m==14;
                n1=85100;
           elseif m==15;
                n1=92000;
            elseif m==16;
                n1=98000;
            else m==17;
                n1=100000;
end
else disp('Heart Rate input exceeds limit')
        end
        n = 1:n1;
        del = round(6000*rand(1));
        mhb = y1(n + del);
        t= linspace(0,t1,n1);
        colordef white;
        plot(t,mhb, 'g');
        q=p+0.5;
        axis([0 t1 -q q]);
        grid; xlabel('Time [sec]');
        ylabel('Voltage [mV]');
        title('Artificial Electrocardiogram');
        legend('Isoelectric line');
       


Search This Blog