Khảo sát các thuật toán MPPT nâng cao cho bộ nguồn pin mặt trời PV

132 24 0
Khảo sát các thuật toán MPPT nâng cao cho bộ nguồn pin mặt trời PV

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

ĐẠI HỌC QUỐC GIA TP HCM TRƯỜNG ĐẠI HỌC BÁCH KHOA NGUYỄN TIẾN THƯ KHẢO SÁT CÁC THUẬT TOÁN MPPT NÂNG CAO CHO BỘ NGUỒN PIN MẶT TRỜI PV Chuyên ngành : Kỹ Thuật Điện Mã số: 60520202 LUẬN VĂN THẠC SĨ TP HỒ CHÍ MINH, năm 2018 CƠNG TRÌNH ĐƯỢC HỒN THÀNH TẠI TRƯỜNG ĐẠI HỌC BÁCH KHOA –ĐHQG -HCM Cán hướng dẫn khoa học: PSG.TS Hồ Phạm Huy Ánh Cán chấm nhận xét 1: TS.Trịnh Hoàng Hơn Cán chấm nhận xét 2: PSG.TS Lê Chí Kiên Luận văn thạc sĩ bảo vệ Trường Đại học Bách Khoa, ĐHQG Tp HCM ngày 06 tháng 01 năm 2018 Thành phần Hội đồng đánh giá luận văn thạc sĩ gồm: (Ghi rõ họ, tên, học hàm, học vị Hội đồng chấm bảo vệ luận văn thạc sĩ) PSG.TS Phan Quốc Dũng TS Nguyễn Đình Tun TS.Trịnh Hồng Hơn PSG.TS Lê Chí Kiên PGS.TS Trương Việt Anh Xác nhận Chủ tịch Hội đồng đánh giá LV Trưởng Khoa quản lý chuyên ngành sau luận văn sửa chữa (nếu có) CHỦ TỊCH HỘI ĐỒNG TRƯỞNG KHOA ĐẠI HỌC QUỐC GIA TP.HCM CỘNG HÒA XÃ HỘI CHỦ NGHĨA VIỆT NAM TRƯỜNG ĐẠI HỌC BÁCH KHOA Độc lập - Tự - Hạnh phúc NHIỆM VỤ LUẬN VĂN THẠC SĨ Họ tên học viên: Nguyễn Tiến Thư MSHV: 7140984 Ngày, tháng, năm sinh: 10/06/1990 Nơi sinh: Lâm Đồng Chuyên ngành: Kỹ Thuật Điện Mã số : 60520202 I TÊN ĐỀ TÀI: KHẢO SÁT CÁC THUẬT TOÁN MPPT NÂNG CAO CHO BỘ NGUỒN PIN NĂNG LƯỢNG MẶT TRỜI II NHIỆM VỤ VÀ NỘI DUNG: - Giới thiệu tổng quan panel lượng mặt trời - Khảo sát thuật toán MPPT - Xây dựng mơ hình quang điện cho nguồn Pin lượng mặt trời - Đề xuất thuật toán MPPT nâng cao - Thiết kế hệ thống Pin lượng mặt trời mô Matlab/Simulink - Khảo sát thực nghiệm giải thuật MPPT mơ hình thực tế - Kết luận hướng phát triển III NGÀY GIAO NHIỆM VỤ : 04/09/2017 IV NGÀY HOÀN THÀNH NHIỆM VỤ: 03/12/2017 V CÁN BỘ HƯỚNG DẪN : PGS.TS Hồ Phạm Huy Ánh Tp HCM, ngày 07 tháng 12 năm 2017 CÁN BỘ HƯỚNG DẪN CHỦ NHIỆM BỘ MÔN ĐÀO TẠO (Họ tên chữ ký) (Họ tên chữ ký) TRƯỞNG KHOA (Họ tên chữ ký) LỜI CẢM ƠN Chúng em xin chân thành cảm ơn Khoa Điện Điện Tử, trường Đại Học Bách Khoa Tp.HCM tạo điều kiện tốt cho em thực đề tài Chúng em xin chân thành cảm ơn Thầy Hồ Phạm Huy Ánh, người Thầy tận tình hướng dẫn, bảo em suốt thời gian thực đề tài Chúng em xin gửi lời cảm ơn sâu sắc đến quý Thầy Cô Khoa tận tình giảng dạy, trang bị cho chúng em kiến thức quý báu năm học vừa qua Em xin gửi lòng biết ơn sâu sắc đến Ba, Mẹ, anh chị bạn bè ủng hộ, giúp đỡ động viên em lúc khó khăn suốt thời gian học tập, nghiên cứu Mặc dù em cố gắng hoàn thành luận văn phạm vi khả cho phép, chắn khơng tránh khỏi thiếu sót, kính mong cảm thơng tận tình bảo quý Thầy Cô bạn Em xin chân thành cảm ơn quý Thầy Cô bạn nhiều Tp Hồ Chí Minh, ngày 07 tháng 01 năm 2017 Học viên Nguyễn Tiến Thư TÓM TẮT LUẬN VĂN Năng lượng mặt trời (quang điện - PV) nguồn lượng tái tạo thân thiện với môi trường Tuy nhiên, điện lượng mặt trời cung cấp biến động theo độ xạ nhiệt độ Hơn nữa, kết nối trực tiếp pin lượng mặt trời với tải, lượng truyền cho tải khơng phải tối ưu Do việc bám theo điểm công suất cực đại (MPP tracker) việc cần thiết để pin mặt trời cho hiệu tối đa Một hệ thống PV hồn chỉnh có phận bám theo công suất cực đại bao gồm: Pin lượng, thuật toán MPPT, chuyển đổi DC-DC Xây dựng mơ hình PV dựa phương trình diode Schockley, để thể đặc tính điện tế bào quang điện, thể mối tương quan tế bào quang điện với tham số khí xạ nhiệt độ Trong luận văn, bốn thuật toán MPPT viết m-file mô Matlab Thuật toán rẽ nhánh quan sát (Perturb and Observe – PO) với phiên cải tiến thuật tốn điện dẫn gia tăng (Incremental Conductance – IC), với phiên cải tiến nó, đánh giá điều kiện thời tiết khác Thuật toán cho thấy hiệu tốt bám theo công suất cực đại bốn thuật toán thuật toán kết hợp thuật toán IC-CV, cho kết bám theo tốt điều kiện trời nắng trời mây Phân tích trạng thái ổn định trạng thái động chuyển đổi boost Thực mô boost Matlab áp dụng boost vào hệ thống PV Kết mơ hệ thống PV hồn chỉnh cho sử dụng thuật toán CV-IC MPPT tốt trạng thái ổn định đáp ứng nhanh với trạng thái độ so sánh với phương pháp IC Nó khơng giảm thời gian hội tụ bám theo điểm công suất cực đại, mà giảm đáng kể dao động quanh điểm MPP xạ mặt trời thay đổi chậm hay thay đổi nhanh chóng Xây dựng mơ hình thực nghiệm áp dụng thuật toán MPPT để so sánh hiệu suất thuật toán Kết thực nghiệm hệ thống PV thực tế cho thấy hiệu suất áp dụng thuật toán MPPT cao nhiều so với kết nối trực tiếp tải panel Thuật toán CV-IC cho hiệu suất tốt hết thuật tốn MPPT Phù hợp với kết mơ Matlab/Simulink ABSTRACT Solar photovoltaic (PV) systems are energy sources that are an environmentally friendly and renewable source of energy However, solar PV power fluctuates due to variations in radiation and temperature levels Furthermore, when the solar panel is directly connected to the load, the power that is delivered is not optimal A maximum peak power point tracker is therefore necessary for maximum efficiency A complete PV system equipped maximum power point tracking (MPPT) system includes a solar panel, MPPT algorithm, and a DC-DC converter topology A PV panel model based on the Shockley diode equation is used to predict the electrical characteristics of the cell with regard to changes irradiance and temperature In this dissertation, four MPPT algorithms are written in Matlab m-files and investigated via simulations The standard Perturb and Observe (PO) algorithm along with its improved versions and the conventional Incremental Conductance (IC) algorithm, also with its two-stage improved version, are assessed under different atmospheric operating conditions An efficient two-mode MPPT algorithm is selected from the four ones as the best model,it provides the highest tracking efficiencies in both sunny and cloudy weather conditions when compared to other MPPT algorithms The steady state and dynamic of the boost converter is analyzed The boost converter is simulated in Matlab environment and implemented in the present PV system The simulated results of the complete PV system show that the performances of the PV panel using the improved two-stage MPPT algorithm provides better steady state and fast transient characteristics when compared with the conventional incremental conductance method It yields not only a reduction in convergence time to track the maximum power point MPP, but also a significant reduction in power fluctuations around the MPP when subjected to slow and rapid solar irradiance changes Implement a real PV model to compare the performances of the PV panel using the MPPT algorithms Results of real PV model when using the MPPT algorithms get better performances than dircetly connect solar pannel and load The two-stage MPPT algorithm provides the best in four MPPT algorithm Its same simulated results LỜI CAM ĐOAN Tơi xin cam đoan cơng trình nghiên cứu khoa học độc lập Các số liệu sử dụng phân tích luận án có nguồn gốc rõ ràng, công bố theo quy định Các kết nghiên cứu luận án tơi tự tìm hiểu, phân tích cách trung thực, khách quan phù hợp Các kết chưa công bố nghiên cứu khác Học viên Nguyễn Tiến Thư i MỤC LỤC MỤC LỤC I DANH MỤC HÌNH IV DANH MỤC BẢNG VI CHƯƠNG 1: GIỚI THIỆU T ỔNG QUAN VỀ PANEL NĂNG LƯỢNG MẶT TRỜI 1.1 Hệ thống quang điện 1.2 Nền tảng động lực 1.3 Khảo sát hệ mô nguồn quang PV độc lập 1.4 Mục tiêu, phương pháp phạm vi nghiên cứu 1.5 Tóm tắt nội dung luận văn CHƯƠNG 2: KHẢO SÁT CÁC THUẬT TOÁN MPPT 10 2.1 Giới thiệu 10 2.2 Tiêu chí thực thuật tốn điều khiển MPPT 13 2.2.1 Tốc độ đáp ứng 14 2.2.2 Sai số trạng thái ổn định 14 2.2.3 Bám theo hiệu 14 2.3 Phân loại thuật toán điều khiển MPPT 14 2.4 Kết nối đơn giản tải-panel 15 2.5 Bán động phù hợp với tải 15 2.6 Phương pháp hồi tiếp điện áp 16 2.6.1 Hồi tiếp điện áp với điện áp tham chiếu cố định 16 2.6.2 Hồi tiếp điện áp với điện áp tham chiếu khác cách đo Voc 17 2.6.3 Pilot cell hay module tham khảo 19 2.7 Phương pháp hồi tiếp công suất để điều khiển 20 2.7.1 Thuật toán rẽ quan sát 21 2.7.1.1 Nguyên lý hoạt động 21 2.7.1.2 Phân tích thuật toán PO 24 2.7.2 Phương pháp tăng độ dẫn điện (IC) 25 2.7.2.1 Nguyên tắc làm việc 25 2.7.2.2 Phân tích thuật tốn IC 27 2.7.3 Sơ đồ khối hệ thống điều khiển MPPT 28 2.8 Giải pháp tối ưu phương pháp điều khiển MPPT 30 2.9 Kết 34 CHƯƠNG 3: MƠ HÌNH QUANG ĐIỆN 36 3.1 Giới thiệu 36 3.2 Mơ hình tốn học tế bào PV 36 ii 3.2.1 Mơ hình tế bào panel lượng mặt trời lý tưởng 37 3.2.2 Mơ hình hai diode 39 3.2.3 Mơ hình Diode 40 3.2.3.1 Mơ hình Matlab tế bào quang điện 41 3.2.3.2 Mơ mơ hình PV 43 3.3 Kết mô 46 3.4 Kết luận thảo luận 49 CHƯƠNG 4: CÁC MÔ HÌNH THUẬT TỐN MPPT 51 4.1 Giới thiệu 51 4.2 Thuật toán PO 53 4.3 Thuật toán PO cải tiến (MPO) 55 4.4 Thuật toán IC (Incrementtal Conductance) 57 4.5 Thuật toán kết hợp CV IC 59 4.6 Công suất ngõ hiệu suất thuật toán MPPT 61 4.7 Thảo luận Phân tích 62 CHƯƠNG 5: MÔ PHỎNG HỆ THỐNG PIN NĂNG LƯƠNG MẶT TRỜI TRÊN MATLAB/SIMULINK 63 5.1 Giới thiệu chuyển đổi DC-DC boost 63 5.1.1 Bộ chuyển đổi DC-DC 63 5.1.2 Giới thiệu Boost 65 5.1.2.1 Phân tích trạng thái ổn định boost 65 5.1.2.2 Phân tích trạng thái động boost 69 5.2 Thiết kế mô Boost Matlab/Simulink 70 5.2.1 Thiết kế boost kết nỗi panel tải 70 5.2.2 Mô boost Matlab/Simulink 74 5.3 Thực mô hệ thống PV 75 5.4 Kết luận 79 CHƯƠNG 6: KHẢO SÁT THUẬT TỐN MPPT TRÊN MƠ HÌNH PANEL PV THỰC TẾ 80 6.1 Giới thiệu chung 80 6.2 Phần cứng sử dụng 80 6.2.1 Panel lượng mặt trời 80 6.2.2 Vi điều khiển 81 6.2.3 Bộ boost 82 6.2.4 Cảm Biến 82 6.3 6.3.1 Kết 83 Kết thử nghiệm vòng hở 83 iii 6.3.2 6.4 Khảo sát thực nghiệm 84 Kết luận 88 CHƯƠNG 7: KẾT LUẬN VÀ HƯỚNG PHÁT TRIỂN 91 7.1 Kết luận 91 7.2 Hướng nghiên cứu phát triển 93 TÀI LIỆU THAM KHẢO 96 PHỤ LỤC A 101 PHỤ LỤC B 105 PHỤ LỤC C 114 PHỤ LỤC D 115 PHỤ LỤC E 118 105 PHỤ LỤC B Code Matlab tính tốn cơng suất lý thuyết theo xạ nhiệt độ % Matlab function to calculate the theoretical maximum power point of % KYOCERASOLAR when subjected to the variation of temperature and % light levels function [Pm_th, Im_th, Vm_th] = det_max_KYOCERASOLAR (G, T) % det_max: function to determine a theoretical maximum power point of % solar panel % [Pm_th, Im_th, Vm_th] = det_max (G, T) % The parameters are G( solar irradiance) and T(Cell temperature) % The outputs are Pm_th, Im_th, Vm_th %//////////////////////////////////////////////////////////////// % Set initial conditions for Vm and Pm_th Vm = 10; Pm_th = 0; % Find maximum power point while Vm < 24-T/4 Im = KYOCERASOLAR(Vm, G, T); Pm_new = Im * Vm; if Pm_new > Pm_th Pm_th = Pm_new; Im_th = Im; Vm_th = Vm; end Vm = Vm + 003; end Matlab code m-file cho thuật toán PO trời nắng % MATLAB Script file for investigating the PO MPPT Algorithm under % sunny weather conditions (slowly of solar irradiance G) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% clear; global T % makes variable T accessible on a global scope % Initial Conditions T = 25; % Temperature of the solar panel cell (C) C = 0.1; % increment voltage (V) G = 0.025; % solar irradiance Vm = 17.3; % panel voltage (V) Im = KYOCERASOLAR(Vm, G, T); % PV current of module Pm = Vm * Im % Panel power output Vp_new = Vm + C; % updated reference panel voltage % Create vectors for voltage and power data Vm_arr = []; Pm_arr = []; Pmax_arr = []; % Provide solar irradiation data for a sunny day at Upington % Data stored in a 14 by matrix, with column being the time data and % column the irradiation data G_data = [1 0.02; 0.204; 0.439; 0.664; 0.827; 0.981; 1.073; 1.073; 1; 10 0.868; 11 0.684; 12 0.449; 13 0.214; 14 0.03]; x_t = G_data(:,1)'; % Store time data in vector x_t (hour) 106 y_G = G_data(:,2)'; % Store irradiation data in vector y_G (Kw/m2) x_ti = 1: 300; % Creates a by 300 vector for interpolation y_Gi = interp1 (x_t, y_G, x_ti,'linear'); % Perform linear interpolation for i = 1:14 G = y_Gi (i); % Store interpolated values new_Vm = Vp_new; % measure voltage new_Im = KYOCERASOLAR (Vp_new, G, T); % measure current Pm_new = new_Vm * new_Im % Determine new Power deltaPm = Pm_new - Pm; % Find the difference in power % Start PO MPPT Algorithm if deltaPm > if new_Vm > Vm Vp_new = new_Vm + C; % Increment voltage else Vp_new = new_Vm - C; % Decrement voltage end elseif deltaPm < if new_Vm > Vm Vp_new = new_Vm - C; % Decrement voltage else Vp_new = new_Vm + C; %Increment voltage end else Vp_new = new_Vm; end % Updating the voltage and power Vm = new_Vm; Pm = Pm_new; [Pmp_max, Imp, Vmp] = det_max_KYOCERASOLAR (G, T); % Store calculated values in vectors Vm_arr = [Vm_arr Vm]; Pm_arr = [Pm_arr Pm]; Pmax_arr = [Pmax_arr Pmp_max]; end % calculate Tracking efficiency of PO algorithm (Electrical energy given % as theoretical and real power during the same period time) P_theor = sum(Pmax_arr)/3600 P_real = sum(Pm_arr)/3600 Track_eff = (P_real/P_theor) save ('V0_sunny.mat', 'Pm_arr', 'Pmax_arr', 'Vm_arr', 'x_t'); % Plot result t = 1:14; plot(t,Pmax_arr) plot(t,P_theor, 'r*') hold on plot(t,P_real,'g*') title('POWER MAX (red) VS (green)REAL POWER FOR SUNNY SCENARIO') xlabel('SIMULATION TIME (s)') ylabel('MODULE OUTPUT POWER (W)') hold off t=1:14; plot(t,Track_eff,'g*') title('TRACKING EFFICIENCY OF PO ALGORITHM UNDER SUNNY SCENARIO') xlabel('SIMULATION TIME(s)') ylabel('TRACKING EFFICIENCY') 107 figure plot (Vm_arr, Pm_arr, 'g') % Plots the P-V curves together with the maximum power points Vm = linspace (0, 23, 58); hold on for G=.2:.2:1 Im = KYOCERASOLAR(Vm, G,T); Pm = Im.*Vm; plot(Vm, Pm) [Pm_max, Imp, Vmp] = det_max_KYOCERASOLAR(G, T); plot(Vmp, Pm_max, 'r*') end title('PO ALGORITHM TRACKING INVESTIGATION SUNNY SCENARIO') xlabel('PANEL VOLTAGE (V)') ylabel('PANEL OUTPUT POWER (W)') axis([0 23 58]) hold off Matlab code m-file cho thuật toán PO cải tiến MPO trời mây % MATLAB Script file for investigating the PO MPPT Algorithm modified % version (or MPO) under cloudy weather conditions (fast of solar irradiance G) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% clear; global T % makes variable T accessible on a global scope % Initial Conditions T = 25; % Temperature of the solar panel cell (C) C = 0.1; % increment voltage (V) G = 0.025; % solar irradiance Vm_1 = 17.3; % panel voltage (V) Im_1 = KYOCERASOLAR(Vm_1, G, T); % PV current of module Pm_1 = Vm_1 * Im_1 % Panel power output Vm_2 = Vm_1 + C; Im_2 = KYOCERASOLAR(Vm_2, G, T); % PV current of module Pm_2 = Vm_2 * Im_2; % Panel power output Vp_new = Vm_1 + C; % updated reference panel voltage % Create vectors for voltage and power data Vm_arr = []; Pm_arr = []; Pmax_arr = []; % Provide solar irradiation data for a sunny day at Upington % Data stored in a 14 by matrix, with column being the time data and % column the irradiation data %G_data = [1 0.02; 0.204; 0.439; 0.664; 0.827; 0.981; 1.073; 1.073; 1; 10 0.868; 11 0.684; 12 0.449; 13 0.214; 14 0.03]; G_data = [1 0.03; 0.143; 0.163; 0.613; 0.725; 0.245; 0.388; 0.347; 0.449; 10 0.521; 11 0.357; 12 0.388; 13 0.163; 14 0.082]; x_t = G_data (:,1)'; % Store time data in vector x_t (hour) y_G = G_data (:,2)'; % Store irradiation data in vector y_G (Kw/m2) x_ti = 1: 300; % Creates a by 300 vector for interpolation 108 y_Gi = interp1 (x_t, y_G, x_ti,'linear'); % Perform linear interpolation % Initialization count = 1; for i = 1:14 G = y_Gi (i);% Store interpolated values cur_Vm = Vp_new; %measure voltage new_Im = KYOCERASOLAR(Vp_new, G,T);%measure current Pcur = cur_Vm * new_Im; % Determine new power deltaPm = Pcur - Pm_1; if (count == 0) count = 2; else if (deltaPm > 0) if (cur_Vm > Vm_1) Vp_new = cur_Vm + C; % Increment voltage else Vp_new = cur_Vm - C; % Decrement voltage end elseif (deltaPm < 0) if (Pm_1 - Pm_2 > 0) % top of voltage Vm_1 Vmppt count = 0; elseif cur_Vm > Vm_1 Vp_new = cur_Vm - C; % Decrement voltage elseif cur_Vm < Vm_1 Vp_new = cur_Vm + C; %Increment voltage end end end % Updating the voltage and power if count == % go to MPP Pm_1 = Pcur; Vp_new = Vm_1; Vm_1 = cur_Vm; elseif (count == 1) % work normal Vm_2 = Vm_1; Vm_1 = cur_Vm; Pm_2 = Pm_1; Pm_1 = Pcur; else count = 1; end [Pmp_max, Imp, Vmp] = det_max_KYOCERASOLAR(G, T); % Store data in arrays for plot Vm_arr = [Vm_arr cur_Vm]; Pm_arr = [Pm_arr Pcur]; Pmax_arr = [Pmax_arr Pmp_max]; end % Calculate Tracking efficiency of PO algorithm (Electrical energy given % as theoretical and real power during the same period time) P_theor = sum(Pmax_arr)/3600 P_real = sum(Pm_arr)/3600 Track_eff = (P_real/P_theor) 109 save ('V1_cloudy.mat', 'Pm_arr', 'Pmax_arr', 'Vm_arr', 'x_t'); % Plot result t = 1:14; % plot(t,Pmax_arr) plot(t,P_theor, 'r*') hold on plot(t,P_real,'g*') title('POWER MAX (red)VS REAL POWER (green) FOR SUNNY SCENARIO') xlabel('SIMULATION TIME(s)') ylabel('MODULE OUTPUT POWER(W)') hold off figure plot (Vm_arr, Pm_arr, 'g') % Plots the P-V curves together with the maximum power points Vm = linspace (0, 23, 58); hold on for G=.2:.2:1 Im = KYOCERASOLAR(Vm, G, T); Pm = Im.*Vm; plot(Vm, Pm) [Pm_max, Imp, Vmp] = det_max_KYOCERASOLAR(G, T); plot(Vmp, Pm_max, 'r*') end title('MPO ALGORITHM TRACKING INVESTIGATION CLOUDY SCENARIO') xlabel('PANEL VOLTAGE(V)') ylabel('PANEL OUTPUT POWER(W)') axis([0 23 58]) hold off Matlab code m-file cho thuật toán IC trời nắng %MATLAB Script file for investigating the IC MPPT Algorithm under % sunny weather conditions (slowly change of solar irradiance G) %/////////////////////////////////////////////////////////////////////// clear; global T % makes variable T accessible on a global scope % Initialize constants T = 25; % Temperature of the solar panel cell (C) C = 0.1; % increment voltage (V) err = 0.0217; % max error G = 0.025; % solar irradiance Vm_pre = 17.3; % panel voltage Im_pre = KYOCERASOLAR(Vm_pre, G, T); % PV current of module Pm = Vm_pre * Im_pre; % Panel power output Vp_new = Vm_pre + C; % updated reference panel voltage % Create vectors for voltage and power data Vm_arr = []; Pm_arr = []; Pmax_arr = []; % Provide solar irradiation data for a sunny day at Upington % Data stored in a 14 by matrix, with column being the time data and % column the irradiation data G_data = [1 0.02; 0.204; 0.439; 0.664; 0.827; 0.981; 1.073; 110 1.073; 1; 10 0.868; 11 0.684; 12 0.449; 13 0.214; 14 0.03]; x_t = G_data(:,1)'; % Store time data in vector x_t (hour) y_G = G_data(:,2)'; % Store irradiation data in vector y_G (Kw/m2) x_ti = 1: 300; % Creates a by 300 vector for interpolation y_Gi = interp1 (x_t, y_G, x_ti,'linear'); % Perform linear interpolation for i = 1:14 G = y_Gi (i); % Store interpolated values new_Vm = Vp_new;% measure voltage new_Im = KYOCERASOLAR(Vp_new, G, T); %measure current % Find the difference in voltage and current deltaVm = new_Vm - Vm_pre; deltaIm = new_Im - Im_pre; %Begins IC Algorithm if deltaVm == if deltaIm == Vp_new = new_Vm; elseif deltaIm > Vp_new = new_Vm + C; % Increment voltage else Vp_new = new_Vm - C; % Decrement voltage end else if abs(deltaIm/deltaVm + new_Im/new_Vm) -new_Im/new_Vm + err Vp_new = new_Vm + C; % Increment voltage else Vp_new = new_Vm - C; % Decrement voltage end end end % Use function det_max_KYOCERASOLAR to calculate the maximum % theoretical values [Pmp_max, Imp, Vmp] = det_max_KYOCERASOLAR(G, T); % Store calculated values in vectors Vm_pre = new_Vm; Im_pre = new_Im; Pm = new_Vm * new_Im; % Adding data to vectors Vm_arr = [Vm_arr Vm_pre]; Pm_arr = [Pm_arr Pm]; Pmax_arr = [Pmax_arr Pmp_max]; end % calculate Tracking efficiency of PO algorithm (Electrical energy given % as theoretical and real power during the same period time) P_theor = sum(Pmax_arr)/3600 P_real = sum(Pm_arr)/3600 Track_eff = (P_real/P_theor) % Save file.mat, with necessary value save ('IC_sunny.mat', 'Pm_arr', 'Pmax_arr', 'Vm_arr', 'x_t'); % Plot result t = 1:14; plot(t,Pmax_arr) plot(t,P_theor, 'r*') hold on 111 plot(t,P_real,'g*') title('POWER MAX (red) VS (green)REAL POWER FOR SUNNY SCENARIO') xlabel('SIMULATION TIME (s)') ylabel('MODULE OUTPUT POWER (W)') hold off figure plot (Vm_arr, Pm_arr, 'g') % Plots the P-V curves together with the maximum power points Vm_pre = linspace (0, 23, 58); hold on for G=.2:.2:1 Im_pre = KYOCERASOLAR(Vm_pre, G, T); Pm = Im_pre.*Vm_pre; plot(Vm_pre, Pm) [Pm_max, Imp, Vmp] = det_max_KYOCERASOLAR(G, T); plot(Vmp, Pm_max, 'r*') end title('IC ALGORITHM TRACKING INVESTIGATION SUNNY SCENARIO') xlabel('PANEL VOLTAGE (V)') ylabel('PANEL POWER OUTPUT (W)') axis([0 23 58]) hold off Matlab code m-file cho thuật toán CV-IC trời mây %MATLAB Script files for investigating the CV-IC MPPT Algorithm %under cloudy weather conditions (rapidly change of solar irradiance G) %/////////////////////////////////////////////////////////////////////// clear; global T% makes variable T accessible on a global scope % Initialize constants C = 0.0025; % increment voltage (V) T = 25; % Temperature of the solar panel cell (C) err = 0.0217; % max error G = 0.025; % solar irradiance Vm = 17.3; % panel voltage Im = KYOCERASOLAR (Vm, G, T); % PV current of module Pm = Vm * Im; % Panel power output Voc = 22.1; % datasheet open circuit voltage k = 0.765; %constant in Constant Voltage (CV) MPPT method Vp_new = Vm + C; % updated reference panel voltage % Create vectors for voltage and power data Vm_arr = []; Pm_arr = []; Pmax_arr = []; %Provide Irradiation data for a cloudy day at upington (South Africa) % Data stored in a 14 by matrix, with column being the time data and % column the irradiation data G_data = [1 0.03; 0.143; 0.163; 0.613; 0.725; 0.245; 0.388; 0.347; 0.449; 10 0.521; 11 0.357; 12 0.388; 13 0.163; 14 0.082]; x_t = G_data (:,1)'; % Store time data in vector x_t (hour) y_G = G_data (:,2)'; % Store irradiation data in vector y_G (Kw/m2) x_ti = 1: 300; % Creates a by 300 vector for interpolation y_Gi = interp1 (x_t, y_G, x_ti,'linear'); % Perform linear interpolation 112 for i = 1:14 G = y_Gi (i); %Store interpolated values new_Vm = Vp_new; % measure voltage new_Im = KYOCERASOLAR (Vp_new, G,T);%measure current deltaIm = new_Im - Im; if ((deltaIm/Im)= if deltaIm == Vp_new = new_Vm; % Voltage remains constant elseif deltaIm > Vp_new = new_Vm + C; % Increment voltage elseif deltaIm < Vp_new = new_Vm - C; % Decrement voltage else % PO Vp_new = k*Voc; Pa = Vm*Im; Pnew = Vp_new*new_Im; % Find new power if ((Pnew - Pa)==0) if ((Pnew - Pa)>0) if ((Vp_new -Vm)>0) Vp_new = new_Vm + C; y = Vp_new; elseif ((Vp_new -Vm) Di_ref = Di_new + dD; % Increment duty cycle else Di_ref = Di_new - dD; % Decrement duty cycle end else if abs (deltaIm/deltaVm + Im/Vm) -Im/Vm + err Di_ref = Di_new + dD; % Increment duty cycle else Di_ref = Di_new - dD; % Decrement duty cycle end end end D = Di_ref; end Nhúng thuật toán CV-IC vào khối Matlab function function D = fcn (u, i, v, r, Di) % Initialize constants Voc = 22.1; %datasheet open circuit voltage k = 0.765; % constant in CV MPPT method err = 0.0217; % error max dD = 0.0001; % increment of duty cycle %Di = 0.28; % initial duty cycle Vm = u; % Panel voltage Im_prev = I; % Previous Panel current Vm_prev = v; % Previous Panel voltage Di_ref = Di + dD; % Updated reference duty cycle 116 D = Di_ref; Im = r; % Find difference in current deltaIm = Im - Im_prev; if ((deltaIm/Im) if deltaIm == Di_ref = Di_new; % Duty cycle remains constant D = Di_ref; elseif deltaIm > Di_ref = Di_new + dD; % Increment duty cycle D = Di_ref; elseif deltaIm < Di_ref = Di_new - dD; % Decrement duty cycle D = Di_ref; else Vref = k*Voc; % Find reference voltage using CV method Pnew = Vref*Im; Pm = Vref*Im_prev; if ((Pnew - Pm) ==0) if ((Pnew - Pm)>0) if ((Vref -Vref)>0) Di_ref = Di_new + dD; % Increment duty cycle D = Di_ref; elseif ((Vref - Vref)

Ngày đăng: 27/04/2021, 11:08

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan