Method and device for controlling weight adjustment, vehicle, electronic equipment and storage medium

By constructing the target cost function and dynamically adjusting the weight coefficient, the problem of unreasonable allocation of weight coefficients in the cost function in the prior art is solved, and the stability and response speed of the control system are improved.

CN120508153APending Publication Date: 2025-08-19BEIJING CO WHEELS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410186117.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-02-19
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

In the prior art, the weight coefficients of each control mode in the cost function are difficult to reasonably allocate, resulting in poor control effect.

Method used

The target cost function is constructed, including at least two cost function terms, corresponding to different weight coefficients, and by judging the relationship between the first target difference value and the second target difference value of the preset multiple, the weight coefficient of the constraint function term is dynamically adjusted to achieve reasonable allocation of each control method.

Benefits of technology

The reasonable allocation of weight coefficients of each control method is achieved, the stability and response speed of the control system are improved, and the control needs under different working conditions are met.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120508153A_ABST
    Figure CN120508153A_ABST
Patent Text Reader

Abstract

The invention provides a method and device for controlling weight adjustment, a vehicle, electronic equipment and a storage medium, and relates to the technical field of vehicles, a target cost function is constructed, the target cost function comprises at least two cost function items, and the at least two cost function items correspond to different weight coefficients; when it is determined that the at least two cost function items are a target torque function item and a constraint function item between the target direct-axis current and the target quadrature-axis current, whether a first target difference value is larger than a second target difference value of a preset multiple or not is judged, and the first target difference value is the difference value between the target torque and the torque corresponding to the current moment; the second target difference value is the difference value between the torque corresponding to the current moment and the torque corresponding to the previous moment; and according to a size relationship between the first target difference value and a second target difference value of a preset multiple, a weight coefficient corresponding to the constraint equation is increased or decreased according to a preset step value, so that the weight coefficient of each control mode is adjusted, and reasonable distribution of the weight coefficient is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of vehicle technology, and in particular to a method, device, vehicle, electronic device, and storage medium for controlling weight adjustment. Background Art

[0002] Current methods for achieving Maximum Torque Per Ampere (MTPA) control using a cost function include: integrating Model Predictive Control (MPC) and MTPA control into a single control module to simplify the structure of the control system, thereby reducing the complexity and cost of the control system while improving the reliability and stability of the control system; and integrating multiple control methods into a single cost function to combine the multiple control methods, thereby complementing each other's advantages and obtaining a more comprehensive and excellent control effect. Although certain control effects have been achieved through the aforementioned methods, there is still the problem of difficulty in reasonably allocating the weight coefficients of the various control methods in the cost function. Summary of the Invention

[0003] The present disclosure provides a method, device, vehicle, electronic device, and storage medium for controlling weight adjustment, the main purpose of which is to solve the problem of difficulty in reasonably allocating weight coefficients of various control modes in the cost function of the prior art.

[0004] According to a first aspect of the present disclosure, a method for controlling weight adjustment is provided, comprising:

[0005] Constructing a target cost function, wherein the target cost function includes at least two cost function terms, and the at least two cost function terms correspond to different weight coefficients respectively;

[0006] In the case of determining that the at least two cost function items include a target torque equation function item and a constraint equation function item, judging whether a first target difference is greater than a second target difference value which is a preset multiple, the first target difference value is a difference between the target torque and the torque corresponding to the current moment, the second target difference value is a difference between the torque corresponding to the current moment and the torque corresponding to the moment before the current moment, the target torque is a preset value, the target torque function item is used to indicate the difference between the torque output by the motor and the target torque, the constraint function item is used to indicate the constraint condition between the target direct-axis current and the target quadrature-axis current, the target direct-axis current represents a current component perpendicular to a fixed reference system of the motor, and the target quadrature-axis current is a current component parallel to the fixed reference system of the motor;

[0007] According to the size relationship between the first target difference and the second target difference of the preset multiple, the weight coefficient corresponding to the constraint equation is increased or decreased according to the preset step value.

[0008] Optionally, increasing or decreasing the weight coefficient corresponding to the constraint equation according to a preset step value based on the magnitude relationship between the first target difference and the second target difference of the preset multiple includes:

[0009] When it is determined that the first target difference is less than or equal to the second target difference of the preset multiple, the weight coefficient corresponding to the constraint equation is increased according to the first preset step value.

[0010] Optionally, increasing or decreasing the weight coefficient corresponding to the constraint equation according to a preset step value based on the magnitude relationship between the first target difference and the second target difference of the preset multiple includes:

[0011] When it is determined that the first target difference is greater than the second target difference of the preset multiple, the weight coefficient corresponding to the constraint equation is reduced according to the second preset step value.

[0012] Optionally, constructing the target cost function includes:

[0013] Constructing the target torque function term and the constraint function term between the target direct-axis current and the target quadrature-axis current;

[0014] multiplying the target torque function term and its corresponding weight coefficient to obtain a first product; and

[0015] Multiplying the constraint function term and its corresponding weight coefficient to obtain a second product;

[0016] The target cost function is constructed based on the sum of the first product and the second product.

[0017] Optionally, constructing a target cost function based on the sum of the first product and the second product includes:

[0018] defining a constraint condition corresponding to a constrained maximum current input to the target inverter and the constraint function term, and constructing a target cost function term based on the sum of the maximum constrained current and the constraint condition;

[0019] Multiplying the target cost function term and its corresponding weight coefficient to obtain a third product;

[0020] The target cost function is constructed based on the sum of the first product, the second product and the third product.

[0021] According to a second aspect of the present disclosure, there is provided a device for controlling weight adjustment, comprising:

[0022] A construction unit, configured to construct a target cost function, wherein the target cost function includes at least two cost function terms, and the at least two cost function terms correspond to different weight coefficients respectively;

