Motor speed observation method and device, electronic equipment and storage medium
By constructing a digital virtual model that matches the actual motor environment and using the speed loop bandwidth parameter for real-time adjustment, the problem of cumbersome debugging of existing observers is solved, and the real-time performance and accuracy of motor speed observation are improved.
Patent Information
- Application Number
- CN202511844671.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-09
- Publication Date
- 2026-04-10
AI Technical Summary
Existing observers are cumbersome to debug in motor control and cannot adjust the digital simulation model in real time, resulting in low accuracy of motor data observation.
By utilizing the mechanical characteristics of the motor and the observer state function, feedforward gain parameters, observer proportional gain parameters, and observer integral gain parameters are generated to construct a digital virtual model that matches the actual motor scenario, and the model is adjusted in real time using the speed loop bandwidth parameter.
This improves the real-time performance and accuracy of motor speed observation, and enhances its reliability and practicality.
Smart Images

Figure CN121841209A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of control technology, and in particular to methods, devices, electronic devices and storage media for observing motor speed. Background Technology
[0002] In the field of motor control, closed-loop control is generally used to stabilize the speed performance of the system. The controller typically employs the traditional PID controller, which is widely used in industry and is the most common type of controller. Its core idea is based on feedback, using "error to eliminate error." In real-time control, to achieve precise control, encoders are usually used to acquire motor data. The acquired data is then filtered for noise before being processed for control data. However, during this process, the servo operation cycle of the control system, along with the filtering and data processing, often prevents real-time, precise motor control.
[0003] In related technologies, to achieve real-time motor control, pre-built observers (such as Luneburger observers, Kalman filters, etc.) are typically used to replace the original data acquisition and processing process. This allows for the rapid acquisition of motor observation parameters using a digital simulation model within the observer that matches the actual scenario, thus enabling real-time motor control. However, the debugging of existing observers is quite cumbersome, and when the actual scenario changes, the digital simulation model cannot be adjusted in real time, resulting in low accuracy in motor data observation using existing observers. Summary of the Invention
[0004] This application provides a method, apparatus, electronic device, and storage medium for observing motor speed, which can improve the accuracy of motor speed data observation.
[0005] To achieve the above objectives, a first aspect of this application proposes a method for observing motor speed, the method comprising: Obtain the electrical angle of the motor; Gain processing is performed based on the electrical angle, the observer proportional gain parameter, and the observer integral gain parameter to obtain the proportional-integral output value. Feedforward processing is performed based on the electrical angle and feedforward gain parameters to obtain the feedforward output value, wherein the feedforward gain parameter, the observer proportional gain parameter, and the observer integral gain parameter are all generated based on the velocity loop bandwidth parameter; The speed observation result of the motor is obtained by superimposing the proportional-integral output value and the feedforward output value.
[0006] In some embodiments, the feedforward gain parameter is twice the velocity loop bandwidth, the observer proportional gain parameter is the product of the square of twice the velocity loop bandwidth and the moment of inertia of the motor, and the observer integral gain parameter is the product of the cube of the velocity loop bandwidth and the moment of inertia of the motor.
[0007] In some embodiments, the steps for generating the feedforward gain parameter, the observer proportional gain parameter, and the observer integral gain parameter include: Based on the motor mechanical function and the motor state parameters of the motor, and combined with the observer state function, an initial motor observation state function is obtained by transformation, wherein the motor state parameters include electrical angle parameters; Based on the feedback matrix parameters and the output matrix, the initial motor observation state function is transformed to obtain the feedback motor observation state function; Based on the pole placement method, the observed state function of the feedback motor is processed to obtain an optimized feedback matrix; Based on the optimized feedback matrix, the feedforward gain parameter, the observer proportional gain parameter, and the observer integral gain parameter are generated.
[0008] In some embodiments, the step of processing the observed state function of the feedback motor based on the pole placement method to obtain an optimized feedback matrix includes: Obtain the feedback motor characteristic function of the observed state function of the feedback motor, wherein the feedback motor characteristic function includes friction parameters; The characteristic function of the feedback motor is transformed based on the pole parameters to obtain the triple root characteristic function. When the friction parameter is zero, the triple root eigenfunction is solved to obtain the optimized feedback matrix.
[0009] In some embodiments, solving the triple root eigenfunction to obtain the optimized feedback matrix includes: Based on the function characteristics of the triple root feature function, the triple root feature function is replaced by the third-order Butterworth feature function, which is obtained based on the third-order Butterworth filter function, which includes the velocity loop bandwidth parameter of the velocity loop. The optimized feedback matrix is obtained by solving the third-order Butterworth characteristic function based on the velocity loop bandwidth parameter.
[0010] In some embodiments, the optimized feedback matrix includes a first optimized feedback parameter, a second optimized feedback parameter, and a third optimized feedback parameter. Generating the feedforward gain parameter, the observer proportional gain parameter, and the observer integral gain parameter based on the optimized feedback matrix includes: Based on the first optimized feedback parameter, the feedforward gain parameter is obtained; The observer proportional gain parameter is obtained based on the product of the second optimized feedback parameter and the rotational inertia of the motor. Based on the third optimized feedback parameter, the observer integral gain parameter is obtained.
[0011] In some embodiments, the gain processing based on the electrical angle, the observer proportional gain parameter, and the observer integral gain parameter to obtain the proportional-integral output value includes: The initial proportional-integral output value is obtained by multiplying the electrical angle and the observer proportional gain parameter, and then summing the product of the electrical angle and the observer integral gain parameter. The initial proportional-integral output value is obtained by dividing the motor's moment of inertia and the motor's control parameters in sequence.
[0012] In some embodiments, the process of superimposing the proportional-integral output value and the feedforward output value to obtain the speed observation result of the motor includes: The initial velocity observation parameters are obtained by superimposing the proportional-integral output value and the feedforward output value. The initial speed observation parameters are multiplied by the control parameters of the motor to obtain the speed observation result.
[0013] To achieve the above objectives, a second aspect of this application provides a motor speed observation device, the device comprising: Angle acquisition module, used to acquire the electrical angle of the motor; The gain processing module is used to perform gain processing based on the electrical angle, the observer proportional gain parameter and the observer integral gain parameter to obtain the proportional-integral output value. The feedforward processing module is used to perform feedforward processing based on the electrical angle and feedforward gain parameters to obtain the feedforward output value, wherein the feedforward gain parameters, the observer proportional gain parameters, and the observer integral gain parameters are all generated based on the velocity loop bandwidth parameters; The observation module is used to superimpose the proportional-integral output value and the feedforward output value to obtain the speed observation result of the motor.
[0014] To achieve the above objectives, a third aspect of this application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the motor speed observation method as described in the first aspect.
[0015] To achieve the above objectives, a fourth aspect of the present application provides a storage medium, which is a computer-readable storage medium storing a computer program that, when executed by a processor, implements the motor speed observation method described in the first aspect.
[0016] The motor speed observation method, apparatus, electronic device, and storage medium proposed in this application include: first, acquiring the electrical angle of the motor; then, performing gain processing based on the electrical angle, the observer's proportional gain parameter, and the observer's integral gain parameter to obtain a proportional-integral output value; next, performing feedforward processing based on the electrical angle and the feedforward gain parameter to obtain a feedforward output value, wherein the feedforward gain parameter, the observer's proportional gain parameter, and the observer's integral gain parameter are all generated based on the speed loop bandwidth parameter; finally, performing superposition processing based on the proportional-integral output value and the feedforward output value to obtain the motor speed observation result. This application embodiment utilizes the mechanical characteristics of the motor and the observer's state function to generate the corresponding feedforward gain parameters, proportional gain parameters, and integral gain parameters of the observer. This constructs a digital virtual model within the observer that matches the actual motor scenario. The speed loop bandwidth parameter, which can be adjusted in real time, serves as the sole variable parameter for the feedforward gain, proportional gain, and integral gain parameters. This allows for quick and easy adjustment of the digital virtual model to match the real-time motor scenario when changes occur. Furthermore, the electrical angle, a parameter that can be obtained quickly and in real time, serves as the basis for motor speed data during real-time observation, thereby significantly improving the real-time performance and accuracy of motor speed observation.
[0017] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the description, claims and drawings. Attached Figure Description
[0018] Figure 1 This is a schematic diagram of the structure of an observer provided in one embodiment of this application.
[0019] Figure 2 This is a schematic diagram of the structure of a Luneburger observer provided in another embodiment of this application.
[0020] Figure 3 This is a schematic diagram of the structure of an observer design model provided in another embodiment of this application.
[0021] Figure 4 This is a flowchart of a motor speed observation method provided in another embodiment of this application.
[0022] Figure 5 This is a flowchart illustrating the generation of feedforward gain parameters, observer proportional gain parameters, and observer integral gain parameters, provided in another embodiment of this application.
[0023] Figure 6 yes Figure 5 The flowchart for step 503.
[0024] Figure 7 yes Figure 6 The flowchart for step 603.
[0025] Figure 8 This is a block diagram of a velocity observer design provided in another embodiment of this application.
[0026] Figure 9 yes Figure 5 The flowchart for step 504.
[0027] Figure 10 This is a block diagram of a velocity observer reconstruction design provided in another embodiment of this application.
[0028] Figure 11 This is a flowchart of a motor speed observation method provided in one embodiment of this application.
[0029] Figure 12 This is a schematic diagram of the structure of a motor speed observation device provided in an embodiment of this application.
[0030] Figure 13 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0031] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0032] It should be noted that although functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart.
[0033] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0034] In the field of motor control, closed-loop control is generally used to stabilize the speed performance of the system. The controller typically uses the traditional PID controller, which is widely used in industry and is the most common type of controller. Its core idea is based on feedback, using "error to eliminate error". The PID controller is a typical model-free control, which does not require knowledge of the precise model of the system and is simple in form, which is one of the reasons for its widespread use.
[0035] In real-time control, speed feedback is essential for achieving precise control and plays a crucial role in speed loop control. The most common speed feedback is generated by differentially analyzing position information acquired by an encoder, using methods such as the M-method, T-method, and M / T method. However, the encoder's accuracy and the servo's computation cycle jointly determine the noise in the calculated speed. Because of this noise, a low-pass filter is needed, which causes a lag between the calculated and actual speed. Since encoder data acquisition inherently has some lag, the calculated speed will also have significant lag. From the speed loop perspective, this results in a large phase lag. To maintain a certain phase margin, the speed loop bandwidth must be reduced. This reduced bandwidth leads to slower speed response, decreased disturbance rejection capability, and overall deterioration in speed performance, ultimately preventing the achievement of precise real-time motor control.
[0036] Reference Figure 1 This is a schematic diagram of the structure of an observer provided in an embodiment of this application. Figure 1 As shown in the figure, in order to achieve real-time control of the motor, a pre-built observer (such as a Luneburger observer, a Kalman filter, etc.) is usually used to replace the original data acquisition and processing process. The motor observation parameters are quickly obtained by using the digital simulation model in the observer that matches the actual scene, so as to achieve real-time motor control.
[0037] like Figure 1 The diagram shows the architecture of a classic Luneburger observer. Figure 1 The dashed box at the top center represents the actual operating physical system, which consists of controlled objects and sensors. Figure 1The dashed box at the bottom center represents the Luneburg observer. To some extent, the Luneburg observer contains a digital simulation model of the actual physical system, namely the control model Gp_est(s) and the sensor model Gs_est(s) shown in the figure. This digital simulation model runs on the microcontroller, and its purpose is to make the observer's output close to or even equal to the output of the actual physical system. To achieve this, the control model and sensor model in the observer must be close to the real physical system. When the observer's output is equal to the output of the actual physical system, the estimation error is 0, which means that the observer's state is completely consistent with the actual state G(s) of the system. However, in reality, due to modeling errors, signals, and disturbances, there will inevitably be an estimation error Eo(s). Therefore, an estimation compensator Gco(s) is needed to establish a closed-loop control loop to control the estimation error Eo(s) to 0.
[0038] Reference Figure 2 This is a schematic diagram of the structure of a Luneburger observer provided in an embodiment of this application. Figure 2 The diagram illustrates a control system architecture using a Luneburger observer. The system includes a controller, a power converter, a controlled object, and sensors. The Luneburger observer estimates the system state using both control and sensor models, and adjusts for observation errors using an observer compensator, ensuring that the observer's output is as close as possible to the actual system output. The observer's primary function is to provide accurate state feedback to the control system, thereby improving the system's control accuracy and stability. Figure 2 As can be seen, the Romberg observer provides precise observations of the main control loop's state. As feedback, it is used for closed-loop control.
[0039] based on Figure 2 The state equation of the linear time-invariant system of the Luneburg observer shown is as shown in the following formula (1).
[0040]
[0041] Where x represents the system state quantity, A is the system matrix, B is the input matrix, and u represents the system input quantity. Assuming the system is observable, the state observer of this linear time-varying system can be expressed as shown in the following formula (2).
[0042]
[0043] Typically, the observer's observation state There will be a deviation from the actual state x; the observation error between the two is defined. As shown in the following formula (3).
[0044]
[0045] Its corresponding characteristic function is shown in the following formula (4).
[0046]
[0047] If the motor system is stable, then The observation error converges to 0 over time, which means that all eigenvalues of matrix A are in the left half-plane. The speed of error convergence depends on the magnitude of the eigenvalues. Therefore, the speed of error convergence can be determined by designing a state feedback matrix.
[0048] Reference Figure 3 This is a structural schematic diagram of an observer design model provided in an embodiment of this application. For example... Figure 3 As shown, the dashed box represents the state observer. Without loss of generality, an input matrix C is introduced, which can transform the system state into the output. G is the state feedback gain matrix. The design of the feedback gain matrix G allows the observer to meet the required performance. The observer state function with the state feedback matrix G added is shown in the following formula (5).
[0049]
[0050] Based on the above description, it can be determined that the debugging of existing observers is quite cumbersome. When the actual scene changes, the digital simulation model cannot be adjusted in real time, resulting in low accuracy of motor data observation using existing observers.
[0051] To improve the accuracy of motor speed data observation, this application embodiment utilizes the mechanical characteristics of the motor and the observer's state function to generate the corresponding feedforward gain parameters, proportional gain parameters, and integral gain parameters of the observer. This constructs a digital virtual model within the observer that matches the actual motor scenario. The speed loop bandwidth parameter, which can be adjusted in real time, is used as the sole variable parameter for the feedforward gain, proportional gain, and integral gain parameters. This allows the digital virtual model to be quickly and easily adjusted to match the real-time motor scenario when changes occur in the actual situation. Furthermore, the electric angle, a parameter that can be obtained quickly and in real time, is used as the basis for motor speed data during real-time observation, thereby significantly improving the real-time performance and accuracy of motor speed observation.
[0052] Based on the above description and analysis of the observer, this application provides a motor speed observation method to overcome the above problems. The motor speed observation method in this application embodiment will be described in detail below. (Refer to...) Figure 4 This is an optional flowchart of the motor speed observation method provided in the embodiments of this application. Figure 4The method may include, but is not limited to, steps 401 to 404. It is also understood that this embodiment... Figure 4 The order of steps 401 to 404 is not specifically limited; the order of steps can be adjusted or certain steps can be added or removed according to actual needs. The motor speed observation method provided in this embodiment can be applied to intelligent terminals, servers, computers, etc., connected to the magnetic drive conveyor system.
[0053] Step 401: Obtain the electrical angle of the motor.
[0054] Step 401 will be described in detail below.
[0055] In some embodiments, when the observer responds to a motor speed data observation request, it first needs to obtain the electrical angle, a parameter that can be obtained quickly in real time. This electrical angle is then used as the input parameter of the constructed observer, so that the observer provided in this application embodiment can perform corresponding gain processing and feedforward processing to quickly generate accurate motor speed observation results.
[0056] The following describes how to construct the observer in this application embodiment and how to generate the corresponding feedforward gain parameters, observer proportional gain parameters, and observer integral gain parameters.
[0057] Reference Figure 5 The steps for generating the feedforward gain parameter, the observer proportional gain parameter, and the observer integral gain parameter include the following steps 501 to 504.
[0058] Step 501: Based on the motor mechanical function and motor state parameters of the motor, and combined with the observer state function, the initial motor observation state function is obtained by transformation.
[0059] Step 502: Based on the feedback matrix parameters and the output matrix, the initial motor observation state function is transformed to obtain the feedback motor observation state function.
[0060] Step 503: Based on the pole placement method, perform data processing on the observed state function of the feedback motor to obtain the optimized feedback matrix.
[0061] Steps 501 to 503 are described in detail below.
[0062] In some embodiments, in order to such Figure 3 When the observer state function (5) corresponding to the observer shown is applied to the motor speed control system, the motor mechanical function of the motor needs to be determined as shown in the following formula (6).
[0063]
[0064] The mechanical function (6) of this motor is a general mechanical equation in the field of motors. Among them, These are the electromagnetic torque parameters of the motor. These are the mechanical speed parameters of the motor. These are the load torque parameters of the motor. These are the rotational inertia parameters of the motor. For time parameters.
[0065] Considering the motor's state parameters are: ,in The electrical angle parameter of the motor can be obtained by measuring it with an encoder.
[0066] Therefore, referring to the format of the observer state function (2) without a feedback matrix, the motor mechanical function (6) can be further transformed into the initial motor observation state function corresponding to the format of the observer state function (2) as shown in the following formula (7).
[0067]
[0068] Wherein, the input matrix In motor control, this is a friction parameter.
[0069] Next, based on the format of the observer state function (5) with the feedback matrix set, the corresponding feedback matrix parameters are set. and output matrix The initial motor observation state function is transformed into the format corresponding to the observer state function (5) to obtain the feedback motor observation state function as shown in the following formula (8).
[0070]
[0071] Among them, corresponding to the initial motor observation state function (7) mentioned above, there exists a superscript " " is the system's observed value. That is, in the observer constructed in this application, since the digital simulation model constructed by the feedback motor observation state function (8) is very similar to the actual motor environment, when using the feedback motor observation state function (8) to observe the motor speed, it is not necessary to use all the real-time data for data observation, but can use the observed values corresponding to the existing non-real-time observation data for data observation, thereby improving the observation efficiency of motor speed data and improving the real-time performance of motor speed observation.
[0072] Next, in order to construct a suitable observer, the parameters of the feedback matrix need to be adjusted. Solve the problem to generate a suitable optimization feedback matrix. .
[0073] Therefore, in this embodiment, the pole placement method is used to process the observed state function (8) of the feedback motor to obtain the optimized feedback matrix, as described below.
[0074] Reference Figure 6 Based on the pole placement method, the observed state function of the feedback motor is processed to obtain the optimized feedback matrix, including the following steps 601 to 603.
[0075] Step 601: Obtain the feedback motor characteristic function of the observed state function of the feedback motor.
[0076] Step 602: Transform the characteristic function of the feedback motor based on the pole parameters to obtain the triple root characteristic function.
[0077] Step 603: When the friction parameter is zero, solve the triple root eigenfunction to obtain the optimized feedback matrix.
[0078] Steps 601 to 603 are described in detail below.
[0079] In some embodiments, the characteristic function of the observed state function (8) of the feedback motor is first determined, that is, the characteristic function of the feedback motor is shown in the following formula (9).
[0080]
[0081] Among them, the characteristic function of the feedback motor (9) includes the system matrix. Complex variables (i.e., motor control parameters), friction parameters, and identity matrix. Feedback matrix parameters (Including the first feedback parameter) Second feedback parameter and the third feedback parameter ), input matrix Friction parameters Moment of inertia .
[0082] Next, based on the pole parameters The feedback motor characteristic function (9) is transformed to obtain the triple root characteristic function as shown in the following formula (10).
[0083]
[0084] Since friction is very small and can be basically ignored in actual motor control, the friction parameter is set to zero in this embodiment. Then, the triple root eigenfunction is solved to obtain the feedback matrix parameters. The optimal feedback matrix is shown in the following formula (11).
[0085]
[0086] Through steps 601 to 603 above, the triple root characteristic function obtained from the feedback motor characteristic function of the observed state function of the feedback motor is used to solve for the optimized feedback matrix while ignoring the friction factor. The optimized feedback matrix can then be used to construct a digital virtual model that matches the actual motor environment within the observer, thereby improving the reliability of motor speed observation.
[0087] Reference Figure 7 Solving the triple root eigenfunction yields the optimized feedback matrix, including the following steps 701 to 702.
[0088] Step 701: Based on the function characteristics of the triple root feature function, replace the triple root feature function with the third-order Butterworth feature function.
[0089] Step 702: Solve the third-order Butterworth characteristic function based on the velocity loop bandwidth parameter to obtain the optimized feedback matrix.
[0090] Steps 701 to 702 are described in detail below.
[0091] According to formula (11), the currently obtained optimized feedback matrix G needs to be determined based on the pole parameters. Adjustments can be made. However, in actual observation, when the motor environment changes, the pole parameters of the observer are difficult to adjust directly. Therefore, in practice, it is not possible to directly adjust the digital simulation model of the observer according to the changing real-time motor environment.
[0092] Based on this, in this embodiment, a general third-order Butterworth filter function is further considered as shown in the following formula (12).
[0093]
[0094] in, Let be the cutoff frequency parameter of the filter. Then, the third-order Butterworth characteristic function corresponding to the third-order Butterworth filter function can be determined as shown in the following formula (13).
[0095]
[0096] From the functional characteristics of the third-order Butterworth characteristic function (13) and the triple root characteristic function (10) mentioned above, it can be determined that their functional forms are consistent. Therefore, in this embodiment, the third-order Butterworth characteristic function (13) is used to replace the triple root characteristic function (10). Based on this, This corresponds to the speed loop bandwidth parameter.
[0097] Next, the third-order Butterworth characteristic function (13) is further solved to obtain the optimized feedback matrix (which includes the first optimized feedback parameter, the second optimized feedback parameter and the third optimized feedback parameter) as shown in the following formula (14).
[0098]
[0099] Through steps 701 to 702 above, by utilizing the similarity in function characteristics between the triple root eigenfunction and the third-order Butterworth eigenfunction, the third-order Butterworth eigenfunction is replaced with the triple root eigenfunction to obtain the corresponding optimized feedback matrix. This transforms the adjustable parameters in the optimized feedback matrix from the previously difficult-to-adjust pole parameters into speed loop bandwidth parameters that are easy to adjust in real time. In actual observation, when the motor environment changes, the digital virtual model within the observer can be quickly and easily adjusted to match the real-time motor scenario by directly adjusting the speed loop bandwidth parameters, thereby greatly improving the practicality, real-time performance, and reliability of motor speed observation.
[0100] Step 504: Based on the optimized feedback matrix, generate the feedforward gain parameter, the observer proportional gain parameter, and the observer integral gain parameter.
[0101] Step 504 will be described in detail below.
[0102] In some embodiments, since the actual motor control system typically uses a PI controller for motor control, after obtaining the optimized feedback matrix (14), the gain parameters corresponding to the PI controller (including observer differential gain parameters, observer proportional gain parameters, and observer integral gain parameters, etc.) can be generated based on the optimized feedback matrix (14).
[0103] Reference Figure 8 This is a block diagram of a velocity observer design provided in an embodiment of this application. Figure 8 As shown, the corresponding speed observer in the motor control system, where the input parameter is the electrical angle of the motor. The observer design then uses a PID controller to regulate the system's control signal. The PID controller adjusts the system response through three stages: proportional, integral, and derivative. In the integral stage: the square marked "1 / s" in the diagram represents the integral stage, used to convert the velocity signal into a position signal. State feedback gain: the "..." in the diagram... "" represents a gain value in the state feedback gain matrix, used to adjust the observer's state feedback signal. Differential element: This is the "g1*J" part in the diagram; its main function is to respond to the rate of change of the input signal, rather than the amplitude of the signal itself. System model: "B" and "A" in the diagram represent the system's damping coefficient and moment of inertia, typically used to describe the mechanical model of a motor. These parameters are used to construct the observer's mathematical model. Observer output: The observer's output is the estimated motor mechanical angle. This output is used to feed back to the control system, thereby obtaining the speed observation results of the motor to improve the control accuracy and stability of the system.
[0104] In Figure 8 The velocity observer shown corresponds to the observer differential gain parameter. Observer proportional gain parameters and observer integral gain parameters As shown in the following formula (15).
[0105]
[0106] Therefore, based on Figure 8 The velocity observer shown below will be further described in terms of how to generate the feedforward gain parameters, observer proportional gain parameters, and observer integral gain parameters for actual use based on the optimized feedback matrix.
[0107] Reference Figure 9 Based on the optimized feedback matrix, feedforward gain parameters, observer proportional gain parameters, and observer integral gain parameters are generated, including the following steps 901 to 903.
[0108] Step 901: Based on the first optimized feedback parameters, obtain the feedforward gain parameters.
[0109] Step 902: Based on the product of the second optimized feedback parameter and the motor's moment of inertia, obtain the observer's proportional gain parameter.
[0110] Step 903: Based on the third optimized feedback parameter, obtain the observer integral gain parameter.
[0111] Steps 901 to 903 are described in detail below.
[0112] Reference Figure 8The speed observer shown contains a derivative gain component of the PID control; however, this derivative gain inevitably amplifies the noise in the data observation. Therefore, to avoid derivative amplification noise, the following... Figure 8 The velocity observer shown has been improved and optimized. (Refer to...) Figure 10 This is a block diagram of a velocity observer reconstruction design provided in an embodiment of this application. For example... Figure 10 As shown, the feedforward gain section was redesigned using the derivative gain section of the original PID controller, so as to replace the original derivative gain section with the feedforward gain.
[0113] Based on this, such as Figure 10 The corresponding feedforward gain parameter in the velocity observer shown is .
[0114] Next, based on the optimized feedback matrix shown in the above formula (14) (which includes the first optimized feedback parameter, the second optimized feedback parameter and the third optimized feedback parameter), the feedforward gain parameter can be obtained as shown in the following formula (16) based on the first optimized feedback parameter.
[0115]
[0116] And, based on the second optimized feedback parameters and the motor's moment of inertia The product of the two is used to obtain the observer proportional gain parameter as shown in the following formula (17).
[0117]
[0118] Furthermore, based on the third optimized feedback parameter, the observer integral gain parameter is obtained as shown in the following formula (18).
[0119]
[0120] That is, the feedforward gain parameter is twice the speed loop bandwidth. The observer's proportional gain parameter is the product of twice the square of the velocity loop bandwidth and the motor's moment of inertia. The observer integral gain parameter is the product of the cube of the velocity loop bandwidth and the motor's moment of inertia. .
[0121] Through steps 901 to 903 above, the feedforward gain section was redesigned using the derivative gain section of the original PID controller and replaced with the original derivative gain section, thereby avoiding derivative amplification noise and improving the reliability and accuracy of motor speed observation.
[0122] Step 402: Perform gain processing based on the electrical angle, observer proportional gain parameter, and observer integral gain parameter to obtain the proportional-integral output value.
[0123] Step 403: Perform feedforward processing based on the electrical angle and feedforward gain parameters to obtain the feedforward output value.
[0124] Step 404: The proportional-integral output value and the feedforward output value are superimposed to obtain the speed observation result of the motor.
[0125] Steps 402 to 404 are described in detail below.
[0126] Based on such Figure 10 After constructing the velocity observer as shown, the velocity observation process for practical applications is further determined. (Refer to...) Figure 11 This is a flowchart illustrating a method for observing motor speed according to an embodiment of this application. Figure 11 As shown, in actual motor speed observations, after obtaining the electrical angle... and observer proportional gain parameter Observer integration parameters After the feedforward gain parameters are obtained, gain processing and feedforward processing related to the PI controller are performed respectively.
[0127] The gain processing is based on the electrical angle. and observer proportional gain parameter The product of the electric angles, then summed up. and observer integral gain parameters The product of these two values yields the initial proportional-integral output value. Then, the initial proportional-integral output value is added to the electromagnetic torque of the motor. Then divide by the moment of inertia of the motor. and motor control parameters The proportional-integral output value is obtained. .
[0128] The feedforward processing is based on the electrical angle. and feedforward gain parameters The product of these two values yields the feedforward output value. .
[0129] Next, the proportional-integral output value and the feedforward output value are superimposed to obtain the initial speed observation parameters. Then, the initial speed observation parameters are multiplied by the motor control parameters to obtain the speed observation result. .
[0130] In some embodiments, by utilizing the velocity observer designed above, the observed velocity almost coincides with the ideal velocity, thereby improving velocity observation efficiency. Furthermore, using the observed velocity for velocity loop closure reduces velocity overshoot, increases system stability, and improves velocity loop performance. Moreover, using the observed velocity for velocity loop closure accelerates velocity response, improves system dynamic performance, and enhances velocity loop performance.
[0131] The motor speed observation method, device, electronic device, and storage medium proposed in this application include: First, based on the motor mechanical function and motor state parameters of the motor, a transformation is performed using an observer state function to obtain an initial motor observation state function. The motor state parameters include electrical angle parameters. Based on feedback matrix parameters and an output matrix, the initial motor observation state function is transformed to obtain a feedback motor observation state function. A feedback motor characteristic function is obtained from the feedback motor observation state function. The feedback motor characteristic function includes friction parameters. Based on pole parameters, the feedback motor characteristic function is transformed to obtain a triple root characteristic function. When the friction parameters are zero, based on the function characteristics of the triple root characteristic function, a third-order Butterworth characteristic function is used to replace the triple root characteristic function. The third-order Butterworth characteristic function is obtained based on a third-order Butterworth filter function, which includes the speed loop bandwidth parameter. The third-order Butterworth characteristic function is solved based on the speed loop bandwidth parameter. The process involves obtaining an optimized feedback matrix, deriving feedforward gain parameters based on the first optimized feedback parameter, obtaining observer proportional gain parameters based on the product of the second optimized feedback parameter and the motor's moment of inertia, and obtaining observer integral gain parameters based on the third optimized feedback parameter. In actual observation, the motor's electrical angle is acquired. Then, the initial proportional-integral (PI) output value is obtained by summing the product of the electrical angle and the observer proportional gain parameter. This initial PI output value is then divided sequentially by the motor's moment of inertia and the motor's control parameters. Next, feedforward processing is performed based on the electrical angle and the feedforward gain parameter to obtain the feedforward output value. The feedforward gain parameter, observer proportional gain parameter, and observer integral gain parameter are all generated based on the speed loop bandwidth parameter. Finally, the PI output value and the feedforward output value are superimposed to obtain the initial speed observation parameters. These initial speed observation parameters are then multiplied by the motor's control parameters to obtain the speed observation result.
[0132] This application embodiment utilizes the mechanical characteristics of the motor and the observer's state function to generate the corresponding feedforward gain parameters, proportional gain parameters, and integral gain parameters of the observer. This constructs a digital virtual model within the observer that matches the actual motor scenario. The speed loop bandwidth parameter, which can be adjusted in real time, is used as a single variable parameter for the feedforward gain parameters, proportional gain parameters, and integral gain parameters. This allows for quick and easy adjustment of the digital virtual model to match the real-time motor scenario when changes occur. Furthermore, the electric angle, a parameter that can be obtained quickly and in real time, serves as the basis for motor speed data during real-time observation, significantly improving the real-time performance and accuracy of motor speed observation. Additionally, by using the triple root eigenfunction obtained from the feedback motor characteristic function derived from the feedback motor observation state function, and neglecting friction factors, an optimized feedback matrix is obtained, thereby enabling… The method utilizes the obtained optimized feedback matrix to construct a digital virtual model within the observer that matches the actual motor environment, thereby improving the reliability of motor speed observation. Furthermore, by leveraging the similarity in function characteristics between the triple root eigenfunction and the third-order Butterworth eigenfunction, the third-order Butterworth eigenfunction is replaced with the triple root eigenfunction to obtain the corresponding optimized feedback matrix. This transforms the adjustable parameters in the optimized feedback matrix from the previously difficult-to-adjust pole parameters into speed loop bandwidth parameters that are easily adjusted in real time. In actual observations, when the motor environment changes, the digital virtual model within the observer can be quickly and easily adjusted to match the real-time motor scenario by directly adjusting the speed loop bandwidth parameters, thus greatly improving the practicality, real-time performance, and reliability of motor speed observation. Additionally, the feedforward gain section is redesigned and replaced with the original differential gain section in the original PID controller, thereby avoiding differential amplification noise and improving the reliability and accuracy of motor speed observation.
[0133] This application also provides a motor speed observation device that can implement the above-described motor speed observation method, referring to... Figure 12 The device 1200 includes: Angle acquisition module 1210 is used to acquire the electrical angle of the motor; The gain processing module 1220 is used to perform gain processing based on the electrical angle, the observer proportional gain parameter and the observer integral gain parameter to obtain the proportional-integral output value. The feedforward processing module 1230 is used to perform feedforward processing based on the electrical angle and feedforward gain parameters to obtain the feedforward output value. The feedforward gain parameters, observer proportional gain parameters, and observer integral gain parameters are all generated based on the velocity loop bandwidth parameters. The observation module 1240 is used to superimpose the proportional-integral output value and the feedforward output value to obtain the speed observation result of the motor.
[0134] In some embodiments, the motor speed observation device further includes a parameter generation module 1250, which is used for: Based on the motor mechanical function and motor state parameters of the motor, the initial motor observation state function is obtained by combining the observer state function. The motor state parameters include electrical angle parameters. Based on the feedback matrix parameters and the output matrix, the initial motor observation state function is transformed to obtain the feedback motor observation state function; Based on the pole placement method, the observed state function of the feedback motor is processed to obtain the optimized feedback matrix. Based on the optimized feedback matrix, feedforward gain parameters, observer proportional gain parameters, and observer integral gain parameters are generated.
[0135] In some embodiments, the parameter generation module 1250 is further configured to: Obtain the feedback motor characteristic function of the observed state function of the feedback motor, which includes the friction force parameter; Based on the pole parameters, the characteristic function of the feedback motor is transformed to obtain the triple root characteristic function. When the friction parameter is zero, the triple root eigenfunction is solved to obtain the optimized feedback matrix.
[0136] In some embodiments, the parameter generation module 1250 is further configured to: Based on the function characteristics of the triple root eigenfunction, the triple root eigenfunction is replaced by the third-order Butterworth eigenfunction. The third-order Butterworth eigenfunction is obtained based on the third-order Butterworth filtering function, which includes the velocity loop bandwidth parameter of the velocity loop. The third-order Butterworth eigenfunction is solved based on the velocity loop bandwidth parameter to obtain the optimized feedback matrix.
[0137] In some embodiments, the parameter generation module 1250 is further configured to: Based on the first optimized feedback parameters, the feedforward gain parameters are obtained; The observer proportional gain parameter is obtained based on the product of the second optimized feedback parameter and the motor's moment of inertia. Based on the third optimized feedback parameter, the observer integral gain parameter is obtained.
[0138] In some embodiments, the gain processing module 1220 is further configured to: The initial proportional-integral output value is obtained by multiplying the electrical angle and the observer proportional gain parameter, and then summing the product of the electrical angle and the observer integral gain parameter. The initial proportional-integral output value is obtained by dividing the motor's moment of inertia and the motor's control parameters in sequence.
[0139] In some embodiments, the observation module 1240 is further configured to: The initial velocity observation parameters are obtained by superimposing the proportional-integral output value and the feedforward output value. The initial speed observation parameters are multiplied by the motor control parameters to obtain the speed observation results.
[0140] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, the specific implementation of the motor speed observation device is basically the same as the specific implementation of the motor speed observation method described above, and will not be repeated here.
[0141] In this embodiment, the motor speed observation device utilizes the mechanical characteristics of the motor and the observer's state function to generate corresponding feedforward gain parameters, proportional gain parameters, and integral gain parameters for the observer. This constructs a digital virtual model within the observer that matches the actual motor scenario. The speed loop bandwidth parameter, which can be adjusted in real-time, serves as the sole variable parameter for the feedforward gain, proportional gain, and integral gain parameters. This allows for quick and easy adjustment of the digital virtual model to match the real-time motor scenario when changes occur. Furthermore, the electric angle, a parameter that can be obtained quickly and in real-time, serves as the basis for motor speed data during real-time observation, significantly improving the real-time performance and accuracy of motor speed observation. Additionally, by utilizing the triple root eigenfunction obtained from the feedback motor characteristic function derived from the feedback motor observation state function, and neglecting friction factors, an optimized feedback matrix is obtained. This allows for the construction of a digital virtual model within the observer that matches the actual motor environment using the obtained optimized feedback matrix, thereby improving the reliability of motor speed observation. Furthermore, by utilizing the similarity in function characteristics between the triple root eigenfunction and the third-order Butterworth eigenfunction, the third-order Butterworth eigenfunction is replaced with the triple root eigenfunction to obtain the corresponding optimized feedback matrix. This transforms the adjustable parameters in the optimized feedback matrix from the previously difficult-to-adjust pole parameters into speed loop bandwidth parameters that are easy to adjust in real time. In actual observations, when the motor environment changes, the digital virtual model within the observer can be quickly and easily adjusted to match the real-time motor scenario by directly adjusting the speed loop bandwidth parameters, thus greatly improving the practicality, real-time performance, and reliability of motor speed observation. Additionally, the feedforward gain section is redesigned using the differential gain section of the original PID controller and replaced with the original differential gain section, thereby avoiding differential amplification noise and improving the reliability and accuracy of motor speed observation.
[0142] This application also provides an electronic device, including: At least one memory; At least one processor; At least one program; The program is stored in a memory, and the processor executes the at least one program to implement the motor speed observation method described above. The electronic device can be any smart terminal, including mobile phones, tablets, personal digital assistants (PDAs), and in-vehicle computers.
[0143] Please see Figure 13 , Figure 13The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes: The processor 1301 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 1302 can be implemented in the form of ROM (Read-Only Memory), static storage device, dynamic storage device, or RAM (Random Access Memory). The memory 1302 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1302 and is called and executed by the processor 1301 to execute the motor speed observation method of the embodiments of this application. The input / output interface 1303 is used to implement information input and output; The communication interface 1304 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 1305 transmits information between various components of the device (e.g., processor 1301, memory 1302, input / output interface 1303, and communication interface 1304); The processor 1301, memory 1302, input / output interface 1303 and communication interface 1304 are connected to each other within the device via bus 1305.
[0144] This application embodiment also provides a storage medium, which is a computer-readable storage medium, storing a computer program that, when executed by a processor, implements the above-described motor speed observation method.
[0145] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0146] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0147] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0148] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0149] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0150] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0151] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0152] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. The coupling or direct coupling or communication connection between the shown or discussed units may be through some interfaces, or indirect coupling or communication connection between the apparatus or units, and may be electrical, mechanical, or other forms.
[0153] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0154] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0155] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0156] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. A method for observing motor speed, characterized in that, The method includes: Obtain the electrical angle of the motor; Gain processing is performed based on the electrical angle, the observer proportional gain parameter, and the observer integral gain parameter to obtain the proportional-integral output value. Feedforward processing is performed based on the electrical angle and feedforward gain parameters to obtain the feedforward output value. The feedforward gain parameters, the observer proportional gain parameters, and the observer integral gain parameters are all generated based on the velocity loop bandwidth of the velocity loop. The speed observation result of the motor is obtained by superimposing the proportional-integral output value and the feedforward output value.
2. The motor speed observation method according to claim 1, characterized in that, The feedforward gain parameter is twice the speed loop bandwidth, the observer proportional gain parameter is the product of the square of twice the speed loop bandwidth and the moment of inertia of the motor, and the observer integral gain parameter is the product of the cube of the speed loop bandwidth and the moment of inertia of the motor.
3. The motor speed observation method according to claim 1, characterized in that, The steps for generating the feedforward gain parameter, the observer proportional gain parameter, and the observer integral gain parameter include: Based on the motor mechanical function and the motor state parameters of the motor, and combined with the observer state function, an initial motor observation state function is obtained by transformation, wherein the motor state parameters include electrical angle parameters; Based on the feedback matrix parameters and the output matrix, the initial motor observation state function is transformed to obtain the feedback motor observation state function; Based on the pole placement method, the observed state function of the feedback motor is processed to obtain an optimized feedback matrix; Based on the optimized feedback matrix, the feedforward gain parameter, the observer proportional gain parameter, and the observer integral gain parameter are generated.
4. The motor speed observation method according to claim 3, characterized in that, The method based on pole placement processes the observed state function of the feedback motor to obtain an optimized feedback matrix, including: Obtain the feedback motor characteristic function of the observed state function of the feedback motor, wherein the feedback motor characteristic function includes friction parameters; The characteristic function of the feedback motor is transformed based on the pole parameters to obtain the triple root characteristic function. When the friction parameter is zero, the triple root eigenfunction is solved to obtain the optimized feedback matrix.
5. The motor speed observation method according to claim 4, characterized in that, Solving the triple root eigenfunction to obtain the optimized feedback matrix includes: Based on the function characteristics of the triple root feature function, the triple root feature function is replaced by the third-order Butterworth feature function, which is obtained based on the third-order Butterworth filter function, which includes the velocity loop bandwidth parameter. The optimized feedback matrix is obtained by solving the third-order Butterworth characteristic function based on the velocity loop bandwidth parameter.
6. The motor speed observation method according to claim 3, characterized in that, The optimized feedback matrix includes a first optimized feedback parameter, a second optimized feedback parameter, and a third optimized feedback parameter. The step of generating the feedforward gain parameter, the observer proportional gain parameter, and the observer integral gain parameter based on the optimized feedback matrix includes: Based on the first optimized feedback parameter, the feedforward gain parameter is obtained; The observer proportional gain parameter is obtained based on the product of the second optimized feedback parameter and the rotational inertia of the motor. Based on the third optimized feedback parameter, the observer integral gain parameter is obtained.
7. The motor speed observation method according to claim 1, characterized in that, The gain processing based on the electrical angle, the observer proportional gain parameter, and the observer integral gain parameter to obtain the proportional-integral output value includes: The initial proportional-integral output value is obtained by multiplying the electrical angle and the observer proportional gain parameter, and then summing the product of the electrical angle and the observer integral gain parameter. The initial proportional-integral output value is obtained by dividing the motor's moment of inertia and the motor's control parameters in sequence.
8. The motor speed observation method according to claim 1, characterized in that, The process of superimposing the proportional-integral output value and the feedforward output value to obtain the speed observation result of the motor includes: The initial velocity observation parameters are obtained by superimposing the proportional-integral output value and the feedforward output value. The initial speed observation parameters are multiplied by the control parameters of the motor to obtain the speed observation result.
9. A motor speed observation device, characterized in that, The device includes: Angle acquisition module, used to acquire the electrical angle of the motor; The gain processing module is used to perform gain processing based on the electrical angle, the observer proportional gain parameter and the observer integral gain parameter to obtain the proportional-integral output value. The feedforward processing module is used to perform feedforward processing based on the electrical angle and feedforward gain parameters to obtain the feedforward output value, wherein the feedforward gain parameters, the observer proportional gain parameters, and the observer integral gain parameters are all generated based on the velocity loop bandwidth parameters; The observation module is used to superimpose the proportional-integral output value and the feedforward output value to obtain the speed observation result of the motor.
10. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the motor speed observation method according to any one of claims 1 to 8.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the motor speed observation method according to any one of claims 1 to 8.