BPSK+AWGN信道下画出误符号率和误比特率的性能曲线

本文详细介绍了如何使用BPSK调制技术在高斯白噪声(AWGN)信道环境下,通过模拟实验生成随机数,来绘制误符号率(SER)和误比特率(BER)的性能曲线,从而分析其通信系统的可靠性。
摘要由CSDN通过智能技术生成


老师给出产生随机数的.h文件。

/*******************************************************************************

RandNum.h: interface for the CRandNum class.

********************************************************************************/
#include<iostream>



/*************************************************************************
Designed by Xiao Ma (maxiao@mail.sysu.edu.cn), Sun Yat-sen University.
This program can only be employed for academic research.
*************************************************************************/



#if !defined(AFX_RANDNUM_H__72FEDEAF_A51C_4724_9A53_5F2F5E00CED4__INCLUDED_)
#define AFX_RANDNUM_H__72FEDEAF_A51C_4724_9A53_5F2F5E00CED4__INCLUDED_


#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000



class CRandNum
{
public:
	CRandNum();
	virtual ~CRandNum();

};



/************************************************************************
*************************************************************************
The following generator employs the linear-congruential method,
and specifically uses a choice of multiplier that was proposed
as a standard by Stephen K. Park et al. in "Technical correspondence,"
Communications of the ACM36(1993), number 7, 108-110
*************************************************************************
************************************************************************/

class CLCRandNum
{
public:
	CLCRandNum();
	virtual ~CLCRandNum();

	void SetSeed(int flag);
	void PrintState(FILE *fp);
	double Uniform();
	void Normal(double *nn, int len_nn);

private:
	long int state;

	static const int A;
	static const long M;
	static const int Q;
	static const int R;
};


/************************************************************************
*************************************************************************
The following generator employs the Wichman-Hill algorithm
*************************************************************************
************************************************************************/
class CWHRandNum
{
public:
	CWHRandNum();
	virtual ~CWHRandNum();

	void SetSeed(int flag);
	void PrintState(FILE *fp);
	double Uniform();
	void Normal(double *nn, int len_nn);

private:
	int X, Y, Z;
};


#endif // !defined(AFX_RANDNUM_H__72FEDEAF_A51C_4724_9A53_5F2F5E00CED4__INCLUDED_)









产生随机数的.cpp文件
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值