[0023] a judgment unit, configured to, upon determining that the at least two cost function items include a target torque function item and a constraint function item, judge whether a first target difference is greater than a second target difference item of a preset multiple, wherein the first target difference is a difference between a target torque and a torque corresponding to a current moment, and the second target difference is a difference between a torque corresponding to the current moment and a torque corresponding to a moment before the current moment, wherein the target torque is a preset value, the target torque function item is used to indicate a difference between a torque output by the motor and the target torque, and the constraint function item is used to indicate a constraint condition between a target direct-axis current and a target quadrature-axis current, wherein the target direct-axis current represents a current component perpendicular to a fixed reference frame of the motor, and the target quadrature-axis current is a current component parallel to the fixed reference frame of the motor;

[0024] An adjustment unit is used to increase or decrease the weight coefficient corresponding to the constraint function item according to the corresponding preset step value based on the size relationship between the first target difference and the second target difference of the preset multiple.

[0025] Optionally, the adjustment unit includes:

[0026] An increasing module is used to increase the weight coefficient corresponding to the constraint function item according to a first preset step value when it is determined that the first target difference is less than or equal to the second target difference of the preset multiple.

[0027] Optionally, the adjustment unit includes:

[0028] A reduction module is used to reduce the weight coefficient corresponding to the constraint function item according to a second preset step value when it is determined that the first target difference is greater than the second target difference of the preset multiple.

[0029] Optionally, the construction unit includes:

[0030] A first building module is used to build the target torque function term and the constraint function term between the target direct-axis current and the target quadrature-axis current;

[0031] a calculation module, configured to multiply the target torque function term and its corresponding weight coefficient to obtain a first product; and

[0032] Multiplying the constraint function term and its corresponding weight coefficient to obtain a second product;

[0033] The second construction module is used to construct the target cost function based on the sum of the first product and the second product.

[0034] Optionally, the construction unit is further used to:

[0035] constructing the target torque function term, the constraint function term between the target direct-axis current and the target quadrature-axis current; and

[0036] defining a constraint condition corresponding to a constrained maximum current input to the target inverter and the constraint function term, and constructing a target cost function term based on the sum of the maximum constrained current and the constraint condition;

[0037] multiplying the target torque function term and its corresponding weight coefficient to obtain a first product; and

[0038] Multiplying the constraint function term and its corresponding weight coefficient to obtain a second product; and

[0039] Multiplying the target cost function term and its corresponding weight coefficient to obtain a third product;

[0040] The target cost function is constructed based on the sum of the first product, the second product and the third product.

[0041] According to a third aspect of the present disclosure, a vehicle is provided, comprising the device for adjusting the control weight as described in the second aspect.

[0042] According to a fourth aspect of the present disclosure, there is provided an electronic device, including:

[0043] at least one processor; and

[0044] a memory communicatively connected to the at least one processor; wherein,

[0045] The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect.

[0046] According to a fifth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method described in the first aspect.

[0047] According to a sixth aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method as described in the first aspect above.

[0048] The present disclosure provides a method, apparatus, vehicle, electronic device, and storage medium for controlling weight adjustment, which construct a target cost function, wherein the target cost function includes at least two cost function items, and at least two of the cost function items correspond to different weight coefficients. When it is determined that the at least two cost function items include a target torque function item and a constraint function item, it is determined whether a first target difference is greater than a second target difference of a preset multiple, wherein the first target difference is the difference between the target torque and the torque corresponding to the current moment, and the second target difference is the difference between the torque corresponding to the current moment and the torque corresponding to the moment before the current moment. The target torque is a preset value. The target torque function item is used to indicate the difference between the torque output by the motor and the target torque. The constraint function item is used to indicate the constraint condition between a target direct-axis current and a target quadrature-axis current. The target direct-axis current represents a current component perpendicular to a fixed reference frame of the motor, and the target quadrature-axis current is a current component parallel to the fixed reference frame of the motor. The weight coefficient corresponding to the constraint function item is increased or decreased according to a preset step value based on the size relationship between the first target difference and the second target difference of the preset multiple. Compared with the related art, the weight coefficient of the constraint function item is increased or decreased by the size relationship between the first target difference and the second target difference of the preset multiple, thereby realizing dynamic adjustment of the weight coefficient corresponding to the constraint function item, so as to determine the weight coefficient that best meets the current working conditions for each control mode, and then realize the reasonable distribution of the weight coefficient corresponding to each control mode.

[0049] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] The accompanying drawings are provided to facilitate a better understanding of the present invention and do not constitute a limitation of the present disclosure.

[0051] Figure 1 A flowchart of a method for controlling weight adjustment provided by an embodiment of the present disclosure;

[0052] Figure 2 A schematic diagram of a maximum torque-to-current ratio curve provided in an embodiment of the present disclosure;

[0053] Figure 3 A schematic diagram of a hyperbola of a constraint function term provided in an embodiment of the present disclosure;

[0054] Figure 4 A schematic diagram of a control structure provided by an embodiment of the present disclosure;

[0055] Figure 5 A schematic diagram of a speed response simulation image of a non-cascaded and optimized non-cascaded MTPA control provided in an embodiment of the present disclosure;

[0056] Figure 6 A schematic diagram of a q-axis current response simulation image of a non-cascaded and optimized non-cascaded MTPA control provided in an embodiment of the present disclosure;

[0057] Figure 7 A schematic diagram of a d-axis current response simulation image of a non-cascaded and optimized non-cascaded MTPA control provided in an embodiment of the present disclosure;

[0058] Figure 8 A schematic diagram of the structure of a device for controlling weight adjustment provided in an embodiment of the present disclosure;

[0059] Figure 9 A schematic diagram of the structure of another device for controlling weight adjustment provided by an embodiment of the present disclosure;

[0060] Figure 10 A schematic block diagram of an exemplary electronic device 300 provided in accordance with an embodiment of the present disclosure. DETAILED DESCRIPTION

[0061] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0062] The following describes a method, apparatus, vehicle, electronic device, and storage medium for controlling weight adjustment according to embodiments of the present disclosure with reference to the accompanying drawings.

[0063] Figure 1 A flowchart of a method for controlling weight adjustment provided in an embodiment of the present disclosure is provided.

[0064] like Figure 1 As shown, the method comprises the following steps:

[0065] Step 101: construct a target cost function, wherein the target cost function includes at least two cost function terms, and the at least two cost function terms correspond to different weight coefficients respectively;

[0066] As a refinement of the above-mentioned step 101, in order to make the control results of at least two of the cost function items more inclined to the pre-set results in the control process, it is necessary to construct the target cost function. The target cost function directly determines the direction of the control result evaluation stage and is the top priority in the control process. For the construction of the target cost function, constraints corresponding to multiple control methods can be introduced as cost function items of the target cost function, and each cost function item in the target cost function will be assigned different weight coefficients respectively.

[0067] Step 102: When it is determined that the at least two cost function items include a target torque function item and a constraint function item, determine whether a first target difference is greater than a second target difference item of a preset multiple, wherein the first target difference is the difference between the target torque and the torque corresponding to the current moment, and the second target difference is the difference between the torque corresponding to the current moment and the torque corresponding to the moment before the current moment. The target torque is a preset value. The target torque function item is used to indicate the difference between the torque output by the motor and the target torque. The constraint function item is used to indicate the constraint condition between a target direct-axis current and a target quadrature-axis current. The target direct-axis current represents a current component perpendicular to a fixed reference frame of the motor, and the target quadrature-axis current is a current component parallel to the fixed reference frame of the motor.

[0068] As a refinement of the above step 102, in order to more clearly illustrate the process involved in the above step, this embodiment provides a judgment formula, as shown in formula (1):

[0069] T e * -T e (k)>2(T e (k)-T e (k-1)) Formula (1)

[0070] Among them, T e * represents the target torque, T e (K) represents the torque at the current moment, T e (K-1) represents the torque corresponding to the moment before the current moment. In formula (1), the preset multiple is selected as 2. It should be understood that the above description is only exemplary, and the preset multiple is not limited to 2.

[0071] In some embodiments, the target torque function term represents the difference between the predicted torque obtained based on the prediction model and the target torque, and the constraint function term represents the constraint condition between the target direct-axis current and the target quadrature-axis current. Furthermore, the constraint function term is used to describe the trend of MTPA control, and the target torque function term is used to describe the trend of torque control.

[0072] Step 103 : The constraint function item increases or decreases the weight coefficient corresponding to the constraint function item according to the size relationship between the first target difference and the second target difference of the preset multiple, according to the preset step value.

[0073] As a refinement of step 103, in order to determine a method for adjusting the weight coefficient, after obtaining the comparison result based on step 102, the weight coefficient corresponding to the constraint function item is increased or decreased according to a preset step value based on the comparison result. In addition, the step value for increase or decrease can be set as required, and the weight coefficient is adjusted according to the set step value.

[0074] In some embodiments, the adjustment of the weight coefficient may also be implemented in the following manner but is not limited to, for example: directly adjusting the weight coefficient corresponding to the constraint function item to the weight coefficient corresponding to the comparison result according to the comparison result.

[0075] The present disclosure provides a method for control weight adjustment, which constructs a target cost function, wherein the target cost function includes at least two cost function items, and at least two of the cost function items correspond to different weight coefficients respectively; when it is determined that the at least two cost function items include a target torque function item and a constraint function item, it is judged whether a first target difference is greater than a second target difference of a preset multiple, wherein the first target difference is the difference between the target torque and the torque corresponding to the current moment, and the second target difference is the difference between the torque corresponding to the current moment and the torque corresponding to the moment before the current moment, and the target torque is a preset value; the constraint function item, wherein the target torque function item is used to indicate the difference between the torque output by the motor and the target torque, and the constraint function item is used to indicate the constraint condition between the target direct-axis current and the target quadrature-axis current, wherein the target direct-axis current represents the current component perpendicular to the fixed reference frame of the motor, and the target quadrature-axis current is the current component parallel to the fixed reference frame of the motor; according to the size relationship between the first target difference and the second target difference of the preset multiple, the weight coefficient corresponding to the constraint function item is increased or decreased according to a preset step value. Compared with the related art, the weight coefficient of the constraint function item is increased or decreased by the size relationship between the first target difference and the preset multiple of the second target difference, thereby realizing dynamic adjustment of the weight coefficient corresponding to the constraint function item, so as to determine the weight coefficient of each control mode that best meets the current working conditions, and further realize the reasonable distribution of the weight coefficients corresponding to each control mode.

[0076] As a refinement of the embodiment of the present disclosure, when executing step 103, the constraint function item increases or decreases the weight coefficient corresponding to the constraint function item according to the size relationship between the first target difference and the second target difference of the preset multiple according to the preset step value. The following implementation method may also be adopted but is not limited to, for example: when it is determined that the first target difference is less than or equal to the second target difference of the preset multiple, the weight coefficient corresponding to the constraint function item is increased according to the first preset step value.

[0077] In order to more clearly illustrate the steps involved in the above embodiment, the embodiment of the present disclosure provides an exemplary explanation. For example, the weight coefficient corresponding to the constraint function item is a, and the first preset step value is b. Then, when it is determined that the first target difference is less than or equal to the second target difference of the preset multiple, b is added on the basis of the weight coefficient a.

[0078] In another embodiment, a mapping relationship between a comparison result and a weight coefficient is established to adjust the weight coefficient of the constraint function item. The comparison result is the comparison result between the first target difference and the second target difference. For example, when the comparison result is that the first target difference is less than or equal to the preset multiple value, the weight coefficient is set to 0.5. Furthermore, when it is determined that the first target difference is less than or equal to the second target difference of the preset multiple, the weight coefficient of the constraint function item is adjusted to 0.5. The aforementioned 0.5 is only an exemplary explanation and does not constitute a limitation of the present disclosure.

[0079] As a refinement of the embodiment of the present disclosure, when executing step 103, the constraint function item increases or decreases the weight coefficient corresponding to the constraint function item according to the size relationship between the first target difference and the second target difference of the preset multiple, according to the preset step value. The following implementation method may also be adopted but is not limited to, for example: when it is determined that the first target difference is greater than the second target difference of the preset multiple, the weight coefficient corresponding to the constraint function item is reduced according to the second preset step value.

