7 Capella Court
Nepean, ON, Canada
K2E 7X1+1 (613) 224-4700
www.optiwave.com© 2009 Optiwave Systems, Inc.

OptiSystem applications:
BER analysis of BPSK with RS encodingAnalysis of BPSK with ReedIntroduction BERSolomon encodingThis application note demonstrates how to perform the BER testing of a BPSK system with Reed Solomon(RS) encoders and decoders.

The typical output of a BER analysis is a set of waterfall curves that map a system’s BER results against
gradually increasing background noise levels, defined as Eb/No (the ratio of energy per bit to noisedensity). When Reed Solomon encoding is applied, the BER performance can be significantly improved as
RS encoding can correct multiple errors per symbol block.

An OptiSystem project has been built to allow for the automatic creation of BER waterfall curves fordifferent settings of the RS encoder/decoder. The project folder includes three files:The OptiSystem project for the BPSK system analysis (BER_Calculation_RS_FEC_BPSK.osd)
The Excel output file where the results are exported and plotted (BER Analysis BPSK FEC - Export Excel.xlsx)
The data tracking file which provides more detailed information on the simulation results(BER_FEC_Analysis_Tracking.txt)

The BER results for three common RS coding schemes (RS4, RS8, RS16) can be seen in the file BER
Analysis BPSK FEC - Export Excel.xlsx. Prior to running a simulation these coding schemes can be set
from the OptiSystem global parameters RSN and RSK. For example for RS16, RSN = 255 and RSK = 223

These global parameters are linked to the “RS IndexN” and “RS Index K” parameters of the FEC
Encoder and FEC Decoder

2How to run a BER simulation (1)
1.
2.
3.

BER analysis – RS encoding

Open the OptiSystem project BER_Calculation_RS_FEC_BPSK.osd
After determining which RS coding scheme you wish to run (see previous slide for further information), select the tab“Script” (see GREEN box below)
Got to the line “Set objWorkbook = objExcel.Workbooks.Open(…)” (see BLUE box below) and set up the file pathinformation such that it matches the location of the Excel export file on your computer. The format should be as follows:"C:¥YourFilepath¥BER analysis Reed Solomon¥BER Analysis BPSK FEC - Export Excel.xlsx ")File path for Excel spreadsheet

OptiSystem Script tab3

How to run a BER simulation (2)4.

5.

BER analysis – RS encoding

Go to the line “Set objFileToWrite = CreateObject("Scripting.FileSystemObject").OpenTextFile(…)” (see GREEN boxbelow) and set up the file path information such that it matches the location of the data export file on your computer. The
format should be as follows:"C:¥YourFilepath¥BER analysis Reed Solomon¥BER_FEC_Analysis_Tracking.txt",2,true)“Go to the code section where the BER calculations are exported to Excel (see RED box below). Make sure to set thesecond number in the brackets (objExcel.Cells (7+i, 8)) to align with the configuration for your simulation (no FEC, RS4,RS8, RS16 or 6, 7, 8 or 9; respectively).

Run script action button

File path for data file

IMPORTANT: On the third line of objExcel.Cells(…)
make sure to set the second value to 6, 7, 8 or 9
depending on the FEC configuration. Otherwise thewrong column will be populated with the BER results

4How to run a BER simulation (3)
6.
7.

8.

BER analysis – RS encoding

