Bionic robots are electromechanical systems with excellent performance designed on the basis of bionics principles, imitating biological structure and motion characteristics. They have gradually shown good application prospects in complex mission environments such as anti-terrorism, explosion protection, space exploration, disaster relief and so on. At present, the problems of robot control system at home and abroad lie in that AVR series microcontrollers and DSP series controllers are usually used to control the robot system in the design. Because quadruped robots need to move steadily on the ground and have strong adaptability to the surrounding environment, they not only need to collect their postures in real-time and adjust them accordingly, but also need to sense the ground impact force on the foot in real-time and then control it. STM32 fully meets the motion control system of quadruped robots. General requirements. Therefore, a quadruped robot control system with its core is designed, and its overall design scheme, software design and hardware design are described in detail. Finally, the simulation results show that the design can achieve accurate and real-time control of quadruped bionic robot. With the rapid development of robotics technology, people’s strong demand for robotic products has been stimulated to a large extent.
In this case, the main design direction is to design and manufacture robots with high practicability, high labor efficiency and strong environmental adaptability. At present, the bionic foot robot designed by people can move flexibly, adapt to various complex working environment quickly, and has a very broad development prospects. Bionic quadruped robot is a typical foot-type robot, which has incomparable advantages over wheeled or tracked robots: this kind of robot has good adaptability to complex ground; it can achieve effective decoupling between the body motion trajectory and the foot motion trajectory so as to ensure the stability of the body motion; and it can be achieved under reasonable gait planning. Minimum loss of guaranteed power [1-3].
In addition, in order to ensure that the robot has enough automation, the airborne control system is required to process feedback information of various complex environments in real time and to send control instructions accurately. In order to ensure that the robot achieves good motion characteristics, this paper proposes a hierarchical control architecture with similar structure, which can advance the control task. Line sharing can improve the real-time performance of the system. In addition, the biped robot walking into a quadruped robot has a strong bearing capacity, and the stability of the latter is better. Moreover, compared with hexapod robot, quadruped robot has simpler mechanism, can effectively adapt to the working environment, and has good flexibility [4]. Therefore, this paper takes quadruped robot as its research object, designs and plans the motion controller of quadruped robot.
The overall structure design of the motion control system covers the control coordination layer, thermostatic element the artificial intelligence layer and the execution layer. The key parts of the design (that is, the joint motion controller) are in the execution layer. The AI layer mainly plans the design of the robot from the macroscopical point of view. The control coordination layer controls the algorithm with the help of bionic CPG (central mode generator) to form a feasible gait, and transmits the position information to 12 joint motion related controllers via CAN bus. The control coordination layer focuses on driving and controlling the related DC current.
The following are its specific functions: CAN bus is used to communicate with the coordination layer; PWM is used to control the speed and position of DC motor; digital PID control is realized; related motor is driven; related feedback information of photoelectric encoder is processed; and relevant information from force sensor is collected. Its main components include LM629 (motion control chip), STM32 (RAM) and LMD18245 (motor driver chip). RAM is the main controller, which can control the motion state of joints.
It should do well the related communication tasks of CAN bus, complete the setting of LM629 parameters, and monitor the specific operation state of related motors. The accuracy of LM629 motion controller is relatively high, focusing on the following activities: controlling digital PID, forming relevant velocity ladder diagram and PWM signal. LMD18245 is a power amplifier chip, focusing on small and medium-sized DC motors. It provides a continuous maximum output current of 3A. It has good performance of over-current protection, over-heat protection and under-voltage protection.
The operation principle of the joint motion controller is as follows: CAN bus is responsible for the communication between the coordination layer and the ARM chip, receives the specific joint position information from the coordination layer, and feeds back to it the specific motion status of many joints, the limit switch quantity and the related information of the force sensor. LM629 and STM32 are connected by control line and data bus. They issue relevant commands to LM629, complete the setting of PID parameters and related parameters of motion control, and read status and data information from LM629 parts. LM629 controls the specific speed of the motor according to the speed ladder diagram automatically generated by the motion parameters. The photoelectric encoder is connected with the load axis in the DC motor here to detect the specific position of the load, that is, the specific position information of the robot joint; when the encoder outputs the related signal through the four-fold frequency of LM629, it decodes in time to obtain the specific value of the position feedback, and compares the preset value with that value, and turns to the digital PID.
The controller inputs its deviation value. The controller calculates and outputs the relevant direction signal and PWM amplitude according to the preset PID parameters. It controls the specific direction and magnitude of the output voltage of LMD18245, drives the motor to move to the relevant position in the set position, and implements the necessary closed-loop control for the motor. ARM control chip collects relevant force sensor information according to a certain time, and transmits these information to the coordination layer to provide effective reference for forming a good gait. If the motor moves beyond the limit position, the limit switch will automatically close. ARM control chip should implement emergency braking on the motor.
The hardware design of the controller is mainly divided into three parts: the main control part, the driving part and the communication part. The driving part is responsible for the control of the robot steering gear. The main control part centralizes the control of the robot, which is responsible for driving the four legs of the robot and responding to the control signal of the host computer. The communication part of the robot adopts serial communication, connecting USART serial port to RS232 bus driver and receiver TJA1050CAN, and converting TTL level of STM32 asynchronous communication port to RS232 level, so as to facilitate communication with host computer. Firstly, the RAM control chip STM32 manufactured by Yifa Semiconductor Company is selected. It can process 32 bits of data at a time, while the ordinary 51 single chip computer can only process 8 bits. The internal RAM and ROM (flash) of STM32 are much larger than that of the general single chip computer, and the main frequency is also very high, reaching 72M and 168M respectively. Therefore, the operation ability is much stronger, the peripherals are also more abundant, and the timer is more powerful. As many as 17, PWM has powerful functions, and its ADC accuracy has reached 12 bits. The floating-point operation unit DSP function, especially the DMA controller, frees the CPU from the busy data transfer. There are also FMSC memory interface, which has abundant external interfaces. There are many serial ports. Some of the high-end ones are camera interface, network interface and so on. STM32 is adopted. Kernel structure, which can respond to the relevant operation instructions quickly, can meet the requirements of the robot without external memory, can optimize the relevant hardware circuit, built-in the corresponding CAN controller, realize the compatibility between CAN2.0 A and CAN2.0B, and can effectively construct CAN communication network; I/O interface is rich, and can effectively connect. Receive analog and digital quantities.
This module is one of the most important modules in joint motion controller. LMD18245 and LM629 integrated chips are adopted successively to realize their own functions. This application chip is highly integrated, which can simplify the corresponding hardware circuit, enhance the stability of the system itself and reduce the weight and volume of the controller. In the case of CS=0 and PS=0, STM32 becomes LM629 writing instructions, or reads from LM629 chip; in the case of CS=0 and PS=1, STM32 can write related data to LM629 or read related data from LM629 chip [8]. After HI inversion in LM629, all interrupt sources of LM629 can be connected with INT0 in STM32.
All interrupt sources of LM629 should apply for interrupt operation with this pin, read relevant status words from MCU, and then determine the specific interrupt source which forms interrupt, and then handle the interrupt problem with interrupt processing program. The output signal in LM629 is the PWM direction signal and the amplitude signal. After the correlation isolation by the optocoupler, these signals are connected with M1-M4 in LMD18245 and the DIR terminal in turn. The latter adjusts and controls the specific movement of the motor according to the direction and amplitude of the PWM signal [9]. The duty cycle of PWM has a decisive effect on the speed of motor, and the level of DIR plays a decisive role in the direction of rotation. After the effective isolation of the P3.4 pin in STM32 through the corresponding photocoupler, it is connected with the BRAKE terminal. When the pin reaches a high level, the input switch of H bridge in LMD18245 rapidly reduces the load current and short circuit to 0, which makes the motor stop running. Joint motion controller uses common CAN bus communication. It has simple structure, high reliability and flexible communication mode. It is especially suitable for establishing corresponding distributed control system [10]. The key components of CAN communication node cover the following contents: processor (ARM, DSP, MCU, etc.), CAN bus transmitter and controller. The specific purpose is for the processor to coordinate and control the whole process of communication; controller mainly receives and transmits related data; transceiver is a connection before physical bus and controller.
The key point is the ability to transmit and receive differential bus. The corresponding CAN controller is installed in STM32, so the transceiver in the external CAN bus can form the required CAN communication node. This paper adopts the TJA1050CAN transceiver produced by Philip Company, which can work normally in the high-speed mode. The CAN communication module relies on the very representative CAN interface circuit [11]. In order to enhance the stability of CAN communication and create electrical isolation between different nodes in CAN network, a corresponding 6M137 (high-speed photoelectric coupler) is added between the transmitter of CAN bus and ARM, and DC/DC module is used to isolate the power supply before and after. When designing the related software of joint motion controller, we should do well in motion control, CAN communication and data acquisition. After the system is powered on and reset, the specific initialization program can be implemented, which covers the initialization of LM629 and CAN communication components, etc. On this basis, the relevant data of coordination layer can be received [12]. In order to receive data better and enhance the response ability of the system itself, interrupt mode is used. First, data processing module is used to convert these data into the format required by LM629.
ARM processor can load motion trajectory parameters (such as speed, acceleration and position values) and PID data into LM629 of the system, then start the motor of the motion controller, and the motor can run to the predetermined position according to the preset speed. When the motor starts, the ARM processor can collect and organize force sensor information from each leg of the robot, send these information to the coordination layer, and then wait for the end of the program or the next movement. Because the motion control chip LM629 is used, the PID algorithm, the information processing of photoelectric encoder and the generation of PWM wave are all completed by hardware, which greatly reduces the workload of software design. The whole software is programmed in C language, which shortens the development cycle and enhances the readability and portability of the program. The simulation of the experiment is to use SimMeehanies toolbox to simulate and analyze the gait planning in MATLAB, and burn the joint angle data to the control board through the program to drive and control the steering gear, so that the robot can move according to the planned gait.
The experimental results show that the roll angle and pitch of the fuselage of the robot in the course of walking