CN101216711A - Hierarchical control device and control method for amphibious mechanical crabs - Google Patents

Hierarchical control device and control method for amphibious mechanical crabs Download PDF

Info

Publication number
CN101216711A
CN101216711A CNA2008100638197A CN200810063819A CN101216711A CN 101216711 A CN101216711 A CN 101216711A CN A2008100638197 A CNA2008100638197 A CN A2008100638197A CN 200810063819 A CN200810063819 A CN 200810063819A CN 101216711 A CN101216711 A CN 101216711A
Authority
CN
China
Prior art keywords
level
joint
controller
control
coordination
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CNA2008100638197A
Other languages
Chinese (zh)
Inventor
陈东良
王立权
季宝锋
邓辉峰
刘德峰
王刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Harbin Engineering University
Original Assignee
Harbin Engineering University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Harbin Engineering University filed Critical Harbin Engineering University
Priority to CNA2008100638197A priority Critical patent/CN101216711A/en
Publication of CN101216711A publication Critical patent/CN101216711A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Manipulator (AREA)

Abstract

本发明提供的是一种两栖机械螃蟹的分级控制装置及控制方法。其组成包括由以S3C44B0为核心ARM系统组成的上层组织级控制部分;由一片AVR单片机ATmega128L组成的协调级控制部分;由8个步行足驱动模块,和一个多传感器信号采集模块构成的执行级控制部分;控制信号输入上层组织级控制部分,协调级控制部分连接于上层组织级控制部分与执行级控制部分之间,执行级控制部分与关节驱动单元之间以485总线通信协议进行通信。本发明以分级分配的设计原则将系统分为组织级、监控协调级和执行级三级,各分布式控制器既可以独立地工作,又可以通过通信线路与上级,或同级进行通信、交换信息。这种递阶的结构兼有了集中结构和分布结构的优点,全局与局部控制性能较高,运行可靠。

Figure 200810063819

The invention provides a hierarchical control device and control method for amphibious mechanical crabs. Its composition includes the upper-level organization-level control part composed of S3C44B0 as the core ARM system; the coordination-level control part composed of an AVR single-chip ATmega128L; the execution-level control composed of 8 walking foot drive modules and a multi-sensor signal acquisition module. part; the control signal is input to the upper-level organization-level control part, and the coordination-level control part is connected between the upper-level organization-level control part and the executive-level control part, and the executive-level control part communicates with the joint drive unit through the 485 bus communication protocol. The present invention divides the system into three levels: organization level, monitoring and coordination level, and execution level based on the design principle of hierarchical distribution. Each distributed controller can work independently, and can communicate and exchange with the upper level or the same level through the communication line. information. This hierarchical structure combines the advantages of centralized structure and distributed structure, with high global and local control performance and reliable operation.

Figure 200810063819

Description

两栖机械螃蟹的分级控制装置及控制方法 Hierarchical control device and control method for amphibious mechanical crabs

(一)技术领域(1) Technical field

本发明涉及的是一种智能机器人的控制装置,本发明也涉及一种智能机器人的控制方法。具体地说是一种两栖机械螃蟹类多足机器人的控制装置及控制方法。The invention relates to a control device for an intelligent robot, and also relates to a control method for an intelligent robot. Specifically, the invention relates to a control device and a control method of an amphibious mechanical crab-like multi-legged robot.

(二)背景技术(2) Background technology

两栖机械螃蟹简介:机器人外形和功能以河蟹为生物原型,共有八只步行足,每只步行足有三个驱动关节;由二十四台伺服电机驱动,形成二十四个自由度。控制器采用DSP进行控制,整体被橡胶外套密封,模拟螃蟹多种行走步态,能在两栖环境下实现灵活的前行、侧行、左右转弯、后退等十四个动作。每只步行足都配有力传感器,来感知外部环境,检测足尖落地和步行足是否碰到障碍物等信息,为步行足的路径规划提供信息。系统的硬件构架采用嵌入式结构,以ARM系统、DSP芯片作为的核心控制器,完成复杂运动的规划和协调任务的运算。该系统采用红外线遥感、力觉传感器、视觉等传感器,运用多传感器信息融合技术,实时辨别外界环境,使具有较高的智能性。能够实现在沙滩、平地、草地、沼泽地、水下等环境前进、后退、左右侧行及任意位置、任意角度、任意方向转弯等。Introduction to the amphibious mechanical crab: The shape and function of the robot are based on the river crab as a biological prototype. There are eight walking legs, each with three driving joints; driven by 24 servo motors, forming 24 degrees of freedom. The controller is controlled by DSP, and the whole is sealed by a rubber jacket, simulating various walking gaits of crabs, and can realize fourteen movements such as forward, sideways, left and right turns, and backwards flexibly in an amphibious environment. Each walking foot is equipped with a force sensor to sense the external environment, detect whether the toe lands and whether the walking foot encounters obstacles, etc., and provide information for the path planning of the walking foot. The hardware framework of the system adopts an embedded structure, with ARM system and DSP chip as the core controller, to complete the planning of complex motion and the calculation of coordination tasks. The system uses infrared remote sensing, force sensor, vision and other sensors, and uses multi-sensor information fusion technology to identify the external environment in real time, making it highly intelligent. It can realize forward, backward, left and right sideways and turns at any position, any angle, and any direction in environments such as beaches, flat land, grassland, swamps, and underwater.

两栖仿生机器蟹在复杂的两栖环境下行走,对控制系统有着较高的要求,为了使机器蟹能够完成一定的作业任务,首先要针对其机构特点和运动特点,分析机器人对控制系统的功能要求,建立硬件控制平台和规划软件结构。机器蟹是一个复杂的被控体系,其每条步行足都是一个多自由度的串联臂,要实现有效的控制,除对每条步行足的三个驱动关节准确高效的控制外,多条步行足之间还要相互协调,产生所需要的步态,共同完成某一确定工作,因而机器蟹在运动过程中所要处理的信息是极其复杂的,且要求是并行、分工明确的。The amphibious bionic robot crab walks in a complex amphibious environment and has high requirements for the control system. In order to enable the robot crab to complete certain tasks, it is first necessary to analyze the functional requirements of the robot for the control system according to its mechanism characteristics and movement characteristics. , establish the hardware control platform and plan the software structure. The robot crab is a complex controlled system, each of its walking legs is a multi-degree-of-freedom serial arm, to achieve effective control, in addition to the accurate and efficient control of the three driving joints of each walking The walking legs need to coordinate with each other to produce the required gait and complete a certain task together. Therefore, the information that the robot crab needs to process during the movement is extremely complex, and the requirements are parallel and clear division of labor.

为实现机器人灵活的、全方位的行走,对其控制系统主要有以下要求:In order to realize the flexible and all-round walking of the robot, the main requirements for its control system are as follows:

(1)多自由度协调控制。机器人总共有24个驱动关节,无论是全方位的行走,还是多功能的实现,都是通过驱动关节间的协调运动来实现的,因此必须对这些关节进行协调控制,评价指标为各关节间位置、速度、加速度的协调精度。(1) Multi-degree-of-freedom coordinated control. The robot has a total of 24 driving joints. Whether it is omni-directional walking or multi-functional realization, it is realized through the coordinated movement between the driving joints. Therefore, these joints must be coordinated and controlled. The evaluation index is the position of each joint. , speed, acceleration coordination accuracy.

(2)反应及时,实时性强,具有综合决策能力。机器人在运动的过程中,路面的状况和周围环境的情况都是随机的,针对这些意外事件,机器人必须能够及时反应,并作出合理的决策,否则将产生严重的后果,评价指标为控制器的运算速度,模块间的通信带宽。(2) Timely response, strong real-time performance, and comprehensive decision-making ability. During the movement of the robot, the conditions of the road surface and the surrounding environment are random. For these unexpected events, the robot must be able to respond in time and make reasonable decisions, otherwise serious consequences will occur. The evaluation index is the controller's Computing speed, communication bandwidth between modules.

(3)智能化,有较强的自治能力,尽量减少人的干预。与传统的自动机械以自身的动作为重点相比,仿生机器人的控制系统则更着重机器人本体与周围环境、操作对象的相互关系。(3) Intelligent, with strong autonomy, minimizing human intervention. Compared with traditional automatic machines that focus on their own actions, the control system of bionic robots focuses more on the relationship between the robot body, the surrounding environment, and the operating object.

(4)易扩展,有增加控制点的能力。随着研究的深入,机器人可能需要增加一些能力,如对周围环境和自身状况的探测的智能模块,机器人不同路况的步态规划模块等,评价指标为控制系统的软硬件接口的冗余度(4) It is easy to expand and has the ability to increase control points. With the deepening of the research, the robot may need to add some capabilities, such as the intelligent module for detecting the surrounding environment and its own situation, the gait planning module for different road conditions of the robot, etc. The evaluation index is the redundancy of the software and hardware interfaces of the control system

(5)提供友好的人机界面。界面是人与控制系统打交道的接口,通过它,一方面操作人员可以把自己的意图详尽地传达给控制系统,另一方面还可以知道机器人当前的状况,评价指标为实时性、信息量。(5) Provide a friendly man-machine interface. The interface is the interface between people and the control system. Through it, on the one hand, the operator can convey his intentions to the control system in detail, and on the other hand, he can also know the current status of the robot. The evaluation indicators are real-time and information volume.

目前的机器人控制系统通常有两种基本的结构形式:集中结构和分布式结构。前者的优点是控制直接、有效性高、便于系统分析和设计;缺点是若控制中心有故障,则整个系统瘫痪,可靠性不高.后者是由主控制器连接若干分布式控制器,每个分布式控制器都有各自的控制对象和目标。其优点是局部的故障不至于影响全局,可靠性高;缺点是总体控制性能差,全局协调运行较困难。The current robot control system usually has two basic structural forms: centralized structure and distributed structure. The former has the advantages of direct control, high effectiveness, and is convenient for system analysis and design; the disadvantage is that if the control center fails, the entire system will be paralyzed and the reliability is not high. The latter is connected by the main controller to several distributed controllers, each Each distributed controller has its own control objects and goals. Its advantage is that local failures will not affect the overall situation, and the reliability is high; the disadvantage is that the overall control performance is poor, and the overall coordinated operation is difficult.

(三)发明内容(3) Contents of the invention

本发明的目的在于提供一种有效性高、便于系统分析和设计、局部的故障不至于影响全局、可靠性高、总体控制性能好、全局协调运行效果好的两栖机械螃蟹的分级控制装置。本发明的目的还在于提供一种两栖机械螃蟹的分级控制方法。The purpose of the present invention is to provide a hierarchical control device for amphibious mechanical crabs with high effectiveness, convenient system analysis and design, local failure will not affect the overall situation, high reliability, good overall control performance, and good global coordinated operation effect. The object of the present invention is also to provide a hierarchical control method of the amphibious mechanical crab.

本发明的目的是这样实现的:The purpose of the present invention is achieved like this:

