# Modelling the Interaction of Illuminations with a Sensor Matrix Used in Vision Systems
## 2 Materials and Methods
### Simulation Test Method
Each of the above simulations are based on the Monte Carlo algorithm. The Monte Carlo method is commonly used in software to generate and analyse electromagnetic radiation [17; 18; 19; 20]. This is one of the best methods known so far for this type of calculation. How many rays we should generate to get the correct results may seem problematic. According to the literature, the number of rays emitted by the source should be increased to minimize the signal-to-noise ratio on the detector at a given resolution [19]. A typical number of rays is in the range from \(10^{5}\) to \(10^{8}\). The authors of the paper checked the parameters for the number of rays \(2\times 10^{5}\) and \(2\times 10^{9}\). Programs that use the Monte Carlo method to trace rays are used for complex optical analysis problems. The entire optomechanical system must be taken into account. In the article, however, the authors focused on a simplified model to show the problem's essence. The value of the average irradiance of the entire sensor matrix depends firstly on the number of generated rays of the light source. Also, the value of the measured average irradiance of the sensor array changes for the same number of light source rays depending on the pixel size. It should be noted that simplifying the model and limiting it to only the light source and sensor allows you to avoid such phenomena as, for example, the deflection of rays at the edges. It is true that the Monte Carlo method works well in such systems. Nevertheless, it was decided that the best solution would be to check the model in which the light beam falls directly on the sensor matrix. The \"planar\" method, available in the Speos 2023 R1 software, was used to calculate irradiance. It differs from the standard calculation of irradiance in that, in addition, the cosine of the angle between the normal to the surface and the incident radius to the surface appears in the formula. The formula for irradiance using the \"planar\" method and its graphic interpretation are given below. \[E=\frac{I\text{-}\cos(\alpha)}{R^{2}} \tag{3}\]  
where E--illuminance, I--luminous intensity in a given direction, R--distance of the centre of light from the measuring head of the lux meter, and a--angle between the normal to the surface and the radius incident to the surface (Figure 7). Figure 7: Graphical representation of the relationship between the normal to the surface and the radius incident to the surface. The table above shows that the average irradiance does not depend on the number of generated rays because the difference between the values for a different number of rays is not significant. Figure 10 presents the results of simulation tests showing sensor arrays on which irradiance values at points were recorded. The drawings also show a coloured scale. Each colour is assigned an irradiance value. The maximum value is listed. It is noticeable that with the increase in the number of rays, the maximum value recorded on the matrix at the point decreases. The uniformity of colours is also visible, which corresponds to a more even distribution of irradiance registered on the sensor matrix. Test results for the sensor on which there were pixels of 24 \(\times\) 24 \(\upmu\)m. In this case as well, it can be seen from Table 2 above that the value of the average irradiance does not depend on the number of rays generated in the simulation. The difference between the values for 2 \(\times\) 10\({}^{5}\) and 2 \(\times\) 10\({}^{9}\) average irradiance is not significant. Figure 11 presents the results of simulation tests showing sensor arrays on which irradiance values at points were recorded. The drawings also show a coloured scale. Each colour is assigned an irradiance value. The maximum value is listed. It is noticeable that with the increase in the number of rays, the maximum value recorded on the matrix at the point decreases. The uniformity of colours is also visible, which corresponds to a more even distribution of irradiance registered on the sensor matrix.