CN106444771B - ZigBee-based simulated multi-agent coordination control method - Google Patents

ZigBee-based simulated multi-agent coordination control method Download PDF

Info

Publication number
CN106444771B
CN106444771B CN201610935608.2A CN201610935608A CN106444771B CN 106444771 B CN106444771 B CN 106444771B CN 201610935608 A CN201610935608 A CN 201610935608A CN 106444771 B CN106444771 B CN 106444771B
Authority
CN
China
Prior art keywords
pin
trolley
circuit
pins
grounded
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.)
Active
Application number
CN201610935608.2A
Other languages
Chinese (zh)
Other versions
CN106444771A (en
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.)
Jilin University
Original Assignee
Jilin 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 Jilin University filed Critical Jilin University
Priority to CN201610935608.2A priority Critical patent/CN106444771B/en
Publication of CN106444771A publication Critical patent/CN106444771A/en
Application granted granted Critical
Publication of CN106444771B publication Critical patent/CN106444771B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course or altitude of land, water, air, or space vehicles, e.g. automatic pilot
    • G05D1/02Control of position or course in two dimensions
    • G05D1/021Control of position or course in two dimensions specially adapted to land vehicles
    • G05D1/0255Control of position or course in two dimensions specially adapted to land vehicles using acoustic signals, e.g. ultra-sonic singals
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course or altitude of land, water, air, or space vehicles, e.g. automatic pilot
    • G05D1/02Control of position or course in two dimensions
    • G05D1/021Control of position or course in two dimensions specially adapted to land vehicles
    • G05D1/0276Control of position or course in two dimensions specially adapted to land vehicles using signals provided by a source external to the vehicle
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course or altitude of land, water, air, or space vehicles, e.g. automatic pilot
    • G05D1/02Control of position or course in two dimensions
    • G05D1/021Control of position or course in two dimensions specially adapted to land vehicles
    • G05D1/0287Control of position or course in two dimensions specially adapted to land vehicles involving a plurality of land vehicles, e.g. fleet or convoy travelling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/023Services making use of location information using mutual or relative location information between multiple location based services [LBS] targets or of distance thresholds

Abstract

A ZigBee-based simulation multi-agent coordination control method belongs to the field of intelligent control. The invention aims to realize the ZigBee-based simulation multi-agent coordination control method for realizing coordination control to enable the multi-agents to achieve the mutual coordination help function. The method comprises the following steps: the method comprises the steps of multi-agent pre-grouping and cooperation principle, initial task determination, initial task allocation, building of a communication network of a trolley and an upper computer, determination of a trolley position, instruction monitoring and execution, and judgment and avoidance of the trolley on obstacles. The invention can perform man-machine interaction and better meet the demands of people. The positioning, autonomous navigation, obstacle avoidance control and the like of the self position are realized. The use amount of the module can be reduced, and the module is economical and applicable to wide application in life.

Description

ZigBee-based simulated multi-agent coordination control method
Technical Field
The invention belongs to the field of intelligent control.
Background
Various artificial mechanical electronic devices with motion, computing, sensing and communication capabilities are used for intelligent bodies such as mobile sensors, autonomous mobile robots, unmanned vehicles and the like. These isomorphic or heterogeneous agents are grouped into Multi-Agent Systems (MAS). The multi-agent technology has autonomy, distributivity, coordination, and has organizing ability, learning ability and reasoning ability. MAS focuses on mutual coordination among intelligent agents, and a complex task is completed jointly through certain algorithm control so as to achieve an optimal result. At present, the multi-agent cooperative control method with high efficiency, low power consumption, low complexity and strong practicability is deficient.
The ZigBee protocol is based on the 802.15.4 standard, and is an IEEE physical layer and medium access control layer specification for low-speed wireless personal area networks. ZigBee wireless networks may take many types of configurations. The star network configuration consists of one coordinator node and one or more terminal devices. The method has the advantages of low power consumption, low cost, easiness in networking, low complexity, low data rate and the like.
Disclosure of Invention
The invention aims to realize the ZigBee-based simulation multi-agent coordination control method for realizing coordination control to enable the multi-agents to achieve the mutual coordination help function.
The method comprises the following steps:
step one, a multi-agent pre-grouping and cooperation principle: is 2 N The intelligent agents cooperate together, wherein N is an integer, the grouping adopts a method of dividing total number by two step-by-step grouping, and completers in the same genus level are preferentially assisted by incompleters until all tasks are completed;
step two, determining an initial task: the whole simulation system adopts a ZigBee positioning module to position, a ZigBee reference node sensor module is fixed at four vertexes of a target rectangular area, one reference node is used as a coordinate origin, and the connecting lines of the other two reference nodes which form rectangular sides together with the reference nodes are used as an X axis and a Y axis;
Step three, distributing initial tasks: the allocation principle adopts the scheme that the allocated initial tasks are the same and the searching speeds of the trolleys are different, namely, in practice, the initial tasks are allocated to each intelligent agent to be responsible for searching the rectangle with the area of a;
fourth, building a communication network of the trolley and the upper computer: the positioning nodes on the trolley are communicated with the positioning nodes of the ad-hoc network of the upper computer through a gateway, and the gateway is connected with the upper computer;
step five, determining the trolley position: the ZigBee positioning suite comprises reference nodes, positioning nodes and gateways, wherein the reference nodes are fixed on the boundary of an area and serve as reference points, the positioning nodes are loaded on the trolley, the distances between the positioning nodes and the reference nodes are measured, and then the position coordinates of the trolley are calculated through a trilateration method;
step six, instruction monitoring and execution: the method comprises the steps that coordinate information is sent to a gateway connected with an upper computer to monitor a trolley by the upper computer, control instructions between the upper computer and the trolley are also transmitted in a position coordinate form, and a singlechip on the trolley outputs square wave driving motors with different duty ratios to realize different movement behaviors of the trolley after receiving the coordinate information received by a positioning node;
Step seven, judging and avoiding the obstacle by the trolley: the trolley adopts the ultrasonic sensor to detect the obstacle, the obstacle avoidance function of the trolley is used for realizing the obstacle avoidance, and the coordinate information at the moment is sent to the upper computer to mark the position of the obstacle while the obstacle turning obstacle avoidance is identified.
Inventive n=2 N The intelligent agents cooperatively search a certain area, wherein N is the number of the trolleys and N is the number of stages, so that a search area is required to be defined firstly, namely, the boundary of N trolley searches in the whole task is determined, a rectangular search area with P being equal to Q is selected as an initial search task, and ZigBee reference node sensor modules are named as modules E, F, G and H and are fixed at four vertexes of a target rectangular area to realize coordinate establishment of the target area, one reference node is taken as a coordinate origin, and the connection line of the other two reference nodes and the reference node which jointly form the rectangular side is taken as an X axis and a Y axis;
the whole system adopts a ZigBee positioning module for positioning, a ZigBee positioning suite is composed of reference nodes, positioning nodes and gateways, the reference nodes are fixed on the boundary of an area and serve as reference points, the positioning nodes are loaded on a trolley, the distance between the positioning nodes and each reference node is measured, the position coordinates of the trolley are calculated through an algorithm, the specific algorithm is a trilateration method, the transmission loss of signals is calculated through RSSI values among the ZigBee nodes, namely the signal strength among the nodes, the transmission loss is converted into the distance between the mobile nodes and the reference nodes, the position coordinates of the trolley are calculated through the algorithm when the specific distance between each trolley and the reference node E, F, G is known, the node H serves as a verification node, the distance between the position coordinates of the trolley and the node H can be calculated according to the coordinate values if the accuracy requirement is met after the coordinate values of the trolley are calculated, and the difference is smaller than a preset threshold;
The gateway is used for communicating the positioning nodes on the trolley with each positioning node of the point-to-point network of the upper computer, the gateway is connected with the upper computer, the upper computer knows the position of the trolley and the condition of completing tasks through the gateway, the upper computer sends instructions to the singlechip, the singlechip outputs different duty ratios so as to realize the control of the trolley,
the method comprises the steps that coordinate information is sent to a gateway connected with an upper computer to monitor a trolley by the upper computer, control instructions between the upper computer and the trolley are also transmitted in a position coordinate mode, and after receiving instructions of the upper computer on the coordinate information, a singlechip on the trolley drives left and right wheel motors of the trolley according to current position coordinates and task area coordinates to realize different movement behaviors of the trolley;
in order to simulate a complex environment in reality, a plurality of obstacles are set in the environment, but the positions of the obstacles are unknown, the trolley is required to find the obstacles in the searching process, avoid the obstacles without collision and mark the coordinate information of the obstacles, the trolley adopts an ultrasonic sensor to detect the obstacles, the obstacle avoidance function of the trolley is used for realizing the obstacle avoidance, and the coordinate information at the moment is sent to an upper computer to mark the positions of the obstacles while recognizing the obstacle turning avoidance.
The invention discloses a multi-agent pre-grouping method: the grouping adopts the idea of dividing the total number into two groups step by step, firstly dividing n intelligent agents into a first stage by 2, and dividing the n intelligent agents into A 1 、A 2 Two groups are A 1 ,A 2 For the second stage, n/2 of each group, A is added again 1 ,A 2 Dividing A by two respectively 1 Divided into B 1 ,B 2 Two groups, will A 2 Divided into B 3 ,B 4 Two groups, B 1 ,B 2 ,B 3 ,B 4 For the third stage, n/4 of each group, B is further added 1 ,B 2 ,B 3 ,B 4 Divided by 2, then B 1 Is divided into C 1 ,C 2 Two groups, B 2 Is divided into C 3 ,C 4 Two groups, B 3 Is divided into C 5 ,C 6 Two groups, B4 is divided into C 7 ,C 8 Two groups, C 1 ,C 2 ,C 3 ,C 4 ,C 5 ,C 6 ,C 7 ,C 8 For the fourth level, N/8 of each group, and so on, the minimum group is divided into two groups, and the completion of grouping is indicated when each group is the minimum group, namely the N level, namely 2 N The multiple agents are grouped in N-1 total divided by two steps, and are divided into N grades.
The invention discloses a plurality of autonomous obstacle avoidance and positioning systems, which comprise a main control chip, a power supply circuit, a display circuit, a resistor-array circuit, a motor drive circuit, an ultrasonic wave transmitting and receiving module circuit, an ultrasonic wave transmitting module, an ultrasonic wave receiving module, an optical code disc speed measuring module circuit, a ZigBee reference node module circuit, a ZigBee positioning node module circuit, an RF module socket circuit on a gateway, a USB-to-serial interface circuit and a USB interface circuit;
And (3) a main control chip: with the use of the STC89C51 chip,
a power supply circuit: two pins of the output end of the coupling inductor T are connected to a diode rectifying four-arm bridge, namely connected between diodes D1 and D3 and between diodes D2 and D4 respectively; the output end of the rectifying tube four-arm bridge is connected with a capacitor C1 in parallel, one end of the rectifying tube four-arm bridge is connected with the input end Vin of the LM7805 voltage stabilizing chip, and the other end of the rectifying tube four-arm bridge is grounded; the grounding end GND of the LM7805 voltage-stabilizing chip is grounded through a capacitor C2, one end of the output end of the voltage-stabilizing power supply is grounded, the other end of the output end of the voltage-stabilizing power supply is respectively connected with the 21 pin of the STC89C51, the 2 pin of the LCD1602, the 1 pin of the RESPACK-8, the 9 pin of the L298N, an ultrasonic ranging module, an ultrasonic level conversion circuit, an ultrasonic conditioning module circuit, an optical code disc speed measuring module circuit, an RF module socket circuit on a gateway, a USB-to-serial interface circuit and the VCC pin of the RS232 module;
the display circuit: the pins 4-6 of the LCD1602 are connected with the pins 40-38 of the STC89C51, the pins 7-14 of the LCD1602 are connected with the pins 28-21 of the STC89C51, and the pins 2-9 of the RP1 are connected with the pins 28-21 of the STC89C 51;
and the resistance discharging circuit comprises: the 2 pins to 9 pins of the resistor are respectively connected with the 28 pins to 21 pins of the STC89C51 singlechip;
a motor driving circuit: 1-6 pins of STC89C51 are respectively connected with 5 pins, 7 pins, 10 pins, 12 pins, 6 pins and 11 pins of L298N, 9 pins VSS of a constant voltage and constant current driving chip L298N is connected with the output VCC of a power supply circuit, and is grounded through a capacitor C4 and is grounded through an electrolytic capacitor C3, 4 pins VS is connected with a 12V constant voltage source, 8 pins GND is grounded, 1 pins ISEN A and 15 pins ISEN B are grounded through the same wire, meanwhile, 4 groups of 8 diode current stabilizing bodies from D5 to D12 are interposed between the +12V constant voltage source and the ground, the cathodes of D5-D8 are connected with the +12V constant voltage source together, and are grounded through a capacitor C5, the anodes of D9-D12 are connected with each other and are grounded through an electrolytic capacitor C6, and the output of the constant voltage and constant current driving chip L298HN drives two servo MOTORs, namely, pins 2OUTI and 3OUT2 are connected with the anode and cathode of a servo MOTOR MOTOR 1; pin 13OUT3 pin 14OUT4 is connected to the positive and negative poles of servo MOTOR 2;
Ultrasonic wave transmission and receiving module circuit: the output VCC of the power supply circuit is connected with the Vcc of the 4 feet, the ground is connected with the 1 feet, the P50 of the STC11 single-chip microcomputer is connected with the P67 of the STC11 single-chip microcomputer through the R1 and R2 parallel resistors, the P63 is grounded, the capacitor C9 is connected between the VDD of the STC11 single-chip microcomputer and the P63, the P65 of the STC11 single-chip microcomputer is grounded through the capacitor C7, the P64 is grounded through the capacitor C8, and one end of the crystal oscillator Y1 is connected between the capacitor C7 and the P65 of the STC11 single-chip microcomputer; the other end of the capacitor is connected between a capacitor C8 and a P64 port of the STC11 singlechip, the VSS of the STC11 singlechip is grounded, a P53 port of the STC11 singlechip is connected to a base electrode of a triode of an ultrasonic level conversion circuit through a resistor, a P52 port and a P51 port of the STC11 singlechip are respectively connected to a T1IN port and a T2IN port of a single power level conversion core MAX232 IN the ultrasonic level conversion circuit, a P60 port of the STC11 singlechip is connected to an emitter electrode of the triode IN an ultrasonic conditioning module circuit, a P61 port of the STC11 singlechip is connected to a 1 IN-port of a waveform processing chip TL074 IN the ultrasonic conditioning module circuit through a resistor, and a P50 port and a P67 port of the STC11 singlechip IN an ultrasonic transmitting and receiving module circuit are respectively connected with P1.0 and P1.1 pins of a 1 pin of the ST89C51 singlechip, and a P1 pin 2 pin and a P6 pin 2 pin of the other two ultrasonic ranging modules are respectively connected to a 3 pin, a 4 pin and a 5 pin and a pin 6 pin of the ST89C51 singlechip IN the ultrasonic conditioning module;
Ultrasonic level conversion circuit: the VCC pin of the single power supply level conversion chip MAX232 is connected to a +5V constant voltage source through a photodiode Q1, VS+ is grounded through a capacitor C12, VS-is grounded through a capacitor C13, the T1OUT pin and the T2OUT pin are respectively connected to two ends of a Speaker of the ultrasonic output end LS1, the C1+ pin is connected with C1-through a capacitor C10, the C2+ pin is connected with C2-through a capacitor C11, and the GND pin is grounded;
ultrasonic conditioning module circuit: the 1OUT pin of the waveform processing chip TL074 is connected to the base electrode of the phototriode through a resistor R6, is connected to the base emitter electrode of the phototriode through R6 and R4, is grounded through the emitter electrode, the 1IN+ pin is connected to the collector electrode of the phototriode through a resistor R5, the collector electrode is connected to a +5V constant voltage source through a resistor R3, the VCC pin is connected to a +5V constant voltage source, and the 2 IN-pin is connected to the 1IN+ pin through a resistor R12; the 2OUT pin is connected to the 1IN+ pin through resistors R13 and R12, the 2 IN-pin is connected to the 3OUT pin through a capacitor C16 and a resistor R14, the 3OUT pin is connected to the 4OUT pin through a resistor R18, a capacitor C18 and a resistor R15, the 3 IN-pin is connected to the 3OUT pin through a resistor R18, the 3IN+ pin is connected to the 4OUT pin through a resistor R17 and a resistor R15, the GND pin is grounded, the 4 IN-pin is connected to the 4OUT pin through a resistor R16, the 4OUT pin is connected to the positive electrode of the Speaker of the ultrasonic output terminal LS2 through a resistor R16, a capacitor C17 and a resistor R19, and the negative electrode of the Speaker of LS2 is grounded;
The optical code disc speed measuring module circuit comprises: in an RC parallel circuit formed by R20 and C20, one end of the RC parallel circuit is connected with one end of a VCC constant power supply and grounded, a light emitting diode LED1 is connected in series in a branch of R20, in a circuit part of the photoelectric coupler, the light emitting diode end of the photoelectric coupler is connected with the other end of the VCC constant power supply and grounded through a pull-up resistor R21, the collector electrode of a phototriode end of the photoelectric coupler is connected with VCC through a pull-up resistor R22 and grounded through a capacitor C21, the emitter electrode of the phototriode end of the photoelectric coupler is grounded, the same-phase end of an operational amplifier is connected with VCC through a sliding rheostat R23, the opposite-phase end of the operational amplifier is connected with the collector electrode of the phototriode end in a series mode, the output of the operational amplifier is connected with VCC through two resistors R24 and R25 which are connected in parallel, the branch of R25 is connected with a light emitting diode LED2 in a series mode, and the output end of the operational amplifier is connected with 13 pins of STC89C 51;
ZigBee reference node module circuit: the inductor L1 is connected in parallel between pins 32 and 34 of the CC2430 module, pin 33 is connected to the inductor L2, and an LC series circuit formed by the inductor L3 and the capacitor C22 is connected to the signal transceiver E1;
ZigBee positioning node module circuit: the inductor L4 is connected in parallel between pins 32 and 34 of the CC2431 module, pin 33 is connected to the inductor L5, and an LC series circuit formed by the inductor L6 and the capacitor C23 is connected to the signal transceiver E2;
RF module socket circuit on gateway: the JP1 pin is grounded through a capacitor C24 and is connected with VCC of a power supply circuit, and the whole module is inserted into a zigbee high-frequency module interface on the gateway;
USB-to-serial interface circuit: the USB BDM and the USBDP of the USB-to-serial interface circuit are respectively connected with the USBDM and the USBDP of the USB interface circuit, the pin 4 and the pin 20 of the FT232RL chip are connected with VCC of the power supply circuit, the pin 17 is grounded through a capacitor C25, the pin 1, the pin 18, the pin 21 and the pin 26 are grounded;
USB interface circuit: the 1-3 pins of the USB are respectively connected to the 5 pins through C28, C27 and C26, the 4 pins are grounded, and the 1 pin is connected to the power circuit VCC through a capacitor L7.
The intelligent trolley is used as a carrier to realize the positioning and obstacle avoidance functions, and the speed measurement and display functions are added on the basis of the functions, so that man-machine interaction can be performed, and the requirements of people are better met. The positioning, autonomous navigation, obstacle avoidance control and the like of the self position are realized. The method for controlling the navigation and the like by researching the mobile robot in the environment has a plurality of key problems such as the navigation control method and the like under the condition of less priori knowledge, and has important significance in engineering and theory. The ZigBee technology is adopted for positioning, and compared with other positioning modes, the ZigBee has the advantages of long distance, low power consumption, stable signal and the like, and is more suitable for positioning in complex environments. The mode of avoiding the barrier is to adopt ultrasonic wave to avoid the barrier, utilizes the principle of ultrasonic reflection to realize ranging, and ultrasonic module is convenient for operate and the price is relatively cheap in reality, and the angle of measurement is wider for other obstacle avoidance devices, can reduce the quantity of module, and is economical and use, is fit for extensive application in life.
Drawings
FIG. 1 is a circuit diagram of a master control chip of the present invention;
FIG. 2 is a power circuit diagram of the present invention;
FIG. 3 is a circuit diagram of the present invention;
FIG. 4 is a schematic diagram of an exclusion circuit according to the present invention;
FIG. 5 is a diagram of a motor drive circuit of the present invention;
FIG. 6 is a circuit diagram of an ultrasonic transmitting and receiving module according to the present invention;
FIG. 7 is a schematic diagram of an ultrasonic level shift circuit of the present invention;
FIG. 8 is a schematic circuit diagram of an ultrasonic conditioning module of the present invention;
FIG. 9 is a schematic circuit diagram of an optical code wheel speed measurement module according to the present invention;
FIG. 10 is a schematic circuit diagram of a ZigBee reference node module of the present invention;
FIG. 11 is a schematic circuit diagram of a ZigBee positioning node module according to the present invention;
FIG. 12 is a schematic diagram of the RF module receptacle circuit on the gateway of the present invention;
FIG. 13 is a USB to serial interface circuit of the present invention;
FIG. 14 is a USB interface circuit of the present invention;
FIG. 15 is a flow chart of the multi-agent pre-grouping of the present invention;
FIG. 16 is a search area partition map of the present invention;
FIG. 17 is an example of four carts searching for a region in accordance with the present invention;
FIG. 18 is a schematic diagram of the interaction within the group of the present invention;
FIG. 19 is a schematic diagram of the inter-group co-ordination of the present invention;
FIG. 20 is a schematic representation of the trilateration method of the present invention.
Detailed Description
The task in the invention is 2 N (N is more than or equal to 1 and N is an integer) the trolleys cooperatively search a certain area, and by taking this as an example, a plurality of agents are simulated to complete a larger task. For convenience of description, the following steps are the same when four trolleys are taken as an example (i.e. N is taken as 2), and N is the rest. The time for each trolley to complete its respective task is achieved by making the initial task assigned to each trolley different or the search speed different. Namely, the difference of the progress conditions of the tasks of the intelligent agents is simulated, so that a coordination control method is embodied.
The method comprises the following steps:
step one, a multi-agent pre-grouping and cooperation principle: is 2 N The intelligent agents cooperate together, wherein N is an integer, the grouping adopts a method of dividing total number by two step-by-step grouping, and completers in the same genus level are preferentially assisted by incompleters until all tasks are completed; n=5, i.e., n=32, are exemplified. Dividing the 32 agents into A by dividing the two by 2 1 、A 2 Two groups of 16. Dividing the multi-agent into two groups, dividing the 32 multi-agent groups into B 1 、B 2 、B 3 、B 4 Four groups of 8. Dividing the multi-agent into 32 pieces of multi-agent into C 1 、C 2 、C 3 、C 4 、C 5 、C 6 、C 7 、C 8 Eight groups of 4. Dividing the multi-agent into 32 pieces by two to divide the multi-agent into D 1 、D 2 、D 3 、D 4 、D 5 、D 6 、D 7 、D 8 、D 9 、D 10 、D 11 、D 12 、D 13 、D 14 、D 15 、D 16 There are 16 groups of two. The minimum group is divided into two groups, and the completion of grouping is indicated when each group is the minimum group. I.e. 2 N The multiple agents are grouped in N-1 total divided by two steps, and divided into N-1 grades (e.g. A, B, C, D) of 2 N-1 And groups. The first group of minimum groups in the coordination of help, when another minimum group of the same level completes the task, e.g. D 1 Completing the predetermined task may help D 2 And performing work. Because of D 1 And D 2 Is commonly C 1 This stage. When D is 1 、D 2 All four agents of (C) accomplish the predetermined task (i.e 1 Completing a task) can then help C 2 In the form of C 1 、C 2 Is commonly B 1 This stage.
Step two, determining an initial task: the whole simulation system adopts a ZigBee positioning module for positioning, and because the tasks executed by multiple intelligent agents are exemplified by the searching tasks, the searching area needs to be limited firstly, namely the searching boundaries of four trolleys in the whole simulation system are determined. A rectangular search area of P x Q is selected as an initial search task of the simulation system. Fixing ZigBee reference node sensor modules (named as modules A, B, C, D) at four vertexes of a rectangular target area for realizing coordinate establishment of the target area, wherein one reference node is taken as a coordinate origin, and the connection line of the other two reference nodes which form rectangular sides together with the reference nodes is taken as an X axis and a Y axis as shown in FIG. 16; the initial task, i.e. the search area is a rectangle of P x Q, is determined.
Step three, distributing initial tasks: as mentioned before, it is necessary that the progress of the individual agent tasks is different. There are three methods, one is that the initial task is different, i.e. the area of the search area initially allocated for each cart is different, and the search speed is the same for each cart. Secondly, the initial tasks assigned are the same and the car search speed is different. Thirdly, the initial tasks allocated are different, and the searching speed of the trolley is also different. The third of the three setting methods is most general, but the effects achieved by these three methods are similar. The third setting method is relatively complex in description because the areas and the speeds are different, and the task progress of each trolley needs to be compared and discussed one by one. Therefore, consider further that the second method, i.e. the initial tasks are the same and the search speed is different, is to assign the initial tasks to each agent in the actual case that the agent is responsible for searching the rectangle with area a. The method comprises the steps of carrying out a first treatment on the surface of the
Fourth, building a communication network of the trolley and the upper computer: the positioning nodes on the trolley are communicated with the positioning nodes of the ad-hoc network of the upper computer through a gateway, and the gateway is connected with the upper computer; thereby realizing the control of the upper computer to the trolley.
Step five, determining the trolley position: the ZigBee positioning suite comprises reference nodes, positioning nodes and gateways, wherein the reference nodes are fixed on the boundary of an area and serve as reference points, the positioning nodes are loaded on the trolley, the distances between the positioning nodes and the reference nodes are measured, and then the position coordinates of the trolley are calculated through a trilateration method; the specific algorithm is trilateration. In a positioning system, estimation of the position of a position point is achieved by measuring the distance of an unknown point from a known point, and known point position information. When the known position point is distant from the known point, the position of the unknown point is on the circumference with the distance of the known point as the center of the circle as the radius. Meanwhile, it is known that in a two-dimensional plane, at most two points are intersected by the circumferences of two non-concentric circles, and at most one point is intersected by the circumferences of three non-concentric circles. As shown in fig. six: knowing that the coordinates of the three points of the reference node A, B, C in the previously established coordinate system are (0, 0), (P, 0), (0, q) and their distances to the unknown point O are da, db, dc, respectively, we assume that the point O coordinates are (x, y). The following set of equations may be listed:
And (3) solving to obtain:
the positioning principle in the invention is a positioning method based on trilateration, the propagation loss of signals is calculated through RSSI values among ZigBee nodes (namely, the signal strength among all nodes), and the propagation loss is converted into the distance between a mobile node and a reference node. Knowing the specific distance from each trolley to the reference node A, B, C, the position coordinates of the trolley can be obtained by the algorithm (the node D is a verification node, after the coordinate values of the trolley are obtained, if the precision requirement is met, the distance between the trolley and the node D can be obtained according to the coordinate values, then the distance is compared with the distance calculated by the RSSI value between the nodes, and if the difference is smaller than a preset threshold value, the precision is met).
Step six, instruction monitoring and execution: the method comprises the steps that coordinate information is sent to a gateway connected with an upper computer to monitor the trolley by the upper computer, control instructions between the upper computer and the trolley are also transmitted in a position coordinate mode, and a singlechip on the trolley outputs square wave driving motors with different duty ratios after receiving the coordinate information received by a positioning node to realize different movement behaviors of the trolley.
Step seven, judging and avoiding the obstacle by the trolley: in order to simulate a more complex environment in reality, several obstacles are set in the environment, but the positions of the obstacles are unknown. The trolley is required to find the obstacle in the searching process, avoid the obstacle without collision and mark the coordinate information of the obstacle. The trolley adopts the ultrasonic sensor to detect the obstacle, the obstacle avoidance function of the trolley is used for realizing the obstacle avoidance, and the coordinate information at the moment is sent to the upper computer to mark the position of the obstacle while the obstacle turning obstacle avoidance is identified.
Inventive n=2 N The intelligent agents cooperatively search a certain area, wherein N is the number of the trolleys and N is the number of stages, so that a search area is required to be defined firstly, namely, the boundary of N trolley searches in the whole task is determined, a rectangular search area with P being equal to Q is selected as an initial search task, and ZigBee reference node sensor modules are named as modules E, F, G and H and are fixed at four vertexes of a target rectangular area to realize coordinate establishment of the target area, one reference node is taken as a coordinate origin, and the connection line of the other two reference nodes and the reference node which jointly form the rectangular side is taken as an X axis and a Y axis;
the whole system adopts a ZigBee positioning module for positioning, a ZigBee positioning suite is composed of reference nodes, positioning nodes and gateways, the reference nodes are fixed on the boundary of an area and serve as reference points, the positioning nodes are loaded on a trolley, the distance between the positioning nodes and each reference node is measured, the position coordinates of the trolley are calculated through an algorithm, the specific algorithm is a trilateration method, the transmission loss of signals is calculated through RSSI values among the ZigBee nodes, namely the signal strength among the nodes, the transmission loss is converted into the distance between the mobile nodes and the reference nodes, the position coordinates of the trolley are calculated through the algorithm when the specific distance between each trolley and the reference node E, F, G is known, the node H serves as a verification node, the distance between the position coordinates of the trolley and the node H can be calculated according to the coordinate values if the accuracy requirement is met after the coordinate values of the trolley are calculated, and the difference is smaller than a preset threshold;
The gateway is used for communicating the positioning nodes on the trolley with each positioning node of the point-to-point network of the upper computer, the gateway is connected with the upper computer, the upper computer knows the position of the trolley and the condition of completing tasks through the gateway, the upper computer sends instructions to the singlechip, the singlechip outputs different duty ratios so as to realize the control of the trolley,
the method comprises the steps that coordinate information is sent to a gateway connected with an upper computer to monitor a trolley by the upper computer, control instructions between the upper computer and the trolley are also transmitted in a position coordinate mode, and after receiving instructions of the upper computer on the coordinate information, a singlechip on the trolley drives left and right wheel motors of the trolley according to current position coordinates and task area coordinates to realize different movement behaviors of the trolley;
in order to simulate a complex environment in reality, a plurality of obstacles are set in the environment, but the positions of the obstacles are unknown, the trolley is required to find the obstacles in the searching process, avoid the obstacles without collision and mark the coordinate information of the obstacles, the trolley adopts an ultrasonic sensor to detect the obstacles, the obstacle avoidance function of the trolley is used for realizing the obstacle avoidance, and the coordinate information at the moment is sent to an upper computer to mark the positions of the obstacles while recognizing the obstacle turning avoidance.
The invention discloses a multi-agent pre-grouping method: the grouping adopts the idea of dividing the total number into two groups step by step, firstly dividing n intelligent agents into a first stage by 2, and dividing the n intelligent agents into A 1 、A 2 Two groups are A 1 ,A 2 For the second stage, n/2 of each group, A is added again 1 ,A 2 Dividing A by two respectively 1 Divided into B 1 ,B 2 Two groups, will A 2 Divided into B 3 ,B 4 Two groups, B 1 ,B 2 ,B 3 ,B 4 For the third stage, n/4 of each group, B is further added 1 ,B 2 ,B 3 ,B 4 Divided by 2, then B 1 Is divided into C 1 ,C 2 Two groups, B 2 Is divided into C 3 ,C 4 Two groups, B 3 Is divided into C 5 ,C 6 Two groups, B4 is divided into C 7 ,C 8 Two groups, C 1 ,C 2 ,C 3 ,C 4 ,C 5 ,C 6 ,C 7 ,C 8 For the fourth level, N/8 of each group, and so on, the minimum group is divided into two groups, and the completion of grouping is indicated when each group is the minimum group, namely the nth level, namely2 N The multiple agents are grouped in N-1 total divided by two steps, and are divided into N grades.
The multi-intelligent autonomous obstacle avoidance and positioning system comprises a main control chip, a power supply circuit, a display circuit, an exclusion circuit, a motor driving circuit, an ultrasonic wave transmitting and receiving module circuit, an ultrasonic wave transmitting module, an ultrasonic wave receiving module, an optical code disc speed measuring module circuit, a ZigBee reference node module circuit, a ZigBee positioning node module circuit, an RF module socket circuit on a gateway, a USB-to-serial interface circuit and a USB interface circuit;
And (3) a main control chip: an STC89C51 chip is adopted, and P is 1.0 to P1.7: a common input/output port; p3.3/, wherein the external interrupt is triggered by a falling edge trigger or a low level trigger; p0.0 to P0.7: these pins serve as input ports as well as output ports and also serve as multiplexed buses for address and data.
A power supply circuit: two pins of the output end of the coupling inductor T are connected to a diode rectifying four-arm bridge, namely connected between diodes D1 and D3 and between diodes D2 and D4 respectively; the output end of the rectifying tube four-arm bridge is connected with a capacitor C1 in parallel, one end of the rectifying tube four-arm bridge is connected with the input end Vin of the LM7805 voltage stabilizing chip, and the other end of the rectifying tube four-arm bridge is grounded; the grounding end GND of the LM7805 voltage stabilizing chip is grounded through a capacitor C2, one end of the output end of the voltage stabilizing power supply is grounded, the other end of the output end of the voltage stabilizing power supply is respectively connected with the 21 pin of the STC89C51, the 2 pin of the LCD1602, the 1 pin of the RESPACK-8, the 9 pin of the L298N, an ultrasonic ranging module, an ultrasonic level conversion circuit, an ultrasonic conditioning module circuit, an optical code disc speed measuring module circuit, an RF module socket circuit on a gateway, a USB-to-serial interface circuit and the VCC pin of the RS232 module.
The display circuit: the pins 4-6 of the LCD1602 are connected with the pins 40-38 of the STC89C51, the pins 7-14 of the LCD1602 are connected with the pins 28-21 of the STC89C51, and the pins 2-9 of the RP1 are connected with the pins 28-21 of the STC89C 51; pin description of LCD 1602: VSS power supply is grounded; a Vcc power supply anode; RS is register selection, data register is selected when the level is 1, R/W is selected when the level is 0, R/W is selected when the level is 1, E is selected when the level is 0, information is read when the level is 1, and executing instructions DB 0-DB 7 are 8-bit bidirectional data ends when the level is 1.
And the resistance discharging circuit comprises: the 2 pins to 9 pins of the resistor are respectively connected with the 28 pins to 21 pins of the STC89C51 singlechip; resistance expelling function: pins built on the basis of the STC89C51 singlechip cannot be directly output, and a pull-up resistor is required to be connected inside the singlechip, so that the effects of improving voltage and limiting current are achieved.
A motor driving circuit: 1-6 pins of STC89C51 are respectively connected with 5 pins, 7 pins, 10 pins, 12 pins, 6 pins and 11 pins of L298N, 9 pins VSS of a constant voltage and constant current driving chip L298N is connected with the output VCC of a power supply circuit, and is grounded through a capacitor C4 and is grounded through an electrolytic capacitor C3, 4 pins VS is connected with a 12V constant voltage source, 8 pins GND is grounded, 1 pins ISEN A and 15 pins ISEN B are grounded through the same wire, meanwhile, 4 groups of 8 diode current stabilizing bodies from D5 to D12 are interposed between the +12V constant voltage source and the ground, the cathodes of D5-D8 are connected with the +12V constant voltage source together, and are grounded through a capacitor C5, the anodes of D9-D12 are connected with each other and are grounded through an electrolytic capacitor C6, and the output of the constant voltage and constant current driving chip L298HN drives two servo MOTORs, namely, pins 2OUTI and 3OUT2 are connected with the anode and cathode of a servo MOTOR MOTOR 1; pin 13OUT3 pin 14OUT4 is connected to the positive and negative poles of servo MOTOR 2; IN 1-IN 4 are logic inputs; ENA, ENB being the control enable; GND is the power supply ground; VSS is connected with the positive electrode of the logic level power supply; VS is connected with the positive electrode of the power supply of the driving part; OUT1 to OUT4 output motors; ISEN A, ISEN B is the output current feedback pin.
Ultrasonic wave transmission and receiving module circuit: the output VCC of the power supply circuit is connected with the Vcc of the 4 feet, the ground is connected with the 1 feet, the P50 of the STC11 single-chip microcomputer is connected with the P67 of the STC11 single-chip microcomputer through the R1 and R2 parallel resistors, the P63 is grounded, the capacitor C9 is connected between the VDD of the STC11 single-chip microcomputer and the P63, the P65 of the STC11 single-chip microcomputer is grounded through the capacitor C7, the P64 is grounded through the capacitor C8, and one end of the crystal oscillator Y1 is connected between the capacitor C7 and the P65 of the STC11 single-chip microcomputer; the other end of the ultrasonic ranging module is connected between a capacitor C8 and a P64 port of an STC11 single-chip microcomputer, VSS of the STC11 single-chip microcomputer is grounded, a P53 port of the STC11 single-chip microcomputer is connected to a base electrode of a triode of an ultrasonic level conversion circuit through a resistor, a P52 port and a P51 port of the STC11 single-chip microcomputer are respectively connected to a T1IN port and a T2IN port of a single-power level conversion core MAX232 IN the ultrasonic level conversion circuit, a P60 port of the STC11 single-chip microcomputer is connected to an emitter electrode of a triode IN an ultrasonic conditioning module circuit, a P61 port of the STC11 single-chip microcomputer is connected to a 1 IN-of a waveform processing chip TL074 IN the ultrasonic conditioning module circuit through a resistor, and a P50 port and a P67 port of the STC11 single-chip microcomputer IN the ultrasonic transmitting and receiving module circuit are respectively connected to P1.0 and P1.1 pins of the ST89C51 single-chip microcomputer, and 3 pins, 4 and 5 and 6 pins of the rest two ultrasonic ranging modules are respectively connected to 1 pins 2 of the ST C51 single-chip microcomputer IN the ultrasonic ranging module because IN practice each trolley uses three ultrasonic ranging modules to conduct obstacle detection.
Ultrasonic level conversion circuit: the VCC pin of the single power level conversion chip MAX232 is connected to a +5V constant voltage source through a photodiode Q1, VS+ is grounded through a capacitor C12, VS-is grounded through a capacitor C13, the T1OUT pin and the T2OUT pin are respectively connected to two ends of a Speaker of the ultrasonic output end LS1, the C1+ pin is connected with C1-through a capacitor C10, the C2+ pin is connected with C2-through a capacitor C11, and the GND pin is grounded.
Ultrasonic conditioning module circuit: the 1OUT pin of the waveform processing chip TL074 is connected to the base electrode of the phototriode through a resistor R6, is connected to the base emitter electrode of the phototriode through R6 and R4, is grounded through the emitter electrode, the 1IN+ pin is connected to the collector electrode of the phototriode through a resistor R5, the collector electrode is connected to a +5V constant voltage source through a resistor R3, the VCC pin is connected to a +5V constant voltage source, and the 2 IN-pin is connected to the 1IN+ pin through a resistor R12; the 2OUT pin is connected to the 1IN+ pin through resistors R13 and R12, the 2 IN-pin is connected to the 3OUT pin through a capacitor C16 and a resistor R14, the 3OUT pin is connected to the 4OUT pin through a resistor R18, a capacitor C18 and a resistor R15, the 3 IN-pin is connected to the 3OUT pin through a resistor R18, the 3IN+ pin is connected to the 4OUT pin through a resistor R17 and a resistor R15, the GND pin is grounded, the 4 IN-pin is connected to the 4OUT pin through a resistor R16, the 4OUT pin is connected to the positive electrode of the Speaker of the ultrasonic output terminal LS2 through a resistor R16, a capacitor C17 and a resistor R19, and the negative electrode of the Speaker of LS2 is grounded; MAX232 pin description: c1+, C1-, C2+, C2-, VS+, VS-functions are the need to generate both +12v and-12v power to the RS-232 serial level. TIIN, T2IN is the input channel, T1OUT, T2OUT is the output channel.
The optical code disc speed measuring module circuit comprises: in an RC parallel circuit formed by R20 and C20, one end of the RC parallel circuit is connected with one end of a VCC constant power supply and grounded, a light emitting diode LED1 is connected in series in a branch of R20, in a circuit part of the photoelectric coupler, the light emitting diode end of the photoelectric coupler is connected with the other end of the VCC constant power supply and grounded through a pull-up resistor R21, the collector electrode of a phototriode end of the photoelectric coupler is connected with VCC through a pull-up resistor R22 and grounded through a capacitor C21, the emitter electrode of the phototriode end of the photoelectric coupler is grounded, the same-phase end of an operational amplifier is connected with VCC through a sliding rheostat R23, the opposite-phase end of the operational amplifier is connected with the collector electrode of the phototriode end in a series mode, the output of the operational amplifier is connected with VCC through two resistors R24 and R25 which are connected in parallel, the branch of R25 is connected with the light emitting diode LED2 in a series, and the output end of the operational amplifier is connected with 13 pins of STC89C 51.
ZigBee reference node module circuit: the inductor L1 is connected in parallel between pins 32 and 34 of the CC2430 module, pin 33 is connected to the inductor L2, and an LC series circuit formed by the inductor L3 and the capacitor C22 is connected to the signal transceiver E1; and the communication between the ZigBee reference node and the gateway is realized.
ZigBee positioning node module circuit: the inductor L4 is connected in parallel between pins 32 and 34 of the CC2431 module, pin 33 is connected to the inductor L5, and an LC series circuit formed by the inductor L6 and the capacitor C23 is connected to the signal transceiver E2; and the communication between the ZigBee positioning node and the gateway is realized. RF-P pin: upon reception, a positive RF input signal to the LNA; during transmission, the positive RF output signal TXRXW pin from the PA is the calibration voltage for the PA, RF-N pin: upon reception, a negative RF input signal to the LNA; upon transmission, a negative RF output signal from the power amplifier.
RF module socket circuit on gateway: the JP1 pin is grounded through a capacitor C24 and is connected with VCC of a power supply circuit, and the whole module is inserted into a zigbee high-frequency module interface on the gateway; an RF module: wireless transmission equipment, can transmit data information.
USB-to-serial interface circuit: the USB BDM and the USBDP of the USB-to-serial interface circuit are respectively connected with the USBDM and the USBDP of the USB interface circuit, the pin 4 and the pin 20 of the FT232RL chip are connected with VCC of the power supply circuit, the pin 17 is grounded through a capacitor C25, the pin 1, the pin 18, the pin 21 and the pin 26 are grounded.
USB interface circuit: the 1-3 pins of the USB are respectively connected to the 5 pins through C28, C27 and C26, the 4 pins are grounded, and the 1 pin is connected to the power circuit VCC through a capacitor L7.
As shown in fig. 17, in the ZigBee-based multi-agent cooperative control method, four trolleys are used to search for a certain area as an example. The coordination control of multiple agents is implemented in this example in five steps as mentioned above. In fig. 16, the carts are divided into two groups AB, each group being further divided into two numbers 1, 2. The initial task allocation adopts a scheme II, namely the initial allocation search areas of four trolleys are the same, and the search speed of each trolley is different.
As shown in fig. 18, if the speed of the A1 trolley is assumed to be the fastest, the A1 sends a task completion instruction to the host computer after completing its own initial task. And after receiving the instruction, the upper computer sends a positioning instruction to the A2 trolley positioning nodes in the same group through the gateway. And A2, the positioning node on the trolley sends a request signal to a reference node of the area boundary, the reference node sends a signal to the positioning node after receiving the request signal, the positioning node calculates the distance between the positioning node and the reference node through an algorithm according to the strength of the received signal, namely the RISS value, and the distance value is sent to an upper computer. The upper computer analyzes the residual task conditions in the group A, and equally divides the area of the area which is not searched at the moment into two trolleys A1 and A2. Thus completing the mutual assistance process in the multi-agent group.
As shown in fig. 19, the speed is fastest due to A1. When the task of the second allocation is completed again by the A1, repeating the process of the figure 20 to continue the inter-group assistance until the area of the residual area is smaller than the critical threshold (the critical threshold is the area occupied by the trolley), and then the task of the group A is considered to be completed. At this point, the inter-group co-operation process shown in fig. 17 is entered. Similar to the intra-group mutual assistance process, the A1 vehicle will be idle first because it is always the remaining task aliquoting. At this time, the A1 sends a completion instruction to the upper computer, and the upper computer sends an instruction for inquiring the current coordinates to the B1 and the B2. B1 and B2 repeat the process described in the previous A2 to send the coordinate information to the upper computer. The following description will be made taking the slowest B1 as an example. Through the returned coordinate information, the upper computer analyzes that the process of B1 is slower than that of B2, so that the residual tasks of B1 are distributed to B1 and A1. After A2 is completed, A2 is allowed to assist B2 in completion. When the remaining tasks are less than the threshold, they are considered to assist in completion.
As shown in FIG. 15, the control mode is coordination assistance, firstly, the agents of the same level are assisted, when the other minimum group of the same level completes the task, such as C 1 Completing the predetermined task may help C 2 And performing work. Because C 1 And C 2 Is commonly B 1 This stage. When C 1 ,C 2 The agents of (a) all accomplish the predetermined task (i.e. B 1 Completing a task) can then help B 2 Because B is 1 、B 2 Is commonly of A 1 This stage. Similarly, completers within the same hierarchy are prioritized to help incomplete ones until all tasks are completed.
Three different progress situations can appear when the agent performs the task: one is that the initial task is different, i.e. the area of the search area initially allocated is different for each trolley, and the search speed is the same for each trolley. Secondly, the initial tasks assigned are the same and the car search speed is different. Thirdly, the initial tasks allocated are different, and the trolley searching speeds are also different. In either case, the search effect is the same. Here, we take n=2, n=4 and the second case mentioned above as an example for further explanation.
As shown in fig. 17, in the ZigBee-based multi-agent cooperative control method, four trolleys are used to search for a certain area as an example. The implementation of coordinated control of multiple agents in this example is divided into the aforementioned steps. In fig. 17, the carts are divided into two groups AB, each group being further divided into two numbers 1, 2. The initial task allocation adopts a scheme II, namely the search area of the initial allocation of four trolleys is the same, and the search speed of each trolley is different.
As shown in fig. 18, if the speed of the A1 trolley is assumed to be the fastest, the A1 sends a task completion instruction to the host computer after completing its own initial task. And after receiving the instruction, the upper computer sends a positioning instruction to the A2 trolley positioning nodes in the same group through the gateway. And A2, the positioning node on the trolley sends a request signal to a reference node of the area boundary, the reference node sends a signal to the positioning node after receiving the request signal, the positioning node calculates the distance between the positioning node and the reference node through an algorithm according to the strength of the received signal, namely the RISS value, and the distance value is sent to an upper computer. The upper computer analyzes the residual task conditions in the group A, and equally divides the area of the area which is not searched at the moment into two trolleys A1 and A2. Thus completing the mutual assistance process in the multi-agent group.
As shown in fig. 18, the speed is fastest due to A1. When the task of the second allocation is completed by the A1, repeating the process of the figure 18 to continue the inter-group assistance until the area of the residual area is smaller than the critical threshold (the critical threshold is the area occupied by the trolley), and then the task of the group A is considered to be completed. At this point, the inter-group co-operation process shown in fig. 19 is entered. Similar to the intra-group mutual assistance process, the A1 vehicle will be idle first because it is always the remaining task aliquoting. At this time, the A1 sends a completion instruction to the upper computer, and the upper computer sends an instruction for inquiring the current coordinates to the B1 and the B2. B1 and B2 repeat the process described in the previous A2 to send the coordinate information to the upper computer. The following description will be made taking the slowest B1 as an example. Through the returned coordinate information, the upper computer analyzes that the process of B1 is slower than that of B2, so that the residual tasks of B1 are distributed to B1 and A1. After A2 is completed, A2 is allowed to assist B2 in completion. When the remaining tasks are less than the threshold, they are considered to assist in completion.

Claims (2)

1. A ZigBee-based simulation multi-agent coordination control method is characterized in that:
step one, a multi-agent pre-grouping and cooperation principle: is 2 N The intelligent agents cooperate together, wherein N is an integer, the grouping adopts a method of dividing total number by two step-by-step grouping, and completers in the same genus level are preferentially assisted by incompleters until all tasks are completed;
step two, determining an initial task: the whole simulation system adopts a ZigBee positioning module to position, a ZigBee reference node sensor module is fixed at four vertexes of a target rectangular area, one reference node is used as a coordinate origin, and the connecting lines of the other two reference nodes which form rectangular sides together with the reference nodes are used as an X axis and a Y axis;
step three, distributing initial tasks: the allocation principle adopts the scheme that the allocated initial tasks are the same and the searching speeds of the trolleys are different, namely, in practice, the initial tasks are allocated to each intelligent agent to be responsible for searching the rectangle with the area of a;
fourth, building a communication network of the trolley and the upper computer: the positioning nodes on the trolley are communicated with the positioning nodes of the ad-hoc network of the upper computer through a gateway, and the gateway is connected with the upper computer;
Step five, determining the trolley position: the ZigBee positioning suite comprises reference nodes, positioning nodes and gateways, wherein the reference nodes are fixed on the boundary of an area and serve as reference points, the positioning nodes are loaded on the trolley, the distances between the positioning nodes and the reference nodes are measured, and then the position coordinates of the trolley are calculated through a trilateration method;
step six, instruction monitoring and execution: the method comprises the steps that coordinate information is sent to a gateway connected with an upper computer to monitor a trolley by the upper computer, control instructions between the upper computer and the trolley are also transmitted in a position coordinate form, and a singlechip on the trolley outputs square wave driving motors with different duty ratios to realize different movement behaviors of the trolley after receiving the coordinate information received by a positioning node;
step seven, judging and avoiding the obstacle by the trolley: the trolley adopts an ultrasonic sensor to detect the obstacle, the obstacle avoidance function of the trolley is used for realizing the obstacle avoidance, and the coordinate information at the moment is sent to the upper computer to mark the position of the obstacle while the obstacle turning obstacle avoidance is identified;
n=2 N the intelligent agents cooperatively search a certain area, wherein N is the number of the trolleys and N is the number of stages, so that a search area is required to be defined firstly, namely, the boundary of N trolley searches in the whole task is determined, a rectangular search area with P being equal to Q is selected as an initial search task, and ZigBee reference node sensor modules are named as modules E, F, G and H and are fixed at four vertexes of a target rectangular area to realize coordinate establishment of the target area, one reference node is taken as a coordinate origin, and the connection line of the other two reference nodes and the reference node which jointly form the rectangular side is taken as an X axis and a Y axis;
The whole system adopts a ZigBee positioning module for positioning, a ZigBee positioning suite is composed of reference nodes, positioning nodes and gateways, the reference nodes are fixed on the boundary of an area and serve as reference points, the positioning nodes are loaded on a trolley, the distance between the positioning nodes and each reference node is measured, the position coordinates of the trolley are calculated through an algorithm, the specific algorithm is a trilateration method, the transmission loss of signals is calculated through RSSI values among the ZigBee nodes, namely the signal strength among the nodes, the transmission loss is converted into the distance between the mobile nodes and the reference nodes, the position coordinates of the trolley are calculated through the algorithm when the specific distance between each trolley and the reference node E, F, G is known, the node H serves as a verification node, the distance between the position coordinates of the trolley and the node H can be calculated according to the coordinate values if the accuracy requirement is met after the coordinate values of the trolley are calculated, and the difference is smaller than a preset threshold;
the gateway is used for communicating the positioning nodes on the trolley with each positioning node of the point-to-point network of the upper computer, the gateway is connected with the upper computer, the upper computer knows the position of the trolley and the condition of completing tasks through the gateway, the upper computer sends instructions to the singlechip, the singlechip outputs different duty ratios so as to realize the control of the trolley,
The method comprises the steps that coordinate information is sent to a gateway connected with an upper computer to monitor a trolley by the upper computer, control instructions between the upper computer and the trolley are also transmitted in a position coordinate mode, and after receiving instructions of the upper computer on the coordinate information, a singlechip on the trolley drives left and right wheel motors of the trolley according to current position coordinates and task area coordinates to realize different movement behaviors of the trolley;
in order to simulate a complex environment in reality, a plurality of obstacles are set in the environment, but the positions of the obstacles are unknown, the trolley is required to find the obstacles in the searching process, avoid the obstacles without collision and mark the coordinate information of the obstacles, the trolley adopts an ultrasonic sensor to detect the obstacles, the obstacle avoidance function of the trolley is used for realizing the obstacle avoidance, and the coordinate information at the moment is sent to an upper computer to mark the positions of the obstacles while recognizing the obstacle turning avoidance;
multi-agent pre-grouping: the grouping adopts the idea of dividing the total number into two groups step by step, firstly dividing n intelligent agents into a first stage by 2, and dividing the n intelligent agents into A 1 、A 2 Two groups are A 1 ,A 2 Is the firstSecond, n/2 of each group, and then A 1 ,A 2 Dividing A by two respectively 1 Divided into B 1 ,B 2 Two groups, will A 2 Divided into B 3 ,B 4 Two groups, B 1 ,B 2 ,B 3 ,B 4 For the third stage, n/4 of each group, B is further added 1 ,B 2 ,B 3 ,B 4 Divided by 2, then B 1 Is divided into C 1 ,C 2 Two groups, B 2 Is divided into C 3 ,C 4 Two groups, B 3 Is divided into C 5 ,C 6 Two groups, B4 is divided into C 7 ,C 8 Two groups, C 1 ,C 2 ,C 3 ,C 4 ,C 5 ,C 6 ,C 7 ,C 8 For the fourth level, N/8 of each group, and so on, the minimum group is divided into two groups, and the completion of grouping is indicated when each group is the minimum group, namely the N level, namely 2 N The multiple agents are grouped in N-1 total divided by two steps, and are divided into N grades.
2. The ZigBee-based simulation multi-agent coordination control method according to claim 1, wherein the method comprises the following steps: the multi-intelligent autonomous obstacle avoidance and positioning system comprises a main control chip, a power supply circuit, a display circuit, a resistor-array circuit, a motor driving circuit, an ultrasonic wave transmitting and receiving module circuit, an ultrasonic wave transmitting module, an ultrasonic wave receiving module, an optical code disc speed measuring module circuit, a ZigBee reference node module circuit, a ZigBee positioning node module circuit, an RF module socket circuit on a gateway, a USB-to-serial interface circuit and a USB interface circuit;
and (3) a main control chip: with the use of the STC89C51 chip,
a power supply circuit: two pins of the output end of the coupling inductor T are connected to a diode rectifying four-arm bridge, namely connected between diodes D1 and D3 and between diodes D2 and D4 respectively; the output end of the rectifying tube four-arm bridge is connected with a capacitor C1 in parallel, one end of the rectifying tube four-arm bridge is connected with the input end Vin of the LM7805 voltage stabilizing chip, and the other end of the rectifying tube four-arm bridge is grounded; the grounding end GND of the LM7805 voltage-stabilizing chip is grounded through a capacitor C2, one end of the output end of the voltage-stabilizing power supply is grounded, the other end of the output end of the voltage-stabilizing power supply is respectively connected with the 21 pin of the STC89C51, the 2 pin of the LCD1602, the 1 pin of the RESPACK-8, the 9 pin of the L298N, an ultrasonic ranging module, an ultrasonic level conversion circuit, an ultrasonic conditioning module circuit, an optical code disc speed measuring module circuit, an RF module socket circuit on a gateway, a USB-to-serial interface circuit and the VCC pin of the RS232 module;
The display circuit: the pins 4-6 of the LCD1602 are connected with the pins 40-38 of the STC89C51, the pins 7-14 of the LCD1602 are connected with the pins 28-21 of the STC89C51, and the pins 2-9 of the RP1 are connected with the pins 28-21 of the STC89C 51;
and the resistance discharging circuit comprises: the 2 pins to 9 pins of the resistor are respectively connected with the 28 pins to 21 pins of the STC89C51 singlechip;
a motor driving circuit: 1-6 pins of STC89C51 are respectively connected with 5 pins, 7 pins, 10 pins, 12 pins, 6 pins and 11 pins of L298N, 9 pins VSS of a constant voltage and constant current driving chip L298N is connected with the output VCC of a power supply circuit, and is grounded through a capacitor C4 and is grounded through an electrolytic capacitor C3, 4 pins VS is connected with a 12V constant voltage source, 8 pins GND is grounded, 1 pins ISEN A and 15 pins ISEN B are grounded through the same wire, meanwhile, 4 groups of 8 diode current stabilizing bodies from D5 to D12 are interposed between the +12V constant voltage source and the ground, the cathodes of D5-D8 are connected with the +12V constant voltage source together, and are grounded through a capacitor C5, the anodes of D9-D12 are connected with each other and are grounded through an electrolytic capacitor C6, and the output of the constant voltage and constant current driving chip L298HN drives two servo MOTORs, namely, pins 2OUTI and 3OUT2 are connected with the anode and cathode of a servo MOTOR MOTOR 1; pin 13OUT3 pin 14OUT4 is connected to the positive and negative poles of servo MOTOR 2;
ultrasonic wave transmission and receiving module circuit: the output VCC of the power supply circuit is connected with the Vcc of the 4 feet, the ground is connected with the 1 feet, the P50 of the STC11 single-chip microcomputer is connected with the P67 of the STC11 single-chip microcomputer through the R1 and R2 parallel resistors, the P63 is grounded, the capacitor C9 is connected between the VDD of the STC11 single-chip microcomputer and the P63, the P65 of the STC11 single-chip microcomputer is grounded through the capacitor C7, the P64 is grounded through the capacitor C8, and one end of the crystal oscillator Y1 is connected between the capacitor C7 and the P65 of the STC11 single-chip microcomputer; the other end of the capacitor is connected between a capacitor C8 and a P64 port of the STC11 singlechip, the VSS of the STC11 singlechip is grounded, a P53 port of the STC11 singlechip is connected to a base electrode of a triode of an ultrasonic level conversion circuit through a resistor, a P52 port and a P51 port of the STC11 singlechip are respectively connected to a T1IN port and a T2IN port of a single power level conversion core MAX232 IN the ultrasonic level conversion circuit, a P60 port of the STC11 singlechip is connected to an emitter electrode of the triode IN an ultrasonic conditioning module circuit, a P61 port of the STC11 singlechip is connected to a 1 IN-port of a waveform processing chip TL074 IN the ultrasonic conditioning module circuit through a resistor, and a P50 port and a P67 port of the STC11 singlechip IN an ultrasonic transmitting and receiving module circuit are respectively connected with P1.0 and P1.1 pins of a 1 pin of the ST89C51 singlechip, and a P1 pin 2 pin and a P6 pin 2 pin of the other two ultrasonic ranging modules are respectively connected to a 3 pin, a 4 pin and a 5 pin and a pin 6 pin of the ST89C51 singlechip IN the ultrasonic conditioning module;
Ultrasonic level conversion circuit: the VCC pin of the single power supply level conversion chip MAX232 is connected to a +5V constant voltage source through a photodiode Q1, VS+ is grounded through a capacitor C12, VS-is grounded through a capacitor C13, the T1OUT pin and the T2OUT pin are respectively connected to two ends of a Speaker of the ultrasonic output end LS1, the C1+ pin is connected with C1-through a capacitor C10, the C2+ pin is connected with C2-through a capacitor C11, and the GND pin is grounded;
ultrasonic conditioning module circuit: the 1OUT pin of the waveform processing chip TL074 is connected to the base electrode of the phototriode through a resistor R6, is connected to the base emitter electrode of the phototriode through R6 and R4, is grounded through the emitter electrode, the 1IN+ pin is connected to the collector electrode of the phototriode through a resistor R5, the collector electrode is connected to a +5V constant voltage source through a resistor R3, the VCC pin is connected to a +5V constant voltage source, and the 2 IN-pin is connected to the 1IN+ pin through a resistor R12; the 2OUT pin is connected to the 1IN+ pin through resistors R13 and R12, the 2 IN-pin is connected to the 3OUT pin through a capacitor C16 and a resistor R14, the 3OUT pin is connected to the 4OUT pin through a resistor R18, a capacitor C18 and a resistor R15, the 3 IN-pin is connected to the 3OUT pin through a resistor R18, the 3IN+ pin is connected to the 4OUT pin through a resistor R17 and a resistor R15, the GND pin is grounded, the 4 IN-pin is connected to the 4OUT pin through a resistor R16, the 4OUT pin is connected to the positive electrode of the Speaker of the ultrasonic output terminal LS2 through a resistor R16, a capacitor C17 and a resistor R19, and the negative electrode of the Speaker of LS2 is grounded;
The optical code disc speed measuring module circuit comprises: in an RC parallel circuit formed by R20 and C20, one end of the RC parallel circuit is connected with one end of a VCC constant power supply and grounded, a light emitting diode LED1 is connected in series in a branch of R20, in a circuit part of the photoelectric coupler, the light emitting diode end of the photoelectric coupler is connected with the other end of the VCC constant power supply and grounded through a pull-up resistor R21, the collector electrode of a phototriode end of the photoelectric coupler is connected with VCC through a pull-up resistor R22 and grounded through a capacitor C21, the emitter electrode of the phototriode end of the photoelectric coupler is grounded, the same-phase end of an operational amplifier is connected with VCC through a sliding rheostat R23, the opposite-phase end of the operational amplifier is connected with the collector electrode of the phototriode end in a series mode, the output of the operational amplifier is connected with VCC through two resistors R24 and R25 which are connected in parallel, the branch of R25 is connected with a light emitting diode LED2 in a series mode, and the output end of the operational amplifier is connected with 13 pins of STC89C 51;
ZigBee reference node module circuit: the inductor L1 is connected in parallel between pins 32 and 34 of the CC2430 module, pin 33 is connected to the inductor L2, and an LC series circuit formed by the inductor L3 and the capacitor C22 is connected to the signal transceiver E1;
ZigBee positioning node module circuit: the inductor L4 is connected in parallel between pins 32 and 34 of the CC2431 module, pin 33 is connected to the inductor L5, and an LC series circuit formed by the inductor L6 and the capacitor C23 is connected to the signal transceiver E2;
RF module socket circuit on gateway: the JP1 pin is grounded through a capacitor C24 and is connected with VCC of a power supply circuit, and the whole module is inserted into a zigbee high-frequency module interface on the gateway;
USB-to-serial interface circuit: the USB BDM and the USBDP of the USB-to-serial interface circuit are respectively connected with the USBDM and the USBDP of the USB interface circuit, the pin 4 and the pin 20 of the FT232RL chip are connected with VCC of the power supply circuit, the pin 17 is grounded through a capacitor C25, the pin 1, the pin 18, the pin 21 and the pin 26 are grounded;
USB interface circuit: the pins 1-3 of the USB are respectively connected to the pin 5 through the pins C28, C27 and C26, the pin 4 is grounded, and the pin 1 is connected to VCC of the power circuit through the capacitor L7.
CN201610935608.2A 2016-10-25 2016-10-25 ZigBee-based simulated multi-agent coordination control method Active CN106444771B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610935608.2A CN106444771B (en) 2016-10-25 2016-10-25 ZigBee-based simulated multi-agent coordination control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610935608.2A CN106444771B (en) 2016-10-25 2016-10-25 ZigBee-based simulated multi-agent coordination control method

