디지털 통신 - AM, FM 신호의 변조와 복조, 통신 코딩 및 그래프 해석
본 자료는 9페이지 의 미리보기를 제공합니다. 이미지를 클릭하여 주세요.
닫기
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
해당 자료는 9페이지 까지만 미리보기를 제공합니다.
9페이지 이후부터 다운로드 후 확인할 수 있습니다.

소개글

디지털 통신 - AM, FM 신호의 변조와 복조, 통신 코딩 및 그래프 해석에 대한 보고서 자료입니다.

본문내용

print(double *input, FILE *output)
{
int t;
for(t=0 ; t fprintf(output,"%f\n",input[t]);
}
}
void freqprint(double *input, FILE *output)
{
int t;
for(t=(int)fs/2 ; t fprintf(output,"%f\n",input[t]);
}
for(t=0 ; t fprintf(output,"%f\n",input[t]);
}
}
void mag(double *mag,double *real,double *image)
{
int i;
for(i=0;i {//magnitude 연산
mag[i] = sqrt(real[i]*real[i] + image[i]*image[i]);
}
}
void LPF(double *real,double *image,int mag,int cutoff, int phasecutoff,double phase)
{
int i;
for (i=0;i {
if ( i<=cutoff || i>=fs-cutoff ){//cutoff frequency 안의 부분이다.
real[i]=mag;//
image[i]=0;
}
else{//cutoff frequency 밖의 부분으로 모두 0이 된다.
real[i]=0;
image[i]=0;
}
}
for(i=0;i {
if ( i<=phasecutoff )//cutoff 주파수 안이면서 주파수 축에서 양인 부분
{
real[i] = mag*cos(phase*(double)i);
image[i] = mag*sin(phase*(double)i);
}
else if ( i>=fs-phasecutoff )//cutoff 주파수 안이면서 주파수 축에서 음인 부분
{
real[i] = mag*cos( phase* (-fs+(double)i ) );
image[i] = mag*sin( phase* (-fs+(double)i ) );
}
}
}
void passft(double *in_real, double *in_image, double *ft_real, double *ft_image, double *out_real, double *out_image)
{
int i;
for(i=0;i out_real[i]= in_real[i]*ft_real[i] - in_image[i]*ft_image[i];
out_image[i] = in_real[i]*ft_image[i] + in_image[i]*ft_real[i];
}
}
void DSB_SC_MODUL(double *in_real,double *in_image,double fc,double *out_real,double *out_image){
int t;
double a;
a=1/fs;
for(t=0;t out_real[t] = in_real[t]*2*cos(2*pi*fc*a*(double)t);//이건 메세지에 캐리어 곱한 즉 ut
out_image[t] = 0.0;
}
}
void BPF(double *real,double *image,int mag,int cutoff1,int cutoff2)
{//BPF생성
int i;
for (i=0;i {
if ( i>=cutoff1 && i<=cutoff1+cutoff2 ){//양수부분에서 보존되는 주파수 사이일때
real[i]=mag;
image[i]=0;
}
else if ( i>=fs-cutoff1-cutoff2 && i<=fs-cutoff1){//음수부분에서 보존되는 주파수 사이일때
real[i]=mag;
image[i]=0;
}
else{//나머지 부분은 잘라준다.
real[i]=0;
image[i]=0;
}
}
}
(6) fft.h
#include
void FFT(short int dir,long m,double *x,double *y)
{
long n,i,i1,j,k,i2,l,l1,l2;
double c1,c2,tx,ty,t1,t2,u1,u2,z;
/* Calculate the number of points */
n = 1;
for (i=0;i n *= 2;
/* Do the bit reversal */
i2 = n >> 1;
j = 0;
for (i=0;i if (i < j) {
tx = x[i];
ty = y[i];
x[i] = x[j];
y[i] = y[j];
x[j] = tx;
y[j] = ty;
}
k = i2;
while (k <= j) {
j -= k;
k >>= 1;
}
j += k;
}
/* Compute the FFT */
c1 = -1.0;
c2 = 0.0;
l2 = 1;
for (l=0;l l1 = l2;
l2 <<= 1;
u1 = 1.0;
u2 = 0.0;
for (j=0;j for (i=j;i i1 = i + l1;
t1 = u1 * x[i1] - u2 * y[i1];
t2 = u1 * y[i1] + u2 * x[i1];
x[i1] = x[i] - t1;
y[i1] = y[i] - t2;
x[i] += t1;
y[i] += t2;
}
z = u1 * c1 - u2 * c2;
u2 = u1 * c2 + u2 * c1;
u1 = z;
}
c2 = sqrt((1.0 - c1) / 2.0);
if (dir == 1)
c2 = -c2;
c1 = sqrt((1.0 + c1) / 2.0);
}
/* Scaling for forward transform */
if (dir == 1) {
for (i=0;i x[i] /= n;
y[i] /= n;
}
}
}

추천자료

  • 가격3,000
  • 페이지수28페이지
  • 등록일2015.02.23
  • 저작시기2015.2
  • 파일형식한글(hwp)
  • 자료번호#957101
본 자료는 최근 2주간 다운받은 회원이 없습니다.
청소해
다운로드 장바구니