PERMANENT-MAGNET SYNCHRONOUS MACHINE CONTROL METHOD AND DEVICE, AND PERMANENT-MAGNET SYNCHRONOUS MACHINE CONTROL SYSTEM

20230067971 · 2023-03-02

    Inventors

    Cpc classification

    International classification

    Abstract

    This application provides a permanent-magnet synchronous machine control method and device, and a permanent-magnet synchronous machine control system. The method includes: obtaining a d-axis current i.sub.d and a q-axis current i.sub.q in a permanent-magnet synchronous machine control loop at a current moment; obtaining a fifth-order harmonic current i.sub.d5th and a seventh-order harmonic current i.sub.d7th in the d-axis current i.sub.d in the permanent-magnet synchronous machine control loop at the current moment, and a fifth-order harmonic current i.sub.q5th and a seventh-order harmonic current i.sub.q7th in the q-axis current i.sub.q in the permanent-magnet synchronous machine loop at the current moment; determining a d-axis current i.sub.d.sup.k+1 at a next moment in each switch state; determining a q-axis current i.sub.q.sup.k+1 at the next moment in each switch state based on the first current i.sub.d.sup.k, the second current i.sub.q.sup.k, and the second voltage in each switch state; and determining a control policy of the permanent-magnet synchronous machine.

    Claims

    1. A permanent-magnet synchronous machine control method, comprising: obtaining a d-axis current i.sub.d and a q-axis current i.sub.q in a permanent-magnet synchronous machine control loop at a current moment; obtaining a fifth-order harmonic current i.sub.d5th and a seventh-order harmonic current i.sub.d7th in the d-axis current i.sub.d in the permanent-magnet synchronous machine control loop at the current moment, and a fifth-order harmonic current i.sub.q5th and a seventh-order harmonic current i.sub.q7th in the q-axis current i.sub.q in the permanent-magnet synchronous machine loop at the current moment; calculating four harmonic voltages based on the fifth-order harmonic current i.sub.d5th, the seventh-order harmonic current i.sub.d7th, the fifth-order harmonic current i.sub.q5th, and the seventh-order harmonic current i.sub.q7th, wherein the four harmonic voltages comprise a d-axis-fifth-order harmonic voltage u.sub.d5th, a q-axis fifth-order harmonic voltage u.sub.q5th, a d-axis seventh-order harmonic voltage u.sub.d7th, and a q-axis seventh-order harmonic voltage u.sub.q7th; subtracting the fifth-order harmonic current i.sub.d5th and the seventh-order harmonic current i.sub.d7th from the d-axis current i.sub.d to obtain a first current i.sub.d.sup.k on a d axis; and subtracting the fifth-order harmonic current i.sub.q5th and the seventh-order harmonic current i.sub.q7th from the q-axis current i.sub.q to obtain a second current i.sub.q.sup.k on a q axis; subtracting the d-axis fifth-order harmonic voltage u.sub.d5th and the d-axis seventh-order harmonic voltage u.sub.d7th from a d-axis voltage corresponding to each switch state of an inverter to obtain a first voltage on the d axis in each switch state, and subtracting the q-axis fifth-order harmonic voltage u.sub.q5th and the q-axis seventh-order harmonic voltage u.sub.q7th from a q-axis voltage corresponding to each switch state of the inverter to obtain a second voltage on the q axis in each switch state; determining a d-axis current i.sub.d.sup.k+1 at a next moment in each switch state based on the first current i.sub.d.sup.k, the second current i.sub.q.sup.k, and the first voltage in each switch state; and determining a q-axis current i.sub.q.sup.k+1 at the next moment in each switch state based on the first current i.sub.d.sup.k, the second current i.sub.q.sup.k, and the second voltage in each switch state; and determining a control policy of the permanent-magnet synchronous machine based on the d-axis current i.sub.d.sup.k+1 at the next moment in each switch state and the q-axis current i.sub.q.sup.k+1 at the next moment in each switch state.

    2. The method according to claim 1, wherein the obtaining a fifth-order harmonic current i.sub.d5th and a seventh-order harmonic current i.sub.d7th in the d-axis current i.sub.d in the permanent-magnet synchronous machine control loop at the current moment, and a fifth-order harmonic current i.sub.q5th and a seventh-order harmonic current i.sub.q7th in the q-axis current i.sub.q in the permanent-magnet synchronous machine loop at the current moment comprises: obtaining a three-phase current in the permanent-magnet synchronous machine control loop at the current moment; transforming the three-phase current into a d-axis current and a q-axis current in a fifth-order rotating coordinate system based on a coordinate transformation algorithm and a phase angle of a fifth-order harmonic; filtering the d-axis current and the q-axis current in the fifth-order rotating coordinate system by using a filter, so as to obtain the fifth-order harmonic current i.sub.d5th and the fifth-order harmonic current i.sub.q5th; transforming the three-phase current into a d-axis current and a q-axis current in a seventh-order rotating coordinate system based on the coordinate transformation algorithm and a phase angle of a seventh-order harmonic; and filtering the d-axis current and the q-axis current in the seventh-order rotating coordinate system by using the filter, so as to obtain the seventh-order harmonic current i.sub.d7th and the seventh-order harmonic current i.sub.q7th.

    3. The method according to claim 1, wherein a formula for calculating the d-axis fifth-order harmonic voltage u.sub.d5th is: u.sub.d5th=5w.sub.eL.sub.qi.sub.q5th+R.sub.si.sub.d5th; a formula for calculating the q-axis fifth-order harmonic voltage is:
    u.sub.q5th=−5w.sub.eL.sub.di.sub.d5th+R.sub.si.sub.q5th; a formula for calculating the d-axis seventh-order harmonic voltage is:
    u.sub.d7th=−7w.sub.eL.sub.qi.sub.q7th+R.sub.si.sub.d7th; and a formula for calculating the q-axis seventh-order harmonic voltage is:
    u.sub.q7th=7w.sub.eL.sub.di.sub.d7th+R.sub.si.sub.q7th, wherein, w.sub.e represents an electrical angular velocity, R.sub.s represents a stator resistance, L.sub.d represents a d-axis inductance parameter, and L.sub.q represents a q-axis inductance parameter.

    4. The method according to claim 1, wherein the determining a control policy of the permanent-magnet synchronous machine based on the d-axis current i.sub.d.sup.k+1 at the next moment in each switch state and the q-axis current i.sub.q.sup.k+1 at the next moment in each switch state comprises: obtaining a d-axis reference current i.sub.d.sup.ref and a q-axis reference current i.sub.q.sup.ref based on an MTPA and a torque current distribution policy of flux weakening control; and calculating a cost function corresponding to each switch state based on the d-axis current i.sub.d.sup.k+1 at the next moment in each switch state, the q-axis current i.sub.q.sup.k+1 at the next moment in each switch state, the d-axis reference current i.sub.d.sup.ref, and the q-axis reference current i.sub.q.sup.ref, wherein, a switch state with a lowest cost function is the control policy of the permanent-magnet synchronous machine.

    5. The method according to claim 1, wherein the inverter is a two-level inverter, and the two-level inverter comprises eight switch states.

    6. A permanent-magnet synchronous machine control device, characterized in that the device comprises: a first obtaining module, configured to obtain a d-axis current i.sub.d and a q-axis current i.sub.q in a permanent-magnet synchronous machine control loop at a current moment; a second obtaining module, configured to obtain a fifth-order harmonic current i.sub.d5th and a seventh-order harmonic current i.sub.d7th in the d-axis current i.sub.d in the permanent-magnet synchronous machine control loop at the current moment, and a fifth-order harmonic current i.sub.q5th and a seventh-order harmonic current i.sub.q7th in the q-axis current in the permanent-magnet synchronous machine loop at the current moment; a first calculation module, configured to calculate four harmonic voltages based on the fifth-order harmonic current i.sub.d5th, the seventh-order harmonic current i.sub.d7th, the fifth-order harmonic current i.sub.q5th, and the seventh-order harmonic current i.sub.q7th, wherein the four harmonic voltages comprise a d-axis fifth-order harmonic voltage u.sub.d5th, a q-axis fifth-order harmonic voltage u.sub.q5th, a d-axis seventh-order harmonic voltage u.sub.d7th, and a q-axis seventh-order harmonic voltage u.sub.q7th; a second calculation module, configured to subtract the fifth-order harmonic current i.sub.d5th and the seventh-order harmonic current i.sub.d7th from the d-axis current i.sub.d to obtain a first current i.sub.d.sup.k on a d axis; and subtract the fifth-order harmonic current i.sub.q5th and the seventh-order harmonic current i.sub.q7th from the q-axis current i.sub.q to obtain a second current i.sub.q.sup.k on a q axis; a third calculation module, configured to subtract the d-axis fifth-order harmonic voltage u.sub.d5th and the d-axis seventh-order harmonic voltage u.sub.d7th from a d-axis voltage corresponding to each switch state of an inverter to obtain a first voltage on the d axis in each switch state; and subtract the q-axis fifth-order harmonic voltage u.sub.q5th and the q-axis seventh-order harmonic voltage u.sub.q7th from a q-axis voltage corresponding to each switch state of the inverter to obtain a second voltage on the q axis in each switch state; a fourth calculation module, configured to determine a d-axis current i.sub.d.sup.k+1 at a next moment in each switch state based on the first current i.sub.d.sup.k, the second current i.sub.q.sup.k, and the first voltage in each switch state; and determine a q-axis current i.sub.q.sup.k+1 at the next moment in each switch state based on the first current i.sub.d.sup.k, the second current i.sub.q.sup.k, and the second voltage in each switch state; and a determining module, configured to determine a control policy of the permanent-magnet synchronous machine based on the d-axis current i.sub.d.sup.k+1 at the next moment in each switch state and the q-axis current i.sub.q.sup.k+1 at the next moment in each switch state.

    7. The device according to claim 6, wherein the second obtaining module is specifically configured to obtain a three-phase current in the permanent-magnet synchronous machine control loop at the current moment; transform the three-phase current into a d-axis current and a q-axis current in a fifth-order rotating coordinate system based on a coordinate transformation algorithm and a phase angle of a fifth-order harmonic; filter the d-axis current and the q-axis current in the fifth-order rotating coordinate system by using a filter, so as to obtain the fifth-order harmonic current i.sub.d5th and the fifth-order harmonic current i.sub.q5th; transform the three-phase current into a d-axis current and a d-axis current in a seventh-order rotating coordinate system based on the coordinate transformation algorithm and a phase angle of a seventh-order harmonic; and filter the d-axis current and the q-axis current in the seventh-order rotating coordinate system by using the filter, so as to obtain the seventh-order harmonic current i.sub.d7th and the seventh-order harmonic current i.sub.q7th.

    8. The device according to claim 6, wherein a formula for calculating the d-axis fifth-order harmonic voltage u.sub.d5th is: u.sub.d5th=5w.sub.eL.sub.qi.sub.q5th+R.sub.si.sub.d5th; a formula for calculating the q-axis fifth-order harmonic voltage u.sub.q5th is:
    u.sub.q5th=−5w.sub.eL.sub.di.sub.d5th+R.sub.si.sub.q5th; a formula for calculating the d-axis seventh-order harmonic voltage u.sub.d7th is:
    u.sub.d7th=−7w.sub.eL.sub.qi.sub.q7th+R.sub.si.sub.d7th; and a formula for calculating the q-axis seventh-order harmonic voltage u.sub.q7th is:
    u.sub.q7th=7w.sub.eL.sub.di.sub.d7th+R.sub.si.sub.q7th, wherein, w.sub.e represents an electrical angular velocity, R.sub.s represents a stator resistance, L.sub.d represents a d-axis inductance parameter, and L.sub.q represents a q-axis inductance parameter.

    9. The device according to claim 6, wherein the determining module is specifically configured to obtain a d-axis reference current i.sub.d.sup.ref and a q-axis reference current i.sub.q.sup.ref based on an MTPA and a torque current distribution policy of flux weakening control; and calculate a cost function corresponding to each switch state based on the d-axis current i.sub.d.sup.k+1 at a next moment in each switch state, the q-axis current i.sub.q.sup.k+1 at the next moment in each switch state, the d-axis reference current i.sub.d.sup.ref, and the q-axis reference current i.sub.q.sup.ref, wherein, a switch state with a lowest cost function is the control policy of the permanent-magnet synchronous machine.

    10. A permanent-magnet synchronous machine control system, comprising: an electric machine controller, a permanent-magnet synchronous machine, and an inverter, wherein the electric machine controller is connected to the permanent-magnet synchronous machine and the inverter separately; the permanent-magnet synchronous machine is further connected to the inverter; and the electric machine controller is configured to perform the method according to claim 1.

    Description

    BRIEF DESCRIPTION OF DRAWINGS

    [0020] To describe technical solutions in embodiments of this application more clearly, the following outlines the drawings to be used in the embodiments of this application. Understandably, the following drawings show merely some embodiments of this application, and therefore, are not intended to limit the scope. A person of ordinary skill in the art may derive other related drawings from the drawings without making any creative efforts.

    [0021] FIG. 1 is a modular block diagram of a permanent-magnet synchronous machine control system according to an embodiment of this application;

    [0022] FIG. 2A and FIG. 2B is a flowchart of steps of a permanent-magnet synchronous machine control method according to an embodiment of this application;

    [0023] FIG. 3 is a control block diagram of a permanent-magnet synchronous machine control system according to an embodiment of this application; and

    [0024] FIG. 4 is a modular block diagram of a permanent-magnet synchronous machine control device according to an embodiment of this application.

    [0025] Reference numerals: 100—permanent-magnet synchronous machine control system; 10—electric machine controller; 20—permanent-magnet synchronous machine; 30—inverter; 200—permanent-magnet synchronous machine control device; 201—first obtaining module; 202—second obtaining module; 203—first calculation module; 204—second calculation module; 205—third calculation module; 206—fourth calculation module; and 207—determining module.

    DETAILED DESCRIPTION OF EMBODIMENTS

    [0026] The following describes technical solutions in embodiments of this application with reference to the drawings in the embodiments of this application.

    [0027] Referring to FIG. 1, an embodiment of this application provides a permanent-magnet synchronous machine control system 100, including: an electric machine controller 10, a permanent-magnet synchronous machine 20, and an inverter 30.

    [0028] The electric machine controller 10 is connected to the permanent-magnet synchronous machine 20 and the inverter 30 separately. The permanent-magnet synchronous electric machine 20 is further connected to the inverter 30.

    [0029] It needs to be noted that the inverter 30 is a transformer that transforms direct-current electrical energy into a constant-frequency constant-voltage or frequency-regulated voltage-regulated alternating current. The electric machine controller 10 may be an integrated circuit chip capable of signal processing. Alternatively, the electric machine controller 10 may be a general-purpose processor, and may be, for example, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a discrete gate or a transistor logic device, or a discrete hardware component, and can implement or perform the methods, steps, and logical block diagrams disclosed in the embodiments of this application. In addition, the general-purpose processor may be a microprocessor, or any conventional processor or the like.

    [0030] In this embodiment of this application, the electric machine controller 10 controls the permanent-magnet synchronous machine 20 by controlling the inverter 30.

    [0031] Referring to FIG. 2, FIG. 2 is a flowchart of steps of a permanent-magnet synchronous machine control method according to an embodiment of this application. The method is applied to the electric machine controller 10 in the permanent-magnet synchronous machine control system 100 shown in FIG. 1. It needs to be noted that the permanent-magnet synchronous machine control method according to this embodiment of this application is not limited to the order shown in FIG. 2 or the order described below. The method includes steps S101 to S107.

    [0032] Step S101: Obtaining a d-axis current i.sub.d and a q-axis current i.sub.q in a permanent-magnet synchronous machine control loop at a current moment.

    [0033] When the electric machine controller is directly connected to the permanent-magnet synchronous machine, the electric machine controller is configured to obtain a three-phase current in the permanent-magnet synchronous machine control loop at the current moment, and then perform current transformation based on a coordinate transformation algorithm to obtain the d-axis current i.sub.d and the q-axis current i.sub.q in the permanent-magnet synchronous machine control loop at the current moment.

    [0034] The coordinate transformation algorithm is used to transform the three-phase current into the dq-axis current. Such coordinate transformation algorithm is well known in the art, and is not detailed in this application.

    [0035] In addition, the transformation process may be performed by a discrete control chip. For example, a control chip is disposed in the permanent-magnet synchronous machine control system, and is connected between the electric machine controller and the permanent-magnet synchronous machine. The control chip is configured to obtain a three-phase current in the permanent-magnet synchronous machine control loop at the current moment, and then perform current transformation based on the coordinate transformation algorithm to obtain the d-axis current i.sub.d and the q-axis current i.sub.q in the permanent-magnet synchronous machine control loop at the current moment. Then the control chip transmits the d-axis current i.sub.d and the q-axis current i.sub.q in the permanent-magnet synchronous machine control loop at the current moment to the electric machine controller, so that the electric machine controller obtains the d-axis current i.sub.d and the q-axis current i.sub.q in the permanent-magnet synchronous machine control loop at the current moment.

    [0036] Step S102: Obtaining a fifth-order harmonic current i.sub.d5th and a seventh-order harmonic current i.sub.d7th in the d-axis current i.sub.d in the permanent-magnet synchronous machine control loop at the current moment, and a fifth-order harmonic current i.sub.q5th and a seventh-order harmonic current i.sub.q7th in the q-axis current i.sub.q in the permanent-magnet synchronous machine loop at the current moment.

    [0037] Harmonic currents existent in the permanent-magnet synchronous machine are primarily the fifth-order harmonic current and the seventh-order harmonic current. Therefore, it is necessary to extract the fifth-order harmonic current i.sub.d5th and the seventh-order harmonic current i.sub.d7th in the d-axis current i.sub.d in the permanent-magnet synchronous machine control loop at the current moment and the fifth-order harmonic current i.sub.q5th and the seventh-order harmonic current i.sub.q7th in the q-axis current i.sub.q in the permanent-magnet synchronous machine loop at the current moment.

    [0038] Specifically, this step includes: obtaining a three-phase current in the permanent-magnet synchronous machine control loop at the current moment; transforming the three-phase current into a d-axis current and a q-axis current in a fifth-order rotating coordinate system based on a coordinate transformation algorithm and a phase angle of a fifth-order harmonic; filtering the d-axis current and the q-axis current in the fifth-order rotating coordinate system by using a filter, so as to obtain the fifth-order harmonic current i.sub.d5th and the fifth-order harmonic current i.sub.q5th; transforming the three-phase current into a d-axis current and a q-axis current in a seventh-order rotating coordinate system based on the coordinate transformation algorithm and a phase angle of a seventh-order harmonic; and filtering the d-axis current and the q-axis current in the seventh-order rotating coordinate system by using the filter, so as to obtain the seventh-order harmonic current i.sub.d7th and the seventh-order harmonic current i.sub.q7th.

    [0039] It needs to be noted that the harmonic currents extracted from the d axis and the q axis are a current in a fifth-order rotating coordinate system and a current in a seventh-order rotating coordinate system respectively. For example, both the fifth-order harmonic current extracted from the d-axis current and the fifth-order harmonic current extracted from the q-axis current are currents in the fifth-order rotating coordinate system, and both the seventh-order harmonic current extracted from the d-axis current and the seventh-order harmonic current extracted from the q-axis current are currents in the seventh-order rotating coordinate system. To facilitate unified calculation, the currents in the fifth-order rotating coordinate system and the seventh-order rotating coordinate system are uniformly transformed for use in a first-order synchronous rotating coordinate system identical with the d-axis current i.sub.d and the q-axis current i.sub.q, so as to obtain the fifth-order harmonic current i.sub.d5th, the fifth-order harmonic current i.sub.q5th, the seventh-order harmonic current i.sub.d7th, and the seventh-order harmonic current i.sub.q7th that are transformed for use in the first-order synchronous rotating coordinate system.

    [0040] The coordinate transformation may be Park transformation, which is well known in the art, and is not described in detail here.

    [0041] Step S103: Calculating four harmonic voltages based on the fifth-order harmonic current i.sub.d5th, the seventh-order harmonic current i.sub.d7th, the fifth-order harmonic current i.sub.q5th, and the seventh-order harmonic current i.sub.q7th.

    [0042] The four harmonic voltages include a d-axis fifth-order harmonic voltage u.sub.d5th, a q-axis fifth-order harmonic voltage u.sub.q5th, a d-axis seventh-order harmonic voltage u.sub.d7th, and a q-axis seventh-order harmonic voltage u.sub.q7th.

    [0043] A formula for calculating the d-axis fifth-order harmonic voltage u.sub.d5th is:


    u.sub.d5th=5w.sub.eL.sub.qi.sub.q5th+R.sub.si.sub.d5th  (1)

    [0044] A formula for calculating the q-axis fifth-order harmonic voltage u.sub.q5th is:


    u.sub.q5th=−5w.sub.eL.sub.di.sub.d5th+R.sub.si.sub.q5th  (2)

    [0045] A formula for calculating the d-axis seventh-order harmonic voltage u.sub.d7th is:


    u.sub.d7th=−7w.sub.eL.sub.qi.sub.q7th+R.sub.si.sub.d7th  (3)

    [0046] A formula for calculating the q-axis seventh-order harmonic voltage u.sub.q7th is:


    u.sub.q7th=7w.sub.eL.sub.di.sub.d7th+R.sub.si.sub.q7th  (4)

    [0047] In formulas (1) to (4), w.sub.e represents an electrical angular velocity, R.sub.s represents a stator resistance, L.sub.d represents a d-axis inductance parameter, and L.sub.q represents a q-axis inductance parameter.

    [0048] Step S104: Subtracting the fifth-order harmonic current i.sub.d5th and the seventh-order harmonic current i.sub.d7th from the d-axis current i.sub.d to obtain a first current i.sub.d.sup.k on a d axis; and subtracting the fifth-order harmonic current i.sub.q5th and the seventh-order harmonic current i.sub.q7th from the q-axis current i.sub.q to obtain a second current i.sub.q.sup.k on a q axis.

    [0049] The d-axis current i.sub.d and the q-axis current i.sub.q each include harmonic components (fifth-order harmonic current and seventh-order harmonic current). Therefore, the harmonic components are removed to obtain a current net of the harmonic components.

    [0050] Step S105: Subtracting the d-axis fifth-order harmonic voltage u.sub.d5th and the d-axis seventh-order harmonic voltage u.sub.d7th from a d-axis voltage corresponding to each switch state of the inverter to obtain a first voltage on the d axis in each switch state; and subtracting the q-axis fifth-order harmonic voltage u.sub.q5th and the q-axis seventh-order harmonic voltage u.sub.q7th from a q-axis voltage corresponding to each switch state of the inverter to obtain a second voltage on the q axis in each switch state.

    [0051] The expression for the first voltage is:


    u.sub.d.sup.k=u.sub.d.sup.k*−u.sub.d5th−u.sub.d7th  (5)

    [0052] In formula (5), u.sub.d.sup.k* represents the d-axis voltage in any switch state, and u.sub.d.sup.k represents the first voltage corresponding to u.sub.d.sup.k*. It needs to be noted that the first voltage on the d axis in each switch state can be obtained through formula (5).

    [0053] The expression for the second voltage is:


    u.sub.q.sup.k=u.sub.q.sup.k*−u.sub.q5th−u.sub.q7th  (6)

    [0054] In formula (6), u.sub.q.sup.k* represents the q-axis voltage in any switch state, and u.sub.q.sup.k represents the second voltage corresponding to u.sub.q.sup.k*. It needs to be noted that the second voltage on the q axis in each switch state can be obtained through formula (6).

    [0055] Step S106: Determining a d-axis current i.sub.d.sup.k+1 at a next moment in each switch state based on the first current i.sub.d.sup.k, the second current i.sub.q.sup.k, and the first voltage in each switch state; and determining a q-axis current i.sub.q.sup.k+1 at the next moment in each switch state based on the first current i.sub.d.sup.k, the second current i.sub.q.sup.k, and the second voltage in each switch state.

    [0056] In this embodiment of this application, the current at the next moment in each switch state is predicted based on the current net of the harmonic components at the current moment and the voltage net of the harmonic components in each switch state.

    [0057] The expression for the d-axis current i.sub.d.sup.k+1 at the next moment in each switch state is:

    [00001] i d k + 1 = ( 1 - R s T s L d ) i d k + w e L q T s L d i q k + T s L d u d k ( 7 )

    [0058] In formula (7), u.sub.d.sup.k represents the first voltage in any switch state. For ease of calculation, the first voltage has been pre-transformed into a voltage in a first-order synchronous rotating coordinate system. i.sub.d.sup.k+1 represents the d-axis current at the next moment in a switch state corresponding to u.sub.d.sup.k. R.sub.s represents a stator resistance; L.sub.d represents a d-axis inductance parameter; T.sub.s represents sampling time; L.sub.q represents a q-axis inductance parameter; ψ.sub.f represents a flux linkage; and w.sub.e represents an electrical angular velocity.

    [0059] The expression for the q-axis current i.sub.q.sup.k+1 at the next moment in each switch state is:

    [00002] i q k + 1 = - w e L d T s L q i d k + ( 1 - R s T s L d ) i q k + T s L d u q k - w e ψ f L q T s ( 8 )

    [0060] In formula (8), u.sub.q.sup.k represents the second voltage in any switch state. For ease of calculation, the second voltage has been pre-transformed into a voltage in a first-order synchronous rotating coordinate system. i.sub.q.sup.k+1 represents the q-axis current at the next moment in a switch state corresponding to u.sub.q.sup.k. R.sub.s represents the stator resistance; L.sub.d represents the d-axis inductance parameter; T.sub.s represents sampling time; L.sub.q represents the q-axis inductance parameter; ψ.sub.f represents a flux linkage; and w.sub.e represents the electrical angular velocity.

    [0061] Step S107: Determining a control policy of the permanent-magnet synchronous machine based on the d-axis current i.sub.d.sup.k+1 at the next moment in each switch state and the q-axis current i.sub.q.sup.k+1 at the next moment in each switch state.

    [0062] After the d-axis current i.sub.d.sup.k+1 and the q-axis current i.sub.q.sup.k+1 at the next moment in each switch state are predicted, the control policy of the permanent-magnet synchronous machine can be determined based on the prediction result.

    [0063] The foregoing step may specifically include: obtaining a d-axis reference current i.sub.d.sup.ref and a q-axis reference current i.sub.q.sup.ref based on a maximum torque per ampere (MTPA) and a torque current distribution policy of flux weakening control; and calculating a cost function corresponding to each switch state based on the d-axis current i.sub.d.sup.k+1 at the next moment in each switch state, the q-axis current i.sub.q.sup.k+1 at the next moment in each switch state, the d-axis reference current i.sub.d.sup.ref, and the q-axis reference current i.sub.q.sup.ref. A switch state with a lowest cost function is the control policy of the permanent-magnet synchronous machine.

    [0064] It needs to be noted that the MTPA and the torque current distribution policy of flux weakening control are control policies well known in the art, and therefore, are not described in detail in this application. In this embodiment of this application, the MTPA and the torque current distribution policy of flux weakening control are intended to provide reference currents (including the d-axis reference current i.sub.d.sup.ref and the q-axis reference current i.sub.q.sup.ref) to facilitate calculation of the cost function.

    [0065] In an implementation, the expression for the cost function is:


    g=√{square root over ((i.sub.d.sup.k+1−i.sub.d.sup.ref).sup.2+(i.sub.q.sup.k+1−i.sub.q.sup.ref).sup.2)}  (9)

    [0066] In formula (9), represents a calculated value of the cost function, i.sub.d.sup.k+1 represents the d-axis current at the next moment in a switch state, and i.sub.q.sup.k+1 represents the q-axis current at the next moment in said switch state.

    [0067] The cost function corresponding to each switch state can be obtained through formula (9), and then the switch state with a lowest calculated value of the cost function serves as the control policy of the permanent-magnet synchronous machine. That is, the permanent-magnet synchronous machine is controlled by using a switch corresponding to the switch state with the lowest calculated value of the cost function.

    [0068] Evidently, the permanent-magnet synchronous machine control method according to this embodiment of this application adopts the idea of a finite set, calculates the cost function corresponding to each switch state based on a voltage vector of the switch state of the inverter, and determines an optimal switch state based on the cost function. In this way, a modem in vector control is eliminated, the control structure of the system is further simplified, and dynamic response of the system is improved by directly outputting an optimal switch vector.

    [0069] In this embodiment of this application, the inverter is a two-level inverter. The two-level inverter includes eight switch states, and the eight switch states correspond to seven voltage vectors.

    [0070] When the inverter is a two-level inverter, an optimal switch state can be determined from the eight switch states in the way above to control the permanent-magnet synchronous machine.

    [0071] For ease of understanding this solution, the permanent-magnet synchronous machine control method is described below with reference to a control block diagram of a permanent-magnet synchronous machine control system shown in FIG. 3.

    [0072] First, the electric machine controller is configured to obtain a three-phase current (including i.sub.a, i.sub.b, and i.sub.c) in the permanent-magnet synchronous machine control loop at the current moment, and then perform current transformation based on the coordinate transformation algorithm to obtain the d-axis current i.sub.d and the q-axis current i.sub.q in the permanent-magnet synchronous machine control loop at the current moment.

    [0073] Harmonic currents existent in the permanent-magnet synchronous machine are primarily the fifth-order harmonic current and the seventh-order harmonic current. Therefore, a harmonic current calculation module shown in FIG. 3 extracts the fifth-order harmonic current i.sub.d5th and the seventh-order harmonic current i.sub.d7th in the d-axis current i.sub.d in the permanent-magnet synchronous machine control loop at the current moment and the fifth-order harmonic current i.sub.q5th and the seventh-order harmonic current i.sub.q7th in the q-axis current i.sub.q in the permanent-magnet synchronous machine loop at the current moment. The harmonic current extraction steps shown in FIG. 3 include: transforming the three-phase current (including i.sub.a, i.sub.b, and i.sub.c) into a d-axis current and a q-axis current in a fifth-order rotating coordinate system based on a coordinate transformation algorithm and a phase angle of a fifth-order harmonic; filtering the d-axis current and the q-axis current in the fifth-order rotating coordinate system by using a filter, so as to obtain the fifth-order harmonic current i.sub.d5th and the fifth-order harmonic current i.sub.q5th; transforming the three-phase current into a d-axis current and a q-axis current in a seventh-order rotating coordinate system based on the coordinate transformation algorithm and a phase angle of a seventh-order harmonic; and filtering the d-axis current and the q-axis current in the seventh-order rotating coordinate system by using the filter, so as to obtain the seventh-order harmonic current i.sub.d7th and the seventh-order harmonic current i.sub.q7th. In the drawing, θ.sub.r represents the phase angle. The phase angle of the fifth-order harmonic θ.sub.r is −5θ, and the phase angle θ.sub.r of the seventh-order harmonic is 7θ.

    [0074] Then a harmonic voltage calculation module shown in FIG. 3 calculates the d-axis fifth-order harmonic voltage u.sub.d5th, the q-axis fifth-order harmonic voltage u.sub.q5th, the d-axis seventh-order harmonic voltage u.sub.d7th, and the q-axis seventh-order harmonic voltage u.sub.q7th.

    [0075] Subsequently, the fifth-order harmonic current i.sub.d5th and the seventh-order harmonic current i.sub.d7th are subtracted from the d-axis current i.sub.d to obtain a first current i.sub.d.sup.k on a d axis. The fifth-order harmonic current i.sub.q5th and the seventh-order harmonic current i.sub.q7th are subtracted from the q-axis current i.sub.q to obtain a second current i.sub.q.sup.k on a q axis. Then the d-axis fifth-order harmonic voltage u.sub.d5th and the d-axis seventh-order harmonic voltage u.sub.d7th are subtracted from a d-axis voltage corresponding to each switch state of the inverter to obtain a first voltage on the d axis in each switch state. The q-axis fifth-order harmonic voltage u.sub.q5th and the q-axis seventh-order harmonic voltage u.sub.q7th are subtracted from a q-axis voltage corresponding to each switch state of the inverter to obtain a second voltage on the q axis in each switch state. Subsequently, a d-axis current i.sub.d.sup.k+1 at the next moment in each switch state is determined based on the first current i.sub.d.sup.k and the first voltage in each switch state; and a q-axis current i.sub.q.sup.k+1 at the next moment in each switch state is determined based on the second current i.sub.q.sup.k and the second voltage in each switch state.

    [0076] Finally, a d-axis reference current i.sub.d.sup.ref and a q-axis reference current i.sub.q.sup.ref are obtained based on an MTPA and a torque current distribution policy of flux weakening control. A cost function g=√{square root over ((i.sub.d.sup.k+1−i.sub.d.sup.ref).sup.2+(i.sub.q.sup.k+1−i.sub.q.sup.ref).sup.2)}corresponding to each switch state is calculated based on the d-axis current i.sub.d.sup.k+1 at the next moment in each switch state, the q-axis current i.sub.q.sup.k+1 at the next moment in each switch state, the d-axis reference current i.sub.d.sup.ref, and the q-axis reference current i.sub.q.sup.ref. Finally, a switch state with a lowest cost function is used as the control policy of the permanent-magnet synchronous machine. It needs to be noted that the inverter shown in FIG. 3 is a two-level inverter. The two-level inverter includes eight switch states, and the eight switch states correspond to seven voltage vectors. Because two of the voltage vectors are the same, the vector diagram shown in FIG. 3 just includes six vectors. The relevant structures of the MTPA and the torque current distribution policy of flux weakening control are structures well known in the art, and therefore, are not described in detail in this application.

    [0077] In conclusion, based on a model predictive control algorithm, the permanent-magnet synchronous machine control method according to this embodiment of this application predicts the corresponding -axis current and -axis current at the next moment in each switch state based on the -axis current and the -axis current net of the harmonic components at the current moment, and then determines the control policy of the permanent-magnet synchronous machine based on the prediction result. Compared with the existing harmonic current suppression method, the technical solution in this application cancels the existing PI controllers by using the model predictive control algorithm instead, avoids complicated PI parameter adjustment, simplifies the system structure, and is more effective in suppressing the harmonic current.

    [0078] Referring to FIG. 4, based on the same inventive conception, an embodiment of this application further provides a permanent-magnet synchronous machine control device 200, including: a first obtaining module 201, a second obtaining module 202, a first calculation module 203, a second calculation module 204, a third calculation module 205, a fourth calculation module 206, and a determining module 207.

    [0079] The first obtaining module 201 is configured to obtain a d-axis current i.sub.d and a q-axis current i.sub.q in a permanent-magnet synchronous machine control loop at a current moment.

    [0080] The second obtaining module 202 is configured to obtain a fifth-order harmonic current i.sub.d5th and a seventh-order harmonic current i.sub.d7th in the d-axis current i.sub.d in the permanent-magnet synchronous machine control loop at the current moment and a fifth-order harmonic current i.sub.q5th and a seventh-order harmonic current i.sub.q7th in the q-axis current i.sub.q in the permanent-magnet synchronous machine loop at the current moment.

    [0081] The first calculation module 203 is configured to calculate four harmonic voltages based on the fifth-order harmonic current i.sub.d5th, the seventh-order harmonic current i.sub.d7th, the fifth-order harmonic current i.sub.q5th, and the seventh-order harmonic current i.sub.q7th, where the four harmonic voltages include a d-axis fifth-order harmonic voltage u.sub.d5th, a q-axis fifth-order harmonic voltage u.sub.q5th, a d-axis seventh-order harmonic voltage u.sub.d7th, and a q-axis seventh-order harmonic voltage u.sub.q7th.

    [0082] The second calculation module 204 is configured to subtract the fifth-order harmonic current i.sub.d5th and the seventh-order harmonic current i.sub.d7th from the d-axis current i.sub.d to obtain a first current i.sub.d.sup.k on a d axis, and subtract the fifth-order harmonic current i.sub.q5th and the seventh-order harmonic current i.sub.q7th from the q-axis current i.sub.q to obtain a second current i.sub.q.sup.k on a q axis.

    [0083] The third calculation module 205 is configured to subtract the d-axis fifth-order harmonic voltage u.sub.d5th and the d-axis seventh-order harmonic voltage u.sub.d7th from a d-axis voltage corresponding to each switch state of the inverter to obtain a first voltage on the d axis in each switch state; and subtract the q-axis fifth-order harmonic voltage u.sub.q5th and the q-axis seventh-order harmonic voltage u.sub.q7th from a q-axis voltage corresponding to each switch state of the inverter to obtain a second voltage on the q axis in each switch state.

    [0084] The fourth calculation module 206 is configured to determine a d-axis current i.sub.d.sup.k+1 at a next moment in each switch state based on the first current i.sub.d.sup.k, the second current i.sub.q.sup.k, and the first voltage in each switch state; and determine a q-axis current i.sub.q.sup.k+1 at the next moment in each switch state based on the first current i.sub.d.sup.k, the second current i.sub.q.sup.k, and the second voltage in each switch state; and

    [0085] The determining module 207 is configured to determine a control policy of the permanent-magnet synchronous machine based on the d-axis current i.sub.d.sup.k+1 at the next moment in each switch state and the q-axis current i.sub.q.sup.k+1 at the next moment in each switch state.

    [0086] In some embodiments, the second obtaining module is specifically configured to obtain a three-phase current in the permanent-magnet synchronous machine control loop at the current moment; transform the three-phase current into a d-axis current and a q-axis current in a fifth-order rotating coordinate system based on a coordinate transformation algorithm and a phase angle of a fifth-order harmonic; filter the d-axis current and the q-axis current in the fifth-order rotating coordinate system by using a filter, so as to obtain the fifth-order harmonic current i.sub.d5th and the fifth-order harmonic current i.sub.q5th; transform the three-phase current into a d-axis current and a q-axis current in a seventh-order rotating coordinate system based on the coordinate transformation algorithm and a phase angle of a seventh-order harmonic; and filter the d-axis current and the q-axis current in the seventh-order rotating coordinate system by using the filter, so as to obtain the seventh-order harmonic current i.sub.d7th and the seventh-order harmonic current i.sub.q7th.

    [0087] In some embodiments, a formula for calculating the d-axis fifth-order harmonic voltage u.sub.d5th is: u.sub.d5th=5w.sub.eL.sub.qi.sub.q5th+R.sub.si.sub.d5th; a formula for calculating the q-axis fifth-order harmonic voltage u.sub.q5th is: u.sub.q5th=−5w.sub.eL.sub.di.sub.d5th+R.sub.si.sub.q5th; a formula for calculating the d-axis seventh-order harmonic voltage u.sub.d7th is: u.sub.d7th=−7w.sub.eL.sub.qi.sub.q7th+R.sub.si.sub.d7th; and a formula for calculating the q-axis seventh-order harmonic voltage u.sub.q7th is: u.sub.q7th=7w.sub.eL.sub.di.sub.d7th+R.sub.si.sub.q7th, where, w.sub.e represents an electrical angular velocity, R.sub.s represents a stator resistance, L.sub.d represents a d-axis inductance parameter, and L.sub.q represents a q-axis inductance parameter.

    [0088] In some embodiments, the determining module is specifically configured to obtain a d-axis reference current i.sub.d.sup.ref and a q-axis reference current i.sub.q.sup.ref based on an MTPA and a torque current distribution policy of flux weakening control; and calculate a cost function corresponding to each switch state based on the d-axis current i.sub.d.sup.k+1 at the next moment in each switch state, the q-axis current i.sub.q.sup.k+1 at the next moment in each switch state, the d-axis reference current i.sub.d.sup.ref, and the q-axis reference current i.sub.q.sup.ref. A switch state with a lowest cost function is the control policy of the permanent-magnet synchronous machine.

    [0089] It needs to be noted that, it can be clearly understood by a person skilled in the art that for ease and brevity of description, a specific working process of the foregoing system, device, and units can be obtained by referring to a corresponding process in the preceding method embodiment, and the details are omitted here.

    [0090] Based on the same inventive conception, an embodiment of this application further provides a computer-readable storage medium on which a computer program is stored. When executed, the computer program performs the method provided in the foregoing embodiment.

    [0091] The storage medium may be any available medium accessible to a computer, or a data storage device such as a server or data center that integrates one or more available media. The available media may be a magnetic medium (such as a floppy disk, a hard disk, or a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)).

    [0092] In the embodiments provided in this application, it is understandable that the disclosed device and method may be implemented by other means. The device embodiment described above is merely exemplary. For example, the unit division is merely division with respect to logical functions, and in actual implementations, the units may be divided in other manners. For another example, a plurality of units or components may be combined or integrated into another system, or some features may be ignored or not implemented. In addition, the displayed or discussed mutual couplings or direct couplings or communications connections may be implemented through some communications interfaces. The indirect couplings or communications connections between the devices or units may be implemented in electronic, mechanical or other forms.

    [0093] In addition, the units described as discrete components above may be separated physically or not; and the components illustrated as units may be physical units or not, that is, they may be located in one place or distributed on a plurality of network elements. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.

    [0094] In addition, function modules in each embodiment of this application may be integrated together to form a stand-alone part, or each module may exist alone, or two or more modules may be integrated into a stand-alone part.

    [0095] The relational terms herein such as first and second are used merely to differentiate one entity or operation from another, and do not necessarily require or imply any actual relationship or sequence between the entities or operations.

    [0096] What is described above is merely embodiments of this application, but not intended to limit the protection scope of this application. To a person skilled in the art, various modifications and variations may be made to this application. Any modifications, equivalent replacements, improvements, and the like made without departing from the spirit and principles of this application fall within the protection scope of this application.