CN113759806A - Writing robot control system - Google Patents

Writing robot control system Download PDF

Info

Publication number
CN113759806A
CN113759806A CN202111143592.9A CN202111143592A CN113759806A CN 113759806 A CN113759806 A CN 113759806A CN 202111143592 A CN202111143592 A CN 202111143592A CN 113759806 A CN113759806 A CN 113759806A
Authority
CN
China
Prior art keywords
input
module
matrix
writing
control
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.)
Granted
Application number
CN202111143592.9A
Other languages
Chinese (zh)
Other versions
CN113759806B (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.)
Guangxi Science and Technology Normal University
Original Assignee
Guangxi Science and Technology Normal 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 Guangxi Science and Technology Normal University filed Critical Guangxi Science and Technology Normal University
Priority to CN202111143592.9A priority Critical patent/CN113759806B/en
Publication of CN113759806A publication Critical patent/CN113759806A/en
Application granted granted Critical
Publication of CN113759806B publication Critical patent/CN113759806B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0423Input/output
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/21Pc I-O input output
    • G05B2219/21119Circuit for signal adaption, voltage level shift, filter noise
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Input From Keyboards Or The Like (AREA)
  • Numerical Control (AREA)

Abstract

The invention discloses a writing robot control system, comprising: the hardware control module is used for controlling the hardware of the writing robot; the software control module is used for controlling the writing robot software; and the control algorithm module is used for controlling the writing robot algorithm. The writing robot control system has multiple input functions, and Chinese characters can be input through an input method; the input can be finished by writing or drawing with a mouse in a writing area of a PC end software interface; the input can be completed by writing and drawing through the external writing board.

Description

Writing robot control system
Technical Field
The invention relates to a robot technology, in particular to a writing robot control system.
Background
The stability of the current writing robot control system needs to be further improved, and the writing rule is not perfect.
Disclosure of Invention
The invention mainly aims to provide a writing robot control system.
The technical scheme adopted by the invention is as follows: a writing robot control system comprising:
the hardware control module is used for controlling the hardware of the writing robot;
the software control module is used for controlling the writing robot software;
and the control algorithm module is used for controlling the writing robot algorithm.
Further, the hardware control module comprises:
the control mechanism adopts an Yingfei XMC4500 permanent magnet synchronous motor controller, and XMC4500 micro-control
The device consists of an upper control panel and a lower power panel; the control panel is composed of an XMC4500 main control chip and peripheral auxiliary circuits, the power panel is connected with the control panel through a power signal interface, the control panel comprises a power input module, an auxiliary power generation module, a motor drive module and a current sampling module, and the control panel has the functions of alarming and protecting overvoltage, undervoltage and overcurrent;
the actuating mechanism comprises a permanent magnet synchronous motor and an angle steering engine;
the number of the permanent magnet synchronous motors is two, the two permanent magnet synchronous motors respectively control an X axis and a Y axis, and the two motors are matched with each other to complete a task in the operation process of the system;
the angle steering engine is used for controlling the pen to lift up and fall down;
and the communication circuit is used for realizing the communication between the upper computer and the lower computer.
Furthermore, the software control module comprises a writing scheme module, an upper computer module and a lower computer module;
the write word scheme module includes:
the Chinese character stroke mode design unit is used for realizing an input mode by combining a handwriting board according to strokes;
a character model design unit is used for completing a writing task by a method of recognizing binary dot matrixes, the dot matrix of a Chinese character is a 36 multiplied by 36 matrix, the distance of each dot is 1mm, and the width of a pen point is also the width of the pen point;
the character and picture mode design unit is used for converting characters to be written by a user into a picture format, then binarizing the picture to obtain a binary matrix of the whole picture, then sending the matrix to a lower computer for processing, and scanning the following motor control strategy line by line as in the first mode;
the machine platform design module comprises:
the parameter setting unit is used for selecting correct serial ports, baud rates and data bits;
the control panel unit is used for setting the motor reset rotating speed, manually controlling the motor and controlling the real-time rotating speed of the motor;
the analysis panel unit is used for carrying out operation of taking the character matrix, then analyzing the character matrix to generate a binary lattice, and finally sending the binary lattice to the lower computer; the method mainly realizes the analysis of the word to be written, generates data identified by a lower computer and sends the data to the lower computer;
the user input unit is used for Chinese character input, picture input and writing board input, and the three input modes are all processing of characters and pictures;
the lower computer module is used for mainly completing the configuration of each register, the initialization of peripheral equipment, the configuration of a system clock, the overcurrent detection of current, the initialization of motor parameters and the initialization of system parameters;
the functional sub-module can realize coordinate transformation, SVPWM generation, position detection and speed calculation;
the interrupt program is triggered by a timer, and the motor is controlled by the timer in the main interrupt program;
the serial port interrupt program realizes the independent motion of the motor and the action of the steering engine by processing the instruction of the upper computer.
Furthermore, the control algorithm module comprises an initialization population and a selection variation probability;
initializing a population for determining an operation space of an algorithm;
selecting variation probability for optimizing the individual in the space;
initializing the population includes:
the size of the population set in the algorithm is 30, then a group of random numbers A generated by a Monte Carlo sequence is a 30 x 1 matrix, in order to realize the extension of dimension, firstly, the matrix A is transposed, then the matrix A is multiplied by the transposed matrix A', and a 30 x 30 matrix B can be obtained as the formula (4-6), and the matrix B is the initialized population;
Figure RE-DEST_PATH_IMAGE001
(4-6)
selecting the variation probability comprises:
dividing the individuals with all fitness into three parts according to the height by adopting a sectional processing mode, and then selecting a variation probability for each part to perform variation operation; this approach will preserve the good individuals in the population to a large extent and may also yield better individuals; the formula of the variation probability segmentation selection is as shown in formula (4-7):
Figure RE-DEST_PATH_IMAGE002
(4-7)
in the formula: pm1 = 0.6, pm2 = 0.05, pm3 = 0.001, Bestfi is the fitness value of the individual with the best fitness in the population, fi is the fitness value of the individual to be mutated, and f31 and f32 are the fitness values of individuals whose fitness values are ranked from high to low at 1/3 and 2/3, respectively.
The invention has the advantages that:
the writing robot control system has multiple input functions, and Chinese characters can be input through an input method; the input can be finished by writing or drawing with a mouse in a writing area of a PC end software interface; the input can be completed by writing and drawing through the external writing board. The control software at the PC end can convert the input Chinese characters or pictures into '0' and '1' codes and transmit the codes to the lower computer, and finally writing of the Chinese characters is finished. The lower computer realizes Chinese character writing in two ways: one is writing by line scanning with reference to a printer; and the other method is to finish the writing of the Chinese characters according to the stroke order according to the set stroke rules.
In addition to the objects, features and advantages described above, other objects, features and advantages of the present invention are also provided. The present invention will be described in further detail below with reference to the drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the invention and, together with the description, serve to explain the invention and not to limit the invention.
FIG. 1 is a block diagram of the controller architecture of the present invention;
FIG. 2 is a system hardware interface diagram of the present invention;
FIG. 3 is a control flow diagram of the present invention;
FIG. 4 is a tablet input diagram of the present invention;
FIG. 5 is a drawing of a typeface interface of the present invention;
fig. 6 is a flow chart of a main routine of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1 to 6, a writing robot control system includes:
the hardware control module is used for controlling the hardware of the writing robot;
the software control module is used for controlling the writing robot software;
and the control algorithm module is used for controlling the writing robot algorithm.
The writing robot control system has multiple input functions, and Chinese characters can be input through an input method; the input can be finished by writing or drawing with a mouse in a writing area of a PC end software interface; the input can be completed by writing and drawing through the external writing board. The control software at the PC end can convert the input Chinese characters or pictures into '0' and '1' codes and transmit the codes to the lower computer, and finally writing of the Chinese characters is finished. The lower computer realizes Chinese character writing in two ways: one is writing by line scanning with reference to a printer; and the other method is to finish the writing of the Chinese characters according to the stroke order according to the set stroke rules.
The hardware control module comprises:
the control mechanism adopts an Yingfeing XMC4500 permanent magnet synchronous motor controller, and the XMC4500 microcontroller consists of an upper control panel and a lower power panel; the control panel is composed of an XMC4500 main control chip and peripheral auxiliary circuits, the power panel is connected with the control panel through a power signal interface, the control panel comprises a power input module, an auxiliary power generation module, a motor drive module and a current sampling module, and the control panel has the functions of alarming and protecting overvoltage, undervoltage and overcurrent; the structural block diagram of the controller is shown in fig. 1.
The actuating mechanism comprises a permanent magnet synchronous motor and an angle steering engine;
the number of the permanent magnet synchronous motors is two, the two permanent magnet synchronous motors respectively control an X axis and a Y axis, and the two motors are matched with each other to complete a task in the operation process of the system;
as an important actuating mechanism of the whole system, the running stability of the permanent magnet synchronous motor is the key for the whole system to complete tasks. The two permanent magnet synchronous motors respectively control the X axis and the Y axis, and in the operation process of the system, the two motors are matched with each other to complete a task. The permanent magnet synchronous motor is connected with a value controller through two wires, one is a power wire, and the other is a coding wire. The power line is connected with the power board of the controller and mainly transmits the output of the power board to the motor; the coding line is connected with the control board and mainly realizes the signal transmission between the control board and the motor. When the motor receives the pulse signal sent by the control board, the motor has a response motion state. If the pulse signal is continuous, the motor can rotate all the time, and the rotating speed of the motor can be different according to different pulse signals; if the pulse signal is single, the motor can rotate by different angles according to different pulse signals. Tests show that the motor used in the design has the minimum running distance of 1mm when receiving a single pulse.
The angle steering engine is used for controlling the pen to lift up and fall down;
and the communication circuit is used for realizing the communication between the upper computer and the lower computer.
In a hardware structure, two controllers are mutually independent, and one controller provides one controller, so that the communication of two sets of equipment needs to be realized by externally connecting a communication circuit. When a communication circuit is designed, only two MAX232 chips are selected, and tests show that the load capacity of the XMC4500 control board serving as the receiving end of the U1C0 serial port is insufficient, so that the single chip microcomputer cannot normally identify a low level, and the output waveform is always near the high level, which causes that normal data is not received.
Therefore, level conversion is firstly carried out through MAX232, output and input levels are ensured to be higher than +5v and lower than 0v, and therefore chip pins are prevented from being burnt out. By improvement, an SN75179BD (differential driver and receiver) is added, so that the output level outputs a logic level '0' or '1' through comparison, and normal transmission of data is guaranteed. And finally, grounding the 10 th pin and the 2 nd pin through an SN74LV245A chip according to a logic function table of the chip, and connecting DIR to +3.3v, so that the signal output is only output from the A end to the B end. With the SN74LV245A chip, it is also ensured that the output level is in the range between 0-3.3v, which the control board can accept. By connecting the two MAX232 boards correspondingly and connecting the communication circuit with the two control boards in common, normal communication can be completed. The motion controller can implement 2-axis closed-loop control. The timer can realize variable pulse output, and the signals for driving the servo are 3, namely direction + pulse signals, two-way pulse signals with a 90-degree difference and one-way pulse signals. The motion controller can implement the above-mentioned 3 pulse driving modes. The single-axis signals comprise servo driving signals, servo enabling signals, braking signals and return-to-zero signals. The system hardware interface is schematically shown in fig. 2.
The motion controller has a perfect control function. RS232 is used for realizing the communication of the upper computer and the lower computer, and the mutual transmission of data between the two boards is realized through a circuit of UART-to-RS 422. The two plates respectively realize the running and the stopping of the motor according to the received instructions.
The software control module comprises a writing scheme module, an upper computer module and a lower computer module;
for convenience of writing the program, a 36 × 36 matrix is used for storing each Chinese character. After the hardware system is built, the maximum stroke of the designed system X axis is 23cm, the maximum stroke of the designed system Y axis is 21cm, the diameter of one point is 1mm, and the size of one Chinese character is 25mm multiplied by 25 mm.
The write word scheme module includes:
the Chinese character stroke mode design unit is used for realizing an input mode by combining a handwriting board according to strokes;
the design realized according to the strokes mainly comprises two works, one is that the storage of the strokes, such as the Chinese character of 'Tian', after the first stroke 'horizontal' is written, the data can be stored in a buffer area, the time is delayed by 1ms, the buffer area is interrupted to call the data in the buffer area, then the buffer area is emptied, and the data of the next stroke is continuously stored until the storage of all the strokes is finished; secondly, only three coordinate points are extracted when the points are taken, the written characters have great distortion, and in order to process data conveniently, the design does not extract too many coordinate points.
A character model design unit is used for completing a writing task by a method of recognizing binary dot matrixes, the dot matrix of a Chinese character is a 36 multiplied by 36 matrix, the distance of each dot is 1mm, and the width of a pen point is also the width of the pen point;
in the system, one motor drives X-axis scanning, one motor drives Y-axis scanning, and a steering engine Z drives the writing pen to move up and down. The writing task is completed by a method of recognizing binary dot matrix, the dot matrix of a Chinese character is a 36 multiplied by 36 matrix, and the distance of each dot is 1mm, namely the width of a pen point. The main process is as follows: calling a character matrix library in the upper computer to generate character matrixes of written characters, analyzing to generate binary dot matrixes, sending the dot matrixes to the lower computer, and after the dot matrixes sent by the upper computer are identified, controlling an X-axis to scan a line in a line-by-line scanning mode, wherein when a point on the dot matrix is 0, a steering engine of a Z-axis rotates downwards for a certain angle, so that a writing pen falls down, and the writing of the point is completed; after scanning one line, the next line is scanned, and after the X-axis completes scanning one line, the Y-axis moves 1mm to the next line, and then the X-axis scans one line … … repeatedly until completing writing one word, and the control flow chart is as shown in fig. 3. The control mode is relatively simple, only can realize the input of a single character, and is easy to realize, but because the MATLAB is troublesome to process the character matrix, third-party software needs to be called to fetch the character matrix, so that the operation steps of a user are more, and the mode is mainly used in the debugging process.
The character and picture mode design unit is used for converting characters to be written by a user into a picture format, then binarizing the picture to obtain a binary matrix of the whole picture, then sending the matrix to a lower computer for processing, and scanning the following motor control strategy line by line as in the first mode;
the method comprises the steps of firstly converting characters to be written by a user into a picture format, then binarizing the picture to obtain a binary matrix of the whole picture, then sending the matrix to a lower computer for processing, and scanning the next motor control strategy line by line as in the first method. The mode is mainly simplified in the aspect of user input, the user only needs to input characters needing to be written, and the mode supports the input of multiple characters, and the user can select a single-color picture as input on a human-computer interface due to the mode of processing the picture. The user input in the mode is flexible, the user operation is simple, and only the characters need to be input and the click sending is needed or the pictures need to be selected and the click sending is needed.
The user can also connect with the computer through the writing board, the writing board outputs a single-color picture, handwriting or drawing is performed on the writing board, written characters or the drawn picture can be displayed in real time in the upper computer and can be used as the input of the system. As shown in fig. 4, (a) is a real image of a tablet, which is connected to a computer through a data line, and can be input in a panel of the tablet of an upper computer, (b) is a character which is input by the tablet and received by the upper computer, (b) is a picture which is obtained in the picture and has a large size, and is not beneficial to being converted into data storage and data transmission, so that the picture needs to be compressed, and (c) is a processed picture. For convenience of data transmission, all the picture sizes in the text picture mode are processed into 36 × 36 dot matrixes, which is also beneficial to receiving data with uniform size with a lower computer and is convenient to process.
The machine platform design module comprises:
the parameter setting unit is used for selecting correct serial ports, baud rates and data bits;
the control panel unit is used for setting the motor reset rotating speed, manually controlling the motor and controlling the real-time rotating speed of the motor;
the analysis panel unit is used for carrying out operation of taking the character matrix, then analyzing the character matrix to generate a binary lattice, and finally sending the binary lattice to the lower computer; the method mainly realizes the analysis of the word to be written, generates data identified by a lower computer and sends the data to the lower computer;
the user input unit is used for Chinese character input, picture input and writing board input, and the three input modes are all processing of characters and pictures;
1) parameter setting
In the design, the communication between the computer and the writing robot is realized by using a serial port, so that the communication between an upper computer and a lower computer needs to be ensured when the operation is started, and correct serial ports, baud rates, data bits and the like need to be selected. The baud rate of the lower computer receiving signals is 19200, so the default value of the baud rate option is 19200 in the design process, if the baud rate of the lower computer changes, the baud rate option can be modified in a pull-down menu, common baud values (300600120024004800960038400430005600057600115200) are available, and other default settings are available.
2) Control panel
The control panel is mainly provided with a button connected with a serial port, a button for setting the reset rotating speed of the motor, a button for manually controlling the motor, display of the real-time rotating speed of the motor and the like. The button for opening the serial port is a main switch for connecting the upper computer and the lower computer, the color of the initial state is yellow, and the color can be changed into green when the button is pressed down. The < set reset rotation speed > button is a rotation speed at which the manual zero point can be set, and is set in a display field behind it. And the < motor rotating speed > is a rotating speed display column fed back by the lower computer. < X start > and < X stop > control the start and stop of the X-axis motor, and < Y start > and < Y stop > control the start and stop of the Y-axis motor. The < pen tip action > button is a button that can manually control the raising and lowering of the pen. The < start > button is a button for starting the motor. The < pause > button can pause the action of the motor. The < Y + > button is a counterclockwise control button for the Y-axis motor. The < Y- > button is a clockwise control button for the Y-axis motor. The < X + > button is a counterclockwise control button for the X-axis motor. The < X- > button is the clockwise control button for the X-axis motor. In this block, the manual control of the motor and the zero-return operation are mainly realized.
3) Analytic panel
The analysis panel comprises the operation of taking the character matrix, then the character matrix is analyzed to generate a binary lattice, and finally the binary lattice is sent to the lower computer. And clicking the button pops up the interface of fig. 5, wherein the character pattern of the Chinese character can be obtained and then copied to the < character pattern > display column of the upper computer, and clicking the < binary dot matrix > button can resolve the character pattern into a binary dot matrix and display the binary dot matrix in a blank display column beside the button. And a < send dot matrix > button is clicked, and the analyzed binary dot matrix can be sent to the lower computer. The control panel mainly realizes the analysis of the written words, generates data identified by the lower computer and sends the data to the lower computer.
4) User input
The user input panel comprises Chinese character input, picture input and writing board input, and the three input modes are all processing of characters and pictures.
In the Chinese character input panel, a user can input characters in a character input field, click the < confirm input > after the input is finished, the input characters are binarized and stored in a program buffer area, and then click the < send > button in the panel, and binarized information is sent to a lower computer in a matrix form.
In the picture input panel, a user can select a picture through a button of < select picture >, the path of the picture is displayed in a display column, so that the user can inquire whether the selected picture is correct or not, the upper computer can automatically binarize the picture and store the binarized picture in a buffer area, and the user can send the binarized matrix to the lower computer by clicking the button of < send > in the panel.
In the tablet input panel, a user can hand-write characters or pictures in a connected tablet, if the written or drawn characters or pictures are not satisfied, the user can click a < clear tablet > button and then input again, if the written or drawn characters or pictures are satisfied, the input of the user can be saved by clicking a < save pattern > button, and when the user clicks the < send > button, the saved pictures can be sent to a lower computer in a binary matrix mode. When the user input confirms that the writing is finished, the lower computer controls the executing mechanism to finish the writing task by clicking the < start > button of the control panel.
The lower computer module is used for mainly completing the configuration of each register, the initialization of peripheral equipment, the configuration of a system clock, the overcurrent detection of current, the initialization of motor parameters and the initialization of system parameters;
the functional sub-module can realize coordinate transformation, SVPWM generation, position detection and speed calculation;
the interrupt program is triggered by a timer, and the motor is controlled by the timer in the main interrupt program;
the serial port interrupt program realizes the independent motion of the motor and the action of the steering engine by processing the instruction of the upper computer. The main program flow chart is shown in fig. 6.
Furthermore, the control algorithm module comprises an initialization population and a selection variation probability;
initializing a population for determining an operation space of an algorithm;
selecting variation probability for optimizing the individual in the space;
initializing the population includes:
the size of the population set in the algorithm is 30, then a group of random numbers A generated by a Monte Carlo sequence is a 30 x 1 matrix, in order to realize the extension of dimension, firstly, the matrix A is transposed, then the matrix A is multiplied by the transposed matrix A', and a 30 x 30 matrix B can be obtained as the formula (4-6), and the matrix B is the initialized population;
Figure RE-DEST_PATH_IMAGE003
(4-6)
selecting the variation probability comprises:
dividing the individuals with all fitness into three parts according to the height by adopting a sectional processing mode, and then selecting a variation probability for each part to perform variation operation; this approach will preserve the good individuals in the population to a large extent and may also yield better individuals; the formula of the variation probability segmentation selection is as shown in formula (4-7):
Figure RE-DEST_PATH_IMAGE004
(4-7)
in the formula: pm1 = 0.6, pm2 = 0.05, pm3 = 0.001, Bestfi is the fitness value of the individual with the best fitness in the population, fi is the fitness value of the individual to be mutated, and f31 and f32 are the fitness values of individuals whose fitness values are ranked from high to low at 1/3 and 2/3, respectively.
Design and analysis of writing experiments:
host computer platform testing
And (4) debugging the functions of all modules contained in the upper computer by aiming at the designed upper computer, and checking whether the designed functions can be realized.
(1) Communication between upper computer and lower computer
Firstly, ensuring that a lower computer is connected to a PC through a serial port line, then entering the upper computer, selecting a correct serial port number in a parameter setting panel, clicking a button < open the serial port >, inputting a reset rotating speed in a blank column on the right of the button < set reset rotating speed >, and clicking the button < set reset rotating speed >.
The communication between the upper computer and the lower computer is the first step of realizing control and is the most important step, and the subsequent transmission of all information is established on the basis of successful communication. There are several processing modes for characters and pictures in the upper computer, and then the characters and the pictures are debugged one by one, and the output result is observed by the serial assistant software.
(2) Chinese character stroke input
In the Chinese character stroke input mode, a user can write any stroke in the stroke input range. By storing the strokes in a picture of the range and storing the strokes in a 36 x 36 lattice. Then, coordinate values of a starting point, a middle point and an end point of each stroke are taken out. In the display column of the stroke coordinates, there are 12 bits of data, the first 6 bits are the X-axis coordinate values of the starting point, the middle point and the end point respectively, and the last six bits are the Y-axis coordinate values.
(3) Matrix parsing
The method is characterized in that the character matrix of the character is analyzed, a binary matrix is displayed, decimal character matrix data are obtained by calling external software, then conversion and display are achieved in an upper computer, the operation process is complex, only a single Chinese character can be input each time, input of a user is not facilitated, the method displays the conversion process of the Chinese character in real time, and the method is suitable for debugging.
(4) Chinese character input module
In the input module, the user can input one or more characters, and the input of one or two characters is taken as an example in the debugging process. Inputting a word, using tables to simulate output, and writing
And comparing the writing effect of the robot.
Compared with the mode of inputting characters, the mode of inputting characters has certain improvement, which is mainly embodied in the process of inputting the number and operation of Chinese characters, and the output of the mode of inputting characters can be called by the mode of inputting pictures.
(5) Picture input module
The picture input module is a flexible input mode, can select any picture as input, and has the effect of processing complex pictures in the upper computer due to insufficient capability of processing the pictures at present
Not good, so it is better to select a monochrome picture.
In the input mode, the output of other modes can be called as input, in the input modes of Chinese characters and writing boards, after the input characters or pictures are processed, the processing result is stored in the form of pictures, and the stored pictures can be called as input. The operation of the mode of selecting the picture is simple, and compared with a Chinese character input mode, the mode not only can input Chinese characters, but also can input the picture.
(6) Tablet input module
In the input mode, a user can draw pictures or write in a tablet module of the upper computer according to own ideas, can directly operate by using a mouse, and can also operate by using an external tablet.
The input mode is more flexible than the above input modes, and the user designs a pattern as an input. The corresponding dot-matrix diagram can be generated only by arbitrarily scribbling in the writing area by the user. The mode is also a maximum bright point of the design scheme, and standard characters or characters and pictures are not input. However, the generation of the dot matrix by the tablet input method is a result of compressing the picture by MATLAB programming, and therefore, the larger the picture compression program is, the lower the effect of the corresponding generated dot matrix is.
And (3) testing a lower computer platform:
under the condition that motors of an X axis and a Y axis are started, the motors are sequentially pressed once Y +, twice X +, once Y-, twice X-, manually controlled and output, and the shapes of the lines are basically the same.
Results and analysis of the experiments
The system mainly performs experiments according to a writing implementation mode, and firstly, the system is a Chinese character stroke input implementation mode, an actual output result and a simulated output result, wherein the simulated output is a direct storage result of a handwriting board, and the actual output is a result realized by a lower computer of the system.
As can be seen from the input result of the Chinese character stroke input, for the input according to the Chinese character strokes on the upper computer, the writing robot can write corresponding fonts according to the corresponding strokes, but for the left-falling strokes and the right-falling strokes, the design of the control strategy mode is not perfect, so that the Chinese character strokes are not obtained
The desired font stroke radians.
Through experiments, the writing robot can be verified to basically finish the writing of four-stroke Chinese characters, and the main problems exist in the view of effects: the method has the advantages that firstly, the problem of hardware results can cause Chinese characters to be skewed, secondly, errors occur when the lower computer identifies point positions, and secondly, the lower computer processes the X, Y shaft motor.
From the output result, distortion occurs, and this problem is also caused by insufficient accuracy of picture compression.
According to the experimental results, the writing robot can basically complete the designed task, the time required by writing a Chinese character in the Chinese character stroke mode is far shorter, and the Chinese character stroke mode is a line-by-line scanning mode.
From the experimental result, the upper computer can basically realize the designed functions, the improvement of the genetic algorithm can also obtain obvious optimization effect, the control of the lower computer can also be basically realized, and the actual output result of the experiment can also be basically completed. The robot control system can basically achieve the goal-entering education effect of the robot, but needs to be improved, and output results are continuously optimized through subsequent learning and research.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (4)

