## 3 Results and Discussion
### Terawatt-Attosecond Soft X-ray Pulse Generation Tables and Schemes  
The generation of attosecond soft X-ray XFEL pulse has also been investigated. In the soft X-ray beamline of PAL-XFEL, the electron beam has an energy of 3.15 GeV with a bunch charge of 200 pC and an average current of 2.0 kilo-ampere (kA). The electron-bunch is 66 fs long with a normalized emittance of 0.3 mm-mrad and an uncorrelated energy spread of 0.01%. A series of simulations similar to those for the hard X-ray XFEL has been carried out. Figure 7a shows the current distribution after the modulator-chicane section. The black-dotted line represents the spoiled part by a slotted foil, and the central part (red line) shows the unspoiled part of the electron beam, which is chosen for radiation amplification. To generate this comb-like current profile, an optical laser at 1200 nm with a 65 fs pulse duration and 26 GW power is used for energy modulation in electron beam using a two-period modulator of 50 cm wiggler period. For the current modulation, a magnetic chicane of R\({}_{56}\sim\)0.11 mm is used. In total, 13 UMs are used for amplification. Each UM is 4.9 m long with a 3.4 cm undulator period. Figure 7b shows the temporal profile of the output radiation power after the first 3 UMs. The first three UMs without the delay of the electron beam are optimized, at the expense of radiation power, for minimum energy spread and a short pulse length. Figure 7c shows a solitary radiation pulse of 0.75 TW and 258 attosecond pulse duration in a 60 m long uniform undulator that includes 13 UMs and the drift sections. The radiation power can be increased up to 1.3 TW in a tapered undulator and to a 230 attosecond pulse duration, as shown in Figure 7d. This power corresponds to 0.3 mJ of energy (or \(1\times 10^{12}\) photons) per pulse. Figure 7: (**a**) Current modulation of an electron beam of 3.15 GeV energy. The dashed-black line shows the spoiled section, and the red line is the unspoiled section of the current profile. The snapshot of the radiation pulse amplification (**b**) after 3 UMs; (**c**) after 13 UMs in a uniform undulator; and (**d**) after 13 UMs in a tapered undulator. A stepwise tapering (Equation (1)) is applied along UM7-UM13 modules of the soft X-ray undulator to maximize the radiation power. Figure 8a shows the tapering of K parameter applied along the undulator in the soft X-ray case. Optimal values for the soft X-ray case are as follows: K\({}_{0}\) = 1.8940, k = 6, and a and b are optimized by multi scans to maximize the output radiation power. Figure 8b shows the electron-beam energy spread at various places: the black line at the entrance of the undulator, the blue-dotted line at the undulator exit in the uniform undulator, and the red line at the undulator exit in the tapered undulator. The effect of the electron beam's shot noise on the peak power of soft X-ray pulse and the pulse length is tested. The simulation was performed for 10 different random seeds, whose results are shown in Figure 9a. The black curve with errors shows the radiation power for 10 different random seeds in a uniform undulator. The average power (black curve) after 13 UM stage amplification is 0.8 \(\pm\) 0.1 TW, and the average pulse duration is 260 \(\pm\) 20 attosecond FWHM. Simulations in a tapered undulator show that the average power (red curve and errors) after 13 UM stage amplification is 1.4 \(\pm\) 0.2 TW, while the average pulse duration is 230 \(\pm\) 20 attosecond FWHM. From Figure 9a, it is clear that the radiation growth is not saturated even after 13 UMs. Therefore, the radiation power can be further increased if more UMs are added. Figure 9b shows the radiation spectra for a uniform (black curve) and a tapered (red curve) undulator. Note that the radiation spectrum in case of a tapered undulator (red curve) is broader and shows one additional mode due to the tapering of the K parameter.