两栖机械螃蟹的分级控制装置包括上层组织级、中层协调级和下层执行级三大部分;上层组织级控制系统主要由以S3C44B0为核心ARM系统组成,外围扩展包括无线数传模块SRWKF-108、红外遥控接口、Can通信接口MCP2510、RS232接口MAX232、液晶显示模块和Intenet以太网接口RTL8019AS;协调级控制系统由一片AVR单片机ATmega128L组成,它包括声纳环传感器信息处理系统、三轴陀螺传感器信息处理系统、变结构力觉传感器信息处理系统、步行足1协调控制器ATmega16L、步行足2协调控制器ATmega16L、步行足3协调控制器ATmega16L、步行足4协调控制器ATmega16L、步行足5协调控制器ATmega16L、步行足6协调控制器ATmega16L、步行足7协调控制器ATmega16L、步行足8协调控制器ATmega16L;执行级控制系统为模块化结构,由8个步行足驱动模块和一个多传感器信号采集模块构成,每一个步行足驱动模块包括三个驱动器:跟关节驱动器、股关节驱动器和胫关节驱动器;多传感器信号采集模块包括:声纳控制器Msp430F149、力传感器数据处理XC2S100和压力传感器数据采集Msp430F149;每个步行足系统自成一个模块,具体控制各步行足上各关节的运动,它由1片AVR单片机ATmega16L、3片TI的MSP430F1222单片机组成,ATmega16L主要负责电机伺服驱动器的通信和关节电位计的信号采集,MSP430F1222构成了每个步行足各关节电机的伺服驱动器,主要负责执行协调级发送过来的电机控制指令,对各关节电机进行伺服驱动。传感器模块主要由一片AVR单片机ATmega128L组成,负责对每条步行足上力信号的采集处理、超声波传感器阵列的信号采集以及新增外设的扩展。控制信号输入上层组织级控制部分,协调级控制部分连接于上层组织级控制部分与执行级控制部分之间,执行级控制部分与关节驱动单元之间以485总线通信协议进行通信。The hierarchical control device of the amphibious mechanical crab includes three parts: the upper organization level, the middle coordination level and the lower execution level; the upper organization level control system is mainly composed of S3C44B0 as the core ARM system, and the peripheral expansion includes wireless data transmission module SRWKF-108, infrared Remote control interface, Can communication interface MCP2510, RS232 interface MAX232, LCD module and Intenet Ethernet interface RTL8019AS; the coordination level control system is composed of an AVR microcontroller ATmega128L, which includes the sonar ring sensor information processing system and the three-axis gyro sensor information processing system , variable structure force sensor information processing system, walking foot 1 coordination controller ATmega16L, walking foot 2 coordination controller ATmega16L, walking foot 3 coordination controller ATmega16L, walking foot 4 coordination controller ATmega16L, walking foot 5 coordination controller ATmega16L, Walking foot 6 coordination controller ATmega16L, walking foot 7 coordination controller ATmega16L, walking foot 8 coordination controller ATmega16L; the execution level control system is a modular structure, consisting of 8 walking foot drive modules and a multi-sensor signal acquisition module, each A walking foot driving module includes three drivers: heel joint driver, hip joint driver and tibial joint driver; multi-sensor signal acquisition module includes: sonar controller Msp430F149, force sensor data processing XC2S100 and pressure sensor data acquisition Msp430F149; each walking The foot system is a module of its own, which specifically controls the movement of each joint on each walking foot. It consists of 1 piece of AVR single-chip ATmega16L and 3 pieces of TI MSP430F1222 single-chip. ATmega16L is mainly responsible for the communication of the motor servo driver and the signal acquisition of the joint potentiometer. MSP430F1222 constitutes the servo driver of each joint motor of each walking foot, which is mainly responsible for executing the motor control instructions sent by the coordination level, and servo-driving the joint motors. The sensor module is mainly composed of an AVR microcontroller ATmega128L, which is responsible for the acquisition and processing of the upper force signal of each walking foot, the signal acquisition of the ultrasonic sensor array, and the expansion of new peripherals. The control signal is input to the upper-level organization-level control part, and the coordination-level control part is connected between the upper-level organization-level control part and the executive-level control part, and the executive-level control part communicates with the joint drive unit through the 485 bus communication protocol.

本发明的两栖机械螃蟹的分级控制装置的步行足驱动模块的核心芯片由3片微处理器MSP430f1222和一片ATmega16L构成,一片Msp430F1222、功率放大电路、光电编码器反馈电路组成运动控制器,Msp430F1222与增量光电编码器、电位计、PWM功率放大器都相连,并与蟹足关节协调器通过并行接口相连;Msp430F1222、PWM功率放大器、电机M和电位计组成了绝对位置闭环检测系统,而Msp430F1222、PWM功率放大器、电机M和光电编码器通过光电编码器接口形成增量位置、速度反馈闭环系统,整个控制器模块通过并行通信接口与组织级的步行足协调控制器相连。The core chip of the walking foot drive module of the hierarchical control device for amphibious mechanical crabs of the present invention is composed of 3 microprocessors MSP430f1222 and a slice of ATmega16L, a slice of Msp430F1222, power amplifier circuit, photoelectric encoder feedback circuit to form a motion controller, Msp430F1222 and amplifier Quantitative photoelectric encoder, potentiometer, PWM power amplifier are all connected, and connected with crab foot joint coordinator through parallel interface; Msp430F1222, PWM power amplifier, motor M and potentiometer constitute the absolute position closed-loop detection system, while The amplifier, the motor M and the photoelectric encoder form an incremental position and speed feedback closed-loop system through the photoelectric encoder interface, and the entire controller module is connected with the organization-level walking foot coordination controller through a parallel communication interface.

两栖机械螃蟹的分级控制方法为:The hierarchical control method of the amphibious mechanical crab is as follows:

步态规划模块根据传感器提供的信息判断机器人当前状况,之后根据所选择的坐标系、机器人正运动学和逆运动学,规划出机器人下一个姿态各个关节的角度;指令发送模块将计算得到的各个关节角度以通信协议规定的指令格式,按照一定的循环周期向下层各伺服控制单元发送;反馈中断模块的作用是,当各关节位置达到理想位置后向上位机传送反馈信号,上位机中利用中断接受这个反馈信息,并启动下一个位置命令的传送;显示模块将机器人的状态用LCD液晶屏进行显示;无线遥控模块用于机器蟹接收控制人员的决策命令,使其可控。The gait planning module judges the current state of the robot based on the information provided by the sensor, and then plans the angles of each joint of the robot's next posture according to the selected coordinate system, forward kinematics and inverse kinematics of the robot; The joint angle is sent to each servo control unit in the lower layer according to the command format specified in the communication protocol according to a certain cycle; the function of the feedback interrupt module is to send a feedback signal to the upper computer when the position of each joint reaches the ideal position, and the upper computer uses the interrupt Accept this feedback information and start the transmission of the next position command; the display module displays the status of the robot on the LCD screen; the wireless remote control module is used for the robot crab to receive the decision-making command of the controller to make it controllable.

整个控制系统在开关打开开始工作后,第一步进行系统初始化和各关节位置复位,系统在初始化和各关节复位后,等待控制器指令,当我们用无线遥控手柄或是红外遥控器发出执行动作指令后,上层控制器接收指令信号,根据上层主控器传送的指令和数据控制电机进行相应的动作,并根据反馈的结果来确定是否执行完毕,然后等待下一指令,上层主控器传送的指令到数据控制电机需要经过通讯中断判断程序、通讯中断子程序后,将指令分解为8条步行足三个关节的参数,执行单关节位置伺服子程序就会根据各个关节参数进行相应控制,通过一个执行判断指令来控制程序最终是否执行完毕;当在整个系统执行过程中,人为无线遥控让其运动停止、改变运动指令或是任务没有最终完成都会返回指令等待状态;处于上层的主控器通过RS485给下位关节驱动控制器传送的指令应包括该关节的转动方向,转动角度和转动的角速度等信息;而关节驱动控制器通过RS485总线将关节转角和步行足当前状态等信息实时的反馈给上位机。After the whole control system starts to work after the switch is turned on, the first step is to initialize the system and reset the position of each joint. After the initialization and reset of each joint, the system waits for the controller command. After the instruction, the upper-layer controller receives the instruction signal, controls the motor to perform corresponding actions according to the instructions and data transmitted by the upper-layer main controller, and determines whether the execution is completed according to the feedback result, and then waits for the next instruction. From the command to the data control motor, it needs to go through the communication interruption judgment program and the communication interruption subroutine, and decompose the command into 8 parameters of the three joints of the walking foot. After executing the single joint position servo subroutine, the corresponding control will be carried out according to the parameters of each joint. An execution judgment instruction to control whether the program is finally executed; when the whole system is executed, the artificial wireless remote control makes its movement stop, changes the movement instruction or the task is not finally completed, it will return to the instruction waiting state; the master controller at the upper layer passes The instructions transmitted by RS485 to the lower joint drive controller should include information such as the rotation direction, rotation angle and rotational angular velocity of the joint; and the joint drive controller will feed back information such as the joint rotation angle and the current state of the walking foot to the upper position in real time through the RS485 bus. machine.

本发明针对机械螃蟹控制的特点,提出分级递阶控制系统,该系统吸收了集中结构和分布式结构两种结构的优点。以分级分配的设计原则将系统分为组织级、监控协调级和执行级三级,各分布式控制器既可以独立地工作,又可以通过通信线路与上级,或同级进行通信、交换信息。这种递阶的结构兼有了集中结构和分布结构的优点,因而它的全局与局部控制性能较高,运行可靠。Aiming at the characteristics of mechanical crab control, the present invention proposes a hierarchical control system, which absorbs the advantages of both the centralized structure and the distributed structure. The system is divided into three levels based on the design principle of hierarchical distribution: organization level, monitoring and coordination level, and execution level. Each distributed controller can work independently, and communicate and exchange information with the upper level or the same level through communication lines. This hierarchical structure combines the advantages of centralized structure and distributed structure, so its global and local control performance is high, and its operation is reliable.

本发明是根据两栖机械螃蟹复杂的控制系统要求,提供了一种基于分级递阶控制系统的两栖机械螃蟹的优化控制方法,它包括分层递阶控制装置及控制方法两部分,分层递阶控制装置和控制方法均采用组织级、监控协调级和执行级三级协调处理方式。这种控制方法适用于控制所有的多足机器人,分级递阶控制系统吸收了集中式和分布式结构的优点,具有有效性高、便于系统分析和设计、局部的故障不至于影响全局、可靠性高、总体控制性能好、全局协调运行效果好等特点。它以分级分配的设计原则将系统分为组织级、监控协调级和执行级三级,各分布式控制器既可以独立地工作,又可以通过通信线路与上级,或同级进行通信、交换信息。这种递阶的结构兼有了集中结构和分布结构的优点,因而它的全局与局部控制性能较高,运行可靠。图1为分级递阶控制系统结构示意图。According to the complex control system requirements of amphibious mechanical crabs, the present invention provides an optimal control method for amphibious mechanical crabs based on a hierarchical control system, which includes two parts: a hierarchical control device and a control method. Both the control device and the control method adopt the three-level coordination processing method of organization level, monitoring coordination level and execution level. This control method is suitable for controlling all multi-legged robots. The hierarchical control system absorbs the advantages of centralized and distributed structures. It has high effectiveness, is convenient for system analysis and design, and local failures will not affect the overall situation. Reliability High performance, good overall control performance, and good overall coordinated operation effect. It divides the system into three levels: organization level, monitoring and coordination level, and execution level based on the design principle of hierarchical distribution. Each distributed controller can work independently, and can communicate and exchange information with the upper level or the same level through communication lines. . This hierarchical structure combines the advantages of centralized structure and distributed structure, so its global and local control performance is high, and its operation is reliable. Figure 1 is a schematic diagram of the hierarchical control system structure.

分级递阶控制基本原理:组织级代表控制系统的主导思想,具有最高的智能水平,涉及知识(电子地图)的表示与处理,并由人工智能(路径规划、集群协作)起主导作用,在运行过程中可人为干预,通过向机器蟹发送命令信息,可以人为改变其行走路径、协作策略;协调级为组织级和执行级之间的连接装置,涉及决策方式的表示,由人工智能和运筹学起主导作用;执行级是智能控制系统的最低层次,要求具有最高的控制精度,并由常规控制理论进行控制。The basic principle of hierarchical control: the organization level represents the dominant idea of the control system, has the highest level of intelligence, involves the representation and processing of knowledge (electronic map), and is dominated by artificial intelligence (path planning, cluster collaboration). Human intervention is possible in the process, and by sending command information to the robot crab, its walking path and cooperation strategy can be artificially changed; the coordination level is the connection device between the organization level and the execution level, involving the representation of decision-making methods, and is controlled by artificial intelligence and operations research. It plays a leading role; the execution level is the lowest level of the intelligent control system, which requires the highest control precision and is controlled by conventional control theory.

机器蟹的控制系统涉及到24个电机的协调控制、8组变结构力觉传感器的信号采集与处理、三轴位姿陀螺信号采集与处理、两栖仿生步态的生成、避障路径规划、人机交互、无线和红外通信的管理等,是一个非常庞大的系统。“分解”与“协调”是大系统控制最基本的设计原则。The control system of the robot crab involves the coordinated control of 24 motors, the signal acquisition and processing of 8 groups of variable structure force sensors, the acquisition and processing of three-axis position and attitude gyro signals, the generation of amphibious bionic gait, the obstacle avoidance path planning, the human Computer interaction, management of wireless and infrared communication, etc., is a very large system. "Decomposition" and "coordination" are the most basic design principles of large-scale system control.

分级递阶控制的方案被认为是目前实现大系统综合控制的理想方案,它有分散控制、分布式控制和递阶控制几种形式。机器蟹采用了分级递阶智能控制系统,主控单元与分布式关节驱动单元之间以485总线通信协议进行通信,这种分工明确、能够进行并行处理的分布式结构便于提高运算、执行速度和控制精度,其整体组成结构如图2所示:主控系统包括组织层、协调层、执行层三大部分,组织层包括主控制器、人机操作界面、各种环境状态的计算知识库和步态规则库,组织层负责人机交互、避障策略推算、步态生成等;协调层处于组织层与执行层之间,包括传感器分析模块、步态生成系统、单腿复合动作库以及各关节单元动作库,协调层负责任务协调;执行层包括超声波传感器、变结构力觉传感器、三轴陀螺以及各关节驱动器,执行层主要负责传感器的数据分析、步态生成,其处于控制系统的最底层,任务单一、分工明确,如:负责传感器信号采集、处理、精确控制电机等。The hierarchical control scheme is considered to be an ideal scheme to realize the comprehensive control of large systems at present, and it has several forms of decentralized control, distributed control and hierarchical control. The robot crab adopts a hierarchical intelligent control system. The main control unit and the distributed joint drive unit communicate with the 485 bus communication protocol. This distributed structure with clear division of labor and capable of parallel processing facilitates the improvement of calculation, execution speed and Control accuracy, its overall composition structure is shown in Figure 2: the main control system includes three parts: the organization layer, the coordination layer, and the execution layer. Gait rule base, the organization layer is responsible for human-computer interaction, obstacle avoidance strategy calculation, gait generation, etc.; the coordination layer is between the organization layer and the execution layer, including sensor analysis module, gait generation system, single-leg compound action library and various The joint unit action library, the coordination layer is responsible for task coordination; the execution layer includes ultrasonic sensors, variable structure force sensors, three-axis gyroscopes, and joint drivers. The execution layer is mainly responsible for sensor data analysis and gait generation. The bottom layer has a single task and a clear division of labor, such as: responsible for sensor signal acquisition, processing, and precise control of motors.

(四)附图说明(4) Description of drawings

图1是分级递阶控制系统结构示意图;Figure 1 is a schematic structural diagram of a hierarchical control system;

图2是机器蟹分级递阶控制系统;Fig. 2 is the hierarchical control system of the robot crab;

图3是机器蟹控制系统整体硬件结构;Fig. 3 is the overall hardware structure of the robotic crab control system;

图4是运动控制器系统构成;Figure 4 is the composition of the motion controller system;

图5是功放电路L6203接线图;Figure 5 is a wiring diagram of the power amplifier circuit L6203;

图6是光电隔离电路;Fig. 6 is a photoelectric isolation circuit;

图7是辨转向电路及其波形图;Fig. 7 is to distinguish steering circuit and its waveform diagram;

图8是无限数传模块应用原理图;Figure 8 is a schematic diagram of the application of the infinite data transmission module;

图9是主机的红外通讯系统结构;Fig. 9 is the structure of the infrared communication system of the host;

图10是红外遥控器内部电气连接图;Figure 10 is an internal electrical connection diagram of the infrared remote controller;

图11是RS485通讯芯片HVD3082的接线;Figure 11 is the wiring of the RS485 communication chip HVD3082;

图12是以太网接口电路示意图;Fig. 12 is a schematic diagram of an Ethernet interface circuit;

图13是CAN总线接口电路图;Fig. 13 is a CAN bus interface circuit diagram;

图14是机器蟹分层递阶控制系统;Fig. 14 is the layered and hierarchical control system of the robot crab;

图15是控制系统软件框图。Figure 15 is a block diagram of the control system software.

(五)具体实施方式(5) Specific implementation methods

下面结合附图举例对本发明做更详细地描述:The present invention is described in more detail below in conjunction with accompanying drawing example:

结合图1、图2和图3,他包括上层组织级、中层协调级和下层执行级三大部分。上层组织级控制系统主要由以S3C44B0为核心ARM系统组成,外围扩展包括无线数传模块SRWKF-108、红外遥控接口、Can通信接口MCP2510、RS232接口MAX232、液晶显示模块和Intenet以太网接口RTL8019AS等。组织级的功能主要负责接受用户命令、向用户反馈信息、根据现场环境规划各个蟹腿的运动策略,无线数传模块SRWKF-108和红外遥控接口通过各自串口与机器人主控制器相连,为机器人提供远程遥控功能,Can通信接口MCP2510和RS232接口MAX232为机器人在线调试提供多种下载和调试接口,液晶显示模块通过系统总线与机器人主控制器相连,它为机器人程序调试和试验提供直观的参数和界面,Intenet以太网接口RTL8019AS为建立多机器人协作提供局域网络通信接口。协调级控制系统由一片AVR单片机ATmega128L组成,它包括声纳环传感器信息处理系统、三轴陀螺传感器信息处理系统、变结构力觉传感器信息处理系统、步行足1协调控制器ATmega16L、步行足2协调控制器ATmega16L、步行足3协调控制器ATmega16L、步行足4协调控制器ATmega16L、步行足5协调控制器ATmega16L、步行足6协调控制器ATmega16L、步行足7协调控制器ATmega16L、步行足8协调控制器ATmega16L。协调级负责协调各足以组合出各种各样的步态,机器蟹的步态是机器人运动的基本单元,是决策系统的基本保障,它包括一些常规的步态,如水环境高姿双四足横行步态、低姿M型五足着地步态等,还包括一些非常规步态,如第N(N=1~3)足断足步态、水环境越障步态等,步行足的协调控制。而步态的选择是与外界环境有关系的,声纳环传感器信息处理系统通过一片Msp430F149对声纳控制器返回的监测数据进行分析处理,他主要是检测远距离障碍物以及水下通信等。三轴陀螺传感器信息处理系统通过陀螺XC2S100内的力传感器数据进行处理分析,主要检测机器人机体在环境中的偏转角度,保证机器人不能翻倒。变结构力觉传感器信息处理系统通过一片Msp430F149进行数据采集,主要监测近距离的障碍物、凹坑等、台阶、斜坡等,对机器人行走过程进行实时检测,保证不会损伤、掉陷等。处理分析以上三种传感器的数据是为了给机器人增加外传感装置,使机器人能更好的适应环境,以最优的步态行进,提高工作效率。执行级控制系统采用模块化的方法,由8个步行足驱动模块和一个多传感器信号采集模块构成,每一个步行足驱动模块包括三个驱动器:跟关节驱动器、股关节驱动器和胫关节驱动器;多传感器信号采集模块包括:声纳控制器(Msp430F149)、力传感器数据处理XC2S100(陀螺)和压力传感器数据采集(Msp430F149)。每个步行足系统自成一个模块,具体控制各步行足上各关节的运动,它由1片AVR单片机ATmega16L、3片TI的MSP430F1222单片机组成,ATmega16L主要负责电机伺服驱动器的通信和关节电位计的信号采集,MSP430F1222构成了每个步行足各关节电机的伺服驱动器,主要负责执行协调级发送过来的电机控制指令,对各关节电机进行伺服驱动。传感器模块主要由一片AVR单片机ATmega128L组成,负责对每条步行足上力信号的采集处理、超声波传感器阵列的信号采集以及新增外设的扩展。Combined with Figure 1, Figure 2 and Figure 3, it includes three parts: the upper organizational level, the middle coordination level and the lower execution level. The upper organization-level control system is mainly composed of S3C44B0 as the core ARM system, and peripheral extensions include wireless data transmission module SRWKF-108, infrared remote control interface, Can communication interface MCP2510, RS232 interface MAX232, liquid crystal display module and Intenet Ethernet interface RTL8019AS, etc. The organization-level functions are mainly responsible for accepting user commands, feeding back information to users, and planning the movement strategy of each crab leg according to the on-site environment. The wireless data transmission module SRWKF-108 and the infrared remote control interface are connected to the main robot controller through their respective serial ports to provide Remote control function, Can communication interface MCP2510 and RS232 interface MAX232 provide a variety of download and debugging interfaces for online debugging of robots. The LCD module is connected to the main controller of the robot through the system bus, which provides intuitive parameters and interfaces for robot program debugging and testing. , Intenet Ethernet interface RTL8019AS provides a local area network communication interface for establishing multi-robot collaboration. The coordination level control system consists of an AVR microcontroller ATmega128L, which includes a sonar ring sensor information processing system, a three-axis gyro sensor information processing system, a variable structure force sensor information processing system, walking foot 1 coordination controller ATmega16L, walking foot 2 coordination Controller ATmega16L, walking foot 3 coordination controller ATmega16L, walking foot 4 coordination controller ATmega16L, walking foot 5 coordination controller ATmega16L, walking foot 6 coordination controller ATmega16L, walking foot 7 coordination controller ATmega16L, walking foot 8 coordination controller ATmega16L. The coordination level is responsible for coordinating various gaits. The gait of the robot crab is the basic unit of robot movement and the basic guarantee for the decision-making system. It includes some conventional gaits, such as high-profile quadrupeds in water environments. Walking gait, low-profile M-shaped five-legged landing gait, etc., also includes some unconventional gaits, such as the Nth (N=1~3) foot-breaking gait, water environment obstacle-crossing gait, etc. Coordinated control. The choice of gait is related to the external environment. The sonar ring sensor information processing system analyzes and processes the monitoring data returned by the sonar controller through a piece of Msp430F149. It mainly detects long-distance obstacles and underwater communication. The three-axis gyro sensor information processing system processes and analyzes the force sensor data in the gyro XC2S100, and mainly detects the deflection angle of the robot body in the environment to ensure that the robot cannot fall over. The variable structure force sensor information processing system collects data through a piece of Msp430F149. It mainly monitors short-distance obstacles, pits, steps, slopes, etc., and performs real-time detection of the robot's walking process to ensure that it will not be damaged or dropped. The purpose of processing and analyzing the data of the above three sensors is to add external sensing devices to the robot, so that the robot can better adapt to the environment, advance with an optimal gait, and improve work efficiency. The executive-level control system adopts a modular approach and consists of 8 walking foot drive modules and a multi-sensor signal acquisition module. Each walking foot drive module includes three drives: heel joint drive, femoral joint drive and tibial joint drive; The sensor signal acquisition module includes: sonar controller (Msp430F149), force sensor data processing XC2S100 (gyro) and pressure sensor data acquisition (Msp430F149). Each walking foot system is a module of its own, which specifically controls the movement of each joint on each walking foot. It is composed of 1 piece of AVR microcontroller ATmega16L and 3 pieces of TI MSP430F1222 singlechip. ATmega16L is mainly responsible for the communication of the motor servo driver and the joint potentiometer. For signal acquisition, MSP430F1222 constitutes the servo driver of each joint motor of each walking foot, which is mainly responsible for executing the motor control instructions sent by the coordination level, and servo-driving the joint motors. The sensor module is mainly composed of an AVR microcontroller ATmega128L, which is responsible for the acquisition and processing of the upper force signal of each walking foot, the signal acquisition of the ultrasonic sensor array, and the expansion of new peripherals.

