# Optical link performance estimator based on the Polynomial Closed-Form GN/EGN model (PCFM). 

## Overview
This MATLAB script simulates Ultra-Wideband (UWB) optical transmission systems using the PCFM.
The system includes:

- Backward Raman amplification
- ASE noise from both Raman and Doped-Fiber Amplifier sources
- Nonlinear interference (NLI) contributions, including both Self-Channel Interference (SCI)
  and Cross-Channel Interference (XCI)

The code is designed for multi-span optical links and provides detailed modeling of spatial 
power profiles (SPPs) and resulting signal-to-noise ratios (SNRs and GSNRs).

---

## Authors

- Yanchao Jiang, Pierluigi Poggiolini — Politecnico di Torino
- Technical Contributions: Yifeng Gao (Soochow University)
                           Tianchun Zhu (Politecnico di Torino)
- Sponsored by CISCO Systems


---

## File Structure

- main_PCFM_windows.m: Main execution script for Windows
- main_PCFM_linux.m: Main execution script for Linux
- PCFM_parameters.m: Parameter definitions and system setup
- /functions_windows/: MATLAB functions for Windows
- /functions_linux/: MATLAB functions for Linux
---

## Workflow Summary when main_PCFM.m is executed

### 1. Setup and Initialization
- Adds necessary paths
- Loads system parameters using `PCFM_parameters`

### 2. Spatial Power Profiles (SPPs)
- Calculates signal power evolution along each fiber span
- Fits each SPP with a 9th-degree polynomial
- Stores SPPs in `parameters_struct.SPPs_z`
- Stores polynomial coefficients in `parameters_struct.fitting_coeffi`

### 3. NLI Calculation
- `SCI_calculator`: Computes self-channel interference (SCI)
- `XCI_calculator`: Computes cross-channel interference (XCI)
- Total NLI = SCI + XCI

### 4. ASE Calculation
- `ASE_calculator`: Computes amplified spontaneous emission (ASE) noise
- Separate outputs for Raman ASE and DFA ASE

### 5. Plotting Results
- The user is asked to choose which span they want to see the results for
- Once the span has been selected, the following plots are shown for that span:
  - 3D plot of the spatial power profiles for all channels vs. distance into the span and vs. channel frequency
  - net transceiver information rate, assumed for throughput calculations
  - net throughput per channel for a receiver placed at the end of the selected span
  - 2D plot of the launch power per channel into the span, vs. frequency
  - signal-to-noise-ratio due to ASE only, for each channel, broken down into ASE from doped fiber amplifiers only, from Raman amplifiers only, and from both
  - signal-to-noise-ratio due to fiber non-linearity NLI only, for each channel, broken down into single-channel interference (SCI) only, cross-channel interference (XCI) only, and both (total NLI)
  - a final signal-to-noise-ratio plot showing it for total ASE, for total NLI and overall "GSNR" including both ASE and NLI
Note: signal-to-noise-ratios are all called "GSNRs", or "generalized signal to noise ratios", with the subscript specifying what type of noise they account for.

---

## Further Notes

- If `PCFM_SPP` fails, user can manually input `SPPs_z` and `fitting_coeffi`
- Works on both Windows and Linux (choose correct `addpath`)
- Designed for extensibility and academic use

## Pre-Loaded Example

- The file PCFM_parameters.m provided with this version describes a 10-span C+L+S system with Raman amplification
- To run the example simply execute main_PCFM.m as is
- On a standard desktop computer the example takes about 10 seconds to execute
- The result are shown as a plot of various GSNRs

---

## License

Creative Commons Attribution 4.0 International (CC BY 4.0)

---

## Reference

Please cite:
[1] Pierluigi Poggiolini and Yanchao Jiang, “Recent Advances in Real-Time Models 
for UWB Transmission Systems,” OFC2025, Tu3K.2, San Francisco, US, 2025.
[2] Y. Jiang, A. Nespola, A. Tanzi, S. Piciaccia, M. Zefreh, F. Forghieri, P. Poggiolini, 
"Experimental Test of a Closed-Form EGN Model  Over C+L Bands," in Journal of Lightwave 
Technology, vol. 43, no. 2, pp. 439-449, 2025.
[3] Y. Jiang, J. Sarkis, A. Nespola, F. Forghieri, S. Piciaccia, A. Tanzi, M. Zefreh, 
P. Poggiolini,"Optimization of Long-Haul C+L+S Systems by Means of a Closed Form EGN Model," 
in Photonics Technology Letters, vol. 36, no. 18, pp. 1129-1132, 2024.
[4] Y. Jiang, J. Sarkis, S. Piciaccia, F. Forghieri, P. Poggiolini, "Signal and Backward 
Raman Pump Power Optimization in Multi-Band Systems Using Fast Power Profile Estimation," in 
Journal of Lightwave Technology, doi: 10.1109/JLT.2025.3585684.
[5] M. Zefreh, F. Forghieri, S. Piciaccia, P. Poggiolini, "Accurate Closed-Form Real-Time
EGN Model Formula Leveraging Machine-Learning Over 8500 Thoroughly Randomized Full C-Band
Systems,” in Journal of Lightwave Technology, vol. 38, no. 18, pp. 4987-4999, 2020.

