⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ofdm.txt

📁 OFDM源代码
💻 TXT
字号:
www.pudn.com > bysjjimmy.rar   To Read all the content

OFDM.DSP

[file head]:
# Microsoft Developer Studio Project File - Name="ofdm" - Package Owner=<4> 
# Microsoft Developer Studio Generated Build File, Format Version 6.00 
# ** DO NOT EDIT ** 

# TARGTYPE "Win32 (x86) Console Application" 0x0103 

CFG=ofdm - Win32 Debug 
!MESSAGE This is not a valid makefile. To build this project using NMAKE, 
!MESSAGE use the Export Makefile command and run 
!MESSAGE 
!MESSAGE NMAKE /f "ofdm.mak". 
!MESSAGE 
!MESSAGE You can specify a configuration when running NMAKE 
!MESSAGE by defining the macro CFG on the command line. For example: 
!MESSAGE 
!MESSAGE NMAKE /f "ofdm.mak" CFG="ofdm - Win32 Debug" 
!MESSAGE 
!MESSAGE Possible choices for configuration are: 
!MESSAGE 
!MESSAGE "ofdm - Win32 Release" (based on "Win32 (x86) Console Application") 
!MESSAGE "ofdm - Win32 Debug" (based on "Win32 (x86) Console Application") 
!MESSAGE 

# Begin Project 
# PROP AllowPerConfigDependencies 0 
# PROP Scc_ProjName "" 
# PROP Scc_LocalPath "" 
CPP=cl.exe 
RSC=rc.exe 

!IF "
... ...
[file tail]:
... ...
PROP Target_Dir "" 
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c 
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c 
# ADD BASE RSC /l 0x804 /d "_DEBUG" 
# ADD RSC /l 0x804 /d "_DEBUG" 
BSC32=bscmake.exe 
# ADD BASE BSC32 /nologo 
# ADD BSC32 /nologo 
LINK32=link.exe 
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept 
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept 

!ENDIF 

# Begin Target 

# Name "ofdm - Win32 Release" 
# Name "ofdm - Win32 Debug" 
# Begin Source File 

SOURCE=.\ofdm.c 
# End Source File 
# End Target 
# End Project 


OFDM.C

www.pudn.com > bysjjimmy.rar   To Read all the content


[file head]:
// --------------------------------------------- 
// 参数定义 
// --------------------------------------------- 
#include <stdio.h> 
#include <stdlib.h> 
#include <time.h> 
#include <complex> 

// 变量初始化 
int NumLoop = 500; 
int NumSubc = 128; 
int NumCP = 8; 
int SyncDelay = 0; 
//----------------------------------------------- 
// 子载波数 128 
// 位数/ 符号 2 
// 符号数/ 载波 500 
// 训练符号数 0 
// 循环前缀长度 8 (1/16)*T 
// 调制方式 4-QAM 
// 多径信道数 3 
// IFFT Size 128 
// 信道最大时延 2 
//----------------------------------------------- 

// --------------------------------------------- 
// QAM 调制 
// --------------------------------------------- 
// 产生随机二进制输入数据 

void 
data_in() 
{ 
long int p; 
int i; 
char datatmp=0; 
int BitsTx[64000]={0
... ...
[file tail]:
... ...
FT(NumSubc/2+1,:);? 
//SymEqtmp(2:NumSubc/2,:) = SymFFT(2:NumSubc/2,:);? 
for (m=1;m<=NumLoop;m++) 
{ 
for (n=1;n<=NumSubc/2;n++) 
{ 
Real = real(SymEqtmp(n,m)); 
Imag = imag(SymEqtmp(n,m)); 
if( abs((Real -1)) < abs((Real +1))) 
SymDec[2*n-1][m]=1; 
else 
SymDec[2*n-1][m]=0; 


if( abs((Imag -1)) < abs((Imag +1 )) ) 
SymDec[2*n][m]=1; 
else 
SymDec[2*n][m]=0; 
} 
} 



// 误码率 
void 
Data_err() 
{ 

int BitsRx[NumSubc*NumLoop]=0; 
int i; 
int j=1; 
int k=1; 
int m=0; 
int n; 
for (i=1;i<=NumLoop;i++) 
{ 
for(k=1;k<=NumSubc;k++) 
{ 
BitsRx[j] = SymDec[k][i]; 
j++; 
} 
for (j=1;j<=NumSubc*NumLoop;j++) 
if (BitsTx[j]!=BitsRx) 
m++; 
n=m/(NumSubc*NumLoop)*100>; 
printf('>d',m); 
printf('>d',n); 
} 

// --------------------------------------------- 
// The END 
// --------------------------------------------- 


OFDM.DSW


[file head]:
Microsoft Developer Studio Workspace File, Format Version 6.00 
# 警告: 不能编辑或删除该工作区文件! 

############################################################################### 

Project: "ofdm"=".\ofdm.dsp" - Package Owner=<4> 

Package=<5> 
{{{ 
}}} 

Package=<4> 
{{{ 
}}} 

############################################################################### 

Global: 

Package=<5> 
{{{ 
}}} 

Package=<3> 
{{{ 
}}} 

############################################################################### 


... ...










⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -