码分多址cdma通信

The analogy behind code-division multiple access says there are four people and two out of them are talking with each other in some language what other two don't know and the same goes for those two also. For example, two of them talking in Punjabi and two in Bengali. Those two talking in Punjabi has no idea about Bengali and same for Bengali guys too. So, there is no interruption in their respective communication. The same analogy has been used for CDMA.

代码分区多址访问背后的类比说,有四个人,其中两个人正在用某种语言互相交谈,而其他两个人则不知道,这两个人也是如此。 例如,其中两个在旁遮普邦说话,两个在孟加拉国说话。 这两个在旁遮普邦说话的人对孟加拉语一无所知,孟加拉人也一样。 因此,它们各自的通信不会中断。 CDMA也使用了相同的类比。

We discuss the concept with the help of an example,

我们将通过一个示例来讨论这个概念,

    Say there are four stations: A, B, C, DEach station has assigned a code say C1, C2, C3, C4Each of them sending their respective data say D1, D2, D3, D4All of them throws their data multiplying with the codeThus data on the channel isC1D1 + C2D2 + C3D3 + C4D4

The receiver who wants to retrieve simply multiplying the data with its code and divide by the number of the station.

想要检索的接收器只需将数据与其代码相乘并除以站号即可。

Now, this is possible because of the coding theory. Let's see the how codes are generated, encoding and decoding of data bit and rules of addition and multiplication

现在,由于编码理论,这是可能的。 让我们看看如何生成代码,数据位的编码和解码以及加法和乘法的规则

Code generation:

代码生成:

Code generation is done by Walsh table

代码生成由Walsh表完成

Walsh table is a kind of recursive table which is represented by

Walsh表是一种递归表,由


Where W1= [1]
2N=No of stations
So, for 2 stations

Code for first station is [1 1] //vector
Code for second station is [1 -1] //vector
Additions and multiplications are vector scalar type
Say [1 0]*[-1 1]=(1*-1)+ (0*1)]=-1+0=-1

Encoding and decoding of data

数据编码和解码

  • If a station is sending bit 0, it's encoded as -1

    如果工作站正在发送位0,则其编码为-1

  • If a station is sending bit 1, it's encoded as 1

    如果工作站正在发送位1,则将其编码为1

  • If station is idle, it's encoded as 0

    如果工作站空闲,则编码为0

Example with 2 stations

2个站的例子

    Say, Station A sends 1, B sends 0
Code of A: [1 1]
Data of A: 1
Code of B: [1 -1]
Data of B: -1
Dara on channel
1*[1 1] + -1*[1 -1]
=[1 1] + [-1 1]
=[0 2] //scalar addition of vector
Now say A wants to retrieve its data
So multiply data on channel with A’s code
([0 2] * [1 1 ] )/2
=(0*1 + 2*1)=2/2=1
For B
([0 2] * [1 -1])/2=-2/2=-1
.minHeight{ min-height: 250px; } @media (min-width: 1025px){ .minHeight{ min-height: 90px; } } .minHeight{ min-height: 250px; } @media (min-width: 1025px){ .minHeight{ min-height: 90px; } }

C++ implementation

C ++实现

#include <bits/stdc++.h>
using namespace std;
class CDMA {
public:
int** wtable;
int** copy;
int* channel_sequence;
void setUp(int data[], int num_stations) {
int n=num_stations;
wtable = new int* [n];
for(int i=0;i<n;i++)
wtable[i]=new int[n];
copy = new int* [n];
for(int i=0;i<n;i++)
copy[i]=new int[n];
buildWalshTable(num_stations, 0, num_stations - 1, 0, num_stations - 1, false);
showWalshTable(num_stations);
for (int i = 0; i < num_stations; i++) {
for (int j = 0; j < num_stations; j++) {
copy[i][j] = wtable[i][j];
wtable[i][j] *= data[i];
}
}
channel_sequence = new int[n];
for (int i = 0; i < num_stations; i++) {
for (int j = 0; j < num_stations; j++) {
channel_sequence[i] += wtable[j][i];
}
}
}
void listenTo(int sourceStation, int num_stations) {int innerProduct = 0;
for (int i = 0; i < num_stations; i++) {
innerProduct += copy[sourceStation][i] * channel_sequence[i];
}
int k=innerProduct/num_stations;
if(k==1)
cout<<"The data received from station "<<sourceStation+1<<" is: "<<k<<endl;
else if(k==-1)
cout<<"The data received from station "<<sourceStation+1<<" is: 0"<<endl;
else
cout<<"Station "<<sourceStation+1<<" is idle, it didn't send any data\n";
}
//building walsh table
int buildWalshTable(int len, int i1, int i2, int j1,int j2, bool isBar) {
if (len == 2) {
if (!isBar) {
wtable[i1][j1] = 1;
wtable[i1][j2] = 1;
wtable[i2][j1] = 1;
wtable[i2][j2] = -1;
}
else {
wtable[i1][j1] = -1;
wtable[i1][j2] = -1;
wtable[i2][j1] = -1;
wtable[i2][j2] = +1;
}
return 0;
}
int midi = (i1 + i2) / 2;
int midj = (j1 + j2) / 2;
buildWalshTable(len / 2, i1, midi, j1, midj, isBar);
buildWalshTable(len / 2, i1, midi, midj + 1, j2, isBar);
buildWalshTable(len / 2, midi + 1, i2, j1, midj, isBar);
buildWalshTable(len / 2, midi + 1, i2, midj + 1, j2, !isBar);
return 0;
}
void showWalshTable(int num_stations) {cout<<"................Displaying walsh table..................\n";
//cout<<endl;
for (int i = 0; i < num_stations; i++) {
for (int j = 0; j < num_stations; j++) {
cout<<wtable[i][j]<<"  ";
}
cout<<"\n";
}
cout<<"----------------------------------------------------------\n";
}
};
int main() {cout<<"-------------------------------CDMA Implementation------------------------\n";
int num_stations;
cout<<"Enter no of stations\n";
cin>>num_stations;
//data bits corresponding to each station
cout<<"Press 1 if station is sending bit 1\n";
cout<<"Press -1 if station is sending bit 0\n";
cout<<"Press 0 if station is idle\n";
int* data=new int[num_stations];
for(int i=0;i<num_stations;i++){cout<<"enter for station "<<i+1<<endl;
cin>>data[i];
}
CDMA channel;
channel.setUp(data, num_stations);
// station you want to listen to
cout<<"Enter station no you want to listen to\n";
int sourceStation;
cin>> sourceStation;
channel.listenTo(sourceStation-1, num_stations);
return 0;
}

Output 1

输出1

-------------------------------CDMA Implementation------------------------
Enter no of stations
4
Press 1 if station is sending bit 1
Press -1 if station is sending bit 0
Press 0 if station is idle
enter for station 1
1
enter for station 2
0
enter for station 3
-1
enter for station 4
-1
................Displaying walsh table..................
1  1  1  1
1  -1  1  -1
1  1  -1  -1
1  -1  -1  1
----------------------------------------------------------
Enter station no you want to listen to
4
The data received from station 4 is: 0

Output 2

输出2

-------------------------------CDMA Implementation------------------------
Enter no of stations
8
Press 1 if station is sending bit 1
Press -1 if station is sending bit 0
Press 0 if station is idle
enter for station 1
1
enter for station 2
1
enter for station 3
-1
enter for station 4
-1
enter for station 5
0
enter for station 6
0
enter for station 7
-1
enter for station 8
1
................Displaying walsh table..................
1  1  1  1  1  1  1  1
1  -1  1  -1  1  -1  1  -1
1  1  -1  -1  1  1  -1  -1
1  -1  -1  1  1  -1  -1  1
1  1  1  1  -1  -1  -1  -1
1  -1  1  -1  -1  1  -1  1
1  1  -1  -1  -1  -1  1  1
1  -1  -1  1  -1  1  1  -1
----------------------------------------------------------
Enter station no you want to listen to
5
Station 5 is idle, it didn't send any data

翻译自: https://www.includehelp.com/computer-networks/code-division-multiple-access-cdma.aspx

码分多址cdma通信

码分多址cdma通信_码分多址(CDMA)| 计算机网络相关推荐

  1. 进行码分多址CDMA通信

    共有四个站进行码分多址CDMA通信.四个站的码片序列为: A: (-1 -1 -1 +1 +1 -1 +1 +1). B: (-1 -1 +1 -1 +1 +1 +1 -1). C: (-1 +1 - ...

  2. 码分多址CDMA通信

    码分复用CDM或码分多址CDMA是一种共享信道的方法,每一个用户可以在同样的时间使用同样的频带进行通信, CDMA系统的一个重要特点就是这种体制给每一个站分配的码片序列不仅必须各不相同,并且还需要互相 ...

  3. matlab中基于cdma的锁相环,答辩-基于MATLAB的CDMA通信系统设计与仿真.ppt

    基于MATLAB的CDMA通信系统设计与仿真 目录 研究背景 研究方法 CDMA各部分仿真 CDMA系统仿真总图 结果分析 致谢 * 研究背景 20世纪60年代以来,随着民用通信事业的发展,频带拥挤问 ...

  4. matlab端到端仿真中基站功率,基于matlab的cdma通信系统分析及仿真

    基于matlab的cdma通信系统分析及仿真 毕业设计 I 摘 要 利用 MATLAB 平台的 SIMULINK 可视化仿真功能,结合 CDMA 的实际通 信情况,利用 MATLAB 组建出完整的 C ...

  5. cdma matlab仿真程序,基于Matlab的CDMA通信完整系统分析及仿真.doc

    基于Matlab的CDMA通信完整系统分析及仿真 课程论文 题 目: 基于Matlab CDMA多址技术的仿真 学生姓名: 苏未然 学生学号: 1008030130 系 别: 电气信息工程学院 专 业 ...

  6. matlab正交gold码的相关性,基于Matlab的CDMA通信系统仿真

    基于Matlab的CDMA通信系统仿真 1 绪 论 1.1课题背景及目的 20世纪60年代以来,随着民用通信事业的发展,频带拥挤问题日益突出.CDMA(Code Diveision Multiple ...

  7. WellYa VoIP NGN IMS 3G GSM CDMA 通信资料下载集合 (希望置顶)

    WellYa VoIP NGN IMS 3G GSM CDMA 通信资料下载集合 (希望置顶) GSM, SIP, H.323, ISUP and IMS Call Flows http://www. ...

  8. cdma信息服务器,【CDMA网络时间服务器(CDMA网络时间服务器)】 - 太平洋安防网

    [参数说明] 品牌:zxkj 型号::HR系列 规格::机架式 [详细描述] 网络时间服务器-cdma网络时间服务器 网络时间服务器-cdma网络时间服务器 网络时间服务器-cdma网络时间服务器 网 ...

  9. 高并发编程-线程通信_使用wait和notify进行线程间的通信2_多生产者多消费者导致程序假死原因分析

    文章目录 概述 jstack或者可视化工具检测是否死锁(没有) 原因分析 概述 高并发编程-线程通信_使用wait和notify进行线程间的通信 - 遗留问题 我们看到了 应用卡住了 .... 怀疑是 ...

最新文章

  1. 编译 ORB_SLAM2 (一)
  2. linux 修改home 目录
  3. 关于Public key for *.rpm is not installed 的解决方法
  4. 机器学习(四)——损失函数
  5. Luogu2495[SDOI2011]消耗战
  6. ElasticSearch 2 (11) - 节点调优(ElasticSearch性能)
  7. Python 第六节课
  8. 张俊芳电机学11章计算题答案
  9. cad查看_如何快速查看CAD文件?只需4步,文件即可轻松打开
  10. ruby入门_loop
  11. 三步骤详解张正友标定法
  12. mysql的dql_Mysql:dql(基本数据查询)
  13. 非主流闪图头像教程:动感头像效果
  14. 企业微信(H5打开)调用微信小程序
  15. IntelliJ IDEA 文件未被识别成maven工程
  16. Windows光标选中字符切换到输入字符快捷键
  17. Win10家庭版打开组策略方式
  18. 页面静态化----------------------------------------个人笔记
  19. 大数据-玩转数据-Maxcompute DDL
  20. Could not resolve placeholder 'jdbc username' in string valu

热门文章

  1. 3DMAX 塌陷命令在哪?怎么使用?
  2. 用 make menuconfig 图形化配置 uboot
  3. AVX 指令集并行技术优化中值滤波
  4. 21天战拖记——Day18:思维导图再学习(2014-05-21)
  5. 低格过程到底对硬盘进行了什么操作?
  6. RF中for循环要加END?
  7. Python Spark WordCount
  8. KDD Cup 2021城市大脑赛题分析
  9. 为了让你高效工作,华为云桌面是这样做的
  10. linux之创建守护进程