Skip to content
Edit this page

Tutorial: plan a DWDM path

In this tutorial you'll plan one 400G wavelength across a small metro ROADM network: choose its channel, build the network, check the path against the transceiver, and draw the result. It uses optical.grid, optical.filters, optical.interfaces and network.roadm.

Each code block is a Python session you can follow along in, and each one is run as a test, so the output shown here is what you'll see.

Choose a channel

DWDM channels sit on the ITU-T G.694.1 grid, anchored at 193.1 THz. A 400ZR signal needs a 75 GHz flexible-grid slot. slot_at() checks that a centre and width fall on the grid:

>>> from ictdesigntools.optical import grid
>>> slot = grid.slot_at(193.1, 75)
>>> slot
Slot(n=0, m=6)
>>> round(slot.centre_nm, 2), grid.band(slot.centre_nm)
(1552.52, 'C')

A slot is n steps of 6.25 GHz from the anchor, and m steps of 12.5 GHz wide. Before you add a neighbour, check the plan for overlaps:

>>> grid.check_plan([slot, grid.slot_at(193.175, 75)])
[]
>>> grid.check_plan([slot, grid.slot_at(193.15, 75)])
['Slots at 193.10000 and 193.15000 THz overlap.']

Build the network

Four route-and-select ROADMs, A to D, joined in a ring. Each has a pre-amplifier on its input degrees and a booster on its outputs, with a 5.5 dB noise figure. Each link is G.652.D fibre with 1.5 dB allowed for connections and splices:

>>> from ictdesigntools.optical.osnr import Amplifier
>>> from ictdesigntools.network.roadm import Network, Link, route_and_select
>>> amp = Amplifier(nf_db=5.5)
>>> net = Network()
>>> for name in ["A", "B", "C", "D"]:
...     net.add(route_and_select(name, passband_ghz=75, preamp=amp, booster=amp))
>>> net.link("A", "B", Link("G.652.D", 40, extra_loss_db=1.5))
>>> net.link("B", "C", Link("G.652.D", 35, extra_loss_db=1.5))
>>> net.link("C", "D", Link("G.652.D", 30, extra_loss_db=1.5))
>>> net.link("A", "D", Link("G.652.D", 150, extra_loss_db=1.5))
>>> net.route("A", "D"), net.degree("A")
(('A', 'B', 'C', 'D'), 2)

The shortest route by length runs through B and C (105 km) rather than over the direct 150 km link.

Follow the wavelength

path() follows the channel from A's add port to D's drop port:

>>> path = net.path("A", "D", wavelength_nm=slot.centre_nm)
>>> path.length_km, round(path.fibre_loss_db, 1), path.filter_loss_db
(105.0, 36.0, 44.0)
>>> round(path.latency_us), round(path.osnr.osnr_db, 1), path.received_dbm
(514, 32.9, -10.0)

The fibre loss uses the G.652.D maximum attenuation at the channel's wavelength. The filter loss is every WSS and mux pass on the way. The amplifiers make up both, and the OSNR adds up the noise each one contributes.

Check it against the transceiver

OIF 400ZR needs 26 dB of OSNR, so there's plenty of margin:

>>> from ictdesigntools.optical.interfaces import interface
>>> zr = interface("400zr")
>>> zr.osnr_db, round(path.osnr.osnr_db - zr.osnr_db, 1)
(26, 6.9)

But every WSS pass narrows the passband a little, and the path crosses six of them. A 400ZR signal is about 60 GHz wide:

>>> from ictdesigntools.optical.filters import check_passband
>>> fit = check_passband(path.filters, signal_ghz=60)
>>> fit.passes, round(fit.passband_ghz, 1), round(fit.margin_ghz, 1)
(False, 55.6, -4.4)

Why it fails

One 75 GHz WSS passes the signal easily, but six in a row leave a 55.6 GHz passband. The narrowing is worked out from a planning approximation of the filter shape: confirm with the WSS data sheet before you rely on it.

A wider slot fixes it. Rebuild the nodes with 87.5 GHz passbands and check again:

>>> for name in ["A", "B", "C", "D"]:
...     net.add(route_and_select(name, passband_ghz=87.5, preamp=amp, booster=amp))
>>> wide = net.path("A", "D", wavelength_nm=grid.slot_at(193.1, 87.5).centre_nm)
>>> fit = check_passband(wide.filters, signal_ghz=60)
>>> fit.passes, round(fit.passband_ghz, 1)
(True, 64.9)

Draw it

path_drawing() draws the path as a span diagram over a chart of the channel's power along it, ready to write as SVG, PDF or DXF:

>>> from ictdesigntools.network.roadm import path_drawing
>>> from ictdesigntools.draw import svg_file
>>> svg = svg_file(path_drawing(wide))
>>> svg.startswith(b"<?xml") or svg.startswith(b"<svg")
True

What's next