[0080] In order to more clearly illustrate the steps involved in the above embodiment, the embodiment of the present disclosure provides an exemplary explanation. For example, the weight coefficient corresponding to the constraint function item is a, and the second preset step value is c. Then, when it is determined that the first target difference is greater than the second target difference of the preset multiple, c is reduced based on the weight coefficient a.

[0081] In another embodiment, a mapping relationship between a comparison result and a weight coefficient is established to adjust the weight coefficient of the constraint function item. The comparison result is the comparison result between the first target difference and the second target difference. For example, when the comparison result is that the first target difference is greater than the preset multiple value, the weight coefficient is set to 0.1. Furthermore, when it is determined that the first target difference is greater than the second target difference of the preset multiple, the weight coefficient of the constraint function item is adjusted to 0.1. The aforementioned 0.1 is only an exemplary explanation and does not constitute a limitation of the present disclosure.

[0082] As a refinement of the above embodiment, when executing step 101 to construct the target cost function, the following implementation methods may also be adopted but are not limited to, for example: constructing the target torque function term and the constraint function term between the target direct-axis current and the target quadrature-axis current; multiplying the target torque function term with its corresponding weight coefficient to obtain a first product; and multiplying the constraint function term with its corresponding weight coefficient to obtain a second product; and constructing the target cost function based on the sum of the first product and the second product.

[0083] As a refinement of the above embodiment, when executing step 101 to construct the target cost function, the following implementation methods may also be adopted but are not limited to, for example: constructing the target torque function item, the constraint function item between the target direct-axis current and the target quadrature-axis current; and defining the constraint conditions corresponding to the maximum constraint current of the input target inverter and the constraint function item, and constructing the target cost function item based on the sum of the maximum constraint current and the constraint conditions; multiplying the target torque function item with its corresponding weight coefficient to obtain a first product; and multiplying the constraint function item with its corresponding weight coefficient to obtain a second product; and multiplying the target cost function item with its corresponding weight coefficient to obtain a third product; and constructing the target cost function based on the sum of the first product, the second product and the third product.

[0084] In order to more clearly demonstrate the specific process of constructing the aforementioned target cost function, this embodiment is exemplified herein. In the exemplified description provided in this embodiment, the target cost function includes the target torque function term, the constraint function term, and the target cost function term. The construction process of the target function involving only the target torque function term and the constraint function term is the same as that of this embodiment, and only the target cost function term needs to be discarded. For the sake of clarity and simplicity, this embodiment will not elaborate on the construction process of the target function involving only the target torque function term and the constraint function term. The exemplified description is as follows:

[0085] In order to reflect the advantages of the model predictive control algorithm, this embodiment uses the cost function in the model predictive algorithm to implement MTPA control, which can not only achieve the control target but also simplify the control structure of the electronic control algorithm. The complex control structure leads to the introduction of a large number of parameter operations when implementing the electronic control algorithm, which is not conducive to the construction of the simulation model and the corresponding program writing. Using the cost function to implement MTPA control is to integrate MPC control and MTPA control in one control module. This non-series implementation method is called a non-cascade control structure. This embodiment integrates torque control and MTPA control in one cost function. On this basis, the weight coefficients in the cost function are dynamically allocated. The specific plan is as follows:

[0086] The stator voltage equation of a permanent magnet synchronous motor (PMSM) in the dq rotating coordinate system is formula (2):

[0087]

[0088] Among them, u d Represents the d-axis voltage, the d-axis is the direct axis, R s represents the stator resistance, i d represents the d-axis current, L d represents the d-axis inductance, represents the derivative of the d-axis current, ω e Represents the electrical angular velocity, L q represents the q-axis inductance, i q represents the q-axis current, u q represents the q-axis voltage, represents the derivative of the q-axis current, Ψ f Represents the permanent magnet flux.

[0089] In addition, the torque equation is formula (3):

[0090]

[0091] Among them, P n represents the pole pair number, Ψ f represents the permanent magnet flux, i q represents the q-axis current, i d represents the d-axis current, L q Represents the q-axis inductance, L d represents the d-axis inductance, T e Represents torque.

[0092] Permanent magnet synchronous motors with embedded rotor structures can utilize reluctance torque to perform work due to the different inductances of the d- and q-axes. Utilizing reluctance torque can reduce the current required by the motor while outputting the same torque, thereby reducing copper losses caused by the motor's stator current. MTPA control is to find the minimum stator d-axis current i when the electromagnetic torque is the same. d , stator q-axis current i q In order to more intuitively show the MTPA control and stator d-axis current i d , stator q-axis current i q The relationship between Figure 2 A maximum torque current ratio curve diagram provided in an embodiment of the present disclosure is shown in FIG. Figure 2 As shown in the figure: In the dq rectangular coordinate system, the MTPA curve is a curve formed by connecting the points closest to the origin of the constant torque curves representing different torques.

[0093] Find the optimal i under a given target torque d 、i q The essence of the combination is to solve the extreme value problem under certain constraints. The vector synthesis of the dq axis current is as follows:

[0094]

[0095] In order to make the current vector i in formula (2) s Minimum dq axis current i d 、i q The first step is to construct the Lagrangian function, as shown in formula (5):

[0096]

[0097] In formula (5), λ is the Lagrangian factor, T e Represents torque.

[0098] Taking the partial derivative of the Lagrangian function in formula (5) with respect to the dq axis current and setting its magnitude to zero, we can finally obtain formula (6):

[0099]

[0100] Eliminating λ in formula (6), we can obtain i under MTPA control conditions: d 、i q The relationship is as follows, formula (7):

[0101]

[0102] From the analysis of formula (7), we can know that when the dq axis inductance is the same, that is, L d =L q At this time, id = 0, which proves that when the dq axis inductance is the same, MTPA control is the commonly used "i d =0" control strategy. Substituting formula (7) into formula (3) can obtain the torque and q-axis stator current i q The equation contains i q The fourth power of the high-order calculation causes the algorithm to occupy a large amount of computing resources when applied to the digital signal processing platform (DSP), which is not conducive to the actual implementation of MTPA control. Therefore, another form of MTPA control is usually used. First, the variables of the dq axis coordinate system are converted into the same variables, and the current vector i s The angle with the α axis is defined as the current angle β, then the dq axis current i d 、i q It can also be expressed by formula (8):

[0103] First, convert the variables of the dq axis coordinate system into the same variables, and convert the current vector i s The angle with the α axis is defined as the current angle β, then the dq axis current i d 、i q As shown in formula (8):

[0104]

[0105] Substituting formula (8) into formula (3) yields:

[0106]

[0107] From formula (9), we can see that when the stator current i s When the torque T e It is converted into a function of the current angle β. The number of variables is simplified to one. Let the torque T e Taking the partial derivative of the current angle β and making the result equal to 0, we can get formula (10):

[0108]

[0109] Solving formula (10) we can get the current angle β corresponding to the maximum torque: MTPA Formula (11):

[0110]

[0111] Substituting formula (11) into formula (4) yields formula (12):

[0112]

[0113] In formula (12), sign is a sign function, when its member variable i s is greater than 0, then sign(i s ) is equal to 1, otherwise sign(i s )=-1.

[0114] The combination of model predictive control and MTPA control includes the following methods:

[0115] Torque control is achieved by controlling the current loop through a model predictive controller and combining it with the current command of the MPTA controller. Although it is torque predictive control, this control method is different from the traditional DTC control strategy (Direct Torque Control) that directly controls both torque and flux. Instead, it uses the stator current relationship of torque tracking to design the cost function.

[0116] Predicted torque value T e p Formula (13) can be derived from the torque equation (3):

[0117]

[0118] From formula (13), we can see that the realization of torque tracking is essentially the control of dq axis current, so it can also be regarded as a model prediction current control scheme, where Indicates the q-axis current value at the next moment, Indicates the d-axis current value at the next moment.

[0119] The cost function in non-cascaded MTPA control mainly consists of the following three parts:

[0120] (1) Target torque tracking, as shown in formula (14):

[0121] g Te =(T e * -T e p (k+1)) 2 Formula (14)

[0122] In formula (14), T e * The target torque is the target torque. The target torque is the output of the PI controller during speed control. is the predicted value of the torque at the next moment, g Te is the cost function term in the target cost function.

[0123] (2) MTPA control target constraints on dq axis currents

[0124] Combining formula (8) and formula (10), the d-axis current i is derived d and q-axis current i q The relationship is shown in formula (15):

[0125]

[0126] In order to more intuitively display the d-axis current i d and q-axis current i q relationship, Figure 3 A hyperbola diagram of a constraint function term provided by an embodiment of the present disclosure, Figure 3 It can be seen that:

[0127] The symmetry axis of the hyperbola is shown in formula (16):

[0128]

[0129] In summary, if the dq axis currents meet the constraints of formula (15), it proves that the MTPA control principle is met. The constraints of the dq axis currents expressed in formula (11) are designed as part of the cost function. In each control cycle, the "evaluation" stage in the model predictive control is used to screen the optimal voltage vector that meets the MTPA control requirements. The specific cost function term is shown in formula (17):

[0130]

[0131] Substituting the predicted dq axis current value into formula (17) to calculate the cost function term g MTPA The smaller it is, the closer the motor's working state is to the MTPA curve.

[0132] (3) Constraints

[0133] For model predictive control, the cost function directly determines the direction of the "evaluation" stage and is the most important part of the entire control process. For motor control systems, the cost function directly affects the specific voltage vector of the output. Therefore, each cost term in the cost function must be strictly corrected, otherwise it will affect the actual control effect. Regarding the constraints of model predictive control, excessive current values will burn out the switching elements in the inverter. For safety reasons, the maximum current value must be limited. The constraint term for the maximum current value is set to g imax ;besides, Figure 3 Not all MTPA constraint hyperbolas meet the actual requirements, so it is necessary to Figure 3 Further constraints are placed on the hyperbola in . Figure 3The right side of the hyperbola obviously does not meet the actual requirements of motor control. The right side of the hyperbola is discarded using the symmetry axis of the hyperbola. The constraint term of MTPA is shown in the following formula (18):

[0134]

[0135] Combined with the above analysis, formula (14), formula (17), and formula (18) constitute all components of the cost function. The final cost function is the target cost function, and the target cost function is formula (19) as shown below:

[0136] g=λ1g Te +λ2g MTPA +λ3(g imax +g lim_MTPA ) Formula (19)

[0137] Among them, λ1, λ2, and λ3 are different weight coefficients corresponding to different cost function terms, g Te is the target torque function term, which is a cost function term constituting the target cost function g, g MPTA is the constraint function term, which is another cost function term in the target cost function g. imax is the constrained maximum current of the target inverter, g lim_MTPA is the constraint function term between the target direct-axis current and the target quadrature-axis current, which is the above formula (18), g imax +g lim_MTPA is the target cost function term, which is another cost function term constituting the target cost function g.

[0138] The above formula is the cost function of MTPA control through the model predictive control algorithm. This method can simultaneously realize target torque tracking and MTPA control, where the target torque command T e * The output result of the PI controller of the outer speed loop is provided. All voltage vectors are substituted into the prediction model in turn in each control cycle. The voltage vector that best meets the control requirements is selected through the cost function of formula (15) and applied to the inverter. In order to facilitate the understanding of the above content, Figure 4 A schematic diagram of a control structure provided by an embodiment of the present disclosure is shown in FIG. Figure 4 As shown in Figure 4 The outer ring is a speed ring. This embodiment does not limit the outer ring to a speed ring. Figure 4 Shown S a , S b , S c , is the switching state input to the inverter, Figure 4The main purpose is to demonstrate that this embodiment combines the prediction model and the MTPA cost function to obtain the non-cascade architecture of the MPC controller.

