Hi Aditya,
Here are the steps to generate a flat-top smooth beam profile while propagating a Gaussian beam through a single-mode fibre in MATLAB:
- Start by defining the relevant parameters for the simulation, such as the wavelength of the beam, radius of the fibre core, length of the fibre, initial beam radius, desired output beam radius, and resolution of the simulation grid.
- Generate a grid of points using the 'linspace' function to cover the spatial extent of the fibre core. Then, use 'meshgrid' to create a 2D grid of x and y coordinates.
- Generate the initial Gaussian beam profile by computing the intensity distribution using the equation for a Gaussian beam.
- Propagate the input beam through the fibre in small steps. For each propagation step, calculate the beam waist at the current position using the equation for a Gaussian beam. Apply the beam propagation using the beam propagation method (BPM) or angular spectrum method (ASM) by multiplying the input beam with a phase factor that accounts for the propagation.
- After the beam has propagated through the fibre, crop the output beam by setting the intensity to zero outside the desired output beam radius.
- Plot the resulting beam profile using the 'imagesc' function
I hope this solves your query.