WO2023124893A1 - Torque estimation method and apparatus based on neural network, and device and storage medium - Google Patents
Torque estimation method and apparatus based on neural network, and device and storage medium Download PDFInfo
- Publication number
- WO2023124893A1 WO2023124893A1 PCT/CN2022/137809 CN2022137809W WO2023124893A1 WO 2023124893 A1 WO2023124893 A1 WO 2023124893A1 CN 2022137809 W CN2022137809 W CN 2022137809W WO 2023124893 A1 WO2023124893 A1 WO 2023124893A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- torque
- neural network
- motor
- value
- final
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
- G06F30/27—Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2119/00—Details relating to the type or aim of the analysis or the optimisation
- G06F2119/02—Reliability analysis or reliability optimisation; Failure analysis, e.g. worst case scenario performance, failure mode and effects analysis [FMEA]
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02T—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
- Y02T10/00—Road transport of goods or passengers
- Y02T10/60—Other road transportation technologies with climate change mitigation effect
- Y02T10/72—Electric energy management in electromobility
Definitions
- the present application relates to the technical field of motor control, in particular to a neural network-based torque estimation method, device, equipment and storage medium.
- Permanent magnet synchronous motors have the advantages of high power density, high efficiency, and high torque density, and have been widely used in robotics, industrial automation, and electric vehicles.
- the IPMSM is affected by factors such as the nonlinearity, volatility, and operational uncertainty of the motor parameters, it cannot accurately achieve high-precision control of the motor torque. Therefore, in the traditional motor torque control strategy, the control accuracy of the motor electromagnetic torque is relatively low, which degrades the overall performance of the system.
- the extended Kalman filter algorithm is an algorithm derived by researchers based on the fact that the Kalman (KF) filter algorithm cannot effectively track nonlinear systems. It is an approximation to nonlinear systems.
- the processing method has a good estimation effect on the nonlinear characteristics of the permanent magnet synchronous motor, and has strong anti-interference performance, but the calculation amount is relatively large.
- the present application provides a neural network-based torque estimation method, device, device and storage medium to solve the existing problems of large calculation and low accuracy of torque estimation.
- a technical solution adopted by this application is to provide a neural network-based torque estimation method, including: obtaining motor operating parameters in real time; performing feature engineering on the operating parameters of the motor to obtain feature vectors; Input the vector into the trained BP neural network model to obtain the first estimated torque value; input the motor operating parameters into the preset motor torque mathematical estimation model to obtain the second estimated torque value; The moment estimate and the second torque estimate are weighted to obtain a final torque estimate.
- the real-time acquisition of motor operating parameters includes: real-time acquisition of d-axis current, q-axis current and electrical angle parameters of the motor based on a preset acquisition device.
- the calculation formula of the final torque estimation value is:
- f(x n ) represents the first torque estimation value output by the BP neural network model
- E(T) represents the second torque estimation value output by the motor torque mathematical estimation model
- ⁇ represents a preset weight parameter
- ⁇ represents a preset parameter
- the step of pre-training the BP neural network model includes: constructing the BP neural network model to be trained; obtaining the input parameters of the training samples and the actual torque value corresponding to the input parameters of the training samples; inputting the parameters of the training samples Perform feature engineering to obtain sample feature vectors; input sample feature vectors to BP neural network model to obtain sample torque estimates; backpropagate updates based on pre-built loss functions, sample torque estimates, and actual torque values BP neural network model; repeating the above training process until the BP neural network model reaches a preset accuracy or the number of iterations reaches a preset number of times.
- the present application after obtaining the final torque estimate based on the weighted calculation of the first torque estimate and the second torque estimate, it further includes: when the currently running control system is a torque control system, Closed loop control of motor torque based on final torque estimate.
- the motor torque is closed-loop controlled according to the final torque estimation value, including: obtaining the calculation time consumed by calculating the final torque estimation value and the processing time consumed by the control system operation; if the current operation If the processor of the device is a single-core processor, the motor control cycle is set as the sum of calculation time and processing time, and according to the motor control cycle, the motor torque is calculated with the final torque estimate obtained in the motor control cycle Closed-loop control; if the processor of the currently running device is a multi-core processor, set the motor control cycle to the larger value of the calculation time and processing time, and according to the motor control cycle, use the final torque obtained in the motor control cycle The estimated value performs closed-loop control of the motor torque.
- the final torque estimate is obtained through weighted calculations based on the first torque estimate and the second torque estimate, it also includes: when the currently running control system is a non-torque control system , output the final torque estimate as observed data.
- a neural network-based torque estimation device including: an acquisition module for acquiring motor operating parameters in real time; a first estimation module for Perform feature engineering on the motor operating parameters to obtain the feature vector, input the feature vector to the trained BP neural network model, and obtain the first torque estimation value; the second estimation module is used to input the motor operating parameters to the preset
- the motor torque mathematical estimation model is used to obtain a second torque estimation value; the calculation module is used to calculate and obtain a final torque estimation value according to the weighted calculation of the first torque estimation value and the second torque estimation value.
- the computer device includes a processor, a memory coupled to the processor, and program instructions are stored in the memory, so When the program instructions are executed by the processor, the processor is made to execute the steps of the above neural network-based torque estimation method.
- another technical solution adopted by the present application is to provide a storage medium storing program instructions capable of realizing the above-mentioned neural network-based torque estimation method.
- the neural network-based torque estimation method of the present application obtains real-time motor operating parameters, and then inputs the motor operating parameters into the trained BP neural network model and motor torque mathematical estimation model to obtain the first estimated torque value and the second estimated torque value, and then calculate the final estimated torque value according to the first estimated torque value and the second estimated torque value.
- this kind The estimation method combines two prediction results of machine learning prediction and mathematical model prediction, which has better stability and higher prediction accuracy.
- this method of combining machine learning prediction and mathematical model prediction is relatively The Mann filter algorithm has a smaller amount of calculation, and can realize online prediction, does not need offline table lookup, and has lower dependence on device hardware resources.
- FIG. 1 is a schematic flow chart of a neural network-based torque estimation method according to a first embodiment of the present invention
- FIG. 2 is a schematic diagram of functional modules of a neural network-based torque estimation device according to an embodiment of the present invention
- Fig. 3 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
- FIG. 4 is a schematic structural diagram of a storage medium according to an embodiment of the present invention.
- first”, “second”, and “third” in this application are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features. Thus, features defined as “first”, “second”, and “third” may explicitly or implicitly include at least one of these features.
- “plurality” means at least two, such as two, three, etc., unless otherwise specifically defined. All directional indications (such as up, down, left, right, front, back%) in the embodiments of the present application are only used to explain the relative positional relationship between the various components in a certain posture (as shown in the drawings) , sports conditions, etc., if the specific posture changes, the directional indication also changes accordingly.
- FIG. 1 is a schematic flowchart of a neural network-based torque estimation method according to a first embodiment of the present invention. It should be noted that the method of the present invention is not limited to the flow sequence shown in FIG. 1 if substantially the same result is obtained. As shown in Figure 1, the method includes steps:
- Step S101 Acquiring motor operating parameters in real time.
- this embodiment is aimed at real-time and online control of the torque of the motor during the real-time operation of the motor.
- the motor operating parameters of the motor are collected in real time through the device.
- the real-time acquisition of motor operating parameters includes: real-time acquisition of d-axis current, q-axis current and electrical angle parameters of the motor based on a preset acquisition device.
- Step S102 Perform feature engineering on the operating parameters of the motor to obtain feature vectors, and input the feature vectors into the trained BP neural network model to obtain the first estimated torque value.
- the BP neural network model includes an input layer, a hidden layer, and an output layer.
- output layer parameters include input neuron x n ; hidden layer parameters include hidden layer number, hidden layer neuron h p , weight w np and threshold b pq from input layer to hidden layer, hidden layer to hidden layer The weight w pq and the threshold b pq of the output layer; the output layer parameters include output layer neurons T q .
- the internal input and output relationship of the model is as follows:
- the model performance evaluation standard is based on the mean square error (RMSE) between the output value and the true value:
- the neural network model can construct an accurate end-to-end mapping relationship for nonlinear models and complex models, simplifying the complexity of modeling.
- the BP neural network model needs to be trained, and the steps of pre-training the BP neural network model include:
- the sample input parameters and the actual torque value corresponding to each sample input parameter are collected during the actual operation of the motor.
- the torque signal is later than the motor modulation control current signal for a certain period, it is necessary to calibrate and match the collected data.
- the BP neural network model reaches a preset accuracy or iteration
- the number of times reaches the preset number of times, and a trained BP neural network model is obtained.
- Step S103 Input the motor operating parameters into a preset motor torque mathematical estimation model to obtain a second torque estimation value.
- U represents the voltage
- L represents the inductance
- i represents the current
- d represents the d axis
- q represents the q axis
- R represents the stator coil of the motor
- ⁇ represents the flux linkage of the motor
- p represents the number of pole pairs of the motor
- T e represents the second torque Estimated value
- w is the angular velocity of the motor.
- Step S104 weighted calculation according to the first estimated torque value and the second estimated torque value to obtain a final estimated torque value.
- the prediction result of the motor torque mathematical estimation model is integrated with the prediction result of the BP neural network model, thereby improving the estimation stability and accuracy.
- f(x n ) represents the first torque estimation value output by the BP neural network model
- E(T) represents the second torque estimation value output by the motor torque mathematical estimation model
- ⁇ represents a preset weight parameter
- ⁇ represents a preset parameter.
- the ⁇ and ⁇ are preset by the user based on experience.
- the final torque estimation value can also be used to perform torque control on the motor, therefore, the final torque estimation value is calculated according to the weighted calculation of the first torque estimation value and the second torque estimation value to obtain the final torque After the moment estimates, also include:
- the motor torque is closed-loop controlled according to the final torque estimation value.
- the current control system is a torque control system
- the d Axis current, q-axis current and electrical angle parameters and then estimate the d-axis current, q-axis current and electrical angle parameters to obtain the final torque estimation value, and then perform closed-loop control on the torque according to the final torque estimation value .
- the closed-loop control of the motor torque is performed according to the final torque estimation value, including:
- the calculation time refers to the time consumed by the BP neural network model and the motor torque mathematical estimation model from obtaining the motor operating parameters to obtaining the final torque estimation value according to the motor operating parameters
- the processing time refers to the time consumed by the operation of the control system time.
- processor of the currently running device is a single-core processor, set the motor control cycle to the sum of the calculation time and processing time, and according to the motor control cycle, use the final torque estimate obtained in the motor control cycle Closed-loop control of motor torque.
- the processor of the currently running device is a multi-core processor, set the motor control cycle to the larger value of the calculation time and processing time, and according to the motor control cycle, use the final torque obtained in the motor control cycle to estimate The measured value performs closed-loop control on the motor torque.
- the BP neural network model and the motor torque mathematical estimation model are in a serial relationship with the motor control program. Therefore, it is necessary to run the BP neural network after the motor control program is completed. model and motor torque mathematical estimation model, at this time, the motor control cycle is set to the sum of calculation time and processing time, for example, the motor control program can be completed in about 25us, and this BP neural network model and motor rotation The torque mathematical estimation model takes 85us to calculate the final torque estimation value, so the motor control cycle is set to 150us.
- the motor control program and the BP neural network model and the motor torque mathematical estimation model are in parallel with the motor control program. Therefore, the motor control program and the BP neural network model and the motor torque mathematical estimation model can be simultaneously Execution, at this time, the motor control cycle is set to the larger value of the calculation time and processing time, for example, the motor control program can be completed in about 25us, and this time the BP neural network model and the motor torque mathematical estimation model It takes 85us to calculate the final torque estimation value, so the motor control cycle is set to 100us.
- the single-thread processing platform needs longer calculation time, and the motor control performance is slightly reduced, while the multi-thread processing platform has better motor control performance.
- weighted calculation of the first torque estimated value and the second torque estimated value to obtain the final torque estimated value further includes:
- the final estimated torque value is output as observation data.
- the motor operating parameters are respectively input into the trained BP neural network model and the motor torque mathematical estimation model to obtain The first torque estimation value and the second torque estimation value, and then calculate the final torque estimation value according to the first torque estimation value and the second torque estimation value.
- the estimated The method combines machine learning prediction and mathematical model prediction with better stability and higher prediction accuracy.
- this method combines machine learning prediction and mathematical model prediction compared with the extended Kalman filter algorithm The amount of calculation is smaller, and online prediction can be realized, without the need for offline table lookup, and the dependence on device hardware resources is lower.
- FIG. 2 is a schematic diagram of functional modules of a neural network-based torque estimation device according to an embodiment of the present invention.
- the neural network-based torque estimation device 20 includes an acquisition module 21 , a first estimation module 22 , a second estimation module 23 and a calculation module 24 .
- the first estimation module 22 is used to perform feature engineering on the motor operating parameters to obtain the feature vector, and input the feature vector to the trained BP neural network model to obtain the first estimated torque value;
- the second estimation module 23 is configured to input the motor operating parameters into a preset motor torque mathematical estimation model to obtain a second torque estimation value;
- the calculation module 24 is configured to obtain a final torque estimation value through weighted calculation according to the first torque estimation value and the second torque estimation value.
- the acquiring module 21 performs the operation of acquiring the operating parameters of the motor in real time, specifically including: acquiring d-axis current, q-axis current and electrical angle parameters of the motor in real time based on a preset acquisition device.
- the calculation formula of the final torque estimation value is:
- f(x n ) represents the first torque estimation value output by the BP neural network model
- E(T) represents the second torque estimation value output by the motor torque mathematical estimation model
- ⁇ represents a preset weight parameter
- ⁇ represents a preset parameter
- a training module which is used to perform the operation of pre-training the BP neural network model, specifically including: constructing the BP neural network model to be trained; obtaining the training sample input parameters and the actual torque corresponding to the training sample input parameters value; perform feature engineering on the input parameters of the training samples to obtain the sample feature vector; input the sample feature vector to the BP neural network model to obtain the estimated value of the sample torque; based on the pre-built loss function, the estimated value of the sample torque and the actual The torque value is backpropagated to update the BP neural network model; the above training process is repeated until the BP neural network model reaches a preset accuracy or the number of iterations reaches a preset number.
- the calculation module 24 executes the operation of weighting and calculating the final torque estimation value according to the first torque estimation value and the second torque estimation value, it is also used for: when the currently running control system is torque When controlling the system, the motor torque is closed-loop controlled based on the final torque estimate.
- the calculation module 24 executes an operation of performing closed-loop control on the motor torque according to the final torque estimation value, specifically including: obtaining the calculation time consumed by calculating the final torque estimation value and the processing time consumed by the control system operation ; If the processor of the currently running device is a single-core processor, set the motor control cycle to the sum of the calculation time and processing time, and according to the motor control cycle, use the final torque estimate obtained in the motor control cycle to compare The motor torque is closed-loop controlled; if the processor of the currently running device is a multi-core processor, the motor control cycle is set to the larger value of the calculation time and processing time, and according to the motor control cycle, the motor control cycle is obtained Closed-loop control of the motor torque is performed using the final torque estimate.
- the calculation module 24 executes the operation of weighting and calculating the final torque estimation value according to the first torque estimation value and the second torque estimation value, it is also used for: when the currently running control system is non-rotating In the torque control system, the final torque estimated value is output as observation data.
- FIG. 3 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
- the computer device 60 includes a processor 61 and a memory 62 coupled to the processor 61.
- Program instructions are stored in the memory 62.
- the processor 61 performs any of the above-mentioned operations. The steps of the neural network-based torque estimation method described in the embodiment.
- the processor 61 may also be called a CPU (Central Processing Unit, central processing unit).
- the processor 61 may be an integrated circuit chip with signal processing capability.
- the processor 61 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components .
- DSP digital signal processor
- ASIC application-specific integrated circuit
- FPGA field programmable gate array
- a general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.
- FIG. 4 is a schematic structural diagram of a storage medium according to an embodiment of the present invention.
- the storage medium in the embodiment of the present invention stores program instructions 71 capable of realizing all the above-mentioned methods, wherein the program instructions 71 can be stored in the above-mentioned storage medium in the form of software products, including several instructions to make a computer device (which can It is a personal computer, a server, or a network device, etc.) or a processor (processor) that executes all or part of the steps of the methods described in the various embodiments of the present application.
- a computer device which can It is a personal computer, a server, or a network device, etc.
- processor processor
- the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc., which can store program codes. , or computer equipment such as computers, servers, mobile phones, and tablets.
- the disclosed computer equipment, devices and methods may be implemented in other ways.
- the device embodiments described above are only illustrative.
- the division of units is only a logical function division. In actual implementation, there may be other division methods.
- multiple units or components can be combined or integrated. to another system, or some features may be ignored, or not implemented.
- the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
- each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
- the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units. The above is only the implementation mode of this application, and does not limit the scope of patents of this application. Any equivalent structure or equivalent process transformation made by using the contents of this application specification and drawings, or directly or indirectly used in other related technical fields, All are included in the scope of patent protection of the present application in the same way.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Medical Informatics (AREA)
- Computer Hardware Design (AREA)
- Geometry (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Control Of Electric Motors In General (AREA)
- Control Of Ac Motors In General (AREA)
Abstract
Description
本申请涉及基于电机控制技术领域,特别是涉及一种基于神经网络的转矩估测方法、装置、设备及存储介质。The present application relates to the technical field of motor control, in particular to a neural network-based torque estimation method, device, equipment and storage medium.
永磁同步电机具有高功率密度、高效率、高转矩密度等优点已经被广泛的应用于机器人、工业自动化以及电动汽车等领域。但由于IPMSM受到电机参数的非线性、波动性以及运行不确定性等因素影响,导致其无法准确地实现电机转矩的高精度控制。因此,在传统的电机转矩控制策略中,电机电磁转矩的控制精度偏低,使系统整体的性能下降。Permanent magnet synchronous motors have the advantages of high power density, high efficiency, and high torque density, and have been widely used in robotics, industrial automation, and electric vehicles. However, because the IPMSM is affected by factors such as the nonlinearity, volatility, and operational uncertainty of the motor parameters, it cannot accurately achieve high-precision control of the motor torque. Therefore, in the traditional motor torque control strategy, the control accuracy of the motor electromagnetic torque is relatively low, which degrades the overall performance of the system.
为了提高永磁同步电机转矩估算精度,国内外学者已经研究出很多方案,可以分为离线和在线两类。对于离线方案,通常是查表获得,查表法是根据离线实验或者有限元分析模拟到的,基于查表法的方法既简单又具有鲁棒性,但是实现该方法非常耗时,需要利用大量的硬件资源,占据大量的储存空间,并且在每一台机器上进行测试是不切实际的,这些因素大大降低了转矩估算的效率和应用范围。对于在线方法,通常采用扩展卡尔曼滤波算法,扩展卡尔曼滤波算法(EKF)是学者根据卡尔曼(KF)滤波算法无法有效跟踪非线性系统推导出来的算法,是一种对非线性系统的近似处理方法,其对永磁同步电机非线性特性有较好的估算效果,抗干扰性较强,但计算量也相对较大。In order to improve the torque estimation accuracy of permanent magnet synchronous motors, scholars at home and abroad have developed many schemes, which can be divided into two types: offline and online. For offline solutions, it is usually obtained by looking up a table. The table lookup method is simulated based on off-line experiments or finite element analysis. The method based on the table lookup method is simple and robust, but it is very time-consuming to implement and requires a large number of hardware resources, occupy a large amount of storage space, and it is impractical to test on each machine, these factors greatly reduce the efficiency and application range of torque estimation. For online methods, the extended Kalman filter algorithm is usually used. The extended Kalman filter algorithm (EKF) is an algorithm derived by scholars based on the fact that the Kalman (KF) filter algorithm cannot effectively track nonlinear systems. It is an approximation to nonlinear systems. The processing method has a good estimation effect on the nonlinear characteristics of the permanent magnet synchronous motor, and has strong anti-interference performance, but the calculation amount is relatively large.
发明内容Contents of the invention
本申请提供一种基于神经网络的转矩估测方法、装置、设备及存储介质,以解决现有的转矩估测计算量大且准确率较低的问题。The present application provides a neural network-based torque estimation method, device, device and storage medium to solve the existing problems of large calculation and low accuracy of torque estimation.
为解决上述技术问题,本申请采用的一个技术方案是:提供一种基 于神经网络的转矩估测方法,包括:实时获取电机运行参数;对电机运行参数进行特征工程,得到特征向量,将特征向量输入至训练好的BP神经网络模型,得到第一转矩估测值;将电机运行参数输入至预设的电机转矩数学估测模型,得到第二转矩估测值;根据第一转矩估测值和第二转矩估测值加权计算得到最终转矩估测值。In order to solve the above-mentioned technical problems, a technical solution adopted by this application is to provide a neural network-based torque estimation method, including: obtaining motor operating parameters in real time; performing feature engineering on the operating parameters of the motor to obtain feature vectors; Input the vector into the trained BP neural network model to obtain the first estimated torque value; input the motor operating parameters into the preset motor torque mathematical estimation model to obtain the second estimated torque value; The moment estimate and the second torque estimate are weighted to obtain a final torque estimate.
作为本申请的进一步改进,实时获取电机运行参数,包括:基于预设的采集设备实时获取电机的d轴电流、q轴电流和电角度参数。As a further improvement of the present application, the real-time acquisition of motor operating parameters includes: real-time acquisition of d-axis current, q-axis current and electrical angle parameters of the motor based on a preset acquisition device.
作为本申请的进一步改进,最终转矩估测值的计算公式为:As a further improvement of the present application, the calculation formula of the final torque estimation value is:
其中, 表示最终转矩估测值,f(x n)表示BP神经网络模型输出的第一转矩估测值,E(T)表示电机转矩数学估测模型输出的第二转矩估测值,α表示预设权重参数,β表示预设置参数。 in, Represents the final torque estimation value, f(x n ) represents the first torque estimation value output by the BP neural network model, E(T) represents the second torque estimation value output by the motor torque mathematical estimation model, α represents a preset weight parameter, and β represents a preset parameter.
作为本申请的进一步改进,预先训练BP神经网络模型的步骤,包括:构建待训练的BP神经网络模型;获取训练样本输入参数以及与训练样本输入参数对应的实际转矩值;对训练样本输入参数进行特征工程,得到样本特征向量;将样本特征向量输入至BP神经网络模型,得到样本转矩估测值;基于预先构建的损失函数、样本转矩估测值和实际转矩值反向传播更新BP神经网络模型;重复执行上述训练过程直至BP神经网络模型达到预设精度或迭代次数达到预设次数时为止。As a further improvement of the present application, the step of pre-training the BP neural network model includes: constructing the BP neural network model to be trained; obtaining the input parameters of the training samples and the actual torque value corresponding to the input parameters of the training samples; inputting the parameters of the training samples Perform feature engineering to obtain sample feature vectors; input sample feature vectors to BP neural network model to obtain sample torque estimates; backpropagate updates based on pre-built loss functions, sample torque estimates, and actual torque values BP neural network model; repeating the above training process until the BP neural network model reaches a preset accuracy or the number of iterations reaches a preset number of times.
作为本申请的进一步改进,根据第一转矩估测值和第二转矩估测值加权计算得到最终转矩估测值之后,还包括:在当前运行的控制系统为转矩控制系统时,根据最终转矩估测值对电机转矩进行闭环控制。As a further improvement of the present application, after obtaining the final torque estimate based on the weighted calculation of the first torque estimate and the second torque estimate, it further includes: when the currently running control system is a torque control system, Closed loop control of motor torque based on final torque estimate.
作为本申请的进一步改进,根据最终转矩估测值对电机转矩进行闭环控制,包括:获取计算最终转矩估测值所消耗的计算时间和控制系统运行所消耗的处理时间;若当前运行设备的处理器为单核处理器,则将电机控制周期设定为计算时间和处理时间之和,并按照电机控制周期,以电机控制周期内获取的最终转矩估测值对电机转矩进行闭环控制;若当前运行设备的处理器为多核处理器,则将电机控制周期设定为计算时间和处理时间中的较大值,并按照电机控制周期,以电机控制周期内获 取的最终转矩估测值对电机转矩进行闭环控制。As a further improvement of the present application, the motor torque is closed-loop controlled according to the final torque estimation value, including: obtaining the calculation time consumed by calculating the final torque estimation value and the processing time consumed by the control system operation; if the current operation If the processor of the device is a single-core processor, the motor control cycle is set as the sum of calculation time and processing time, and according to the motor control cycle, the motor torque is calculated with the final torque estimate obtained in the motor control cycle Closed-loop control; if the processor of the currently running device is a multi-core processor, set the motor control cycle to the larger value of the calculation time and processing time, and according to the motor control cycle, use the final torque obtained in the motor control cycle The estimated value performs closed-loop control of the motor torque.
作为本申请的进一步改进,根据第一转矩估测值和第二转矩估测值加权计算得到最终转矩估测值之后,还包括:在当前运行的控制系统为非转矩控制系统时,将最终转矩估测值作为观测数据输出。As a further improvement of the present application, after the final torque estimate is obtained through weighted calculations based on the first torque estimate and the second torque estimate, it also includes: when the currently running control system is a non-torque control system , output the final torque estimate as observed data.
为解决上述技术问题,本申请采用的另一个技术方案是:提供一种基于神经网络的转矩估测装置,包括:获取模块,用于实时获取电机运行参数;第一估测模块,用于对电机运行参数进行特征工程,得到特征向量,将特征向量输入至训练好的BP神经网络模型,得到第一转矩估测值;第二估测模块,用于将电机运行参数输入至预设的电机转矩数学估测模型,得到第二转矩估测值;计算模块,用于根据第一转矩估测值和第二转矩估测值加权计算得到最终转矩估测值。In order to solve the above technical problems, another technical solution adopted by the present application is to provide a neural network-based torque estimation device, including: an acquisition module for acquiring motor operating parameters in real time; a first estimation module for Perform feature engineering on the motor operating parameters to obtain the feature vector, input the feature vector to the trained BP neural network model, and obtain the first torque estimation value; the second estimation module is used to input the motor operating parameters to the preset The motor torque mathematical estimation model is used to obtain a second torque estimation value; the calculation module is used to calculate and obtain a final torque estimation value according to the weighted calculation of the first torque estimation value and the second torque estimation value.
为解决上述技术问题,本申请采用的再一个技术方案是:提供一种计算机设备,所述计算机设备包括处理器、与所述处理器耦接的存储器,所述存储器中存储有程序指令,所述程序指令被所述处理器执行时,使得所述处理器执行上述的基于神经网络的转矩估测方法的步骤。In order to solve the above technical problems, another technical solution adopted by the present application is to provide a computer device, the computer device includes a processor, a memory coupled to the processor, and program instructions are stored in the memory, so When the program instructions are executed by the processor, the processor is made to execute the steps of the above neural network-based torque estimation method.
为解决上述技术问题,本申请采用的再一个技术方案是:提供一种存储介质,存储有能够实现上述基于神经网络的转矩估测方法的程序指令。In order to solve the above-mentioned technical problems, another technical solution adopted by the present application is to provide a storage medium storing program instructions capable of realizing the above-mentioned neural network-based torque estimation method.
本申请的有益效果是:本申请的基于神经网络的转矩估测方法通过获取实时的电机运行参数后,将该电机运行参数分别输入至训练好的BP神经网络模型和电机转矩数学估测模型,得到第一转矩估测值和第二转矩估测值,再根据第一转矩估测值和第二转矩估测值计算得到最终转矩估测值,一方面,该种估测的方式结合了机器学习预测和数学模型预测两种预测结果,其稳定性更好,预测精度更高,另一方面,该种结合了机器学习预测和数学模型预测的方式相对于扩展卡尔曼滤波算法的计算量更小,且能够实现在线预测,不需要离线查表的方式,对设备硬件资源的依赖性更低。The beneficial effects of the present application are: the neural network-based torque estimation method of the present application obtains real-time motor operating parameters, and then inputs the motor operating parameters into the trained BP neural network model and motor torque mathematical estimation model to obtain the first estimated torque value and the second estimated torque value, and then calculate the final estimated torque value according to the first estimated torque value and the second estimated torque value. On the one hand, this kind The estimation method combines two prediction results of machine learning prediction and mathematical model prediction, which has better stability and higher prediction accuracy. On the other hand, this method of combining machine learning prediction and mathematical model prediction is relatively The Mann filter algorithm has a smaller amount of calculation, and can realize online prediction, does not need offline table lookup, and has lower dependence on device hardware resources.
图1是本发明第一实施例的基于神经网络的转矩估测方法的流程示意图;FIG. 1 is a schematic flow chart of a neural network-based torque estimation method according to a first embodiment of the present invention;
图2是本发明实施例的基于神经网络的转矩估测装置的功能模块示意图;2 is a schematic diagram of functional modules of a neural network-based torque estimation device according to an embodiment of the present invention;
图3是本发明实施例的计算机设备的结构示意图;Fig. 3 is a schematic structural diagram of a computer device according to an embodiment of the present invention;
图4是本发明实施例的存储介质的结构示意图。FIG. 4 is a schematic structural diagram of a storage medium according to an embodiment of the present invention.
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本申请的一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.
本申请中的术语“第一”、“第二”、“第三”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”、“第三”的特征可以明示或者隐含地包括至少一个该特征。本申请的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有明确具体的限定。本申请实施例中所有方向性指示(诸如上、下、左、右、前、后……)仅用于解释在某一特定姿态(如附图所示)下各部件之间的相对位置关系、运动情况等,如果该特定姿态发生改变时,则该方向性指示也相应地随之改变。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", and "third" in this application are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features. Thus, features defined as "first", "second", and "third" may explicitly or implicitly include at least one of these features. In the description of the present application, "plurality" means at least two, such as two, three, etc., unless otherwise specifically defined. All directional indications (such as up, down, left, right, front, back...) in the embodiments of the present application are only used to explain the relative positional relationship between the various components in a certain posture (as shown in the drawings) , sports conditions, etc., if the specific posture changes, the directional indication also changes accordingly. Furthermore, the terms "include" and "have", as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes unlisted steps or units, or optionally further includes For other steps or units inherent in these processes, methods, products or apparatuses.
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥 的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The appearances of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are independent or alternative embodiments mutually exclusive of other embodiments. It is understood explicitly and implicitly by those skilled in the art that the embodiments described herein can be combined with other embodiments.
图1是本发明第一实施例的基于神经网络的转矩估测方法的流程示意图。需注意的是,若有实质上相同的结果,本发明的方法并不以图1所示的流程顺序为限。如图1所示,该方法包括步骤:FIG. 1 is a schematic flowchart of a neural network-based torque estimation method according to a first embodiment of the present invention. It should be noted that the method of the present invention is not limited to the flow sequence shown in FIG. 1 if substantially the same result is obtained. As shown in Figure 1, the method includes steps:
步骤S101:实时获取电机运行参数。Step S101: Acquiring motor operating parameters in real time.
需要说明的是,本实施例是针对电机实时运作过程中,对电机的转矩进行实时地、在线地控制。It should be noted that this embodiment is aimed at real-time and online control of the torque of the motor during the real-time operation of the motor.
具体地,在电机运行过程中,通过设备实时采集电机的电机运行参数。Specifically, during the operation of the motor, the motor operating parameters of the motor are collected in real time through the device.
其中,该实时获取电机运行参数,包括:基于预设的采集设备实时获取电机的d轴电流、q轴电流和电角度参数。Wherein, the real-time acquisition of motor operating parameters includes: real-time acquisition of d-axis current, q-axis current and electrical angle parameters of the motor based on a preset acquisition device.
步骤S102:对电机运行参数进行特征工程,得到特征向量,将特征向量输入至训练好的BP神经网络模型,得到第一转矩估测值。Step S102: Perform feature engineering on the operating parameters of the motor to obtain feature vectors, and input the feature vectors into the trained BP neural network model to obtain the first estimated torque value.
具体地,在得到电机运行参数,对该电机运行参数进行特征工程,得到该电机运行参数的特征向量,再将该特征向量输入至预先训练好的BP神经网络模型,通过BP神经网络模型预测得到第一转矩估测值。Specifically, after obtaining the operating parameters of the motor, perform feature engineering on the operating parameters of the motor to obtain the eigenvector of the operating parameters of the motor, and then input the eigenvector into the pre-trained BP neural network model, and obtain The first torque estimate.
需要说明的是,BP神经网络模型包括输入层,隐含层,输出层。其中输出层参数有输入神经元x n;隐含层参数有隐含层层数、隐含层神经元h p、输入层到隐含层的权值w np与阈值b pq、隐含层到输出层的权值w pq与阈值b pq;输出层参数有输出层神经元T q。模型内部输入输出关系如下: It should be noted that the BP neural network model includes an input layer, a hidden layer, and an output layer. Among them, output layer parameters include input neuron x n ; hidden layer parameters include hidden layer number, hidden layer neuron h p , weight w np and threshold b pq from input layer to hidden layer, hidden layer to hidden layer The weight w pq and the threshold b pq of the output layer; the output layer parameters include output layer neurons T q . The internal input and output relationship of the model is as follows:
ho h(n)=f(hi h(n)),h=1,2,…,p; ho h (n) = f (hi h (n)), h = 1, 2, ..., p;
To o(n)=f(Ti o(n)),o=1,2,…,q; To o (n) = f (Ti o (n)), o = 1, 2, ..., q;
其中激活函数为:where the activation function is:
f(x)=1/(1+e -x); f(x)=1/(1+e -x );
该模型性能评价标准以输出值与真实值的均方误差(RMSE)为参考:The model performance evaluation standard is based on the mean square error (RMSE) between the output value and the true value:
神经网络模型能对非线性模型、复杂模型构建精确端对端映射关系,简化了建模复杂程度。The neural network model can construct an accurate end-to-end mapping relationship for nonlinear models and complex models, simplifying the complexity of modeling.
进一步的,在使用BP神经网络模型件预测之前,需要对BP神经网络模型进行训练,该预先训练BP神经网络模型的步骤,包括:Further, before using the BP neural network model to predict, the BP neural network model needs to be trained, and the steps of pre-training the BP neural network model include:
1、构建待训练的BP神经网络模型。1. Construct the BP neural network model to be trained.
2、获取训练样本输入参数以及与训练样本输入参数对应的实际转矩值。2. Obtain the training sample input parameters and the actual torque value corresponding to the training sample input parameters.
具体地,该样本输入参数和每个样本输入参数对应的实际转矩值在电机实际运行中采集获得的,值得注意的是,理想情况下,认为电机运行状态与控制同时完成,但实际应用过程中,由于存在机械响应延时,即转矩信号要晚于电机调制控制电流信号一定周期,因此需要对采集数据进行数据校准匹配。Specifically, the sample input parameters and the actual torque value corresponding to each sample input parameter are collected during the actual operation of the motor. In , due to the mechanical response delay, that is, the torque signal is later than the motor modulation control current signal for a certain period, it is necessary to calibrate and match the collected data.
3、对训练样本输入参数进行特征工程,得到样本特征向量。3. Perform feature engineering on the input parameters of the training samples to obtain the sample feature vectors.
4、将样本特征向量输入至BP神经网络模型,得到样本转矩估测值。4. Input the sample feature vector into the BP neural network model to obtain the estimated value of the sample torque.
5、基于预先构建的损失函数、样本转矩估测值和实际转矩值反向传播更新BP神经网络模型。5. Update the BP neural network model based on the pre-built loss function, sample torque estimation value and actual torque value backpropagation.
重复执行上述训练过程直至BP神经网络模型达到预设精度或迭代次数达到预设次数时为止。Repeat the above training process until the BP neural network model reaches the preset accuracy or the number of iterations reaches the preset number.
本实施例中,通过在训练过程中,不断筛选和调整网络模型结构,包括网络神经元个数、隐含层层数、学习率、训练次数,使得该BP神经网络模型达到预设精度或迭代次数达到预设次数,得到训练好的BP神经网络模型。In this embodiment, by continuously screening and adjusting the network model structure during the training process, including the number of network neurons, the number of hidden layers, the learning rate, and the number of training times, the BP neural network model reaches a preset accuracy or iteration The number of times reaches the preset number of times, and a trained BP neural network model is obtained.
步骤S103:将电机运行参数输入至预设的电机转矩数学估测模型,得到第二转矩估测值。Step S103: Input the motor operating parameters into a preset motor torque mathematical estimation model to obtain a second torque estimation value.
具体地,两相坐标系下,该电机转矩数学估测模型表示为:Specifically, under the two-phase coordinate system, the mathematical estimation model of the motor torque is expressed as:
其中,U表示电压,L表示电感,i表示电流,d表示d轴,q表示q轴,R为电机定子线圈,ψ为电机磁链,p是电机极对数,T e是第二转矩估测值,w是电机角速度。 Among them, U represents the voltage, L represents the inductance, i represents the current, d represents the d axis, q represents the q axis, R represents the stator coil of the motor, ψ represents the flux linkage of the motor, p represents the number of pole pairs of the motor, T e represents the second torque Estimated value, w is the angular velocity of the motor.
步骤S104:根据第一转矩估测值和第二转矩估测值加权计算得到最终转矩估测值。Step S104: weighted calculation according to the first estimated torque value and the second estimated torque value to obtain a final estimated torque value.
需要说明的是,电机转矩数学估测模型在实际应用中,由于电机运行中存在系统参数变化、磁体饱和、谐波扰动等非线性因素,其输出转矩与实际转矩存在很大误差,因此,本实施例中,将电机转矩数学估测模型的预测结果与BP神经网络模型的预测结果进行整合,进而提高估算稳定性和精确度。It should be noted that, in the actual application of the motor torque mathematical estimation model, there is a large error between the output torque and the actual torque due to nonlinear factors such as system parameter changes, magnet saturation, and harmonic disturbances during motor operation. Therefore, in this embodiment, the prediction result of the motor torque mathematical estimation model is integrated with the prediction result of the BP neural network model, thereby improving the estimation stability and accuracy.
进一步的,最终转矩估测值的计算公式为:Further, the calculation formula of the final torque estimation value is:
其中, 表示最终转矩估测值,f(x n)表示BP神经网络模型输出的第一转矩估测值,E(T)表示电机转矩数学估测模型输出的第二转矩估测值,α表示预设权重参数,β表示预设置参数。具体地,该α和β由用户预先根据经验设置。 in, Represents the final torque estimation value, f(x n ) represents the first torque estimation value output by the BP neural network model, E(T) represents the second torque estimation value output by the motor torque mathematical estimation model, α represents a preset weight parameter, and β represents a preset parameter. Specifically, the α and β are preset by the user based on experience.
进一步的,在一些实施例中,该最终转矩估测值还可用于对电机进行转矩控制,因此,在根据第一转矩估测值和第二转矩估测值加权计算得到最终转矩估测值之后,还包括:Further, in some embodiments, the final torque estimation value can also be used to perform torque control on the motor, therefore, the final torque estimation value is calculated according to the weighted calculation of the first torque estimation value and the second torque estimation value to obtain the final torque After the moment estimates, also include:
在当前运行的控制系统为转矩控制系统时,根据最终转矩估测值对电机转矩进行闭环控制。When the currently running control system is a torque control system, the motor torque is closed-loop controlled according to the final torque estimation value.
具体地,在将上述BP神经网络模型和电机转矩数学估测模型嵌入到电机控制程序中后,若当前运行的控制系统为转矩控制系统时,即可通过实时采集电机运行过程中的d轴电流、q轴电流和电角度参数,再以d轴电流、q轴电流和电角度参数进行估测,得到最终转矩估测值, 再根据最终转矩估测值对转矩进行闭环控制。Specifically, after embedding the above-mentioned BP neural network model and motor torque mathematical estimation model into the motor control program, if the current control system is a torque control system, the d Axis current, q-axis current and electrical angle parameters, and then estimate the d-axis current, q-axis current and electrical angle parameters to obtain the final torque estimation value, and then perform closed-loop control on the torque according to the final torque estimation value .
需要说明的是,电机控制程序当前运行设备处理器核心数的不同会使得电机控制的执行存在区别,因此,根据最终转矩估测值对电机转矩进行闭环控制,具体包括:It should be noted that the difference in the number of processor cores of the current running device of the motor control program will cause differences in the execution of the motor control. Therefore, the closed-loop control of the motor torque is performed according to the final torque estimation value, including:
1、获取计算最终转矩估测值所消耗的计算时间和控制系统运行所消耗的处理时间。1. Obtain the calculation time consumed for calculating the final torque estimation value and the processing time consumed for the operation of the control system.
其中,计算时间是指BP神经网络模型和电机转矩数学估测模型从获取到电机运行参数到根据电机运行参数得到最终转矩估测值所消耗的时间,处理时间是指控制系统运行所消耗的时间。Among them, the calculation time refers to the time consumed by the BP neural network model and the motor torque mathematical estimation model from obtaining the motor operating parameters to obtaining the final torque estimation value according to the motor operating parameters, and the processing time refers to the time consumed by the operation of the control system time.
2、若当前运行设备的处理器为单核处理器,则将电机控制周期设定为计算时间和处理时间之和,并按照电机控制周期,以电机控制周期内获取的最终转矩估测值对电机转矩进行闭环控制。2. If the processor of the currently running device is a single-core processor, set the motor control cycle to the sum of the calculation time and processing time, and according to the motor control cycle, use the final torque estimate obtained in the motor control cycle Closed-loop control of motor torque.
3、若当前运行设备的处理器为多核处理器,则将电机控制周期设定为计算时间和处理时间中的较大值,并按照电机控制周期,以电机控制周期内获取的最终转矩估测值对电机转矩进行闭环控制。3. If the processor of the currently running device is a multi-core processor, set the motor control cycle to the larger value of the calculation time and processing time, and according to the motor control cycle, use the final torque obtained in the motor control cycle to estimate The measured value performs closed-loop control on the motor torque.
具体地,在当前设备为单核处理器时,则BP神经网络模型和电机转矩数学估测模型与电机控制程序是串行关系,因此,需要在电机控制程序完成后,再运行BP神经网络模型和电机转矩数学估测模型,此时,电机控制周期则设置为计算时间和处理时间之和,例如,电机控制程序用时为25us左右即可完成,而本次BP神经网络模型和电机转矩数学估测模型计算最终转矩估测值用时为85us,则电机控制周期设定为150us。Specifically, when the current device is a single-core processor, the BP neural network model and the motor torque mathematical estimation model are in a serial relationship with the motor control program. Therefore, it is necessary to run the BP neural network after the motor control program is completed. model and motor torque mathematical estimation model, at this time, the motor control cycle is set to the sum of calculation time and processing time, for example, the motor control program can be completed in about 25us, and this BP neural network model and motor rotation The torque mathematical estimation model takes 85us to calculate the final torque estimation value, so the motor control cycle is set to 150us.
在当前设备为多核处理器时,则BP神经网络模型和电机转矩数学估测模型与电机控制程序是并行关系,因此,电机控制程序与BP神经网络模型和电机转矩数学估测模型可同时执行,此时,电机控制周期则设置为计算时间和处理时间中的较大值,例如,电机控制程序用时为25us左右即可完成,而本次BP神经网络模型和电机转矩数学估测模型计算最终转矩估测值用时为85us,则电机控制周期设定为100us。When the current device is a multi-core processor, the BP neural network model and the motor torque mathematical estimation model are in parallel with the motor control program. Therefore, the motor control program and the BP neural network model and the motor torque mathematical estimation model can be simultaneously Execution, at this time, the motor control cycle is set to the larger value of the calculation time and processing time, for example, the motor control program can be completed in about 25us, and this time the BP neural network model and the motor torque mathematical estimation model It takes 85us to calculate the final torque estimation value, so the motor control cycle is set to 100us.
可知,单线程处理平台需要计算时间更长,则对电机控制性能略有降低,而多线程处理平台对电机控制性能更强。It can be seen that the single-thread processing platform needs longer calculation time, and the motor control performance is slightly reduced, while the multi-thread processing platform has better motor control performance.
进一步的,在根据第一转矩估测值和第二转矩估测值加权计算得到最终转矩估测值之后,还包括:Further, after the weighted calculation of the first torque estimated value and the second torque estimated value to obtain the final torque estimated value, further includes:
在当前运行的控制系统为非转矩控制系统时,将最终转矩估测值作为观测数据输出。When the currently operating control system is a non-torque control system, the final estimated torque value is output as observation data.
本发明第一实施例的基于神经网络的转矩估测方法通过获取实时的电机运行参数后,将该电机运行参数分别输入至训练好的BP神经网络模型和电机转矩数学估测模型,得到第一转矩估测值和第二转矩估测值,再根据第一转矩估测值和第二转矩估测值计算得到最终转矩估测值,一方面,该种估测的方式结合了机器学习预测和数学模型预测两种预测结果,其稳定性更好,预测精度更高,另一方面,该种结合了机器学习预测和数学模型预测的方式相对于扩展卡尔曼滤波算法的计算量更小,且能够实现在线预测,不需要离线查表的方式,对设备硬件资源的依赖性更低。In the neural network-based torque estimation method of the first embodiment of the present invention, after obtaining real-time motor operating parameters, the motor operating parameters are respectively input into the trained BP neural network model and the motor torque mathematical estimation model to obtain The first torque estimation value and the second torque estimation value, and then calculate the final torque estimation value according to the first torque estimation value and the second torque estimation value. On the one hand, the estimated The method combines machine learning prediction and mathematical model prediction with better stability and higher prediction accuracy. On the other hand, this method combines machine learning prediction and mathematical model prediction compared with the extended Kalman filter algorithm The amount of calculation is smaller, and online prediction can be realized, without the need for offline table lookup, and the dependence on device hardware resources is lower.
图2是本发明实施例的基于神经网络的转矩估测装置的功能模块示意图。如图2所示,该基于神经网络的转矩估测装置20包括获取模块21、第一估测模块22、第二估测模块23和计算模块24。FIG. 2 is a schematic diagram of functional modules of a neural network-based torque estimation device according to an embodiment of the present invention. As shown in FIG. 2 , the neural network-based
获取模块21,用于实时获取电机运行参数;Obtaining
第一估测模块22,用于对电机运行参数进行特征工程,得到特征向量,将特征向量输入至训练好的BP神经网络模型,得到第一转矩估测值;The
第二估测模块23,用于将电机运行参数输入至预设的电机转矩数学估测模型,得到第二转矩估测值;The
计算模块24,用于根据第一转矩估测值和第二转矩估测值加权计算得到最终转矩估测值。The
可选地,获取模块21执行实时获取电机运行参数的操作,具体包括:基于预设的采集设备实时获取电机的d轴电流、q轴电流和电角度参数。Optionally, the acquiring
可选地,最终转矩估测值的计算公式为:Optionally, the calculation formula of the final torque estimation value is:
其中, 表示最终转矩估测值,f(x n)表示BP神经网络模型输出的第一转矩估测值,E(T)表示电机转矩数学估测模型输出的第二转矩估测值,α表示预设权重参数,β表示预设置参数。 in, Represents the final torque estimation value, f(x n ) represents the first torque estimation value output by the BP neural network model, E(T) represents the second torque estimation value output by the motor torque mathematical estimation model, α represents a preset weight parameter, and β represents a preset parameter.
可选地,其还包括训练模块,用于执行预先训练BP神经网络模型的操作,具体包括:构建待训练的BP神经网络模型;获取训练样本输入参数以及与训练样本输入参数对应的实际转矩值;对训练样本输入参数进行特征工程,得到样本特征向量;将样本特征向量输入至BP神经网络模型,得到样本转矩估测值;基于预先构建的损失函数、样本转矩估测值和实际转矩值反向传播更新BP神经网络模型;重复执行上述训练过程直至BP神经网络模型达到预设精度或迭代次数达到预设次数时为止。Optionally, it also includes a training module, which is used to perform the operation of pre-training the BP neural network model, specifically including: constructing the BP neural network model to be trained; obtaining the training sample input parameters and the actual torque corresponding to the training sample input parameters value; perform feature engineering on the input parameters of the training samples to obtain the sample feature vector; input the sample feature vector to the BP neural network model to obtain the estimated value of the sample torque; based on the pre-built loss function, the estimated value of the sample torque and the actual The torque value is backpropagated to update the BP neural network model; the above training process is repeated until the BP neural network model reaches a preset accuracy or the number of iterations reaches a preset number.
可选地,计算模块24执行根据第一转矩估测值和第二转矩估测值加权计算得到最终转矩估测值的操作之后,还用于:在当前运行的控制系统为转矩控制系统时,根据最终转矩估测值对电机转矩进行闭环控制。Optionally, after the
可选地,计算模块24执行根据最终转矩估测值对电机转矩进行闭环控制的操作,具体包括:获取计算最终转矩估测值所消耗的计算时间和控制系统运行所消耗的处理时间;若当前运行设备的处理器为单核处理器,则将电机控制周期设定为计算时间和处理时间之和,并按照电机控制周期,以电机控制周期内获取的最终转矩估测值对电机转矩进行闭环控制;若当前运行设备的处理器为多核处理器,则将电机控制周期设定为计算时间和处理时间中的较大值,并按照电机控制周期,以电机控制周期内获取的最终转矩估测值对电机转矩进行闭环控制。Optionally, the
可选地,计算模块24执行根据第一转矩估测值和第二转矩估测值加权计算得到最终转矩估测值的操作之后,还用于:在当前运行的控制系统为非转矩控制系统时,将最终转矩估测值作为观测数据输出。Optionally, after the
关于上述实施例基于神经网络的转矩估测装置中各模块实现技术方案的其他细节,可参见上述实施例中的基于神经网络的转矩估测方法中的描述,此处不再赘述。For other details of implementing the technical solution of each module in the neural network-based torque estimation device of the above-mentioned embodiment, please refer to the description of the neural network-based torque estimation method in the above-mentioned embodiment, which will not be repeated here.
需要说明的是,本说明书中的各个实施例均采用递进的方式描述, 每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。对于装置类实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. For the same and similar parts in each embodiment, refer to each other. Can. As for the device-type embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and for related parts, please refer to part of the description of the method embodiments.
请参阅图3,图3为本发明实施例的计算机设备的结构示意图。如图6所示,该计算机设备60包括处理器61及和处理器61耦接的存储器62,存储器62中存储有程序指令,程序指令被处理器61执行时,使得处理器61执行上述任一实施例所述的基于神经网络的转矩估测方法的步骤。Please refer to FIG. 3 . FIG. 3 is a schematic structural diagram of a computer device according to an embodiment of the present invention. As shown in FIG. 6, the
其中,处理器61还可以称为CPU(Central Processing Unit,中央处理单元)。处理器61可能是一种集成电路芯片,具有信号的处理能力。处理器61还可以是通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。Wherein, the
参阅图4,图4为本发明实施例的存储介质的结构示意图。本发明实施例的存储介质存储有能够实现上述所有方法的程序指令71,其中,该程序指令71可以以软件产品的形式存储在上述存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请各个实施方式所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质,或者是计算机、服务器、手机、平板等计算机设备设备。Referring to FIG. 4 , FIG. 4 is a schematic structural diagram of a storage medium according to an embodiment of the present invention. The storage medium in the embodiment of the present invention
在本申请所提供的几个实施例中,应该理解到,所揭露的计算机设备,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所 显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed computer equipment, devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated. to another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。以上仅为本申请的实施方式,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units. The above is only the implementation mode of this application, and does not limit the scope of patents of this application. Any equivalent structure or equivalent process transformation made by using the contents of this application specification and drawings, or directly or indirectly used in other related technical fields, All are included in the scope of patent protection of the present application in the same way.
Claims (10)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111677859.2 | 2021-12-31 | ||
| CN202111677859.2A CN116415478A (en) | 2021-12-31 | 2021-12-31 | Torque estimation method, device, equipment and storage medium based on neural network |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2023124893A1 true WO2023124893A1 (en) | 2023-07-06 |
Family
ID=86997652
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2022/137809 Ceased WO2023124893A1 (en) | 2021-12-31 | 2022-12-09 | Torque estimation method and apparatus based on neural network, and device and storage medium |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN116415478A (en) |
| WO (1) | WO2023124893A1 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117879411A (en) * | 2024-03-11 | 2024-04-12 | 深圳市昱森机电有限公司 | Control method, device, equipment and storage medium of direct current brush motor |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102567782A (en) * | 2011-12-21 | 2012-07-11 | 浙江吉利汽车研究院有限公司 | Neural-network-based automobile engine torque estimation method |
| US10829149B1 (en) * | 2017-03-01 | 2020-11-10 | Zoox, Inc. | Steering control for vehicles |
| CN112101530A (en) * | 2020-11-10 | 2020-12-18 | 南京集成电路产业服务中心有限公司 | Neural network training method, device, equipment and storage medium |
| CN112561180A (en) * | 2020-12-21 | 2021-03-26 | 深圳大学 | Short-term wind speed prediction method and device, computer equipment and storage medium |
-
2021
- 2021-12-31 CN CN202111677859.2A patent/CN116415478A/en active Pending
-
2022
- 2022-12-09 WO PCT/CN2022/137809 patent/WO2023124893A1/en not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102567782A (en) * | 2011-12-21 | 2012-07-11 | 浙江吉利汽车研究院有限公司 | Neural-network-based automobile engine torque estimation method |
| US10829149B1 (en) * | 2017-03-01 | 2020-11-10 | Zoox, Inc. | Steering control for vehicles |
| CN112101530A (en) * | 2020-11-10 | 2020-12-18 | 南京集成电路产业服务中心有限公司 | Neural network training method, device, equipment and storage medium |
| CN112561180A (en) * | 2020-12-21 | 2021-03-26 | 深圳大学 | Short-term wind speed prediction method and device, computer equipment and storage medium |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117879411A (en) * | 2024-03-11 | 2024-04-12 | 深圳市昱森机电有限公司 | Control method, device, equipment and storage medium of direct current brush motor |
| CN117879411B (en) * | 2024-03-11 | 2024-05-31 | 深圳市昱森机电有限公司 | Control method, device, equipment and storage medium of direct current brush motor |
Also Published As
| Publication number | Publication date |
|---|---|
| CN116415478A (en) | 2023-07-11 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2023124921A1 (en) | Torque estimation method and apparatus for permanent magnet synchronous motor, and device and storage medium | |
| CN106385211B (en) | A kind of stepper motor load-toque estimate method | |
| CN113364386B (en) | H-infinity current control method and system based on reinforcement learning of permanent magnet synchronous motor | |
| JP7090734B2 (en) | Control system, control method and storage medium | |
| WO2023240844A1 (en) | Electromagnetic transient modeling method and system for high-efficiency synchronous machine, and device | |
| CN104993765A (en) | Method for estimating rotating speed of brushless direct current motor | |
| CN103544525A (en) | Method for identifying parameters of synchronous wind-driven generators on basis of improved particle swarm optimization algorithm | |
| CN116938066A (en) | A method for parameter identification of permanent magnet synchronous motor based on dung beetle optimization algorithm | |
| CN114239800A (en) | Neural network structure searching method and device, electronic equipment and storage medium | |
| CN107579689A (en) | A speed control method of ultra-high speed permanent magnet synchronous motor based on PID neural network controller | |
| CN112564557A (en) | Control method, device and equipment of permanent magnet synchronous motor and storage medium | |
| CN115481549A (en) | Cylindrical linear motor multi-objective optimization method, equipment and storage medium | |
| CN114614714A (en) | Method for stably controlling high-speed domain of speed-sensorless induction motor | |
| WO2023124893A1 (en) | Torque estimation method and apparatus based on neural network, and device and storage medium | |
| CN117040355A (en) | Synchronous reluctance motor model prediction speed control method, system, chip and equipment | |
| CN116915103A (en) | A sensorless and parameterless current prediction control method for permanent magnet synchronous motors | |
| CN115546258A (en) | Novel interactive multi-model state estimation method and system | |
| CN106849801A (en) | A kind of induction-type bearingless motor method for estimating rotating speed | |
| CN114372036B (en) | State estimation method, device, equipment and computer storage medium for power system | |
| Quang et al. | FPGA sensorless PMSM drive with adaptive fading extended Kalman filtering | |
| CN114900085B (en) | Robot joint servo motor model prediction parameter optimization method and device | |
| CN110320800A (en) | Control system compensation method, device, medium and smart machine | |
| CN115765560A (en) | Permanent magnet synchronous motor multi-parameter identification method and system based on improved whale algorithm | |
| CN114679098A (en) | Feedforward compensation method, device, computer equipment and medium for permanent magnet synchronous motor | |
| CN115133830A (en) | A state measurement method of permanent magnet synchronous motor based on speed loop |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22914148 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 22914148 Country of ref document: EP Kind code of ref document: A1 |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 11/04/2025) |