Disclosure of Invention
In view of the above drawbacks of the prior art, an object of the present invention is to provide an automation control system, method and mechanical device, which implement safe and high-speed automation control by integrating embedded programming and driving control, and have the advantages of low cost, high operation precision, high expandability and convenience for system upgrade and expansion.
In order to achieve the above objects and other related objects, the present invention provides an automated control system for implementing automated control of a machine body, including a motion controller and a servo driver; the motion controller is used for receiving a control command sent by a client, generating position data of each joint of the mechanical body according to the control command, sending the position data to the servo driver and receiving motion information of the mechanical body sent by the servo driver; the servo driver is used for generating control parameters of each motor on the mechanical body according to the position data of each joint of the mechanical body, acquiring motion information of the mechanical body and sending the motion information to the motion controller.
In an embodiment of the present invention, the mobile terminal further includes a client, and the client is configured to send a control command to the motion controller and receive the motion information of the machine body sent by the motion controller.
In an embodiment of the present invention, the motion controller includes a path planning unit, an inverse kinematics unit, an interpolation smoothing unit, a network communication unit, and an SPI communication unit;
the network communication unit is used for realizing communication with the client through the Ethernet;
the path planning unit is used for planning the path of the machine body according to the control instruction;
the interpolation smoothing unit is used for smoothing the planned mechanical body path;
the inverse kinematics unit is used for converting the position information of the smoothed path of the mechanical body into position data of each joint of the mechanical body;
the SPI communication unit is used for realizing communication with the servo driver through an SPI bus.
In an embodiment of the present invention, the present invention further includes an image obtaining device, where the image obtaining device is configured to obtain a real-time environment image where the mechanical body is located, and send the real-time environment image to the motion controller;
the motion controller comprises an environment detection unit, a path planning unit, an inverse kinematics unit, an interpolation smoothing unit, a network communication unit and an SPI communication unit;
the environment detection unit is used for acquiring real-time environment information of the mechanical body according to the real-time environment image of the mechanical body;
the path planning unit is used for planning a path for the mechanical body according to the control instruction and the real-time environment information of the mechanical body;
the interpolation smoothing unit is used for smoothing the planned mechanical body path;
the inverse kinematics unit is used for converting the position information of the smoothed path of the mechanical body into position data of each joint of the mechanical body;
the network communication unit is used for realizing communication with the client through the Ethernet;
the SPI communication unit is used for realizing communication with the servo driver through an SPI bus.
In an embodiment of the present invention, the servo driver includes a motor position and speed control unit and an SPI communication unit;
the motor position and speed control unit is used for controlling the motion of each motor according to the control parameters of each motor on the mechanical body and acquiring the motion information of the mechanical body;
the SPI communication unit is used for realizing communication with the motion controller.
In an embodiment of the invention, the servo driver is connected to the motor on the machine body through an RS485 bus.
In an embodiment of the invention, the motion controller and the servo driver are integrated in a same system on chip.
Meanwhile, the invention also provides mechanical equipment which comprises a mechanical body and any one of the automatic control systems connected with the mechanical body, so that the mechanical body is controlled by the automatic control system.
In an embodiment of the invention, the mechanical body is a robot body.
Correspondingly, the invention also provides an automatic control method for realizing the automatic control of the mechanical body, which comprises the following steps:
receiving a control command sent by a client through a motion controller, generating position data of each joint of the mechanical body according to the control command, sending the position data to a servo driver, and receiving motion information of the mechanical body sent by the servo driver;
and generating control parameters of each motor on the mechanical body according to the position data of each joint of the mechanical body through the servo driver, and simultaneously acquiring the motion information of the mechanical body and sending the motion information to the motion controller.
In an embodiment of the present invention, the method further includes: sending a control command to the motion controller through a client, and receiving motion information of the mechanical body sent by the motion controller.
In an embodiment of the present invention, the motion controller performs the following operations:
communication with the client is realized through a network;
planning a path of the machine body according to the control instruction;
smoothing the planned machine body path;
converting the position information of the smoothed path of the mechanical body into position data of each joint of the mechanical body;
and the communication with the servo driver is realized through the SPI bus.
In an embodiment of the present invention, the method further includes acquiring a real-time environment image of the mechanical body by an image acquisition device, and sending the real-time environment image to the motion controller;
the motion controller performs the following operations;
acquiring real-time environment information of the mechanical body according to the real-time environment image of the mechanical body;
planning a path for the machine body according to the control instruction and the real-time environment information of the machine body;
smoothing the planned machine body path;
converting the position information of the smoothed path of the mechanical body into position data of each joint of the mechanical body;
communication with a client is realized through a network;
and the communication with the servo driver is realized through an SPI bus.
In an embodiment of the present invention, the servo driver performs the following operations:
controlling the motion of each motor according to the control parameters of each motor on the mechanical body, and acquiring the motion information of the mechanical body;
and the communication with the servo driver is realized through an SPI bus.
In an embodiment of the present invention, the servo driver and the motor on the machine body are connected through an RS485 bus.
In an embodiment of the invention, the motion controller and the servo driver are integrated in the same system on chip.
As described above, the automation control system, method and mechanical equipment of the present invention have the following advantages:
(1) The embedded programming realizes safe and high-speed automatic control, and has low cost and high operation precision;
(2) The automatic control system is divided into a user layer, a motion control layer and a servo drive layer, and all the layers are clearly and closely connected in a labor division manner; the protocol content between the motion control layer and the servo drive layer can be customized, and the maximum information volume can be transmitted with the minimum data volume so as to realize the maximum response time and faster running speed;
(3) The motion controller and the servo driver are integrated together, so that the driving and the controlling are integrated, software and hardware can be conveniently upgraded, and the device is easily and quickly adaptive to different mechanical bodies;
(4) The defects of the existing teaching programming are overcome, the automatic control can be intelligently performed in real time by combining with the external environment, and the operation in an optimal and safest mode is ensured;
(5) The six-axis synchronous motion and eight-axis independent control can be simultaneously supported, and the device has great flexibility and wide application range.
Detailed Description
The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict.
It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present invention, and the drawings only show the components related to the present invention rather than being drawn according to the number, shape and size of the components in actual implementation, and the type, amount and proportion of each component in actual implementation can be changed freely, and the layout of the components can be more complicated.
The automatic control system is used for realizing automatic control of a mechanical body and comprises a motion controller and a servo driver; the motion controller is used for receiving a control command sent by a client, generating position data of each joint of the mechanical body according to the control command, sending the position data to the servo driver and receiving motion information of the mechanical body sent by the servo driver; the servo driver is used for generating control parameters of each motor on the mechanical body according to the position data of each joint of the mechanical body, acquiring the motion information of the mechanical body and sending the motion information to the motion controller
Referring to fig. 1, an automation control system 1 of the present invention is used to implement automation control of a machine body, and includes a client 11, a motion controller 12, and a servo driver 13.
The client 11 is used for sending control commands to the motion controller and receiving the motion information of the machine body sent by the motion controller.
Specifically, the client 11 may send a single control instruction or may send a series of control instructions. The single control command is used for controlling the machine body to execute a single action, such as starting, stopping, pausing, resuming, left-turning, right-turning, forward-moving, backward-moving and the like. The series of control instructions are used for controlling the machine body to perform a series of operations, such as a pick-up operation, a rotation operation, and the like.
The motion information of the machine body includes motion state information and position data of each joint. Wherein the motion state information includes normal motion, abnormal motion, and the like.
The client 11 may send a control command by using a touch screen, a button, or the like, and display the received motion information fed back by the machine body and the simulated motion of the machine body through the display screen.
Preferably, the client 11 is an upper computer, that is, a computer capable of directly sending out the control command. The upper computer can be a demonstrator or an industrial personal computer. The teaching device is called teaching programmer, and is executed by an electronic system or a computer system. Industrial Personal Computer (IPC), is a general name for tools that use a bus structure to detect and control production processes, electromechanical devices, and process equipment. The industrial personal computer has important computer attributes and characteristics, such as a computer CPU, a hard disk, an internal memory, external equipment, an interface, an operating system, a control network, a protocol, computing power and a friendly human-computer interface. The product and technology of industrial control industry are very special, belong to the intermediate product, it is reliable, embedded, intelligent industrial computer to provide for other every trade.
In an embodiment of the present invention, the client 11 may generate the control command by offline programming. The languages available for the client comprise G codes, PYTHON language and C/C + + language. The client further comprises a simulation environment, the motion trail of the mechanical body can be simulated in an off-line mode according to requirements, the feasibility of motion is evaluated, and meanwhile the latest motion condition of the mechanical body can be simulated in real time according to the fed back position data of each joint of the mechanical body.
The motion controller 12 is configured to generate position data of each joint of the machine body according to the control command and send the position data to the servo driver 13, and receive motion information of the machine body sent by the servo driver 13 and send the motion information to the client.
The motion controller 12 is integrated into a system on a chip, and is configured to run a motion control program, so as to generate position data of each joint of the machine body according to a control command and send the position data to the servo driver 13, and receive motion information of the machine body sent by the servo driver 13 and send the motion information to the client.
The motion controller 12 communicates with the client via a network; the motion controller 12 and the servo controller 13 are connected by an SPI bus, and full-duplex data transmission is adopted.
The motion controller 12 is implemented by an embedded system. Specifically, the motion controller adopts a quad-core ARM architecture and a cortix A8 processor, the main frequency is 900mhz, the Linux operating system is operated, the motion controller can receive control instructions, data and the like sent by the client, and the position data of each corresponding joint is generated according to different control instructions. For those skilled in the art, it is possible to generate the position data of each corresponding joint according to the control command and the environmental information of the machine body, which is a relatively mature algorithm. The specific implementation of the algorithm is not the focus of the present invention, and therefore, is not described herein.
As shown in fig. 2, in a preferred embodiment of the present invention, the motion controller 12 includes a path planning unit 121, an interpolation smoothing unit 122, an inverse kinematics unit 123, a network communication unit 124, and an SPI communication unit 125.
The network communication unit 124 is used for communication with the client via ethernet. Specifically, the network communication unit 124 receives the control command sent by the client, and sends the motion information of the machine body to the client.
The path planning unit 121 is used to plan a path of the machine body. The path planning unit 121 may plan different paths according to different criteria, such as a shortest path, a gentlest path, a farthest path, and the like.
The interpolation smoothing unit 122 is configured to smooth the planned machine body path. The smoothed path avoids unnecessary violent rotation of the machine body. For those skilled in the art, the smooth path is a well-established prior art, and includes various algorithms, which are not described in detail herein.
The inverse kinematics unit 123 is configured to convert the position information of the smoothed machine body path into position data of each joint of the machine body. Inverse kinematics is the process of determining the parameters of an articulated movable object to be set to achieve a desired pose.
The SPI communication unit 125 is used to communicate with the servo driver through an SPI bus. Specifically, the SPI communication unit 125 sends control data of the machine body to the servo driver through the SPI bus, and receives motion information of the machine body sent by the servo controller.
Preferably, the motion controller 12 further includes an IO control unit, an error processing unit, and a test unit. The IO control unit is used for receiving the IO state and clearing or setting the IO. The error processing unit is used for receiving and reporting error information sent by the servo driver. The test unit is used for carrying out system test and debugging on the motion controller.
The servo driver 13 is used for generating control parameters of each motor on the machine body according to the position data of each joint of the machine body, acquiring motion information of the machine body and sending the motion information to the motion controller 12.
The servo driver 13 is integrated into an on-chip system, and is configured to run a servo driver, so as to generate control parameters of each motor on the machine body according to position data of each joint of the machine body, obtain motion information of the machine body, and send the motion information to the motion controller 12.
Specifically, the servo driver 13 is implemented by an embedded system. In a preferred embodiment of the invention, the FPGA is adopted to run NIOS and VERILOG, the SPI NIOS core receives position data of each joint and converts the position data into control parameters of each motor, and then the control parameters of each motor are distributed to six motor control NIOS cores through the Mailbox, so that the aim of six-axis synchronous control is fulfilled.
Wherein, the servo driver 13 is connected with the motor on the mechanical body through an RS485 bus.
As shown in fig. 3, in a preferred embodiment of the present invention, the servo driver 13 includes an SPI communication unit 131 and a motor position and speed control unit 132.
The SPI communication unit 131 is used to realize communication with the motion controller through the SPI bus. Specifically, the SPI communication unit receives control parameters of each motor on the machine body through the SPI bus, and sends motion information of the machine body to the motion controller.
The motor position and speed control unit 132 is configured to control the movement of each motor according to the control parameter of each motor on the machine body, and acquire movement information of the machine body. Specifically, the motor position and speed control unit controls the movement of each motor according to the control parameters of each motor on the machine body through an ENDAT2.2 protocol, and obtains the movement information of the machine body.
Preferably, the servo driver 13 further includes a power saving unit, an error detection unit, and a hardware test unit. The energy-saving unit is used for adjusting power output according to each detected state of the motor driving plate of the mechanical body. The error detection unit is used for detecting error information of the servo driver. The hardware testing unit is used for testing and debugging the hardware of the servo driver.
Preferably, as shown in fig. 4, the automatic control system of the present invention further includes an image capturing device 14, where the image capturing device 14 is configured to capture a real-time environment image of the machine body and send the real-time environment image to the motion controller. The image acquisition device adopts a camera.
The image acquiring device 14 may be provided on the machine body, or may be provided at any position where an image of the environment where the machine body is located can be acquired. The image capture device 14 may be connected directly to the motion controller 12 or may be connected by wireless communication.
Correspondingly, the motion controller 12 further includes an environment detection unit, and the environment detection unit is configured to obtain real-time environment information of the machine body according to the real-time environment image of the machine body.
The path planning unit is used for planning a path for the mechanical body according to the real-time environment information where the mechanical body is located. For example, when the path planning unit plans the path, if the real-time environment information indicates that an obstacle exists in front of the path, the path is re-planned.
Preferably, in the automatic control system of the present invention, the motion controller 12 and the servo driver 13 are integrated into the same system on chip.
Referring to fig. 5, the mechanical equipment of the present invention includes a mechanical body 2, and the above-mentioned automatic control system 1 connected to the mechanical body to realize automatic control of the mechanical body through the automatic control system.
Referring to fig. 6, the automated control method of the present invention is used for realizing automated control of a machine body, and comprises the following steps:
and S1, sending a control command to the motion controller through the client, and receiving the motion information of the mechanical body sent by the motion controller.
Specifically, the client may send a single control command or may send a series of control commands. The single control command is used for controlling the machine body to execute a single action, such as starting, stopping, pausing, recovering, left-turning, right-turning, forward moving, backward moving and the like. The series of control instructions are used for controlling the machine body to perform a series of operations, such as a pick-up operation, a rotation operation, and the like.
The motion information of the machine body includes motion state information and position data of each joint. The motion state information includes normal motion, abnormal motion, and the like.
The client can adopt a touch screen, a button and the like to send a control instruction, display received motion information fed back by the mechanical body through the display screen, and display the simulated motion of the mechanical body.
Preferably, the client side adopts an upper computer, namely a computer capable of directly sending out the control command. The upper computer can be a demonstrator or an industrial personal computer. The teaching device is called teaching programmer, and is executed by an electronic system or a computer system. Industrial Personal Computer (IPC), is a general name for tools that use a bus structure to detect and control production processes, electromechanical devices, and process equipment. The industrial personal computer has important computer attributes and characteristics, such as a computer CPU, a hard disk, an internal memory, external equipment, an interface, an operating system, a control network, a protocol, computing power and a friendly human-computer interface. The product and technology of industrial control industry are very special, belong to the intermediate product, it is reliable, embedded, intelligent industrial computer to provide for other every trade.
In an embodiment of the invention, the client may generate the control instruction by offline programming. The languages available for the client comprise G codes, PYTHON language and C/C + + language. The client further comprises a simulation environment, the motion track of the mechanical body can be simulated in an off-line mode according to requirements, the feasibility of motion is evaluated, and meanwhile the latest motion situation of the mechanical body can be simulated in real time according to the fed back position data of each joint of the mechanical body.
And S2, generating position data of each joint of the mechanical body according to the control command through the motion controller, sending the position data to the servo driver, receiving the motion information of the mechanical body sent by the servo driver, and sending the motion information to the client.
The motion controller is integrated in a system on a chip and used for running a motion control program so as to generate position data of each joint of the mechanical body according to the control command and send the position data to the servo driver, and receive motion information of the mechanical body sent by the servo driver and send the motion information to the client.
The motion controller and the client realize communication through a network; the motion controller is connected with the servo controller through an SPI bus, and full-duplex data transmission is adopted.
The motion controller is implemented by an embedded system. Specifically, the motion controller adopts a quad-core ARM architecture, a cortix A8 processor, a Linux operating system is operated with a main frequency of 900MHz, and can receive control instructions, data and the like sent by the client and generate corresponding position data of each joint according to different control instructions. For those skilled in the art, it is possible to generate the position data of each corresponding joint according to the control command and the environmental information of the machine body, which is a relatively mature algorithm. The specific implementation of the algorithm is not the focus of the present invention, and therefore, is not described herein.
In a preferred embodiment of the present invention, the motion controller performs the following operations:
1) And communication with the client is realized through the network.
Specifically, a control instruction sent by the client is received through the network, and the motion information of the mechanical body is sent to the client.
2) And planning the path of the machine body.
The path planning unit can plan different paths according to different standards, such as the shortest path, the most gentle path, the farthest path, and the like.
3) Smoothing the planned machine body path.
The smoothed path avoids unnecessary violent rotation of the machine body. For those skilled in the art, the smooth path is a well-established prior art, including various algorithms, and will not be described herein.
4) And converting the position information of the smoothed path of the machine body into position data of each joint of the machine body.
Inverse kinematics is the process of determining the parameters of an articulating movable object to be set to achieve a desired pose.
5) And the communication with the servo driver is realized through an SPI bus.
Specifically, the control data of the machine body is sent to the servo driver through the SPI bus, and the motion information of the machine body sent by the servo controller is received.
Preferably, the motion controller further comprises detecting error information of the motion controller, performing system test and debugging on the motion controller, receiving an IO state, and clearing or setting an IO.
And S3, generating control parameters of each motor on the mechanical body through the servo driver according to the position data of each joint of the mechanical body, and simultaneously acquiring the motion information of the mechanical body and sending the motion information to the motion controller.
The servo driver is integrated in an on-chip system and used for operating a servo driving program so as to generate control parameters of each motor on the mechanical body according to position data of each joint of the mechanical body, acquire motion information of the mechanical body and send the motion information to the motion controller.
In particular, the servo driver is implemented by an embedded system. In a preferred embodiment of the invention, the FPGA is adopted to run NIOS and VERILOG, the SPI NIOS core receives position data of each joint and converts the position data into control parameters of each motor, and then the control parameters of each motor are distributed to six motor control NIOS cores through the Mailbox, so that the aim of six-axis synchronous control is fulfilled.
Wherein, the servo driver is connected with the motor on the mechanical body through an RS485 bus.
In a preferred embodiment of the present invention, the servo driver performs the following operations:
1) And controlling the motion of each motor according to the control parameters of each motor on the mechanical body, and acquiring the motion information of the mechanical body.
Specifically, the movement of each motor is controlled according to the control parameters of each motor on the machine body through an ENDAT2.2 protocol, and the movement information of the machine body is obtained.
2) The communication with the motion controller is realized through an SPI bus.
Specifically, control parameters of each motor on the mechanical body are received through the SPI bus, and motion information of the mechanical body is sent to the motion controller.
Preferably, the servo driver is further capable of adjusting an energy saving effect of power output, detecting error information of the servo driver, and testing and debugging hardware of the servo driver according to the detected respective states of the motor driving board of the machine body.
Preferably, the automatic control method of the present invention further includes acquiring a real-time environment image of the machine body by the image acquisition device, and sending the real-time environment image to the motion controller. The image acquisition device adopts a camera.
The image acquisition device can be arranged on the machine body, and can also be arranged at any position where the environment image of the machine body can be acquired. The image acquisition device can be directly connected with the motion controller or can be connected in a wireless communication mode.
Accordingly, the motion controller further comprises: acquiring real-time environment information of the mechanical body according to the real-time environment image of the mechanical body; and planning a path for the machine body according to the real-time environment information of the machine body. For example, when the path planning unit plans the path, if the real-time environment information indicates that an obstacle exists in front of the path, the path is re-planned.
Preferably, in the automated control method of the present invention, the motion controller and the servo driver are integrated in the same system on chip.
In conclusion, the automatic control system, the automatic control method and the mechanical equipment realize safe and high-speed automatic control through embedded programming, and have low cost and high operation precision; the automatic control system is divided into a user layer, a motion control layer and a servo drive layer, and all the layers are clearly and closely connected in a labor division manner; the protocol content between the motion control layer and the servo drive layer can be customized, and the maximum information volume can be transmitted with the minimum data volume so as to realize the maximum response time and faster running speed; the motion controller and the servo driver are integrated together to realize driving and controlling integration, so that software and hardware can be upgraded conveniently, and the device is suitable for different mechanical bodies quickly; the defects of the existing teaching programming are overcome, the automatic control can be intelligently performed in real time by combining with the external environment, and the operation in an optimal and safest mode is ensured; the device can simultaneously support six-axis synchronous motion and eight-axis independent control, and has great flexibility and wider application range. Therefore, the invention effectively overcomes various defects in the prior art and has high industrial utilization value.
The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or change the above-mentioned embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical spirit of the present invention be covered by the claims of the present invention.