Multi-motor rotating speed bipartite inclusion control method and control system
By adopting a model-free adaptive sliding mode control algorithm in a multi-DC motor system, the problem that traditional control methods are difficult to meet complex control requirements is solved, and efficient and robust multi-motor speed control is achieved.
Patent Information
- Application Number
- CN202411417731.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-11
- Publication Date
- 2025-01-24
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art is difficult to effectively control the rotation speed of multiple DC motors, especially in the case of complex control requirements and increased complexity of the motor system, and the traditional centralized control method and model-based control method have limitations.
A model-free adaptive sliding mode control scheme based on event triggering is used to design a distributed model-free adaptive sliding mode binary inclusion control algorithm. Through dynamic linearization and pseudo-partial derivative estimation, the speed of multiple DC motors can be quickly adjusted and controlled.
This scheme does not require complex mechanism modeling, dynamically adjust control parameters, adapts to the diverse changes of system behavior, improves the robustness and adaptability of the system, and reduces development costs and complexity.
Smart Images

Figure CN119356417A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of motor control, and in particular relates to a multi-motor speed binary control method and a control system. Background Art
[0002] At present, when microcontroller units control the speed of multiple DC motors at the same time, they mainly adopt a simple centralized control method, that is, using one controller to uniformly control all motors. However, in this method, all motors share the same control signal, and the motion information of each motor cannot communicate with each other, so it is often difficult to meet the control requirements of higher complexity. In addition, with the increasing complexity of motor equipment technology, the cost of mechanism modeling or identification modeling of motors has also increased, which makes traditional model-based control methods face many challenges in practical applications. Therefore, a distributed and adaptable multi-motor data-driven control method is urgently needed. Summary of the invention
[0003] In order to overcome the above technical problems, the present invention provides a binary inclusive control method and control system for multiple motor speeds, aiming to solve the inclusive control problem of multiple motor speeds by using a data-driven distributed control algorithm.
[0004] The present invention adopts the following technical solutions:
[0005] A binary inclusion control method for multi-motor speeds is designed for multi-motor systems. An event-triggered model-free adaptive sliding mode control scheme is designed to explore the binary inclusion control problem for multi-DC motor speeds. The multi-DC motor system is dynamically linearized to obtain a linearized model with time-varying pseudo partial derivatives. Then, considering the cooperative and antagonistic relationships between adjacent DC motors, a distributed model-free adaptive sliding mode binary inclusion control algorithm is designed, so that the motor speeds from two groups of antagonistic relationships can quickly converge to the convex hull formed by the leader and the mirror range of the convex hull. This scheme only uses the I / O data of the system, avoiding the complex mechanism modeling process of the multi-motor system.
[0006] This solution also provides a multi-motor speed binary control system based on STM32, whose main modules include: STM32F407 microprocessor as the core control unit; LCD display device connected through variable static memory controller (FSMC) for real-time display of the speed value of each motor; UART interface based on CH340 chip, responsible for transmitting the motor speed data to the host computer so as to display the speed waveform in real time; the motor drive module uses two TB6612 chips to realize the drive control of three DC motors; at the same time, the equipment is also equipped with three encoders for accurately measuring the real-time speed of the motor.
[0007] Compared with the prior art, the present invention has the following beneficial effects:
[0008] The present invention introduces a model-free adaptive sliding mode binary inclusion control algorithm to drive and optimize the multi-motor system in an innovative way. At the control strategy level, in view of the inherent complexity of the multi-motor system and the strong mutual coupling effect between motors, the model-free adaptive control, with its dynamic adjustment capability, accurately adjusts the control parameters of each motor based on real-time observation data and feedback signals, and effectively responds to the diverse changes in system behavior.
[0009] In view of the challenges faced in building mathematical models of complex multi-motor systems, such as high difficulty and high cost, the control algorithm of the present invention does not need to rely on accurate mathematical models, thereby greatly simplifying the design process and reducing development costs. This feature enables the system to respond quickly and adapt to the actual operating environment, improving development efficiency and flexibility;
[0010] In response to the parameter drift problem caused by natural factors such as wear and temperature changes during motor operation, model-free adaptive control uses its built-in adaptive parameter pseudo-partial derivative mechanism to achieve real-time monitoring of system response and dynamic adjustment of strategies. This capability ensures that the system can maintain stable operation in the face of parameter changes and uncertainties, significantly enhancing the robustness and adaptability of the system.
[0011] From the perspective of hardware implementation, the present invention also demonstrates the advantage of high cost performance. The hardware modules used are extremely economical, with the cost of a single module generally controlled within a hundred yuan, but capable of performing verification tasks for a variety of control algorithms. Through direct monitoring of the DC motor speed by the host computer, users can intuitively evaluate the control effect, providing a convenient way to further optimize the control strategy. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 is the system block diagram;
[0013] Figure 2 It is a schematic diagram of the communication module;
[0014] Figure 3 This is a schematic diagram of the LCD module interface line definition;
[0015] Figure 4 This is the schematic diagram of the TB6612 motor driver module;
[0016] Figure 5 This is the motor interface schematic;
[0017] Figure 6 It is a schematic diagram of the topological structure. DETAILED DESCRIPTION
[0018] The embodiments of the present invention are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. Unless otherwise specified, the raw materials and equipment used can be purchased from the market or are commonly used in the art. The methods in the embodiments are conventional methods in the art unless otherwise specified. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0019] The microprocessor controls multiple DC motors by outputting PWM signals. Therefore, for the speed of multiple motors, we use a discrete expression, where y i (k) represents the speed of the i-th motor at the current moment, u i (k) represents the PWM input value of the i-th motor at the current moment k. However, due to the influence of factors such as the change of motor parameters, the internal cogging effect and the end effect, it is difficult to establish an accurate mathematical model of the motor. In order to describe this kind of discrete time and unknown system characteristics, we can use the nonlinear autoregressive moving average model with external input (NARMAX) to represent it, which can effectively capture the dynamic characteristics of the system.
[0020] y i (k+1)=f(y i (k),u i (k)) (1)
[0021] Wherein, f(·) is an unknown nonlinear function. f =[y1,y2,…y N ] T represents the motor speed, and Y l =[y N+1 ,y N+2 ] T Represents the target speed range. With the help of the model-free adaptive dynamic linearization method, the above motor speed model can be converted into a compact dynamic linearization. The specific expression is as follows:
[0022] Δy i (k+1)=φ i (k)Δu i (k) (2)
[0023] φ i (k)∈R is called the pseudo partial derivative and is a time-varying parameter.
[0024] because It is difficult to obtain directly in the actual system, so consider its estimated value To obtain this estimate, the cost function is designed as follows:
[0025]
[0026] where μ is an estimated parameter. Further, the cost function is calculated with respect to The partial derivative of is:
[0027]
[0028] make The optimal solution of the pseudo partial derivative estimate can be obtained:
[0029]
[0030] Next, we design a controller to complete the control objective, so that the speed of all motors is limited to the range preset by the leader. Here we regard the multi-motor system as a multi-agent system, and use the Laplacian matrix to represent the topological relationship between each motor. The Laplacian matrix of the multi-agent system can be expressed as:
[0031]
[0032] For a multi-motor system with three motors and two leaders, the Laplacian matrix can be partitioned into the following form:
[0033]
[0034] The binary inclusion control error is expressed as:
[0035]
[0036] Its corresponding compact form is:
[0037] ζ(k)=-L FF Y f (k)-L FL Y l (k) (7)
[0038] Where ζ(k)=[ζ1(k),ζ2(k),…,ζ N (k)] T ,Y f (k)=[y1(k),y2(k),…y N (k)] T Represents the motor speed.
[0039] Furthermore, define Can get:
[0040]
[0041] In this section, we will design an efficient controller to achieve the binary inclusion control objective and propose an event triggering mechanism to reduce the frequency of data transmission. Based on the above preliminary information, this section proposes a model-free adaptive sliding mode binary inclusion control algorithm. Considering the advantages of sliding mode control such as robustness, fast response and anti-interference, this method is used for controller design in this paper. The sliding function can be expressed as:
[0042] s i (k) = κζ i (k) (9)
[0043] Here κ∈(0,1] is a parameter that makes the algorithm more general.
[0044] The sliding surface in vector form is expressed as follows:
[0045]
[0046] where s(k)=[s1(k),s2(k),…,s N (k)] T , and K L =κL FF The arrival law of the ith agent is given as follows:
[0047] s i (k+1)=(1-p)s i (k)-ωsign(s i (k)) (11)
[0048] In vector form, the above formula can be converted as follows:
[0049] s(k+1)=(1-p)s(k)-ωsign(s(k)) (12)
[0050] Combining formula (10) and (12), we can get the following formula:
[0051]
[0052] Substituting formula (5.3) into the above formula, the following equation is derived:
[0053]
[0054] here δu(k)=[δu1(k), δu2(k),…, δu N (k)] T .
[0055] By performing algebraic operations such as shifting terms on both sides of the equation, the controller can be derived:
[0056]
[0057] Divide both sides of the equation by You can get:
[0058]
[0059] To avoid the denominator Leading to the case where the score does not exist, the controller (16) is modified to the following more general form:
[0060]
[0061] Where λ>0 is a weight factor.
[0062] This embodiment demonstrates a data-based multi-motor integrated control experimental electronic device, whose core components are as follows Figure 1 As shown, it includes power modules, DC motor drive modules based on TB6612 dual-channel DC motor driver chips (since the system contains three DC motors, two TB6612 modules are used to achieve comprehensive drive), DC motors equipped with encoders, main control modules, communication modules, and LCD display modules. The TB6612 chip is a motor control solution commonly used in the industry for robots, cars, unmanned vehicles and other equipment. Its powerful dual-channel drive capability ensures efficient operation and protection of the motor. Specifically in terms of control logic, TB6612 is connected to the main control module through four control pins: AIN1, AIN2, BIN1, and BIN2. The main control module flexibly adjusts the forward, reverse, and braking states of each DC motor by sending high and low level signals to these pins, thereby achieving precise control of the multi-motor system.
[0063] In addition to realizing the steering control of the motor, TB6612 also integrates two key PWM (Pulse Width Modulation) input pins: PWMA and PWMB. These two pins bear the important responsibility of regulating the motor speed. By fine-tuning the duty cycle of the PWM signal, that is, changing the proportion of time that the high level in the signal lasts, the running speed of the motor can be accurately controlled to achieve a smooth transition from low speed to high speed. In the device design of this project, the main control module uses an advanced model-free adaptive sliding mode binary inclusion control algorithm to dynamically generate the frequency and duty cycle of the PWM signal. This intelligent control strategy ensures that multiple DC motors can work together to achieve the preset binary inclusion control target.
[0064] DC Motor Module: Figure 5 This is the motor interface schematic diagram, where interfaces 2, 3, 4, and 5 are motor encoder interfaces for reading motor speed. Pins 2 and 5 power the encoder, and pins 3 and 4 are used to control the motor direction.
[0065] The main control module uses the STM32F407 MCU. The STM32F4 series is a high-performance 32-bit MCU based on the ARM Cortex-M4 core with FPU and support for DSP instruction set. The main control module mainly completes encoder data acquisition, including control error acquisition, controller initialization, distributed controller, and PWM generation.
[0066] During the encoder data acquisition process, we fully utilized the encoder mode of the TIM3, TIM4, and TIM8 timer modules of the STM32F407 MCU to accurately capture the output of the motor encoder. In order to read these encoder values regularly, we configured the timer TIM6 to trigger an interrupt with a period of 10 milliseconds, thereby achieving an encoder reading frequency of 100 Hz. In order to further improve the accuracy of speed measurement, we implemented a quadruple frequency data processing strategy, that is, quadruple frequency processing of the original pulse signal output by the encoder through an algorithm at the software level, which significantly increased the resolution of speed measurement by four times.
[0067] In the equipment, we uniformly use "revolutions per second" (r / s) as the unit of measurement for speed. In order to accurately convert the number of pulses captured by the encoder during the sampling period into the actual speed of the motor, we designed a comprehensive formula that not only takes into account the number of pulses detected during the sampling period, but also incorporates the total number of pulses that the encoder should generate when the motor rotates one full circle (after quadrupling) and the specific duration of the sampling period, thereby achieving accurate conversion from the number of encoder pulses to the motor speed.
[0068]
[0069] Where m is the number of pulses measured in one sampling period, per round The number of pulses corresponding to one rotation of the motor output terminal; here per round = Number of encoder lines × reduction ratio × 4, 4 represents the data processing method using quadruple frequency; quadruple frequency is a data processing method that improves the encoder accuracy through the program, which can effectively maximize the encoder's measurement accuracy; T is the sampling period in seconds. In this system, the sampling period is set by the timer. Every time the sampling time is reached, the controller enters the interrupt program, samples the motor speed and updates the control instructions.
[0070] The communication topology of multiple DC motors is as follows: Figure 5 As shown, agents 4 and 5 act as virtual leaders, and agents 1, 2, and 3 represent three motors as followers. V1 = {1, 2, 4, 5} and V2 = {3}. Based on the communication topology, the Laplace matrix is derived as follows:
[0071]
[0072] According to the inclusive control proposed above, we can derive the inclusive control error of each motor as follows:
[0073] ζ1(k)=-2y1(k)+y2(k)+y3(k)
[0074] ζ2(k)=y1(k)-2y2(k)+y3(k)
[0075] ζ3(k)=-y1(k)-2y2(k)-y5(k)
[0076] After the calculation including the control error, the parameter will be passed to the distributed controller. The distributed controller must be initialized before use to assign initial values to the controller. The initial values and parameters in the controller are defined as: i (1) = 50, u i (1) = 50, ω=0.1, q=1.2, μ=0.0001, λ=0.5, κ=1.
[0077] The distributed controller part converts formulas (5) and (17) into C language description so that STM32 can control multiple motors.
[0078] One of the core functions of the main control module is to generate high-precision PWM waveforms. It is used to adjust the analog signal level. By setting the timer parameters, the frequency and duty cycle of the PWM waveform can be flexibly controlled to achieve digital control of the analog voltage. With its powerful functions, the STM32F4 series MCU can easily generate the required PWM signal and output it to the external device through the channel pin of the specified timer. In this device, in order to independently control three DC motors, we selected 4 channels of TIM5, 4 channels of TIM1, and 2 channels of TIM12, and accurately controlled the waveform output of the MCU through the output comparison mechanism.
[0079] The design of the communication module cleverly uses the CH340 chip, which serves as a bridge from USB to logic level serial port, simplifying the complexity of data transmission. Figure 2 As shown in the figure, only a MicroUSB data cable is needed to build a connection channel between the main control module and the host computer. The host computer recognizes the connection and virtualizes a serial port interface, making the serial port communication between the two intuitive and efficient. This design not only facilitates users to monitor the speed information of multiple DC motors in real time, but also provides strong support for the verification and performance evaluation of control algorithms.
[0080] In addition, the integration of the LCD display module further improves the interactivity of the system. The module relies on the built-in FSMC (Variable Static Storage Controller) of the STM32F407 MCU to drive the 8080 interface TFT LCD. In view of the slow reading speed and fast writing speed in the LCD operation characteristics, we adopted the read-write separation timing control strategy under mode A to optimize the data transmission efficiency. The 34-pin LCD socket on the main control module (the interface line definition is shown in Figure 3 ) is compatible with various types of LCD modules, ensuring flexible configuration and scalability of the device. Once the FSMC is successfully configured and connected to the LCD, the screen will intuitively display the real-time speed data and leader parameters of each motor, providing users with intuitive operating status feedback.
[0081] Although the embodiments of the present invention have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the above embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
Claims
1. A multi-motor speed binary control method, characterized in that: These include: S1. Dynamically linearize the multi-DC motor system to obtain a linearized model with time-varying pseudo partial derivatives; S2. Considering the cooperative and antagonistic relationship between adjacent DC motors, a distributed model-free adaptive sliding mode binary inclusion control algorithm is designed; S3. Enable the motor speeds from the two sets of adversarial relationships to quickly converge to the convex hull formed by the leader and the mirror image of the convex hull.
2. The multi-motor speed binary control system is characterized by: These include: The STM32F407 microprocessor serves as the core control unit; the LCD display device connected through the variable static memory controller (FSMC) is used to display the speed value of each motor in real time; the UART interface based on the CH340 chip is responsible for transmitting the motor speed data to the host computer so as to display the speed waveform in real time; the motor drive module uses two TB6612 chips to realize the drive control of three DC motors; at the same time, the device is also equipped with three encoders for accurately measuring the real-time speed of the motor.