1. Trang chủ
  2. » Luận Văn - Báo Cáo

Kỹ thuật dự báo trong vận hành thị trường điện việt nam

375 1 0

Đ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

BỘ GIÁO DỤC VÀ ĐÀO TẠO (font 13) BỘ GIÁO DỤC VÀ ĐÀO TẠO TRƯỜNG ĐẠI HỌC CÔNG NGHỆ TP HCM NGUYỄN TUẤN DŨNG KỸ THUẬT DỰ BÁO TRONG VẬN HÀNH THỊ TRƯỜNG ĐIỆN VIỆT NAM LUẬN ÁN TIẾN SĨ KỸ THUẬT TP HỒ CHÍ MINH NĂM 2020 ii CÔNG TRÌNH ĐƯỢC HOÀN THÀNH TẠI TRƯỜNG ĐẠI HỌC CÔNG NGHỆ TP HCM Cán bộ hướng dẫn khoa học PGS TS Trần Thu Hà PGS TS Nguyễn Thanh Phương Luận án Tiến sĩ đã được bảo vệ tại Trường Đại học Công nghệ TP HCM ngày 06 tháng 11 năm 2020 Thành phần Hội đồng đánh giá Luận án gồm TT Họ và tên Chức.

BỘ GIÁO DỤC VÀ ĐÀO TẠO TRƯỜNG ĐẠI HỌC CÔNG NGHỆ TP HCM - NGUYỄN TUẤN DŨNG KỸ THUẬT DỰ BÁO TRONG VẬN HÀNH THỊ TRƯỜNG ĐIỆN VIỆT NAM LUẬN ÁN TIẾN SĨ KỸ THUẬT TP HỒ CHÍ MINH NĂM 2020 ii CƠNG TRÌNH ĐƯỢC HỒN THÀNH TẠI TRƯỜNG ĐẠI HỌC CÔNG NGHỆ TP HCM Cán hướng dẫn khoa học : - PGS.TS Trần Thu Hà - PGS.TS Nguyễn Thanh Phương Luận án Tiến sĩ bảo vệ Trường Đại học Công nghệ TP HCM ngày 06 tháng 11 năm 2020 Thành phần Hội đồng đánh giá Luận án gồm: TT Họ tên GS TSKH Nguyễn Xuân Quỳnh GS TS Lê Kim Hùng PGS TS Lê Minh Phương PGS TS Quyền Huy Ánh GS TS Phạm Thị Ngọc Yến PGS TS Nguyễn Hùng PGS TS Ngô Cao Cường Chức danh Hội đồng Chủ tịch Phản biện Phản biện Phản biện Ủy viên Ủy viên Ủy viên, Thư ký Xác nhận Chủ tịch Hội đồng đánh giá Luận án sau Luận án báo cáo sửa chữa Chủ tịch Hội đồng đánh giá Luận án GS TSKH Nguyễn Xuân Quỳnh iii CƠNG TRÌNH ĐƯỢC HỒN THÀNH TẠI TRƯỜNG ĐẠI HỌC CÔNG NGHỆ TP HCM Luận án Tiến sĩ bảo vệ Trường Đại học Công nghệ TP HCM ngày 06 tháng 11 năm 2020 Thành phần Hội đồng đánh giá Luận án gồm: TT Họ tên GS TSKH Nguyễn Xuân Quỳnh GS TS Lê Kim Hùng PGS TS Lê Minh Phương PGS TS Quyền Huy Ánh GS TS Phạm Thị Ngọc Yến PGS TS Nguyễn Hùng PGS TS Ngô Cao Cường Chức danh Hội đồng Chủ tịch Phản biện Phản biện Phản biện Ủy viên Ủy viên Ủy viên, Thư ký Xác nhận Nghiên cứu sinh, tập thể cán hướng dẫn, Khoa/Viện quản lý chuyên ngành Viện Đào tạo Sau đại hộc sau Luận án sửa chữa Cán hướng dẫn Cán hướng dẫn Nghiên cứu sinh PGS TS Trần Thu Hà PGS TS Nguyễn Thanh Phương Nguyễn Tuấn Dũng KHOA QUẢN LÝ CHUYÊN NGÀNH PGS TS Nguyễn Thanh Phương VIỆN ĐÀO TẠO SAU ĐẠI HỌC PGS TS Huỳnh Châu Duy iv LỜI CAM ĐOAN Tôi xin cam đoan cơng trình nghiên cứu riêng tơi Các số liệu, kết nêu Luận án trung thực chưa công bố cơng trình khác Tơi xin cam đoan giúp đỡ cho việc thực Luận án cảm ơn thông tin trích dẫn Luận án rõ nguồn gốc tham khảo Tác giả Luận án Nguyễn Tuấn Dũng v LỜI CÁM ƠN Tơi xin bày tỏ lịng biết ơn chân thành đến PGS.TS Trần Thu Hà PGS.TS Nguyễn Thanh Phương, Thầy, Cô tận tâm dẫn, truyền đạt kiến thức kinh nghiệm q báu cho tơi suốt q trình thực Luận án Và xin gửi lời cám ơn đến gia đình bạn bè - người ủng hộ động viên suốt thời gian vừa qua Tác giả Luận án Nguyễn Tuấn Dũng vi TĨM TẮT Đặc điểm q trình sản xuất tiêu thụ điện phải đảm bảo cân sản xuất tiêu thụ thời điểm, có cân sản xuất tiêu thụ làm cho chất lượng điện thay đổi, nặng nề dẫn đến sụp đỗ điện áp gây tan rã hệ thống Tuy nhiên, điện mặt hàng đặc biệt, mặt kinh tế khơng thể lưu trữ ổn định hệ thống điện đòi hỏi cân liên tục sản xuất tiêu dùng Đồng thời, nhu cầu sử dụng điện phụ thuộc vào thời tiết (nhiệt độ, tốc độ gió, mưa,…); nhu cầu sử dụng doanh nghiệp, hoạt động hàng ngày (công suất đỉnh so với cao điểm, ngày tuần so với ngày cuối tuần, ngày lễ gần ngày lễ,…); công suất phát nguồn lượng tái tạo thay đổi theo điều kiện tự nhiên; Do đó, phải cần đến kỹ thuật dự báo điện để cung cấp thơng tin cho q trình điều khiển HTĐ nhằm đảm bảo cân sản xuất tiêu thụ Đặc biệt HTĐ vận hành theo chế thị trường điện cạnh tranh, kết dự báo cung cấp thông tin cho nhà quản lý điều hành giá mua bán diện Đã có nhiều phương pháp dự báo sử dụng, nhiên phần lớn phương pháp dự báo dài hạn trung hạn dùng để cung cấp thông tin cho việc qui hoạch phát triển nguồn, lưới điện lập kế hoạch vận hành HTĐ Luận án nghiên cứu đề xuất phương pháp dự báo ngắn hạn để cung cấp thông tin phụ tải điện cho nhà quản lý điều hành thị trường điện cạnh tranh Việc nghiên cứu đặc tính phụ tải; xây dựng phương pháp xử lý liệu thiếu, sai sốt liệu; đề xuất sử dụng biểu đồ phụ tải chuẩn hóa đơn vị (SLP) để cung cấp thơng tin cho mơ hình dự báo nhiệm vụ quan trọng luận án Qua phân tích mơ hình dự báo sử dụng giới (Kỹ thuật thống kê – mơ hình SARIMA; Trí tuệ nhân tạo, học máy – mơ vii hình Support Vector Regression; Neural Network, Feedforward Networks; Random Forest), luận án đã xây dựng thành công giải thuật sử dụng Biểu đồ phụ tải chuẩn hóa đơn vị (SLP) làm liệu đầu vào cho modules xây dựng hàm hồi qui phát huy tác dụng cho kết dự báo có độ sai số thấp, giải câu chuyện chênh lệch ngày âm ngày dương, ngày lễ hội, ngày đặc biệt năm ngày tháng 01 02 (tháng có Tết Dương lịch Tết Ngun Đán) Mơ hình kết hợp Biểu đồ phụ tải chuẩn hóa đơn vị (SLP) Support Vector Regression (SVR) hoàn thiện hàm dự báo ngắn hạn, cung cấp kết dự báo cho nhà quản lý điều hành thị trường điện cạnh tranh, kết dự báo kiểm chứng với liệu 05 Tổng công ty Điện lực thuộc Tập đoàn Điện lực Việt Nam Ngoài ra, luận án có phân tích tác động giá thị trường SMP hợp đồng CFD đến kết dự báo Qc để hạn chế tới mức thấp rủi ro tận dụng biến động thị trường để mang lợi nhuận cao Các module xử lý liệu thiếu, xây dựng Biểu đồ phụ tải chuẩn hóa đơn vị (SLP), dự báo phụ tải,… tác giả tự lập trình ngơn ngữ Matlab 2017 viii ABSTRACT The characteristic of the production and consumption of electricity is to ensure a balance between production and consumption at all times When there is an imbalance between production and consumption, the quality of power changes, which can even lead to voltage collapse, causing the system to fail However, electricity is a very special commodity, it is economically impossible to store Stabilizing the electrical system requires a constant balance between production and consumption In addition, the demand for electricity also depends on factors such as weather (temperature, wind speed, rain, ); daily usage demand (peak capacity, demand on weekdays, weekends, holidays, ) and variation in generating capacity of renewable energy sources according to natural conditions Therefore, forecast techniques are needed to provide information for the control process of the power system to ensure a balance between production and consumption Especially when the power system is operated under the mechanism of a competitive electricity market, the forecast results will provide information for managers to control the buying and selling prices Many forecasting methods have been used, but most are long-term and medium-term forecasting methods used to provide information for power and grid development planning as well as power system operation planning The thesis will study and propose a new short-term forecasting method to provide information about electricity load to managers operating the competitive electricity market The important tasks of the thesis include studying load characteristics, developing missing and incorrect data processing methods, as well as proposing to use the Standardized Load Profile (SLP) to provide information for forecasting models Through analysis of forecasting models being used in the world (including Statistical Engineering - SARIMA model; Artificial Intelligence, machine learning Support Vector Regression model; Neural Network, Feedforward Networks; ix Random Forest), the thesis has successfully built a new algorithm It is a method of using the Standardized Load Profile (SLP) as input data sets for the regression building modules This method is effective and gives the forecast results with low error It solves the difference of negative and positive days, holidays, special days of the year and the days of January and February (the month of New Year and Lunar New Year) The combined model of the Standardized Load Profile (SLP) and Support Vector Regression (SVR) has completed the short-term forecast function and provided the forecast results for the managers operating the competitive electricity market The forecast results are verified with the data set of 05 Electricity Corporations of Electricity of Vietnam (EVN) In addition, the thesis also analyzes the impact of SMP market price and CFD contracts on Qc forecast results to minimize risks and take advantage of the fluctuations of the market for the highest returns The modules on processing missing data , building the Standardized Load Profile (SLP), load forecasting, are programmed by the author using the Matlab 2017 x GIẤY XÁC NHẬN CỦA TỔNG CÔNG TY ĐIỆN LỰC TP.HCM SLP_data_mining clear all; clc; Chuanhoadulieu1; Bieudochuanhoa; BDCHdonvi1; [num2,txt2] =xlsread('Dataday01042018.xls','Dulieu'); date1 = txt2(:,2); yP = num2(:,8); yA = num2(:,9); yT = num2(:,10); n = length(num2); j = 1; y = yP; x = [yA yT]; for i = 1:24 P(:,i) = num2(:,10+i); end for i = 1:n if or(any(isnan(P(i,:))==1), any(P(i,:)==0)) ymax(i) = "NaN"; else ymax(i) = max(P(i,:)); end ysum(i) = sum(P(i,:)); end %Du lieu bi thieu hoac qua cao tung chu ky se coi nhu yP bi mat for i = 1: n if or(any(isnan(P(i,:))==1), any(P(i,:)==0)) || (any((P(i,:)/yP(i)) > 1.5)) note(j) = i; j = j + 1; y(i) = "NaN"; end end %Ve bieu du lieu thieu figure plot(ymax((note(1)-7):(note(end)+2)),'r*-'); hold on; xlabel('Hour'); ylabel('Load (MW)'); title(sprintf('Handling missing data %s%s%s', datestr(date1(note(1)+1)),' to ',datestr(date1(note(end)+1)))) grid on; nr = length(note); for i = 1:nr figure plot(P(note(i),:),'r.-'); hold on; xlabel('Hour'); ylabel('Load (MW)'); title(sprintf('Handling missing data %s%s%s',datestr(date1(note(i)+1)))) grid on; end %Tim p, q cua SArima sp = 1; nf = 12; %Tinh SARIMA cho Asum [dt_p dt_q] = Tinhtoanpq(yP(1:note(1)),sp); %Arima full Mdl = arima('Constant',0,'D',sp,'Seasonality',12,'ARLags',dt_p,'MALags',dt_q); y0 = yP(1:round(n/20)); EstMdl = estimate(Mdl,yP(round(n/20)+1:note(1)-nf),'Y0',y0); YFAr = forecast(EstMdl,nf,'Y0',yP(1:note(1))); err = yP((n-nf+1):end) - YFAr; errpct = abs(err)./yP((n-nf+1):end)*100; MAPEar = mean(errpct(~isinf(errpct))); %Chay lai duong cong bàn SVR, NN de lap cac du lieu thieu mdl1 = fitrsvm(x,y,'Standardize',true,'KernelFunction','linear','KernelScale','a uto'); %mdl1 = fitrsvm(x,y,'Standardize',true,'BoxConstrain',93.421,'epsilon',32.502,'Ke rnelFunction','polynomial','KernelScale','auto') YFit1 = predict(mdl1,x); mdl2 = fitrsvm(x,y,'Standardize',true,'epsilon',0.01,'KernelFunction','gaussian' ,'KernelScale','auto') YFit2 = predict(mdl2,x); mdl3 = fitrsvm(x,y,'Standardize',true,'KernelFunction','linear','KernelScale','a uto') YFit3 = predict(mdl3,x); mdl4 = fitrsvm(x,y,'Standardize',true,'BoxConstrain',49.21,'epsilon',0.01,'Kerne lFunction','linear','KernelScale','auto') YFit4 = predict(mdl4,x); mdl = fitrsvm(x,y,'Standardize',true,'BoxConstrain',0.1,'epsilon',49.85,'Kernel Function','gaussian','KernelScale','auto'); YFit = predict(mdl,x); %Giai thuat hoc may net = fitnet([10 5],'trainbr'); net = train(net,x',y'); Ynet = sim(net,x')'; net1 = feedforwardnet(10); net1 = train(net1,x',y'); Ynet1 = sim(net1,x')'; mdlTreeBag = TreeBagger(20, x, y, 'method', 'regression','oobpred', 'on', 'minleaf',20); %view(mdlTreeBag.Trees{2},'Mode','graph') Ytree = predict(mdlTreeBag, x); %Ve thi cac mo hinh uoc luong hoi qui figure plot(y((note(1)-15):(note(1)-1)),'.-'); hold on; plot(YFit1((note(1)-15):(note(1)-1)),'.-'); hold on; plot(YFit2((note(1)-15):(note(1)-1)),'.-'); hold on; plot(YFit3((note(1)-15):(note(1)-1)),'.-'); hold on; plot(YFit4((note(1)-15):(note(1)-1)),'.-'); xlabel('Modules to build regression functions'); ylabel('Load (MW)'); title(sprintf('Handling missing data %s%s%s', datestr(date1(note(1)15)),' to ',datestr(date1(note(1)-1)))) grid on; legend('Real','SVR1','SVR2','SVR3','SVR4','Location','best'); print -dmeta; figure plot(y((note(1)-15):(note(1)-1)),'.-'); hold on; plot(YFit4((note(1)-15):(note(1)-1)),'.-'); hold on; plot(Ynet((note(1)-15):(note(1)-1)),'.-'); hold on; plot(Ytree((note(1)-15):(note(1)-1)),'.-'); xlabel('Modules to build regression functions'); ylabel('Load (MW)'); title(sprintf('Handling missing data %s%s%s', datestr(date1(note(1)15)),' to ',datestr(date1(note(1)-1)))) grid on; legend('Real','SVR','Neural Network','Random Forest','Location','best'); print -dmeta; %So sanh cac gia tri uoc luong lai de chon mo hinh for i = 1:10 err1(i) = YFit(note(1)+i-30) - yP(note(1)+i-30); errpct1(i) = abs(err1(i))./yP(note(1)+i-30)*100; err2(i) = Ynet(note(1)+i-30) - yP(note(1)+i-30); errpct2(i) = abs(err2(i))./yP(note(1)+i-30)*100; err3(i) = Ynet1(note(1)+i-30) - yP(note(1)+i-30); errpct3(i) = abs(err3(i))./yP(note(1)+i-30)*100; err4(i) = Ytree(note(1)+i-30) - yP(note(1)+i-30); errpct4(i) = abs(err4(i))./yP(note(1)+i-30)*100; err11(i) = YFit1(note(1)+i-30) - yP(note(1)+i-30); errpct11(i) = abs(err11(i))./yP(note(1)+i-30)*100; err12(i) = YFit2(note(1)+i-30) - yP(note(1)+i-30); errpct12(i) = abs(err12(i))./yP(note(1)+i-30)*100; err13(i) = YFit3(note(1)+i-30) - yP(note(1)+i-30); errpct13(i) = abs(err13(i))./yP(note(1)+i-30)*100; err14(i) = YFit4(note(1)+i-30) - yP(note(1)+i-30); errpct14(i) = abs(err14(i))./yP(note(1)+i-30)*100; end MAPE1 = mean(errpct1(~isinf(errpct1))); MAPE2 = mean(errpct2(~isinf(errpct2))); MAPE3 = mean(errpct3(~isinf(errpct3))); MAPE4 = mean(errpct4(~isinf(errpct4))); MAPE11 = mean(errpct11(~isinf(errpct11))); MAPE12 = mean(errpct12(~isinf(errpct12))); MAPE13 = mean(errpct13(~isinf(errpct13))); MAPE14 = mean(errpct14(~isinf(errpct14))); %Ve thi cac gia tri uoc luong sau hieu chinh figure plot(ymax((note(1)-7):(note(end)+2)),'.-'); hold on; plot(YFit4((note(1)-7):(note(end)+2)),'.-'); xlabel("datestr(date1(note(1)+1))",' to ',"datestr(date1(note(end)+1))"); ylabel('Load (MW)'); title(sprintf('Handling missing data %s%s%s', datestr(date1(note(1)+1)),' to ',datestr(date1(note(end)+1)))) grid on; legend('Real','SVR','Location','best'); print -dmeta; xlswrite('Dataday01042018.xls',[YFit4 Ynet Ytree ymax' yP],'temp2'); xlswrite('Dataday01042018.xls',[MAPE14 MAPE2 MAPE4],'saiso'); %Chuan bi du lieu de chay mo hinh sua loi [num1,txt1] =xlsread('Dataday01042018.xls','temp5'); Pch0 = num1(:,5); Pch1 = num1(:,6); Pch2 = num1(:,7); Pch3 = num1(:,8); Pch4 = num1(:,9); Pch5 = num1(:,10); Pch6 = num1(:,11); Pch7 = num1(:,12); Pch8 = num1(:,13); Pch9 = num1(:,14); Pch10 = num1(:,15); Pch11 Pch12 Pch13 Pch14 Pch15 Pch16 Pch17 Pch18 Pch19 Pch20 Pch21 Pch22 Pch23 = = = = = = = = = = = = = num1(:,16); num1(:,17); num1(:,18); num1(:,19); num1(:,20); num1(:,21); num1(:,22); num1(:,23); num1(:,24); num1(:,25); num1(:,26); num1(:,27); num1(:,28); pch0 = num1(:,29); pch1 = num1(:,30); pch2 = num1(:,31); pch3 = num1(:,32); pch4 = num1(:,33); pch5 = num1(:,34); pch6 = num1(:,35); pch7 = num1(:,36); pch8 = num1(:,37); pch9 = num1(:,38); pch10 = num1(:,39); pch11 = num1(:,40); pch12 = num1(:,41); pch13 = num1(:,42); pch14 = num1(:,43); pch15 = num1(:,44); pch16 = num1(:,45); pch17 = num1(:,46); pch18 = num1(:,47); pch19 = num1(:,48); pch20 = num1(:,49); pch21 = num1(:,50); pch22 = num1(:,51); pch23 = num1(:,52); DL = string(txt1(:,1)); n2 = length(num1); for i = 1:n2 if DL(i) == date1(note(1)+1) dl = i; break; end end xtemp=[pch0 pch1 pch2 pch3 pch4 pch5 pch6 pch7 pch8 pch9 pch10 pch11 pch12 pch13 pch14 pch15 pch16 pch17 pch18 pch19 pch20 pch21 pch22 pch23]; k = 1; for i = 1:n2 if DL(i) == date1(note(k)+1) for j=1:24 YhourSLP(k,j) = YFit4(note(k))*xtemp(i,j); end if k < nr k = k + 1; else break; end end end for i = 1:nr figure plot(P(note(i),:),'.-'); hold on; plot(YhourSLP((i),:),'.-'); hold on; xlabel('Estimate the data was lost'); ylabel('Load (MW)'); title(sprintf('Handling missing data %s%s%s',datestr(date1(note(i)+1)))) grid on; legend('Real','SLP-SVR','Location','best'); print -dmeta; end %clear all SarimaforcdayAL clear all; clc; [num,txt,raw] =xlsread('Dataday01042018.xls','train'); %du lieu san luong, cong suat, nhiet yP=num(:,10); yA=num(:,8); yT=num(:,11); %do thi phu tai yP0=num(:,12); yP1=num(:,13); yP2=num(:,14); yP3=num(:,15); yP4=num(:,16); yP5=num(:,17); yP6=num(:,18); yP7=num(:,19); yP8=num(:,20); yP9=num(:,21); yP10=num(:,22); yP11=num(:,23); yP12=num(:,24); yP13=num(:,25); yP14=num(:,26); yP15=num(:,27); yP16=num(:,28); yP17=num(:,29); yP18=num(:,30); yP19=num(:,31); yP20=num(:,32); yP21=num(:,33); yP22=num(:,34); yP23=num(:,35); %do thi phu tai yp0=num(:,36); yp1=num(:,37); yp2=num(:,38); yp3=num(:,39); yp4=num(:,40); yp5=num(:,41); yp6=num(:,42); yp7=num(:,43); yp8=num(:,44); yp9=num(:,45); yp10=num(:,46); yp11=num(:,47); yp12=num(:,48); yp13=num(:,49); yp14=num(:,50); yp15=num(:,51); yp16=num(:,52); yp17=num(:,53); yp18=num(:,54); yp19=num(:,55); yp20=num(:,56); yp21=num(:,57); yp22=num(:,58); yp23=num(:,59); n = length(num); nt = 7; nf = 30; y1 = yP(1:n-nf-nt); y2 = yP(n-nt-nf+1:end-nf); y3 = yP(n-nf+1:end); %Du bao bang ARIMA %Tim p, q cua SArima sp = 1; %Tinh SARIMA cho Asum [dt_p dt_q] = Tinhtoanpq(yP(1:n-nf-nt),sp); %Du bao bang ARIMA %Tim p, q cua SArima sp = 1; %Tinh SARIMA cho Asum [dt_p dt_q] = Tinhtoanpq(y1,sp); %Arima full Mdl = arima('Constant',0,'D',sp,'Seasonality',7,'ARLags',dt_p, 'MALags',dt_q); y0 = y1(1:200); EstMdl = estimate(Mdl,y1(201:end),'Y0',y0); YFAr1 = forecast(EstMdl,nt,'Y0',y1); err1 = y2 - YFAr1; errpct1 = abs(err1)./y2*100; MAPEarima1 = mean(errpct1(~isinf(errpct1))); %Arima half Mdl1 = arima('Constant',0,'D',sp,'Seasonality',7,'ARLags',dt_p(1), 'MALags',dt_q(1)); y0 = y1(1:200); EstMdl1 = estimate(Mdl1,y1(201:end),'Y0',y0); YFAr2 = forecast(EstMdl1,nt,'Y0',y1); err2 = y2 - YFAr2; errpct2 = abs(err2)./y2*100; MAPEarima2 = mean(errpct2(~isinf(errpct2))); %Arima half Mdl2 = arima('Constant',0,'D',sp,'Seasonality',7,'ARLags',dt_p(1), 'MALags',dt_q(2)); y0 = y1(1:200); EstMdl2 = estimate(Mdl2,y1(201:end),'Y0',y0); YFAr3 = forecast(EstMdl2,nt,'Y0',y1); err3 = y2 - YFAr3; errpct3 = abs(err3)./y2*100; MAPEarima3 = mean(errpct3(~isinf(errpct3))); %Arima half Mdl3 = arima('Constant',0,'D',sp,'Seasonality',7,'ARLags',dt_p(2), 'MALags',dt_q(1)); y0 = y1(1:200); EstMdl3 = estimate(Mdl3,y1(201:end),'Y0',y0); YFAr4 = forecast(EstMdl3,nt,'Y0',y1); err4 = y2 - YFAr4; errpct4 = abs(err4)./y2*100; MAPEarima4 = mean(errpct4(~isinf(errpct4))); %Arima half Mdl4 = arima('Constant',0,'D',sp,'Seasonality',7,'ARLags',dt_p(2), 'MALags',dt_q(2)); y0 = y1(1:200); EstMdl4 = estimate(Mdl4,y1(201:end),'Y0',y0); YFAr5 = forecast(EstMdl4,nt,'Y0',y1); err5 = y2 - YFAr5; errpct5 = abs(err5)./y2*100; MAPEarima5 = mean(errpct5(~isinf(errpct5))); %Arima half Mdl5 = arima('Constant',0,'D',sp,'Seasonality',7,'ARLags',dt_p); y0 = y1(1:200); EstMdl5 = estimate(Mdl5,y1(201:end),'Y0',y0); YFAr6 = forecast(EstMdl5,nt,'Y0',y1); err6 = y2 - YFAr6; errpct6 = abs(err6)./y2*100; MAPEarima6 = mean(errpct6(~isinf(errpct6))); %Arima half Mdl6 = arima('Constant',0,'D',sp,'Seasonality',7,'MALags',dt_q); y0 = y1(1:200); EstMdl6 = estimate(Mdl6,y1(201:end),'Y0',y0); YFAr7 = forecast(EstMdl6,nt,'Y0',y1); err7 = y2 - YFAr7; errpct7 = abs(err7)./y2*100; MAPEarima7 = mean(errpct7(~isinf(errpct7))); %Arima half Mdl7 = arima('Constant',0,'D',sp,'Seasonality',7,'ARLags',dt_p(1)); y0 = y1(1:200); EstMdl7 = estimate(Mdl7,y1(201:end),'Y0',y0); YFAr8 = forecast(EstMdl7,nt,'Y0',y1); err8 = y2 - YFAr8; errpct8 = abs(err8)./y2*100; MAPEarima8 = mean(errpct8(~isinf(errpct8))); %Arima half Mdl8 = arima('Constant',0,'D',sp,'Seasonality',7,'ARLags',dt_p(2)); y0 = y1(1:200); EstMdl8 = estimate(Mdl8,y1(201:end),'Y0',y0); YFAr9 = forecast(EstMdl8,nt,'Y0',y1); err9 = y2 - YFAr9; errpct9 = abs(err9)./y2*100; MAPEarima9 = mean(errpct9(~isinf(errpct9))); %Arima half Mdl9 = arima('Constant',0,'D',sp,'Seasonality',7,'MALags',dt_q(1)); y0 = y1(1:200); EstMdl9 = estimate(Mdl9,y1(201:end),'Y0',y0); YFAr10 = forecast(EstMdl9,nt,'Y0',y1); err10 = y2 - YFAr10; errpct10 = abs(err10)./y2*100; MAPEarima10 = mean(errpct10(~isinf(errpct10))); %Arima half 10 Mdl10 = arima('Constant',0,'D',sp,'Seasonality',7,'MALags',dt_q(2)); y0 = y1(1:200); EstMdl10 = estimate(Mdl10,y1(201:end),'Y0',y0); YFAr11 = forecast(EstMdl10,nt,'Y0',y1); %Danh gia sai so err11 = y2 - YFAr11; errpct11 = abs(err11)./y2*100; MAPEarima11 = mean(errpct11(~isinf(errpct11))); xlswrite('Dataday01042018.xls',[YFAr1 YFAr2 YFAr3 YFAr4 YFAr5 YFAr6 YFAr7 YFAr8 YFAr9 YFAr10 YFAr11 y2],'Arima'); xlswrite('Dataday01042018.xls',[errpct1 errpct2 errpct3 errpct4 errpct5 errpct6 errpct7 errpct8 errpct9 errpct10 errpct11],'saisoar'); xlswrite('Dataday01042018.xls',[MAPEarima1 MAPEarima2 MAPEarima3 MAPEarima4 MAPEarima5 MAPEarima6 MAPEarima7 MAPEarima8 MAPEarima9 MAPEarima10 MAPEarima11],'saisoar1'); date = txt(:,2); figure; plot(YFAr1,'.-'); hold on; plot(YFAr2,'.-'); hold on; plot(YFAr3,'.-'); hold on; plot(YFAr4,'.-'); hold on; plot(YFAr5,'.-'); hold on; plot(YFAr6,'.-'); hold on; plot(YFAr7,'.-'); hold on; plot(YFAr8,'.-'); hold on; plot(YFAr9,'.-'); hold on; plot(YFAr10,'.-'); hold on; plot(YFAr11,'.-'); hold on; plot(y2,'.-'); xlabel('Days'); ylabel('Load (MW)'); title(sprintf('Test Load Forecast from day %s%s%s',datestr(date(n-nfnt+2)),' to day ',datestr(date(n-nf+1)))) grid on; legend('SARIMA 1','SARIMA 2','SARIMA 3','SARIMA 4','SARIMA 5','SARIMA 6','SARIMA 7','SARIMA 8','SARIMA 9','SARIMA 10','SARIMA 11','Real','Location','best'); print -dmeta; MAPErmin = min([MAPEarima1 MAPEarima2 MAPEarima3 MAPEarima4 MAPEarima5 MAPEarima6 MAPEarima7 MAPEarima8 MAPEarima9 MAPEarima10 MAPEarima11]); if MAPEarima1 == MAPErmin Yrtemp = YFAr1; Mdltemp = Mdl1; EstMdlfor = EstMdl; else if MAPEarima2 == MAPErmin Yrtemp = YFAr2; Mdltemp = Mdl2; EstMdlfor = EstMdl1; else if MAPEarima3 == MAPErmin Yrtemp = YFAr3; Mdltemp = Mdl3; EstMdlfor = EstMdl2; else if MAPEarima4 == MAPErmin Yrtemp = YFAr4; Mdltemp = Mdl4; EstMdlfor = EstMdl3; else if MAPEarima5 == MAPErmin Yrtemp = YFAr5; Mdltemp = Mdl5; EstMdlfor = EstMdl4; else if MAPEarima6 == MAPErmin Yrtemp = YFAr6; Mdltemp = Mdl6; EstMdlfor = EstMdl5; else if MAPEarima7 == MAPErmin Yrtemp = YFAr7; Mdltemp = Mdl7; EstMdlfor = EstMdl6; else if MAPEarima8 == MAPErmin Yrtemp = YFAr8; Mdltemp = Mdl8; EstMdlfor = EstMdl7; else if MAPEarima9 == MAPErmin Yrtemp = YFAr9; Mdltemp = Mdl9; EstMdlfor = EstMdl8; else if MAPEarima10 == MAPErmin Yrtemp = YFAr10; Mdltemp = Mdl10; EstMdlfor = EstMdl9; else if MAPEarima11 == MAPErmin Yrtemp = YFAr11; Mdltemp = Mdl11; EstMdlfor = EstMdl10; end end end end end end end end end end end %Chon mo hinh co sai so thap nhat ?e du bao YFArima = Yrtemp; Mdlfor = Mdltemp; %Du bao cho 30 tiep theo YFArfor = forecast(EstMdlfor,nf,'Y0',yP(1:n-nf)); xlswrite('Dataday01042018.xls',[YFArfor],'ketquaar'); ... phối 129 5.2.2 Dự báo phục vụ công tác vận hành thị trường điện cạnh tranh 133 5.2.3 Kết áp dụng Kỹ thuật dự báo vào vận hành Thị trường điện Bán buôn Việt Nam (phạm vi Tổng công ty Điện lực TP.HCM)... CHƯƠNG IV 115 CHƯƠNG V – DỰ BÁO TRONG VẬN HÀNH THỊ TRƯỜNG ĐIỆN CẠNH TRANH CỦA VIỆT NAM 117 5.1 TỔNG QUAN VỀ THỊ TRƯỜNG ĐIỆN VIỆT NAM HIỆN NAY 117 5.1.1 Thị trường phát điện cạnh tranh (giai đoạn... thị trường điện, cụ thể: 13 − Xây dựng cho ngành điện thêm cơng cụ dự báo mang tính ứng dụng cao giải vấn đề thực trạng thị trường điện Việt nam vấn đề nghiên cứu: sai số dự báo, kết lực dự báo

Ngày đăng: 19/07/2022, 05:47

Xem thêm: