Calculation method of angular velocity and angular acceleration
By converting the transfer function of the third-order differential observer into a state space expression and discrete it using Euler's numerical integral method, the noise amplification problem of angular velocity and angular acceleration calculation in the motor servo control system is solved, and high precision and low The result of noise.
Patent Information
- Application Number
- CN202411226925.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2024-12-06
AI Technical Summary
In high-performance motor servo control systems, it is difficult for the prior art to accurately calculate angular velocity and angular acceleration. Common first-order differential operations will lead to noise amplification, and the value of the sampling time T is difficult, affecting the signal-to-noise ratio.
The third-order differential observer is used to convert its transfer function into a state space expression, and discrete it by Euler's numerical integration method, and the angular velocity and angular acceleration are obtained through iterative calculations. The third-order differential observer itself has a low-pass filtering effect. Suppress noise.
The calculation accuracy of angular velocity and angular acceleration is improved, the influence of noise is reduced, and high signal quality results are obtained.
Smart Images

Figure CN119088100A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of motor servo control, and in particular to a method for calculating angular velocity and angular acceleration. Background Art
[0002] In high-performance motor servo control systems, it is usually necessary to know the angle, angular velocity and angular acceleration information of the motor, which is generally provided by the encoder. However, common encoder models can usually only provide a single angle information, and the angular velocity and angular acceleration need to be calculated by the controller based on the angle information.
[0003] In a continuous-time system, if the angle provided by the encoder is known to be θ, then the corresponding angular velocity is:
[0004] ω=θ' (1),
[0005] Angular acceleration is: α=ω'=θ”(2)
[0006] From the above formulas, we can see that to obtain angular velocity and angular acceleration through angle, we need to perform first-order differential and second-order differential operations on the angle respectively. However, microprocessors cannot perform differential operations. Therefore, in actual engineering, first-order differential operations are often converted into first-order difference operations to obtain differential approximations:
[0007]
[0008] In formula (3), T represents the sampling time of the discrete system, θ(t) represents the angle obtained by the current sampling, and θ(tT) represents the angle obtained by the previous sampling. The difference between the two and then divided by T actually gives the average angular velocity within the current sampling time. The same reason (4) also gives the average angular acceleration within this sampling time period: When T is small enough, the average value can be approximated to the instantaneous value, that is:
[0009]
[0010] However, ideally, in order to make the angular velocity and angular acceleration calculated by equations (3) and (4) as close to the instantaneous value as possible, T should be as small as possible. However, in reality, θ is often superimposed with measurement noise due to the limitations of the encoder's quantization accuracy and the interference of the working environment. For the first-order differential operation, this noise will be reversely amplified, and the smaller T is, the more obvious the amplification effect will be, which will eventually lead to a low signal-to-noise ratio of the calculated result, and it may even be submerged by the noise. This influence is very important for It is more serious for the angular velocity and angular acceleration, because solving it is equivalent to performing two differential operations. Therefore, the value of T cannot be too small when using equations (3) and (4) to obtain angular velocity and angular acceleration. This contradictory statement makes it difficult to select a suitable T value in actual engineering, which greatly restricts the use value of equations (3) and (4). Summary of the invention
[0011] Based on this, it is necessary to provide a method for calculating angular velocity and angular acceleration to address the technical problem of defects in first-order difference operations in obtaining angular velocity and angular acceleration.
[0012] A method for calculating angular velocity and angular acceleration comprises the following steps:
[0013] Convert the transfer function of the third-order differential observer into a state-space expression;
[0014] The state space expression is discretized using Euler numerical integration method;
[0015] A discretized third-order differential observer is used to iteratively calculate the angle value obtained by the encoder as an input signal;
[0016] The angular velocity and angular acceleration values can be obtained by iterating the calculation until the discretized third-order differential observer converges.
[0017] In one embodiment, the transfer function of the third-order differential observer is: Among them, r is the gain parameter of the third-order differential observer, v is the input signal, and y is the output signal.
[0018] In one embodiment, the step of converting the transfer function of the third-order differential observer into a state space expression comprises:
[0019] Let: x1=y, x2=x'1=y', x3=x'2=y";
[0020] Convert equation (6) into state space expression:
[0021]
[0022] When the observer system is in a steady-state response, the output signal y will approach the input signal v.
[0023] In one embodiment, the step of discretizing the state space expression using the Euler numerical integration method comprises:
[0024] Let h be the integration step time;
[0025] The Euler numerical integration method is used to discretize equation (7) to obtain the discretized third-order differential observer:
[0026]
[0027] In one embodiment, the step of using a discretized third-order differential observer to iteratively calculate the angle value obtained by the encoder as an input signal comprises:
[0028] The input signal v of the third-order differential observer is equal to the angle value θ;
[0029] Substitute the angle value θ into formula (8), and use formula (8) to iteratively calculate the angle value θ.
[0030] In one embodiment, the step of iteratively calculating until the discretized third-order differential observer converges to simultaneously obtain the angular velocity value and the angular acceleration value comprises:
[0031] In the iterative calculation process of the angle value θ, when the discretized third-order differential observer converges, x1 will approach θ, and then according to formula (7), we can obtain:
[0032]
[0033] Among them, ω is the angular velocity and α is the angular acceleration, that is, the angular velocity value and the angular acceleration value are obtained at the same time.
[0034] The above-mentioned calculation method of angular velocity and angular acceleration uses a third-order differential observer to simultaneously obtain the angular velocity and angular acceleration, converts the transfer function of the third-order differential observer into a state-space expression, and discretizes the state-space expression using a simple Euler numerical integration method, and then uses the discretized third-order differential observer to iteratively calculate the angle value obtained by the encoder as the input signal; the iterative calculation is performed until the discretized third-order differential observer converges, and the angular velocity value and angular acceleration value can be obtained at the same time. Unlike the first-order differential operation that amplifies the noise of the input signal, it can be seen from the transfer function of the third-order differential observer that it itself has a low-pass filtering effect. Therefore, in addition to having an excellent differential function, the third-order differential observer also has a good suppression effect on the noise of the input signal, and the shorter the integration step time, the higher the calculation accuracy of the discretized differential observer will be, and the more obvious the suppression effect on noise will be. Using a third-order differential observer, angular velocity and angular acceleration with very high signal quality can be obtained. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 FIG. 4 is a flow chart of a method for calculating angular velocity and angular acceleration in one embodiment. DETAILED DESCRIPTION
[0036] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention, so the present invention is not limited by the specific embodiments disclosed below.
[0037] See also Figure 1 The present invention provides a method 10 for calculating angular velocity and angular acceleration, and the method 10 for calculating angular velocity and angular acceleration comprises the following steps:
[0038] S101, converting the transfer function of the third-order differential observer into a state space expression;
[0039] S102, discretizing the state space expression using the Euler numerical integration method;
[0040] S103, using a discretized third-order differential observer to perform iterative calculation on the angle value obtained by the encoder as an input signal;
[0041] S104, iterative calculation until the discretized third-order differential observer converges, and the angular velocity value and the angular acceleration value can be obtained simultaneously.
[0042] The above-mentioned calculation method 10 of angular velocity and angular acceleration uses a third-order differential observer to simultaneously obtain the angular velocity and angular acceleration, converts the transfer function of the third-order differential observer into a state space expression, and discretizes the state space expression using a simple Euler numerical integration method, and then uses the discretized third-order differential observer to iteratively calculate the angle value obtained by the encoder as the input signal; iterative calculation is performed until the discretized third-order differential observer converges, and the angular velocity value and angular acceleration value can be obtained at the same time. Unlike the first-order differential operation that amplifies the noise of the input signal, it can be seen from the transfer function of the third-order differential observer that it itself has a low-pass filtering effect. Therefore, in addition to having an excellent differential function, the third-order differential observer also has a good suppression effect on the noise of the input signal, and the shorter the integration step time, the higher the calculation accuracy of the discretized differential observer will be, and the more obvious the suppression effect on noise will be. Using a third-order differential observer, angular velocity and angular acceleration with very high signal quality can be obtained.
[0043] In order to better describe the relationship between the output signal and the input signal, in one embodiment, the transfer function of the third-order differential observer is introduced for explanation. Specifically, the transfer function of the third-order differential observer is: Among them, r is the gain parameter of the third-order differential observer, v is the input signal, and y is the output signal.
[0044] In order to better describe the relationship between the internal state of the motor servo control system and the input signal, in one embodiment, a state space model, that is, a state space expression, is introduced. Specifically, the step of converting the transfer function of the third-order differential observer into a state space expression includes:
[0045] Let: x1=y, x2=x'1=y', x3=x'2=y";
[0046] Convert equation (6) into state space expression:
[0047]
[0048] When the observer system is in a steady-state response, the output signal y will approach the input signal v.
[0049] For step S102, specifically, the Euler numerical integration method is one of the methods for solving ordinary differential equations. Using the Euler numerical integration method, a relatively complex differential equation expression can be efficiently solved by a microprocessor. In this embodiment, the state space expression is discretized using the Euler numerical integration method, so that the complex state space expression can be solved by the microprocessor.
[0050] In order to facilitate the microprocessor to solve, in one embodiment, the step of discretizing the state space expression using the Euler numerical integration method includes:
[0051] Let h be the integration step time;
[0052] The Euler numerical integration method is used to discretize equation (7) to obtain the discretized third-order differential observer:
[0053]
[0054] For step S103, specifically, the iteration method is a typical method in numerical calculation, which is applied to finding the root of an equation, solving a system of equations, finding the eigenvalue of a matrix, etc. In this embodiment, the angle value obtained by the encoder is used as an input signal to iterate into a discretized third-order differential observer for calculation to obtain a numerical solution to the differential equation.
[0055] In one embodiment, the step of using a discretized third-order differential observer to iteratively calculate the angle value obtained by the encoder as an input signal comprises:
[0056] The input signal v of the third-order differential observer is equal to the angle value θ;
[0057] Substitute the angle value θ into formula (8), and use formula (8) to iteratively calculate the angle value θ.
[0058] For step S104, specifically, the convergence of the discretized third-order differential observer means that during the iterative calculation process, the output signal of the third-order differential observer can gradually approach the input signal, and when the system reaches a steady state, the output signal can be equal to the input signal. This process is completed within a limited time, and the convergence speed is related to the gain parameter of the observer. The larger the gain parameter, the faster the convergence speed. In actual engineering applications, the angle value obtained by the encoder is used as the input signal of the third-order differential observer. By adjusting the observer gain parameter, the observer can achieve convergence in a very short time, thereby achieving real-time dynamic tracking of the output signal to the angle value. Since the third-order differential observer itself can calculate the first-order and second-order differentials of the output signal, the first-order and second-order differentials of the angle value, that is, the angular velocity value and the angular acceleration value, can be obtained.
[0059] The steps of iteratively calculating until the discretized third-order differential observer converges to simultaneously obtain the angular velocity value and the angular acceleration value include:
[0060] In the iterative calculation process of the angle value θ, when the discretized third-order differential observer converges, x1 will approach θ, and then according to formula (7), we can obtain:
[0061]
[0062] Among them, ω is the angular velocity and α is the angular acceleration, that is, the angular velocity value and the angular acceleration value are obtained at the same time.
[0063] In order to facilitate understanding of the calculation method of the angular velocity and angular acceleration of the present invention, the following is an example of a method of using a third-order differential observer to simultaneously obtain the angular velocity and angular acceleration using a specific implementation.
[0064] Specifically, in view of the defects of first-order differential operation in obtaining angular velocity and angular acceleration, the present invention proposes a method of using a third-order differential observer to simultaneously obtain angular velocity and angular acceleration.
[0065] The transfer function of the third-order differential observer is:
[0066]
[0067] Where r is the observer gain parameter, v is the input signal, y is the output signal, and y will approach v when the system is in a steady-state response.
[0068] Let: x1=y, x2=x'1=y', x3=x'2=y", and transform (6) into a state space expression:
[0069]
[0070] In order to facilitate microprocessor calculation, the simple Euler numerical integration method is used to discretize (7), and h is set as the integration step time, and the result is:
[0071]
[0072] The discretized third-order differential observer can be easily iteratively calculated by a microprocessor.
[0073] For the above third-order differential observer, the angle value obtained by the encoder is θ, let v = θ, and use formula (8) for iterative calculation. When the observer converges, x1 will approach θ, so:
[0074]
[0075] Therefore, the angular velocity and angular acceleration can be obtained at the same time.
[0076] It can be understood that, unlike the first-order differential operation, which has an amplifying effect on the noise of the input signal, the transfer function of the third-order differential observer shows that it has a low-pass filtering effect. Therefore, in addition to having an excellent differential function, the third-order differential observer also has a good suppression effect on the noise of the input signal. Moreover, the shorter the integration step time h, the higher the calculation accuracy of the discretized differential observer will be, and the more obvious the suppression effect on noise will be. Using the third-order differential observer, angular velocity and angular acceleration with very high signal quality can be obtained.
[0077] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0078] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A method for calculating angular velocity and angular acceleration, characterized in that: The steps include: Convert the transfer function of the third-order differential observer into a state-space expression; The state space expression is discretized using Euler numerical integration method; A discretized third-order differential observer is used to iteratively calculate the angle value obtained by the encoder as an input signal; The angular velocity and angular acceleration values can be obtained by iterating the calculation until the discretized third-order differential observer converges.
2. The method for calculating angular velocity and angular acceleration according to claim 1, characterized in that: The transfer function of the third-order differential observer is: Among them, r is the gain parameter of the third-order differential observer, v is the input signal, and y is the output signal.
3. The method for calculating angular velocity and angular acceleration according to claim 2, characterized in that: The step of converting the transfer function of the third-order differential observer into a state space expression comprises: Let: x1=y, x2=x'1=y', x3=x'2=y"; Convert equation (6) into state space expression: When the observer system is in a steady-state response, the output signal y will approach the input signal v.
4. The method for calculating angular velocity and angular acceleration according to claim 3, characterized in that: The step of discretizing the state space expression using the Euler numerical integration method comprises: Let h be the integration step time; The Euler numerical integration method is used to discretize equation (7) to obtain the discretized third-order differential observer:
5. The method for calculating angular velocity and angular acceleration according to claim 4, characterized in that: The step of using a discretized third-order differential observer to iteratively calculate the angle value obtained by the encoder as an input signal comprises: The input signal v of the third-order differential observer is equal to the angle value θ; Substitute the angle value θ into formula (8), and use formula (8) to iteratively calculate the angle value θ.
6. The method for calculating angular velocity and angular acceleration according to claim 5, characterized in that: The step of iteratively calculating until the discretized third-order differential observer converges to simultaneously obtain the angular velocity value and the angular acceleration value comprises: In the iterative calculation process of the angle value θ, when the discretized third-order differential observer converges, x1 will approach θ, and then according to formula (7), we can obtain: Among them, ω is the angular velocity and α is the angular acceleration, that is, the angular velocity value and the angular acceleration value are obtained at the same time.
