Adding reverberation channel with noisy complex sine wave
3 views (last 30 days)
Show older comments
I am having a noisy multiple sine wave signal (3 sine wave with different value stated in the code) need to go thru a reverberation channel with the z transfer function of
. where my a = 0.189. I wonder does my code wrote correctly? This is my first time to use the reverberation channel in transfer function for MATLAB. Please give any advise ya, thanks in advance :).
. where my a = 0.189. I wonder does my code wrote correctly? This is my first time to use the reverberation channel in transfer function for MATLAB. Please give any advise ya, thanks in advance :).fs = 128000; %sampling frequency (samples per second) (128000)
Ts = 1/fs; %seconds per sample (time step)
f1 = 15*10^(3); % F1 sine wave frequency at 15 kHz
fa = 17*10^(3); %FA sine wave frequency at 17 kHz
f2 = 19*10^(3); %F2 sine wave frequency at 19 kHz
t1 = 0:Ts:10^(-2); %Time step
sinef1 = 0.5.*sin(2*pi*f1*t1); %generate F1 sine wave
sinefa = 0.5.*sin(2*pi*fa*t1); %generate FA sine wave
sinef2 = 0.5.*sin(2*pi*f2*t1); %generate F2 sine wave
signal = sinef1 + sinefa + sinef2; %Summing up sine wave
snr1 = 61.627; %Signal noise ratio in dB - via Calculation from variance
var = 0.088; %Variance of White Gaussian Noise
t2 = 0:Ts:10^(-2);
whitenoise = sqrt(var).*rand(1,size(signal,2)); %Generate Gaussian White noise
noisysignal = whitenoise + signal; %Adding noise to sum of signal
a = 0.189; %Calculated 'a' value as request by lecturer
syms z %Z transform
reverbz = 1 + a.*z^(-1);
reverb = iztrans(reverbz);
reverbnoisysignal = reverb + noisysignal;
figure(8)
plot(t2,reverbnoisysignal,'k');
0 Comments
Answers (0)
See Also
Categories
Find more on Audio Processing Algorithm Design in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!