소개글
음성 변조에 관한 레포트-소스 코드-
clear all;
close all;
m1=wavread(`input.wav`);
fs=20000; % sampling freq.
t=(1:length(m1))/fs;
%%%%% DFFT %%%%%
ts=1/fs;
df=0.3;
n1=fs/df;
n2=length(m1);
n=2^(max(nextpow2(n1), nextpow2(n2)));
M1=fft(m1,n)*ts;
df1=fs/n;
f=[-fs/2:df1:df1*(n-1)-fs/2];
figure(1)
subplot(2,1,1)
plot(t,m1); % m1(t): 20000Hz로 sampling된 신호
title(`The sampled signal: m1(t)`);xlabel(`time[sec]`);ylabel(`Mag`);
axis([0 4.702 -1 1]);
subplot(2,1,2)
plot(f,abs(fftshift(M1))); % M1(f)=fftshift of m1(t)
title(`The sampled signal: M1(f)`);xlabel(`freq[Hz]`);ylabel(`Mag`);
%%%%% Original signal %%%%%
m2=wavread(`sample.wav`);
fs=44100; % sampling freq.
t=(1:length(m2))/fs;
%%%%% DFFT %%%%%
ts=1/fs;
df=0.3;
n1=fs/df;
n2=length(m2);
n=2^(max(nextpow2(n1), nextpow2(n2)));
M2=fft(m2,n)*ts;
df1=fs/n;
f=[-fs/2:df1:df1*(n-1)-fs/2];
figure(2)
subplot(2,1,1)
plot(t,m2); % m2(t): 44100Hz로 sampling된 신호
title(`The original signal: m2(t)`);xlabel(`time[sec]`);ylabel(`Mag`);
axis([0 4.702 -1 1]);
subplot(2,1,2)
plot(f,abs(fftshift(M2))); % M2(f)=fftshift of m2(t)
title(`The original signal: M2(f)`);xlabel(`freq[Hz]`);ylabel(`Mag`);
목차
Ⅰ. SAMPLINGⅡ. DSB-AM
Ⅲ. CONVENTIONAL AM
Ⅳ. SSB-AM
본문내용
Ⅰ. SAMPLING1. Explain the sampling theorem.
▶ 어떤 신호의 주어진 스펙트럼이 B Hz로 대역-제한된 경우 이 신호를 손실 없이 정확하게 재현하기 위해서는 sampling 주파수가 최소한 2B Hz가 되도록 균일하게 sampling해야 한다는 이론이다. 만약 이렇게 sampling을 하지 않으면 sampling된 이웃하는 신호끼리 서로 겹치게 되는 Aliasing이 일어나게 되는데 이렇게 되면 신호를 복원해도 원래의 신호로 복원이 되지 못한다. 신호를 복원해서 재생하는 방법을 보간법(Signal Reconstruction)이라 하는데 rect함수를 이용하는 zero-order hold와 sinc함수를 이용하는 first-order hold 등이 있다.
2. Find the sampling frequency to satisfy the sampling theorem and justify your answer for a given data.(assume that frequency resource is the tightly limited system)
▶ 결론: 주어진 음성신호의 sampling 주파수를 44100Hz로 해서 DFFT(Discrete Fast Fourier Transform)를 해보면 Bandwidth가 대략 10kHz임을 확인할 수 있으므로 sampling frequency를 대략 20kHz로 하는게 적당하다. 즉, 44100Hz로 sampling을 하면 불필요하게 많이 sampling하게 된다.
3. Compare the sampled data with the original data and discuss the result.
▶ Sampled data:
Goldwave v.5.23 프로그램으로 20000Hz로 resampling한 결과를 DFFT한 결과인데 아래의 original data와 spectrum상에서는 큰 차이가 없으며 손상되는 정보도 크게 없어서 원 신호와 거의 흡사함을 볼 수 있다.
▶ Original data:
원 신호의 DFFT한 결과인데 음성 정보가 거의 10kHz 내에 존재함을 확인할 수 있으며 따라서 sampling 주파수를 20kHz로 선택하는 것이 바람직할 것 같다.
참고 자료
없음압축파일 내 파일목록
보고서.hwp
input.wav
hw1.m
hw2.m
input.wav
hw1.m
hw2.m