1. A writing robot control system, comprising: the hardware control module is used for controlling the hardware of the writing robot; the software control module is used for controlling the writing robot software; and the control algorithm module is used for controlling the writing robot algorithm.
2. The tablet robot control system of claim 1, wherein the hardware control module comprises: the control mechanism adopts an Yingfeing XMC4500 permanent magnet synchronous motor controller, and the XMC4500 microcontroller consists of an upper control panel and a lower power panel; the control panel is composed of an XMC4500 main control chip and peripheral auxiliary circuits, the power panel is connected with the control panel through a power signal interface, the control panel comprises a power input module, an auxiliary power generation module, a motor drive module and a current sampling module, and the control panel has the functions of alarming and protecting overvoltage, undervoltage and overcurrent; the actuating mechanism comprises a permanent magnet synchronous motor and an angle steering engine; the number of the permanent magnet synchronous motors is two, the two permanent magnet synchronous motors respectively control an X axis and a Y axis, and the two motors are matched with each other to complete a task in the operation process of the system; the angle steering engine is used for controlling the pen to lift up and fall down; and the communication circuit is used for realizing the communication between the upper computer and the lower computer.
3. The tablet robot control system of claim 1, wherein the software control modules include a writing scheme module, an upper computer module, a lower computer module; the write word scheme module includes: the Chinese character stroke mode design unit is used for realizing an input mode by combining a handwriting board according to strokes; a character model design unit is used for completing a writing task by a method of recognizing binary dot matrixes, the dot matrix of a Chinese character is a 36 multiplied by 36 matrix, the distance of each dot is 1mm, and the width of a pen point is also the width of the pen point; the character and picture mode design unit is used for converting characters to be written by a user into a picture format, then binarizing the picture to obtain a binary matrix of the whole picture, then sending the matrix to a lower computer for processing, and scanning the following motor control strategy line by line as in the first mode; the machine platform design module comprises: the parameter setting unit is used for selecting correct serial ports, baud rates and data bits; the control panel unit is used for setting the motor reset rotating speed, manually controlling the motor and controlling the real-time rotating speed of the motor; the analysis panel unit is used for carrying out operation of taking the character matrix, then analyzing the character matrix to generate a binary lattice, and finally sending the binary lattice to the lower computer; the method mainly realizes the analysis of the word to be written, generates data identified by a lower computer and sends the data to the lower computer; the user input unit is used for Chinese character input, picture input and writing board input, and the three input modes are all processing of characters and pictures; the lower computer module is used for mainly completing the configuration of each register, the initialization of peripheral equipment, the configuration of a system clock, the overcurrent detection of current, the initialization of motor parameters and the initialization of system parameters; the functional sub-module can realize coordinate transformation, SVPWM generation, position detection and speed calculation; the interrupt program is triggered by a timer, and the motor is controlled by the timer in the main interrupt program; the serial port interrupt program realizes the independent motion of the motor and the action of the steering engine by processing the instruction of the upper computer.
4. The tablet robot control system of claim 1, wherein the control algorithm module includes initializing a population and selecting a probability of variation; initializing a population for determining an operation space of an algorithm; selecting variation probability for optimizing the individual in the space; initializing the population includes: the size of the population set in the algorithm is 30, then a group of random numbers A generated by a Monte Carlo sequence is a 30 x 1 matrix, in order to realize the extension of dimension, firstly, the matrix A is transposed, then the matrix A is multiplied by the transposed matrix A', and a 30 x 30 matrix B can be obtained as the formula (4-6), and the matrix B is the initialized population;
Figure 257426DEST_PATH_IMAGE001
(4-6)
selecting the variation probability comprises: dividing the individuals with all fitness into three parts according to the height by adopting a sectional processing mode, and then selecting a variation probability for each part to perform variation operation; this approach will preserve the good individuals in the population to a large extent and may also yield better individuals; the formula of the variation probability segmentation selection is as shown in formula (4-7):
Figure 190747DEST_PATH_IMAGE002
(4-7)
in the formula: pm1 = 0.6, pm2 = 0.05, pm3 = 0.001, Bestfi is the fitness value of the individual with the best fitness in the population, fi is the fitness value of the individual to be mutated, and f31 and f32 are the fitness values of individuals whose fitness values are ranked from high to low at 1/3 and 2/3, respectively.
CN202111143592.9A 2021-09-28 2021-09-28 Control system of writing robot Active CN113759806B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111143592.9A CN113759806B (en) 2021-09-28 2021-09-28 Control system of writing robot

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111143592.9A CN113759806B (en) 2021-09-28 2021-09-28 Control system of writing robot

Publications (2)

Publication Number Publication Date
CN113759806A true CN113759806A (en) 2021-12-07
CN113759806B CN113759806B (en) 2023-06-30

Family

ID=78797967

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111143592.9A Active CN113759806B (en) 2021-09-28 2021-09-28 Control system of writing robot

Country Status (1)

Country Link
CN (1) CN113759806B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130320797A1 (en) * 2012-05-30 2013-12-05 GM Global Technology Operations LLC Magnetic barrier for minimizing demagnetization in bi-permanent magnet synchronous machines
CN103984327A (en) * 2014-05-29 2014-08-13 北京信息科技大学 Small digital actuator system based on fuzzy control
CN105425979A (en) * 2015-10-30 2016-03-23 河南理工大学 Method for realizing robot anthropomorphic writing
US20160259472A1 (en) * 2015-03-08 2016-09-08 Apple Inc. Device, Method, and User Interface for Processing Intensity of Touch Contacts
CN108595031A (en) * 2018-04-28 2018-09-28 北京奇禄管理咨询有限公司 A kind of processing method of dot matrix image data
CN110576439A (en) * 2019-09-04 2019-12-17 华南理工大学广州学院 Multi-control writing robot and control method thereof
CN110893621A (en) * 2019-12-16 2020-03-20 华南理工大学广州学院 Control system and control method of intelligent remote control writing robot
CN111475667A (en) * 2020-04-08 2020-07-31 西北农林科技大学 Mechanical arm regular script style calligraphy writing method based on handwritten Chinese characters
CN112821813A (en) * 2021-01-27 2021-05-18 天津工业大学 Position-sensorless control device and method for double permanent magnet motors of five-bridge-arm inverter
CN112925318A (en) * 2021-01-25 2021-06-08 西南交通大学 Calculation method applied to intelligent robot moving path
CN113014152A (en) * 2021-04-08 2021-06-22 中国第一汽车股份有限公司 Dual-motor control system and method

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130320797A1 (en) * 2012-05-30 2013-12-05 GM Global Technology Operations LLC Magnetic barrier for minimizing demagnetization in bi-permanent magnet synchronous machines
CN103984327A (en) * 2014-05-29 2014-08-13 北京信息科技大学 Small digital actuator system based on fuzzy control
US20160259472A1 (en) * 2015-03-08 2016-09-08 Apple Inc. Device, Method, and User Interface for Processing Intensity of Touch Contacts
CN105425979A (en) * 2015-10-30 2016-03-23 河南理工大学 Method for realizing robot anthropomorphic writing
CN108595031A (en) * 2018-04-28 2018-09-28 北京奇禄管理咨询有限公司 A kind of processing method of dot matrix image data
CN110576439A (en) * 2019-09-04 2019-12-17 华南理工大学广州学院 Multi-control writing robot and control method thereof
CN110893621A (en) * 2019-12-16 2020-03-20 华南理工大学广州学院 Control system and control method of intelligent remote control writing robot
CN111475667A (en) * 2020-04-08 2020-07-31 西北农林科技大学 Mechanical arm regular script style calligraphy writing method based on handwritten Chinese characters
CN112925318A (en) * 2021-01-25 2021-06-08 西南交通大学 Calculation method applied to intelligent robot moving path
CN112821813A (en) * 2021-01-27 2021-05-18 天津工业大学 Position-sensorless control device and method for double permanent magnet motors of five-bridge-arm inverter
CN113014152A (en) * 2021-04-08 2021-06-22 中国第一汽车股份有限公司 Dual-motor control system and method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
柳光耀: "基于XMC4500永磁同步电机交流伺服系统的设计与实现", 《中国优秀硕士学位论文全文数据库(电子期刊) 工程科技II辑》 *
柳光耀: "基于XMC4500永磁同步电机交流伺服系统的设计与实现", 《中国优秀硕士学位论文全文数据库(电子期刊) 工程科技II辑》, 28 February 2017 (2017-02-28), pages 22 - 24 *

