1. Introduction
In recent years, technological giants, multinational companies and researchers showed great interest in easing the works of cleaning and actively developed various customized robots to fulfill this desire. From home cleaning to public cleaning, robots have made a revolution in the world. Many types of cleaning robots are available in the market [
1], which range from static or dynamic in motion, and with fixed or reconfigurable morphology. These cleaning robots have significantly improved the living standard of people. With the booming sale of cleaning robot, it is estimated that the cleaning robot annual revenue will raise up to 2.50 billion USD by 2020 and will be available in every home [
2]. The autonomous floorcleaning robots with integrated sensors produced by market dominant firms typically take the fixed morphology either circular or square shape. The techniques used to control these robots have been well established since 2000’s. Many researches have discussed the design mechanism [
3], function [
4], autonomy [
5,
6], benchmarking [
7], and humanrobot interaction [
8] aspects of autonomous floor tiling robots. Although the existing research consistently explored the benefits of using autonomous robots for floorcleaning, the traditional approaches in this domain are still with fixed morphology and lack focus on energy consumption by these robots [
9]. In our earlier work [
10], we suggested a tetrominoinspired reconfigurable floorcleaning robot. It can reconfigure its shape depending on the obstacles and the available area. This innovative cleaning robot outperformed the commercially available fixed morphology robot in terms of covering the narrow and complex constraint area. In addition, we applied the Polyomino tiling theory to generate the robot tiling pattern to cover the predefined area [
11] entirely. This approach assures that the workspaces satisfied the tiling lemmas can be tiled by tetromino form likes hTetro completely.
This specific character separates them from existing robots in the commercial markets. However, this unique reconfiguration ability leaves them with performance issues regarding energy consumption and management. In addition to the locomotion, path planning, area coverage, and cleaning, they consume power for their shapeshifting as well. Existing literature focuses more on design, size, and applications. However, current usage and power management [
12,
13,
14] were the most critical area for their operations with locomotion and reconfiguration. Thus, an absolute power management scheme is essential for proper current utility and management in reconfigurable floor tiling robots.
The nontrivial process of implementing the theoretical framework, analytically into a physical robot will be a complicated task in designing an energy model since robot energy consumption, and its motion is directly proportional to each other [
15]. The robot might be having more than one motor, and this arrangement may drain more power for all type of operations they execute. Literature is available for walking robots for their locomotion with energy. To some extent, The method in [
4] handled the power usage of robots by controlling their axial movement. Yamasaki et al. [
16] discussed control algorithms to mitigate the power usae of humanoid robots. They focused more on energy utilization of walking robots. Choset [
2] decreased the energy consumed for robots interaction, and the study fails to focus on power consumed by motors. External conditions like weather, uneven surfaces, dynamic obstacles [
1] may also play as an influential factor for energy consumption in cleaning robot. Researchers have even tried with the Gaussian process of autoregression [
4,
17,
18], for building the gap between power consumption and efficient robot operation.
Poor coverage path planning leads to abnormal power usage [
15], where the performance of the robot is directly proportional to the effective path coverage and cleaning task accomplishment. Coverage path planning with effective power usage can be established in many ways [
19] like integrating the area into distinct cells, plotting graphs for optimal waypoints [
3], and even by developing a neural network scheme for the repetitive cycle to cover the cleaning area in an organized way. However, all these arrangements are best suitable for fixed morphology robots where their dynamics will be static and holds the same energy utilization for distinct movement throughout their task execution [
20]. In this research, we have extended our early works of reconfigurable tetromino inspired surface tiling robot called hTetro [
10] in consideration of energy consumption with optimal area coverage. The main contribution of the paper is an energy estimation scheme that allows estimating the energy consumption when the hTetro moves from one configuration to another. Specifically, by applying NewtonRaphson algorithm [
21] in combination with PWMH bridge, we proposed an energy estimation scheme with energy estimation equations modeling the all type of locomotions (forward, backward, rotation, and shapeshifting) required by the robot to navigate from one waypoint to another inside the defined workspace. Furthermore, after assigning a zigzag scanning sequence to build up a route composed of waypoints once a set of intermediate configurations has been established, the proposed energy estimation model provides the ability for the polyformbased reconfigurable robot to select the best tiling combination among the tiling solutions with varying levels of energy cost to tile the workspace.
The outline of this paper is as follows. In
Section 2, the hTetro system architecture, circuits, and its reconfiguration mechanism are detailed. hTetro energy methodology is discussed in
Section 3. Upon analyzing the influential factors for energy losses, a novel energy model and prescribed waypoints for robot’s navigation are developed using MATLAB Simulink which discussed in
Section 4. Further,
Section 5 presents the developed energy equations for testing the developed energy model and waypoints for finding the best tiling pattern among the proposed patterns from [
22,
23]. The energy estimation testbed to evaluate the proposed energy model is discussed in
Section 6. In
Section 7, we have compared and evaluated the developed model in simulation and realtime using the hTetro and displayed the comparative results of data.
2. hTetro Hardware Architecture
hTetro is a reconfigurable floor tiling robot inspired from the tetromino game, motivated based on the theory of hinged dissection of polyominoes [
10]. The robot platform has the ability to shift its shape to any one of the seven morphologies depending on the obstacles they encounter. hTetro, designed by applying polyomino tiling theory [
11] which is the tiling of squares in an organized way. It is worth noting that in our previous work [
10] which benchmarked the performance of hTetro with fix form robots, we put great emphasis on the robots’ capability of tiling the entire room without leaving any unvisited space behind by activating the cleaning modules to operate continuously during robot navigation. With the proposed robot design introduced in our current paper, the tiling theory [
11] improves the navigation strategy by providing guaranteed complete coverage of the space, but it does not change the cleaning action of the hTetro. This represents that the robot is still performing continuous cleaning actions by four cleaning modules during the navigation, which is similar to the currently commercialized household cleaning robots, rather than only activating the cleaning modules when the hTetro robot arrives at the waypoint locations in the tilesets.
Specifically, these robots can reconfigure in all possible direction with a precision index of 90 degrees and free wheel movement of 180 degrees. hTetro comprises four individual squares combined in its structure where all the four squares are capable of reconfiguration. They can take shapes like I, J, L and T [
24]. They follow clear geometrical structures and forms spatial dimensions according to the surface it will be deployed. For instance, consider a set of dominoes formed by connecting two congruent squares. These two squares are having their power supply and possess two fixed dominoes as its subsets. By taking any of the configurations by the polyominoes, this dominoes can perform its task within the framed boundary region.
hTetro has four blocks which are square connected by three hinges linking all the four boxes together and gives freedom of hinge movement by 180 degree which helps to change its morphology. Each block is of length 140 mm, width 140 mm and 55 mm height [
10]. Each of the square blocks has its edges chamfered to avoid collision between each box during reconfiguration. The thickness of walls for the robot enclosure is 4 mm. The design of chassis is fabricated with hexagonal hollow spaces to reduce weight. The total weight of hTetro including all the peripheral devices marks around 4 kg.
The transformation of the robot is controlled by three hinges. The locomotion is made using nine DC motors [
25], out of which six are metal gear DC motors that are used for robot locomotion, where each of the motors requires a minimum voltage is 7.4 V. The primary mobile unit for the robot is block 1 where the motors
m1–m4 are placed. To attain stability in the locomotion, motors
m5 and
m6 are placed in block 3. When it comes to J configuration, motors
m1,
m2 and
m5 actively drives the robot in forward and backward directions whereas motors
m3,
m4 and
m6 are used during the motion in left and right directions. When the robot is in L configuration, the motors act vice versa. The ability of the robot to drive linearly in forwarding, backward, left and right directions are due to the Omni wheels (
OW1–OW6) that are attached to each of the dc motors. Each Omni wheel is of 48 mm in diameter. Two caster wheels each
CW1–CW4 were placed in the remaining two blocks to maintain stability during the multidirectional locomotion [
10].
In
Figure 1, hTetro J and L Shapeshifting postures, three Herkulex DRS01017V smart servos (
SM1–SM3) activate the hinges and assists in robot reconfiguration. A maximum of 270degree rotation can be actuated in the servo motors. These servo motors have an inbuilt encoder that takes the feedback from shaft enabling precise control.
SM1 and
SM2 are placed in block 2 drives both blocks 1 and 3, whereas
SM3 is placed in block 3 drives block 4. Servo motors have a torque rating of about 12 kg/cm which is more than enough to lock the hinge movement at the end of every transformation.
During the locomotion, all the hinges connected with each block locks automatically to maintain the morphology of robot throughout its locomotion. In this robot, Arduino Atmega 2560 16Bit microcontroller is used for the shape transformation, locomotion control, and humanrobot interaction. Arduino tmega comes with more memory space and has enough Input/Output pins to set up the fast communication channel with motor controllers.
The microcontroller is placed in the second block of the robot where it is programmed to carry out three major functions: (1) To drive the dc motors based on current morphology and control its speed during locomotion using the generated control signals, (2) To control the servo motors in full duplex mode by sending the control signals by angular rotation and receiving the feedback angle from the servo motor, (3) Establishing Humanrobot interaction by receiving the user commands through Bluetooth serial communication protocol. The whole robot is powered using a Lithium Polymer battery which is rated with 7.4 V and 900 mAh capacity [
26] as shown in
Figure 2. A flip switch connected with the main power supply branch empowers making and breaking of series and parallel circuits. A relay switch is used to switch DC motor operations during the robots reconfiguration.
3. Energy Aware Methodology for hTetro Operation
The reconfiguration feature with the integration of both vacuuming and sweeping modules [
20] in the robot is one of the challenging tasks involved in framing the energyaware methodology. The nontrivial process of implementing polyomino designs analytically into physical arrangements will be a complicated task, and the most important thing is the energy for doing the work. Robots energy consumption and its motion are directly proportional to each other. Before entering into the design, energy conservation starts with identifying the elements involved in power utilization in hTetro. For example, consider the motors available in the robot’s design structure having different power ratings [
1,
27]. Now organize these motors with their typical current and voltage ratings which are suitable for particular task accomplishment. After selecting the desired motors, power saving can be made by selecting the prescribed path and fixing the speed. If a robot visits different places in the fixed boundary, the path can be preprogrammed to reduce the total traveled distance (just as traveling salesperson problem, TSP) [
28,
29,
30] and to avoid sudden start and stop movements, since, for typical DC motor starting current is high. Barili et al. [
4] discussed the concept of tuning the speed to save energy for the robot.
Typically for the robot, optimal path planning algorithms are required for autonomous operations and literature [
31] also discussed these tasks but it fails to address optimal power consumption issues of these robots in maintaining the continuous locomotion. Using controllers and DC motors [
25,
32] of desired current rating and voltage ratio it is possible to mitigate additional power wastages besides their task execution. After choosing the components, if the robot traverse through a prescribed path of concurrence then the required energy for path traversing, start and stop positions and their operating speed can be modeled. By doing this calculation, the robot performance in terms of energy saving and effective path planning will be significantly improved [
12,
19].
Although many obstacleavoidance and pathplanning algorithms [
14] was proposed early few of them discussed the tradeoff between energy saving issues and different robot’s movements mechanisms. For instance, Euclidean distance algorithm [
19,
33] fails to put up a solution for optimal path planning with effective energy utilization for mobile robots, where the motor driving coefficient, balance, and stability, distance to time ratio, distance to power ratio and time influence the current and voltage drop in the system. Thus, this research papers targets to provide a best possible solution for overcoming this drawback in realtime with reconfiguration robots by following waypoints for navigation.
The energy scheme developed and the waypoints defined helps the robot to work in an energy efficient way. At a higher level perspective, electromechanical hardware involved in the system is analyzed for reconfiguration properties in the developed energy model.The kinetic energy in hTetro will start using power once the system is turned on [
24] and the power will start to drain immediately. If the energy lost is proportional to the time, then it is possible to determine the losses for acceleration and reconfiguration individually [
14].
Thus, the absolute minimum amount of energy drawn from the power source and the minimum traveling time will get fixed if the robot accelerates with maximum velocity and in a prescribed waypoint [
34]. However, this is possible only if the path is free of obstacles and at no load condition, which is difficult in realtime operation in this research work [
35]. This problem also triggers the idea of developing the proposed energy model where total energy drawn from the batteries is given by the sum of all the cost functions involved in the operation.
If the required average power for action is above the absolute mean value of the entire robot power consumption, then the cleaning process may get halted. Thus, the proposed model was developed for the same cost functions with the worstcase assumption of zero energy dissipation at halt stage [
20]. Under such circumstances, the variance of average power and total mean current consumed by all the installed components in the robot are modeled in realtime to analyze the robots performance [
36]. If hTetro meets an obstacle or faces any uneven surface, it may consume some extra power called unplanned power loss. Since the robot is designed for cleaning, every step input plays a significant role in energy utility. The cleaning process includes both nonlinear and variable step functions as the surface may not be static all time. Under both these cases, energy consumption differs [
37].
We have classified this unaware power loss in two cases; the power calculated during timearea coverage where speed alone is considered not the power consumption, and another one is power calculated during the time with the predefined path. Specifically, to determine the power required for cleaning, the mean absolute time and mechanical properties (torque, speed, duty cycle, inertia) [
18] of all the components are included in the proposed energy design and helps hTetro to operate smoothly with sufficient power for cleaning and locomotion. After considering the methodology, the developed model act as a standalone system and possesses both speed and power tracking units inside it, which is explained in the energy modeling section with a specific algorithm for energy estimation.
4. Energy Model for Individual Gait Pattern of hTetro
To navigate from one location to another the robot perform several individual gait pattern which includes: transformation to the desired shape, pivot turn, and translation. The energy model for each individual gait developed includes speed and angular orientation of hTetro. So, it is easy to maintain the autonomy of the robot with available power in the system.
The energy model of hTetro is different from these other fix form robot, For example, consider a nonholonomic system of mobile robots, either legged or wheeled, swarm or articulated, at a kinematic level, they are subject to nonholonomic(noniterable) constraints. In our case, we face problems in mapping the angular movement with angular velocity for a particular wheeled reconfigurable robot. The pivot movement of the robot must show correct power prediction and accurate energy usage in hTetro. Thus, in this developed framework, Pulse Width Modulation (PWM) technique is used along with Hbridge and Stay aLive and Energy Efficient Path planning (SLEEP) algorithm [
38].
The power consumed for each step function is calculated using PWM and the controllers driving inductive and capacitive (LC) loads with linear and nonlinear voltage fluctuation feeds its input to the Hbridge circuit. The open loop PWM waveforms were compared with the power quality standards from the installed controller unit, then feed as input to the next iteration cycle [
25].
Energy Model (EM) as shown in
Figure 3 sends its feedback to the driver circuit linked with Hbridge. This quantifies the performance of open loop PWM, which is the most straightforward control strategy for hTetro, running on the external power source.
Figure 3 explains the process involved in obtaining the current consumption data while the robot is navigating and executing the assigned task. Motor circuit showed in the EM helps to calculate the energy consumed by motors during locomotion. Closed loop control is necessary to prevent output voltage sag and power dissipation during the operation when larger loads are connected [
19] with hTetro.
The Algorithm 1, shows the order of initiation and testing of simulation environment developed for evaluating the robot’s performance. The test bench created in MATLAB consists of motor circuits and the drivers for the smooth operation of hTetro. In Energy equations, four types of motions, forward, backward and pivot turns with 90degree rotations for both L and J configuration are taken as the reference index. All these four movements energy consumption were tested individually. During testing, the operating voltage and current values are fixed which is 7.4 V and 5 A (battery rating from the data sheet) [
10]. No load speed and rated speed of the installed motor was set which is 120 rpm and 100 rpm respectively [
24]. The DC motors used in the simulation environment is modeled using PWM and Hbridge techniques. The duty cycle and inertial frequency are applied using the motor specifications. It helps to make the environment free of external noise and excess energy loss from the battery. The signal strength and threshold voltage levels are checked at regular intervals for proper data exchange once the request to send (RTS) and control to send (CTS) handshake is made between the microcontroller and the sensors. To distinguish motors based on their position within hTetro, they are assigned with a specific identity number. The data are recorded for a single clock cycle or step function.
Algorithm 1 Testing Environment for Performance Evaluation 
1. Input: Stage step input_id 2. Service_num= motor id (n): area range(n); %identifying the Locomotion type% 3. init_DC Motors_id; %fixing the test bench% 4. int_PWM::Hbridge::Angular rotation; %fixing voltage and speed % 5. clock_set; 6. time_set; 7. fix no load voltage_select (); 8. fix duty cycle_select (); 9. est_inertial frequency; 10. RTS_id= +; 11. { Start: route (); 12. CTS_id=+; 13. {next cycle_delivery (); 14. Check_signal (strength::passband_frequency); 15. Check_battery(status::threshold level::offset) 16. else 17. halt motor off (); 18. find_packet indentifier; 19. local_array= time::current::signal strength ; 20. num_node (setup==10); 21. num_sensor (cluster id= 1); 22. time_slot= (fix:1 clock cycle); 23. receive data= send signal_id; 24. next step functionid++; 25. repeat++; 26. end_time_slot=0; 27. end_motion; 28. end_signal; 29. end_delivery; 30. change_route(); Output: Data_packet::current data(); 
Here we have used SLEEP and Tabu search NPhard methods to predict and avoid unwanted energy dissipation and random movements by hTetro [
19]. If the available energy in the system goes below a specified threshold, the operation may get halted until it gets boosted up to a specific threshold. The system also will halt when the threshold exceeds the predicted energy values. During such anonymous conditions, the controller will record the pattern and power data for future reference. The use of power electronics and embedded components in EM allows flexibility in tuning the frequency and pulse width for every voltage step function or the voltage drop (during movement). MATLAB Simulink is used for this energy modeling, where every embedded element contributing to energy consumption is modeled individually and summed up for total energy cost function [
1].
5. Overal Energy Estimation
After developing the energy model for individual gait, in this section, the novel energy equations that allow for realtime energy estimation of whole hTetro navigation is formulated. Note that the solution to tile the defined workspace by set of tetromino are derived by tiling algorithm [
11]. To complete the found tileset, hTetro will navigate to fit its block 2 to location of the tiling pattern defined as waypoint then transform the shape corresponding to tileset plan. The navigation of hTetro consists of several type of locomotions. The equations for the energy usage in the context of shapeshifting cleaning robots to move from one waypoint to another is presented as follows.
Consider Energy “E” is consumed by every motion made by hTetro with rotor speed “k”. Motors used in hTetro has a maximum speed of 1200 rpm for the full load operation. Since the robot’s purpose is cleaning, the model includes the flat surface “s”, which is free from obstacles. Both forward and backward movements where modelled using linear time step input functions. For modelling, shapeshifting “ss” and angular movements, both the angular “β” and linear velocities “α” are applied in the design.
By including these velocities and shifting corrections, current for shapeshifting, angular rotations and free wheel movement between 0–180 deg can be modelled. In this design, $\theta $ is the shapeshifting angle, and all actions are performed at time “t” which is the time taken for locomotion, shape shift and cleaning. The reference position “p” and index “i” is mapped with correct configuration changes (L or J) made by the hTetro. We have included the circuit resistance r and inductance L in the design for measuring the inertial operations. Since the circuit has its own internal resistance that resists the current flow in the system, it has to be modelled. In the same way, the moment of inertia exerted by the robot during its free wheel movement leads to unplanned energy loss in the system.
The total energy cost
E_{t}, for the robot operation is as shown,
where the robot’s total energy consumed (1) is calculated for all type of locomotion for single step function
E_{f} and
E_{b} are the energy for forward and backward movement respectively and
E_{r} and
E_{ss} are the energy consumed during angular turns and shape shifting respectively. NewtonRaphson (NR) [
21] estimation is used to calculate the successive energy approximation values from each individual gaits in the system. By using NR, the approximation is made for all possible locomotion performed by hTetro.
The energy consumed for forward and backward movement is almost the same except the type of locomotive position index. Thus, to determine the motion (
E_{f} or
E_{b}), the index position (starting point) is taken as reference along with angular displacement and the cost is calculated (2) and (3).
where
or
From Equations (4) and (5), it is evident that the kinetic energy K exerted by the robot along with angular velocity plays a major role in the energy consumption. By doing this formulation, we have identified energy wastage with high accuracy rate. There are certain transfer functions involving shape shifting and angular turnings in the system. Those situations are identified by setting waypoints during traversing in the developed testbench. So, to model those values in the formulation, their angular velocities, linear displacement and potential drop are included in the proposed model.
Thus,
E_{r} is necessary in situations where the potential drop happens to the angular displacement and linear step functions.
The amount of energy consumed for rotational movement of 90 deg includes the inductance and resistance exerted by the motor and the drivers as shown in
E_{r} (6). The developed energy formulations predicts the robot’s movement for a span of 180 deg, thus enabling one half cycle of free wheel movement for every step input functions.
To model the power consumed for shape shifting
E_{ss}, the power exerting elements like speed, angle, position, weight, inertia and inductance are necessary to be incorporated. Because, the system is autonomous and will drew random power for both locomotion and shape shifting. To measure the power utilization during turnings and shapeshifting, the inertia of the DC motors ‘I’ is included, which is one of the critical parameters of a DC motor. This inertial movement which affects the output response including rising time, settling time, overshoot and steady state error of the system. The inertial motion is included in cases where the staring torque is also high.
The flowchart (
Figure 4), shows the working of the energy model after incorporating the energy equations into it. The DC motor torque and resistance are included to measure the absolute power consumption by hTetro. The current sensor placed in the robot’s control circuit will transmit the current data for locomotion during area coverage processes to set the voltage and angular of the control module and to display the used (renaming) battery capacity. Specifically, hTetro locomotion is set in such a way that for every clock cycle or individual gait pattern, from the sensor data, the system will record the energy available in the system. With the total energy as a reference, the energy utilized for the shapeshift and locomotion is calculated with the sensor data, and the controller will take the decisions with the available power.
Thus, in the developed model, the electric potential K along with full load wheel locomotion m is taken to calculate the actual power consumption by the robot during cleaningfree wheel movement and nocleaningnofree wheel movement. The algorithm developed can be applied for realtime operation of the robot. Depending on the available power, the energy model will calculate and set the waypoints before starting the operation of the system. Energy is maintained in the system due to the initial prediction and analysis of robot’s navigation along with the waypoints in the system.
6. Testbed Environment for Energy Model Using Waypoints
The tiling theory can give several solutions for tetromino forms to tile the predefined workspace. With the optimal energy estimated model, we can select the best tileset before robot performs the area coverage. To this end, The testbed environment considered for the paper is based on an 8 × 8 chess board. Each block of the chess board is equal to the dimension of one block of hTetro. According to the proved solutions in [
39], there are 12 solutions for covering the entire area as shown in
Figure 5. The energy consumed by hTetro in covering the entire area is calculated using the developed energy equations. The simulated energy equations take the input from a realtime robot, where hTetro will follow the predefined waypoints for its navigation within the developed testbed. The estimated energies are compared to find the optimal combination of tiling patterns in terms of energy cost. The testbed and the calculations are made for all possible combinations of hTetro. The asymmetric testbed can also be used as a platform for navigation and testing. Since the developed design is the basic version of hTetro, the shape and area prediction still needs to be updated. With the reconfigurable design, hTetro robots can be best suitable for all types of testbeds.
6.1. GridBased Environment Setup and Waypoint Navigation
In specific, the robot agent and the robot frame are denoted as
$\mathcal{A}$ and
${\mathcal{F}}_{\mathcal{A}}$, respectively. The robot
$\mathcal{A}$’s workspace and workspace frame are denoted as
$\mathcal{W}$ and
${\mathcal{F}}_{\mathcal{W}}$, respectively. Workspace
$\mathcal{W}$ is separated into grids defined as
$G(i,j)\in \mathcal{W}$, where
$i(i=1,2,\dots ,{n}_{i})$ represents the row index; while
$j(j=1,2,\dots ,{n}_{j})$ represents the column index. In our tiling simulation setup, the maximum number of both rows and columns are 8
$({n}_{i}={n}_{j}=8)$. A roadmap is defined as
$\mathcal{R}$, which consists of multiple waypoint sets
$\mathbf{p}$$(\mathbf{p}\in \mathcal{R})$. A waypoint set can be represented as following:
where:
Within
${\mathcal{F}}_{\mathcal{A}}$, hTetro can transform into 7 basic morphologies as shown in
Figure 6, where the four hTetro blocks are marked by number 1 to 4. In the tiling set we have taken for testing the developed energy model, the hTetro takes only the
L and
J morphology. Since
${\mathcal{F}}_{\mathcal{W}}$ is fixed, the relative shape of hTetro in
${\mathcal{F}}_{\mathcal{W}}$ will be different compared to
${\mathcal{F}}_{\mathcal{A}}$ when the robot rotates. In the experiment setup, only fixed 90° and 180° turns will be performed. Therefore, the robot shape
${p}_{s}$ is defined by integers that belongs to set
$\{{p}_{s}\in \mathbb{N}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}{p}_{s}\le 28\}$. Where
${p}_{s}=1,2,\dots ,7$ demonstrates the shape of hTetro in
${\mathcal{F}}_{\mathcal{A}}$ when the orientation of both
${\mathcal{F}}_{\mathcal{A}}$ and
${\mathcal{F}}_{\mathcal{W}}$ coincide. If
${\mathcal{F}}_{\mathcal{A}}$ rotates clockwise by
$\theta $ with respect to
${\mathcal{F}}_{\mathcal{W}}$, every fixed 90° rotation in
$\theta $ adds 7 to
${p}_{s}$, forming a total of 28 possible shapes in
${\mathcal{F}}_{\mathcal{W}}$.
6.2. Simulation Environment
In the MATLAB simulated model, the second block of hTetro is the origin point of ${\mathcal{F}}_{\mathcal{A}}$. A waypoint set $\mathbf{p}=\{{p}_{i},{p}_{j},{p}_{s},s\}$ is considered “cleared” when the second block reaches the center of target grid $G({p}_{i},{p}_{j})$ while the current robot shape and s are identical. The robot will then move on to clear the next waypoint set in $\mathcal{R}$. The 12 combinations of tiling squares with tetrominoes proposed would require 12 different roadmaps for setting the waypoint, which is denoted as ${\mathcal{R}}_{n}(n=1,2,\dots ,12)$. Each of the roadmaps differs in their way of tiling, and the hTetro tends to take different shapeshiftings to cover the maximum area. Each ${\mathcal{R}}_{i}$ consists of 16 waypoint sets p. The value of ${p}_{i},{p}_{j}$ and ${p}_{s}$ can be determined directly with the available combinations, while the waypoint sequence s would remain uncertain. A sequence generating procedure as described in Algorithm 2 is developed to determine the order of the waypoint set. The proposed waypoint sequence generation algorithm takes grid size (${n}_{i}$, ${n}_{j}$) in $\mathcal{W}$ and $\mathcal{R}$ with the sequence s of $\mathbf{p}$ undetermined as input, and produces final roadmap ${\mathcal{R}}_{f}$ with determined s as output. The algorithm plans the robot path based on constructing a zigzag pattern starting the topleft corner of $\mathcal{W}$.
Taking the first tiling combination
${\mathcal{R}}_{1}$ for example, the output can be determined as:
hTetro follows the waypoint marked in red dots in
Figure 7 and covers the maximum perimeter. The path generated for
${\mathcal{R}}_{1,f}$ is shown in
Figure 8, where red circle icons represent positions (
${p}_{i},{p}_{j}$); the numbers next to them are waypoint sequences
s (
$s=1,2,\dots ,16$). Based on the sequence determined, the waypoints are being connected by a blue line in
Figure 8, demonstrating the path hTetro will take to clear the waypoints while tiling the workspace. Here the waypoint is fixed by tiling sequence proposed [
22,
23] and the robot is made to traverse through the developed algorithm.
Algorithm 2 Sequence Generating Algorithm 
 1:
functionSequenceGenerator(${n}_{i}$, ${n}_{j}$, ${\mathcal{R}}_{n}$)  2:
${\mathcal{R}}_{n,t}\leftarrow {\mathcal{R}}_{n}$  3:
${\mathcal{R}}_{n,f}\leftarrow \left\{\right\}$  4:
$coun{t}_{s}\leftarrow 1$  5:
$dir\leftarrow 1$  6:
for $i\leftarrow 1\phantom{\rule{4.pt}{0ex}}\mathrm{to}\phantom{\rule{4.pt}{0ex}}floor({n}_{i}/2)$ do  7:
if $dir=1$ then  8:
$(co{l}_{s},co{l}_{e})\leftarrow (1,{n}_{j})$  9:
else  10:
$(co{l}_{s},co{l}_{e})\leftarrow ({n}_{j},1)$  11:
end if  12:
${\mathbf{p}}^{\prime}\leftarrow \mathbf{p}$  13:
for $j\leftarrow co{l}_{s}\phantom{\rule{4.pt}{0ex}}\mathrm{to}\phantom{\rule{4.pt}{0ex}}co{l}_{e}$ do  14:
for $w\leftarrow 0\phantom{\rule{4.pt}{0ex}}\mathrm{to}\phantom{\rule{4.pt}{0ex}}1$ do  15:
for all $\mathbf{p}\in {\mathcal{R}}_{n,t}$ do  16:
${\mathbf{p}}^{\prime}\leftarrow \mathbf{p}$  17:
if $2i+w={p}_{i}\left(\mathbf{p}\right)\wedge j={p}_{j}\left(\mathbf{p}\right)$ then  18:
${\mathbf{p}}^{\prime}\leftarrow \mathbf{p}$  19:
Remove $\mathbf{p}$ from ${\mathcal{R}}_{t}$  20:
$s\left({\mathbf{p}}^{\prime}\right)\leftarrow coun{t}_{s}$  21:
$coun{t}_{s}\leftarrow coun{t}_{s}+1$  22:
${\mathcal{R}}_{n,f}\leftarrow {\mathcal{R}}_{n,f}\cup \left\{{\mathbf{p}}^{\prime}\right\}$  23:
end if  24:
end for  25:
end for  26:
end for  27:
$dir\leftarrow dir$  28:
end for  29:
return ${\mathcal{R}}_{n,f}$  30:
end function

Upon covering the maximum area, the amount of energy consumed for individual gait is calculated using EM as shown in
Figure 6, and the estimate is compared with the data obtained from hTetro by making it traverse it in the same tiling pattern by creating a workspace in realtime. To operate inside the workspaces with dynamic obstacles, the system will analyze the mapping area before it starts its cleaning process. The waypoints are set at the initial stage of navigation. Waypoint algorithm developed will be updated to adapt the dynamic obstacles in future versions of hTetro.
The area covered by hTetro using the developed waypoint navigation algorithm shows not only the area covered and also the type of configuration it takes for traversing the area. Since the combination of shapes taken by hTetro is J and L, straight lines are much preferable. From
Figure 7 and
Figure 8, it is clearly shown that random movements are also recorded and highlighted in blue color. Linear waypoints are best suitable in terms of energy consumption during locomotion. Nonlinear motions can also be made at each corner points or during shapeshifting.
The sequence generating algorithm set the waypoints through which hTetro will traverse the tiling set
${\mathcal{R}}_{1}$ as shown in
Figure 8.
6.3. Energy Consumption Calculation
To calculate the cumulative energy consumed for each
${\mathcal{R}}_{n,f}$, Algorithm 3 calculates the action taken for each roadmap. The algorithm finds two consecutive waypoint sets and analyzes the angle of rotation, shapeshifting, and linear displacement required. Since the 12 combinations of tiling squares proposed in [
39] only makes use of L and J hTetro morphologies, the output results of the action counter consists of number of 90° rotations made in both L and J shapes (
${c}_{Lrot},{c}_{Jrot}$), length linear of path in 4 directions (Right, Left, Forward, Back) for both shapes (
$lo{p}_{Jlinear},lo{p}_{Llinear}$), and number of shapeshifting made between the 2 morphologies (
${c}_{LtoJ},{c}_{JtoL}$). The action counter results for 12 tiling combinations are then integrated with the EM. The total energy consumed can be calculated.
Algorithm 3 hTetro Action Counter 
 1:
functionActionCounter(${\mathcal{R}}_{n,f}$)  2:
${c}_{Lrot}\leftarrow \{0,0,0\}$  3:
${c}_{Jrot}\leftarrow \{0,0,0\}$  4:
$lo{p}_{Llinear}\leftarrow \{0,0,0,0\}$  5:
$lo{p}_{Jlinear}\leftarrow \{0,0,0,0\}$  6:
${c}_{LtoJ}\leftarrow 0$  7:
${c}_{JtoL}\leftarrow 0$  8:
for all $\mathbf{p}\in {\mathcal{R}}_{n,f}$ do  9:
for all ${\mathbf{p}}^{\prime}\in {\mathcal{R}}_{n,f}$ do  10:
if $s\left({\mathbf{p}}^{\prime}\right)=s\left(\mathbf{p}\right)+1$ then  11:
$lo{p}_{r}\leftarrow {p}_{i}\left({\mathbf{p}}^{\prime}\right){p}_{i}\left(\mathbf{p}\right)$  12:
$lo{p}_{c}\leftarrow {p}_{j}\left({\mathbf{p}}^{\prime}\right){p}_{j}\left(\mathbf{p}\right)$  13:
$lop\leftarrow \{{\left[lo{p}_{r}\right]}^{+},{\left[lo{p}_{r}\right]}^{},{\left[lo{p}_{c}\right]}^{+},{\left[lo{p}_{c}\right]}^{}\}$  14:
${i}_{rot}\leftarrow floor(s\left(\mathbf{p}\right)/7)floor(s\left({\mathbf{p}}^{\prime}\right)/7)$  15:
${c}_{Lrot}\leftarrow {c}_{Lrot}+$  16:
if ${i}_{rot}=1\mathrm{or}3$ then  17:
${c}_{rot}\leftarrow \{1,0,0\}$  18:
else if ${i}_{rot}=2\mathrm{or}2$ then  19:
${c}_{rot}\leftarrow \{0,1,0\}$  20:
else if ${i}_{rot}=3\mathrm{or}1$ then  21:
${c}_{rot}\leftarrow \{0,0,1\}$  22:
end if  23:
if $mod(s\left({\mathbf{p}}^{\prime}\right),7)==4$ then  24:
$lo{p}_{Llinear}\leftarrow lo{p}_{Llinear}+dis$  25:
${c}_{Lrot}\leftarrow {c}_{Lrot}+{c}_{rot}$  26:
if $mod\left(s\right(\mathbf{p}),7)==3$ then  27:
${c}_{JtoL}\leftarrow {c}_{JtoL}+1$  28:
end if  29:
else if $mod(s\left({\mathbf{p}}^{\prime}\right),7)==3$ then  30:
$lo{p}_{Jlinear}\leftarrow lo{p}_{Jlinear}+dis$  31:
${c}_{Jrot}\leftarrow {c}_{Jrot}+{c}_{rot}$  32:
if $mod\left(s\right(\mathbf{p}),7)==4$ then  33:
${c}_{LtoJ}\leftarrow {c}_{LtoJ}+1$  34:
end if  35:
end if  36:
end if  37:
end for  38:
end for  39:
return ${c}_{Lrot},{c}_{Jrot},lo{p}_{Llinear},lo{p}_{Jlinear},{c}_{LtoJ},{c}_{JtoL}$  40:
end function

7. Results and Discussion
After fixing the optimal waypoints and common starting point for all the 12 tiling combinations, the robot is turned ON. The data are recorded for the entire path coverage for all the 12 tiling sets as shown in
Figure 9. It is evident from
Table 1 and
Table 2, the tiling combination
$\mathcal{R}$_{8} consumes very less energy and covers maximum area than other tiling sequences. The amount of power taken for the hTetro to traverse the area is estimated using Algorithms 2 and 3, which shows the tiling set
$\mathcal{R}$_{8} consumed very less energy compared with other tiling combinations in both the simulation and realtime environment. The current sensor placed in the robot will account for the current consumed by all the motors responsible for every individual gait.
The measured current was sampled at a sampling frequency of 20 KHz sampling rate at the rated voltage of 12 V. Here only the normalized voltage values are taken for calculation since two types of motors are responsible for state change and current consumption. In the developed area, the robot traverse with a full load efficiency of 5 A and the value obtained are compared with the rated current of 7.4 A. The robot attains the maximum motor speed of 1200 rpm within 2.36 s and maintains the same speed until the next step input function or state change for differential angular movements. However, during the shapeshifting and angular movement, the current consumed varies from 0.2 mA to 1 mA. However, the current consumed will be stabler until the motion is stable and linear or with particular (L or J) configuration [
40]. There are situations where the robot will remain still for a nominal time during its path travel or shapeshifting. Under such conditions current of 7.4 A was given to the DC motors to maintain the control links in the robot.
This power usage is modeled using (8). Waypoints responsible for area coverage is modeled to adapt the dynamic localization of the robot. The current consumption data is saved as a discrete dataset for easy mapping, parametric analysis, and step function evaluation. For the pivot (angular turning) movement, the angular displacement is estimated while for shapeshifting, the mass and rotational inertia are included in the analysis (6), (7).
Based on the algorithm developed and the waypoints, EM estimates the energy consumption for all the 12 tiling combinations. The obtained results are tabulated (
Table 1 and
Table 2) with the current, power and time taken for the robot to traverse the entire area. From the obtained results, it is clear that the tiling set
$\mathcal{R}$_{8} consumes lesser current and lesser power among all the 12 tiling combinations because
$\mathcal{R}$_{8} has lesser angular rotations and shapeshifting compared to other tiling patterns. It also takes very minimum time for covering the tiled area. Simulation and experimental results obtained shows
$\mathcal{R}$_{8} is the optimal tiling pattern and the energy estimated is almost similar. Thus, the proposed energy equation and developed algorithms can be used to determine the energy consumption and help the robot to navigate in an energy efficient tiling pattern.