# Active Control Loop of the BOROWIEC SLR Space Debris Tracking System
## 4 Experiment
### Active Control Loop Tests  
The system was equipped with an additional RCS'' telescope, which enabled image acquisition for active control loop. A planetary-type camera with a USB3 interface was selected, which provided images for further processing. Knowing the physical parameters of the CMOS sensor in the form of the matrix size and pixel size, in combination with the telescope parameters, it was possible to determine the field of view of such a set  
Figure 8: Cassegrain telescope in the \(Az/El\) configuration—hybrid laser system.  
and its optical resolution. The selected ASI 1600 MMC camera provided a field of view of 0.63\({}^{\circ}\)\(\times\) 0.48\({}^{\circ}\) (37.83\({}^{\prime}\)\(\times\) 28.59\({}^{\prime}\)). This value made it possible to carry out an active control loop test using the extraction of the object's position from the image frame and the determination of its positional offset in relation to the telescope axes. The OpenCV package was used for image analysis. By analyzing successive image frames, the object's position offset expressed in pixels in relation to the origin of the coordinate plane was determined, which is the intersection of the \(X\) and \(Y\) axes (Figure 9).  
By comparing the positional offset with respect to the field of view of the instrument, it was possible to calculate the actual angular shift (\(\Delta Az^{\prime\prime}(t_{n})\), \(\Delta EI^{\prime\prime}(t_{n})\)) of the object \(\kappa\) relative to the telescope axes (\(x_{AZ}=0\), \(y_{EL}=0\)). In accordance with Section 2.1, the calculated positional offset had to be included in the axis motion control algorithm (Figure 6), according to the procedure:  
\[TLE_{\kappa}(t_{n+1})\Rightarrow Az(t_{n+1})+\Delta Az^{\prime\prime}(t_{n}), El(t_{n+1})+\Delta El^{\prime\prime}(t_{n}), \tag{3}\]  
where \(Az(t_{n+1})\) and \(El(t_{n+1})\) are the theoretical angle values of the object \(\kappa\) in the next iteration step and \(\Delta Az^{\prime\prime}(t_{n})\) and \(\Delta El^{\prime\prime}(t_{n})\) are the angle values of the current angular offset of the object \(\kappa\). In the practical implementation, the control software sent to the servo drivers the velocity values (\(V_{Az}\), \(V_{El}\)) defined as:  
\[V_{Az}=[(Az(t_{n+1})-Az^{\prime}(t_{n}))+\Delta Az^{\prime\prime}(t_{n})]* \gamma_{AZ}, \tag{4}\]  
\[V_{El}=[(El(t_{n+1})-El^{\prime}(t_{n}))+\Delta El^{\prime\prime}(t_{n})]* \gamma_{EL}, \tag{5}\]  
where \(Az(t_{n+1})\) and \(El(t_{n+1})\) are the theoretical angle values of the object \(\kappa\) in the next iteration step, \(Az^{\prime}(t_{n})\) and \(El^{\prime}(t_{n})\) are the values of the real angles from the axes' encoders, \(\Delta Az^{\prime\prime}(t_{n})\) and \(\Delta El^{\prime\prime}(t_{n})\) are the angle values of the current angular offset of the object \(\kappa\), and \(\gamma_{AZ}\) and \(\gamma_{EL}\) are parameters that define the dependence of the mechanical transmission ratio per time unit. It should be noted that a limitation of the minimum offset value was defined, which may affect the performance of the correction. Therefore, only significant corrections to the telescope's position were made, preventing the continuous operation of  
Figure 9: Object extraction and position determination (OpenCV).  
the algorithm. There was also a need to define the field of view of the photon detector in connection with the main telescope as an active detection area.  
The determined positional offset can also be used independently to correct the laser beam emission angle, which was programmatically tested. In such a case, a movable prismatic head in the XY plane described in Section 2.3.2 was controlled by a value of \(Az^{\prime\prime}(t_{n}),E^{\prime\prime}(t_{n})\).