Results and Conclusions - tech-igloo/Semi-autonomous-UV-sterilization-bot Wiki
RESULTS AND CONCLUSIONS
Coppelia Sim simulation platform is used for simulating the robot and the sensors. It was used to test the auto mode algorithm and obstacle avoidance logic. The algorithm to calculate the distance and angle required.
Fig.24. Obstacle collision
When the robot is navigating to the target goal location and if any obstacle is present, it is detected using ultrasonic sensors. In this way, the whole algorithm is simulated and tested for various obstacle locations. The algorithm performs well in an obstacle-free environment, it can reach the goal position effectively. When there is an obstacle detected then the detect flag is set to first try avoiding the obstacle by rotating in the direction of the absence of an obstacle. Then the robot moves forward for 0.5 sec, resulting in getting close to the obstacle before the obstacle is completely avoided. To avoid colliding with the obstacle the threshold of the obstacle detection is changed such that the robot reorients itself at a sufficient distance from the obstacle thereby avoiding collision with the obstacle.
The other issue is the dead spaces present in between in the sensors if we choose to use 3 ultrasonic sensors for obstacle avoidance. Three ultrasonic sensors with 60-degree FOV(assumption the actual FOV may vary)we have noticed there are dead spaces. To maximize the sensing area we have chosen to use 5 ultrasonic sensors and the placement of the sensor is adjusted to provide maximum sensing capability to the robot.
Fig.25. Sensor dead spaces
Fig.26. Sensor placement to minimize dead spaces
Fig.27. Final Simulation model
After all the sensor adjustments, bot modeling, and changing the parameters while keeping in mind the real-life sensor and its performance. the sensors
PID tuning and implementation
Because of the nonidentical motor response used for testing, we must make the robot move in a straight path. This is attained by using a velocity control PID loop which keeps tracks of the desired velocity and the instantaneous motor velocity and manipulating the PWM values if any of the motors is not matching the desired motor velocity. The velocity control PID loop is also responsible for maintaining a constant angular velocity. The PID gain variables are tuned based on the response time taken by the robot to reach the required speed. As both motors are not identical, we are running two PID loops which each try to run the motors run at a preset speed. We are attaining the straight motion as both motors are maintained at the preset speed by the PID loops. The PID gain variables of both motors are different as they are not identical even if they have the same specifications provided by the vendor. There is some difference in the response of the motors that can cause errors to build up.
The feedback to the PID loop is taken from the encoders which help in tracking the position of the robot as well as calculating the instantaneous linear and angular velocities. Kp is the proportional constant responsible for reducing the rise time. Rise time is the time taken by the system to reach from 10% to 90% of the steady-state; here it's the time taken by the system to reach 90% of the preset speed. Kp is responsible for attaining the preset speed in the least time it is tuned for both motors independently. Kd is a derivative constant and is responsible for how fast the system responds to the change, increasing Kd of the system results in the faster response of the system. Kd decreases the overshoot of the system caused by Kp. Ki is the integral term which is the sum of the error over time. It is used to reduce the steady-state error. Having high Ki results in an unstable system response so it should be maintained as low as possible.
For tuning PID parameters first, the Kp is tuned till the motors attain near the desired in a minimum time then Kd gain is introduced to the system to reduce the overshoot. Kd term is responsible for reducing oscillation; it is increased till the oscillation in the system is reduced. But we have noticed that there is an unnecessary steady-state error in the system to reduce the steady-state error Ki term is introduced. Current error is the instantaneous error that is updated at constant intervals and accumulated error is the sum of all the errors for the beginning. As the system undergoes different operation such as moving forward, back and turning right and left ki term has to be reset before it changes its operation as its the sum of the error as we change the operation not resetting the Ki results in unsteady response so the parameter accumulated error of each motor is made 0. So, implementing a velocity control loop made the robot attain a straight motion and rotate at a predefined speed. Because of the less stall torque of the motor and the bad response the implementation of the PID loop has restricted us to set a minimum PWM value so that the motor attains the torque required to move the bot. Predefining the minimum PWM value resulted in not testing the PID for very low velocities. But with a better low-speed motor and motor driver, the PID loop will perform better than the present system.
As the work was carried out online, the whole hardware and mechanical assembly and testing were not possible. When we are working online to overcome this problem and to perform testing remotely we have used a DIY robotic kit that comes with a frame, plastic gear motors, and a caster wheel. The whole code is tested on the robotic kit for evaluation of the logic. Instead of using embedded encoders, we are using a disc with slots and optical encoders. Due to hardware limitations such as cheap motors and inturn poor motor speed control, we couldn't run motors at low speed because of low torque, so the speed of motors is higher than what we intended to use on the final setup. Because of the higher speed, the controllability of the motors is not possible with a low-resolution encoder setup. With all the components we were able to test and implement the whole code successfully. The performance of the system was optimized according to the hardware by tuning the PID parameters for velocity control. Though the performance is not up to the mark we made sure we have utilized the hardware at the best possible.
With this project coming to an end, we have researched and developed a semi-autonomous UGV, which is controlled/accessed via Wi-Fi. It is aimed at increasing the adoption of robots in the Indian market where advanced robots with expensive pricing are not very affordable. This also demonstrates the capability and potential of the ESP32 microcontroller, which is popular for IoT applications, in mobile robotics. The project started as a UGV for UV sterilization application but in reality, this project can be used for any application, by attaching the mechanism on top of the bot(either controlled by the same microcontroller or different), making it modular to be adopted by anyone and building on top of it. With some improvement and testing, it has good scope for low cost and low intelligence application.