검색어 입력폼

# [MATLAB]AM, DSB-SC 변,복조 과정

저작시기 2006.10 |등록일 2006.11.10 한컴오피스 (hwp) | 4페이지 | 가격 2,500원

## 소개글

통신시스템에서 나오는 AM, DSB-SC 변,복조 과정을 matlab으로 프로그래밍 한 것 입니다.

## 본문내용

■ 통신시스템 Matlab 실습 #1
1.1
- code
clear

% initial condition
Ac = 1;
t_0 = 0.15;
fc = 250;
t_s = 0.001;
fs = 1/t_s;
SNR = 20; % SNR in dB
SNR_lin = 10^(SNR/10); % linear SNR
t = [0:t_s:t_0]; % time vector

% signals & Fourier transform
m = [ones(1,t_0/(3*t_s)),-2*ones(1,t_0/(3*t_s)),ones(1,t_0/(3*t_s)+1)]; % message signal
s = Ac*cos(2*pi*fc*t).*m; % modulated signal
M = fft(m)/fs; % Fourier transform & scaling
S = fft(s)/fs; % Fourier transform & scaling
f = [-500:20/3:500]; % freq. vector

% Addition White Gaussian Noise
signal_power = power(s(1:length(t)),2); % power in modulated signal
noise_power = signal_power/SNR_lin; % compute noise power
noise_std = sqrt(noise_power); % compute noise standard deviation
noise = noise_std.*randn(1,length(s)); % generate noise
r = s + noise; % add noise to the modulated signal
R = fft(r)/fs; % Fourier transform & scaling