Motor control method and device, computer equipment, storage medium and program product
By obtaining dynamic linear models in the motor control system, determining the estimated values of the sliding mode surface and pseudo-partial derivatives, and using the sliding mode Kedalu to design the sliding mode controller, the problem of difficulty in controlling complex motor systems in the existing technology is solved, and efficient and robust motor control is achieved.
Patent Information
- Application Number
- CN202510144015.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-10
- Publication Date
- 2025-06-27
AI Technical Summary
Existing motor control methods are difficult to effectively control highly nonlinear and complex motor control systems, especially in outdoor unstructured operation scenarios. The complex terrain and uncertainty of obstacles make model construction difficult.
By obtaining the dynamic linear model of the motor control system, the estimated values of the initial sliding mode surface and the pseudo-partial derivative are determined, and the sliding mode controller is determined based on the sliding mode reachable law and the sliding mode surface, and the input signal is output to control the motor speed.
It realizes effective control of highly nonlinear and complex motor control systems, does not rely on system modeling, can adapt to changes in complex terrain and obstacles, and improves the robustness and accuracy of motor control.
Smart Images

Figure CN120222899A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of motor control, and particularly to a motor control method, device, computer device, storage medium, and program product. Background Art
[0002] The double-motor tracked vehicle has a low chassis and a stable center of gravity, with good stability, enabling it to move forward stably even on uneven road conditions. The design of its double motors can provide better traction, especially in muddy and soft environments. This is very important for outdoor operation vehicles in some special environments, such as outdoor power grid operation, disaster relief, exploration, and other fields. In these fields, the double-motor-driven tracked vehicle has become an important operation tool due to its excellent obstacle-crossing ability and adaptability.
[0003] In existing double-motor tracked vehicles, the motor control algorithm is the key to achieving precise control and efficient operation. By precisely adjusting the rotational speeds of the left and right tracked motors of the vehicle, it is ensured that the vehicle can execute predetermined tasks efficiently and accurately. Especially in outdoor unstructured operation scenarios, such as power line inspection, disaster relief, etc., the complexity of the terrain and the uncertainty of obstacles pose strict requirements on the adaptability and robustness of the motor control algorithm. Existing motor control methods, such as PID control, fuzzy control, etc., often rely on complex system modeling, and there are problems with difficult model construction for highly nonlinear and complex motor control systems. Summary of the Invention
[0004] Based on this, in view of the above technical problems, it is necessary to provide a motor control method, device, computer device, storage medium, and program product that can achieve motor control in a highly nonlinear and complex motor control system without relying on system modeling.
[0005] In a first aspect, the present application provides a motor control method, including:
[0006] Obtain the dynamic linear model of the motor in the motor control system;
[0007] Determine the initial sliding mode surface at the first moment according to the error between the target rotational speed and the actual rotational speed of the motor at the first moment and the dynamic linear model; the first moment is the next moment of the current moment;
[0008] Determine the predicted value of the pseudo-partial derivative at the current moment according to the predicted algorithm of the pseudo-partial derivative of the input differential signal at the current moment of the motor and the output differential signal at the first moment;
[0009] Determine the sliding mode surface at the first moment based on the initial sliding mode surface and the predicted value at the first moment;
[0010] Determine the sliding mode controller at the current moment based on the sliding mode reaching law and the sliding mode surface at the first moment, and output an input signal for controlling the rotational speed of the motor output based on the sliding mode controller.
[0011] In one embodiment, obtaining the dynamic linear model of the motor in the motor control system includes:
[0012] Represent the dynamic characteristics of the input signal of the motor and the actual rotational speed of the motor output changing with time as a non - linear autoregressive moving average model;
[0013] Adopt the compact - form dynamic linearization method in the model - free adaptive control to transform the non - linear autoregressive moving average model into a dynamic linear model;
[0014] Wherein, the dynamic linear model is , represents the difference between the actual rotational speed at the first moment and the actual rotational speed at the current moment, represents the pseudo - partial derivative of the input difference signal at the current moment and the output difference signal at the next moment, represents the signal difference between the input signal at the current moment and the input signal at the second moment, and the second moment is the previous moment of the current moment.
[0015] In one embodiment, the method further includes:
[0016] Determine the prediction algorithm according to the criterion function; wherein, the formula of the prediction algorithm is:
[0017]
[0018] Wherein, , is a constant, is the predicted value of the pseudo - partial derivative at the current moment, is the predicted value of the pseudo - partial derivative at the second moment, represents the signal difference between the input signal at the second moment and the input signal at the third moment, represents the difference between the actual rotational speed at the current moment and the actual rotational speed at the second moment, and the third moment is the previous moment of the second moment.
[0019] In one embodiment, determining the predicted value of the pseudo - partial derivative at the current moment according to the prediction algorithm of the input difference signal at the current moment of the motor and the pseudo - partial derivative of the output difference signal at the first moment includes:
[0020] Calculate the initial predicted value of the pseudo - partial derivative at the current moment using the formula of the prediction algorithm;
[0021] If the target norm is less than or equal to the first preset parameter, then use the predicted value of the pseudo - partial derivative at the initial moment as the predicted value of the pseudo - partial derivative at the current moment;
[0022] If the target norm is greater than the first preset parameter, the initial estimated value is used as the estimated value of the pseudo partial derivative at the current moment.
[0023] In one embodiment, the target norm includes at least one of the norm of the initial estimated value and the norm of.
[0024] In one embodiment, the sliding mode controller is used to generate an input signal for controlling the rotational speed of the motor output based on the rotational speed difference between the actual rotational speed at the current moment and the target rotational speed at the first moment. The input signal is used to be input into the motor driver for the motor driver to generate a driving voltage for driving the motor to operate.
[0025] In a second aspect, the present application further provides a motor control device, the device includes:
[0026] An acquisition module, configured to acquire the dynamic linear model of the motor in the motor control system;
[0027] A first determination module, configured to determine the initial sliding mode surface at the first moment according to the error between the target rotational speed and the actual rotational speed of the motor at the first moment and the dynamic linear model; the first moment is the next moment of the current moment;
[0028] A second determination module, configured to determine the estimated value of the pseudo partial derivative at the current moment according to the estimation algorithm of the pseudo partial derivative of the input differential signal at the current moment of the motor and the output differential signal at the first moment;
[0029] A third determination module, configured to determine the sliding mode surface at the first moment based on the initial sliding mode surface and the estimated value at the first moment;
[0030] A fourth determination module, configured to determine the sliding mode controller at the current moment based on the sliding mode reachability law and the sliding mode surface at the first moment, and output an input signal for controlling the rotational speed of the motor output based on the sliding mode controller.
[0031] In a third aspect, the present application further provides a computer device, including a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0032] Acquire the dynamic linear model of the motor in the motor control system;
[0033] Determine the initial sliding mode surface at the first moment according to the error between the target rotational speed and the actual rotational speed of the motor at the first moment and the dynamic linear model; the first moment is the next moment of the current moment;
[0034] Determine the estimated value of the pseudo partial derivative at the current moment according to the estimation algorithm of the pseudo partial derivative of the input differential signal at the current moment of the motor and the output differential signal at the first moment;
[0035] Determine the sliding mode surface at the first moment based on the initial sliding mode surface and the estimated value at the first moment;
[0036] Determine the sliding mode controller at the current moment based on the sliding mode reaching law and the sliding mode surface at the first moment, and output an input signal for controlling the rotational speed of the motor output based on the sliding mode controller.
[0037] Fourthly, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0038] Obtain the dynamic linear model of the motor in the motor control system;
[0039] Determine the initial sliding mode surface at the first moment according to the error between the target rotational speed and the actual rotational speed of the motor at the first moment and the dynamic linear model; the first moment is the next moment of the current moment;
[0040] Determine the estimated value of the pseudo partial derivative at the current moment according to the estimated algorithm of the pseudo partial derivative of the input differential signal at the current moment of the motor and the output differential signal at the first moment;
[0041] Determine the sliding mode surface at the first moment based on the initial sliding mode surface and the estimated value at the first moment;
[0042] Determine the sliding mode controller at the current moment based on the sliding mode reaching law and the sliding mode surface at the first moment, and output an input signal for controlling the rotational speed of the motor output based on the sliding mode controller.
[0043] Fifthly, the present application also provides a computer program product, including a computer program. When the computer program is executed by a processor, the following steps are implemented:
[0044] Obtain the dynamic linear model of the motor in the motor control system;
[0045] Determine the initial sliding mode surface at the first moment according to the error between the target rotational speed and the actual rotational speed of the motor at the first moment and the dynamic linear model; the first moment is the next moment of the current moment;
[0046] Determine the estimated value of the pseudo partial derivative at the current moment according to the estimated algorithm of the pseudo partial derivative of the input differential signal at the current moment of the motor and the output differential signal at the first moment;
[0047] Determine the sliding mode surface at the first moment based on the initial sliding mode surface and the estimated value at the first moment;
[0048] Determine the sliding mode controller at the current moment based on the sliding mode reaching law and the sliding mode surface at the first moment, and output an input signal for controlling the rotational speed of the motor output based on the sliding mode controller.
[0049] The above-mentioned motor control method, device, computer equipment, storage medium and program product obtain the dynamic linear model of the motor in the motor control system, determine the initial sliding mode surface at the first moment according to the error between the target speed and the actual speed of the motor at the first moment and the dynamic linear model, determine the predicted value of the pseudo partial derivative at the current moment according to the prediction algorithm of the pseudo partial derivative of the input differential signal and the output differential signal at the current moment and the output differential signal at the first moment, and determine the sliding mode surface at the first moment based on the initial sliding mode surface and the predicted value at the first moment. Furthermore, the sliding mode controller at the current moment is determined based on the sliding mode reachability law and the sliding mode surface at the first moment, and an input signal for controlling the output speed of the motor is output based on the sliding mode controller, so as to realize the control of the motor in a highly nonlinear and complex motor control system without relying on system modeling. Description of the Drawings
[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for use in the description of the embodiments or related technologies. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0051] Figure 1 It is a schematic diagram of the physical model of a dual-motor-driven tracked vehicle provided by an embodiment of the present application;
[0052] Figure 2 It is a schematic diagram of the movement of a differential vehicle chassis provided by an embodiment of the present application;
[0053] Figure 3 It is a block diagram of a motor speed regulation provided by an embodiment of the present application;
[0054] Figure 4 It is a schematic flowchart of a motor control method provided by an embodiment of the present application;
[0055] Figure 5 It is a schematic flowchart of a method for obtaining a dynamic linear model provided by an embodiment of the present application;
[0056] Figure 6 It is a schematic flowchart of a method for determining a predicted value provided by an embodiment of the present application;
[0057] Figure 7 It is a block diagram of the structure of a motor control device provided by an embodiment of the present application;
[0058] Figure 8 It is an internal structure diagram of a computer device in an embodiment. Detailed Embodiments
[0059] In order to make the objectives, technical solutions and advantages of this application more clear and understandable, the following further elaborates on this application in combination with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not used to limit this application.
[0060] For a clear description of the embodiments of this application, first, in combination with Figure 1 introduce the physical model of a tracked vehicle driven by two motors. As Figure 1 shown, Figure 1 is a schematic diagram of the physical model of a tracked vehicle driven by two motors provided by an embodiment of this application. Figure 1 The vehicle shown includes motor 1 and motor 2. For the physical model of a tracked vehicle driven by two motors as Figure 1 shown, its essence is a vehicle in the form of two-wheel differential. For a vehicle driven by two-motor differential, the main issue is the control of the two-motor differential. Therefore, only by controlling the speed difference between the two driving wheels, that is, controlling the differential of the two motors, can it be controlled to achieve rotation without sliding friction and can also achieve zero-radius turning. The control is relatively stable and the load capacity is strong. Below, the kinematic analysis will be introduced taking a two-motor differential-driven omnidirectional wheel as an example. The schematic diagram of the motion of the differential vehicle chassis is as Figure 2 shown. Figure 2 is a schematic diagram of the motion of the differential vehicle chassis provided by an embodiment of this application.
[0061] Among them, the parameters respectively represent:
[0062] : The distance between the two driving wheels, and the center of the distance is point O.
[0063] : The target forward speed of the robot at point O, and forward is positive.
[0064] : The target rotational speed of the robot around point O, and counterclockwise is positive.
[0065] 、 : The speeds of the left and right wheels of the robot, which cooperate to achieve the target speed 、 , and forward is positive.
[0066] : The angle by which the robot rotates within a certain time t.
[0067] The inverse kinematic formula, the real-time speeds of the left and right wheels 、 :
[0068] (1)
[0069] (2)
[0070] The current speed of the driving wheel is known 、 Find the target speed of the current robot 、 :
[0071] (3)
[0072] (4)
[0073] Based on the above kinematic model, the motion control of the vehicle is to control the rotational speed of the wheel drive motor. The specific motor controller algorithm design is as follows:
[0074] Step 1.1: According to the electrical model of the DC motor, the relationship between the voltage, current, resistance, inductance and back electromotive force of the motor can be known. For a DC motor, its basic electrical model can be expressed as:
[0075] (5)
[0076] Among them, is the voltage across the motor, is the resistance of the motor, is the current of the motor, is the inductance of the motor, is the back electromotive force of the motor.
[0077] Step 1.2: In PWM control, the voltage across the motor is modulated by the PWM signal. The duty cycle of the PWM signal directly affects the average voltage across the motor:
[0078] (6)
[0079] Among them, is the high-level voltage of the PWM signal, is the duty cycle of the PWM signal.
[0080] Step 1.3: From the mechanical model of the motor, the relationship between the torque, rotational speed and load of the motor can be obtained. For a DC motor, its basic mechanical model can be expressed as:
[0081] (7)
[0082] Among them, is the rotational variable, is the damping coefficient, is the motor rotational speed, The torque of the motor is the torque constant of the motor.
[0083] Step 1.4: Integrating the above steps 1.1 - 1.3, the following formula description of the motor current can be obtained:
[0084] (8)
[0085] where can be calculated through and is the back electromotive force constant of the motor.
[0086] From the above formula (8), it can be obtained that to control the motor speed the current needs to adjust the voltage across the motor by adjusting the PWM. Therefore, define as the actual speed of the motor output in the motor control system, that is, the output signal of the motor, as the target speed of the motor, the PWM signal is the control input of the motor, that is, the input signal of the motor. Based on the above analysis of the electrical model and mechanical model of both motors, the main control input and output variables during the operation of the motor control system are determined to include the PWM signal P and the motor speed . The corresponding motor speed regulation block diagram of the dual - motor - driven tracked vehicle is as Figure 3 shown, Figure 3 which is a motor speed regulation block diagram provided by an embodiment of the present application. Figure 3 The target speed of the vehicle in includes the target speeds , the kinematic analysis refers to the above formulas (1) - (4), Figure 3 shows the motor control system, and this motor control system includes the motor control system 31 corresponding to motor 1 and the motor control system 32 corresponding to motor 2. A motor control system includes a model - free sliding - mode controller, a DC motor driver, and a DC motor with an encoder. Since the sliding - mode controller in this embodiment is not independent of the system model, it can also be called a model - free sliding - mode controller.
[0087] In the embodiment of the present application, based on the above - mentioned motor control system, the embodiment of the present application provides a motor control method. As Figure 4 shown, Figure 4 is a schematic flow diagram of a motor control method provided by an embodiment of the present application, and this method includes:
[0088] S401, obtain the dynamic linear model of the motor in the motor control system.
[0089] In this embodiment, the input signal of the motor and the dynamic characteristics of the actual rotational speed output by the motor changing with time can be represented as a non-linear autoregressive moving average model; the non-linear autoregressive moving average model is converted into a dynamic linear model by using the tight-form dynamic linearization method in the model-free adaptive control. The motor in this step can be any one of the above-mentioned motor 1 and motor 2.
[0090] Among them, the dynamic linear model is , represents the difference between the actual rotational speed at the first moment and the actual rotational speed at the current moment, represents the pseudo partial derivative of the input difference signal at the current moment and the output difference signal at the next moment of the current moment, represents the signal difference between the input signal at the current moment and the input signal at the second moment, and the second moment is the previous moment of the current moment. , . is the input difference signal at the current moment, is the output difference signal at the next moment of the current moment. The PWM signal at the current moment, that is, the input signal of the motor, is represented by , is the PWM signal at the second moment. is the actual rotational speed of the motor at the next moment of the current moment, is the actual rotational speed of the motor at the current moment. It can be understood that in the embodiment of the present application, k in the brackets represents the current moment, k + 1 represents the next moment of the current moment, and k - 1 represents the previous moment of the current moment. Among them, PWM is the abbreviation of Pulse-width modulation, referring to pulse width modulation.
[0091] S402. Determine the initial sliding mode surface at the first moment according to the error between the target rotational speed and the actual rotational speed of the motor at the first moment and the dynamic linear model; the first moment is the next moment of the current moment.
[0092] Among them, the error between the target rotational speed and the actual rotational speed of the motor at the first moment can be expressed by the following formula (9):
[0093] (9)
[0094] represents the error between the target rotational speed and the actual rotational speed at the first moment, represents the target rotational speed at the first moment, represents the actual rotational speed at the first moment.
[0095] Based on formula (9), the following formula (10) can be obtained:
[0096] (10)
[0097] Substituting the dynamic linear model into formula (10) can obtain the initial sliding mode surface at the first moment as shown in the following formula (11):
[0098] - (k)- (11)
[0099] Wherein, in an actual motor control system, without considering the model of the motor control system, in the dynamic linear model cannot be directly obtained. Therefore, in formula (11) is unknown. Taking formula (11) when the value has not been obtained as the initial sliding mode surface at the first moment, and defining formula (11) as the initial sliding mode surface.
[0100] S403. Determine the predicted value of the pseudo partial derivative at the current moment according to the prediction algorithm of the input difference signal and the pseudo partial derivative of the output difference signal at the first moment of the motor.
[0101] The prediction algorithm is as shown in the following formula (12):
[0102] (12)
[0103] Wherein, represents the predicted value of the pseudo partial derivative at the current moment, represents the predicted value of the pseudo partial derivative at the second moment, , is a constant, and the purpose is to prevent the denominator in the formula from being equal to 0. The predicted value of can be obtained through the prediction algorithm .
[0104] S404. Determine the sliding mode surface at the first moment based on the initial sliding mode surface and the predicted value at the first moment.
[0105] Combining the initial sliding mode surface and the predicted value at the first moment, the sliding mode surface at the first moment can be determined, as shown in the following formula (13):
[0106] - (k)- (13)
[0107] Replacing the in formula (11) with the predicted value , that is, the sliding mode surface at the first moment is obtained. Among them, the corresponding dynamic linear model of the motor , 。
[0108] S405. Determine the sliding mode controller at the current moment based on the sliding mode reaching law and the sliding mode surface at the first moment, and output an input signal for controlling the rotational speed of the motor output based on the sliding mode controller.
[0109] The sliding mode reaching law is expressed as shown in formula (14):
[0110] (14)
[0111] Where, 、 、 、 、 are relatively small positive constants. It can be seen from the exponential double-power sliding mode reaching law that the term ensures the performance of the tracked vehicle motor system state when it is far from the sliding mode surface. And comes into play when the motor system state approaches the sliding mode surface. The term alleviates the discontinuity of the system at the cut-off point, making the system chattering decay exponentially. When the tracked vehicle needs the motor to complete a certain operation, it can quickly and accurately obtain the motor PWM signal to adjust the voltage at both ends of the motor, so that the motor can quickly and smoothly respond to reach the target rotational speed. The PWM signal is the input signal for controlling the rotational speed of the motor output is the sampling period.
[0112] The sliding mode controller is as shown in formula (15) below:
[0113] (15)
[0115] Where, , , The purpose of is the same as in formula (11), to prevent the denominator from being equal to 0.
[0116] When the model-free adaptive sliding mode control method designed in this application is applied to the motor system of a dual-motor tracked vehicle, only the input and output data during operation are utilized. The proposed control method does not require any precise model information.
[0117] In this embodiment, considering the complexity of the external environment of the tracked vehicle, the requirements for the accuracy and rapidity of the motor operation process are taken into account. The sliding mode controller of the designed model-free adaptive sliding mode control scheme is dynamically variable and can adapt to changes in external factors and disturbances. The design of the exponential double-power ensures the performance of the tracked vehicle motor system state when it is far from and close to the sliding mode surface respectively. This item alleviates the discontinuity of the system at the cut-off point, causing the system chattering to decay exponentially. This enables the tracked vehicle to achieve smooth and rapid response while maintaining stability.
[0118] The method provided in this embodiment determines the initial sliding mode surface at the first moment according to the error between the target speed and the actual speed of the motor at the first moment and the dynamic linear model by obtaining the dynamic linear model of the motor in the motor control system. According to the prediction algorithm of the pseudo partial derivative of the input differential signal and the output differential signal at the current moment of the motor with respect to the first moment, the predicted value of the pseudo partial derivative at the current moment is determined. Based on the initial sliding mode surface and the predicted value at the first moment, the sliding mode surface at the first moment is determined. Furthermore, based on the sliding mode reachability law and the sliding mode surface at the first moment, the sliding mode controller at the current moment is determined. An input signal for controlling the output speed of the motor is output based on the sliding mode controller, thereby realizing the control of the motor in a highly nonlinear and complex motor control system without relying on system modeling.
[0119] In an exemplary embodiment, as Figure 5 shown, Figure 5 FIG. is a schematic flowchart of a method for obtaining a dynamic linear model provided by an embodiment of the present application. On the basis of the above embodiment, in S401 above, obtaining the dynamic linear model of the motor in the motor control system may include the following steps S501-S502:
[0120] S501, representing the dynamic characteristics of the input signal of the motor and the actual speed of the motor output changing with time as a nonlinear autoregressive moving average model.
[0121] The nonlinear autoregressive moving average model is shown in the following formula (16):
[0122] (16)
[0123] Wherein, , is a nonlinear function of the control input PWM signal P and the control output, i.e., the actual speed data in the motor data, The partial derivative of with respect to is continuous. is the actual speed of the motor at the first moment, is the actual speed of the motor at the current moment, which is a measurable and controllable variable. is the PWM signal of the motor at that moment, which is a bounded signal. k represents the time interval and are two unknown parameters respectively.
[0124] S502, transform the non - linear autoregressive moving average model into a dynamic linear model by using the compact - form dynamic linearization method in model - free adaptive control.
[0125] The method provided in this embodiment transforms the non - linear autoregressive moving average model into a dynamic linear model by using the compact - form dynamic linearization method in model - free adaptive control, thereby laying a foundation for determining the initial sliding mode surface at the first moment based on the dynamic linear model.
[0126] In an exemplary embodiment, the method further includes:
[0127] Determine a prediction algorithm according to a criterion function; where the formula of the prediction algorithm is as shown in the above formula (12). In some embodiments, the prediction algorithm can also be determined based on a deformed formula of the above formula (12). For example, multiply in formula 12 by a preset coefficient close to 1 to obtain a product, and sum the product with to obtain the formula of the prediction algorithm.
[0128] The method provided in this embodiment determines a prediction algorithm according to a criterion function, thereby providing a basis for calculating a predicted value based on the prediction algorithm, and further realizing determining the sliding mode surface at the first moment based on the initial sliding mode surface and the predicted value at the first moment.
[0129] As Figure 6 shown, Figure 6 is a schematic flow chart of the predicted value determination method provided by an embodiment of the present application. The method includes the following steps S601 - S603:
[0130] S601, calculate the initial predicted value of the pseudo - partial derivative at the current moment by using the formula of the prediction algorithm.
[0131] S602, if the target norm is less than or equal to the first preset parameter, use the predicted value of the pseudo - partial derivative at the initial moment as the predicted value of the pseudo - partial derivative at the current moment.
[0132] S603, if the target norm is greater than the first preset parameter, use the initial predicted value as the predicted value of the pseudo - partial derivative at the current moment.
[0133] The method provided in this embodiment, when the target norm is less than or equal to the first preset parameter, uses the predicted value of the pseudo - partial derivative at the initial moment as the predicted value of the pseudo - partial derivative at the current moment, thereby realizing the adjustment of the predicted value, enabling the estimation algorithm to have a stronger ability to track time - varying parameters, better adapting to the multi - motor control problem, improving the accuracy of the obtained predicted value, and further improving the accuracy of the obtained sliding mode controller.
[0134] In some embodiments, the target norm includes the norm of the initial predicted value and at least one of the norms.
[0135] If or then = where represents the estimated value of the pseudo partial derivative at the initial moment, and this estimated value can be a preset value. is the first preset parameter.
[0136] In one embodiment, the sliding mode controller is used to generate an input signal for controlling the output speed of the motor based on the speed difference between the actual speed at the current moment and the target speed at the first moment. The input signal is used to be input into the motor driver so that the motor driver generates a driving voltage for driving the motor to work.
[0137] Combined with Figure 3 as shown, the sliding mode controller outputs a PWM signal based on the speed difference A between the actual speed at the current moment, such as the moment t1, and the target speed at the first moment t2. The PWM signal is input into the motor driver. The motor driver generates a driving voltage based on the PWM signal, inputs the driving voltage into the motor to drive the motor to work, collects the actual speed of the motor at the moment t2, determines the speed difference B according to the actual speed at the moment t2 and the target speed at the first moment t3 (t3 is the next moment of t2), inputs the speed difference B into the sliding mode controller, and the sliding mode controller outputs a PWM signal based on the speed difference B to continue driving the motor to work. Based on the above process, it is repeatedly executed to achieve continuous control of the motor.
[0138] The motor control method provided by the embodiments of the present application controls the motor of the tracked vehicle through a model-free sliding mode control method based on an exponential double-power reaching law. First, analyze and process the electrical model and mechanical model of the DC motor used in the tracked vehicle to find out the main variables for motor control. So that when only using the operation process data to design the controller, the corresponding input and output variables can be accurately determined. Second, according to all the data in the operation data of the tracked vehicle, represent the determined input and output data using a nonlinear autoregressive moving average model to show its dynamic characteristics, and perform dynamic linearization on it. And use the criterion function to find out the estimation algorithm of the pseudo partial derivative (slope) in the dynamically linearized model. Third, define a sliding mode surface and an exponential double-power reaching law according to the speed errors of the motors on both sides of the tracked vehicle to design a controller for real-time update to control the motors on both sides. So that when the tracked vehicle is running, it does not need to consider phenomena such as the accuracy of the vehicle power model, the outdoor environment situation, and the model deviation caused by motor wear. And only need to adjust the , and , so it can achieve fewer adjustable parameters, enhanced system robustness, and fast response of the motor. As a result, the tracked vehicle can more accurately achieve outdoor operation functions during operation and meet the actual application needs.
[0139] It should be understood that although the steps in the flowcharts involved in the above embodiments are sequentially shown according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same moment, but can be executed at different moments. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.
[0140] Based on the same inventive concept, an embodiment of the present application also provides a motor control device for implementing the above-mentioned motor control method. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the following motor control devices can refer to the limitations on the motor control method in the above text, and will not be repeated here.
[0141] In an exemplary embodiment, as Figure 7 shown, Figure 7 is a structural block diagram of a motor control device provided by an embodiment of the present application. The device 700 includes:
[0142] An acquisition module 701, configured to acquire the dynamic linear model of the motor in the motor control system;
[0143] A first determination module 702, configured to determine the initial sliding mode surface at the first moment according to the error between the target speed and the actual speed of the motor at the first moment and the dynamic linear model; the first moment is the next moment of the current moment;
[0144] A second determination module 703, configured to determine the predicted value of the pseudo partial derivative at the current moment according to the predicted algorithm of the pseudo partial derivative of the input differential signal at the current moment and the output differential signal at the first moment of the motor;
[0145] A third determination module 704, configured to determine the sliding mode surface at the first moment based on the initial sliding mode surface at the first moment and the predicted value;
[0146] The fourth determination module 705 is configured to determine the sliding mode controller at the current moment based on the sliding mode reachability law and the sliding mode surface at the first moment, and output an input signal for controlling the rotational speed of the motor output based on the sliding mode controller.
[0147] In one embodiment, the acquisition module 701 is specifically configured to represent the dynamic characteristics of the input signal of the motor and the actual rotational speed of the motor output changing with time as a nonlinear autoregressive moving average model; and convert the nonlinear autoregressive moving average model into a dynamic linear model by using the tight-form dynamic linearization method in the model-free adaptive control.
[0148] Wherein, the dynamic linear model is , represents the difference between the actual rotational speed at the first moment and the actual rotational speed at the current moment, represents the pseudo partial derivative of the input difference signal at the current moment and the output difference signal at the next moment, represents the signal difference between the input signal at the current moment and the input signal at the second moment, and the second moment is the previous moment of the current moment.
[0149] In one embodiment, the apparatus 700 further includes:
[0150] The fifth determination module is configured to determine the prediction algorithm according to the criterion function; wherein, the formula of the prediction algorithm is:
[0151]
[0152] Wherein, , is a constant, is the predicted value of the pseudo partial derivative at the current moment, is the predicted value of the pseudo partial derivative at the second moment, represents the signal difference between the input signal at the second moment and the input signal at the third moment, represents the difference between the actual rotational speed at the current moment and the actual rotational speed at the second moment, and the third moment is the previous moment of the second moment.
[0153] In one embodiment, the second determination module 703 is specifically configured to calculate the initial predicted value of the pseudo partial derivative at the current moment by using the formula of the prediction algorithm; if the target norm is less than or equal to the first preset parameter, then use the predicted value of the pseudo partial derivative at the initial moment as the predicted value of the pseudo partial derivative at the current moment; if the target norm is greater than the first preset parameter, then use the initial predicted value as the predicted value of the pseudo partial derivative at the current moment.
[0154] In one embodiment, the target norm includes at least one of the norm of the initial predicted value and the norm of.
[0155] In one embodiment, a sliding mode controller is configured to generate an input signal for controlling the rotational speed output by the motor based on the difference between the actual rotational speed at the current moment and the target rotational speed at the first moment, and the input signal is used to be input into a motor driver so that the motor driver generates a driving voltage for driving the motor to operate.
[0156] Each module in the above-mentioned motor control device can be implemented in whole or in part by software, hardware, and their combination. Each of the above modules can be embedded in the processor in the computer device in a hardware form or be independent of it, or can be stored in the memory in the computer device in a software form so that the processor can call and execute the operations corresponding to each of the above modules.
[0157] In an exemplary embodiment, a computer device is provided. The computer device can be a terminal, and its internal structure diagram can be as Figure 8 shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used for exchanging information between the processor and external devices. The communication interface of the computer device is used for communicating with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (Near Field Communication), or other technologies. The computer program, when executed by the processor, implements a motor control method. The display unit of the computer device is configured to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the housing of the computer device, or an external keyboard, touchpad, or mouse, etc.
[0158] Those skilled in the art can understand that Figure 8 the structure shown in
[0159] In an exemplary embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the steps of the above method embodiment are implemented. The implementation principle and technical effect are similar to those of the above method embodiment, and will not be elaborated here.
[0160] In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method embodiment are implemented. The implementation principle and technical effect are similar to those of the above method embodiment, and will not be elaborated here.
[0161] In an embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps of the above method embodiment are implemented. The implementation principle and technical effect are similar to those of the above method embodiment, and will not be elaborated here.
[0162] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. And the collection, use, and processing of relevant data need to comply with relevant regulations.
[0163] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.
[0164] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0165] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A motor control method, characterized in that: The method comprises: Obtain a dynamic linear model of the motor in the motor control system; Determine an initial sliding surface at a first moment according to an error between a target speed and an actual speed of the motor at a first moment and the dynamic linear model; the first moment is a moment next to the current moment; Determine an estimated value of the pseudo partial derivative at the current moment according to an estimation algorithm of the pseudo partial derivative of the input differential signal of the motor at the current moment and the output differential signal of the motor at the first moment; Determining the sliding surface at the first moment based on the initial sliding surface at the first moment and the estimated value; A sliding mode controller at a current moment is determined based on the sliding mode reachability law and the sliding mode surface at the first moment, and an input signal for controlling the rotational speed output by the motor is output based on the sliding mode controller.
2. The method according to claim 1, characterized in that The step of obtaining a dynamic linear model of a motor in a motor control system comprises: The dynamic characteristics of the input signal of the motor and the actual speed output of the motor changing with time are expressed as a nonlinear autoregressive sliding average model; The nonlinear autoregressive moving average model is transformed into the dynamic linear model by using a compact dynamic linearization method in model-free adaptive control; The dynamic linear model is: , represents the difference between the actual speed at the first moment and the actual speed at the current moment, Represents the pseudo partial derivative of the input differential signal at the current moment and the output differential signal at the next moment, Represents the signal difference between the input signal at the current moment and the input signal at the second moment, where the second moment is the moment before the current moment.
3. The method according to claim 1, characterized in that The method further comprises: The prediction algorithm is determined according to a criterion function; wherein the formula of the prediction algorithm is: in, , is a constant, is the estimated value of the pseudo partial derivative at the current moment, is the estimated value of the pseudo partial derivative at the second moment, represents the signal difference between the input signal at the second moment and the input signal at the third moment, It represents the difference between the actual speed at the current moment and the actual speed at the second moment, and the third moment is the moment before the second moment.
4. The method according to claim 3, characterized in that: The method of determining the estimated value of the pseudo partial derivative at the current moment according to the estimated algorithm of the pseudo partial derivative of the input differential signal of the motor at the current moment and the output differential signal of the motor at the first moment includes: The initial estimated value of the pseudo partial derivative at the current moment is calculated using the formula of the estimation algorithm; If the target norm is less than or equal to the first preset parameter, the estimated value of the pseudo partial derivative at the initial moment is used as the estimated value of the pseudo partial derivative at the current moment; If the target norm is greater than the first preset parameter, the initial estimated value is used as the estimated value of the pseudo partial derivative at the current moment.
5. The method according to claim 4, characterized in that The target norm includes the norm of the initial estimate and At least one of the norms of .
6. The method according to claim 1, characterized in that The sliding mode controller is used to generate an input signal for controlling the speed of the motor output based on the speed difference between the actual speed at the current moment and the target speed at the first moment. The input signal is used to be input into the motor driver so that the motor driver generates a driving voltage to drive the motor to work.
7. A motor control device, characterized in that: The device comprises: An acquisition module, used for acquiring a dynamic linear model of a motor in a motor control system; A first determining module, configured to determine an initial sliding surface at a first moment according to an error between a target speed and an actual speed of the motor at a first moment and the dynamic linear model; the first moment is a moment next to the current moment; A second determination module, configured to determine an estimated value of the pseudo partial derivative at a current moment according to an estimation algorithm of the pseudo partial derivative of the input differential signal of the motor at a current moment and the output differential signal of the motor at the first moment; A third determining module, configured to determine the sliding surface at the first moment based on the initial sliding surface at the first moment and the estimated value; The fourth determination module is used to determine the sliding mode controller at the current moment based on the sliding mode reachability law and the sliding mode surface at the first moment, and to output an input signal for controlling the rotational speed of the motor output based on the sliding mode controller.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.