Also Published As

Publication number Publication date
CN113759806B (en) 2023-06-30

Similar Documents

Publication Publication Date Title
US6999061B2 (en) Electronic whiteboard system
US5148155A (en) Computer with tablet input to standard programs
AU658574B2 (en) Computer with separate display plane and user interface processor
EP0597379A2 (en) Pen input processing apparatus
EP0693724A1 (en) A method of reconfiguring a simulated keyboard device in a computer system
EP2306270A1 (en) Character input method and system, electronic device and keyboard thereof
EP0099971A2 (en) Retro-stroke compression and image generation of script and graphic data employing an information processing system
JP2009527041A (en) System and method for entering data into a computing system
US4529978A (en) Method and apparatus for generating graphic and textual images on a raster scan display
JP3353954B2 (en) Handwriting input display method and handwriting input display device
CN101763216A (en) Hand input method for Linux operational system
CN113759806A (en) Writing robot control system
JPS6216436B2 (en)
US6753927B2 (en) Television interface for handheld calculator for enhanced television display
WO2014103775A1 (en) Information processing device, information processing method, and program storage medium
EP0062669B1 (en) Graphic and textual image generator for a raster scan display
JPS6365151B2 (en)
JPS6329291B2 (en)
JPS6228828A (en) Tablet input information processor
JPH0782530B2 (en) Handwriting recognition device
JP2801593B2 (en) Handwriting input calculator
JPH04335478A (en) Graphic input device
CN115857782A (en) Automatic information input method and system based on artificial intelligence
JPH05143780A (en) Character recognizing device
JPS61182185A (en) Device for recognizing hand-written character

Legal Events

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