Surface permanent magnetic Synchronous Machine Models forecast Control Algorithm based on BP neural network

文档序号:1758321 发布日期:2019-11-29 浏览:23次 中文

阅读说明:本技术 基于bp神经网络的表面式永磁同步电机模型预测控制方法 (Surface permanent magnetic Synchronous Machine Models forecast Control Algorithm based on BP neural network ) 是由 李耀华 赵承辉 周逸凡 秦玉贵 秦辉 苏锦仕 于 2019-08-30 设计创作,主要内容包括:本发明公开了基于BP神经网络的表面式永磁同步电机模型预测控制方法,本发明首先通过表面式永磁同步电机模型预测控制算法中的输入量和输出量生成最优电压矢量序列,再通过最优电压矢量序列训练BP神经网络拓扑模型,采用训练后的BP神经网络替代表面式永磁同步电机模型预测算法,BP神经网络具有强大的非线性拟合和模式识别分类的能力,可以大大减少算法的运算时间和运算负担,提高系统的及时性,同时具有结构简单、精度较高、反应速度快等优点,而且神经网络分布式并行运算的特点使得大量运算成为可能,可以减轻系统计算负担,提高系统响应及时性,相对于传统的模型预测算法具有一定的创新优势,验证了智能算法在电机控制中的应用前景。(The invention discloses the surface permanent magnetic Synchronous Machine Models forecast Control Algorithms based on BP neural network, the present invention passes through input quantity and output quantity generation optimal voltage vector sequence in surface permanent magnetic Synchronous Machine Models predictive control algorithm first, pass through optimal voltage vector sequence training BP neural network topological model again, surface-type permanent magnet synchronous motor model prediction algorithm is substituted using the BP neural network after training, BP neural network has the ability of powerful nonlinear fitting and pattern recognition classifier, operation time and the computational burden of algorithm can be greatly reduced, the timeliness of raising system, have structure simple simultaneously, precision is higher, the advantages that reaction speed is fast, and the characteristics of neural network distributed parallel operation, makes it possible a large amount of operations, system-computed burden can be mitigated, raising system responds timeliness , there is certain innovation advantage relative to traditional model prediction algorithm, demonstrate application prospect of the intelligent algorithm in motor control.)

1. the surface permanent magnetic Synchronous Machine Models forecast Control Algorithm based on BP neural network, which is characterized in that including following Step:

Step 1 determines input quantity and output quantity in surface permanent magnetic Synchronous Machine Models predictive control algorithm, and nerve The input quantity and output quantity of network, and determine the variation range of motor reference rotation velocity and load torque;

Step 2, according to reference rotation velocity step two ways under load torque step under constant reference revolving speed and constant load torque The case where reference rotation velocity changes under the case where load torque under different reference rotation velocities is changed and different loads torque is according to certain Step-length and interval traversal get, and by the data of the above-mentioned input quantity accordingly generated be sent into surface permanent magnetic Synchronous Machine Models In predictive control algorithm, the optimal voltage vector sequence of Model Predictive Control Algorithm selection in the following control period is generated, and By the value of each input quantity training sample for being combined into BP neural network corresponding with the optimal voltage vector that corresponding selection comes out;

Step 3 constructs BP neural network topological model;

Training sample data in step 2 are normalized step 4, and the training sample after normalized is defeated Enter to have constructed and is trained study in BP neural network topological model;

Trained BP neural network model insertion to surface permanent magnetic Synchronous Machine Models is predicted Direct torque by step 5 Alternative model predictive control algorithm carries out the work of motor optimal voltage vector selection and function in the following control period in system processed Energy.

2. the surface permanent magnetic Synchronous Machine Models forecast Control Algorithm according to claim 1 based on BP neural network, It is characterized in that, determining the input quantity and output quantity in surface permanent magnetic Synchronous Machine Models predictive control algorithm in step 1 And the specific method is as follows for neural network input quantity and output quantity:

