NLS-MB¶
# soliton
python NLS-MB_optical_soliton.py mode=eval EVAL.pretrained_model_path=https://paddle-org.bj.bcebos.com/paddlescience/models/NLS-MB/NLS-MB_soliton_pretrained.pdparams
# rogue wave
python NLS-MB_optical_rogue_wave.py mode=eval EVAL.pretrained_model_path=https://paddle-org.bj.bcebos.com/paddlescience/models/NLS-MB/NLS-MB_rogue_wave_pretrained.pdparams
| Pretrained Model | Metrics |
|---|---|
| NLS-MB_soliton_pretrained.pdparams | Residual/loss: 0.00000 Residual/MSE.Schrodinger_1: 0.00000 Residual/MSE.Schrodinger_2: 0.00000 Residual/MSE.Maxwell_1: 0.00000 Residual/MSE.Maxwell_2: 0.00000 Residual/MSE.Bloch: 0.00000 |
| NLS-MB_optical_rogue_wave.pdparams | Residual/loss: 0.00001 Residual/MSE.Schrodinger_1: 0.00000 Residual/MSE.Schrodinger_2: 0.00000 Residual/MSE.Maxwell_1: 0.00000 Residual/MSE.Maxwell_2: 0.00000 Residual/MSE.Bloch: 0.00000 |
1. Background Introduction¶
Nonlinear localized wave dynamics, as an important branch of nonlinear science, covers basic forms of nonlinear localized waves such as solitons, breathers and rogue waves. Laser mode-locking technology provides an experimental verification platform for these theoretically predicted nonlinear localized waves. Through this technology, people have observed rich nonlinear phenomena such as soliton molecules and rogue waves, further promoting the research of nonlinear localized waves. Currently, research in this field has penetrated into many physical fields such as fluid mechanics, nonlinear optics, Bose-Einstein condensation (BEC), and plasma physics. In the field of optical fibers, the research of nonlinear dynamics is based on the principles of optical fiber optical devices, information processing, material design and signal transmission, and has played a key role in the development of fiber lasers, amplifiers, waveguides and communication technologies. The propagation dynamics of optical pulses in optical fibers are governed by nonlinear partial differential equations (such as the nonlinear Schrödinger equation NLSE). When dispersion and nonlinear effects coexist, these equations are often difficult to solve analytically. Therefore, the split-step Fourier method and its improved versions are widely used to study nonlinear effects in optical fibers. Its advantage lies in simple implementation and high relative accuracy. However, for long-distance and highly nonlinear scenarios, in order to meet accuracy requirements, the step size of the split-step Fourier method must be significantly reduced, which undoubtedly increases computational complexity, resulting in a huge number of grid point sets in the time domain and a long calculation process. PINN shows better performance than data-driven methods with much less data, and the computational complexity (expressed in multiples) is usually two orders of magnitude lower than SFM.
2. Problem Definition¶
In erbium-doped fiber, the propagation properties of optical pulses can be described by the coupled NLS-MB equations, which have the form
Among them, x, t represent the normalized propagation distance and time respectively, the complex envelope E is the slowly varying electric field, p is the measure of polarization of the resonant medium, \(\eta\) represents the degree of population inversion, and the symbol * represents complex conjugation. \(\alpha_1\) is the group velocity dispersion parameter, \(\alpha_2\) is the Kerr nonlinearity parameter, and is the offset measuring the resonance frequency. The NLS-MB system was first proposed by Maimistov and Manykin to describe the propagation of ultrashort pulses in Kerr nonlinear media. This system also plays an important role in solving the problem that optical fiber loss limits its transmission distance. In this equation, it describes the mixed state of self-induced transparency solitons and NLS solitons, called SIT-NLS solitons. These two types of solitons can coexist, and there have been many studies on their application in optical fiber communications.
2.1 Optical soliton¶
In the anomalous dispersion region of optical fibers, due to the interaction of dispersion and nonlinear effects, a very compelling phenomenon can be produced - optical solitons. "Soliton" is a special wave packet that can transmit long distances without deformation. Solitons have been widely studied in many branches of physics. The solitons in optical fibers discussed in this case not only have basic theoretical research value, but also have practical applications in optical fiber communications.
We consider the computational domain as \([−1, 1] × [−1, 1]\). We first determine the optimization strategy. There are \(200\) points on each boundary, i.e., \(N_b = 2 × 200\). In order to calculate the equation loss of NLS-MB, \(20,000\) points are randomly selected within the domain.
2.2 Optical rogue wave¶
Optical rogue waves are a phenomenon in optics, similar to rogue waves in the ocean, but in optical systems. They are light waves that appear suddenly and have unusually high amplitudes. Optical rogue waves have some potential applications, especially in the fields of optical communications and laser technology. Some studies suggest that they can be used to enhance the transmission and processing of optical signals, or to generate ultrashort pulse lasers. We consider the computational domain as \([−0.5, 0.5] × [−2.5, 2.5]\)
3. Problem Solving¶
Next, we will explain how to convert the problem into PaddleScience code step by step and solve the problem using deep learning methods. In order to quickly understand PaddleScience, only key steps such as model construction, equation construction, and computational domain construction are described below, while other details please refer to API Documentation.
3.1 Model Construction¶
This paper uses the classic PINN MLP model for training.
3.2 Equation Construction¶
Since Optical soliton uses the NLS-MB equation, NLSMB built in PaddleScience can be used directly.
3.3 Computational Domain Construction¶
In this paper, the Optical soliton problem acts on the spatiotemporal region of space (-1.0, 1.0), time (-1.0, 1.0),
so the spatiotemporal geometry time_interval built in PaddleScience can be used directly as the computational domain.
3.4 Constraint Construction¶
Since the dataset is an analytical solution, we first construct the analytical solution function
3.4.1 Interior Point Constraint¶
Taking InteriorConstraint acting on internal points as an example, the code is as follows:
The first parameter of InteriorConstraint is the equation (system) expression, used to describe how to calculate the constraint target. Here, fill in equation["NLS-MB"].equations instantiated in the 3.2 Equation Construction chapter;
The second parameter is the target value of the constraint variable. In this problem, it is hoped that each equation of NLS-MB is optimized to 0;
The third parameter is the computational domain on which the constraint equation acts. Here, fill in geom["time_interval"] instantiated in the 3.3 Computational Domain Construction chapter;
The fourth parameter is the sampling configuration on the computational domain. Here batch_size is set to 20000.
The fifth parameter is the loss function. Here the commonly used MSE function is selected, and reduction is set to "mean", that is, the mean square error of all data points involved in the calculation will be calculated;
The sixth parameter is the name of the constraint condition. Each constraint condition needs to be named for subsequent indexing. Here it is named "EQ".
3.4.2 Boundary Constraint¶
Since our boundary points and initial value points have analytical solutions, we use supervised constraints
3.5 Hyperparameter Setting¶
Next, the number of training epochs and learning rate need to be specified. Here, based on experimental experience, 50,000 training epochs and an initial learning rate of 0.001 are used.
3.6 Optimizer Construction¶
The training process will call the optimizer to update model parameters. Here, the more commonly used Adam optimizer is selected.
3.7 Validator Construction¶
Usually during the training process, the training status of the current model is evaluated using the validation set (test set) at a certain epoch interval, so ppsci.validate.GeometryValidator is used to construct the validator.
3.8 Visualizer Construction¶
After the model training is completed, we can take points in the computational domain for prediction, manually calculate the amplitude, and visualize the results.
3.9 Model Training, Evaluation and Visualization¶
3.9.1 Training with Adam¶
After completing the above settings, you only need to pass the instantiated objects to ppsci.solver.Solver in order, and then start training, evaluation, and visualization.
3.9.2 Fine-tuning with L-BFGS [Optional]¶
After training with the Adam optimizer, we can replace the optimizer with the second-order optimizer L-BFGS to continue training for a small number of epochs (here we use 10% of the Adam optimization epochs), thereby further improving model accuracy.
Tip
After training with conventional optimizers, using L-BFGS to fine-tune for a small number of epochs can effectively further improve model accuracy in most scenarios.
4. Complete Code¶
| NLS-MB_optical_soliton.py | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 | |
5. Result Display¶
5.1 optical_soliton¶
5.2 optical_rogue_wave¶
It can be seen that the PINN prediction results are basically consistent with the analytical solution results.