两栖仿生机器蟹整体硬件结构详细组成如图3所示,整个工作过程是:上层组织级的外围扩展模块无线数传模块SRWKF-108、红外遥控接口、Can通信接口MCP2510、RS232接口MAX232、液晶显示模块和Intenet以太网接口RTL8019AS为机器人远程无线遥控、程序在线调试、人机交互界面、局域网通信接口提供给基本硬件接口;声纳控制器(Msp430F149)、力传感器数据处理XC2S100(陀螺)和压力传感器数据采集(Msp430F149)是机器人的外围检测模块,为机器人工作环境提供实时参数,这些参数不断的通过协调级的声纳环传感器信息处理系统、三轴陀螺传感器信息处理系统和变结构力觉传感器信息处理系统处理后反馈给上层组织级的S3C44B0主控,主控根据传回的数据相应发出不同的步态库指令,这些指令又通过协调级的8个步行足协调控制器处理后把指令参数发给执行级的各个关节,这样就完成了适应于不同环境的步态,行走过程中是实时监测的,根据外界环境相应改变行走步态和路径,使其能以最优、最快的方式行进。The detailed composition of the overall hardware structure of the amphibious bionic robot crab is shown in Figure 3. The entire working process is: the upper-level organizational-level peripheral expansion module wireless data transmission module SRWKF-108, infrared remote control interface, Can communication interface MCP2510, RS232 interface MAX232, liquid crystal display Module and Intenet Ethernet interface RTL8019AS provide basic hardware interface for robot remote wireless remote control, program online debugging, human-computer interaction interface, LAN communication interface; sonar controller (Msp430F149), force sensor data processing XC2S100 (gyroscope) and pressure sensor Data acquisition (Msp430F149) is the peripheral detection module of the robot, which provides real-time parameters for the working environment of the robot. These parameters are continuously passed through the coordination level sonar ring sensor information processing system, three-axis gyro sensor information processing system and variable structure force sensor information. After processing, the processing system feeds back to the S3C44B0 master control at the upper organization level. The master control sends out different gait library instructions according to the returned data. For each joint of the execution level, the gait adapted to different environments is completed. The walking process is monitored in real time, and the walking gait and path are changed accordingly according to the external environment, so that it can move in the optimal and fastest way. .

1.蟹足关节电机驱动模块1. Crab foot joint motor drive module

蟹足关节电机驱动模块,可以驱动一条蟹足上的三个关节电机,核心芯片由3片微处理器MSP430f1222和一片ATmega16L构成,MSP430f1222主要负责单个电机的伺服驱动;ATmega16L负责三个电机的协调控制、与上位机通信、电位计信号的采集。The crab foot joint motor drive module can drive three joint motors on a crab foot. The core chip is composed of three microprocessors MSP430f1222 and one ATmega16L. MSP430f1222 is mainly responsible for the servo drive of a single motor; ATmega16L is responsible for the coordinated control of the three motors , Communication with host computer, acquisition of potentiometer signal.

电机控制器硬件构成Motor Controller Hardware Composition

结合图4,运动控制器由一片Msp430F1222最小系统构成,包括:一片Msp430F1222、功率放大电路、光电编码器反馈电路组成,Msp430F1222与增量光电编码器、电位计、PWM功率放大器都相连,并与蟹足关节协调器通过并行接口相连。Msp430F1222、PWM功率放大器、电机M和电位计组成了绝对位置闭环检测系统,而Msp430F1222、PWM功率放大器、电机M和光电编码器通过光电编码器接口形成了增量位置、速度反馈闭环系统,整个控制器模块通过并行通信接口与组织级的步行足协调控制器相连,进行数据的传递,Msp430F1222接收到指令后通过功率放大输出PWM信号,控制电机M的转动,而电位计监测电机M的绝对位置后,光电编码器以此开始计数反馈,正样就能对电机M进行速度、加速度和位置的调节控制,这样就达到了控制机器人关节的目的。Combined with Figure 4, the motion controller is composed of a minimum system of Msp430F1222, including: a piece of Msp430F1222, a power amplifier circuit, and a photoelectric encoder feedback circuit. Msp430F1222 is connected to an incremental photoelectric encoder, potentiometer, and PWM power amplifier. The foot joint coordinator is connected through a parallel interface. Msp430F1222, PWM power amplifier, motor M and potentiometer constitute an absolute position closed-loop detection system, while Msp430F1222, PWM power amplifier, motor M and photoelectric encoder form an incremental position and speed feedback closed-loop system through the photoelectric encoder interface, the entire control The controller module is connected to the organization-level walking foot coordination controller through the parallel communication interface to transmit data. After receiving the instruction, Msp430F1222 outputs a PWM signal through power amplification to control the rotation of the motor M, and the potentiometer monitors the absolute position of the motor M. , the photoelectric encoder starts counting feedback, and the speed, acceleration and position of the motor M can be adjusted and controlled, so that the purpose of controlling the robot joints is achieved.

[1]功率放大驱动电路[1] Power amplifier drive circuit

结合图5,功率放大电路要求较高的性能保证机器蟹控制系统的稳定运行。选用性能参数比较合适的集成功率放大器,与采用分立元件设计的功放电路相比,不但能减小功放电路的体积,提高整体性能,而且集成功放中设计有多种多样的保护电路,可以减少系统故障的可能,增强系统的可靠性。因此,在设计功率驱动电路的时,对芯片的体积、性能、价格等各方面作仔细对比后,选择了ST公司生产的全桥电机驱动专用芯片L6203。Combined with Figure 5, the power amplifier circuit requires high performance to ensure the stable operation of the robot crab control system. Selecting an integrated power amplifier with appropriate performance parameters, compared with a power amplifier circuit designed with discrete components, not only can reduce the volume of the power amplifier circuit and improve the overall performance, but also has a variety of protection circuits designed in the integrated power amplifier, which can reduce system power consumption. The possibility of failure and enhance the reliability of the system. Therefore, when designing the power drive circuit, after carefully comparing the size, performance, price and other aspects of the chip, the full-bridge motor drive chip L6203 produced by ST Company was selected.

L620x系列集成功率放大电路是专为中小型电机控制而设计的,其内部集成了DMOS(耗尽型场效应管)功率开关管、CMOS和双极性电路;最大供电电压可达48V,输出电流达到5A,含有过热保护、过载保护;提供最大40ns死区时间;最高频率可达100KHz,输入兼容TTL、CMOS电平。The L620x series integrated power amplifier circuit is specially designed for small and medium-sized motor control. It integrates DMOS (depletion mode field effect transistor) power switch tube, CMOS and bipolar circuit inside; the maximum supply voltage can reach 48V, and the output current Up to 5A, with overheat protection and overload protection; provide a maximum dead time of 40ns; the highest frequency can reach 100KHz, and the input is compatible with TTL and CMOS levels.

[2]光电编码器反馈电路[2] Photoelectric encoder feedback circuit

结合图6,编码器是电机的反馈通道,电动机的转速、方向、位置都是通过编码器的反馈脉冲得到的,该电路由光电隔离电路、辨转向电路、细分电路、计数器四部分组成,光电隔离电路主由两路高速光电偶合器6N137,其能够响应高达10MHz的高频脉冲,来对电动机相位差90°的A、B两通道信号进行光电隔离,能够有效地清除外界电磁信号对后续计数器的干扰。Combined with Figure 6, the encoder is the feedback channel of the motor. The speed, direction and position of the motor are obtained through the feedback pulse of the encoder. The circuit consists of four parts: a photoelectric isolation circuit, a steering circuit, a subdivision circuit, and a counter. The photoelectric isolation circuit is mainly composed of two high-speed photoelectric couplers 6N137, which can respond to high-frequency pulses up to 10MHz to photoelectrically isolate the A and B two-channel signals with a phase difference of 90° from the motor, and can effectively eliminate the impact of external electromagnetic signals on subsequent counter interference.

结合图7,辨转向电路由一个D触发器构成,经过光隔整形处理的A、B两相脉冲分别输入到D触发器的D端和CP端,故D触发器的CP端在A脉冲的上升沿触发。由于A、B脉冲相位差90°,当正转时,B脉冲超前A脉冲90°,触发器总是在B脉冲处于高电平时触发,从图中可以看出Q=1表示正转,反转时A脉冲超前B脉冲90°,触发器总是在B脉冲处于低电平时触发,此时Q=0,表示反转。Combining with Figure 7, the steering circuit is composed of a D flip-flop, and the A and B two-phase pulses processed by light interval shaping are respectively input to the D terminal and CP terminal of the D flip-flop, so the CP terminal of the D flip-flop is at the A pulse Rising edge trigger. Since the A and B pulses have a phase difference of 90°, when rotating forward, the B pulse is ahead of the A pulse by 90°, and the trigger is always triggered when the B pulse is at a high level. It can be seen from the figure that Q=1 means forward rotation, and reverse rotation When turning, the A pulse is 90° ahead of the B pulse, and the trigger is always triggered when the B pulse is at a low level. At this time, Q=0, which means inversion.

2.无线数传模块2. Wireless data transmission module

为实现机器蟹可控,并对行进时的数据进行反馈,在机器蟹上层控制系统中安装了SRWF-108型微功率无线数传模块,他包括:无线操纵手柄(发射)和接收模块,而接收模块由接收天线、数据处理模块(RF IC和AtmelMCU)、串口UART组成。该模块传输特点如下:①传输距离较远,在视距情况下,天线高度大于3m,可靠传输距离大于3000m;②能适合标准或非标准的用户协议;③支持多信道,多速率;④双串口,三种接口方式;⑤支持有无校验两种数据结构。In order to realize the controllability of the robot crab and give feedback to the data when it is moving, a SRWF-108 micro-power wireless data transmission module is installed in the upper control system of the robot crab, which includes: a wireless joystick (transmitting) and a receiving module, and The receiving module is composed of receiving antenna, data processing module (RF IC and AtmelMCU), and serial port UART. The transmission characteristics of this module are as follows: ①The transmission distance is relatively long. In the case of line of sight, the antenna height is greater than 3m, and the reliable transmission distance is greater than 3000m; ②It can be suitable for standard or non-standard user protocols; ③Support multi-channel, multi-rate; ④Dual Serial port, three interface modes; ⑤Support two data structures with or without verification.

无限数传模块可提供标准的RS-232、RS-485和UART(TTL电平)三种接口方式,可与计算机、用户的RS-485设备、单片机或其它UART器件直接连接使用,其通信信道是半双工的,最适合点对多点的通信方式。应用原理图见图8所示。工作过程是:人手中操控发射手柄面板指令,由发射天线发射无线电波信号指令,而由图8中的天线接收无线电波信号,经过RF IC接收后由处理器AtmelMCU分析校验,滤掉没有用的信号,将有用的信号指令数据经过串口UART传递给机器人主控制器ARM,这样,ARM就通过传过来的指令执行相应的指令程序,达到机器人远程遥控工作的目的。The infinite data transmission module can provide standard RS-232, RS-485 and UART (TTL level) three interface methods, which can be directly connected with computers, user RS-485 equipment, single-chip microcomputers or other UART devices, and its communication channel It is half-duplex and most suitable for point-to-multipoint communication. The schematic diagram of the application is shown in Figure 8. The working process is: manipulating the command of the launch handle panel in the hand, the radio wave signal command is transmitted by the transmitting antenna, and the radio wave signal is received by the antenna in Figure 8, and after being received by the RF IC, it is analyzed and verified by the processor AtmelMCU, and it is useless to filter out The useful signal command data is transmitted to the robot main controller ARM through the serial port UART, so that the ARM executes the corresponding command program through the transmitted command to achieve the purpose of remote control of the robot.

3.红外遥控模块3. Infrared remote control module

机器蟹的红外通信系统由主控处理器的红外接口、红外遥控手柄两部分构成,遥控手柄由键盘扫描、红外解码编码、红外收发器三部分构成。红外通信的基本原理是发送端将基带二进制信号调制为一系列的脉冲信号,再通过红外发射管发射红外信号。串行红外传输采用特定的脉冲编码标准,这种标准与RS232串行传输标准不同,若两设备之间进行串行红外通讯,就需要进行RS232编码和IrDA编码之间的转换。红外通讯接口由红外收发器和红外编码解码器构成。The infrared communication system of the robot crab consists of two parts: the infrared interface of the main control processor and the infrared remote control handle. The remote control handle consists of three parts: keyboard scanning, infrared decoding and encoding, and infrared transceiver. The basic principle of infrared communication is that the sending end modulates the baseband binary signal into a series of pulse signals, and then emits the infrared signal through the infrared emitting tube. The serial infrared transmission adopts a specific pulse coding standard, which is different from the RS232 serial transmission standard. If serial infrared communication is performed between two devices, conversion between RS232 coding and IrDA coding is required. The infrared communication interface consists of an infrared transceiver and an infrared codec.

lrDA即红外数据协会,全称The Infrared DataAssociation,是1993年6月成立的一个国际性组织,专门制订和推进能共同使用的低成本红外数据互连标准,支持点对点的工作模式。IrDA的宗旨是制订以合理的代价实现的标准和协议,以推动红外通信技术的发展。IrDA1.0简称SIR Serial InfraRed,它是基于HP-SIR的异步、半双工红外通讯方式。SIR以系统的异步通讯收发器UART为依托,通过对串行数据脉冲的波形压缩和对所接收光信号电脉冲的波形扩展这一编码解码过程3/16EnDec实现红外数据传输。考虑到主控处理器S3C44B0的UART0与UART1均具有IrDA1.0模式,IrDA1.0可支持最高115.2kbps的通信速率。这样主控的红外接口就比较简洁,选用UART1作为红外通信端口。红外收发器模块选用HSDL-3201,红外收发器包括发送器和接收器两部分。发送器(transmitter)将从I/O或ENDEC接收来的位调制后的脉冲转换为红外脉冲发出;接收器(receiver)检测到红外光脉冲,并将其转换为TTL或CMOS电脉冲。主机的红外通讯系统结构如图9所示。lrDA stands for Infrared Data Association, the full name of The Infrared Data Association, is an international organization established in June 1993, which specializes in formulating and promoting low-cost infrared data interconnection standards that can be used together, and supports point-to-point working mode. The purpose of IrDA is to formulate standards and protocols realized at a reasonable cost to promote the development of infrared communication technology. IrDA1.0 is referred to as SIR Serial InfraRed, which is an asynchronous, half-duplex infrared communication method based on HP-SIR. Relying on the system's asynchronous communication transceiver UART, SIR realizes infrared data transmission through the encoding and decoding process 3/16EnDec of waveform compression of serial data pulses and waveform expansion of electrical pulses of received optical signals. Considering that both UART0 and UART1 of the main control processor S3C44B0 have IrDA1.0 mode, IrDA1.0 can support the highest communication rate of 115.2kbps. In this way, the infrared interface of the main control is relatively simple, and UART1 is selected as the infrared communication port. The infrared transceiver module uses HSDL-3201, and the infrared transceiver includes two parts: a transmitter and a receiver. The transmitter (transmitter) converts the bit-modulated pulse received from I/O or ENDEC into an infrared pulse and sends it out; the receiver (receiver) detects the infrared light pulse and converts it into a TTL or CMOS electrical pulse. The structure of the infrared communication system of the host is shown in Figure 9.

机器蟹的遥控手柄由键盘扫描、红外解码编码、红外收发器三部分构成,作为手持设备着眼于低功耗考虑,选用Msp430F1222作为主处理器,负责键盘扫描、串口数据发送,红外收发器模块选用HSDL-3201,红外解码编码器选用专用的HSDL7001,该芯片适应IrDA1.0物理层规范,接口与SIR收发器相兼容,可与标准的16550UART或MCU的UART连接使用,可发送/接收1.63us或3/16脉冲形式,具有内部或外部时钟模式,波特率可编程。图10是红外遥控器的内部电气连接图。The remote control handle of the robot crab consists of three parts: keyboard scanning, infrared decoding and encoding, and infrared transceiver. As a handheld device, it focuses on low power consumption. Msp430F1222 is selected as the main processor, which is responsible for keyboard scanning and serial data transmission. The infrared transceiver module is selected HSDL-3201, the infrared decoding encoder uses the dedicated HSDL7001, the chip adapts to the IrDA1.0 physical layer specification, the interface is compatible with the SIR transceiver, it can be connected with the standard 16550UART or the UART of the MCU, and can send/receive 1.63us or 3/16 pulse form, with internal or external clock mode, baud rate programmable. Figure 10 is an internal electrical connection diagram of the infrared remote controller.

整个工作流程:如图10,首先主处理器在没有键盘按下时是处于休眠状态的,这时耗电极省,当某一键(矩阵键盘中的一个)按下时,产生中断将主处理器唤醒,MSP430F1222处理器通过并行信号执行键盘扫描、消抖程序后将键值发送给红外解码编码HSDL7001,HSDL7001将其编码后通过红外收发器HSDL-3201发送,发送后主处理器又将进入休眠状态。机器蟹的红外收发器HSDL-3201(图9)接收到该信号后,将编码信号发送给主处理器S3C44B0的红外编码解码器,通过解码将键值得到,通过串行信号传递给机器人主控制器,进而执行该键值的指令。The whole workflow: as shown in Figure 10, firstly the main processor is in a dormant state when no keyboard is pressed. The processor wakes up, and the MSP430F1222 processor executes keyboard scanning and debounce programs through parallel signals, and then sends the key value to the infrared decoding code HSDL7001, which is encoded by the HSDL7001 and sent through the infrared transceiver HSDL-3201. After sending, the main processor will enter dormant state. After receiving the signal, the robot crab's infrared transceiver HSDL-3201 (Figure 9) sends the coded signal to the infrared codec of the main processor S3C44B0, obtains the key value through decoding, and transmits it to the robot's main controller through a serial signal device, and then execute the instruction of the key value.

4.网络通信接口4. Network communication interface

网络通信接口包括:RS485异步串行总线通信、以太网接口和CAN总线接口。RS485通信为上下层控制系统之间提供信息传递,以太网接口为多机器人建立的局域网络传递信息,CAN总线为扩展总线,可以同一些远距离水下通讯Modem、工业GPS等设备连接。The network communication interface includes: RS485 asynchronous serial bus communication, Ethernet interface and CAN bus interface. RS485 communication provides information transmission between the upper and lower control systems, Ethernet interface transmits information for the local area network established by multiple robots, CAN bus is an expansion bus, which can be connected with some long-distance underwater communication Modem, industrial GPS and other equipment.

(1)RS485硬件电路(1) RS485 hardware circuit

在仿生机器蟹双层控制系统中,上下层控制系统之间,选用了RS485异步串行总线的通信方式,主处理器S3C44B0、传感器数据处理器Mega128、八片步行足协调处理器Mega16挂在总线上。In the double-layer control system of the bionic robot crab, the RS485 asynchronous serial bus communication mode is selected between the upper and lower control systems. superior.

RS485标准最初由电子工业协会(EIA)于1983年制订并发布,后由通讯工业协会(TIA)修订后命名为TEA/EIA-485A。RS485是一个电气接口规范,适用于设备间的距离小于1200m,其传输率最大为1MB/s。RS485标准定义了一个基于单对平衡线的多点、双向(半双工)通信链路,是一种极为经济、并具有相当高噪声抑制、传输速率、传输距离和宽共模范围的通信平台。RS485串行总线接口标准以差分平衡方式传输信号,具有很强的抗共模干扰的能力,允许一对双绞线上一个发送器驱动多个负载设备,工业现场控制系统中一般都采用该总线标准进行数据传输。The RS485 standard was originally formulated and released by the Electronics Industries Association (EIA) in 1983, and was later revised by the Communications Industry Association (TIA) and named TEA/EIA-485A. RS485 is an electrical interface specification, suitable for the distance between devices less than 1200m, and its maximum transmission rate is 1MB/s. The RS485 standard defines a multi-point, two-way (half-duplex) communication link based on a single-pair balanced line. It is an extremely economical communication platform with relatively high noise suppression, transmission rate, transmission distance and wide common mode range. . The RS485 serial bus interface standard transmits signals in a differential balanced manner, has a strong ability to resist common mode interference, and allows one transmitter on a pair of twisted pairs to drive multiple load devices. This bus is generally used in industrial field control systems standard for data transmission.

研究中采用的主控系统处理器S3C44B0有两个串行通讯接口,Mega16具有一个串口,可以通过软件选择其为同步串口(SPI)还是异步串口(UART)。只要选择一款支持RS485标准的总线驱动器,通过它将作为上位机与作为下位机的Mega16相连就可以形成我们需要的RS485的总线系统,经过比较我们选择了HVD3082作为RS485通讯总线的驱动芯片。HVD3082是美国TI公司生产的,它完全满足TIA/EIA-485A标准,5V供电,功耗极低,工作电流小于0.3mA,关断电流1nA左右,总线支持256个节点,图11为HVD3082接线图。The main control system processor S3C44B0 used in the study has two serial communication interfaces, and Mega16 has a serial port, which can be selected as a synchronous serial port (SPI) or an asynchronous serial port (UART) by software. As long as you choose a bus driver that supports the RS485 standard, you can form the RS485 bus system we need by connecting it as the upper computer with the Mega16 as the lower computer. After comparison, we choose HVD3082 as the driver chip for the RS485 communication bus. HVD3082 is produced by American TI company, it fully meets the TIA/EIA-485A standard, 5V power supply, extremely low power consumption, operating current is less than 0.3mA, shutdown current is about 1nA, the bus supports 256 nodes, Figure 11 is the wiring diagram of HVD3082 .

通过通讯实验证明RS485串行总线接口电路简单,性能可靠,抗干扰能力强,适用机器蟹的的数据传输系统。在实验中为了方便的控制关节转动,同时便于将信息反馈给实验人员,仍选择通过RS232异步串行口在PC机和S3C44B0之间进行数据交换,因此,单足实验时也在上层的硬件电路上设计了RS232串口电路。The communication experiment proves that the RS485 serial bus interface circuit is simple, the performance is reliable, the anti-interference ability is strong, and it is suitable for the data transmission system of the machine crab. In the experiment, in order to control the rotation of the joints conveniently and to feed back the information to the experimenters, the RS232 asynchronous serial port is still used to exchange data between the PC and the S3C44B0. The RS232 serial port circuit is designed.

(2)RS485通信协议(2) RS485 communication protocol

控制系统中在RS485总线上需要通讯的数据有:24个驱动器状态初始化数据、24个关节位置数据、24个关节速度数据、24个关节加速度数据、24个关节电位计数据,显然数据量是很大的,其在同一条数据线穿梭时,对通信协议的要求很高。从通信速度、可靠性角度出发,选用的串行通信格式为:8位数据位,1位启动位,1位停止位,无校验位,通信速率是115200bps。由于本系统中数据量较大,在一个主节点和多个从节点构成的总线式网络中,采取主从应答方式由主节点发起并控制网上网络与接口一次通信。每个从节点有一个识别地址,只有收到与自己地址匹配的数据帧时,才有相应的处理,并向主节点应答结果。该系统中主要有两个通信过程:向关节电机驱动器节点发送运动参数(位置、速度、加速度);从关节电机驱动器取得关节运动参数(位置、速度、加速度、电位计值)。The data that needs to be communicated on the RS485 bus in the control system include: 24 drive status initialization data, 24 joint position data, 24 joint speed data, 24 joint acceleration data, and 24 joint potentiometer data. Obviously, the amount of data is very large. Large ones, when they shuttle on the same data line, have high requirements on the communication protocol. From the perspective of communication speed and reliability, the selected serial communication format is: 8 data bits, 1 start bit, 1 stop bit, no parity bit, and the communication rate is 115200bps. Due to the large amount of data in this system, in the bus network composed of a master node and multiple slave nodes, the master-slave response mode is adopted, and the master node initiates and controls the network and interface communication on the network. Each slave node has an identification address, and only when it receives a data frame matching its own address, it will have corresponding processing and reply the result to the master node. There are two main communication processes in the system: sending motion parameters (position, speed, acceleration) to the joint motor driver node; obtaining joint motion parameters (position, speed, acceleration, potentiometer value) from the joint motor driver.

为保证通信畅通和从节点的本地事务顺利执行,设计了限时退出的通信方法,既在收到与自己地址不匹配的数据帧时,临时关闭通信口。这样既保证了本地事务的执行时间,又可避免从节点常在网上可能引起的双向干扰,因此在上、下位机的软件设计中采用二次检错、重发和限时退出并重新握手建立连接等通信机制。调试中发现,在某些节点工作异常,甚至通信网络完全瘫痪的情况下其他各节点也能独立完成数据采集、异常报警和实时数据存储等本地事务,一旦故障节点排除,既可恢复通信。In order to ensure unimpeded communication and the smooth execution of local affairs of slave nodes, a communication method of time-limited exit is designed, that is, when a data frame that does not match its own address is received, the communication port is temporarily closed. This not only guarantees the execution time of local transactions, but also avoids the two-way interference that may be caused by the slave nodes often being on the Internet. Therefore, in the software design of the upper and lower computers, secondary error detection, retransmission, time-limited exit and re-shake to establish a connection and other communication mechanisms. During the debugging, it was found that when some nodes work abnormally or even the communication network is completely paralyzed, other nodes can independently complete local affairs such as data collection, abnormal alarm and real-time data storage. Once the faulty node is eliminated, the communication can be restored.

(3)以太网接口硬件部分(3) Ethernet interface hardware part

以太网既是一种计算机接入局域网络的连接标准,又是一种网络互联设备数据共享的通信协议,其采用具有冲突检测的载波监听多点接入CSMA/CD技术。由于以太网传送速率大幅度提高,物理层标准工业化以及以太网集线器技术的形成,千兆以太网技术和无碰撞全双工光纤技术的出现,使得这一先进的网络技术被推进到工业控制网络中,形成了工业以太网技术。与目前的基于现场总线的控制网络相比,基于工业以太网技术的控制网络是一种低成本(许多商用以太网的芯片组与技术可以借用)、高性能的控制网络解决方案。以太网接口对于ARM系统来说是比较关键的接口,主要是因为其通讯速度很快(10Mbps),可通过进行程序快速调试,大容量FLASH存储器编程,相对于JTAG接口调试来说速度可以提高近100倍,4M的程序通过JTAG下载耗时近1小时,而通过网口下载只需仅仅32秒。Ethernet is not only a connection standard for computers to access local area networks, but also a communication protocol for data sharing of network interconnection devices. It uses carrier sense multi-point access CSMA/CD technology with collision detection. Due to the substantial increase in the transmission rate of Ethernet, the industrialization of physical layer standards and the formation of Ethernet hub technology, the emergence of Gigabit Ethernet technology and collision-free full-duplex fiber optic technology, this advanced network technology has been promoted to industrial control networks. In the process, industrial Ethernet technology was formed. Compared with the current fieldbus-based control network, the control network based on industrial Ethernet technology is a low-cost (many commercial Ethernet chipsets and technologies can be borrowed), high-performance control network solutions. The Ethernet interface is a key interface for the ARM system, mainly because its communication speed is very fast (10Mbps), and it can be quickly debugged through the program. Compared with the JTAG interface debugging, the speed can be improved by nearly 100 times, the 4M program takes nearly 1 hour to download through JTAG, but it only takes 32 seconds to download through the network port.

以太网接口采用Realted公司生产的RTL8019AS以太网控制器,支持IEEE802.3及8位或16位数据总线,内置16KB的SRAM用于收发缓冲,全双工,收发同时达到10Mbps,支持10Base5、10Base2、10BaseT,并能自动检测所连接的介质,在ISA总线网卡中占有相当比例。RTL8019AS与主机有3种接口模式,即跳线模式、PnP模式和RT模式。在嵌入式系统中不使用EEPROM,也不使用ISA总线,所以选择跳线模式,JP接高电平,部分设置由引脚决定。The Ethernet interface adopts the RTL8019AS Ethernet controller produced by Realted Company, supports IEEE802.3 and 8-bit or 16-bit data bus, built-in 16KB SRAM is used for sending and receiving buffer, full-duplex, and the sending and receiving can reach 10Mbps at the same time, and supports 10Base5, 10Base2, 10BaseT, and can automatically detect the connected medium, which occupies a considerable proportion of ISA bus network cards. There are 3 interface modes between RTL8019AS and the host, namely jumper mode, PnP mode and RT mode. In the embedded system, neither EEPROM nor ISA bus is used, so the jumper mode is selected, JP is connected to high level, and some settings are determined by pins.

(4)以太网接口软件部分(4) Ethernet interface software part

与以太网接口相关通信程序分为:RTL8019AS初始化、发送控制、接收控制三部分,其接口电路示意图如图12。The communication program related to the Ethernet interface is divided into three parts: RTL8019AS initialization, sending control, and receiving control. The schematic diagram of the interface circuit is shown in Figure 12.

初始化部分完成RTL8019AS在使用之前的初始化工作:设置相关工作模式的寄存器,分配和初始化接收和发送缓冲区,初始化网卡接收地址。The initialization part completes the initialization work of RTL8019AS before use: setting the registers of the relevant working mode, allocating and initializing the receiving and sending buffers, and initializing the receiving address of the network card.

RTL8019AS初始化程序工作步骤如下:The working steps of the RTL8019AS initialization program are as follows:

1)复位RTL8019AS;1) Reset RTL8019AS;

2)选中页0寄存器,RTL8019AS停止运行;2) Select page 0 register, RTL8019AS stops running;

3)设置数据配置寄存器为16位;3) Set the data configuration register to 16 bits;

4)清除远程DMA计数器;4) Clear the remote DMA counter;

5)设置接收缓冲区区间;5) Set the receiving buffer interval;

6)设置接收配置寄存器(仅接收自己的地址的数据包);6) Set the receiving configuration register (only receive data packets of its own address);

7)设置发送配置寄存器(启用CRC自动生成和自动校验);7) Set the sending configuration register (enable CRC automatic generation and automatic verification);

8)中断寄存器清零;8) The interrupt register is cleared;

9)屏蔽RTL8019AS内所有中断;9) Shield all interrupts in RTL8019AS;

10)设置指向最后一个已经读取的页的寄存器(BNRY);10) Set the register (BNRY) pointing to the last page that has been read;

11)选择页1寄存器;11) select page 1 register;

12)初始化物理地址;12) Initialize the physical address;

13)初始化组播地址;13) Initialize the multicast address;

14)设置当前的接收结束页寄存器;14) Set the current receiving end page register;

15)选择页0寄存器,启动RTL8019AS执行命令;15) Select the page 0 register and start RTL8019AS to execute the command;

16)开启主机里RTL8019AS对应中断;16) Enable the RTL8019AS corresponding interrupt in the host;

发送部分只要把数据写入缓冲区,启动执行指令,RTL8019AS自动发送。一般在RAM内开辟两个以太网数据包长空间作为发送缓冲区,发送数据时,两个缓冲区轮流发送,其数据的发送校验、总线数据包的碰撞检测与避免均是由RTL8019AS本身完成的。接收部分完成数据接收任务,RTL8019AS接收到以太网数据包后自动存在接收缓冲区并发出中断信号,S3C44B0X在中断程序里通过DMA方式即可读入接收到数据。The sending part only needs to write the data into the buffer, start to execute the command, and the RTL8019AS will send it automatically. Generally, two Ethernet data packet long spaces are opened up in RAM as sending buffers. When sending data, the two buffers are sent in turn. The data sending verification, bus data packet collision detection and avoidance are all completed by RTL8019AS itself of. The receiving part completes the data receiving task. After RTL8019AS receives the Ethernet data packet, it automatically saves the receiving buffer and sends an interrupt signal. S3C44B0X can read the received data through DMA in the interrupt program.

(5)CAN总线接口(5) CAN bus interface

CAN是一种具有国际标准而且性能价格比又较高的现场总线,作为扩展总线,其可以方便地同一些远距离水下通讯Modem、工业GPS等设备连接。CAN总线接口采用美国微芯(Microchip Technology Inc)带有SPI接口的MCP2510作为CAN总线控制器,控制器与物理总线之间的接口采用Philips公司的TJA1050,其电路如图13所示,TJA1050是PCA82C250和PCA82C251高速CAN收发器的后继产品。主要区别在于:①输出信号CANH和CANL的最佳匹配,使电磁辐射更低;②节点未供电时,性能有所改进;③无待机模式。CAN is a field bus with international standards and high performance and price ratio. As an expansion bus, it can be easily connected with some long-distance underwater communication Modem, industrial GPS and other equipment. The CAN bus interface uses MCP2510 with SPI interface from Microchip Technology Inc. as the CAN bus controller. The interface between the controller and the physical bus uses TJA1050 from Philips. The circuit is shown in Figure 13. TJA1050 is a PCA82C250 and the successor of the PCA82C251 high-speed CAN transceiver. The main differences are: ①The best matching of the output signals CANH and CANL makes the electromagnetic radiation lower; ②When the node is not powered, the performance is improved; ③No standby mode.

二.控制系统的软件模块设计2. Software module design of the control system

机器蟹采用三级分层递阶控制,在机器蟹控制软件的设计中,每一个硬件模块也采用了软件模块化的方法。如图14所示,主控电路板由主控处理器、协处理器以及外围电路构成,主控处理器中固化有推理模块、路径规划模块、通信模块,协处理器中固化有步态库、通信模块、步态协调模块、触障反射模块,而协调级的这些模块与8条步行足的步态协调器、声纳协调器、力觉协调器和位子协调器相连,8条步行足的步态协调器又与各个关节的驱动器相连组成三关节主控系统(电路板),声纳环协调器与声纳传感器协调处理组成了声纳环信号处理板,力觉协调器和力觉传感器组成力信号解偶板,位姿处理器和位姿传感器(陀螺)组成电子陀螺系统。The robot crab adopts three-level hierarchical control. In the design of the robot crab control software, each hardware module also adopts the method of software modularization. As shown in Figure 14, the main control circuit board is composed of a main control processor, a coprocessor, and peripheral circuits. The main control processor is solidified with a reasoning module, a path planning module, and a communication module, and the coprocessor is solidified with a gait library. , communication module, gait coordination module, and obstacle reflex module, and these modules of the coordination level are connected with the gait coordinator, sonar coordinator, force sense coordinator and seat coordinator of the 8 walking feet, and the 8 walking feet The gait coordinator is connected with the drivers of each joint to form a three-joint main control system (circuit board), the sonar ring coordinator and the sonar sensor are coordinated and processed to form the sonar ring signal processing board, the force sense coordinator and the force sense The sensor forms the force signal decoupling board, and the attitude processor and the attitude sensor (gyro) form the electronic gyro system.

控制软件的框图如图15所示。对机器蟹的姿态控制是基于位置的反馈控制。上位机向下位机传送关节转角的理想位置。上位机软件主要包括步态规划模块、指令发送模块、反馈中断模块、显示模块、无线遥控模块组成。The block diagram of the control software is shown in Figure 15. The attitude control of the robot crab is based on position feedback control. The ideal position for the upper computer to transmit the joint rotation angle to the lower computer. The host computer software mainly consists of gait planning module, instruction sending module, feedback interruption module, display module and wireless remote control module.

步态规划模块根据传感器提供的信息判断机器人当前状况,之后根据所选择的坐标系、机器人正运动学和逆运动学,规划出机器人下一个姿态各个关节的角度(定义一个行为库,对关节角度的控制可在行为库中查找);指令发送模块将计算得到的各个关节角度以通信协议规定的指令格式,按照一定的循环周期向下层各伺服控制单元发送;反馈中断模块的作用是,当各关节位置达到理想位置后向上位机传送反馈信号,上位机中利用中断接受这个反馈信息,并启动下一个位置命令的传送;显示模块将机器人的状态用LCD液晶屏进行显示,便于实验观察;无线遥控模块用于机器蟹接收控制人员的决策命令,使其可控。The gait planning module judges the current state of the robot based on the information provided by the sensor, and then plans the angles of each joint of the robot's next posture according to the selected coordinate system, forward kinematics and inverse kinematics of the robot (defining a behavior library, for joint angles The control can be searched in the behavior library); the command sending module sends the calculated joint angles to the servo control units in the lower layer according to a certain cycle in the command format specified in the communication protocol; the function of the feedback interrupt module is, when each After the joint position reaches the ideal position, a feedback signal is sent to the upper computer, and the upper computer uses an interrupt to receive the feedback information and start the transmission of the next position command; the display module displays the status of the robot on the LCD screen, which is convenient for experimental observation; wireless The remote control module is used for the robot crab to receive the decision-making order of the controller to make it controllable.