Ignore rotor rotational movement and Stator resistance voltage dropping, after applying nonzero voltage space vector, subsequent time stator magnetic linkage amplitude and Torque is as shown in formula 1.1:

It is the amplitude of current K moment stator magnetic linkage,It is the stator magnetic linkage amplitude at k+1 moment,It is currently to want The voltage vector magnitude of application, fixed amplitude set tentering value for voltage vector, amplitude is constantly equal toIts Middle UdcIt is DC bus-bar voltage;Δ t is the action time that the voltage vector applies, α be voltage vector and stator magnetic linkage vector it Between angle;

The torque of subsequent time stator magnetic linkage is as shown in formula 1.2:

Te(k+1) be the k+1 moment motor torque, p is the number of pole-pairs of motor, ψfIt is permanent magnet flux linkage,It is the current K moment The amplitude of stator magnetic linkage, LdFor d axis stator inductance, α is the angle between voltage vector and stator magnetic linkage vector, and δ (k) is current The angle of torsion at K moment;

Cost function used is as shown in formula 1.3:

The result that formula 1.1 and formula 1.2 are calculated is sent into cost function, if there is n alternative voltage vectors, then can obtain n A cost function numerical value, selecting voltage vector corresponding to the smallest numerical value of cost function to control in the period as the calculating will apply Add to the optimal voltage vector of motor.

3. the surface permanent magnetic Synchronous Machine Models PREDICTIVE CONTROL side according to claim 1 or 2 based on BP neural network Method, which is characterized in that the input quantity of surface permanent magnetic Synchronous Machine Models predictive control algorithm has angle of torsion respectively, works as front stator Magnetic linkage amplitude, current stator magnetic linkage Angle Position, Reference Stator Flux Linkage, torque reference, alternative voltage vector angle, output quantity is selection Voltage vector;

Remove constant from input quantity, characteristic dimension is simplified, as the input quantity of neural network, selected voltage vector As the output quantity of neural network, constant includes Reference Stator Flux Linkage and alternative voltage vector angle.

4. the surface permanent magnetic Synchronous Machine Models forecast Control Algorithm according to claim 1 based on BP neural network, It is characterized in that, in step 2, it will be in corresponding value range according to certain step-length and interval by programming or the Realization of Simulation Two kinds of situations of change traversal get.

5. the surface permanent magnetic Synchronous Machine Models forecast Control Algorithm according to claim 1 based on BP neural network, It is characterized in that, in step 3, the feedforward neural network that BP neural network topological model is three layers, according to hidden layer node experience FormulaDetermine node in hidden layer, wherein a is the constant between 0~10, on this basis further basis Commissioning experience determines hidden layer node number, and input layer corresponds to input quantity, and output node layer is equal to alternative voltage vector Number;

The tanh that the activation primitive of neuron in the hidden layer and output layer of BP neural network is all made of tansig type passes Delivery function, the expression formula of tansig function are f (x)=2/ (1+exp (- 2*x)) -1.

6. the surface permanent magnetic Synchronous Machine Models forecast Control Algorithm according to claim 1 based on BP neural network, It is characterized in that, normalization uses default treatment mode in step 4, processing mode is as follows:

In formula, xmin is the minimum number in data series, and xmax is the maximum number in sequence, and ymin and ymax are specified normalizing Change range.

7. the surface permanent magnetic Synchronous Machine Models forecast Control Algorithm according to claim 1 based on BP neural network, It is characterized in that, BP neural network topological model is trained study, and the specific method is as follows in step 4:

The first step, the training sample after normalized respectively correspond surface permanent magnetic Synchronous Machine Models prediction algorithm per one-dimensional In dependent variable, that is, input quantity, input is combined into training sample sequence (X, Y) with output, X is input data, and Y is corresponding Output data;

Second step, the training sample sequence (X, Y) being combined into according to system input and output determine network input layer number of nodes n, hidden Connection weight ω between the l of number containing node layer, output layer number of nodes m, input layer and hidden layer neuronij, hidden layer and output Connection weight ω between layer neuronjk, hidden layer threshold value a, output layer threshold value b, given learning rate and neuron motivate letter Number;

