1 Robot Platform
The mobile robot used in this experiment is the AS-U32 AbilityStorm robot produced by Shanghai Guangmaoda Company. This robot is an upgraded version of AS-UⅡ. The main upgraded component is the microcontroller. AS-UⅡ uses Motorola's single-chip microcomputer 68HC11, while AS-U32 uses Philips' RAM7 LPC2103, which makes the robot have more powerful processing functions. AS-U32 has the following features:
(1) The autonomous wheeled mobile robot is an intelligent system that is highly open to the external environment. It uses left and right wheels for driving, and the front and rear wheels follow. The driving method is differential drive, that is, two different or independent movements are combined into one movement. When the movements of two motors are combined into one movement, it is differential drive. If the robot is to walk in a straight line, the speeds of the left and right wheels must be equal; if the robot is to walk in an arc, the speeds of the left and right wheels must be unequal.
(2) The robot comes with a dedicated software development environment, namely the graphical interactive C language (VJC for short). VJC consists of two parts: the compilation environment (including interactive command line editing and debugging functions) and the robot operating system. VJC implements a subset of the C language, which includes control statements (for, while, if else), local variables and global variables, arrays, pointers, structures, 16-bit and 32-bit integers, and 32-bit floating-point numbers. One of the major advantages of VJC is that it supports the running of multi-tasking programs.
(3) The robot is equipped with a certain number of sensors and has a certain ability to perceive the surrounding environment. The sensors include 2 infrared transmitters and 1 infrared receiver module, 2 light sensors and 4 collision sensors. In addition, it also includes a rotary angle encoder and a microphone. The infrared sensor can detect objects within about 120° in front and within a distance of 10 to 50 cm; the light sensor can determine the intensity of light; the collision sensor is installed on the collision ring outside the robot and can sense collisions in 8 directions; the microphone has no directionality and can sense the intensity of sound; the rotary encoder is used to measure the angle of wheel rotation.
(4) The robot uses LPC2103 to complete data processing. Although this processor has very powerful processing capabilities, it is not enough for feedback control, so it must be completed by a PC. The robot has a 4-pin SCI bus, which can facilitate the expansion of the robot.
2 Wireless communication hardware platform between PC and robot
2.1 Wireless Communication Module
Considering the characteristics of autonomous mobile robots, wireless communication is an ideal communication method for computers and robots. The CC1000 single-chip RF wireless transceiver module is used in the experiment. The main performance of this module is as follows:
(1) The transmission power is 10 mW.
(2) The operating frequency is in the ISM band and no application point is required.
(3) Interference capability and bit error rate: Based on the FSK modulation method, the high-efficiency forward error correction channel coding technology is adopted to improve the data's ability to resist sudden interference and random interference. When the channel bit error rate is 10"2, the actual bit error rate can be 10.5"10.6.
(4) Transmission distance: In the case of line of sight, the antenna height is >3 m and the reliable transmission distance is >300 m.
(5) Multi-channel, multi-rate: The standard configuration of the wireless communication module provides 8 channels to meet the user's various communication combinations; it can provide multiple baud rates such as 1200 b/s, 2400 b/s, 4800 b/s, 9600 b/s, and the interface baud rate is the same as the wireless transmission baud rate to meet the customer's equipment needs for different baud rates.
(6) Dual serial ports, 3 interface modes: The wireless communication module provides 2 serial ports and 3 interface modes. COM1 is a TTL level UART interface, and COM2 is user-defined as a standard RS-232/RS-485 interface. The hardware can be configured into 7 different channels, with different interface modes and different verification methods.
2.2 Overall design framework of robot wireless communication
Based on the characteristics of the robot and the wireless communication module, the overall framework of the designed wireless control robot is shown in Figure 1.
3 Design of feedback control system composed of PC and robot
The software used in this experiment PC (host computer) is VC++6.0. There are many ways to use VC for serial communication: you can use the control MSComm, or you can use the Win32 API serial communication function. This article chooses the CSerialPort class for serial communication programming (belongs to Win32 API serial communication programming). This programming method is a multi-threaded serial port programming class. Compared with the MSComm control, CSerialPort does not need to add other files when packaging, and the functions are open and transparent, allowing modification. In addition, there is no need to understand data types that are difficult to master. For detailed introduction to this aspect, please refer to the references. The following mainly introduces how the feedback control system is designed. [page]
Open-loop control of the controlled object cannot achieve the ideal control effect, so the robot must be closed-loop controlled. The entire feedback control system is shown in Figure 2.
As can be seen from Figure 2, the controlled object must first be modeled, the relationship between the input and output of the left and right motors of the robot is measured through experiments, and then MATLAB is used to simulate to obtain the model diagram of the controlled object as shown in Figure 3.
As can be seen from the figure, the left and right wheels of the robot have nonlinear characteristics. When the input parameter of the motor is greater than 60, the actual output rate is basically saturated. Therefore, PID control must be added to overcome the nonlinear characteristics of the robot.
In a continuous control system, the control law of the PID control algorithm can be written as follows:
In the formula, u(t) is the output of the PID controller, also known as the control input of the controlled object; ε(t) is the deviation; Kp is the proportional coefficient; Ti is the integral time constant; Td is the differential time constant. In order to implement PID control in a digital control system, the continuous PID control law needs to be transformed into a discrete PID control law, that is, expressed by a differential equation. For this purpose, T0 is taken as the sampling period. Since the sampling period is much smaller than the period of signal change, the integral action in formula (1) can be approximated by the matrix area summation method, and the differential action can be approximated by the backward difference method. Then formula (1) can be transformed into:
Formula (4) is called the recursive formula of the PID controller. Applying formula (4) to calculate the controller output u(k) at sampling time k can greatly save computer memory space and computing time, making real-time control possible. [page]
The actuators of many control systems have a memory function. For example, the stepper motor as an actuator has the function of keeping the historical position. When the controller gives an incremental signal, the actuator moves a certain position from the original position to reach a new equilibrium position. In this case, an incremental PID control algorithm is required. Assume that the control input increment of the controlled object is Δu(k), that is:
Formula (5) is called the incremental PID control algorithm.
The incremental PID and position PID control algorithms are essentially the same, with only some changes in the calculation method. The incremental algorithm is generally used for objects such as stepper motors, but since the motor of the robot used in this article is not a stepper motor, the control quantity it inputs should be an absolute value. Therefore, this article uses the position PID algorithm.
There are various methods for adjusting the three PID parameters. In this experiment, the trial and error method is mainly used. The trial and error method must also follow certain rules. Generally speaking, increasing the proportional coefficient Kp will speed up the system response speed and reduce the system static error, but it will directly affect the stability of the system. Increasing the integral time constant Ti is conducive to improving the stability of the system, but it also increases the adjustment time of the system to eliminate the steady-state error. The differential control effect will improve the dynamic performance of the system.
In the design of the entire feedback system, another important issue is the sampling time T of the system. The sampling time of this system cannot be set too short. Since the robot's speed measurement is completed by a photoelectric encoder, and the code disk stripes used in the experiment are only 66 equal parts, the time is too short, the speed measurement is inaccurate, and the speed value jitters greatly due to the enhanced differential effect. In addition, the robot itself has nonlinear characteristics, so it is necessary to choose a suitable sampling time. After experiments, when the sampling time is ≥0.5 s, the speed fed back by the robot is relatively stable and the jitter is significantly reduced. The program flow chart of the entire feedback control system is shown in Figure 4.
4 Simulation Results Analysis
By adjusting the three parameters of PID, the speed value output by the robot each time is recorded, and then simulation is performed using MATLAB. The simulation diagram of the actual data measured is shown in Figure 5.
The wireless real-time feedback control of the robot by the PC proposed in this paper can be realized within a distance of 20 m, and the real-time performance is good. The PC can process the data fed back in each sampling time in a timely manner and send it back to the robot, so that the robot receives the data and the motion state after PID correction in real time, so the robot can walk according to the pre-set state, thus achieving the purpose of control.
Previous article:Design of intelligent robot based on multi-sensor data fusion
Next article:Design of network communication platform for robot teleoperation
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- Innovation is not limited to Meizhi, Welling will appear at the 2024 China Home Appliance Technology Conference
- Innovation is not limited to Meizhi, Welling will appear at the 2024 China Home Appliance Technology Conference
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- What should I do if the current of the small motor is too large when it starts and the microcontroller is reset?
- MSP430 driver function for LCD1602
- With vias in vogue, where will high-speed DDR4 signals go?
- Micropython can be simulated in proteus
- EEWORLD University Hall----Live Replay: Introduction of ON Semiconductor's Photovoltaic and Energy Storage Products
- Watch the video to win a JD card | Taixiang test of Shuige cheats
- The motor coil is an inductive load, so the current in the coil will have a certain delay relative to the load voltage on the coil.
- Summary of national competition experience sharing
- How to understand the equivalent of capacitors passing AC
- [NXP Rapid IoT Review] +6. Guide to Translation Display Elements