On the upper right menu bar, left-click select the “Run Script” action button (see GREEN box previous slide). The
simulation will start.
The Excel spreadsheet will automatically open. At the end of each BER iteration, the simulation data for the BPSK
system will be exported to the associated data columns in the spreadsheet (including Eb/No, Eb/No (dB) and one of
the BER test configurations: BER (No FEC), BER(RS4), BER(RS8), or BER(RS16) (see RED boxes)
During the simulation a progress box will appear to provide information on the status of the simulation sweeps. Oncethe message “Simulation complete!” is posted, this dialog box can be closed

The data for each row is updated after asimulation run of the OptiSystem script

BER vs Eb/No simulation results are automaticallyplotted for the specified RS format. Also theassociated BER theoretical limit is calculated (obtainedfrom column BER – Th).
As expected, RS16 provides the most powerful error
correction capability as it can correct up to 16 symbols
per correcting block. It however requires a larger
number of redundant symbols (overhead bits)

5

How to run a BER simulation (4)9.

BER analysis – RS encoding

In addition to the Excel spreadsheet analysis tool kit, a data file is also created during the simulation. An example viewof the data file content (from BER_FEC_Analysis_Tracking.txt) is shown below. The content of this file can be modified
as required by using the objFileToWrite.WriteLine(“…") command in the simulation script

Sample view of BER_FEC_Analysis_Tracking.txt
In this example, five BER measurement iterations were
performed per SNR per Symbol setting.

6Notes on BER & FEC analysis (1)BER analysis – RS encoding

To create a waterfall curve for a specified modulation format, the VBScripting feature of OptiSystem is used to set up
the test conditions, create an instance of OptiSystem, run the simulation and retrieve results from the components andvisualizers (thus all simulation runs must start from the Scripts tab). If you wish to run a standalone simulation, to verifyfor example the system setup, start the simulation from the Layout tab (in this case the script will be ignored)
For each simulation run, the parameter Eb/No is configured based on settings in the script and in turn applied to a white
noise source in the project layout (specifically the Noise power setting for the AWGN I noise source)
To set the number of iterations in your simulation, the start value for Eb/No, and the level of change of Eb/No periteration use the parameters IterSNRPerSym, SNRPerSymStart and SNRPerSymStep (see below)
Also if you would like to run a reduced number of iterations over a specific sub-set of the sweep indices, use theparameter StartIndex to define at which index point you would like to start your iterations.

Set the total number of iterations with IterSNRPerSym

When set to a value greater than 1, multiple runs (equal to thisvalue) will be performed for each Eb/No setting and averaged

Set the start value of Eb/No with SNRPerSymStart
NOTE: This value is assumed to be in dB!

Set the incremental value of Eb/No with SNRPerSymStep
NOTE: This value is assumed to be in dB!
Use the parameter StartIndex to fine tune your iterations byperforming runs over a specific set of iteration indices

TIP: To improve the accuracy of BER results under low noise conditions (where the symbol/bit error counts may be quite low) or
when a strong FEC encoding is used, it is recommended to increase the Sequence length setting. Also you can increase theparameter IterBER to a value greater than 1 (when this is done, the simulation will perform extra runs for each noise level andtake the average of the results)
7Notes on BER & FEC analysis (2)BER analysis – RS encoding

To verify that the noise settings are being properly applied to the I channel, the Eb/No parameter is re-calculated inOptiSystem through a Component script procedure written in the Oscilloscope Visualizer (this Visualizer includes acalculation result for Noise (Variance) which is applied to the calculation for Eb/No)
The results Eb/No are in turn exported to the Excel analysis spreadsheet and used for plotting of the BER waterfall curves
The Bit Errors (and the associated Sequence length for BER per iteration) are obtained from the BER Test Set

For each iteration, the Noise power is updated via thesimulation script (based on the Eb/No setting)Component script for Osc Visualizer
8

Notes on BER & FEC analysis (3)BER analysis – RS encoding

The FEC Encoder works by adding redundant bits (n-k) to information blocks of length k. The bit sequence at the outputof the FEC Encoder will thus be longer than the input. When performing tests on higher order modulation systems, theparameter Trim to sequence length should be enabled. This will ensure that the Decision component correctly recovers
all information and redundant (error correcting) symbols that cover the length of the original sequence length.
At the FEC Decoder, the redundant symbols will then be removed and thus the output of the Decoder will have a shorter
sequence than the original sequence from the BER Test Set. This is not a problem as the BER Test Set automaticallychecks for this condition and only applies error counting against the shorter sequence length (this can be confirmed byviewing the result Sequence length for BER per iteration which is equal to 57088; equal in value to the output sequenceof the FEC Decoder)

Output sequence has been trimmed to original
sequence length (65536)

The FEC overhead (in %) is measured using theOptiSystem Component script. See the component
script for further details.

After the removal of error-correction bits, theoutput sequence length is reduced to 57088.

9