Disclosure of Invention
The purpose of the invention is as follows: the invention aims to provide an MPPT control method, which can adaptively adjust control parameters according to the environment and improve the robustness and the adaptability of a photovoltaic system.
Another object of the present invention is to provide a control system capable of implementing the MPPT control method, and a storage medium storing a computer program instantiated by the method.
The technical scheme is as follows: the MPPT control method comprises the following steps:
s1: collecting the current voltage and current of the photovoltaic array, and calculating the power error and error variation of the photovoltaic array;
s2: the fuzzy control module adjusts an integral coefficient and a differential coefficient of the PID control module according to the error and the error variation;
s3: the proportion coefficient is re-adjusted by the PID control module;
s4: the PID control module calculates the duty ratio of the Boost circuit according to the error and the error variation and sends the duty ratio to the PWM module, and the PWM module generates a corresponding pulse control signal to drive the Boost circuit;
s5: repeating S1-S4 until the photovoltaic array is at the maximum power operating point.
Further, the input and output of the fuzzy control module in step S2 are equally divided into 7 pieces, which are { negative large NB, negative medium NM, negative small NS, zero ZO, positive small PS, positive PM, positive large PB }, the domains of error and error variation are [ -1,1], the variation of integral coefficient is [ -0.06,0.06], the variation of differential coefficient is [ -0.09,0.09], the membership function of negative large NB and positive large PB is a Z-type membership function, and the membership function of negative medium NM, negative small NS, zero ZO, positive small PS and positive PM is a triangular membership function.
Further, in the step S2, the inference method of the fuzzy control module is a Mamdani fuzzy inference method, and the ambiguity resolution method is a weighted average method.
Further, in the step S3, the PID control module is an immune PID control module, the nonlinear feedback function of the immune PID control module is approximated by a two-dimensional fuzzy control module, the input quantity of the two-dimensional fuzzy control module is the output quantity and the output quantity variable quantity of the current immune PID control module, and the output quantity is the nonlinear feedback value.
Furthermore, the input quantity of the two-dimensional fuzzy control module is equally divided into two fuzzy sets, namely { negative NB and positive PB }, the output quantity is divided into three fuzzy sets, namely { negative NB, zero ZO and positive PB }, the domains of the input quantity and the output quantity are [ -1,1], the membership function of the input quantity is a Z-type membership function, the membership functions of the negative NB and the positive PB in the output quantity are Z-type membership functions, and zero ZO is a triangular membership function.
The MPPT control system is characterized in that the MPPT controller comprises a fuzzy control module, a PID module and a PWM module, the fuzzy control module is used for adjusting an integral coefficient and a differential coefficient of the PID module according to the current power error and the error variation of the photovoltaic array, the PID module is used for calculating the duty ratio of a PWM signal output to the Boost booster circuit according to the error and the error variation, and the PWM module is used for generating the PWM control signal to the Boost booster circuit according to the duty ratio calculated by the PID module.
Further, the PID module is an immune PID control module.
Further, the contravariant unit is including full-bridge inverter circuit, protection circuit and filtering and the switching circuit who connects in order, full-bridge inverter circuit's input is connected Boost circuit's output, the electric wire netting is connected with filtering and switching circuit's output, filtering and switching circuit's output still connect the inverter controller, the inverter controller basis the electric energy control of the electric wire netting is exported to the contravariant unit full-bridge inverter circuit.
The computer-readable storage medium according to the present invention stores a computer program configured to implement the MPPT control method described above when executed.
Has the advantages that: compared with the prior art, the invention has the following advantages: the integral coefficient and the differential coefficient of PID control are adjusted through a fuzzy control algorithm, meanwhile, the proportional coefficient is adjusted on line through an immune PID algorithm, and the parameters of a PID module are adjusted in a self-adaptive mode continuously according to the condition of the photovoltaic power generation system, so that the photovoltaic power generation system can quickly track the maximum power working point. The robustness and the adaptability of the photovoltaic system are improved, the design is simple, and the implementation cost is low.
Detailed Description
The technical scheme of the invention is further explained by combining the attached drawings.
Referring to fig. 1, an MPPT control method according to an embodiment of the present invention includes the steps of:
s1: collecting the current voltage and current of the photovoltaic array, and calculating the power error and error variation of the photovoltaic array;
s2: the fuzzy control module adjusts an integral coefficient and a differential coefficient of the PID control module according to the error and the error variation;
s3: the proportion coefficient is re-adjusted by the PID control module;
s4: the PID control module calculates the duty ratio of the Boost circuit according to the error and the error variation and sends the duty ratio to the PWM module, and the PWM module generates a corresponding pulse control signal to drive the Boost circuit;
s5: repeating S1-S4 until the photovoltaic array is at the maximum power operating point.
According to the MPPT control method in the technical scheme, the integral coefficient and the differential coefficient of the PID module are adjusted through the fuzzy control module, and the parameters of the PID module are adaptively adjusted according to the condition of the photovoltaic power generation system, so that the photovoltaic power generation system can track the maximum power point more quickly, and the adaptivity and the robustness of the photovoltaic system are improved.
In practice, in step S1, the collected current voltage of the photovoltaic array is v (k), the current is i (k), the current working power is p (k), the error is e (k), the error variation is Δ e (k), the current difference is di (k), the voltage difference is dv (k), and the voltage difference is dp (k). The calculation formula is as follows:
in step S5, when dv (k) is 0, it indicates that the photovoltaic array is at the maximum power operating point.
In this embodiment, the fuzzy control module is a two-dimensional fuzzy controller, which takes the error e (k) and the error variation Δ e (k) as input, and outputs the integral coefficient KI and the correction amounts Δ KI and Δ KD of the differential coefficient, and the calculation formulas of the integral coefficient and the differential coefficient of the PID module are as follows:
where KIref and KDref are initial values of an integral coefficient and a differential coefficient, respectively.
In this embodiment, input e (k), Δ e (k), and output Δ KI, Δ KD are described as 7 fuzzy sets, which are: { negative large NB, negative middle NM, negative small NS, zero ZO, positive small PS, positive PM, positive large PB }. Inputs E (K) and Δ E (K) are [ -1,1 ]; the discourse domain of delta KI is [ -0.06,0.06 ]; the argument for Δ KD is [ -0.09,0.09 ]. The membership function is shown in fig. 3 to 5, the membership function of negative large NB and positive large PB is a Z-type membership function, and the membership function of negative medium NM, negative small NS, zero ZO, positive small PS and positive middle PM is a triangular membership function. In practice, a technician can adaptively adjust the number of the fuzzy sets and the membership function according to the prior data.
The narrow and thin membership function is more delicate and sensitive to control; otherwise, the control is rough and smooth. Therefore, a moderate triangular function and a Z-type membership function are selected, so that both sensitivity and stability are considered in control.
The self-tuning requirements of KP, KI and KD parameters are as follows:
when the error value e (k) is larger, it indicates that the working point of the photovoltaic system is farther from the maximum power working point, and the value of KP should be increased to increase the tracking speed; in order to improve the control precision, KD and KI should take a smaller value; when the error E (K) is moderate, the KP value is properly reduced in order to take the tracking speed and the control precision of the photovoltaic system into consideration, and the KI and KD values are moderate; when the value of the error e (k) is small, the values of KP and KI should be increased appropriately in order to ensure the stability of the photovoltaic system and reduce power oscillation.
Therefore, in different control stages, fuzzy control can correspondingly adjust PID parameters according to different actual conditions, so that the maximum power point can be tracked more quickly and stably, and the tracking speed and the control precision of the photovoltaic system are considered.
The fuzzy rule of the fuzzy control module can also be formulated according to prior data, the fuzzy reasoning method can select a Mamdani fuzzy reasoning method or a Larsen fuzzy reasoning method, and the like, and the deblurring method can select a maximum membership method, a weighted average method or a median method, and the like. In this embodiment, the fuzzy inference method uses a Mamdani fuzzy inference method, the deblurring method uses a weighted average method, and the fuzzy rule is shown in the following table:
TABLE 1 fuzzy rule of fuzzy control Module Δ KI
TABLE 2 fuzzy rules for the fuzzy control Module Δ KD
In this embodiment, in order to further improve the adaptive capacity of the photovoltaic system, the PID module is an immune PID module, and with e (k) as the antigen concentration and the output u (k) of the PID module as the total stimulation, the following feedback control law can be obtained:
U(K)=KP*(1-n*F(U(K),ΔU(K)))*E(K)=KP1(K)*E(K) (3)
in the formula, KP-K1 controls the reaction speed, n-K2/K1 controls the stabilization effect, K1 is the promotion factor of the immune system, K2 is the inhibition factor, F (u (K), Δ u (K)) is a nonlinear function describing the reaction of B cells to TS cells, which can be determined from prior data, and KP1(K) is the nonlinear feedback value output by the immune PID module.
In practice, fuzzy languages are often used to describe the non-linear functions for ease of computation. In this embodiment, let inputs u (k) and Δ u (k) be divided into two fuzzy sets, which are { negative NB, positive PB }, and the domain of discourse is [ -1,1 ]; the output F (U (K), Δ U (K)) is divided into three fuzzy sets, negative NB, zero ZO, positive PB, with a domain of discourse of [ -1,1 ]. The membership functions are respectively shown in fig. 6 and 7, the membership functions of the input quantity are all Z-type membership functions, the membership functions of the negative NB and the positive PB in the output quantity are Z-type membership functions, and zero ZO is a triangular membership function. The fuzzy rule is shown in the following table:
TABLE 3 fuzzy rules for immune PID modules
In summary, the control formula of the photovoltaic system of the present embodiment is as follows:
as shown in fig. 2, the MPPT control system according to the present invention includes a photovoltaic array, a Boost voltage-boosting circuit, an inverter unit, and an MPPT controller. The MPPT controller comprises a fuzzy control module, a PID module and a PWM module, wherein the fuzzy control module is used for adjusting an integral coefficient and a differential coefficient of the PID module according to the current power error and the error variation of the photovoltaic array, the PID module is used for calculating the duty ratio of a PWM signal output to the Boost booster circuit according to the error and the error variation, and the PWM module is used for generating the PWM control signal to the Boost booster circuit according to the duty ratio calculated by the PID module.
In practice, the inverter unit can also include full-bridge inverter circuit, protection circuit and filtering and the switching circuit that connect in order, and Boost circuit's output is connected to full-bridge inverter circuit's input, and the electric wire netting is connected to filtering and switching circuit's output, and inverter controller is still connected to filtering and switching circuit's output, and inverter controller exports the electric energy control full-bridge inverter circuit of electric wire netting according to the inverter unit. The specific structures of the Boost circuit, the full-bridge inverter circuit, the protection circuit, and the filtering and switching circuit are all common knowledge that can be known or should be known to those skilled in the art, and they are not discussed in detail herein.
In this embodiment, the MPPT controller selects a master of the TMS320F28335 based on the DSP. The photovoltaic array module adopts a polycrystalline silicon solar panel, the conversion efficiency is higher by about 17-18%, and the cost is low, so that the system cost can be reduced; the voltage and current sampling modules of the photovoltaic array adopt LV25-P Hall voltage sensors and LA55-P Hall current sensors to detect and sample the voltage and current of the photovoltaic array, the voltage and current of an alternating current transmission line and the voltage and current of a direct current transmission line in real time. The photovoltaic array further comprises an ambient temperature detection module and an ambient illumination intensity detection module. The environment temperature detection module adopts a DS18B20 sensor to detect the environment temperature, and the temperature detection range is-55 ℃ to +125 ℃. It can convert the temperature signal into 9-bit digital signal and send it to the processor; the environment illumination intensity detection module adopts a BH1750 sensor to detect the environment illumination intensity, the illumination intensity detection range is 1-65535lx, and the environment real-time illumination intensity can be accurately detected.
According to the computer-readable storage medium of the embodiment of the invention, a computer program instantiated by the MPPT control method is stored.