Method for operating an electrical machine using a data model
By employing a multilayer feedforward neural network with a memory-optimized activation function table, the method addresses the resource-intensive challenges of calculating reference current curves for electric machines, achieving efficient and accurate results.
Patent Information
- Application Number
- DE102023004486
- Authority / Receiving Office
- DE · DE
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-11-08
- Publication Date
- 2025-05-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing methods for calculating reference current curves for electric machines require significant storage space and computing time, leading to a trade-off between accuracy and resource utilization.
A method utilizing a multilayer feedforward neural network with regression for calculating reference current curves, featuring mathematical standard operations and a memory-optimized table of activation functions, to reduce storage space and computing time while maintaining accuracy.
The proposed method achieves a reduction in storage space and computing time with constant or increased accuracy compared to prior art, enabling efficient operation of electric machines.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
[0001] The invention relates to a method for operating an electrical machine using a data model.
[0002] Electrical machines can be, for example, permanent magnet synchronous machines with radial or axial arrangements, as well as current-excited synchronous machines. These electrical machines operate by regulating a current by adjusting a voltage.
[0003] Current control can be implemented as field-oriented control, whereby a transformation, particularly a Clarke-Park transformation, of the machine-specific variables such as current and voltage is performed based on the position of a permanent magnet. The operating point is set using reference current values in the d- and q-direction, which are calculated based on the required torque and other parameters such as the stator and rotor temperature, the maximum available amplitude of the stator current and stator voltage, the machine speed, and, in particular, the rotor angle.
[0004] Various methods for calculating the reference current curves are known for setting the required torque. These fundamentally follow the concept of finding a point from a multitude of possible combinations of d- and q-current that best achieves the optimization goal, such as a minimum current amount. Maximum torque per ampere / current (MTPA / MTPC), maximum torque per loss (MTPL, especially considering iron losses), simple field weakening (FW), maximum current (MC), maximum torque per voltage (MTPV), maximum torque per flux (MTPF), loss minimizing control (LMC), and maximum efficiency per ampere (MEPA) can be used.While the MTPV method and the MTPF method are particularly used in the field weakening range, the LMC or the MEPA can generally be combined to form MTPL, since here the primary distinction is only made in how individual loss components of the electrical machine and inverter are included in the optimization.
[0005] In known methods, the input parameters for calculating the reference current curves are machine parameters, such as a stator resistance, which can be temperature compensated by knowing the stator temperature, the number of pole pairs, the mass inertia of the electric machine, the rated torque and rated speed, the characteristic maps of iron losses, flux linkages and torques as a function of speed, d- and q-current, and the rotor temperature, as well as the maximum values of the amplitudes of the stator current and stator voltage. The calculation of the reference currents, depending on the optimization objective and considering all possible input variables, including the rotor angle, can be performed as follows: irefdq(MEM,ref)=f(MEM,ref,ωel,iS,max,uS,max,TRotor,TStator,ΘR) The curves can be calculated numerically and stored in the software on the control unit in various look-up tables or can be stored analytically and via a polynomial function of, for example, the fourth order.
[0006] Furthermore, the use of neural networks (ANNs) is known from the state of the art. These are fundamentally composed of layers with corresponding neurons. A distinction can be made between single-layer and multi-layer feedforward networks and recurrent networks, which can contain feedback. While in multi-layer feedforward networks, the number of neurons in the input and output layers correlates with the number of inputs and outputs in the model, for the hidden layer(s), there are a multitude of possible combinations of neurons with corresponding weights of the connecting paths, which can be deleted, added, or weighted accordingly during training of the neural network. Furthermore, it is known that neurons can exhibit (non-)linear activation functions.The most common activation functions are sigmoid, hyperbolic tangent, sign, identity, rectified linear unit, and saturation. Further training methods for neural networks include supervised learning, in which reference values are available for the input data; unsupervised learning, which uses learning rules to train the network based solely on input patterns; and reinforcement learning, in which not every input data set has a suitable output data set for training.
[0007] From DE 10 2019 008 212 A1 and DE 10 2018 251 735 A1 a control method of an electrical machine using a data model is known.
[0008] DE 10 2016 006 313 A1 shows a control method for an electrical machine by varying the parameters.
[0009] As shown, an optimal reference current curve for setting the desired reference current for the d- and q-direction can be calculated and applied using different methods with different optimization criteria. The calculated values are stored either as a combination of several look-up tables or as an analytical polynomial function.
[0010] The disadvantage is that this results in corresponding demands on memory space and processing time on the control unit. In particular, a balance must be struck between memory / processing time and the accuracy of the reference current calculation.
[0011] The object of the present invention is to provide a method which overcomes the aforementioned disadvantages.
[0012] According to the invention, this object is achieved by a method having the features in claim 1, and in particular in the characterizing part of claim 1. Advantageous embodiments and further developments emerge from the dependent claims.
[0013] At the core of the method according to the invention, a multi-layer feedforward neural network with model prediction by means of regression is used to calculate the reference current curves. The neural network comprises standard mathematical operations and a memory-optimized activation function table. In other words, a multi-layer feedforward neural network with model prediction by means of regression is proposed, which can fundamentally have the same input and output variables as a prior art method. The internal structure of the neural network comprises, in particular, only standard mathematical operations and a memory-optimized stored activation function table. The activation function table is therefore simplified, particularly for application in a control unit. This allows for a cost-effective implementation.The degree of simplification can be defined, especially during training, and is not limited to piecewise linearization.
[0014] The method is designed to operate an electrical machine using a data model to calculate the reference current curves for setting the desired reference current in the d- and q-direction. Advantageously, the proposed method can achieve a reduction in storage space and computational runtime while maintaining or increasing accuracy compared to known prior art methods.
[0015] Preferably, the variables reference torque, speed, rotor temperature, stator temperature, maximum amplitude of the stator current, and maximum amplitude of the stator voltage can serve as input neurons. The number of input neurons is preferably specified as six. However, this is not necessarily limited to this and can be expanded to up to seven input neurons, in particular to include the electrical rotor angle, in order to incorporate effects such as cogging torques.
[0016] The input reference torque can be defined as the desired torque, taking into account possible limitations such as battery temperature and any compensation, for example, by feedback of the currently applied power or vibration compensation in the drive train. An input speed can be calculated, in particular, from a signal from a position sensor and / or from a sensorless algorithm.
[0017] According to a very advantageous development of the concept, it can be provided that a rotor temperature is calculated from a thermal model, and a stator temperature is taken from at least one temperature sensor or from a model. In one embodiment, the maximum amplitude of the stator current can result, in particular, from machine-specific and / or inverter-specific requirements. This can also apply to the maximum amplitude of the stator voltage, which can be influenced, in particular significantly, alternatively or additionally, by the currently applied DC voltage and / or by the modulation regulator.
[0018] According to an advantageous embodiment, the neural network can be trained with a variable number of neurons, layers, and activation functions depending on the model of the electric machine. In particular, to identify a relationship between the input variables, such as, in particular, reference torque, current speed, maximum amplitude of the stator current and the stator voltage, as well as rotor and stator temperature, and the output variables, such as, in particular, reference current in the d- and q-direction and the maximum available generator or motor torque, using an optimization algorithm, in particular the Levenberg-Marquardt algorithm using the approximation error, the neurons, layers, and activation functions can be flexibly configured.
[0019] In an exemplary embodiment, the number of neurons at the output layer can be specified as three and correspond to the reference values for d- and q-current as well as the currently possible maximum available motor or generator torque. The maximum available torque can be important information for other vehicle-related functions: y^ :=(id,refANN,iq,refANN,MEM,availableANN)T An optimal number of hidden layers, neurons, activation functions and weights within the training process can be determined individually for each model of an electrical machine to be trained.
[0020] A further advantageous embodiment can provide for preprocessing of training and / or validation data for defined pre-weighting of the inputs to the neural network. Thus, a plurality of inputs of the neural network can be preprocessed. This can be referred to as pre-weighting. The pre-weighting can include normalization to a maximum value, such as the input parameter speed to the nominal speed, an integral formation of an input such as the rotor temperature, or mathematical operations, such as a squaring of the input maximum amplitude of the stator voltage. In one embodiment, the preprocessing of inputs can be carried out by generic testing and comparing the generalizability and accuracy of the neural network compared to reference data during training in order to optimize them.
[0021] According to a very advantageous development of the idea, it can be provided that training and / or validation of several neural networks with different data sets takes place.
[0022] In one embodiment, supervised learning can be used to train the neural network, since both input and output data are comprehensively available or can be generated with sufficient accuracy. The approximation error e[k] between the neural network and the reference values can be crucial for optimization. This is defined as follows: where k denotes a data set (or sampling interval) and y denotes the reference current value at point k. e[k]=y[k]−y^[k]
[0023] To train the weights of the layers, a weight vector can be defined, where w denotes the weights between neurons, L the different layers and n the number of neurons in a layer. ω :=((ω1,1T,...,ω1,n1T),...(ωL,1T,...,ωL,nLT))T
[0024] The optimization of the weights can be carried out using well-known optimization algorithms, such as the gradient descent method with the Euclidean norm. ω[k+1]:=ω[k]−η12ddω‖e[k]‖2=ω[k]−η12ddωd(e[k]) where η represents a scaling factor. In another embodiment, the Levenberg-Marquardt algorithm can be applied using the Jacobian matrix J_c and the identity matrix I. ω[k+1]:=ω[k]−(JC(ω[k]TJC(ω[k]+μI))−1JC(ω[k])Te[k]
[0025] Training can be performed using an application program with appropriate toolboxes. This can be done, for example, with a Deep Learning Toolbox from Mathworks. Training can be performed in multiple cycles, so that all training data is used at least once. This can increase the generalizability of the neural network. Furthermore, different pairs of training data can be used to determine the best accuracy and generalizability.
[0026] In one embodiment, the training and validation data can be generated using a conventional method, such as, in particular, the calculation of reference current curves. The generalization can be performed numerically or analytically and / or based on data from measurements, finite element simulations, and a combination of both. The machine parameters can be used as starting points for the calculation, in particular a stator resistance dependent on the stator temperature, the characteristic maps of iron losses, flux linkages, and torque, as well as stator voltage and stator current limits. These characteristic maps can be represented via d / q current, rotor temperature, and speed, as shown, but are explicitly not limited to these dependencies. PLoss,Iron=f(id,iq,ωel,TRotor) Ψdq=f(id,iq,TRotor) MEM=f(id,iq,TRotor) In particular, only points within the maximum stator current circuit are used. idq=(id,iq)∈ℝ2|id2+iq2≤iS,max Advantageously, the optimization of the reference current curves, as outlined above, is performed only for the generation of training and validation data, thereby requiring no computing time or memory requirements on the ECU. Therefore, the intervals in the maps can be selected with comparatively fine resolution, and the optimization can be performed on a powerful computer separate from an ECU. This advantageously prevents large interpolation errors from occurring when identifying the appropriate torque hyperbola, particularly at high currents, due to excessively large intervals between, for example, two d-current points, and significantly increases the overall accuracy of the reference model.
[0027] According to an advantageous embodiment, it can be provided that the training and / or validation data are generated by an efficiency measurement method, wherein efficiencies of the reference current in the d- and q-direction are recorded on a test unit at a plurality of operating points which are classified by the input neurons.
[0028] In the efficiency measurement methodology, a test unit, such as a power test bench, can record a large number of operating points, which are classified by the preferably six input parameters of the neural network, and the corresponding efficiencies can be recorded for all d- and q-current points that are near or on the corresponding torque hyperbola. Different switching frequencies and modulation methods can also be included in the operating points. The efficiency corresponds in particular to the division of the mechanical power at the rotor shaft, for example, measured with a speed and torque sensor, and the electrical power on the DC side, for example, measured with a DC current and a DC voltage sensor.
[0029] After recording the points, combinations idq1...m(ηbest) from d- and q-current at the specific operating point, which gives the best efficiencies η best If all operating points are present, all m combinations can be idq1...m(ηbest) A combination can be selected for each operating point. The selection can be made generically and, in particular, supported by a regression algorithm or polynomial function generation, for example. Furthermore, tolerance criteria can be defined so that the d- and q-currents of neighboring operating points are only a certain distance apart, in order to avoid sudden changes in the d- and q-currents when changing neighboring operating points, especially with regard to torque. After selecting the combination of an operating point, the corresponding maximum available torque at that operating point can be saved.
[0030] A further advantageous embodiment may provide for the conversion of the trained neural network into an application-based model. The application-based model may be Simulink / TargetLink, which can be easily implemented on a control unit. Among other things, a linearization of the activation functions may be performed for easy implementation.
[0031] According to a very advantageous development of the idea, the converted neural network can be used to optimize the setting of the reference current in the d and q directions on an ECU. For application on an ECU, the trained frozen neural network can then be converted into an application-based program, such as Simulink, allowing for automated code generation with, for example, TargetLink without restrictions.
[0032] Further advantageous embodiments of the method according to the invention also emerge from the exemplary embodiment which is described in more detail below with reference to the figures.
[0033] Showing: Fig. 1 a higher-level structure within the field-oriented regulation; Fig. 2 a sigmoid and the hyperbolic tangent activation function; Fig. 3 a resulting higher-level structure; Fig. 4 a methodology for measuring efficiency; and Fig. 5 a validation based on defined processes for controlling an operating point.
[0034] In the presentation of the Fig. 1 shows a higher-level structure within the field-oriented control. In contrast to the classic approach, the interior of the neural network only comprises standard mathematical operations and a memory-optimized table of the activation function. The reference torque and the maximum stator current are entered at positions c and d. Optional preprocessing takes place at position C. The neural network is at position D. The maximum available torque is at position E. The reference dq current is at position F. A rotor temperature model is at position A and a control controller is at position B. The rotor temperature is at position A and the maximum stator voltage is at position B. The current control is at position E. The dq voltage is at position G and the dq current is at position L. A coordinate transformation takes place at position F. The ABC voltage is at position h and the ABC current is at position k. The hardware is at position G. At position i is the rotor angle and at positionj is the DC voltage. The stator temperature model is located at position H, where position m is the speed and position n is the stator temperature.
[0035] The activation function table is simplified for application on a control unit in such a way that a cost-effective implementation is achieved as in Fig. 2 is shown as an example for the sigmoid and hyperbolic tangent activation functions. The degree of simplification can be defined during training and is not limited to a piecewise linearization as shown in the figure. Fig. 2 shows a the tanh, b the sigmoid, c the hard_sigmoid and d the hard_tanh.
[0036] In Fig. Figure 3 shows a resulting higher-level structure, where the number of two hidden layers is only an example. Rather, an optimal number of hidden layers, neurons, activation functions, and weightings is determined within the training process individually for each model of an electrical machine to be trained. In particular, the structure shown has the ability to use different activation functions in different layers. Only the structure and number of neurons in the input and output layers remain unchanged, as long as the rotor angle is not considered as an input. Fig. Figure 3 shows 1 the input layer, 2 and 3 hidden layers and 3 the output layer.
[0037] Fig. Figure 4 shows a method for measuring efficiency. When moving from operating point 1 at position 1 to operating point 2 at position 2, the input parameter reference torque was changed, for example, while the other input parameters were kept constant. The number n defines all possible combinations of the preferably six input parameters, with the number n increasing considerably the smaller the intervals between two adjacent values of an input parameter are selected. Operating point n is therefore at position 3. A curve calculation takes place at position 7, and the data fields are located at position 8. The curve calculation function selects the appropriate combination of d- and q-current point from all possible combinations for each operating point.
[0038] For training and validation data generation, data sets of different sizes can be defined and compared during training, particularly to reduce the risk of overfitting. Following optimization, the weight adjustment can be frozen and the algorithm compared with the validation data. The generation of validation data can be carried out analogously to the training data using a classic method, in particular including points that are not part of the training data. Validation can also be carried out using defined procedures for controlling an operating point, as exemplified in Fig. 5, as well as complete driving cycles with varying outside temperatures. Provided defined tolerances for accuracy are subsequently maintained, the neural network is then considered functional. Fig.5, A stands for the torque, B for the q-current, C for the speed and D for the d-current.
[0039] For application on an ECU, the trained frozen neural network can then be converted into an application-based program, such as Simulink, so that automated code generation with TargetLink, for example, is possible without restrictions. QUOTES CONTAINED IN THE DESCRIPTION
[0000] This list of documents submitted by the applicant was generated automatically and is included solely for the convenience of the reader. This list is not part of the German patent or utility model application. The DPMA assumes no liability for any errors or omissions. Cited patent literature
[0000] DE 10 2019 008 212 A1
[0007] DE 10 2018 251 735 A1
[0007] DE 10 2016 006 313 A1
[0008]
Claims
[1] Method for operating an electrical machine using a data model for calculating the reference current curves for setting the desired reference current in the d- and q-direction, characterized by that a multi-layer feedforward neural network with model prediction by means of regression is used to calculate the reference current curves, whereby the neural network includes standard mathematical operations and a memory-optimized table of the activation function. [2] Method according to claim 1, characterized by that the variables reference torque, speed, rotor temperature, stator temperature, maximum amplitude of the stator current and maximum amplitude of the stator voltage serve as input neurons. [3] Method according to claim 1 or 2, characterized by that a rotor temperature is calculated from a thermal model, and a stator temperature is taken from at least one temperature sensor or from a model. [4] Method according to claim 1, 2 or 3, characterized by that the neural network can be trained with a variable number of neurons, layers and activation functions depending on the model of the electrical machine. [5] Method according to one of claims 1 to 4, characterized by that training and / or validation data is preprocessed to define the pre-weighting of the inputs to the neural network. [6] Method according to one of claims 1 to 5, characterized by that training and / or validation of several neural networks is carried out with different data sets. [7] Method according to claim 2, characterized bythat the training and / or validation data are generated by an efficiency measurement method, whereby efficiencies of the reference current in the d- and q-direction are recorded on a test unit at a plurality of operating points which are classified by the input neurons. [8] Method according to one of claims 1 to 7, characterized by that the trained neural network is converted into an application-based model. [9] Method according to claim 8, characterized by that the converted neural network is used for the optimized adjustment of the reference current in d- and q-direction on a control unit.
Citation Information
Patent Citations
Method and device for neuronal control and / or regulation
DE102007008514A1
Method for operating a permanent magnet excited synchronous machine
DE102016006313A1
machine learning device that learns a current command for a motor, motor control device and machine learning method
DE102017006703A1
Methods for operating a vehicle
DE102018251735A1
Method for using artificial neural networks to calculate engine operating points in the operation of a motor vehicle with at least one drive motor
DE102019008212A1
Cited By
Photoelectric pod intelligent control and path planning method fused with deep reinforcement learning
CN121477649A