Third step, according to input variable X, input layer and implicit interlayer connection weight ωijAnd hidden layer threshold value a, it calculates implicit Layer output H;

In formula, l is node in hidden layer, and f is general hidden layer excitation function, selected function are as follows:

- 1 formula 1.6 of f (x)=2/ (1+exp (- 2*x))

4th step exports H, connection weight ω according to hidden layerjkWith threshold value b, BP neural network prediction output O is calculated;

5th step exports O and desired output Y according to neural network forecast, calculates neural network forecast error J;

ek=Yk-OkK=1,2 ..., m formula 1.8

6th step, according to J, according to gradient descent method direction calculating, and successively adjusts weight threshold, takes step by output layer A length of η can obtain t+1 adjustment formula of the connection weight and threshold value between neuron u to neuron v:

7th step, judges whether algorithm iteration terminates, if iteration terminates one of the following conditions to be met, iteration terminates:

Condition 1 reaches the number of iterations 2000;

Condition 2, the error of prediction drop within target error value 0.05;

Condition 3, continuous 6 verifyings collection error do not reduce or increase instead;

If iteration is not over, third step is returned.

Technical field

The invention belongs to permanent magnet synchronous motor Direct Torque Control fields, and in particular to a kind of table based on BP neural network Face formula permanent magnet synchronous motor model predictive control method.

Background technique

Study on direct torque control technology is based on stator magnetic linkage coordinate system and directly using torque as control object, avoids rotation A large amount of calculating when coordinate transform and the dependence to the parameter of electric machine, dynamic property is good, and the torque response time is short.But it passes The DTC that unites is a kind of off-line type control method, and control algolithm and good voltage vector LUT prepared in advance are implanted into microprocessor In, it is executed in each control loop cycle.DTC is according to the current torque error of electric machine control system and stator magnetic linkage error from electricity Optimal voltage vector is chosen in pressure vector LUT to eliminate torque error and stator magnetic linkage error.But tradition DTC can only be according to every The motor variable error of one control period initial time chooses optimal voltage vector, can not predict under the effect of this voltage vector The variation tendency of motor variable, not can guarantee entire control period internal torque and stator magnetic linkage remains at certain range It is interior, cause biggish torque pulsation and stator magnetic linkage to be pulsed.Meanwhile conventional voltage vector LUT design is simple, control precision compared with Low, motor can have the selective output of multiple and different voltage vectors under specific run state, be sweared according to the voltage that look-up table obtains Amount may not be optimal voltage vector.Therefore, the online control method of motor can be studied, prediction applies different in real time The variation of motor variable when voltage vector is predicted motor torque error and stator magnetic linkage under the effect of a certain voltage vector in advance and is missed Variation of the difference within the entirely control period, it is ensured that the validity and accuracy of applied voltage vector.

Model Predictive Control (Model predictive control, MPC) is as a kind of effective online controlling party Method is widely used in various Industry Control occasions.There is pertinent literature proposition to combine MPC with DTC, proposes a kind of model Predict that Direct Torque Control, this method carry out discretization to continuous non-linear DC-motor equation and obtain motor prediction model, predict The variation of motor torque and stator magnetic linkage in different voltages vector effect lower following multiple control periods, and according to objective function pair Each step prediction result of each voltage vector carries out comprehensive assessment, final to determine an optimal voltage vector sequence and only export sequence The first term of column.The primary goal of this method is to reduce inverter switching frequency, while by motor torque, stator magnetic linkage and inverter Neutral point voltage limits in a certain range, to guarantee that motor stabilizing is run.But the prediction algorithm operand proposed in document It is larger, it is difficult to implement in practical applications.

Summary of the invention