Publications (2)

Publication Number Publication Date
CN106444771A CN106444771A (en) 2017-02-22
CN106444771B true CN106444771B (en) 2023-08-22

Family

ID=58177736

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610935608.2A Active CN106444771B (en) 2016-10-25 2016-10-25 ZigBee-based simulated multi-agent coordination control method

Country Status (1)

Country Link
CN (1) CN106444771B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3622727A4 (en) * 2017-05-11 2021-06-09 Nectar, Inc. Content amount detection and analysis
CN107065700A (en) * 2017-06-03 2017-08-18 合肥佳洋电子科技有限公司 A kind of intelligence control system
CN107544444A (en) * 2017-08-16 2018-01-05 浙江力太科技有限公司 A kind of synchronous production management method for more equipment rooms
CN111726827A (en) * 2020-06-17 2020-09-29 北京交通大学 USB-ZigBee northbound interface implementation method based on serial port callback mechanism
CN113848828B (en) * 2021-09-08 2023-06-27 广州杰赛科技股份有限公司 Automatic obstacle avoidance control method, device, equipment and medium for AGV trolley

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012143952A2 (en) * 2011-04-20 2012-10-26 B Amutha A system and apparatus for safe remote on-line tracing, shadowing, surveillance, inter-communication, location, navigation, tagging, rescue, recovery and restitution of humans and stolen/missing chattels, and the method/s thereof
CN104469986A (en) * 2014-11-28 2015-03-25 四川长虹电器股份有限公司 ZIGBEE equipment networking method
CN104808667A (en) * 2015-04-27 2015-07-29 南昌航空大学 Automatic navigation and obstacle-avoidance intelligent vehicle control system
CN205080434U (en) * 2015-11-11 2016-03-09 黄河科技学院 WIFI intelligent video dolly based on 51 singlechip

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103079195B (en) * 2013-01-25 2016-01-20 瑞声声学科技(深圳)有限公司 Wireless device and network address report method thereof
US9485805B2 (en) * 2013-09-12 2016-11-01 Haier Us Appliance Solutions, Inc. Network address translation for ZIGBEE™/802.15.4 bridges

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012143952A2 (en) * 2011-04-20 2012-10-26 B Amutha A system and apparatus for safe remote on-line tracing, shadowing, surveillance, inter-communication, location, navigation, tagging, rescue, recovery and restitution of humans and stolen/missing chattels, and the method/s thereof
CN104469986A (en) * 2014-11-28 2015-03-25 四川长虹电器股份有限公司 ZIGBEE equipment networking method
CN104808667A (en) * 2015-04-27 2015-07-29 南昌航空大学 Automatic navigation and obstacle-avoidance intelligent vehicle control system
CN205080434U (en) * 2015-11-11 2016-03-09 黄河科技学院 WIFI intelligent video dolly based on 51 singlechip

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
龚君 ; 郑启文 ; 赵瑾 ; .基于ZigBee多智能小车无线控制系统的设计.上海电机学院学报.2012,(第02期),全文. *

Also Published As

Publication number Publication date
CN106444771A (en) 2017-02-22

Similar Documents

Publication Publication Date Title
CN106444771B (en) ZigBee-based simulated multi-agent coordination control method
CN109032138B (en) Consistency algorithm-based multi-robot formation control system and method
CN109725327B (en) Method and system for building map by multiple machines
JP2019501384A (en) Autonomous positioning navigation equipment, positioning navigation method and autonomous positioning navigation system
CN104503454B (en) Searching and rescue robot system moving control method based on multi-intelligent-agent theory
CN105425791A (en) Swarm robot control system and method based on visual positioning
CN111367285B (en) Wheeled mobile trolley cooperative formation and path planning method
CN110647089A (en) Intelligent warehouse logistics robot control system and control method
CN107907861A (en) A kind of flooring transport vehicle ultrasonic wave positioning control system and its control method
CN105573198A (en) UCOSII-based mine search and rescue system and search and rescue method
CN107992044A (en) A kind of autonomous traveling control method of robot and robot system of independently advancing
CN108549370A (en) Collecting method and harvester
CN108037754A (en) A kind of flooring transport vehicle ultrasonic wave positioning control system
CN111880543A (en) Indoor robot positioning control system based on UWB
CN108536146A (en) The intelligent control method of localization for Mobile Robot recharging base based on path and RSSI
CN103702413A (en) Real-time following and positioning system of indoor camera based on Zigbee network
CN108762261B (en) Mobile robot traversal path planning method based on double wireless networks
CN108646759B (en) Intelligent detachable mobile robot system based on stereoscopic vision and control method
CN109387842A (en) Ultrasonic distance measurement obstacle avoidance system
CN211207169U (en) Chassis control system of greenhouse picking robot
Susnea Distributed neural networks microcontroller implementation and applications
CN105068534B (en) Intelligent logistics robot based on Zigbee
Zhao et al. Dynamic node allocation-based multirobot path planning
CN114147721A (en) Robot control system and method based on EtherCAT bus
CN111770547B (en) Fermat point-based three-dimensional regional multicast routing method for wireless sensor network

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant