Brushless direct current motor fuzzy PID control method based on neural network matrix

文档序号:1956428 发布日期:2021-12-10 浏览:17次 中文

阅读说明:本技术 基于神经网络矩阵的无刷直流电机模糊pid控制方法 (Brushless direct current motor fuzzy PID control method based on neural network matrix ) 是由 蒋建伟 申立群 于 2021-11-11 设计创作,主要内容包括:本发明涉及无刷直流电机转速控制技术领域,提供一种可以便捷调整控制系统动态性能的智能模糊控制方法,尤其适用于电动自行车和电动汽车驾驶模式设定,特别涉及一种基于神经网络矩阵的无刷直流电机模糊PID控制方法,步骤如下:S1.构建经典的模糊PID控制器;S2.样本数据的采集;S3.神经网络矩阵的构建;S4.神经网络模糊控制器的生成;S5.自由设定控制系统性能指标,神经网络矩阵根据训练结果调整模糊控制器中对应修正值的输出隶属度函数量化值以达到控制要求;本发明通过神经网络矩阵和模糊控制的结合,使得控制系统动态性能可调节,通用性强。(The invention relates to the technical field of brushless direct current motor rotating speed control, provides an intelligent fuzzy control method capable of conveniently adjusting dynamic performance of a control system, is particularly suitable for setting driving modes of electric bicycles and electric automobiles, and particularly relates to a brushless direct current motor fuzzy PID control method based on a neural network matrix, which comprises the following steps: s1, constructing a classical fuzzy PID controller; s2, collecting sample data; s3, constructing a neural network matrix; s4, generating a neural network fuzzy controller; s5, freely setting the performance index of the control system, and adjusting the neural network matrix according to the training resultCorresponding correction values in integer fuzzy controller The quantized value of the membership function is output to meet the control requirement; the invention combines the neural network matrix and the fuzzy control, so that the dynamic performance of the control system can be adjusted, and the universality is strong.)

1. A brushless direct current motor fuzzy PID control method based on a neural network matrix is characterized by comprising the following steps:

s1, constructing a classical fuzzy PID controller: PID parametersThe initial value of the fuzzy rule is adjusted to be close to the working parameter of the control system according to experience, the fuzzy rule is set according to a classical mode, and the corresponding correction value is adjustedOutputting the quantized value of the membership function to obtain different control effects;

s2, collecting sample data: obtaining different system load parametersTime of peak valueAnd maximum overshootCorresponding correction values in a conditional fuzzy controllerTo form sample data, wherein,

s3, constructing a neural network matrix: the neural network matrix comprises a plurality of neural networks, each independent neural network comprises an input layer, a plurality of hidden layers with sigmoid neurons as activation functions and an output layer with linear output neurons as activation functions, and input parameters of the neural networks are system load parametersTime of peak valueAnd maximum overshootThe output value is the corresponding correction value in the fuzzy controllerOutputting a membership function quantized value;

s4, generating a neural network fuzzy controller: combining the neural network matrix and the fuzzy controller to generate the neural network fuzzy controller, finishing the training of the neural network matrix by using the sample data in the step S2, and realizing the corresponding correction value from different performance indexes and load conditions to the fuzzy controllerMapping the output membership function quantized value;

s5, freely setting the performance index of the control system, and adjusting the corresponding correction value in the fuzzy controller by the neural network matrix according to the training resultThe quantized value of the output membership function is used for achieving the control requirement: according to the performance index requirement and the system load parameterInput of (3), corresponding correction values in the neural network matrix automatic adjustment fuzzy controllerTo output the quantized value of the membership function, thereby to adjust the PID parameters in the PID controllerAnd setting to enable the rotating speed of the brushless direct current motor to be adjusted to meet the requirement of a specific performance index.

2. The fuzzy PID control method of the brushless DC motor based on the neural network matrix as claimed in claim 1, wherein the step S4 comprises the following steps:

s41, generating a fuzzy controller: editing and calculating fuzzy set, using rotation speed deviation e and rotation speed deviation change rate ec as input variable of fuzzy controller, correcting valueAs the output variable of the fuzzy controller, a membership function is established through a membership function quantized value, the input membership function corresponds to the operating characteristic of the control system, the setting is not changed at one time, and the input membership function corresponds to a corrected valueThe output membership function quantized value matrix is generated by a trained neural network matrix;

s42, training a neural network matrix: controlling the performance index of the system under the step responseAnd system load parametersAs input data to the neural network matrix, corresponding correction values in the fuzzy controllerOutput membership function quantization value matrixAs output data of the neural network matrix, the neural network matrix is trained, so that the neural network matrix can be used for carrying out training according to different system load parametersTime of peak valueAnd maximum overshootAutomatic generation of corresponding correction values in a fuzzy controllerThe output membership function quantization value matrix ofAs an input to the neural network matrix,

in order to quantify the number of levels,corresponding correction valueNumber of parameters of the 3 output parameters, elements in YFor each neural network output in the neural network matrix, p =1, 2, 3; q =1, 2, …, m;

and S43, combining the neural network matrix and the fuzzy controller to form an intelligent neural network fuzzy controller.

3. The fuzzy PID control method of the brushless DC motor based on the neural network matrix as claimed in claim 2, wherein the training of the neural network matrix in the step S42 adopts a back propagation algorithm or a conjugate gradient method, and the specific steps are as follows:

s421, preparing training data: taking the sample data collected in the step S2 as training data;

s422, training a neural network matrix: training the neural network matrix by using sample data;

s423, testing of the control system: testing the training effect by using sample data, and further testing the control system by using extrapolation;

s424, evaluation of extrapolation effect: according to specific requirements, selecting input parameters which are not sample data and are in the range of performance index requirements and system load parameters, verifying whether the extrapolation effect meets the preset index requirements, and finishing training if the extrapolation effect meets the preset index requirements; otherwise, keeping the input parameters unchanged, and finely adjusting the corresponding correction values in the fuzzy controller by an expert experience methodThe quantized value of the membership function is output to meet the requirement of a preset index, the adjusted result is used as training data, and the neural network matrix is trained again until the extrapolation effect meets the preset index.

4. The fuzzy PID control method of the brushless DC motor based on the neural network matrix as claimed in any one of claims 1-3, wherein the neural network matrix can complete the fitting of the multi-input multi-output control system, and the neural network adopts BP neural network.

5. The fuzzy PID control method of the brushless DC motor based on the neural network matrix according to any one of claims 1-3, wherein the neural network fuzzy controller has intelligent elements, and the neural network matrix is used to configure the corresponding correction values in the fuzzy controllerThe quantized value of the membership function can automatically adjust the corresponding correction value in the fuzzy controller according to the specified performance index and load conditionThe membership function in the fuzzy controller is a triangular function.

Technical Field

The invention relates to the technical field of brushless direct current motor rotating speed control, in particular to a brushless direct current motor fuzzy PID control method based on a neural network matrix.

Background

The brushless direct current motor is widely applied to the fields of aerospace, electric automobiles, industrial automation and the like due to the characteristics of high reliability, high efficiency, noiseless operation, long service life, low maintenance cost and the like. Speed regulation is an important aspect of brushless dc motor research for precise speed and position control applications, requiring well-behaved controllers to achieve speed control and regulation. The brushless direct current motor has the characteristics of multivariable, nonlinearity, strong coupling and the like, and fuzzy control does not need to establish an accurate mathematical model for a controlled motor and has stronger robustness, so that the brushless direct current motor is very suitable for speed regulation of the brushless direct current motor.

In the control process of the traditional PID algorithm, control parameters are fixed and unchanged, the dynamic characteristic adjustment capability of a control system is limited, the response speed is low, the dynamic response is poor, the uncertain and nonlinear condition processing effect of a brushless direct current motor system is poor, and the expected effect on control is difficult to achieve. The fuzzy PID algorithm commonly adopted at present controls and optimizes the brushless direct current motor system, and can fully develop the performance limit of the control system; however, for some application occasions such as an electric automobile or an electric bicycle, the limit performance of the control system does not represent the comfortable feeling of operation and control, and the performance index requirements of the control system are different for different crowds and application occasions, so that the speed regulating system with adjustable dynamic characteristics and variable operation modes has wide application prospects.

Disclosure of Invention

The invention aims to overcome the defects and shortcomings of the prior art and provides a neural network matrix-based brushless direct current motor fuzzy PID control method which combines a neural network matrix and fuzzy control, has an adjustable control system dynamic performance and strong universality.

The technical scheme for realizing the purpose of the invention is as follows: a brushless direct current motor fuzzy PID control method based on a neural network matrix comprises the following steps:

s1, constructing a classical fuzzy PID controller: PID parametersThe initial value of the fuzzy rule is adjusted to be close to the working parameter of the control system according to experience, the fuzzy rule is set according to a classical mode, and the corresponding correction value is adjustedOutputting the quantized value of the membership function to obtain different control effects;

s2, collecting sample data: obtaining different system load parametersTime of peak valueAnd maximum overshootCorresponding correction values in a conditional fuzzy controllerTo form sample data, wherein,

s3, constructing a neural network matrix: the neural network matrix comprises a plurality of neural networks, each independent neural network comprises an input layer, a plurality of hidden layers with sigmoid neurons as activation functions and linear output as one activation functionThe input parameter of the output layer of the neuron is the system load parameterTime of peak valueAnd maximum overshootThe output value is the corresponding correction value in the fuzzy controllerOutputting a membership function quantized value;

s4, generating a neural network fuzzy controller: combining the neural network matrix and the fuzzy controller to generate the neural network fuzzy controller, finishing the training of the neural network matrix by using the sample data in the step S2, and realizing the corresponding correction value from different performance indexes and load conditions to the fuzzy controllerMapping the output membership function quantized value;

s5, freely setting the performance index of the control system, and adjusting the corresponding correction value in the fuzzy controller by the neural network matrix according to the training resultThe quantized value of the output membership function is used for achieving the control requirement: according to the performance index requirement and the system load parameterInput of (3), corresponding correction values in the neural network matrix automatic adjustment fuzzy controllerTo output the quantized value of the membership function, thereby to adjust the PID parameters in the PID controllerAnd setting to enable the rotating speed of the brushless direct current motor to be adjusted to meet the requirement of a specific performance index.

Further, the specific steps of step S4 are as follows:

s41, generating a fuzzy controller: editing and calculating fuzzy set, using rotation speed deviation e and rotation speed deviation change rate ec as input variable of fuzzy controller, correcting valueAs the output variable of the fuzzy controller, a membership function is established through a membership function quantized value, the input membership function corresponds to the operating characteristic of the control system, the setting is not changed at one time, and the input membership function corresponds to a corrected valueThe output membership function quantized value matrix is generated by a trained neural network matrix;

s42, training a neural network matrix: controlling the performance index of the system under the step responseAnd system load parametersAs input data to the neural network matrix, corresponding correction values in the fuzzy controllerOutput membership function quantization value matrixAs output data of the neural network matrix, the neural network matrix is trained, so that the neural network matrix can be used for carrying out training according to different system load parametersTime of peak valueAnd maximum overshootAutomatic generation of corresponding correction values in a fuzzy controllerThe output membership function quantization value matrix ofAs an input to the neural network matrix,

in order to quantify the number of levels,corresponding correction valueNumber of parameters of the 3 output parameters, elements in YFor each neural network output in the neural network matrix, p =1, 2, 3; q =1, 2, …, m;

further, the training of the neural network matrix in step S42 adopts a back propagation algorithm or a conjugate gradient method, and the specific steps are as follows:

s421, preparing training data: taking the sample data collected in the step S2 as training data;

s422, training a neural network matrix: training the neural network matrix by using sample data;

s423, testing of the control system: testing the training effect by using sample data, and further testing the control system by using extrapolation;

s424, evaluation of extrapolation effect: according to specific requirements, selecting input parameters which are not sample data and are in the range of performance index requirements and system load parameters, verifying whether the extrapolation effect meets the preset index requirements, and finishing training if the extrapolation effect meets the preset index requirements; otherwise, keeping the input parameters unchanged, and finely adjusting the corresponding correction values in the fuzzy controller by an expert experience methodThe quantized value of the membership function is output to meet the requirement of a preset index, the adjusted result is used as training data, and the neural network matrix is trained again until the extrapolation effect meets the preset index.

Further, the neural network matrix can complete fitting of a multi-input multi-output control system, and the neural network adopts a BP neural network.

Furthermore, the neural network fuzzy controller is provided with intelligent elements, and the neural network matrix is used for configuring corresponding correction values in the fuzzy controllerThe quantized value of the membership function can automatically adjust the corresponding correction value in the fuzzy controller according to the specified performance index and load conditionThe membership function in the fuzzy controller is a triangular function.

After the technical scheme is adopted, the invention has the following positive effects:

(1) according to the method, the neural network matrix is constructed, training is carried out on the neural network matrix by using training data, and then the corresponding relation between the control system characteristics such as performance indexes and system load parameters and the parameter change of the fuzzy controller is obtained, so that the control performance of the control system is conveniently adjusted;

(2) the invention combines the neural network matrix with the fuzzy controller, and automatically gives the corresponding correction value in the fuzzy controller through the appointed peak time, the maximum overshoot and the system load parameterThe output membership function quantization value matrix to obtain controllers with different performances, is suitable for setting the driving modes of electric bicycles and electric automobiles: the peak time and the maximum overshoot represent response speeds for adjusting the acceleration experience, such as improving the comfort of the vehicle; the system load parameters are used for adjusting the universality of different loads, for example, the system load parameters can be adjusted according to personal weight, vehicle dead weight and the like, so that the applicability of the control system is improved;

(3) the invention adopts the structure of the neural network matrix, solves the problem of high difficulty in training the multi-input multi-output neural network, is more convenient to train the neural network matrix than the multi-input multi-output neural network, has better learning effect and solves the adaptability problem of multi-point output of the neural network.

Drawings

In order that the present disclosure may be more readily and clearly understood, the following detailed description of the present disclosure is provided in connection with specific embodiments thereof and with the accompanying drawings, in which:

FIG. 1 is a flow chart of the present invention;

FIG. 2 is a general block diagram of the present invention;

FIG. 3 shows the present inventionA fuzzy rule table for parameter adjustment;

FIG. 4 shows the present inventionA fuzzy rule table for parameter adjustment;

FIG. 5 shows the present inventionA fuzzy rule table for parameter adjustment;

FIG. 6 is a block diagram of a neural network of the present invention;

FIG. 7 is a diagram showing the relationship between the quantization scale of the triangular function and the membership function according to the present invention;

FIG. 8 is a flow chart of neural network matrix training in accordance with the present invention.

Detailed Description

As shown in fig. 1 and fig. 2, in a control system, that is, a brushless dc motor dual closed-loop speed control system, an inner loop current loop adopts typical PI control, and for a rotation speed loop, a brushless dc motor fuzzy PID control method based on a neural network matrix is adopted, and the method includes the following steps:

s1, constructing a classical fuzzy PID controller: PID parametersIs empirically adjusted to be close to the operating parameters of the control system, fuzzy rules are set in a classical way (as shown in figures 3-5), and corresponding correction values are adjustedOutputting the quantized value of the membership function to obtain different control effects;

s2, collecting sample data: obtaining different system load parametersTime of peak valueAnd maximum overshootCorresponding correction values in a conditional fuzzy controllerTo form sample data, wherein,

s3, constructing a neural network matrix: the neural network matrix comprises a plurality of neural networks, the neural networks adopt BP neural networks, each independent neural network comprises an input layer, a plurality of hidden layers with sigmoid neurons as activation functions and an output layer with linear output neurons as activation functions (as shown in figure 6), and the input parameters are system load parametersTime of peak valueAnd maximum overshootThe output value is the corresponding correction value in the fuzzy controllerOutputting a membership function quantized value; the neural network matrix can complete the fitting of a multi-input multi-output system, thereby reducing the complexity of a single neural network and reducing the training difficulty;

s4, generating a neural network fuzzy controller: combining neural network matrix and fuzzy controller to generate neural networkThe fuzzy controller completes the training of the neural network matrix by using the sample data in the step S2 to realize the corresponding correction value of different performance indexes and load conditions in the fuzzy controllerMapping the output membership function quantized value; the neural network fuzzy controller has intelligent elements, and the neural network matrix is used to configure the corresponding correction values in the fuzzy controllerThe quantized value of the membership function can automatically adjust the corresponding correction value in the fuzzy controller according to the specified performance index and load conditionThe quantized value of the membership function is output, so that the dynamic characteristic of a control system can be conveniently adjusted to adjust different motion modes or control modes;

s5, freely setting the performance index of the control system, and adjusting the corresponding correction value in the fuzzy controller by the neural network matrix according to the training resultThe quantized value of the output membership function is used for achieving the control requirement: according to the performance index requirement and the system load parameterInput of (3), corresponding correction values in the neural network matrix automatic adjustment fuzzy controllerTo output the quantized value of the membership function, thereby to adjust the PID parameters in the PID controllerAnd setting to enable the rotating speed of the brushless direct current motor to be adjusted to meet the requirement of a specific performance index.

The specific steps generated by the neural network fuzzy controller are as follows:

s41, generating a fuzzy controller: editing and calculating fuzzy set, using rotation speed deviation e and rotation speed deviation change rate ec as input variable of fuzzy controller, correcting valueAs the output variable of the fuzzy controller, a membership function is established through a membership function quantized value, the membership function is a triangular function (as shown in figure 7), the input membership function corresponds to the operating characteristics of the control system, the setting is not changed any more once, and the corresponding correction valueThe output membership function quantized value matrix is generated by a trained neural network matrix;

s42, training a neural network matrix: controlling the performance index of the system under the step responseAnd system load parametersAs input data to the neural network matrix, corresponding correction values in the fuzzy controllerOutput membership function quantization value matrixAs a neural netThe output data of the network matrix trains the neural network matrix, so that the neural network matrix can be used for training according to different system load parametersTime of peak valueAnd maximum overshootAutomatic generation of corresponding correction values in a fuzzy controllerThe output membership function quantization value matrix ofAs an input to the neural network matrix,

in order to quantify the number of levels,corresponding correction valueNumber of parameters of the 3 output parameters, elements in YFor each neural network output in the neural network matrix, p =1, 2, 3; q =1, 2, …, m;

and S43, combining the neural network matrix and the fuzzy controller to form an intelligent neural network matrix fuzzy controller.

As shown in fig. 8, the training of the neural network matrix in step S42 adopts a back propagation algorithm or a conjugate gradient method, and includes the following specific steps:

s421, preparing training data: taking the sample data collected in the step S2 as training data;

s422, training a neural network matrix: training the neural network matrix by using sample data;

s423, testing of the control system: testing the training effect by using sample data, and further testing the control system by using extrapolation;

s424, evaluation of extrapolation effect: according to specific requirements, selecting input parameters which are not sample data and are in the range of performance index requirements and system load parameters, verifying whether the extrapolation effect meets the preset index requirements, and finishing training if the extrapolation effect meets the preset index requirements; otherwise, keeping the input parameters unchanged, and finely adjusting the corresponding correction values in the fuzzy controller by an expert experience methodThe quantized value of the membership function is output to meet the requirement of a preset index, the adjusted result is used as training data, and the neural network matrix is trained again until the extrapolation effect meets the preset index.

The fuzzy controller is mainly composed of three modules: fuzzification, fuzzy reasoning and defuzzification. The membership function in the fuzzy controller is a triangular function, and the fuzzy controller has two input variables: the setting modes of the two input variables are similar, and taking one of the two input variables as an example, the fuzzy domain of the input variable is set asThe division is performed according to quantization levels, for example, 7 levels(ii) a For two input variables, the discourse domain and the quantization level of the two input variables are set to be fixed; the output variable corresponding to the correction valueThere are three, one of which is taken as an example, the fuzzy domain of the output variable is set asThe division is performed according to quantization levels, for example, 7 levels(ii) a For three output variables, the quantization levels are generated by training a neural network matrix, the neural network matrix inputs different performance indexes and load conditions, and the neural network matrix generates output membership function corresponding correction valuesA matrix of quantized values of. The fuzzy reasoning adopts a Mamdani reasoning method, the fuzzy statement in the invention is a two-dimensional conditional statement, namely 'if A and B then C', wherein A, B respectively corresponds to the discourse domain of the rotating speed deviation e and the rotating speed deviation change rate ec, and C represents the PID parameter to be setThe domain of discourse of (1); let the membership functions corresponding to the discourse domain of A, B, C be(ii) a The fuzzy controller firstly operates the fuzzy sets A and B, and then establishes the membership function mapping relation of C by using a defuzzification method to give a quantitative numerical value. Inverse modeThe gelatinization adopts a gravity center method, determines a mathematical expression of the defuzzification treatment, such as a formula (1), and further obtains a correction valueCorrection valueInto the following equations (2) to (4), i.e., the PID parameters can be calculatedAnd (6) setting.

(1)

Wherein the content of the first and second substances,representing the output value of the defuzzification calculation,in order to quantize the value of the digital signal,is the degree of membership, P is the number of quantized values, and equation (1) corresponds to the corrected valueThe calculation process of (2);

(2)

(3)

(4)

wherein the content of the first and second substances,is composed ofInitial values of three PID parameters.

The above-mentioned embodiments are intended to illustrate the objects, aspects and advantages of the present invention, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the present invention, and any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

13页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种单脉冲电流磁场启动旋转装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!