The purpose of the present invention is to overcome the above shortcomings and to provide the surface permanent magnetic synchronous motor moulds based on BP neural network Type forecast Control Algorithm, by the way that the good BP neural network of off-line training is embedded into surface permanent magnetic synchronous motor Direct torque In system processed, alternative model prediction algorithm completes the selection work of optimal voltage vector in the following control period.

In order to achieve the above object, the present invention the following steps are included:

Step 1 determines input quantity in surface permanent magnetic Synchronous Machine Models predictive control algorithm and output quantity and mind Input quantity and output quantity through network, and determine the variation range of motor reference rotation velocity and load torque;

Step 2, according to two kinds of reference rotation velocity step under load torque step under constant reference revolving speed and constant load torque Mode by under different reference rotation velocities load torque change the case where and different loads torque under reference rotation velocity change the case where according to Certain step-length and interval traversal is got, and the data of the above-mentioned input quantity accordingly generated are sent into surface permanent magnetic synchronous motor In Model Predictive Control Algorithm, the optimal voltage vector sequence of Model Predictive Control Algorithm selection in the following control period is generated, And by the training for being combined into BP neural network corresponding with the optimal voltage vector that corresponding selection comes out of the value of each input quantity Sample;

Step 3 constructs BP neural network topological model;

Training sample data in step 2 are normalized step 4, by the training sample after normalized This input, which has constructed, is trained study in BP neural network topological model;

Step 5 directly turns trained BP neural network model insertion to the prediction of surface permanent magnetic Synchronous Machine Models Alternative model predictive control algorithm carries out the work of motor optimal voltage vector selection in the following control period in square control system And function.

In step 1, determine input quantity in surface permanent magnetic Synchronous Machine Models predictive control algorithm and output quantity and The specific method is as follows for neural network input quantity and output quantity:

Ignore rotor rotational movement and Stator resistance voltage dropping, after applying nonzero voltage space vector, subsequent time stator magnetic linkage width Value and torque are as shown in formula 1.1:

It is the amplitude of current K moment stator magnetic linkage,It is the stator magnetic linkage amplitude at k+1 moment,It is to work as Before the voltage vector magnitude to be applied, fixed amplitude sets tentering value for voltage vector, amplitude is constantly equal to Wherein UdcIt is DC bus-bar voltage;Δ t is the action time that the voltage vector applies, and α is voltage vector and stator magnetic linkage vector Between angle;

The torque of subsequent time stator magnetic linkage is as shown in formula 1.2:

Te(k+1) be the k+1 moment motor torque, p is the number of pole-pairs of motor, ψfIt is permanent magnet flux linkage,It is current K The amplitude of moment stator magnetic linkage, LdFor d axis stator inductance, α is the angle between voltage vector and stator magnetic linkage vector, and δ (k) is The angle of torsion at current K moment;

Cost function used is as shown in formula 1.3:

The result that formula 1.1 and formula 1.2 are calculated is sent into cost function, if there is n alternative voltage vectors, then can obtain To n cost function numerical value, select voltage vector corresponding to the smallest numerical value of cost function as in the calculating control period It is applied to the optimal voltage vector of motor;

The input quantity of surface permanent magnetic Synchronous Machine Models predictive control algorithm has angle of torsion, current stator magnetic linkage width respectively Value, current stator magnetic linkage Angle Position, Reference Stator Flux Linkage, torque reference, alternative voltage vector angle, output quantity are selected voltage arrows Amount.Remove constant therein, including Reference Stator Flux Linkage and alternative voltage vector angle in 6 input quantities, characteristic dimension is simplified 4, it is possible to reduce operand, as the input quantity of neural network, output quantity of the selected voltage vector as neural network.

It, will be upper in corresponding value range according to certain step-length and interval by programming or the Realization of Simulation in step 2 Two kinds of situation of change traversals are stated to get.

