{'fraction_non_alphanumeric': 0.019100431300061615, 'fraction_numerical': 0.0024645717806531116, 'mean_word_length': 5.059701492537314, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Design optimization of two concatenated long period waveguide grating devices for an application specific target spectrum.

We propose a global optimization method to optimize the parameters of two concatenated long period waveguide gratings (LPWGs) for generating a desired target spectrum. The design consists of two concatenated LPWGs with different grating periods inscribed in the guiding films of a four-layer planar waveguide with finite over cladding. We have used the transfer matrix method to compute the modes of the structure and the coupled mode theory to compute the spectrum of the device. The adaptive particle swarm optimization method has been used to optimize the parameters of LPWGs to generate symmetric as well as asymmetric target spectra. Two concatenated gratings of different lengths and periods have been used to generate the target spectra. To demonstrate the method of optimization we have designed a variety of wavelength filters including a rectangular shape rejection band filter, asymmetric band rejection filters, band rejection filters for flattening the amplified spontaneous emission (ASE) spectrum of an erbium doped fiber amplifier (EDFA), and a gain equalization filter for an erbium doped waveguide amplifier (EDWA) in the C-band. Seven parameters of the proposed LPWG structure have been optimized to achieve the desired spectra. We have obtained an ASE flattening with ±0.8  dB peak-to-peak ripple in case of the EDFA and gain flattening with ±0.4  dB peak-to-peak ripple in case of an EDWA. The study would be useful in the design of wavelength filters for specific applications.