Using DSB-SC for a wav file.
7 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Panagiotis Chatzilabrou
il 28 Mag 2019
Commentato: Star Strider
il 11 Ott 2020
Hello everyone..!!
I have a assignment to do for my lab which is about to remove the noise from a wav file. I did try the type that the teacher gave us but it doesnt seem to work. can anyone help me ?
clear all;
close all;
[data,fs] = audioread ('mixed.wav');
fc=13; %% hz
t=1:2; %% time
u=3*pi/2; %% phase
m = data * cos(2*pi*fc*t+u);
sound (m,fs);
0 Commenti
Risposta accettata
Star Strider
il 28 Mag 2019
If you intend to create a double sideband -suppressed carrier signal, you need to use element-wise multiplication:
m = data .* cos(2*pi*fc*t+u);
Of course the two vectors must have the same sizes, or the operation will throw an error to that effect.
4 Commenti
Rhyston Da Silva
il 11 Ott 2020
I am trying to create a SSB-SC modulation of an audio file input can someone tell me if what I have done is correct?
[sound1,fs]=audioread('sound1.wav');
Sampling_Frequency2=fs
fc=fs/2;
freqdev=100;
dt=1/fs;
len=length(sound1)*dt;
t=0:dt:len;
t=t(1:end-1);
m=sound1.*cos(2*pi*fc*fs);
FFTm=fft(m,length(m));
plot(abs(FFTm))
Star Strider
il 11 Ott 2020
Rhyston Da Silva —
I believe you are defining the carrier as:
cos(2*pi*fc*fs)
If so, note that multiplying ‘fc’ by ‘t’ (rather than ‘fs’) will most likely do what you want. As currently written, the carrier is a scalar. This is unlikely to produce an actual carrier, since the carrier should be the same size as the modulating signal, and the carrier frequency is usually much higher than the frequency of the modulating signal. The iidea is to get the baseband signal to the frequency of the carrier so it can be transmitted efficiently.
Also, the length of the fft output will be the length of the time-domain signal (unless otherwise specified), so specifying that to be the same length as the time-domain signal in the fft call is not necessary. Dividing the fft result by the length of the time-domain signal will scale it to produce the approximate half-amplitude of the argument amplitude. Otherwise, the amplitude will be significantly greater than actual amplitude.
The plot will be the amplitude of the two-sided Fourier transform. If you want to do that, consider using the fftshift function, and creating an appropriate frequency vector (from -Fs/2 to +Fs/2, where ‘Fs’ is the sampling frequency of the carrier signal) to plot it against.
This should probably be a new Question, so I will not respond further to it here.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Modulation in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!