[0139] It can be seen from formula (19) that the cost function is composed of different variables such as torque and current. When the cost function controls different dimensions at the same time, the priority of the control target must be set in advance, which is specifically to assign different weight coefficients to different control targets. It is known that the size of the weight factor of the cost function directly affects the importance of model predictive control in the evaluation stage. The larger the value, the higher the priority. At present, the allocation of weight coefficients in the cost function is usually assigned by experience and debugging. Without specific theoretical support, the stability of control cannot be guaranteed. As the complexity of the system increases, there are more and more cost items in the cost function, and the assignment of weight coefficients will become more complicated. Therefore, how to assign accurate weight coefficients, reduce weight coefficients, or even eliminate weight coefficients while achieving multi-objective coordinated control is the main problem that the current model predictive control algorithm needs to solve.

[0140] From the above analysis, it can be seen that how to allocate the weight coefficients for torque tracking and MTPA in formula (19) is the focus of predictive control. When the weight coefficient λ2 of MTPA control is less than the weight coefficient λ1 of torque tracking, it proves that the model prediction algorithm gives priority to tracking the target torque during the control process; when λ2 is greater than λ1, it proves that the dq axis current is prioritized to run on the MTPA curve trajectory. For most model predictive controls, the target torque or target current instruction tracking is generally prioritized, and then the MTPA control is taken into account. Based on the above control scheme, this paper proposes a method for dynamically allocating weight coefficients to cope with changes in working conditions. The rate of torque change is used as the reference variable, as shown in formula (1) in the above content.

[0141] When the conditions of formula (1) are met, it is proved that the torque command T e * , meaning the target torque changes significantly, a smaller value for λ2 is recommended. This prioritizes tracking the target torque and reduces the weight of MTPA control. When target torque tracking stabilizes, increase the value of λ2 to ensure the motor maintains a stable MTPA trajectory.

[0142] In this paper, the weight coefficient λ1 of torque control is set to 1. When the conditions of formula (1) are met, the weight coefficient λ2 of MTPA control = λ 2_low =0.1, priority is given to completing torque tracking. When the conditions of formula (1) are not met, modify the weight coefficient of MTPA control λ2 = λ 2_high= 0.5, increasing the priority of MTPA control implementation. Changing the weight coefficient better aligns with control requirements during actual operation, improving the dynamic response speed to target commands while ensuring stable MTPA control. The above embodiments are merely illustrative and do not constitute a limitation of this disclosure.

[0143] In summary, this embodiment can achieve the following effects:

[0144] 1. Increase or decrease the weight coefficient of the constraint function item by comparing the preset multiple values of the first target difference and the second target difference, thereby realizing dynamic adjustment of the weight coefficient corresponding to the constraint function item, so as to determine the weight coefficient of each control mode that best meets the current working conditions, and further realize the reasonable allocation of the weight coefficients corresponding to each control mode.

[0145] 2. Taking advantage of the model predictive control algorithm's ability to easily achieve multi-objective collaborative control, the present invention adopts a non-cascade control structure and uses the cost function in the model predictive algorithm to simultaneously complete torque control and MTPA control. This simplifies the control structure and reflects the algorithmic advantages of model predictive control. When the cost function of the model predictive algorithm controls different dimensions at the same time, it is necessary to introduce a weight coefficient into the cost function. This paper proposes a method for dynamically allocating weight coefficients, adjusting the size of the weight coefficient by the speed of change of the torque command, and finally verifies the feasibility of this control scheme through simulation.

[0146] The control performance of the non-cascaded MTPA control scheme and the non-cascaded MTPA control scheme optimized by dynamically changing the weight coefficients of the present invention under different working conditions is compared and analyzed as follows. The motor parameters in the simulation model are listed in Table 1:

[0147] Table 1

[0148] Based on the cost function in formula (19), λ1=1 and λ2=0.4 are selected as the weight coefficients of torque control and MTPA control in the cost function, respectively. The simulation sampling frequency is set to 1e5Hz, the simulation time is 2s, the motor is started with no load, the speed command at startup is set to 400rpm, and a load torque of 50N is applied at 1s. The non-cascade MTPA control scheme is compared with the non-cascade MTPA control scheme optimized based on the dynamic weight factor, as shown in Figure 2. Figures 5 to 7 As shown:

[0149] Figure 5 A schematic diagram of a speed response simulation image of a non-cascaded and optimized non-cascaded MTPA control provided in an embodiment of the present disclosure; Figure 6A schematic diagram of a q-axis current response simulation image of a non-cascaded and optimized non-cascaded MTPA control provided in an embodiment of the present disclosure; Figure 7 A schematic diagram of a d-axis current response simulation image of a non-cascade and optimized non-cascade MTPA control provided in an embodiment of the present disclosure.

[0150] from Figure 5 As can be seen, the speed overshoot during motor startup is similar between the non-cascaded MTPA control and the optimized algorithm. The non-cascaded MTPA control motor tracks to the specified speed of 400 rpm in approximately 0.3 seconds, while the optimized algorithm tracks to the target speed in 0.25 seconds. When a load is introduced within 1 second, the speed of the non-cascaded MTPA control motor decays to 360 rpm and stabilizes within 1.5 seconds. However, the speed of the optimized algorithm decays to 380 rpm and stabilizes within 1.3 seconds.

[0151] Depend on Figure 6 It can be seen that at motor startup, the q-axis current controlled by the non-cascaded MTPA algorithm stabilizes at 0.05s, while the q-axis current controlled by the optimized algorithm approaches stability at 0.03s. As the load increases, the q-axis current of the non-cascaded algorithm approaches stability at 1.05s, while the q-axis current of the optimized algorithm successfully tracks the load at 1.03s.

[0152] Depend on Figure 7 It can be seen that the d-axis current change trends of the two control methods are the same, with no obvious difference.

[0153] In summary, the optimized non-cascaded MTPA control strategy exhibits faster speed and q-axis current responses and less speed attenuation during sudden load changes. The steady-state performance of the two algorithms is essentially comparable. Simulation results demonstrate that the optimized non-cascaded MTPA control strategy improves the algorithm's dynamic performance while maintaining its original steady-state performance.

