CN108388177B - Half-size computer mouse motion control system - Google Patents

Half-size computer mouse motion control system Download PDF

Info

Publication number
CN108388177B
CN108388177B CN201810173025.XA CN201810173025A CN108388177B CN 108388177 B CN108388177 B CN 108388177B CN 201810173025 A CN201810173025 A CN 201810173025A CN 108388177 B CN108388177 B CN 108388177B
Authority
CN
China
Prior art keywords
motor
speed
computer mouse
parameters
parameter
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
CN201810173025.XA
Other languages
Chinese (zh)
Other versions
CN108388177A (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.)
Nankai University
Original Assignee
Nankai 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 Nankai University filed Critical Nankai University
Priority to CN201810173025.XA priority Critical patent/CN108388177B/en
Publication of CN108388177A publication Critical patent/CN108388177A/en
Application granted granted Critical
Publication of CN108388177B publication Critical patent/CN108388177B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B11/00Automatic controllers
    • G05B11/01Automatic controllers electric
    • G05B11/36Automatic controllers electric with provision for obtaining particular characteristics, e.g. proportional, integral, differential
    • G05B11/42Automatic controllers electric with provision for obtaining particular characteristics, e.g. proportional, integral, differential for obtaining a characteristic which is both proportional and time-dependent, e.g. P. I., P. I. D.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Position Input By Displaying (AREA)

Abstract

A half-size computer mouse motion control system belongs to the technical field of automatic control. The invention adopts STM32 microcontroller as processing unit, common hollow cup motor as power device, magnetic encoder as speed measuring device, and PID feedback control algorithm to drive half-size computer mouse to move steadily. The control system comprises a processor, a left controller, a right controller, a left hollow cup motor, a right hollow cup motor, a left magnetic encoding velometer and a right magnetic encoding velometer. The processor sends the expected speed to the left and right controllers respectively, and the controller feeds back and adjusts the rotating speed of the motor through the velometer to reach the expected speed. The invention adopts the non-contact magnetic encoder to measure the speed, thereby achieving the effects of saving space, reducing cost and reducing resistance; and a self-adaptive parameter PID control algorithm is designed to solve the problem of insufficient power of the small-sized hollow cup motor.

Description

Half-size computer mouse motion control system
[ field of technology ]
The invention relates to a half-size computer mouse motion control system, and belongs to the technical field of automatic control.
[ background Art ]
The computer mouse is a robot which is composed of an embedded controller, a sensor and a power component and can move autonomously. The method can automatically search and memorize wall information in the maze through a set algorithm, and finally find the optimal sprint path from the starting point to the end point. The traditional computer mouse competition maze is a maze formed by square cells of 16×16, and the size of each square is 18×18cm. Half-size computer mouse is a reduced version of traditional computer mouse, the size of labyrinth square is 9×9cm, the maximum square number is 32×32, and fig. 2 is standard 32×25 half-size computer mouse labyrinth.
Half-size mice have great design difficulties compared with traditional mice due to their small size. There is a higher requirement for both the size of the device and the accuracy of the control. An excellent half-size mouse must have accurate perceptibility, stable walking ability and excellent algorithm. Typically, a half-size mouse comprises the following parts:
1) A processor: the processor is the brain of the computer mouse and is responsible for screening and judging the information returned by the sensor, so that the position and the posture of the computer mouse are calculated, and an instruction is sent to the power system to control the running of the computer mouse.
2) An infrared probe: the infrared probe is eyes of a computer mouse and is responsible for detecting whether walls and distances between the walls exist in front of and on the left and right of each maze lattice, and the excellent infrared probe is an important guarantee for the computer mouse to accurately search for mazes.
3) A gyroscope: the gyroscope is the cerebellum of the computer mouse and is responsible for sensing the angle rotated by the computer mouse when the computer mouse turns. The gyroscope is used for assisting turning, so that the turning angle is more accurate, and the searching and punching speed is increased.
4) And (3) a motor: the motor is an extremity of the computer mouse and is responsible for executing the movement instruction sent by the processor to drive the computer mouse to move forwards, turn or turn around.
5) Algorithm: the algorithm is the soul of the computer mouse, and the excellent algorithm can enable the computer mouse to search the end point faster, find the optimal path and rush to the end point in the shortest time.
In addition, the device also comprises components and structures such as a battery, a tire, a bracket and the like. They must work synergistically to make the mice work in the best state.
Because of the high difficulty of developing half-size mice, domestic research on mice is still in the state of classical mice, and classical mice with excellent performances have been developed by a plurality of companies or institutions, but no research results of half-size mice have yet appeared.
[ invention ]
The invention aims to provide a reliable and stable motion control scheme for a half-size computer mouse, and provides a half-size computer mouse motion control system.
The invention comprises the following contents:
1. a half-size computer mouse motion control system is characterized in that an STM32 microcontroller is adopted as a processing unit, a common hollow cup motor is adopted as a power device, a magnetic encoder is adopted as a speed measuring device, a half-size computer mouse is driven to stably travel through a PID feedback control algorithm, and the half-size computer mouse is controlled to complete specific actions, wherein the specific steps are as follows:
(1) The processor analyzes the appointed action which is needed to be completed by the half-size computer mouse into the expected speed of the left motor and the right motor, and respectively transmits the expected speed to the left motor controller and the right motor controller;
(2) Measuring the actual rotation speed of the tire by a magnetic encoder and transmitting the actual rotation speed to a motor controller;
(3) The motor controller calculates the difference between the actual rotating speed and the expected rotating speed of the tire, converts the difference into PWM waves with corresponding duty ratio through a PID algorithm and outputs the PWM waves to the motor driving chip;
(4) The motor driving chip outputs corresponding current according to the PWM wave, drives the motor to rotate, and drives the half-size computer mouse to finish appointed movement.
2. The flow of the parameter self-adaptive PID control algorithm is shown in FIG. 2, and the specific steps are as follows:
(1) Calculating the actual speed S r And a desired speed S e Is used as a proportional quantity E, and the accumulated history difference is used as an integral quantity E i Calculating the difference between the current difference and the last difference as a differential quantity E d
(2) Introduction of parameter P 0 For initial scale parameters, I 0 For initial integral parameters, D is a differential parameter, u p For adjusting the parameters of the proportion parameters, u i Adjusting parameters for the integral parameters;
(3) Calculating a proportional parameter p=p 0 -u p S e And integral parameter i=i 0 -u i S e
(4) Judging whether the parameter is smaller than the limiting minimum value, if so, setting the proportion parameter as P=P min ,I=I min
(5) Calculation output o=p·e+i·e i +D·E d
The PID control algorithm can adaptively adjust parameters, so that the small-sized hollow cup motor with insufficient power originally has better performance, and the used encoder is a non-contact magnetic encoder, so that the cost of the magnetic encoder is lower and the effect is better.
The invention has the following advantages and positive effects:
first, unlike classical mice, half-sized mice can only be used with small motors due to size limitations. The invention adopts the common small-sized hollow cup motor and is matched with a PID algorithm with special design, thereby reducing the cost and achieving good control effect;
secondly, measuring the speed by adopting a magnetic encoder. The cost is reduced and the precision is higher. The magnetic encoder measures the rotation speed of the tire by detecting the change of the magnetic field, has no contact with the tire, and does not generate any interference on the movement of the tire.
[ description of the drawings ]
FIG. 1 is a block diagram of a half-size computer mouse motion control system according to the present invention;
FIG. 2 is a flow chart of a parameter adaptive PID algorithm
FIG. 3 is a schematic diagram of a half-size mouse racing maze;
FIG. 4 is a block diagram of an exemplary half-size computer mouse of the present invention;
[ detailed description ] of the invention
The invention provides a technical scheme of a half-size computer mouse motion control system shown in figure 1, which comprises the following steps:
a half-size computer mouse motion control system adopts an STM32 microcontroller as a processing unit, a common hollow cup motor as a power device, a magnetic encoder as a speed measuring device, and a PID feedback control algorithm to drive the half-size computer mouse to stably run. The control system comprises a processor, a left controller, a right controller, a left hollow cup motor, a right hollow cup motor, a left magnetic encoding velometer and a right magnetic encoding velometer. The processor sends the travelling speed to the first controller and the second controller, and the controller controls the rotating speed of the motor through feedback of the velometer, and the specific steps are as follows:
(1) The processor analyzes the appointed action which is needed to be completed by the half-size computer mouse into the expected speed of the left motor and the right motor, and respectively transmits the expected speed to the left motor controller and the right motor controller;
(2) Measuring the actual rotation speed of the tire by a magnetic encoder and transmitting the actual rotation speed to a motor controller;
(3) The motor controller calculates the difference between the actual rotating speed and the expected rotating speed of the tire, converts the difference into PWM waves with corresponding duty ratio through a PID algorithm and outputs the PWM waves to the motor driving chip;
(4) The motor driving chip outputs corresponding current according to the PWM wave, drives the motor to rotate, and drives the half-size computer mouse to finish appointed movement.
In one example of implementation, the half-size computer mouse hardware portion includes four pairs of infrared sensors, one gyroscope, two coreless motors, two motor drive chips, two magnetic encoders, one STM32 microcontroller chip, four tires, and one battery. The outline design of the half-size mouse is schematically shown in FIG. 3. The infrared sensors are positioned on the head of the vehicle in four pairs, wherein the two pairs are forward, the deflection angle is 5 degrees, the two pairs are left and right, and the deflection angle is 60 degrees. The gyroscope is positioned at the middle front part of the vehicle body. The motors are symmetrically distributed on the left side and the right side of the vehicle body, and each motor drives two tires. The two magnetic encoders are aligned with the left and right rear wheels and perpendicular to the tire axial direction. STM32 is located in the center of the vehicle body and the battery is located at the tail of the vehicle body.
The motor driving and speed measuring modes are as follows: the controller outputs PWM waves to the motor driving chip, the chip outputs corresponding current to the motor to drive the tire to rotate, the small magnet fixed on the wheel shaft rotates at the same rotation speed with the tire, the actual rotation speed is measured by the magnetic encoder and is sent to the motor controller, the controller calculates the difference value between the actual rotation speed and the expected rotation speed, and the actual rotation speed is adjusted to the expected value by utilizing the PID algorithm.
The proportional parameter P and the integral parameter I of the PID regulation algorithm can be adjusted according to the desired speed. The magnitude of the parameter is inversely proportional to the expected speed, namely the expected speed is smaller when the vehicle starts and turns, the parameter is larger, and the computer mouse can quickly adjust the actual speed to the expected speed, so that the reaction speed of the computer mouse is accelerated; the linear motion is higher in expected speed, smaller in parameters and capable of reducing the shaking of the mouse body, so that the operation of the computer mouse is more stable, and the specific steps are as follows:
(1) Calculating the actual speed S r And a desired speed S e Is used as a proportional quantity E, and the accumulated history difference is used as an integral quantity E i Calculating the difference between the current difference and the last difference as a differential quantity E d
(2) Introduction of parameter P 0 Is an initial proportion parameter,I 0 For initial integral parameters, D is a differential parameter, u p For adjusting the parameters of the proportion parameters, u i Adjusting parameters for the integral parameters;
(3) Calculating a proportional parameter p=p 0 -u p S e And integral parameter i=i 0 -u i S e
(4) Judging whether the parameter is smaller than the limiting minimum value, if so, setting the proportion parameter as P=P min ,I=I min
(5) Calculation output o=p·e+i·e i +D·E d

Claims (1)

1. A half-size computer mouse motion control system is characterized in that an STM32 microcontroller is adopted as a processing unit, a common hollow cup motor is adopted as a power device, a magnetic encoder is adopted as a speed measuring device, a half-size computer mouse is driven to stably travel through a PID feedback control algorithm of self-adaptive parameters, and the specific steps for controlling the computer mouse to complete specified actions are as follows:
(1) The processor analyzes the appointed action to be completed by the computer mouse into the expected speed of the left motor and the right motor, and respectively transmits the expected speed to the left motor controller and the right motor controller;
(2) Measuring the actual rotation speed of the tire by a magnetic encoder and transmitting the actual rotation speed to a motor controller;
(3) The motor controller calculates the difference between the actual rotating speed and the expected rotating speed of the tire, converts the difference into PWM waves with corresponding duty ratio through a PID algorithm and outputs the PWM waves to the motor driving chip;
(4) The motor driving chip outputs corresponding current according to the PWM wave to drive the motor to rotate;
for a small-sized hollow cup motor with poor stable driving performance, a PID control algorithm of self-adaptive parameters is provided, which is characterized in that the proportional parameters and integral parameters in the control process are self-adaptively adjusted according to the running condition of the motor, and the specific steps of adjustment are as follows:
(1) Calculating the actual speed S r And a desired speed S e Is used as a proportional quantity E, and the accumulated history difference is used as an integral quantity E i Calculating the difference between the current difference and the last differenceAs a differential quantity E d
(2) Introduction of parameter P 0 For initial scale parameters, I 0 For initial integral parameters, D is a differential parameter, u p For adjusting the parameters of the proportion parameters, u i Adjusting parameters for the integral parameters;
(3) Calculating a proportional parameter p=p 0 -u p S e And integral parameter i=i 0 -u i S e
(4) Judging whether the parameter is smaller than the limiting minimum value, if so, setting the proportion parameter as P=P min ,I=I min
(5) Calculating the control output o=p·e+i·e i +D·E d
CN201810173025.XA 2018-02-27 2018-02-27 Half-size computer mouse motion control system Active CN108388177B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810173025.XA CN108388177B (en) 2018-02-27 2018-02-27 Half-size computer mouse motion control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810173025.XA CN108388177B (en) 2018-02-27 2018-02-27 Half-size computer mouse motion control system

Publications (2)

Publication Number Publication Date
CN108388177A CN108388177A (en) 2018-08-10
CN108388177B true CN108388177B (en) 2023-10-10

Family

ID=63070175

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810173025.XA Active CN108388177B (en) 2018-02-27 2018-02-27 Half-size computer mouse motion control system

Country Status (1)

Country Link
CN (1) CN108388177B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111590557B (en) * 2020-01-15 2022-11-04 广东工业大学 Half-size labyrinth robot control system
CN115402116A (en) * 2022-09-28 2022-11-29 天津工业大学 Labyrinth intelligent vehicle based on speed measurement of external magnetic suspension encoder of motor

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103529836A (en) * 2013-09-26 2014-01-22 苏州工业园区职业技术学院 Dual-core-based two-wheel high-speed microcomputer mouse and diagonal ramp-up servo system thereof
CN103955152A (en) * 2014-03-06 2014-07-30 青岛工学院 High-precision electronic mouse for maze competition, and using method thereof
CN105137987A (en) * 2015-08-24 2015-12-09 铜陵学院 Double-speed intermediate speed two-wheel mini mouse full-digital navigation servo controller and control method
JP2016045695A (en) * 2014-08-22 2016-04-04 旭化成エレクトロニクス株式会社 Motion device control circuit
CN105929833A (en) * 2016-07-01 2016-09-07 江苏若博机器人科技有限公司 Picomouse spurt controller with single-core triaxial four-wheel variable structure

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103529836A (en) * 2013-09-26 2014-01-22 苏州工业园区职业技术学院 Dual-core-based two-wheel high-speed microcomputer mouse and diagonal ramp-up servo system thereof
CN103955152A (en) * 2014-03-06 2014-07-30 青岛工学院 High-precision electronic mouse for maze competition, and using method thereof
JP2016045695A (en) * 2014-08-22 2016-04-04 旭化成エレクトロニクス株式会社 Motion device control circuit
CN105137987A (en) * 2015-08-24 2015-12-09 铜陵学院 Double-speed intermediate speed two-wheel mini mouse full-digital navigation servo controller and control method
CN105929833A (en) * 2016-07-01 2016-09-07 江苏若博机器人科技有限公司 Picomouse spurt controller with single-core triaxial four-wheel variable structure

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
基于ARM的IEEE标准电脑鼠研究与实现;方金亮等;《机械制造与自动化》;20081020(第05期);102-104 *
基于STM32的直流电机模糊PID调速***研究;黄平等;《机电工程》;20170420(第04期);66-71 *
基于STM32的迷宫电脑鼠控制***设计与实现;张月芹 等;《机电工程技术》;20161231;1-6 *
电脑鼠模糊PID控制算法研究;薛艳;《中国优秀硕士学位论文全文数据库》;20110315;18-48 *

Also Published As

Publication number Publication date
CN108388177A (en) 2018-08-10

Similar Documents

Publication Publication Date Title
CN107207042B (en) Electric power steering apparatus
CN102385342B (en) Self-adaptation dynamic sliding mode controlling method controlled by virtual axis lathe parallel connection mechanism motion
JP3740970B2 (en) Vehicle front and rear wheel steering angle control device
CN201926927U (en) Intelligent tracking trolley
WO2018192465A1 (en) Method and device for controlling travelling of transfer robot, and robot
CN108388177B (en) Half-size computer mouse motion control system
JP6024656B2 (en) Electric power steering device
JP2008140144A (en) Traveling truck and its system
CN108693772B (en) Gain adjustment method and device for servo drive system of transfer robot and robot
CN109484470A (en) Steering controller
JP5659710B2 (en) vehicle
US11939013B2 (en) Steering control device
US8725356B2 (en) Vehicle steering control system
KR20170120003A (en) Motor control apparatus and active roll stabilizer having the same and motor control method
CN116069019A (en) Control system of multifunctional intelligent balance trolley and fuzzy self-adaptive PID method thereof
CN109591879A (en) Rear-wheel steering system, method and vehicle
RU87681U1 (en) SELF-PROPELLED VEHICLE
de Lima Neto et al. Model, simulation and analysis of bldcm for a differential controlled electric-powered wheelchair
JP5712643B2 (en) Moving body
Savnani et al. Modelling, Design and Control of a Four wheel Holonomic Drive
CN216052746U (en) Unmanned bicycle experiment platform with balance flywheel and vision guide module
JP4449911B2 (en) Autonomous mobile device
CN113809972B (en) Position sensor error correction system and control method for motor for robot
Aung et al. Path Tracking Control of Obstacle Avoiding Robot Using Ultrasonic Sensor
US20230227098A1 (en) Control device and control method for electric power steering apparatus, and motor module

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