Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Simulating Signal recovery

0.00/5 (No votes)
11 Jun 2008 1  
NRZ, Bipolar AMI, M Level, PSK, FSK, ASK

Introduction

this application needs input a bit string, deltha and sample to get the recovered signal.

Using the code

class classGrafica has 19 methods NRZ, BIPOLAR, ASK, PSK...

NRZ method

           
public PointPairList NRZ()
{
PointPairList ptosnrz = new PointPairList();
int i;
int j;
int val;
double[] punto = new double[lenght];
for (i = 0; i < lenght; i++)
{
punto[i] = Convert.ToInt32(bits[i].ToString());
}
double y;
val = 0;
for (j = 0; j < lenght; j++)
{
y = (double)punto[j] * 5;
for (i = 0; i < muestra; i++)
{
ptosnrz.Add(val, y);
val++;
}
}
return ptosnrz;
}

Bipolar Method

 
public PointPairList BIPOLAR()
{
PointPairList ptosbipolar = new PointPairList();
int i;
int j;
int val;
double[] punto = new double[lenght];
for (i = 0; i < lenght; i++)
{
punto[i] = Convert.ToInt32(bits[i].ToString());
}
double y;
int p;
val = 0;
p = 2;
for (j = 0; j < lenght; j++)
{
y = (double)punto[j];
if (y == 1)
{
y = Math.Pow(-y, p);
p++;
}
y = y * 5;
for (i = 0; i < muestra; i++)
{
ptosbipolar.Add(val, y);
val++;
}
}
return ptosbipolar;
}

In the source code are everything to make it works...

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here