图15控制流程图工作如下所述:整个控制系统在开关打开开始工作后,第一步进行系统初始化和各关节位置复位,系统在初始化和各关节复位后,等待控制器指令,当我们用无线遥控手柄或是红外遥控器发出执行动作指令后,上层控制器接收指令信号,根据上层主控器传送的指令和数据控制电机进行相应的动作,并根据反馈的结果来确定是否执行完毕,然后等待下一指令,上层主控器传送的指令到数据控制电机需要经过通讯中断判断程序、通讯中断子程序后,将指令分解为8条步行足三个关节的参数,执行单关节位置伺服子程序就会根据各个关节参数进行相应控制,通过一个执行判断指令来控制程序最终是否执行完毕。当在整个系统执行过程中,人为无线遥控让其运动停止、改变运动指令或是任务没有最终完成都会返回指令等待状态。本系统处于上层的主控器通过RS485给下位关节驱动控制器传送的指令应包括该关节的转动方向,转动角度和转动的角速度等信息。而关节驱动控制器通过RS485总线将关节转角和步行足当前状态(摆动还是支撑,是否碰到障碍物)情况等信息实时的反馈给上位机。The control flow chart in Figure 15 works as follows: After the entire control system is turned on and starts working, the first step is to initialize the system and reset the position of each joint. After the initialization and reset of each joint, the system waits for the controller instruction. After the remote control handle or the infrared remote control sends out the execution command, the upper controller receives the command signal, controls the motor to perform corresponding actions according to the command and data transmitted by the upper master controller, and determines whether the execution is completed according to the feedback result, and then waits The next instruction, the instruction sent by the upper master controller to the data control motor needs to go through the communication interruption judgment program and the communication interruption subroutine, then decompose the instruction into 8 parameters of the three joints of the walking foot, and execute the single joint position servo subroutine. Corresponding control will be carried out according to each joint parameter, and whether the program is finally executed is controlled through an execution judgment instruction. During the execution of the entire system, if the human wireless remote control makes its motion stop, changes the motion command or the task is not finally completed, it will return to the command waiting state. The master controller at the upper level of this system sends instructions to the lower joint drive controller through RS485, which should include information such as the rotation direction, rotation angle, and rotation angular velocity of the joint. The joint drive controller feeds back information such as the joint rotation angle and the current state of the walking foot (swing or support, whether it encounters an obstacle) to the host computer in real time through the RS485 bus.

Claims (4)

1.一种两栖机械螃蟹的分级控制装置,其特征是:它包括上层组织级、中层协调级和下层执行级三大部分;上层组织级控制系统主要由以S3C44B0为核心ARM系统组成,外围扩展包括无线数传模块SRWKF-108、红外遥控接口、Can通信接口MCP2510、RS232接口MAX232、液晶显示模块和Intenet以太网接口RTL8019AS;协调级控制系统由一片AVR单片机ATmega128L组成,它包括声纳环传感器信息处理系统、三轴陀螺传感器信息处理系统、变结构力觉传感器信息处理系统、步行足1协调控制器ATmega16L、步行足2协调控制器ATmega16L、步行足3协调控制器ATmega16L、步行足4协调控制器ATmega16L、步行足5协调控制器ATmega16L、步行足6协调控制器ATmega16L、步行足7协调控制器ATmega16L、步行足8协调控制器ATmega16L;执行级控制系统为模块化结构,由8个步行足驱动模块和一个多传感器信号采集模块构成,每一个步行足驱动模块包括三个驱动器:跟关节驱动器、股关节驱动器和胫关节驱动器;多传感器信号采集模块包括:声纳控制器Msp430F149、力传感器数据处理XC2S100和压力传感器数据采集Msp430F149;每个步行足系统自成一个模块,具体控制各步行足上各关节的运动,它由1片AVR单片机ATmega16L、3片TI的MSP430F1222单片机组成,ATmega16L主要负责电机伺服驱动器的通信和关节电位计的信号采集,MSP430F1222构成了每个步行足各关节电机的伺服驱动器,主要负责执行协调级发送过来的电机控制指令,对各关节电机进行伺服驱动。传感器模块主要由一片AVR单片机ATmega128L组成,负责对每条步行足上力信号的采集处理、超声波传感器阵列的信号采集以及新增外设的扩展。控制信号输入上层组织级控制部分,协调级控制部分连接于上层组织级控制部分与执行级控制部分之间,执行级控制部分与关节驱动单元之间以485总线通信协议进行通信。1. A hierarchical control device for amphibious mechanical crabs, characterized in that: it includes three parts: an upper-level organization level, a middle-level coordination level and a lower-level execution level; the upper-level organization-level control system is mainly composed of S3C44B0 as the core ARM system, and the peripheral expansion Including wireless data transmission module SRWKF-108, infrared remote control interface, Can communication interface MCP2510, RS232 interface MAX232, liquid crystal display module and Intenet Ethernet interface RTL8019AS; the coordination level control system is composed of an AVR microcontroller ATmega128L, which includes sonar ring sensor information Processing system, three-axis gyro sensor information processing system, variable structure force sensor information processing system, walking foot 1 coordination controller ATmega16L, walking foot 2 coordination controller ATmega16L, walking foot 3 coordination controller ATmega16L, walking foot 4 coordination controller ATmega16L, walking foot 5 coordination controller ATmega16L, walking foot 6 coordination controller ATmega16L, walking foot 7 coordination controller ATmega16L, walking foot 8 coordination controller ATmega16L; the executive level control system is a modular structure, consisting of 8 walking foot drive modules It is composed of a multi-sensor signal acquisition module, and each walking foot drive module includes three drivers: heel joint driver, hip joint driver and tibial joint driver; the multi-sensor signal acquisition module includes: sonar controller Msp430F149, force sensor data processing XC2S100 and pressure sensor data acquisition Msp430F149; each walking foot system forms a module, which specifically controls the movement of each joint on each walking foot. It consists of 1 piece of AVR single-chip ATmega16L and 3 pieces of TI MSP430F1222 single-chip. ATmega16L is mainly responsible for the motor servo drive Communication and joint potentiometer signal acquisition, MSP430F1222 constitutes the servo driver of each joint motor of each walking foot, which is mainly responsible for executing the motor control instructions sent by the coordination level, and servo-driving the joint motors. The sensor module is mainly composed of an AVR microcontroller ATmega128L, which is responsible for the acquisition and processing of the upper force signal of each walking foot, the signal acquisition of the ultrasonic sensor array, and the expansion of new peripherals. The control signal is input to the upper-level organization-level control part, and the coordination-level control part is connected between the upper-level organization-level control part and the executive-level control part, and the executive-level control part communicates with the joint drive unit through the 485 bus communication protocol. 2.根据权利要求1所述的两栖机械螃蟹的分级控制装置,其特征是:所述的分级控制装置的步行足驱动模块的核心芯片由3片微处理器MSP430f1222和一片ATmega16L构成,一片Msp430F1222、功率放大电路、光电编码器反馈电路组成运动控制器,Msp430F1222与增量光电编码器、电位计、PWM功率放大器都相连,并与蟹足关节协调器通过并行接口相连;Msp430F1222、PWM功率放大器、电机M和电位计组成了绝对位置闭环检测系统,而Msp430F1222、PWM功率放大器、电机M和光电编码器通过光电编码器接口形成增量位置、速度反馈闭环系统,整个控制器模块通过并行通信接口与组织级的步行足协调控制器相连。2. the hierarchical control device of the amphibious mechanical crab according to claim 1 is characterized in that: the core chip of the walking foot drive module of the described hierarchical control device is made of 3 microprocessors MSP430f1222 and a slice of ATmega16L, a slice of Msp430F1222, The power amplifier circuit and the photoelectric encoder feedback circuit form the motion controller. Msp430F1222 is connected to the incremental photoelectric encoder, potentiometer, and PWM power amplifier, and is connected to the crab foot joint coordinator through a parallel interface; Msp430F1222, PWM power amplifier, and motor M and potentiometer constitute an absolute position closed-loop detection system, and Msp430F1222, PWM power amplifier, motor M and photoelectric encoder form an incremental position and speed feedback closed-loop system through the photoelectric encoder interface, and the entire controller module communicates with the organization through a parallel communication interface Level walking foot coordination controller is connected. 3.一种两栖机械螃蟹的分级控制方法,其特征是:3. A hierarchical control method for amphibious mechanical crabs, characterized in that: 步态规划模块根据传感器提供的信息判断机器人当前状况,之后根据所选择的坐标系、机器人正运动学和逆运动学,规划出机器人下一个姿态各个关节的角度;指令发送模块将计算得到的各个关节角度以通信协议规定的指令格式,按照一定的循环周期向下层各伺服控制单元发送;反馈中断模块的作用是,当各关节位置达到理想位置后向上位机传送反馈信号,上位机中利用中断接受这个反馈信息,并启动下一个位置命令的传送;显示模块将机器人的状态用LCD液晶屏进行显示;无线遥控模块用于机器蟹接收控制人员的决策命令,使其可控。The gait planning module judges the current state of the robot based on the information provided by the sensor, and then plans the angles of each joint of the robot's next posture according to the selected coordinate system, forward kinematics and inverse kinematics of the robot; The joint angle is sent to each servo control unit in the lower layer according to the command format specified in the communication protocol according to a certain cycle; the function of the feedback interrupt module is to send a feedback signal to the upper computer when the position of each joint reaches the ideal position, and the upper computer uses the interrupt Accept this feedback information and start the transmission of the next position command; the display module displays the status of the robot on the LCD screen; the wireless remote control module is used for the robot crab to receive the decision-making command of the controller to make it controllable. 4.根据权利要求3所述的两栖机械螃蟹的分级控制方法,其特征是:整个控制系统在开关打开开始工作后,第一步进行系统初始化和各关节位置复位,系统在初始化和各关节复位后,等待控制器指令,当我们用无线遥控手柄或是红外遥控器发出执行动作指令后,上层控制器接收指令信号,根据上层主控器传送的指令和数据控制电机进行相应的动作,并根据反馈的结果来确定是否执行完毕,然后等待下一指令,上层主控器传送的指令到数据控制电机需要经过通讯中断判断程序、通讯中断子程序后,将指令分解为8条步行足三个关节的参数,执行单关节位置伺服子程序就会根据各个关节参数进行相应控制,通过一个执行判断指令来控制程序最终是否执行完毕;当在整个系统执行过程中,人为无线遥控让其运动停止、改变运动指令或是任务没有最终完成都会返回指令等待状态;处于上层的主控器通过RS485给下位关节驱动控制器传送的指令应包括该关节的转动方向,转动角度和转动的角速度等信息;而关节驱动控制器通过RS485总线将关节转角和步行足当前状态等信息实时的反馈给上位机。4. The hierarchical control method of amphibious mechanical crabs according to claim 3, characterized in that: after the entire control system is turned on and starts to work, the first step is to perform system initialization and reset of each joint position, and the system is initialized and each joint is reset. Finally, wait for the controller command. When we use the wireless remote control handle or the infrared remote control to issue an action command, the upper controller receives the command signal, controls the motor to perform corresponding actions according to the command and data transmitted by the upper master controller, and Feedback the results to determine whether the execution is complete, and then wait for the next command. The command sent by the upper master controller to the data control motor needs to go through the communication interruption judgment program and the communication interruption subroutine, and then decompose the instruction into 8 walking feet and three joints. parameters, the execution of the single joint position servo subroutine will carry out corresponding control according to the parameters of each joint, and control whether the program is finally executed through an execution judgment instruction; when the entire system is executing, the artificial wireless remote control stops its movement and changes If the motion command or the task is not finally completed, it will return to the command waiting state; the command sent by the upper master controller to the lower joint drive controller through RS485 should include the rotation direction, rotation angle and rotation angular velocity of the joint; and the joint The drive controller feeds back information such as the joint rotation angle and the current state of the walking foot to the host computer in real time through the RS485 bus.
CNA2008100638197A 2008-01-08 2008-01-08 Hierarchical control device and control method for amphibious mechanical crabs Pending CN101216711A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2008100638197A CN101216711A (en) 2008-01-08 2008-01-08 Hierarchical control device and control method for amphibious mechanical crabs

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2008100638197A CN101216711A (en) 2008-01-08 2008-01-08 Hierarchical control device and control method for amphibious mechanical crabs

Publications (1)

Publication Number Publication Date
CN101216711A true CN101216711A (en) 2008-07-09

Family

ID=39623155

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2008100638197A Pending CN101216711A (en) 2008-01-08 2008-01-08 Hierarchical control device and control method for amphibious mechanical crabs

Country Status (1)

Country Link
CN (1) CN101216711A (en)