In step 3, the feedforward neural network that BP neural network topological model is three layers is public according to hidden layer node experience FormulaDetermine node in hidden layer, wherein a is the constant between 0~10, on this basis further according to tune Try empirically determined hidden layer node number.Input layer corresponds to 4 input quantities of above-mentioned determination, and output node layer is equal to alternative The number of voltage vector i.e. 7 basic voltage vectors.Neuron in the hidden layer and output layer of BP neural network topological model Activation primitive be all made of the tanh transmission function of tansig type, the expression formula of tansig function is f (x)=2/ (1+exp (-2*x))-1。

In step 4, normalized uses default behavior, and processing mode is as follows:

In formula, xmin is the minimum number in data series, and xmax is the maximum number in sequence.Ymin and ymax is specified Normalize range.

In step 4, BP neural network topological model is trained study, and the specific method is as follows:

The first step, the training sample after normalized respectively correspond the prediction of surface permanent magnetic Synchronous Machine Models per one-dimensional Input is combined into training sample sequence (X, Y) by dependent variable, that is, input quantity in algorithm with output, and X is input data, and Y is pair The output data answered;

Second step, the training sample sequence (X, Y) being combined into according to system input and output determine network input layer number of nodes N, the connection weight ω between node in hidden layer l, output layer number of nodes m, input layer and hidden layer neuronij, hidden layer and Connection weight ω between output layer neuronjk, hidden layer threshold value a, output layer threshold value b, given learning rate and neuron swash Encourage function;

Third step, according to input variable X, input layer and implicit interlayer connection weight ωijAnd hidden layer threshold value a, it calculates Hidden layer exports H;

In formula, l is node in hidden layer, and f is general hidden layer excitation function, selected function are as follows:

- 1 formula 1.6 of f (x)=2/ (1+exp (- 2*x))

4th step exports H, connection weight ω according to hidden layerjkWith threshold value b, BP neural network prediction output O is calculated;

5th step exports O and desired output Y according to neural network forecast, calculates neural network forecast error J;

ek=Yk-OkK=1,2 ..., m formula 1.8

6th step, according to J, according to gradient descent method direction calculating, and successively adjusts weight threshold by output layer. Taking step-length is η, can obtain t+1 adjustment formula of the connection weight and threshold value between neuron u to neuron v:

7th step, judges whether algorithm iteration terminates, if iteration terminates one of the following conditions to be met, iteration terminates:

Condition 1 reaches the number of iterations 2000;

Condition 2, the error of prediction drop within target error value 0.05;

Condition 3, continuous 6 verifyings collection error do not reduce or increase instead;

If iteration is not over, third step is returned.

Compared with prior art, the present invention passes through defeated in surface permanent magnetic Synchronous Machine Models predictive control algorithm first Enter amount and output quantity generates optimal voltage vector sequence, then passes through optimal voltage vector sequence training BP neural network Top Modules Type substitutes surface-type permanent magnet synchronous motor model prediction algorithm using the BP neural network after training, and BP neural network has strong The characteristics of classification capacity of big nonlinear fitting ability and pattern-recognition, distributed parallel operation, can greatly reduce algorithm Operation time and computational burden, improve the timeliness of system, and the accuracy rate of BP neural network substitution and effect are made us It is satisfied, select the accuracy rate of optimal voltage vector to can achieve 88.34%, performance is suitable with MPC, and average switch Number can reduce 21.1%, have certain innovation advantage relative to traditional model prediction algorithm, demonstrate intelligent algorithm and exist Application prospect in motor control.

Detailed description of the invention

Fig. 1 is model flow figure of the invention;

Fig. 2 is the schematic illustration of BP neural network of the invention;

Fig. 3 is stator magnetic linkage motion change figure.

Fig. 4 is the actual motor torque waveform switched under table schema;

Fig. 5 is the motor actual speed waveform switched under table schema;

Fig. 6 is the stator magnetic linkage amplitude switched under table schema;

Fig. 7 is the stator magnetic linkage track switched under table schema;

Fig. 8 is a phase current waveform switched under table schema;

Fig. 9 is the actual motor torque waveform under BP neural network mode;

Figure 10 is the motor actual speed waveform under BP neural network mode;

Figure 11 is the stator magnetic linkage amplitude under BP neural network mode;

Figure 12 is the stator magnetic linkage track under BP neural network mode;

Figure 13 is a phase current waveform under BP neural network mode;

Figure 14 is the actual motor torque waveform under MPC operating mode;

Figure 15 is the motor actual speed waveform under MPC operating mode;

Figure 16 is the stator magnetic linkage amplitude under MPC operating mode;

Figure 17 is the stator magnetic linkage track under MPC operating mode;

Figure 18 is a phase current waveform under MPC operating mode;

Specific embodiment

The present invention will be further explained below with reference to the attached drawings.

The present invention the following steps are included:

Step 1 determines input quantity in surface permanent magnetic Synchronous Machine Models predictive control algorithm and output quantity and mind Input quantity and output quantity through network, and determine the variation range of motor reference rotation velocity and load torque;

Step 2, according to two kinds of reference rotation velocity step under load torque step under constant reference revolving speed and constant load torque Mode by under different reference rotation velocities load torque change the case where and different loads torque under reference rotation velocity change the case where according to Certain step-length and interval traversal is got, and the data of the above-mentioned input quantity accordingly generated are sent into surface permanent magnetic synchronous motor In Model Predictive Control Algorithm, the optimal voltage vector sequence of Model Predictive Control Algorithm selection in the following control period is generated, And by the training for being combined into BP neural network corresponding with the optimal voltage vector that corresponding selection comes out of the value of each input quantity Sample;

Step 3 constructs BP neural network topological model;

The training sample data being collected into step 2 are carried out data normalization processing, by normalized by step 4 Training sample data afterwards, which are input to have constructed, is trained study in BP neural network topological model;

Step 5 directly turns trained BP neural network model insertion to the prediction of surface permanent magnetic Synchronous Machine Models Alternative model predictive control algorithm carries out the work of motor optimal voltage vector selection in the following control period in square control system And function.

In step 1, ignore rotor rotational movement and Stator resistance voltage dropping, after applying nonzero voltage space vector, stator magnetic linkage fortune Dynamic variation is as shown in Figure 3.

After applying voltage vector, subsequent time stator magnetic linkage amplitude and torque are as shown in formula 1.13 and formula 1.14.

Wherein, It is the amplitude of current K moment stator magnetic linkage,It is determining for k+1 moment Sub- magnetic linkage amplitude,It is the voltage vector magnitude currently to be applied, fixed amplitude sets tentering value for voltage vector, Its amplitude is constantly equal toWherein UdcIt is DC bus-bar voltage;Δ t is the action time that the voltage vector applies, and α is Angle between voltage vector and stator magnetic linkage vector.

Te(k+1) be the k+1 moment motor torque, p is the number of pole-pairs of motor, ψfIt is permanent magnet flux linkage,It is current K The amplitude of moment stator magnetic linkage, LdFor d axis stator inductance, α is the angle between voltage vector and stator magnetic linkage vector, and δ (k) is The angle of torsion at current K moment.

Cost function used is as shown in formula 1.15:

The result that formula 1.13 and formula 1.14 are calculated is sent into cost function, in entire algorithmic procedure, if there is n it is standby Select voltage vector, then can obtain n cost function numerical value, select voltage vector corresponding to the smallest numerical value of cost function as The calculating will be applied to the optimal voltage vector of motor in the control period.

Model Predictive Control Algorithm can be learnt in formula by above-mentioned surface permanent magnetic Synchronous Machine Models PREDICTIVE CONTROL Input quantity have angle of torsion, current stator magnetic linkage amplitude, current stator magnetic linkage Angle Position, Reference Stator Flux Linkage, torque reference, standby respectively Voltage vector is selected, constant therein is removed, because constant has little significance in the operation of neural network, including Reference Stator Flux Linkage and standby Select voltage vector angle, it is believed that the selection of current voltage vector is mainly related with current stator magnetic linkage Angle Position.Therefore, by feature Dimension is simplified to 4, it is possible to reduce operand, using 4 variables as the input of neural network, selected voltage vector is as mind Output through network.

In step 2, according to reference rotation velocity step two under load torque step under constant reference revolving speed and constant load torque Kind mode will press the case where load torque variation and under different loads torque the case where reference rotation velocity variation under different reference rotation velocities It is got according to certain step-length and interval traversal, and the data of the above-mentioned input quantity accordingly generated feeding surface permanent magnetic is synchronized into electricity In machine Model Predictive Control Algorithm, the optimal voltage vector sequence of Model Predictive Control Algorithm selection in the following control period is generated Column, and by its training sample matrix for being combined into BP neural network corresponding with the value of corresponding each input quantity.

In step 3, the feedforward neural network that BP neural network model is 3 layers, according to hidden layer node empirical equationWherein a is the constant between 0~10, further determines hidden layer section according to commissioning experience on this basis Point number, input layer correspond to 4 input quantities of above-mentioned determination, and output node layer is equal to the number of alternative voltage vector, BP The activation primitive of neuron in the hidden layer and output layer of neural network is all made of tansig type tanh transmission function, The expression formula of tansig function is f (x)=2/ (1+exp (- 2*x)) -1.

In step 4, in order to cancel order of magnitude difference between each dimension data, avoid because of inputoutput data order of magnitude difference It is larger and cause neural network forecast error larger, it needs that data are normalized, returns in neural network described in this method One changes processing using traditional default behavior, and processing mode is as follows:

In formula, xmin is the minimum number in data series, and xmax is the maximum number in sequence.Ymin and ymax is specified Normalize range.

In step 5, the process that BP neural network topological model is trained study is as follows:

(5.1) input data:

After carrying out data prediction i.e. data normalization processing to the training data being collected into step 2, one is formed 4 dimension matrixes will be inputted per the one-dimensional dependent variable i.e. input quantity respectively corresponded in surface permanent magnetic Synchronous Machine Models prediction algorithm It is combined into training sample sequence (X, Y) with output, X is input data, and Y is corresponding output data.

(5.2) netinit:

Network input layer number of nodes n, node in hidden layer l, output layer section are determined according to system input and output sequence (X, Y) Count m, the connection weight ω between initialization input layer, hidden layer and output layer neuronij, ωjk, initialize hidden layer threshold Value a, output layer threshold value b give learning rate and neuron excitation function.

(5.3) hidden layer output calculates:

According to input variable X, input layer and implicit interlayer connection weight ωijAnd hidden layer threshold value a, it is defeated to calculate hidden layer H out.

In formula, l is node in hidden layer, and f is general hidden layer excitation function, selection that there are many functions, letter selected by the present invention Number is f (x)=2/ (1+exp (- 2*x)) -1 1.18

(5.4) output layer output calculates:

H, connection weight ω are exported according to hidden layerjkWith threshold value b, BP neural network prediction output O is calculated.

(5.5) error calculation:

O and desired output Y is exported according to neural network forecast, calculates neural network forecast error J.

ek=Yk-OkK=1,2 ..., m 1.20

(5.6) weight threshold updates:

By output layer, according to J, according to gradient descent method direction calculating, and weight threshold is successively adjusted.The step-length is taken to be η can obtain t+1 adjustment formula of the connection weight and threshold value between neuron u to neuron v:

(5.7) judge whether algorithm iteration terminates, iteration terminates one of the following conditions to be met:

(1) reach the number of iterations 2000;

(2) error predicted drops within target error value 0.05;

(3) continuous 6 verifyings collection error does not reduce or increases instead.If iteration is not over, return step (5.3).

In step 5, trained BP neural network model insertion to surface permanent magnetic Synchronous Machine Models is predicted direct In moment controlling system alternative model predictive control algorithm carry out in the following control period calculating of motor optimal voltage vector with Select work.

20页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:基于单神经元与改进粒子群算法优化双电机高速高精度同步控制方法

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!