## 4 Results
### Monitoring Interface and Fuzzy Control System  
For the development of movements, a MATLAB interface was developed through which the robot is monitored, and different parameters are calibrated (Figure 11). It has two modes of operation. The first one is a manual method and allows the robot to be teleoperated, through the threshold configuration for PWM value and image threshold. The independent movements are executed by the operator using the buttons on the panel (forward, backward, right, left, ascent), and the temperature values are acquired as required by the user; the results of the manual movement were captured on video and examined in MATLAB. The second mode is autonomous and requires the establishment of virtual points placed so that they form a monitoring path. Figure 11 shows the location of four virtual destination points (P1, P2, P3, P4) so that the robot forms a square trajectory and performs thermal monitoring in that area, with an established uniform sampling time of 500 milliseconds. A fuzzy control system was implemented because a control (PID) is not feasible due to the lack of a precise model because the body does not have a rigid structure, and due to the nonlinear and discrete relationship between SMA control and resulting contraction. Figure 11: Interface for control and configuration in MATLAB. Source: Author. Figure 10: Experimental assembly of the system for the execution of tests. Source: Author. The control loop (Figure 12) has as its input the virtual destination point consisting of two coordinates (\(x_{ref}\), \(y_{ref}\)). These values (given in millimeters according to the previously performed calibration) are subtracted from the current values of the robot position given by the vision system, determining an \(error_{x}\) and an \(error_{y}\), respectively. These values are sent to a fuzzy controller with two inputs and generate three outputs, whose rules are detailed in Table 2. The variables in the table are defined as (\(e+\)) positive error, (\(e-\)) negative error, (\(z\)) zero, (\(SMA_{R-C-L}\)) right, center and left SMA actuator, respectively. The PWM output values have been raised based on the observation and analysis of the robot's behavior through manual operation, determining that pulse width modulation values greater than 200 (78% of the cycle) generate a quick contraction response in the SMA, where \(High_{PWM}\) corresponds to 255, \(Med_{PWM}\) is 175 and \(null_{PWM}\) is 0, in a range of [0-255] of the duty cycle. Based on the fuzzy conclusion generated from the rules, the respective output of the PWM is generated, toward one of the Mosfet in potency card: (Mosfet 1) for displacements to the right, which acts on the respective lateral SMA, (Mosfet 2) for vertical displacements, which acts on the central SMA in the form of a ring and (Mosfet 3) for displacements to the left, by means of the respective lateral SMA. The maximum peak current operated by the potency card is up to 6 Amps, which is applied for a maximum time of 500 milliseconds--enough time to produce the molecular state change in the SMA, returning to its initial form of contracted spring, generating the displacement of water by compressing the respective area in the jellyfish body. After that, there is a recovery time of 2 s, in which the jellyfish passes to the state of relaxation; during this time, the SMA, with the help of the low water temperature (24 \({}^{\circ}\)C), reduces its temperature and changes its state again, before executing the closed-loop control again. The controller is conditioned by external programming to correct the errors \"x\" or \"y\" one by one, since according to the CFD analysis, the impulse generated after each contraction would be lost if it is performed in a combined lateral way and vertical or first lateral and then vertical. Therefore, the best option was to correct first in \"x\" then in \"y\" or conversely.