Cited By (32)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101941479A (en) * 2010-07-20 2011-01-12 哈尔滨理工大学 Spider robot
CN102012704A (en) * 2010-09-21 2011-04-13 上海大学 Inner system for controlling gestures of underwater robot
CN102126222A (en) * 2011-04-27 2011-07-20 东南大学 Control system for remote-controlled robot
CN102179815A (en) * 2011-04-14 2011-09-14 上海交通大学 CANopen (Controller Area Network open)-based distributed type modularized mechanical arm system
CN102692897A (en) * 2012-05-07 2012-09-26 西安中创物联科技有限公司 Internet of Things based industrial equipment monitoring system and method thereof
CN103227597A (en) * 2013-05-06 2013-07-31 广州欧丰机电有限公司 Three-phase servo motor based on CAN bus and ARM
CN103517789A (en) * 2011-05-12 2014-01-15 株式会社Ihi Device and method for controlling prediction of motion
CN103645678A (en) * 2013-03-13 2014-03-19 沈阳峰点科技有限公司 Real-time response type network control system
CN103713154A (en) * 2014-01-07 2014-04-09 东华大学 Method for judging motor rotating direction by using trigger and coder
CN103823471A (en) * 2014-03-13 2014-05-28 北京理工大学 Vector-propelled small four-axis underwater robot control system
CN103983976A (en) * 2014-06-04 2014-08-13 青岛深海科技投资开发有限公司 Novel intelligent underwater robot detection sensor and control method thereof
CN103998186A (en) * 2011-12-15 2014-08-20 韩国海洋科学技术院 Multi-joint submarine robot and submarine detection system with compound movement functions of walking and swimming
CN104375506A (en) * 2014-11-29 2015-02-25 江西洪都航空工业集团有限责任公司 Robot-orientated embedded type intelligent mobile controller
CN104571063A (en) * 2015-01-27 2015-04-29 史玉强 Programmable process controller
CN105437227A (en) * 2015-12-28 2016-03-30 苏州大学 SCARA (Selective Compliance Assembly Robot Arm) and control system thereof
CN105500371A (en) * 2016-01-06 2016-04-20 山东优宝特智能机器人有限公司 Service robot controller and control method thereof
CN105676866A (en) * 2016-04-20 2016-06-15 北京博瑞爱飞科技发展有限公司 Unmanned aerial vehicle flight control method and device
CN105935497A (en) * 2015-03-06 2016-09-14 恩智浦有限公司 Toy, method for controlling a toy, and computer program product
CN106525318A (en) * 2016-12-16 2017-03-22 山东金洲科瑞节能科技有限公司 Bus-type pressure measuring device
CN108345253A (en) * 2018-05-18 2018-07-31 北京钢铁侠科技有限公司 Brain communication system controller, control method and robot for robot
CN108508906A (en) * 2018-05-23 2018-09-07 哈尔滨理工大学 A kind of bilateral tactile remote control system of novel multi-foot robot and control method under outdoor environment
WO2018214167A1 (en) * 2017-05-26 2018-11-29 深圳配天智能技术研究院有限公司 Servo system, motor, absolute encoder, and signal processing circuit for same
CN109276320A (en) * 2018-11-14 2019-01-29 徐春霞 A kind of multi-functional Internal Medicine-Cardiovascular Dept. nursing monitoring arrangement
CN109428320A (en) * 2017-09-04 2019-03-05 中国科学院微电子研究所 Motor control protection system
CN109648599A (en) * 2018-12-25 2019-04-19 它酷科技(大连)有限公司 A kind of exercising elbow joint control method of emulated robot
CN111329696A (en) * 2020-03-13 2020-06-26 浙江佑仁智能机器人有限公司 Control system for transferring nursing robot
CN111438691A (en) * 2020-04-15 2020-07-24 哈尔滨工程大学 Bionic Hexapod Robotic Crab Control System
CN112589799A (en) * 2020-12-10 2021-04-02 西北工业大学 Miniature desktop robot facing to cluster
CN114842089A (en) * 2022-03-29 2022-08-02 国营芜湖机械厂 Automatic modulation method for telex computer potentiometer
CN115167223A (en) * 2022-07-25 2022-10-11 李圆月 Intelligent control system of underwater multi-legged robot
CN116922379A (en) * 2023-07-10 2023-10-24 深圳进化动力数码科技有限公司 Vision-based mechanical arm obstacle avoidance method, system, electronic equipment and storage medium
WO2024032578A1 (en) * 2022-08-09 2024-02-15 深圳忆海原识科技有限公司 Control module, control apparatus and robot

Cited By (45)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101941479A (en) * 2010-07-20 2011-01-12 哈尔滨理工大学 Spider robot
CN102012704B (en) * 2010-09-21 2012-05-02 上海大学 Attitude Internal Control System of Underwater Robot
CN102012704A (en) * 2010-09-21 2011-04-13 上海大学 Inner system for controlling gestures of underwater robot
CN102179815B (en) * 2011-04-14 2013-05-22 上海交通大学 Distributed Modular Manipulator System Based on CANopen
CN102179815A (en) * 2011-04-14 2011-09-14 上海交通大学 CANopen (Controller Area Network open)-based distributed type modularized mechanical arm system
CN102126222A (en) * 2011-04-27 2011-07-20 东南大学 Control system for remote-controlled robot
CN103517789B (en) * 2011-05-12 2015-11-25 株式会社Ihi motion prediction control device and method
CN103517789A (en) * 2011-05-12 2014-01-15 株式会社Ihi Device and method for controlling prediction of motion
US9498883B2 (en) 2011-12-15 2016-11-22 Korea Institute Of Ocean Science & Technology Multi-joint underwater robot having complex movement functions of walking and swimming and underwater exploration system using same
CN103998186A (en) * 2011-12-15 2014-08-20 韩国海洋科学技术院 Multi-joint submarine robot and submarine detection system with compound movement functions of walking and swimming
CN102692897A (en) * 2012-05-07 2012-09-26 西安中创物联科技有限公司 Internet of Things based industrial equipment monitoring system and method thereof
CN103645678A (en) * 2013-03-13 2014-03-19 沈阳峰点科技有限公司 Real-time response type network control system
CN103645678B (en) * 2013-03-13 2016-08-10 沈阳峰点科技有限公司 A Real-time Response Network Control System
CN103227597A (en) * 2013-05-06 2013-07-31 广州欧丰机电有限公司 Three-phase servo motor based on CAN bus and ARM
CN103713154A (en) * 2014-01-07 2014-04-09 东华大学 Method for judging motor rotating direction by using trigger and coder
CN103823471A (en) * 2014-03-13 2014-05-28 北京理工大学 Vector-propelled small four-axis underwater robot control system
CN103983976A (en) * 2014-06-04 2014-08-13 青岛深海科技投资开发有限公司 Novel intelligent underwater robot detection sensor and control method thereof
CN104375506A (en) * 2014-11-29 2015-02-25 江西洪都航空工业集团有限责任公司 Robot-orientated embedded type intelligent mobile controller
CN104571063A (en) * 2015-01-27 2015-04-29 史玉强 Programmable process controller
US11050461B2 (en) 2015-03-06 2021-06-29 Nxp B.V. Toy, method for controlling a toy, and computer program product
CN105935497A (en) * 2015-03-06 2016-09-14 恩智浦有限公司 Toy, method for controlling a toy, and computer program product
CN105437227A (en) * 2015-12-28 2016-03-30 苏州大学 SCARA (Selective Compliance Assembly Robot Arm) and control system thereof
CN105437227B (en) * 2015-12-28 2017-10-24 苏州大学 Selective compliance assembly robot arm and its control system
CN105500371A (en) * 2016-01-06 2016-04-20 山东优宝特智能机器人有限公司 Service robot controller and control method thereof
CN105676866A (en) * 2016-04-20 2016-06-15 北京博瑞爱飞科技发展有限公司 Unmanned aerial vehicle flight control method and device
CN106525318B (en) * 2016-12-16 2022-07-01 山东金洲科瑞节能科技有限公司 Bus type pressure measuring device
CN106525318A (en) * 2016-12-16 2017-03-22 山东金洲科瑞节能科技有限公司 Bus-type pressure measuring device
WO2018214167A1 (en) * 2017-05-26 2018-11-29 深圳配天智能技术研究院有限公司 Servo system, motor, absolute encoder, and signal processing circuit for same
CN109428320A (en) * 2017-09-04 2019-03-05 中国科学院微电子研究所 Motor control protection system
CN108345253A (en) * 2018-05-18 2018-07-31 北京钢铁侠科技有限公司 Brain communication system controller, control method and robot for robot
CN108508906B (en) * 2018-05-23 2020-11-27 哈尔滨理工大学 Bilateral tactile teleoperating system and control method of multi-legged robot in outdoor environment
CN108508906A (en) * 2018-05-23 2018-09-07 哈尔滨理工大学 A kind of bilateral tactile remote control system of novel multi-foot robot and control method under outdoor environment
CN109276320A (en) * 2018-11-14 2019-01-29 徐春霞 A kind of multi-functional Internal Medicine-Cardiovascular Dept. nursing monitoring arrangement
CN109648599A (en) * 2018-12-25 2019-04-19 它酷科技(大连)有限公司 A kind of exercising elbow joint control method of emulated robot
CN111329696A (en) * 2020-03-13 2020-06-26 浙江佑仁智能机器人有限公司 Control system for transferring nursing robot
CN111329696B (en) * 2020-03-13 2022-05-31 浙江佑仁智能机器人有限公司 Control system for transferring nursing robot
CN111438691A (en) * 2020-04-15 2020-07-24 哈尔滨工程大学 Bionic Hexapod Robotic Crab Control System
CN112589799A (en) * 2020-12-10 2021-04-02 西北工业大学 Miniature desktop robot facing to cluster
CN112589799B (en) * 2020-12-10 2022-07-26 西北工业大学 A cluster-oriented miniature desktop robot
CN114842089A (en) * 2022-03-29 2022-08-02 国营芜湖机械厂 Automatic modulation method for telex computer potentiometer
CN114842089B (en) * 2022-03-29 2024-03-15 国营芜湖机械厂 Automatic modulation method for fly-by-wire computer potentiometer
CN115167223A (en) * 2022-07-25 2022-10-11 李圆月 Intelligent control system of underwater multi-legged robot
WO2024032578A1 (en) * 2022-08-09 2024-02-15 深圳忆海原识科技有限公司 Control module, control apparatus and robot
CN116922379A (en) * 2023-07-10 2023-10-24 深圳进化动力数码科技有限公司 Vision-based mechanical arm obstacle avoidance method, system, electronic equipment and storage medium
CN116922379B (en) * 2023-07-10 2024-05-31 深圳进化动力数码科技有限公司 Vision-based mechanical arm obstacle avoidance method, system, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN101216711A (en) Hierarchical control device and control method for amphibious mechanical crabs
CN101327589B (en) Control system and method for instruction input and configuration of remote-operation planar redundant manipulator
CN101612733B (en) Distributed multi-sensor mobile robot system
CN102591250B (en) Dual-CPU (central processing unit) combined type motion controller
CN103753534B (en) A kind of Movement Controller of Mobile Robot and control method thereof
CN102637036A (en) Combined type bionic quadruped robot controller
CN103192390B (en) Control system of humanoid robot
CN101592947B (en) Zigbee accessed electric wheelchair controller and control method
CN101916098B (en) Multi-axis motion control card with absolute coded disk reading function
CN102034369B (en) Wireless sensor network experiment platform based on mobile sensor nodes
CN108481348A (en) Hexapod Robot control system based on Arduino platforms
CN103472832A (en) Full-digital servo controller of two-wheel micro-mouse based on dual processors
CN102248536B (en) Mobile mechanical arm control system used for extendable modularization
CN105680735B (en) Four axis servomotor motion control cards and method based on arm processor
CN101592951A (en) Common distributed control system for humanoid robot
CN205507539U (en) Domestic transport robot control system of intelligence
CN111497964B (en) A distributed control system for an electric-driven quadruped robot
CN102830658A (en) Embedded numerical control system for multi-shaft numerical control machine tool
CN209289290U (en) Light-duty mechanical arm control system based on CANopen
CN108858209A (en) A kind of industrial robot controller
CN106020178A (en) Autonomous spherical amphibious multi-robot communication system and working method thereof
CN204883256U (en) High real -time control system of robot framework
CN208126196U (en) Multifunctional inspecting robot based on distributed AC servo system
CN103472834B (en) Ultra-fast sprint controller of two-wheel micro-mouse based on dual processors
CN101625554A (en) Wireless communication control system of coorbital and synchronized simulated motion platform of spacecraft

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication