A Web-Based Interactive Application to Simulate and Correct Distortion in Multibeam Sonars

: Multibeam sonars are advanced scientific tools for estimating fish school volume and density, using multiple beams to provide comprehensive size measurements of detected targets. However, challenges remain in accurately estimating target dimensions due to beam geometric expansion and overlap, particularly in athwart-beam measurements, which tend to be overestimated with increasing distance from the transducer. We present an interactive web application that simulates distortion caused by beam overlap and expansion in multibeam sonars using simple geometric equations. Users can define sonar characteristics, such as the number of beams, swath opening, or degree of overlap, as well as specify an elliptical target’s dimensions, orientation, and distance from the transducer. The application estimates and visualises the true and distorted shapes of the target, calculating the level of distortion. It can run simulations in both forward and inverse directions, either simulating the distortion of a true school or correcting the shape of a distorted school. This tool aims to enhance the interpretation of multibeam sonar signals and improve the accuracy of target dimension estimates, facilitating more effective use of these sonars in scientific research.


Introduction
Multibeam sonars are acoustic devices that are widely used on scientific and fishing vessels.Thanks to their wide field of view, sonars allow near-surface fish schools to be efficiently identified and assessed, and can assist in purse seining manoeuvres [1].Currently, there are many types of multibeam fishery sonar systems on the market, offering different coverage, ranges, and resolutions.Omni-directional sonars have a cylindrical array of transducer elements that can be extended below the ship to project a 360 • swath of medium-low resolution at medium-long range in all directions [2,3].In other sonar systems (here referred to as multibeam echosounders), the elements are arranged in a flat transducer that is mounted on the vessel hull and provide a fan-shaped swath of medium-range and medium individual beamwidth directed to one side of the ship or downwards [4][5][6][7].Finally, imaging sonars have fan-shaped swaths made of narrower beams that provide a video-like visualisation of the targets at medium-short range [8][9][10][11].Some of these systems provide the ability to change the number of beams and aperture as well as other parameters, hence complicating the choice of the optimum set of configuration parameters depending on the model, target species, environment, and task at hand (e.g., [2,6,12,13]).In addition, most omnidirectional sonars and multibeam echosounders offer simultaneous vertical swaths to provide 3D sampling coverage.
The latest generations of multibeam sonars have been transformed from the analogue equipment of the past, which had to be processed by means of image analysis [14][15][16][17], into increasingly scientific tools able to provide quantitative estimates of fish abundance and measurements of the size of underwater targets [18,19] and reconstruct the 3D shape of fish schools [20,21].One of their main advantages is their potential to cover the full extent and provide three-dimensional size measurements of the targets they detect, thanks to the combined information from multiple beams [3,22].However, there are difficulties in exploiting the potential benefits of sonars to estimate target dimensions using their multiple beams, and their use as a quantitative tool is not yet widespread.Athwart-beam measurements are known to be less accurate than along-beam measurements, with a tendency to overestimate; this bias increases with distance from the transducer due to both beam geometric expansion and overlap between adjacent beams [16,22].
On the way to transforming multibeam sonars from fishing to scientific instruments, an essential step is the ability to estimate abundance.As part of the process of estimating abundance, it is necessary to calculate the volume of the aggregation, which is usually based on estimating the area of the insonified target on the sonar echogram.There have been several recent initiatives to take steps towards the quantitative use of multibeam sonar [18].Developments and protocols have been set up for the on-axis gain calibration of individual swath beams of some multibeam sonars [12,[23][24][25].In addition, specific data processing software to estimate the abundance (density and dimensions) of multibeam sonar data has been recently developed [3].
Various studies have been involved in reducing uncertainty and bias of the volume provided by multibeam sonars.Several complex simulations have been developed to simulate volume and athwart dimension distortion based on the simulation of the arrays of transducers [22] and on the directivity pattern of an omnidirectional sonar [26].
More recently, a method for calibrating beam overlap in multibeam sonar was developed using sonar and catch data collected in a purse seiner in commercial fishing activity [27].In the study, by comparing the catch and acoustic measurements, the degree of overlap of a particular sonar model was estimated, and simple equations based on the geometry of the equivalent beam angles of conic sections were developed for analytic correction of athwart distortion at different distances from the transducer.
The aim of this study was to carry out, based on the equations developed by [27], a simulation illustrating and correcting the lateral distortion of the sonar caused by the overlap between the beams.The simulation allows different models of multibeam sonar to be designed, varying the number of beams, the total swath opening, and the width of each individual beam, thus modifying the degree of overlap and allowing the distortion of the images produced by the sonar to be observed.The simulation was hosted on an opensource platform so that the code could be reused to add new functionality or improve the equations used.In addition, the simulation was implemented on a web-based interactive application for easy and fast manipulation of the sonar and target parameters.It is expected that this application will become a useful tool to improve the interpretation of multibeam sonar data and move towards the quantitative use of this type of equipment.

Correction of Beam Overlap Distortion
This work consists of simulating the distortion of an echogram generated by a multibeam sonar when insonifying a school of fish.The echogram was simulated as a fan-shaped arrangement of N identical individual beams, each simplified as a cone of beamwidth equal to the 3 dB equivalent beam angle (φ ang ).The individual beams were spaced at a constant angle (φ bw ), forming the fan-shaped swath.The simulation was two dimensional, depicting the cross-sectional area of the cones in the swath plane.
The angular distance between beams was defined by dividing the total swath opening, φ N , by the number of beams available to cover it.
Thus, each individual beam had an effective opening, φ ang , given by the distance from the centre of the beam to the centre of either of the adjacent beams.Due to the geometric expansion, the athwart distance between adjacent beams, Φ ang , increased with the radius, R, as follows: The athwart size, Φ w , of a given target was thus determined as the sum of the distances between the K beams detecting it: In order to take into account the finite size of the individual beams and the possible overlap between them, we used the following correction, based on [15] and expanded by [27]: There are two terms inside the parentheses that subtract from N, both of which are correction terms to remove athwart distortion.The subtraction of 1  2 was carried out so that the width of a target visible in one sample results in a measurement of half of the beam diameter at that distance.The second term subtracted from K in the parenthesis is the degree of overlap, DO, a correction term that accounts for the distortion produced by beam overlap, which occurs when the width of the individual beams, φ bw , is larger than the angular separation between consecutive beams φ ang .The degree of overlap was defined as: Hence, the degree of overlap measures the number of adjacent beams that each individual beam invades.It also coincides with (and could be defined as) the number of beams outside the true border of the target that can detect it from either side, thus causing athwart distortion on the target image produced by the sonar (Figure 1).

Figure 1.
Illustration of how beam overlap causes athwart distortion in multibeam sonars.We highlight the difference between  , the angular separation between adjacent beams (the boundaries between beams marked by grey dashed lines), and  , the width of each individual beam (bounded by a solid-line black line, with an arrow signalling the centre of the beam).In (a),  =  , there is no overlap between the beams (the degree of overlap, , is zero) and the beams outside the target are unable to detect it, hence causing no distortion.The beams that can detect the target in the absence of distortion are marked in blue.As  exceeds  , overlap occurs between adjacent beams, as shown for three increasing overlap values (b-d).The degree of overlap measures the number of beams outside the true edge of the target that can detect the aggregation from either side (Ndist), thus distorting the apparent shape of the target on the echogram from a blue filled circle to a wider red ellipse.We highlight the difference between φ ang , the angular separation between adjacent beams (the boundaries between beams marked by grey dashed lines), and φ bw , the width of each individual beam (bounded by a solid black line, with an arrow signalling the centre of the beam).In (a), φ bw = φ ang , there is no overlap between the beams (the degree of overlap, DO, is zero) and the beams outside the target are unable to detect it, hence causing no distortion.The beams that can detect the target in the absence of distortion are marked in blue.As φ bw exceeds φ ang , overlap occurs between adjacent beams, as shown for three increasing overlap values (b-d).The degree of overlap measures the number of beams outside the true edge of the target that can detect the aggregation from either side (Ndist), thus distorting the apparent shape of the target on the echogram from a blue filled circle to a wider red ellipse.
As an alternative to Equation (4), we can express Φ w, corr as a function of DO, and explicitly show the dependence on the uncorrected diameter (Φ w ):

Implementing the Simulation
A simulation was built using R [28] to illustrate and quantify the distortion caused by beam overlap in multibeam sonars.The simulation was implemented as an interactive application hosted on a public, free-access website, and was divided into several parts that accomplished different tasks: 1.
Definition of the sonar swath characteristics.

2.
Definition of the size and orientation of the elliptic target.

3.
Selection of the swath samples contained by the ellipse.4.
Identification of the overlapped samples. 5.
Representation of the simulation results.
Each part of the simulation is described below.

Definition of the Sonar Swath Characteristics
The sonar swath was built as a grid of polar coordinates.The beam angles were established at N regular intervals of φ ang (from 0 to φ N , in intervals of φ N /N, with N and φ N defined interactively by the user (Table 1)).The samples along each beam were established as a sequence of range values (R) from 0 to R max in intervals of ∆R, with ∆R and R max interactively established by the user.Using the sequences of values, the Cartesian coordinates of the simulated samples of the sonar beams were (Figure 2a):  After defining the sonar swath as a regular data frame, the variable was converted to a "geographically" referenced object (with the geographical position being the coordinates on the sonar echogram) using the spatial data package sf v1.0.14 [29,30].This was carried out to enable the selection of samples of the swath according to its position relative to the target ellipse that is defined in the next section.After defining the sonar swath as a regular data frame, the variable was converted to a "geographically" referenced object (with the geographical position being the coordinates on the sonar echogram) using the spatial data package sf v1.0.14 [29,30].This was carried out to enable the selection of samples of the swath according to its position relative to the target ellipse that is defined in the next section.

Definition of the Size and Orientation of the Elliptic Target
To maintain simplicity, the targets used in the simulation were restricted to elliptical shapes.The ellipse was built using the ggplot2 v3.4.2 graphic package in R [31], plus the geom_ellipse function from the ggforce v0.4.1 supplementary package [32].In this case, the main ellipse parameters could also be interactively set by the user (Table 1, Figure 2b).The ellipse parameters are the range of the centre of mass of the ellipse, R CM , the horizontal and vertical diameters (2a and 2b), and the orientation angle of the major axis (α).Since the angular position of the target does not affect its distortion in this version of the simulation, and to minimise the possibility of the target crossing the swath boundaries, the centre of the ellipse was at a fixed angular position at the centre of the swath.
The ellipse coordinates were extracted using the ggplot_build function and then the ellipse was converted first to a regular data frame and then to a georeferenced sf object, similar to the approach used for the sonar swath.

Selection of the Swath Samples Contained by the Ellipse
Taking advantage of the capability of the sf package, we selected those samples of the swath beams inside the area defined by the ellipse using the function st_within (Figure 2c).This step represents the identification of those of the sonar echogram samples that are detecting the target.

Identification of the Overlapped Samples
The main goal of this simulation was to estimate either (1) the true shape of a distorted target or (2) the distorted shape of a true target, based on geometric spreading and a given degree of overlap between individual sonar beams.In the simulation, the degree of overlap was interactively defined by the user.As was mentioned above in the section "Correction of overlap distortion", the DO represents the number of beams outside the true border of the target that can detect it from either side (Figure 1).According to this definition, the simulation identifies those swath samples detecting the target and then, for each range, it adds/removes the distortion in the following way (Figure 2d):

•
In forward mode, the simulation adds as many external layers around the distorted target as the DO value.

•
In inverse mode, the simulation removes as many external layers around the distorted target as the DO value.
Because the simulation can only add or remove entire beams, when DO = 1, the simulation could delete or add beams at either the left or right side of the target.In this case, the simulation was designed to do it at the left.Similarly, if the DO is an odd number, both the correction and distortion are asymmetric, with one more beam at the left side of the target.For even DO numbers, the added/subtracted beams were evenly distributed at both sides of the true target.

Estimation of Distortion
The percentage of distortion was calculated both linearly and by area.In order to estimate the athwart linear distortion percentage, we calculated: To estimate the areal distortion, we estimated the area of the target both including (A tot ) and excluding (A cor ) the samples identified as distortion.The area of the target was estimated as the sum of the areas of the individual samples in each case: where A s , the area of each sample s, was estimated as the difference of the areas of the circular sectors of the same width φ ang and ranges R s+1 − R s (Figure 3): where  , the area of each sample s, was estimated as the difference of the areas of the circular sectors of the same width  and ranges Rs+1 − Rs (Figure 3): The percentage of distortion was finally calculated as:

Representation of the Simulation Results
The main outcome of the application was a graph designed to highlight the main aspects of the simulation.The swath geometry was shown as a grid of N lines of points reaching Rmax, the ellipse was plotted as an outline, and the swath samples detecting the The percentage of distortion was finally calculated as: 2.2.6.Representation of the Simulation Results The main outcome of the application was a graph designed to highlight the main aspects of the simulation.The swath geometry was shown as a grid of N lines of points reaching R max , the ellipse was plotted as an outline, and the swath samples detecting the school were then plotted, distinguishing those belonging to the true school and those caused by the distortion.Finally, the areas of both the distorted and corrected target, as well as the percentage of distortion, were given in the title of the graph.However, to avoid providing erroneous or confusing distortion level values, when the target was outside the swath limits, these values were omitted, and the title of the graph displayed an out-of-bounds warning message.
Although this simulation was based entirely on the previous work, in which the analytical correction equations for overlap distortion were established [27], here, we opted for some differences in notation.For example, we chose to refer to the degree of overlap rather than the percentage of overlap.The reason for this change is that we believe it is more intuitive to take advantage of the fact that the degree of overlap coincides with the number of beams external to the target that are capable of activating and detecting it.Thus, the degree of overlap can be considered to directly count the number of beams that cause distortion.To correct overlap distortion, it is only necessary to subtract from the number of active beams those that were activated due to overlap and, thus, detected the target with the periphery rather than the centre of the beam.In this sense, we consider it more intuitive to talk about a degree of overlap of 2 (meaning that two beams need to be corrected), rather than a 200% overlap.

Results
The developed application can be accessed through the following link: https://gboyra.shinyapps.io/Sonar_overlap_simulator/(accessed on 31 May 2024).The graphic user interface was structured in a sidebar layout with the controls on the left panel and the results on the right.The control panel on the left part of the layout was divided in two tabs, one for the sonar characteristics and one for the target (school) characteristics (Figure 4).
The right part of the layout is wider and displays the simulation results by default (Figure 5), or, if the help switch is activated, an informative panel.By changing the sliders of the control panels, the application can be used to easily define different geometries of multibeam sonars (Figure 6), as well as different target sizes, range, and orientation.The simulation could run forwards or backwards, i.e., distorting the shape of a true school or correcting the distortion of an observed school, respectively.In principle, it was valid for both horizontal and vertical swaths, although, obviously, for each case, it would be necessary to appropriately configure the corresponding sonar characteristics.
and the results on the right.The control panel on the left part of the layout was divided in two tabs, one for the sonar characteristics and one for the target (school) characteristics (Figure 4).The right part of the layout is wider and displays the simulation results by default (Figure 5), or, if the help switch is activated, an informative panel.By changing the sliders of the control panels, the application can be used to easily define different geometries of multibeam sonars (Figure 6), as well as different target sizes, range, and orientation.The simulation could run forwards or backwards, i.e., distorting the shape of a true school or correcting the distortion of an observed school, respectively.In principle, it was valid for both horizontal and vertical swaths, although, obviously, for each case, it would be necessary to appropriately configure the corresponding sonar characteristics.
As a result of the simulations conducted when developing and testing the simulation, we were able to show that the distortion bias increases not only with the degree of overlap (Figure A1) or with decreasing number of beams (Figure A2), but also with the distance to the target (Figure A3) and, perhaps less intuitively, with the target's tilt angle (Figure A4).This was especially the case for elongated targets, which showed more distortion when the short size was oriented in the athwart direction.The reason for this is that the distortion is a function of the relationship between the degree of overlap and the number of beams detecting the target (Equation ( 8), Figure 4).This could be easily interpreted in terms of the number of beams.The percentage of distortion was observed to depend on the number of beams available to detect a target relative to the degree of overlap (i.e., the number of contiguous beams covered by each individual beam).If the number of beams of the target was similar to the degree of overlap, the distortion was high, and as the number of beams detecting the target increased, the distortion decreased (Figure A5).For     All of this was consistent with the expected pattern given by Equation ( 8), which predicted that the linear distortion caused by beam overlap, in the end, depended only on As a result of the simulations conducted when developing and testing the simulation, we were able to show that the distortion bias increases not only with the degree of overlap (Figure A1) or with decreasing number of beams (Figure A2), but also with the distance to the target (Figure A3) and, perhaps less intuitively, with the target's tilt angle (Figure A4).This was especially the case for elongated targets, which showed more distortion when the short size was oriented in the athwart direction.The reason for this is that the distortion is a function of the relationship between the degree of overlap and the number of beams detecting the target (Equation ( 8), Figure 4).This could be easily interpreted in terms of the number of beams.The percentage of distortion was observed to depend on the number of beams available to detect a target relative to the degree of overlap (i.e., the number of contiguous beams covered by each individual beam).If the number of beams of the target was similar to the degree of overlap, the distortion was high, and as the number of beams detecting the target increased, the distortion decreased (Figure A5).For example, a degree of overlap of 4 produced a linear overestimation bias of 11% for a target detected by 40 beams, a 25% bias for a target detected by 20 beams, and a 100% bias for a target detected by 8.5 beams.
All of this was consistent with the expected pattern given by Equation ( 8), which predicted that the linear distortion caused by beam overlap, in the end, depended only on two parameters: the degree of overlap, DO, and the size of the target in terms of numbers of beams, K (Figure 7).
two parameters: the degree of overlap, , and the size of the target in terms of numbers of beams, K (Figure 7).

Discussion
An application was developed to demonstrate the effect of distortion produced by beam overlap in multibeam sonars through simulation.The application was designed as a simple tool to improve the interpretation of multibeam sonar echograms, centred specifically on the visualisation and quantification of distortion caused by overlap between beams.The current version was specifically developed with the tuna fleet skippers in mind, who use long-and medium-range omnidirectional sonars for searching tuna schools during their fishing trips, as well as laterally oriented multibeam echosounders for abundance estimation and assistance in fishing manoeuvres.Another intended use was to assist in selecting the most useful configuration of parameters and settings for the multibeam echosounders, such as the Simrad SN90 [6] or the iXblue Seapix [7], which allow for the selection of multiple characteristics, such as the number of beams or the total swath opening.
The design of the web-based interactive application aims to easily reproduce the targets observed in a real sonar echogram and assist in their interpretation.In particular, the main objective was to help users assess the potential overestimation of school size and abundance due to overlap, and to identify the factors that potentially increase this overlap-based distortion and bias.The application is intended to be used by fishing professionals, multibeam sonar users, students of underwater acoustics, or researchers looking for the appropriate instrument for an acoustic experiment.Because it is open source, the application could be expanded by other users, increasing the simulation complexity to make it more realistic, or adding new functionalities.For instance, sonar parameters and defined targets can be easily adjusted to focus on the range of specific sonars (e.g., a

Discussion
An application was developed to demonstrate the effect of distortion produced by beam overlap in multibeam sonars through simulation.The application was designed as a simple tool to improve the interpretation of multibeam sonar echograms, centred specifically on the visualisation and quantification of distortion caused by overlap between beams.The current version was specifically developed with the tuna fleet skippers in mind, who use long-and medium-range omnidirectional sonars for searching tuna schools during their fishing trips, as well as laterally oriented multibeam echosounders for abundance estimation and assistance in fishing manoeuvres.Another intended use was to assist in selecting the most useful configuration of parameters and settings for the multibeam echosounders, such as the Simrad SN90 [6] or the iXblue Seapix [7], which allow for the selection of multiple characteristics, such as the number of beams or the total swath opening.
The design of the web-based interactive application aims to easily reproduce the targets observed in a real sonar echogram and assist in their interpretation.In particular, the main objective was to help users assess the potential overestimation of school size and abundance due to overlap, and to identify the factors that potentially increase this overlap-based distortion and bias.The application is intended to be used by fishing professionals, multibeam sonar users, students of underwater acoustics, or researchers looking for the appropriate instrument for an acoustic experiment.Because it is open source, the application could be expanded by other users, increasing the simulation complexity to make it more realistic, or adding new functionalities.For instance, sonar parameters and defined targets can be easily adjusted to focus on the range of specific sonars (e.g., a specialised version for omnidirectional sonars or imaging sonars could be developed).The application should also be useful to, for example, estimate the overestimation that occurs when assessing the abundance of a school of tuna at 1100 m with a low-frequency omni-directional sonar, or to decide which model and frequency of acoustic camera to use when assessing the size of 30 to 40 cm long sea bream in aquaculture cages.
The simulation developed here does not take into account a number of factors present in real multibeam sonars.For example, it simplifies each individual beam of the swath from its complex lobular sensitivity pattern (see, for example, [2]), to the two-dimensional cross section of the 3 dB equivalent beam angle cone.Hence, the sonar echogram was designed as the concatenation of a series of contiguous conical beams, spaced at a constant angle and all having the same beamwidth, forming a fan-shaped swath.In addition, the samples did not take a value proportional to the volumetric density (s V ) [33].The samples of each sonar beam could only take two values to indicate whether each sample had true or false target detection status.In this sense, as currently designed, the simulation does not accept fractional degrees of overlap; the overlap can only be an integer, and the simulation adds or removes entire beams.Finally, any aspect related to the operating frequency of the sonar or extinction of the signal with range are also ignored.
This simulation uses a simpler approach than that of other simulations developed to simulate sonar data.In one of the closest precedents and inspiration for this work [22], the focus was on simulating the arrays of transducer elements of an omnidirectional sonar and then the transmitted echo amplitude targeting an idealised spherical, homogeneous school.In our study, despite the loss in detail, the simulation seemed to be able to capture the main patterns when applied to similarly simplified (but two-dimensional) targets.As an advantage, our simulation should be considerably faster to run and modify, being perhaps useful for the preliminary inspection of sonar geometries before conducting more complex and time-consuming simulations.
This study employed a simpler simulation than a previous study by [26].In the previous study, a spheroidal school at a fixed depth and increasing detection ranges was simulated, composed of random target strength values throughout the volume.The simulated schools were then visualised with a virtual multibeam sonar simulated in 3D from the directivity pattern of the omnidirectional sonar on which it is based: a Simrad SP90 of 64 beams, with φ ang = 5.625 • and φ ang = 11.25 • (i.e., a DO of 1 beam), projected with a tilt angle of 5 • .In this way, they could simulate virtual sonar reception by calculating the sonar samples that received the target signal with two different thresholds.By comparing the area of the horizontal cross section of the true school with the area of the school observed on the sonar echogram, they estimated the distortion caused by beam overlap, geometric spreading, acoustic signal extinction, and other factors, such as the greater or lesser coverage of the school different ranges given the fixed tilt of the 3D beam, which caused most of it to be below the beam at close ranges.
In this study, we simulated the characteristics of the same omnidirectional sonar as [26] and calculated the distortion caused by beam overlap and geometric spreading, comparing the distortion obtained by both simulations.As a result, similar trends of distortion with range were obtained by both simulations, with values very close to the previous simulation at the lowest threshold (Figure 8).In fact, the difference between the two simulations was smaller than the difference between the results of the previous simulation at the two threshold levels applied.This shows that the main patterns were captured by our simulation despite its simplification, and highlights the importance of the threshold that is inherent in the concept of beam overlap distortion.Note that the comparison was only made for intermediate ranges, because at the shortest range (100 m) in the simulation by [26], most of the school was outside or below the swath, and at further ranges (700 to 800 m), the extinction of the acoustic signal was taken into account.
In the future, we plan to add new functionality to the simulation.A first improvement would be to add an abundance s V value to each of the samples instead of the current binary value.This would greatly increase the quantitative potential of the simulation, allowing for abundance estimates.This would also open up the possibility of defining the simulated schools as being made up of different species (such as tuna or anchovies), as carried out by other studies [34,35], using different TS backscattering models (e.g., [36]).Another inter-esting addition would be to improve the representation of the swath, switching from the circles representing the centre of each sample to more realistic circular sectors, accounting for their shape.In the future, we plan to add new functionality to the simulation.A first improvement would be to add an abundance sV value to each of the samples instead of the current binary value.This would greatly increase the quantitative potential of the simulation, allowing for abundance estimates.This would also open up the possibility of defining the simulated schools as being made up of different species (such as tuna or anchovies), as carried out by other studies [34,35], using different TS backscattering models (e.g., [36]).Another interesting addition would be to improve the representation of the swath, switching from the circles representing the centre of each sample to more realistic circular sectors, accounting for their shape.

•
The objective of the developed application was to simulate the distortion effects caused by beam overlap in multibeam sonars, with a particular emphasis on assisting users in interpreting multibeam sonar echograms and quantifying the distortion caused by beam overlap (https://gboyra.shinyapps.io/Sonar_overlap_simulator/,accessed on 31 May 2024).

•
The web-based interactive application aims to replicate real sonar echogram targets for easy interpretation, focusing on identifying overlap-induced distortion and factors influencing it.

•
As the application is open source, it can be expanded by other users, increasing the complexity of the simulation and making it more realistic, or adding new functionalities.

•
The application was designed for fishermen and scientists using multibeam sonars and echosounders for both commercial and research purposes, aiding in interpreting sonar data and optimising sonar configurations and settings.

Conclusions
• The objective of the developed application was to simulate the distortion effects caused by beam overlap in multibeam sonars, with a particular emphasis on assisting users in interpreting multibeam sonar echograms and quantifying the distortion caused by beam overlap (https://gboyra.shinyapps.io/Sonar_overlap_simulator/ or https://aztigps.shinyapps.io/MultibeamSonarOverlapSimulation/,accessed on 31 May 2024).• The web-based interactive application aims to replicate real sonar echogram targets for easy interpretation, focusing on identifying overlap-induced distortion and factors influencing it.• As the application is open source, it can be expanded by other users, increasing the complexity of the simulation and making it more realistic, or adding new functionalities.• The application was designed for fishermen and scientists using multibeam sonars and echosounders for both commercial and research purposes, aiding in interpreting sonar data and optimising sonar configurations and settings.• The simulation simplifies 3D sonar beams to a two-dimensional cross section, providing a faster and more manageable tool for the preliminary inspection of sonar geometries compared to more complex simulations.

•
Despite the simplified simulation, it effectively captured main distortion patterns caused by beam overlap, showcasing its potential utility for users in assessing and mitigating distortion effects in multibeam sonar data analysis.

Figure 1 .
Figure 1.Illustration of how beam overlap causes athwart distortion in multibeam sonars.We highlight the difference between φ ang , the angular separation between adjacent beams (the boundaries

Figure 2 .
Figure 2. (a) Example of a simulated sonar swath with the following combination of parameters:  = 120°, N = 32 beams,  = 500 m, and ∆ = 25 m.(b) The defined swath plus an ellipse with the following parameters: RCM = 260 m, a = 250 m, b = 100 m, α = 0°.(c) The defined swath after selecting and marking in red the samples that are inside the ellipse.(d) The swath samples distinguishing the samples belonging to the true school (in blue), to the distorted part of the school (in red), and to neither (in black).

Figure 2 .
Figure 2. (a) Example of a simulated sonar swath with the following combination of parameters: θ BW = 120 • , N = 32 beams, R max = 500 m, and ∆R = 25 m.(b) The defined swath plus an ellipse with the following parameters: R CM = 260 m, a = 250 m, b = 100 m, α = 0 • .(c) The defined swath after selecting and marking in red the samples that are inside the ellipse.(d) The swath samples distinguishing the samples belonging to the true school (in blue), to the distorted part of the school (in red), and to neither (in black).

Figure 3 .
Figure 3. Area of each sample defined as the difference between the areas of the circular sectors defined by the opening angle

Figure 3 .
Figure 3. Area of each sample defined as the difference between the areas of the circular sectors defined by the opening angle φ ang and the ranges R s+1 and R s .

Figure 4 .
Figure 4. Controls for operating and entering the simulation parameters in the graphic user interface of the web-based application, where the user can define the parameters to run the simulation.Panel (a) displays the controls to simulate the sonar swath; panel (b) displays the controls to simulate the target.At the bottom part of both is the switch to access the Help information panel: if turned on, the main part of the app will display some text explaining the simulation and providing links to the literature used.

Figure 4 .
Figure 4. Controls for operating and entering the simulation parameters in the graphic user interface of the web-based application, where the user can define the parameters to run the simulation.Panel (a) displays the controls to simulate the sonar swath; panel (b) displays the controls to simulate the target.At the bottom part of both is the switch to access the Help information panel: if turned on, the main part of the app will display some text explaining the simulation and providing links to the literature used.J. Mar.Sci.Eng.2024, 12, x FOR PEER REVIEW 9 of 17

Figure 5 .
Figure 5. Main display of the simulation results in the graphic user interface of the web-based application to run the simulation displaying the different types of samples (SampleType) in a sonar echogram: those of the true target (School) and the distorted ones (Distortion).The graph title presents information on the true and observed areas, and the estimated percentage of distortion.The central part shows the true and apparent shapes of the simulated target.The text boxes at the bottom inform about the estimated values of distance between beams ( ) and individual beamwidth ( ).

Figure 5 .
Figure 5. Main display of the simulation results in the graphic user interface of the web-based application to run the simulation displaying the different types of samples (SampleType) in a sonar echogram: those of the true target (School) and the distorted ones (Distortion).The graph title presents information on the true and observed areas, and the estimated percentage of distortion.The central part shows the true and apparent shapes of the simulated target.The text boxes at the bottom inform about the estimated values of distance between beams (φ ang ) and individual beamwidth (φ bw ).

Figure 5 .
Figure 5. Main display of the simulation results in the graphic user interface of the web-based application to run the simulation displaying the different types of samples (SampleType) in a sonar echogram: those of the true target (School) and the distorted ones (Distortion).The graph title presents information on the true and observed areas, and the estimated percentage of distortion.The central part shows the true and apparent shapes of the simulated target.The text boxes at the bottom inform about the estimated values of distance between beams ( ) and individual beamwidth ( ).

Figure 6 .
Figure 6.Main application panel showing different sonar geometries, with different swath opening angles (from left to right,  = 65° and 360°).

Figure 7 .
Figure 7. Evolution of the linear athwart distortion as a function of K, the number of beams detecting the target, and the degree of overlap.For large numbers of beams, the distortion tends to zero regardless of the overlap.

Figure 7 .
Figure 7. Evolution of the linear athwart distortion as a function of K, the number of beams detecting the target, and the degree of overlap.For large numbers of beams, the distortion tends to zero regardless of the overlap.

17 Figure 8 .
Figure 8.Comparison of the ratio of true (A0) and distorted (Aobs) cross-sectional areas of the simulated schools as a function of detection range.The sonar and target configurations of the simulation experiment conducted by[26] were reproduced and simulated with the application developed in this study.The distortion results with this simulation (Ratio) were compared with those obtained with their simulation at two different threshold values (R_36dB and R_41dB).

Figure 8 .
Figure 8.Comparison of the ratio of true (A0) and distorted (Aobs) cross-sectional areas of the simulated schools as a function of detection range.The sonar and target configurations of the simulation experiment conducted by [26] were reproduced and simulated with the application developed in this study.The distortion results with this simulation (Ratio) were compared with those obtained with their simulation at two different threshold values (R_36dB and R_41dB).

Figure A2 .
Figure A2.Main application panel showing the same target displayed by a simulated sonar with increasing number of beams (from left to right and from top to bottom, N = 16, 32, 48, 64 beams).

Figure A3 .
Figure A3.Main application panel showing the same target displayed by a simulated sonar with increasing target range (from left to right and from top to bottom, RCM = 100, 200, 300, 400 m).

Figure A2 . 17 Figure A2 .
Figure A2.Main application panel showing the same target displayed by a simulated sonar with increasing number of beams (from left to right and from top to bottom, N = 16, 32, 48, 64 beams).

Figure A3 .
Figure A3.Main application panel showing the same target displayed by a simulated sonar with increasing target range (from left to right and from top to bottom, RCM = 100, 200, 300, 400 m).

Figure A3 .
Figure A3.Main application panel showing the same target displayed by a simulated sonar with increasing target range (from left to right and from top to bottom, RCM = 100, 200, 300, 400 m).

Figure A4 .
Figure A4.Main application panel showing the same target displayed by a simulated sonar with increasing major axis angle (from left to right and from top to bottom, α = 0°, 30°, 60°, 90°).

Figure A5 .
Figure A5.Main application panel showing a target with increasing horizontal diameter displayed by the same simulated sonar (from left to right and from top to bottom, Φ = 100, 150, 200, 250 m).

Figure A4 .
Figure A4.Main application panel showing the same target displayed by a simulated sonar with increasing major axis angle (from left to right and from top to bottom, α = 0°, 30°, 60°, 90°).

Figure A5 .
Figure A5.Main application panel showing a target with increasing horizontal diameter displayed by the same simulated sonar (from left to right and from top to bottom, Φ = 100, 150, 200, 250 m).

Figure A5 .
Figure A5.Main application panel showing a target with increasing horizontal diameter displayed by the same simulated sonar (from left to right and from top to bottom, Φ w = 100, 150, 200, 250 m).

Table 1 .
List of simulation parameters, regarding the definition of both the sonar and the target, interactively entered by the user.

Table 1 .
List of simulation parameters, regarding the definition of both the sonar and the target, interactively entered by the user.