[0154] Corresponding to the above-mentioned method for adjusting control weights, the present invention further provides a device for adjusting control weights. Since the device embodiment of the present invention corresponds to the above-mentioned method embodiment, details not disclosed in the device embodiment can be referred to the above-mentioned method embodiment and will not be described in detail in the present invention.

[0155] Figure 8 A schematic diagram of a device for controlling weight adjustment according to an embodiment of the present disclosure is shown in FIG. Figure 8 Shown, including:

[0156] A construction unit 21 is configured to construct a target cost function, wherein the target cost function includes at least two cost function terms, and the at least two cost function terms correspond to different weight coefficients respectively;

[0157] a judgment unit 22, configured to, upon determining that the at least two cost function items include a target torque function item and a constraint function item, judge whether a first target difference is greater than a second target difference item of a preset multiple, wherein the first target difference is a difference between a target torque and a torque corresponding to a current moment, and the second target difference is a difference between a torque corresponding to the current moment and a torque corresponding to a moment before the current moment, wherein the target torque is a preset value, the target torque function item is used to indicate a difference between a torque output by the motor and the target torque, and the constraint function item is used to indicate a constraint condition between a target direct-axis current and a target quadrature-axis current, wherein the target direct-axis current represents a current component perpendicular to a fixed reference frame of the motor, and the target quadrature-axis current is a current component parallel to the fixed reference frame of the motor;

[0158] The adjustment unit 23 is configured to increase or decrease the weight coefficient corresponding to the constraint function item according to a preset step value based on a size relationship between the first target difference and the second target difference of the preset multiple.

[0159] The present disclosure provides a device for controlling weight adjustment, which constructs a target cost function, wherein the target cost function includes at least two cost function items, and at least two of the cost function items correspond to different weight coefficients respectively; when it is determined that the at least two cost function items include a target torque function item and a constraint function item, it is judged whether a first target difference is greater than a second target difference of a preset multiple, wherein the first target difference is the difference between the target torque and the torque corresponding to the current moment, and the second target difference is the difference between the torque corresponding to the current moment and the torque corresponding to the moment before the current moment, and the target torque is a preset value. The target torque function item is used to indicate the difference between the torque output by the motor and the target torque, and the constraint function item is used to indicate the constraint condition between the target direct-axis current and the target quadrature-axis current, wherein the target direct-axis current represents the current component perpendicular to the fixed reference frame of the motor, and the target quadrature-axis current is the current component parallel to the fixed reference frame of the motor; according to the size relationship between the first target difference and the second target difference of the preset multiple, the weight coefficient corresponding to the constraint function item is increased or decreased according to a preset step value. Compared with the related art, the weight coefficient of the constraint function item is increased or decreased by the size relationship between the first target difference and the preset multiple of the second target difference, thereby realizing dynamic adjustment of the weight coefficient corresponding to the constraint function item, so as to determine the weight coefficient of each control mode that best meets the current working conditions, and further realize the reasonable distribution of the weight coefficients corresponding to each control mode.

[0160] Figure 9 A schematic diagram of a device for controlling weight adjustment according to an embodiment of the present disclosure is shown in FIG. Figure 9 As shown, the adjustment unit 23 includes:

[0161] The increasing module 231 is configured to increase the weight coefficient corresponding to the constraint function item according to a first preset step value when it is determined that the first target difference is less than or equal to the second target difference of the preset multiple.

[0162] Furthermore, in a possible implementation of the embodiment of the present disclosure, as Figure 9 As shown, the adjustment unit 23 includes:

[0163] The reducing module 232 is configured to reduce the weight coefficient corresponding to the constraint function item according to a second preset step value when it is determined that the first target difference is greater than the second target difference of the preset multiple.

[0164] Furthermore, in a possible implementation of the embodiment of the present disclosure, as Figure 9 As shown, the construction unit 21 includes:

[0165] A first constructing module 211 is configured to construct the target torque function term and the constraint function term between the target direct-axis current and the target quadrature-axis current;

[0166] a calculation module 212 configured to multiply the target torque function term by its corresponding weight coefficient to obtain a first product; and

[0167] Multiplying the constraint function term and its corresponding weight coefficient to obtain a second product;

[0168] The second construction module 213 is configured to construct the target cost function based on the sum of the first product and the second product.

[0169] Furthermore, in a possible implementation of the embodiment of the present disclosure, as Figure 9 As shown, the construction unit 21 is further used for:

[0170] constructing the target torque function term, the constraint function term between the target direct-axis current and the target quadrature-axis current; and

[0171] defining a constraint condition corresponding to a constrained maximum current input to the target inverter and the constraint function term, and constructing a target cost function term based on the sum of the maximum constrained current and the constraint condition;

[0172] multiplying the target torque function term and its corresponding weight coefficient to obtain a first product; and

[0173] Multiplying the constraint function term and its corresponding weight coefficient to obtain a second product; and

[0174] Multiplying the target cost function term and its corresponding weight coefficient to obtain a third product;

[0175] The target cost function is constructed based on the sum of the first product, the second product and the third product.

[0176] It should be noted that the above explanation of the method embodiment is also applicable to the device of the embodiment of the present disclosure, and the principles are the same, which is no longer limited in the embodiment of the present disclosure.

[0177] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0178] Figure 10 A schematic block diagram of an example electronic device 300 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are provided as examples only and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0179] like Figure 10 As shown, the device 300 includes a computing unit 301, which can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 302 or a computer program loaded from a storage unit 308 into a RAM (Random Access Memory) 303. Various programs and data required for the operation of the device 300 can also be stored in the RAM 303. The computing unit 301, ROM 302, and RAM 303 are connected to each other via a bus 304. An I / O (Input / Output) interface 305 is also connected to the bus 304.

