Compressor control method and device, air conditioner and storage medium
By combining fuzzy logic control and TD3 reinforcement learning algorithm, the rotor angular velocity and magnetic flux error of the compressor are obtained, the weight coefficient is generated and applied to the TD3 algorithm, the rotor velocity decoupling control of the compressor is realized, and the motor parameter coupling is solved The poor control effect caused by this improves the control effect and self-correction ability of the compressor.
Patent Information
- Application Number
- CN202411424095.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2025-01-14
AI Technical Summary
In the field of motor control, the coupling of motor parameters causes the compressor control effect to fail to meet the needs. The existing TD3 reinforcement learning method has mutual interference problems in motor control, which cannot effectively improve the control effect of the compressor.
By obtaining the rotor angular velocity error and rotor magnetic flux error of the compressor, input it to the fuzzy logic controller to obtain the weight coefficient, and combine it with the TD3 algorithm's intelligent body module to perform transformation processing and pulse width modulation to generate a three-phase control signal. Control the compressor to achieve decoupling control of the rotor magnetic flux and the rotor angular velocity.
It improves the control effect of the compressor, simplifies calculations, enhances the self-correction ability of control, and solves the control interference problem caused by motor parameter coupling.
Smart Images

Figure CN119315880A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of compressor control, and in particular to a compressor control method, device, air conditioner and storage medium. Background Art
[0002] Due to the strong constraints of power converters, many control algorithms could not be directly applied to the power converter field when they were first created. However, with the development of high-performance microprocessors and artificial intelligence (AI) technology, research on applying artificial intelligence technology to power electronic converters to improve the performance of power electronic converters has become a hot research topic.
[0003] As a hot research field in artificial intelligence technology, reinforcement learning has now gone through different stages of development, from Q-value networks to deep deterministic policy gradient (DDPG) and then to twin delayed deep deterministic policy gradient (TD3) algorithms. This type of reinforcement learning algorithm has the ability to handle complex operation and complex control problems. It interacts with the environment and adjusts the deterministic parameters based on the expected rewards, and finally achieves the goal control by outputting the most appropriate action parameters.
[0004] The existing technology has gradually begun to apply the TD3 reinforcement learning method in different fields. For example, patent document CN202211367284.9 discloses a TD3 reinforcement learning method for controlling permanent magnet synchronous motors. It mainly targets the external interference and uncertain structural parameters of motors at low wind speeds in the wind power field, and designs a TD3 algorithm agent that can be trained and learned according to environmental state quantities to achieve high efficiency and low power consumption control of motors at low wind speeds. Another example is patent document CN202310167190.5, which is applied to the field of DC-DC converters. However, in the field of motor control, due to a certain degree of coupling of motor parameters, there is a problem of mutual interference during control, which results in the compressor control effect failing to meet the demand. Summary of the invention
[0005] Embodiments of the present invention provide a compressor control method, device, air conditioner and storage medium, aiming to enhance the control effect on the compressor.
[0006] In a first aspect, an embodiment of the present invention provides a compressor control method, comprising:
[0007] Obtaining a rotor angular velocity error and a rotor flux error of the compressor, and inputting the rotor angular velocity error and the rotor flux error into a fuzzy logic controller to obtain a weight coefficient;
[0008] Collecting the direct-axis current sampling quantity and the quadrature-axis current sampling quantity of the compressor, and obtaining the direct-axis current reference quantity and the quadrature-axis current reference quantity through a PI controller;
[0009] The weight coefficient, the direct-axis current sampling amount, the quadrature-axis current sampling amount, the direct-axis current reference amount and the quadrature-axis current reference amount are input into the intelligent agent module of the TD3 algorithm, and the intelligent agent module outputs the direct-axis voltage reference amount and the quadrature-axis voltage reference amount;
[0010] The direct-axis voltage reference and the quadrature-axis voltage reference are sequentially transformed and pulse-width modulated to obtain a three-phase control signal;
[0011] The compressor is controlled using the three-phase control signal.
[0012] In a second aspect, an embodiment of the present invention provides a compressor control device, comprising:
[0013] An error acquisition unit is used to acquire a rotor angular velocity error and a rotor flux error of the compressor, and input the rotor angular velocity error and the rotor flux error into a fuzzy logic controller to obtain a weight coefficient;
[0014] A current acquisition unit is used to acquire a direct-axis current sampling amount and a quadrature-axis current sampling amount of the compressor, and obtain a direct-axis current reference amount and a quadrature-axis current reference amount through a PI controller;
[0015] A voltage output unit, used for inputting the weight coefficient, the direct-axis current sampling amount, the quadrature-axis current sampling amount, the direct-axis current reference amount and the quadrature-axis current reference amount into the intelligent body module of the TD3 algorithm, and the intelligent body module outputs the direct-axis voltage reference amount and the quadrature-axis voltage reference amount;
[0016] A voltage conversion unit, used for performing conversion processing and pulse width modulation processing on the direct-axis voltage reference and the quadrature-axis voltage reference in sequence to obtain a three-phase control signal;
[0017] A signal control unit is used to control the compressor using the three-phase control signal.
[0018] In a third aspect, an embodiment of the present invention provides an air conditioner, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the compressor control method as described in the first aspect when executing the computer program.
[0019] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the compressor control method as described in the first aspect is implemented.
[0020] An embodiment of the present invention provides a compressor control method, device, air conditioner and storage medium, the method comprising: obtaining a rotor angular velocity error and a rotor flux error of the compressor, and inputting the rotor angular velocity error and the rotor flux error into a fuzzy logic controller to obtain a weight coefficient; collecting a direct-axis current sampling amount and a cross-axis current sampling amount of the compressor, and obtaining a direct-axis current reference amount and a cross-axis current reference amount through a PI controller; inputting the weight coefficient, the direct-axis current sampling amount, the cross-axis current sampling amount, the direct-axis current reference amount and the cross-axis current reference amount into an intelligent body module of a TD3 algorithm, and outputting a direct-axis voltage reference amount and a cross-axis voltage reference amount from the intelligent body module; performing transformation processing and pulse width modulation processing on the direct-axis voltage reference amount and the cross-axis voltage reference amount in turn to obtain a three-phase control signal; and controlling the compressor using the three-phase control signal. The embodiment of the present invention is based on the rotor flux error and the rotor angular velocity error, and uses fuzzy logic judgment to quickly lock the corresponding weight coefficient, and applies the weight coefficient to the intelligent body module of the TD3 algorithm. In this way, the decoupling control of the rotor flux and the rotor angular velocity can be achieved, thereby making the calculation more convenient and enhancing the control effect of the compressor. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.
[0022] Figure 1 A flow chart of a compressor control method provided by an embodiment of the present invention;
[0023] Figure 2 A schematic diagram of a sub-process of a compressor control method provided by an embodiment of the present invention;
[0024] Figure 3 A schematic diagram of a compressor control method provided by an embodiment of the present invention;
[0025] Figure 4 A main circuit diagram of a two-level three-phase inverter circuit in a compressor control method provided by an embodiment of the present invention;
[0026] Figure 5A schematic diagram of a first input function of a fuzzy logic controller in a compressor control method provided by an embodiment of the present invention;
[0027] Figure 6 A schematic diagram of a second input function of a fuzzy logic controller in a compressor control method provided by an embodiment of the present invention;
[0028] Figure 7 A schematic diagram of an output function of a fuzzy logic controller in a compressor control method provided by an embodiment of the present invention;
[0029] Figure 8 A schematic diagram of a fuzzy logic controller in a compressor control method provided by an embodiment of the present invention;
[0030] Fig. 9 A schematic block diagram of a compressor control device provided by an embodiment of the present invention;
[0031] Fig.10 A sub-schematic block diagram of a compressor control device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0032] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0033] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0034] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0035] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0036] See below Figure 1, an embodiment of the present invention provides a compressor control method, which specifically includes: steps S101 to S105.
[0037] Step S101, obtaining a rotor angular velocity error and a rotor flux error of the compressor, and inputting the rotor angular velocity error and the rotor flux error into a fuzzy logic controller to obtain a weight coefficient;
[0038] Step S102, collecting the direct-axis current sampling amount and the quadrature-axis current sampling amount of the compressor, and obtaining the direct-axis current reference amount and the quadrature-axis current reference amount through a PI controller;
[0039] Step S103, inputting the weight coefficient, the direct-axis current sampling amount, the quadrature-axis current sampling amount, the direct-axis current reference amount and the quadrature-axis current reference amount into the intelligent agent module of the TD3 algorithm, and the intelligent agent module outputs the direct-axis voltage reference amount and the quadrature-axis voltage reference amount;
[0040] Step S104, performing transformation processing and pulse width modulation processing on the direct-axis voltage reference and the quadrature-axis voltage reference in sequence to obtain a three-phase control signal;
[0041] Step S105: Control the compressor using the three-phase control signal.
[0042] In this embodiment, combined with Figure 3 , first obtain the rotor angular velocity error and rotor flux error of the compressor, and perform fuzzy judgment on the rotor angular velocity error and rotor flux error through the fuzzy logic controller to obtain the weight coefficient. At the same time, collect the current data of the compressor, that is, the direct-axis current sampling amount and the quadrature-axis current sampling amount, and obtain the direct-axis current reference amount and the quadrature-axis current reference amount corresponding to the direct-axis current sampling amount and the quadrature-axis current sampling amount. Then input the obtained weight coefficient, direct-axis current sampling amount, quadrature-axis current sampling amount, direct-axis current reference amount and quadrature-axis current reference amount into the intelligent agent module of the TD3 algorithm, and update the reward function of the TD3 algorithm through the weight coefficient, so that the intelligent agent module of the TD3 algorithm outputs more accurate direct-axis voltage reference amount and quadrature-axis voltage reference amount. Subsequently, the three-phase control signal for controlling the compressor is obtained according to the direct-axis voltage reference amount and the quadrature-axis voltage reference amount.
[0043] Here, it should be noted that the traditional compressor control scheme is to control the direct axis current I through the field oriented control algorithm (Field Oriented Control, FOC). d With the quadrature axis current I q, and combined with the error adjustment based on the PI controller, since the PI controller parameter setting is mostly based on rectification experience, there are problems such as difficulty in setting and long setting time, so the overall control effect cannot fully meet the use requirements. In this embodiment, the TD3 reinforcement learning algorithm is used to replace the PI controllers of the d-axis and q-axis in the magnetic field oriented control algorithm, and the PI controllers of the speed loop and the flux loop are retained. In this way, the corresponding weight coefficient can be quickly locked through fuzzy logic judgment based on the rotor flux error and the rotor angular velocity error, and the weight coefficient is applied to the intelligent body module of the TD3 algorithm. In this way, the decoupling control of the rotor flux and the rotor angular velocity can be achieved, making the calculation more convenient and enhancing the control effect of the compressor. It should also be noted that the control method provided in this embodiment is a control method based on a neural network, so that the effect of self-correction can be achieved.
[0044] In one embodiment, the step S101 includes:
[0045] Collect the rotor angular velocity sampling amount and rotor flux sampling amount of the compressor;
[0046] The difference between the rotor angular velocity sampling amount and the preset rotor angular velocity reference amount is calculated to obtain the rotor angular velocity error; and the difference between the rotor flux sampling amount and the preset rotor flux reference amount is calculated to obtain the rotor flux error.
[0047] like Figure 3 As shown, the rotor angular velocity error |ω in this embodiment r_error |Specifically, the rotor angular velocity ω can be fed back by the compressor fb and the rotor angular velocity reference ω ref After comparison, the rotor flux error |ψ r_error |Specifically, the rotor flux can be fed back by the compressor|ψ r | and rotor flux reference |ψ r_ref |After comparison.
[0048] In one embodiment, the step S102 includes:
[0049] Collecting a-phase current sampling amount and b-phase current sampling amount of the compressor;
[0050] The a-phase current sampling amount and the b-phase current sampling amount are converted into an α-axis current sampling amount and a β-axis current sampling amount by an estimator;
[0051] Park transformation is performed on the α-axis current sampling quantity and the β-axis current sampling quantity respectively, so as to obtain the direct-axis current sampling quantity and the quadrature-axis current sampling quantity accordingly.
[0052] Furthermore, the step S102 further includes:
[0053] Obtaining the rotor angular velocity error, and inputting the rotor angular velocity error into a PI controller to obtain the quadrature-axis current reference;
[0054] The rotor flux error is obtained, and the rotor angular velocity error is input into a PI controller to obtain the direct-axis current reference.
[0055] Combination Figure 3 In this embodiment, when obtaining the direct-axis current sampling amount and the quadrature-axis current sampling amount, the a-phase current sampling amount I of the compressor is firstly collected. a and b-phase current sampling quantity I b , and then the a-phase current sampling quantity I a and b-phase current sampling quantity I b Converted to α-axis current sampling value I α and the β-axis current sampling value I β Then, the α-axis current sampling quantity and the β-axis current sampling quantity are transformed into the direct-axis current sampling quantity I by the Park transformation algorithm. d And the quadrature axis current sampling quantity I q Here, the reason why this embodiment only samples I a and I b , because I c By sampling I a with I b Calculated, for example, for a star-connected compressor load, I a +I b +I c =0; when I a ,I b with I c After all of them are obtained, I can be transformed by 3 / 2 (clark) a and I b Convert to I corresponding to the α-axis and β-axis respectively α and I β .
[0056] When obtaining the quadrature axis current reference I qref and the direct axis current reference I dref , the rotor angular velocity error |ω can be directly controlled by the PI controller r_error |and rotor flux error|ψ r_error | respectively, and the processing results are used as the cross-axis current reference quantity I qref and the direct axis current reference I dref .
[0057] In one embodiment, the step S103 includes:
[0058] According to the following formula, the agent module is trained using the reward function, and the action function is obtained through the trained agent module:
[0059]
[0060]
[0061] Among them, r t represents the reward function of the TD3 algorithm, y represents the target value of the TD3 algorithm, λ represents the weight coefficient, Q1 represents i derror Q value function, Q2 represents i qerror The Q value function, i derror represents the direct axis current error, i qerror represents the quadrature-axis current error, represents the action function parameter of the previous time step, j represents the number of actions, μ represents the Actor network function of the TD3 algorithm, γ represents a constant, Q i ′ represents the behavior value function of the targetcritic network in the TD3 algorithm, s' represents the state quantity of the targetcritic network, a' represents the action function of the target critic network, represents the Q-value function parameter of the target critic network, i=1,2;
[0062] According to the following formula, the action function is updated to obtain the direct-axis voltage reference and the quadrature-axis voltage reference:
[0063] a new =μ(s|θ μ )
[0064] Among them, a new represents the direct-axis voltage reference and the quadrature-axis voltage reference, μ represents the function sign of the action function, θ μ Represents the action parameters under the action function.
[0065] In the TD3 algorithm, the reward function is expressed as follows:
[0066]
[0067] The above formula is the reward function of the TD3 algorithm without the fuzzy logic controller, where Q1 and Q2 are i derror and i qerror The Q-value function, i.e., the action value function, is also the function of the TD3 Critic1 and Critic2 networks; i derror is the direct axis current error; i qerr or is the quadrature axis current error; is the action function parameter of the previous time step, j represents the number of actions, μ is the Actor network function of TD3; γ is a constant, usually 0.05-0.2; the last term in the above formula is the saturation parameter. According to the setting, when d=1 and reaches the limit value, it marks the end of training.
[0068] Combination Figure 3 and Figure 4 It can be seen that the output of the TD3 reinforcement learning agent is the direct axis voltage reference V dref and the quadrature axis voltage reference V qref ,exist Figure 3 In the example, TD3 reinforcement learning algorithm is used to replace i derror with i qerror The PI controller outputs V dref and V qref The TD3 agent has six observations, namely, the speed reference ω ref , speed feedback ω fb , direct axis current i d , direct axis current reference i dref , quadrature axis current i q and the quadrature axis current reference i qref The expected reward setting expression is shown in formula (1). The Actor network takes actions by maximizing the accumulated expected reward in each episode.
[0069] In addition, the fuzzy logic input should select the most suitable input parameter error range according to the magnitude of the rotor flux error and the rotor angular velocity error. Here, the rotor flux error range is set to [0, 0.001], with the unit of wb, such as Figure 5 As shown; the rotor angular velocity error range is [0,3.5], the unit is rad / s, such as Figure 6 As shown. That is, when the errors fall within the above range, the corresponding weight coefficients can be quickly limited by the fuzzy interference system (FIS) (i.e., the fuzzy logic controller). It should be noted that when the rotor flux error is less than 0 or the current error is greater than 0.001, the input amplitude needs to be limited to the range of [0, 0.001], and the rotor angular velocity error range is the same. That is:
[0070]
[0071] In the control method proposed in this embodiment, a fuzzy logic controller is used to realize the rotor flux ψ r and the rotor angular velocity ω fbThe decoupling of the above two parameters is used as the input of the fuzzy logic controller, and after FIS, a weight coefficient λ is output. The range of this coefficient is 0<λ≤1. Figure 7 The principle of selecting the weight coefficient is shown in Table 1.
[0072]
[0073] Table 1 Fuzzy logic controller action rules
[0074] In Table 1, S stands for Small, L stands for Large, M stands for Medium, V stands for Very, P stands for Positive, N stands for Negative, and O stands for 0. Therefore, VS = Very Small, VL = Very Large, PS = Positive Small, PM = Positive Medium, PL = Positive Large, NL = Negative Large, NM = Negative Medium, and NS = Negative Small.
[0075] Substituting λ into equation (1), we can obtain equation (3):
[0076]
[0077] Here, λ is the direction i derr or weight function, since the total weight coefficient is 1, another parameter i qerror The weight coefficient is 1-λ. Usually, in order to eliminate the calculation effect caused by negative values, i derr or and i qerr The parameters such as or take the absolute value or square, in this expression, they are squared. Correspondingly, the weight coefficient should also be squared.
[0078] After obtaining the new reward function, the new target value can be calculated by the following formula (4):
[0079]
[0080] In the above formula, γ is a constant, Q i ′ represents the behavior value function of the TD3 targetcritic network, i = 1, 2, s′, a′ and They represent the state quantity, action quantity (i.e., the action function) and Q value function parameters of the target critic network respectively. Here, the action quantity refers to the direct-axis voltage reference quantity and the quadrature-axis voltage reference quantity, and then calculates the targetcritic network target value y and the critic network evaluation value The difference is defined as the loss function as shown in the following formula (5):
[0081]
[0082] In the above formula, i = 1, 2, s is the state quantity state, which is generally transmitted to the reinforcement learning algorithm by the environment, and a represents the action quantity action, which is generally output by the agent, that is, Figure 3 V dref and V qref , is the parameter of the corresponding function, which is Q in this expression i Parameters, because the Q value function of the reinforcement learning algorithm has many parameters during the training process, and this parameter is changing, so the symbol is used Here, s and s′ in formula (4) both represent state quantities, and a and a′ in formula (4) both represent action quantities (i.e., action functions), where a represents the action quantity of the Critic network and a′ represents the action quantity of the TargetCritic network.
[0083] According to the above formula (5), the parameters in the Critic1 and Critic2 networks are updated. When the Critic1 and Critic2 networks satisfy the r in the reward function t When the d value of is 1, that is, after the episode is updated d steps, the update of the Actor network is started according to formula (6) to obtain the final direct-axis voltage reference and quadrature-axis voltage reference a new :
[0084] a new =μ(s|θ μ ) (6)
[0085] In the above formula, μ is the function symbol of a, θ μ It is the action parameter of this function.
[0086] In one embodiment, the step S104 includes:
[0087] Performing inverse park transformation on the direct-axis voltage reference and the quadrature-axis voltage reference to obtain an α-axis voltage reference and a β-axis voltage reference respectively;
[0088] The α-axis voltage reference and the β-axis voltage reference are input to a pulse width generator, and the pulse width generator outputs the three-phase control signal.
[0089] In this embodiment, the direct-axis voltage reference V is outputted through the TD3 algorithm. dref and the quadrature axis voltage reference V qref After that, firstly, the direct axis voltage reference Vdref and the quadrature axis voltage reference V qref Inverse park transforms into the α-axis voltage reference V αref and β-axis voltage reference V βref , and then the α-axis voltage reference and β-axis voltage reference are processed by the pulse width generator to obtain the three-phase control signal S a ,S b ,S c In actual application scenarios, combined with Figure 3 , and then get the three-phase control signal S a ,S b ,S c After that, combined with the DC voltage source voltage V dc Acting on the two-level three-phase inverter, the two-level three-phase inverter outputs V a 、V b 、V c The three-phase voltage is applied to the PMSM permanent magnet synchronous motor.
[0090] In one embodiment, if Figure 2 As shown, the step S101 also includes: steps S201 to S206.
[0091] Step S201, performing input transformation on the rotor angular velocity error and the rotor flux error respectively through an operational amplifier circuit, and correspondingly obtaining a first input control voltage and a second input control voltage;
[0092] Step S202, inputting the first input control voltage and a preset first input reference value into a multi-element logic circuit to obtain a first input function value; and inputting the second input control voltage and a preset second input reference value into a multi-element logic circuit to obtain a second input function value;
[0093] Step S203, performing fuzzy rule processing on the first input function quantity and the second input function quantity according to preset fuzzy logic action rules to obtain fuzzy function quantities;
[0094] Step S204, inputting the fuzzy function quantity into a logic gate circuit to obtain an address selection quantity;
[0095] Step S205, inputting the address selection amount into the multi-way conversion switch chip, and the multi-way conversion switch chip outputs the corresponding output control amount;
[0096] Step S206: Perform output transformation on the output control amount through an operational amplifier circuit to obtain the weight coefficient.
[0097] In this embodiment, combined with Figure 8When the weight coefficient is output through the fuzzy logic controller, the two input quantities of the rotor angular velocity error and the rotor flux error are first transformed through the operational amplifier circuit to obtain the corresponding input control voltage, and then input into the multi-logic circuit (such as DYL-09S multi-logic circuit) with the given input reference value to obtain the following: Figure 5 (rotor flux error) and Figure 6 The input function quantity of (rotor angular velocity error) is output to the multiplexer switch chip as the address selection quantity through the fuzzy logic action rules in Table 1 above and the logic gate circuit. Similarly, the fuzzy logic controller output reference value is also input to the multiplexer switch chip, and the chip processes and outputs the following: Figure 7 The output control quantity shown is then outputted through an output converter formed by an operational amplifier circuit to obtain the weight coefficient λ.
[0098] Fig. 9 A schematic block diagram of a compressor control device 900 provided in an embodiment of the present invention, the device 900 includes:
[0099] The error acquisition unit 901 is used to acquire the rotor angular velocity error and the rotor flux error of the compressor, and input the rotor angular velocity error and the rotor flux error into the fuzzy logic controller to obtain a weight coefficient;
[0100] The current acquisition unit 902 is used to acquire the direct-axis current sampling amount and the quadrature-axis current sampling amount of the compressor, and obtain the direct-axis current reference amount and the quadrature-axis current reference amount through the PI controller;
[0101] The voltage output unit 903 is used to input the weight coefficient, the direct-axis current sampling amount, the quadrature-axis current sampling amount, the direct-axis current reference amount and the quadrature-axis current reference amount into the intelligent agent module of the TD3 algorithm, and the intelligent agent module outputs the direct-axis voltage reference amount and the quadrature-axis voltage reference amount;
[0102] A voltage conversion unit 904 is used to perform conversion processing and pulse width modulation processing on the direct-axis voltage reference and the quadrature-axis voltage reference in sequence to obtain a three-phase control signal;
[0103] The signal control unit 905 is used to control the compressor using the three-phase control signal.
[0104] In one embodiment, the error acquisition unit 901 includes:
[0105] The first acquisition unit is used to acquire the rotor angular velocity sampling amount and the rotor flux sampling amount of the compressor;
[0106] The difference calculation unit is used to calculate the difference between the rotor angular velocity sampling amount and the preset rotor angular velocity reference amount to obtain the rotor angular velocity error; and calculate the difference between the rotor flux sampling amount and the preset rotor flux reference amount to obtain the rotor flux error.
[0107] In one embodiment, the current acquisition unit 902 includes:
[0108] A second collection unit is used to collect the a-phase current sampling amount and the b-phase current sampling amount of the compressor;
[0109] A current conversion unit, used for converting the a-phase current sampling amount and the b-phase current sampling amount into an α-axis current sampling amount and a β-axis current sampling amount through an estimator;
[0110] The first transformation unit is used to perform park transformation on the α-axis current sampling amount and the β-axis current sampling amount respectively, so as to obtain the direct-axis current sampling amount and the quadrature-axis current sampling amount accordingly.
[0111] In one embodiment, the current acquisition unit 902 further includes:
[0112] A first error acquisition unit, used for acquiring the rotor angular velocity error, and inputting the rotor angular velocity error into a PI controller to obtain the quadrature-axis current reference;
[0113] The second error acquisition unit is used to acquire the rotor flux error and input the rotor angular velocity error into a PI controller to obtain the direct-axis current reference.
[0114] In one embodiment, the voltage output unit 903 includes:
[0115] The voltage calculation unit is used to train the agent module using a reward function according to the following formula, and obtain an action function through the trained agent module:
[0116]
[0117]
[0118] Among them, r t represents the reward function of the TD3 algorithm, y represents the target value of the TD3 algorithm, λ represents the weight coefficient, Q1 represents i derror Q value function, Q2 represents i qerror The Q value function, i derror represents the direct axis current error, i qerror represents the quadrature-axis current error, represents the action function parameter of the previous time step, j represents the number of actions, μ represents the Actor network function of the TD3 algorithm, γ represents a constant, Q i ′ represents the behavior value function of the target critic network in the TD3 algorithm, s' represents the state quantity of the target critic network, a' represents the action function of the target critic network, represents the Q-value function parameter of the target critic network, i=1,2;
[0119] According to the following formula, the action function is updated to obtain the direct-axis voltage reference and the quadrature-axis voltage reference:
[0120] a new =μ(s|θ μ )
[0121] Among them, a new represents the direct-axis voltage reference and the quadrature-axis voltage reference, μ represents the function sign of the action function, θ μ Represents the action parameters under the action function.
[0122] In one embodiment, the voltage conversion unit 904 includes:
[0123] A second transformation unit is used to perform inverse park transformation on the direct-axis voltage reference and the quadrature-axis voltage reference, respectively, to obtain an α-axis voltage reference and a β-axis voltage reference;
[0124] The voltage input unit is used to input the α-axis voltage reference and the β-axis voltage reference into the pulse width generator, and the pulse width generator outputs the three-phase control signal.
[0125] In one embodiment, if Fig.10 As shown, the error acquisition unit 901 also includes:
[0126] An input conversion unit 1001 is used to perform input conversion on the rotor angular velocity error and the rotor flux error respectively through an operational amplifier circuit, and obtain a first input control voltage amount and a second input control voltage amount accordingly;
[0127] The function quantity acquisition unit 1002 is used to input the first input control voltage quantity and the preset first input reference value into the multi-element logic circuit to obtain a first input function quantity; and input the second input control voltage quantity and the preset second input reference value into the multi-element logic circuit to obtain a second input function quantity;
[0128] A fuzzy processing unit 1003 is used to perform fuzzy rule processing on the first input function quantity and the second input function quantity according to a preset fuzzy logic action rule to obtain a fuzzy function quantity;
[0129] A selection amount acquisition unit 1004 is used to input the fuzzy function amount into a logic gate circuit to obtain an address selection amount;
[0130] The control quantity output unit 1005 is used to input the address selection quantity into the multi-way conversion switch chip, and the multi-way conversion switch chip outputs the corresponding output control quantity;
[0131] The output transformation unit 1006 is used to perform output transformation on the output control amount through an operational amplifier circuit to obtain the weight coefficient.
[0132] Since the embodiments of the apparatus part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the apparatus part, which will not be repeated here.
[0133] The embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed, the steps provided in the above embodiment can be implemented. The storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0134] The embodiment of the present invention also provides an air conditioner, which may include a memory and a processor, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the steps provided in the above embodiment may be implemented. Of course, the air conditioner may also include various network interfaces, power supplies and other components.
[0135] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of this application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of this application.
[0136] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises", "comprising" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
Claims
1. A compressor control method, characterized in that: include: Obtaining a rotor angular velocity error and a rotor flux error of the compressor, and inputting the rotor angular velocity error and the rotor flux error into a fuzzy logic controller to obtain a weight coefficient; Collecting the direct-axis current sampling quantity and the quadrature-axis current sampling quantity of the compressor, and obtaining the direct-axis current reference quantity and the quadrature-axis current reference quantity through a PI controller; The weight coefficient, the direct-axis current sampling amount, the quadrature-axis current sampling amount, the direct-axis current reference amount and the quadrature-axis current reference amount are input into the intelligent agent module of the TD3 algorithm, and the intelligent agent module outputs the direct-axis voltage reference amount and the quadrature-axis voltage reference amount; The direct-axis voltage reference and the quadrature-axis voltage reference are sequentially transformed and pulse-width modulated to obtain a three-phase control signal; The compressor is controlled using the three-phase control signal.
2. The compressor control method according to claim 1, characterized in that: The step of obtaining the rotor angular velocity error and the rotor flux error of the compressor includes: Collect the rotor angular velocity sampling amount and rotor flux sampling amount of the compressor; The difference between the rotor angular velocity sampling amount and the preset rotor angular velocity reference amount is calculated to obtain the rotor angular velocity error; and the difference between the rotor flux sampling amount and the preset rotor flux reference amount is calculated to obtain the rotor flux error.
3. The compressor control method according to claim 1, characterized in that: The collecting of the direct-axis current sampling amount and the quadrature-axis current sampling amount of the compressor, and obtaining the direct-axis current reference amount and the quadrature-axis current reference amount through the PI controller, includes: Collecting a-phase current sampling amount and b-phase current sampling amount of the compressor; The a-phase current sampling amount and the b-phase current sampling amount are converted into an α-axis current sampling amount and a β-axis current sampling amount by an estimator; Park transformation is performed on the α-axis current sampling quantity and the β-axis current sampling quantity respectively, so as to obtain the direct-axis current sampling quantity and the quadrature-axis current sampling quantity accordingly.
4. The compressor control method according to claim 1, characterized in that: The collecting of the direct-axis current sampling amount and the quadrature-axis current sampling amount of the compressor, and obtaining the direct-axis current reference amount and the quadrature-axis current reference amount through the PI controller, further includes: Obtaining the rotor angular velocity error, and inputting the rotor angular velocity error into a PI controller to obtain the quadrature-axis current reference; The rotor flux error is obtained, and the rotor angular velocity error is input into a PI controller to obtain the direct-axis current reference.
5. The compressor control method according to claim 1, characterized in that: The weight coefficient, the direct-axis current sampling amount, the quadrature-axis current sampling amount, the direct-axis current reference amount and the quadrature-axis current reference amount are input into the intelligent agent module of the TD3 algorithm, and the direct-axis voltage reference amount and the quadrature-axis voltage reference amount are output by the intelligent agent module, including: According to the following formula, the agent module is trained using the reward function, and the action function is obtained through the trained agent module: Among them, r t represents the reward function of the TD3 algorithm, y represents the target value of the TD3 algorithm, λ represents the weight coefficient, Q1 represents i derror Q value function, Q2 represents i qerror The Q value function, i derror represents the direct axis current error, i qerror represents the quadrature-axis current error, represents the action function parameter of the previous time step, j represents the number of actions, μ represents the Actor network function of the TD3 algorithm, γ represents a constant, Q i ′ represents the behavior value function of the targetcritic network in the TD3 algorithm, s' represents the state quantity of the targetcritic network, a' represents the action function of the target critic network, represents the Q-value function parameter of the target critic network, i=1,2; According to the following formula, the action function is updated to obtain the direct-axis voltage reference and the quadrature-axis voltage reference: a new =μ(s|θ μ ) Among them, a new represents the direct-axis voltage reference and the quadrature-axis voltage reference, μ represents the function sign of the action function, θ μ Represents the action parameters under the action function.
6. The compressor control method according to claim 1, characterized in that: The direct-axis voltage reference and the quadrature-axis voltage reference are sequentially transformed and pulse-width modulated to obtain a three-phase control signal, including: Performing inverse park transformation on the direct-axis voltage reference and the quadrature-axis voltage reference to obtain an α-axis voltage reference and a β-axis voltage reference respectively; The α-axis voltage reference and the β-axis voltage reference are input to a pulse width generator, and the pulse width generator outputs the three-phase control signal.
7. The compressor control method according to claim 1, characterized in that: The rotor angular velocity error and the rotor flux error are input into the fuzzy logic controller to obtain weight coefficients, including: The rotor angular velocity error and the rotor flux error are respectively input-converted by an operational amplifier circuit to obtain a first input control voltage and a second input control voltage; Inputting the first input control voltage and a preset first input reference value into a multi-element logic circuit to obtain a first input function value; and inputting the second input control voltage and a preset second input reference value into a multi-element logic circuit to obtain a second input function value; Performing fuzzy rule processing on the first input function quantity and the second input function quantity according to preset fuzzy logic action rules to obtain fuzzy function quantities; Inputting the fuzzy function quantity into a logic gate circuit to obtain an address selection quantity; The address selection amount is input into a multiplexer switch chip, and the multiplexer switch chip outputs a corresponding output control amount; The output control quantity is output transformed by an operational amplifier circuit to obtain the weight coefficient.
8. A compressor control device, characterized in that: include: An error acquisition unit is used to acquire a rotor angular velocity error and a rotor flux error of the compressor, and input the rotor angular velocity error and the rotor flux error into a fuzzy logic controller to obtain a weight coefficient; A current acquisition unit is used to acquire a direct-axis current sampling amount and a quadrature-axis current sampling amount of the compressor, and obtain a direct-axis current reference amount and a quadrature-axis current reference amount through a PI controller; A voltage output unit, used for inputting the weight coefficient, the direct-axis current sampling amount, the quadrature-axis current sampling amount, the direct-axis current reference amount and the quadrature-axis current reference amount into the intelligent body module of the TD3 algorithm, and the intelligent body module outputs the direct-axis voltage reference amount and the quadrature-axis voltage reference amount; A voltage conversion unit, used for performing conversion processing and pulse width modulation processing on the direct-axis voltage reference and the quadrature-axis voltage reference in sequence to obtain a three-phase control signal; A signal control unit is used to control the compressor using the three-phase control signal.
9. An air conditioner, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the compressor control method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the compressor control method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Low-wind-speed permanent magnet synchronous wind driven generator control method based on deep reinforcement learning
CN115903457A
DC-DC converter control method based on TD3 reinforcement learning algorithm
CN116300440A