Abstract : This paper studies mobile robots and implements microcontroller-based motor drive and closed-loop speed regulation control for a wheeled mobile robot. An ultrasonic ranging module based on the time-of-flight method is designed to provide the robot with simple and convenient obstacle distance detection. Experimental simulations verify that the designed mobile robot operates smoothly and is easy to control. Simulation results show that the path tracking control rules enable the robot to track known paths well.
Keywords : microcontroller, mobile robot; motion control system; trajectory tracking;
Intermediate Classification Number : TP9 Document Identification Code: B
0 Introduction
With the rapid development of mobile robot technology and its widespread application in industry, military, and other fields, a new technical science—robotics—related to the theory, design, manufacturing, and application of mobile robots has gradually taken shape and is increasingly attracting widespread attention. Mobile robot research is entering a new stage. Simultaneously, the development and utilization of space and marine resources provide vast opportunities for the development of mobile robots. Currently, research in areas such as intelligent mobile robots and unmanned autonomous vehicles has entered the application stage. As research deepens, higher demands are being placed on the autonomous navigation capabilities, dynamic obstacle avoidance strategies, and obstacle avoidance time of mobile robots. Path planning for ground-based intelligent robots is a crucial component of fully autonomous robot systems operating in complex and dynamic natural environments, and the research on fully autonomous technology for ground-based intelligent robots across all terrains is a challenging problem facing the academic community both domestically and internationally.
Intelligent mobile robots are a type of robotic system capable of sensing their environment and their own state through sensors, enabling autonomous movement towards targets in obstacle-filled environments to perform specific functions. Mobile robot technology research integrates technologies such as path planning, navigation and localization, path tracking, and motion control. It involves various external sensors, including distance detection, video capture, temperature and humidity sensors, and audio-visual sensors, which serve as input information for the mobile robot. Motion control of mobile robots primarily involves establishing the robot's motion platform and providing a control method. A high-performance mobile robot motion control system is the foundation for mobile robot operation and serves as a general development platform for mobile robot research.
The motion controller is the actuator of a mobile robot, playing a crucial role in its stable operation. With the continuous emergence of new intelligent control algorithms, mobile robots are developing towards greater intelligence, which places higher demands on the performance of motion control systems. Designing and implementing a control system for an intelligent mobile robot requires familiarity with mobile robot hardware and software development, mastery of the motion control characteristics of mobile robots, and the establishment of a feasible and stable platform for subsequent functional expansion of mobile robots. This platform can then serve as a common foundation for the development of various robots. The development of an intelligent mobile robot control system has significant practical implications and will lay a solid foundation for future mobile robot development.
1. Control System Structure and Function
The motion control system of a mobile robot is the foundation of the entire mobile robot. A reliable motion control system is a prerequisite for the experimental design of a mobile robot. The block diagram of the intelligent mobile robot control system is shown in Figure 1.
Figure 1. Block diagram of the mobile robot control system
Developers develop the mobile robot's software on a host computer, which also serves as the control center for the entire robot. The host computer receives environmental information from various data acquisition modules and issues control commands to move the robot. The robot body is equipped with four drive motors, serving as the robot's drive mechanism. Each drive motor has an optoelectronic encoder, which provides orthogonal encoded pulse signals, used for closed-loop speed control of the drive motors and robot positioning pulses. The onboard processor is primarily responsible for controlling the ultrasonic ranging module, module management, robot positioning, and communication with the host computer. It can utilize general-purpose computers, high-capacity microcontrollers, DSPs, ARM processors, or other embedded controllers.
If a general-purpose computer is used, then the development of the host computer does not need to be separate from the onboard processor. The mobile robot's input information includes visual input and distance detection. Visual information includes panoramic vision and binocular vision cameras. Distance information includes laser ranging and ultrasonic ranging modules. Based on the pre-built environment map created by the developers, the mobile robot reads environmental information during movement, performs calculations within the processor according to control rules, and outputs control information to the drive motors to control the robot's movement.
The mobile robot's onboard processor and host computer serve as the central processing unit, receiving obstacle distance information from ranging modules such as laser and ultrasonic sensors, as well as visual information from panoramic and binocular vision systems. Combined with preset functions in the host computer, the robot is controlled to perform corresponding actions by controlling the drive motors.
2 Control System Hardware Structure
The control system hardware mainly includes the main control board hardware, motor drive, and ultrasonic ranging module.
(1) Main Control Board Hardware: The main control board is the hardware control center of the mobile robot, mainly responsible for the management, coordination, and data communication of various modules. The main control chip uses TI's 2000 control-type DSP. The main control board is mainly responsible for communication with the host computer. The control information of the motor drive can be transmitted from the host computer to the motor drive controller through the main control board. At the same time, the main control board detects the orthogonal encoded pulse signal provided by the motor encoder disk for robot positioning. The distance detection module interface is mainly handled by the main control board. The ultrasonic ranging module is managed by the main control board. The generation of the transmitted signal, the detection and processing of the received signal, and the reading of the ultrasonic running time are all controlled by the main control board. If the interface of the laser ranging sensor and the binocular camera is an RS232 serial port, then the main control board can also be used as the interface chip for this type of distance sensor, reducing the interface load of the host computer and optimizing the system structure.
(2) Motor Drive Module: The mobile robot has four directional wheels, each driven by an identical drive motor. To ensure the real-time accuracy and stable, independent operation of the closed-loop speed regulation of the drive motors, each drive motor will be driven independently by its own motor drive controller. Each motor drive module consists of a controller with a communication interface and a motor drive unit. The motor drive module control chip receives control commands, calculates the speed and direction of the drive motor, and provides the control voltage for the drive motor. Simultaneously, it detects the motor speed through the coaxial photoelectric encoder of the drive motor, performs certain calculations on the difference between the target speed and the actual speed of the drive motor, and provides the control voltage value for the drive motor, thus completing the closed-loop speed regulation of the drive motor.
(3) Ultrasonic Ranging Module: Ultrasonic waves are mechanical oscillations in an elastic medium, with a propagation speed only one millionth that of light waves, resulting in high longitudinal resolution. Ultrasonic waves are insensitive to color, illuminance, external light, and electromagnetic fields. Therefore, ultrasonic ranging has a certain adaptability to harsh environments such as darkness, dust, smoke, strong electromagnetic interference, and toxicity, and is widely used in liquid level measurement, robot obstacle avoidance and positioning, reversing radar, and object recognition. Because ultrasonic waves are not easily interfered with and consume energy slowly, they can travel long distances in a medium, making them frequently used for distance measurement. The ultrasonic ranging module provides obstacle distance information for mobile robots. The time-of-flight method is used to measure distance. The controller generates a square wave signal, which is amplified to the output of the ultrasonic transducer. The output ultrasonic wave propagates in the air at the speed of sound, is reflected back by obstacles, and is received by the receiving ultrasonic transducer. Due to the attenuation of ultrasonic signals in the air, the electrical signal output by the receiving transducer is extremely weak, mostly in the millivolt range, and is subject to noise interference. Therefore, amplification and filtering of the received signal are necessary. The conditioned signal is then detected and shaped before being used by the control chip. The time from when the control chip emits the ultrasonic signal to when it receives and detects the shaped signal is the transmission time of the ultrasonic wave, from which the distance to the obstacle can be calculated.
The main hardware components of the main control board are the main control chip TMS320LF2407A and its peripheral circuits. The peripheral circuits include a reset circuit, clock, power supply module, JTAG interface, PLL external filter module, SRAM, module I/O interfaces, serial transmission module, and level conversion chip. The main control board is primarily responsible for the interface management and communication tasks of each module. Simultaneously, the main control chip performs the design control of ultrasonic ranging and robot positioning. Furthermore, the main control board can be embedded with relevant development systems, facilitating subsequent design development and upgrades. The hardware structure diagram of the main control board is shown in Figure 2.
Figure 2 Hardware structure diagram of the main control board
3 Simulation Model
This paper designs a Simulink 7-based intelligent car simulation platform, which can determine the optimal parameters of the PID controller according to the system performance requirements, and uses virtual reality technology to reflect the state of the intelligent car in real time during operation. It can provide a good demonstration environment for mastering the motion control of cars in electronic design.
Assuming the car's coordinates in the XOY coordinate system are (X, Y), and the angle between its direction of travel and the X-axis is θ, then the vector [X, Y, θ] represents the car's pose, and the car's motion equations are as follows :
In the formula, b is the lateral distance between the left and right drive wheels, vL is the linear velocity of the left wheel, vR is the linear velocity of the right wheel, ω is the steering speed of the trolley, and v is the forward speed of the trolley. The left and right drive wheels use the same type of motor, and the wheel friction torque Tf is a constant torque load. If i is the reduction ratio and η is the transmission efficiency, then the equivalent torque of the load torque referred to the motor shaft is...
T=Tf/iη
The use of virtual simulation technology makes the measurement and control of intelligent vehicles more intuitive, while the Simulink optimization design module makes it easier to adjust the system controller parameters. The combination of the two enables visual and interactive operation, allowing real-time observation of changes in the intelligent vehicle's motion state.
4. Controller parameter optimization
This design employs PID control, adjusting three control parameters—KP, KI, and KD — to enable the intelligent vehicle to move more accurately and quickly along a given path. The SimulinkConstraint module within the SimulinkDesignOptimization module set in Figure 3 is an updated optimization design module in Simulink 7.0 . It integrates graphical interface-based system controller optimization design and simulation functions, capable of optimizing controller parameters according to set performance constraints. The PID controller output passes through a driver to control the controlled object. Considering the upper and lower limits of the motor's operating voltage, the driver is approximated as a saturated nonlinear element, i.e., the Saturation module in Figure 1.
Figure 3. PI control model of the drive motor
5. Conclusion
This design implements a motor drive module based on the STC12C4052AD, independently completing the closed-loop speed control of the mobile robot's drive motor. The robot's movement is controlled by commands sent from the host controller, without the need for intervention in the closed-loop speed control process. A path tracking program control for the robot is implemented using the MATLAB Fuzzy Toolbox. The input is the robot's left and right wheel displacements recorded by the robot's photoelectric encoder, which are converted into the robot's current position and posture. After path tracking control rules are calculated and quantized, the linear and angular velocities of the robot (converted into the robot's left and right wheel velocities) are output, achieving tracking of the discretized path.