[0180] Various components in device 300 are connected to I / O interface 305, including: an input unit 306, such as a keyboard, mouse, etc.; an output unit 307, such as various types of displays, speakers, etc.; a storage unit 308, such as a magnetic disk, optical disk, etc.; and a communication unit 309, such as a network card, modem, wireless communication transceiver, etc. The communication unit 309 allows device 300 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0181] The computing unit 301 can be a variety of general-purpose and / or specialized processing components with processing and computing capabilities. Some examples of the computing unit 301 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Unit), various specialized AI (Artificial Intelligence) computing chips, various computing units that run machine learning model algorithms, a DSP (Digital Signal Processor), and any suitable processor, controller, microcontroller, etc. The computing unit 301 performs the various methods and processes described above, such as the method for controlling weight adjustment. For example, in some embodiments, the method for controlling weight adjustment can be implemented as a computer software program that is tangibly embodied in a machine-readable medium, such as the storage unit 308. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 300 via the ROM 302 and / or the communication unit 309. When the computer program is loaded into the RAM 303 and executed by the computing unit 301, one or more steps of the method described above can be performed. Alternatively, in other embodiments, the computing unit 301 may be configured to execute the aforementioned control weight adjustment method in any other appropriate manner (for example, by means of firmware).

[0182] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application-Specific Standard Products), SOCs (System on Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0183] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0184] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or apparatus. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or apparatus, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more wires, a portable computer disk, a hard disk, RAM, ROM, EPROM (Electrically Programmable Read-Only-Memory) or flash memory, optical fiber, CD-ROM (Compact Disc Read-Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0185] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0186] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: LAN (Local Area Network), WAN (Wide Area Network), the Internet, and blockchain networks.

[0187] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact via a communication network. This client-server relationship is established by computer programs running on the respective computers, establishing a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host, a host product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosts and VPS services ("Virtual Private Servers" or simply "VPS"). The server may also be a server in a distributed system or a server integrated with blockchain.

[0188] It's important to note that artificial intelligence (AI) is the study of how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). This encompasses both hardware and software technologies. AI hardware technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, and big data processing. AI software technologies primarily encompass computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graphs.

[0189] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not limited herein.

[0190] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.

Claims

1. A method for controlling weight adjustment, characterized in that: include: Constructing a target cost function, wherein the target cost function includes at least two cost function terms, and the at least two cost function terms correspond to different weight coefficients respectively; In the case of determining that the at least two cost function items include a target torque function item and a constraint function item, judging whether a first target difference is greater than a second target difference of a preset multiple, the first target difference being the difference between the target torque and the torque corresponding to the current moment, the second target difference being the difference between the torque corresponding to the current moment and the torque corresponding to the moment before the current moment, the target torque being a preset value, the target torque function item being used to indicate the difference between the torque output by the motor and the target torque, the constraint function item being used to indicate a constraint condition between a target direct-axis current and a target quadrature-axis current, the target direct-axis current representing a current component perpendicular to a fixed reference frame of the motor, and the target quadrature-axis current being a current component parallel to the fixed reference frame of the motor; According to the size relationship between the first target difference and the second target difference of the preset multiple, the weight coefficient corresponding to the constraint function item is increased or decreased according to the corresponding preset step value.

2. The method according to claim 1, characterized in that The increasing or decreasing the weight coefficient corresponding to the constraint equation according to the preset step value based on the magnitude relationship between the first target difference and the second target difference of the preset multiple includes: When it is determined that the first target difference is less than or equal to the second target difference of the preset multiple, the weight coefficient corresponding to the constraint equation is increased according to the first preset step value.

3. The method according to claim 1, characterized in that The increasing or decreasing the weight coefficient corresponding to the constraint equation according to the preset step value based on the magnitude relationship between the first target difference and the second target difference of the preset multiple includes: When it is determined that the first target difference is greater than the second target difference of the preset multiple, the weight coefficient corresponding to the constraint equation is reduced according to the second preset step value.

4. The method according to claim 1, wherein The constructing target cost function includes: Constructing the target torque function term and the constraint function term between the target direct-axis current and the target quadrature-axis current; multiplying the target torque function term and its corresponding weight coefficient to obtain a first product; and Multiplying the constraint function term and its corresponding weight coefficient to obtain a second product; The target cost function is constructed based on the sum of the first product and the second product.

5. The method according to claim 4, characterized in that The constructing a target cost function based on the sum of the first product and the second product includes: defining a constraint condition corresponding to a constrained maximum current input to the target inverter and the constraint function term, and constructing a target cost function term based on the sum of the maximum constrained current and the constraint condition; Multiplying the target cost function term and its corresponding weight coefficient to obtain a third product; The target cost function is constructed based on the sum of the first product, the second product and the third product.

6. A device for controlling weight adjustment, characterized in that: include: A construction unit, configured to construct a target cost function, wherein the target cost function includes at least two cost function terms, and the at least two cost function terms correspond to different weight coefficients respectively; a judgment unit, configured to, upon determining that the at least two cost function items include a target torque function item and a constraint function item, judge whether a first target difference is greater than a second target difference item of a preset multiple, wherein the first target difference is a difference between a target torque and a torque corresponding to a current moment, and the second target difference is a difference between a torque corresponding to the current moment and a torque corresponding to a moment before the current moment, wherein the target torque is a preset value, the target torque function item is used to indicate a difference between a torque output by the motor and the target torque, and the constraint function item is used to indicate a constraint condition between a target direct-axis current and a target quadrature-axis current, wherein the target direct-axis current represents a current component perpendicular to a fixed reference frame of the motor, and the target quadrature-axis current is a current component parallel to the fixed reference frame of the motor; The adjustment unit is configured to increase or decrease the weight coefficient corresponding to the constraint function term according to a corresponding preset step value based on the magnitude relationship between the first target difference and the second target difference of the preset multiple, and determine whether the first target difference is greater than the second target difference of the preset multiple.

7. The device according to claim 6, characterized in that The adjustment unit includes: An increasing module is used to increase the weight coefficient corresponding to the constraint function item according to a first preset step value when it is determined that the first target difference is less than or equal to the second target difference of the preset multiple.

8. A vehicle, characterized in that: The device comprises a control weight adjustment device as described in any one of claims 6-7.

9. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 5.

10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 5.