BER vs SNR
Defines the number of repetitions as a function of \(Eb/N0\), using linear interpolation between reference points, given by the expression below.
Where
- \(r\): Number of repetitions.
- \(EBN0\): \(Eb/N_0\) ratio in decibels.
- \(r_i\) and \(r_{i+1}\): Number of repetitions at the nearest reference points.
- \(EBN0_i\) and \(EBN0_{i+1}\): \(Eb/N_0\) ratios at the nearest reference points.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
positions
|
int
|
Total number of points to be generated. |
required |
ref_points
|
array - like
|
Reference points. |
required |
ref_values
|
array - like
|
Values corresponding to the reference points. |
required |
Returns:
Name | Type | Description |
---|---|---|
interpolated_values |
ndarray
|
Array of interpolated values, rounded to integers. |
__init__(EbN0_values=np.arange(0, 10, 1), num_workers=56, numblocks=8, max_repetitions=2000, error_values=None)
Simulates the BER vs Eb/N0 for the ARGOS-3 standard.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
EbN0_values
|
array - like
|
Values of Eb/N0 for which the simulation will be performed. |
arange(0, 10, 1)
|
num_workers
|
int
|
Number of threads for parallelization. |
56
|
numblocks
|
int
|
Number of data blocks for each datagram. |
8
|
max_repetitions
|
int
|
Maximum number of repetitions for each Eb/N0 value. |
2000
|
error_values
|
array - like
|
Maximum number of errors for each Eb/N0 value. |
None
|
Raises:
Type | Description |
---|---|
ValueError
|
If the number of errors is not the same as the number of Eb/N0 values. |
Examples:
- BER vs Eb/N0 Plot Example:
run()
Runs the BER vs Eb/N0 simulation for the ARGOS-3 standard.
Returns:
Name | Type | Description |
---|---|---|
ber_results |
list
|
List of tuples (Eb/N0, BER) for each Eb/N0 value. |
__init__(EbN0_values=np.arange(0, 10, 1), num_workers=8, num_bits=10000, max_repetitions=2000, error_values=None)
Implements the BER vs Eb/N0 simulation for the QPSK standard.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
EbN0_values
|
array - like
|
Values of Eb/N0 for which the simulation will be performed. |
arange(0, 10, 1)
|
num_workers
|
int
|
Number of threads for parallelization. |
8
|
num_bits
|
int
|
Number of bits for each simulation. |
10000
|
max_repetitions
|
int
|
Maximum number of repetitions for each Eb/N0 value. |
2000
|
error_values
|
array - like
|
Maximum number of errors for each Eb/N0 value. |
None
|
Raises:
Type | Description |
---|---|
ValueError
|
If the number of errors is not the same as the number of Eb/N0 values. |
run()
Runs the BER vs Eb/N0 simulation for the QPSK standard.
Returns:
Name | Type | Description |
---|---|---|
ber_results |
list
|
List of tuples (Eb/N0, BER) for each Eb/N0 value. |
teorical_qpsk()
Calculates the theoretical BER vs Eb/N0 curve for QPSK, according to the expression below.
Where
- \(P_b(x)\): Error probability.
- \(Q(x)\): Complementary error function.
- \(x\): Argument of the \(Q(x)\) function.
- \(E_b\): Energy per bit.
- \(N_0\): Noise power.
Returns:
Name | Type | Description |
---|---|---|
ber_teorico |
ndarray
|
Array of theoretical BER values for each Eb/N0 of the class. |