(Luận văn thạc sĩ hcmute) giảm tổn thất công suất và nâng cao độ tin cậy lưới điện phân phối bằng máy phát phân tán

95 2 0
(Luận văn thạc sĩ hcmute) giảm tổn thất công suất và nâng cao độ tin cậy lưới điện phân phối bằng máy phát phân tán

Đ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 TRƯỜNG ĐẠI HỌC SƯ PHẠM KỸ THUẬT THÀNH PHỐ HỒ CHÍ MINH LUẬN VĂN THẠC SĨ NGUYỄN ĐỨC DUY GIẢM TỔN THẤT CÔNG SUẤT VÀ NÂNG CAO ĐỘ TIN CẬY LƯỚI ĐIỆN PHÂN PHỐI BẰNG MÁY PHÁT PHÂN TÁN NGÀNH: KỸ THUẬT ĐIỆN - 60520202 S K C0 4 Tp Hồ Chí Minh, tháng 10/2014 Luan van BỘ GIÁO DỤC VÀ ĐÀO TẠO TRƯỜNG ĐẠI HỌC SƯ PHẠM KỸ THUẬT THÀNH PHỐ HỒ CHÍ MINH LUẬN VĂN THẠC SĨ NGUYỄN ĐỨC DUY GIẢM TỔN THẤT CÔNG SUẤT VÀ NÂNG CAO ĐỘ TIN CẬY LƯỚI ĐIỆN PHÂN PHỐI BẰNG MÁY PHÁT PHÂN TÁN NGÀNH: KỸ THUẬT ĐIỆN MÃ SỐ: 60520202 Tp Hồ Chí Minh, tháng 10 năm 2014 Luan van BỘ GIÁO DỤC VÀ ĐÀO TẠO TRƯỜNG ĐẠI HỌC SƯ PHẠM KỸ THUẬT THÀNH PHỐ HỒ CHÍ MINH LUẬN VĂN THẠC SĨ NGUYỄN ĐỨC DUY GIẢM TỔN THẤT CÔNG SUẤT VÀ NÂNG CAO ĐỘ TIN CẬY LƯỚI ĐIỆN PHÂN PHỐI BẰNG MÁY PHÁT PHÂN TÁN NGÀNH: KỸ THUẬT ĐIỆN – 60520202 Hướng dẫn khoa học: TS TRƯƠNG VIỆT ANH Tp Hồ Chí Minh, tháng 10 năm 2014 Luan van LÝ LỊCH KHOA HỌC I LÝ LỊCH SƠ LƢỢC Họ tên: Nguyễn Đức Duy Giới tính: Nam; Ngày, tháng, năm sinh: 16-10-1980 Nơi sinh: Sóc Trăng; Quê quán: tỉnh Sóc Trăng Dân tôc: Kinh; Chổ riêng địa liên lạc: Công ty Điện lực Cà Mau, 288A đường Trần Hưng Đạo, khóm 8, Phường 5, TP Cà Mau, tỉnh Cà Mau; Điện thoại quan: 07803.700 720 Điện thoại nhà riêng: 0963 863 963 Fax: 07803 836 819 E-mail: duynguyen80@gmail.com; II QUÁ TRÌNH ĐÀO TẠO : Trung học chuyên nghiệp: Hệ đào tạo: Chính quy Thời gian đào tạo từ 10/1997 đến 05/2000; Nơi học: Trường Cao đẳng Điện lực TP.HCM, 554 đường Hà Huy Giáp, Phường Thạnh Lộc, Q12, TP HCM; Ngành học: Phát Dẫn Điện; Đại học: Hệ đào tạo: Khơng quy Thời gian đào tạo từ 10/2004 đến 10/2009; Nơi học: Trường Đại học Bách Khoa TP HCM, 268 Lý Thường Kiệt, Phường 14, Q10, TP HCM; Ngành học: Điện Công Nghiệp; Tên luận án tốt nghiệp: Thiết kế cung cấp điện cho Công ty Cổ phần chế biến Thủy sản Cà Mau; Ngày & nơi bảo vệ luận văn tốt nghiệp: 10/8/2009 trường Đại học Bách Khoa TP.HCM Người hướng dẫn: Th.s Dương Lan Hương III Q TRÌNH CƠNG TÁC CHUN MÔN KỂ TỪ KHI TỐT NGHIỆP ĐẠI HỌC: Thời gian Từ 2009-2012 Từ 2012-2014 Nơi cơng tác Phịng Quản lý Đầu tư – Công ty Điện lực Cà Mau Học cao học trường Đại Học Sư Phạm Kỹ Thuật TP HCM i Luan van Công việc đảm nhiệm CBKT Học viên LỜI CAM ĐOAN Tôi cam đoan cơng trình nghiên cứu tơi Các số liệu, kết nêu luận văn trung thực chưa cơng bố cơng trình TP Hồ Chí Minh, tháng năm 2014 (ký ghi rõ họ tên) Nguyễn Đức Duy ii Luan van LỜI CẢM ƠN Trải qua thời gian học tập nghiên cứu trường, tơi hồn thành đề tài tốt nghiệp Để có thành nhận nhiều hỗ trợ giúp đỡ tận tình từ thầy cơ, gia đình, bạn bè, đồng nghiệp Tơi xin chân thành cảm ơn Tiến sĩ Trương Việt Anh, người định hướng, tận tình bảo, hướng dẫn truyền đạt kiến thức quý báu cho suốt thời gian học tập thực luận văn Tôi xin chân thành cảm ơn PGS.TS Quyền Huy Ánh động viên giúp đỡ suốt thời gian học tập trường trình thực luận văn Xin chân thành cảm ơn quý thầy cô trường Đại Học Sư Phạm Kỹ Thuật TP Hồ Chí Minh truyền đạt lượng kiến thức bổ ích, đặc biệt quý thầy cô Khoa Điện – Điện Tử tạo điều kiện thuận lợi để chúng tơi hồn thành khóa học Tơi xin gởi lời cám ơn đến gia đình tơi tạo điều kiện tốt nhất, hỗ trợ tinh thần vật chất suốt trình học tập Cám ơn bạn bè, đồng nghiệp, đặc biệt anh Nguyễn Thanh Thuận giúp đỡ dành tình cảm quý báu cho suốt thời gian vừa qua Thành phố Hồ Chí Minh, tháng năm 2014 Học viên Nguyễn Đức Duy iii Luan van ABSTRACT In recent years, with the development of new energy sources, Distributed Generation (DG) has been more connected to the electrical distribution system.The DG connected to the distribution grid will help improve reliability and reduce power loss in the system DG is seen as a solution to solve the problem of load growth and the limited transmission capacity In the operation DG, the determination of the optimal location and size of DG brings many economic benefits as well as technical improvements DG can be installed in a strategic manner to support power systems for electrical network, reduce power losses and operational costs at peak load, improve voltage and load factor, delay raising issues supply system and improve power supply reliability The thesis on constructing the methods of location and DG capacity to minimize the operating costs of the distribution system Genetic algorithm is used to determine the location and capacity of DG function to minimize the total operating costs including the cost of purchasing power from the system and from the DG, the cost of effective power loss and the compensation cost for stopping power supply The proposed algorithm verified by software PSS/ADEPT is consistent with some previous research results and then it was tested on a 48 nodes system in of Ca Mau City to verify the effectiveness of the algorithm iv Luan van MỤC LỤC Trang Quyết định giao đề tài Xác nhận cán hướng dẫn Lý lịch khoa học…………………………………………………… … ………… i Lời cam đoan…………………….………………………………… …………… ii Lời cám ơn………………………………………………………… …………… iii Tóm tắt……… ………………………………… ……………… …………… iv Mục lục……… ………………………………… ……………… …………… v Danh sách chữ viết tắt… …………………… ……………… …………… vi Danh sách hình……… … …………………… ……………… …………vii Danh sách bảng……… …………………… ……………… ……… … viii CHƯƠNG GIỚI THIỆU ĐỀ TÀI 1 Đặt vấn đề Mục tiêu nhiệm vụ luận văn 3 Phạm vi nghiên cứu Phương pháp giải toán Điểm luận văn Giá trị thực tiễn luận văn Bố cục luận văn CHƯƠNG TỔNG QUAN VỀ LƯỚI PHÂN PHỐI VÀ DG 1.1 Tổng quan lưới điện phân phối 5 1.1.1 Đặc điểm lưới điện phân phối 1.1.2 Nhiệm vụ lưới điện phân phối 1.2 Tổng quan DG 1.3 Một số công nghệ DG 1.3.1 Pin mặt trời (photovoltaic –PV) 1.3.2 Pin nhiên liệu (Fuel cell –FC) 1.3.3 Máy phát turbine gió (Wind turbine – WT) v Luan van 1.3.4 Máy phát động đốt (Internal Combustion Engines – ICE) 1.3.5 Turbine khí (Combustion Turbine – CT) 1.3.6 Thủy điện nhỏ 10 1.3.7 Năng lượng mặt trời 11 1.4 Các nghiên cứu liên quan công bố 11 CHƯƠNG CÁC BÀI TOÀN LIÊN QUAN ĐẾN DG 14 2.1 Mục đích vận hành DG 14 2.2 Các tốn liên quan đến DG 14 2.2.1 Bài toán đánh giá độ giảm tổn hao đường dây 15 2.2.2 Bài toán nâng cao độ tin cậy 17 CHƯƠNG BÀI TOÁN TỐI ƯU VỊ TRÍ DG GIẢM TỔN THẤT CƠNG SUẤT VÀ NÂNG CAO ĐỘ TIN CẬY 23 3.1 Những ảnh hưởng tích hợp nguồn phân tán vào lưới phân phối 23 3.2 Mơ tả mục tiêu tốn 24 3.3 Mơ hình tốn học 24 3.3.1 Hàm mục tiêu mơ hình 24 3.3.2 Tổng chi phí cung cấp từ hệ thống phân phối 25 3.3.3 Tổng chi phí gián đoạn ước tính 26 3.3.4 Tổng chi phí tổn thất lượng 26 3.3.5 Hạn chế công suất DG 26 3.3.6 Hạn chế hoạt động DG 27 3.4 Giải thuật di truyền (genetic algorithm-GA) 27 3.4.1 Các đặc tính thuật tốn di truyền 27 3.4.2 Các q trình thuật toán di truyền 28 3.4.3 Các tham số thuật tốn di truyền (hay cịn gọi thơng số điều khiển thuật tốn) 31 3.5 Áp dụng giải thuật di truyền tính tốn lưới điện 20 nút tải có tải tập trung 33 3.5.1 Hàm mục tiêu toán 34 3.5.2 Áp dụng giải thuật di truyền 37 v Luan van 3.5.3 Kết tính tốn 42 3.5.4 Kết tính tốn phần mềm PSS Adept 47 3.6 Kết luận 50 CHƯƠNG TÍNH TỐN TUYẾN 477AX TP CÀ MAU 52 4.1 Giới thiệu lưới điện thành phố Cà Mau 52 4.2 Một số số liệu phát tuyến 53 4.2.1 Thông tin phát tuyến 53 4.2.2 Số liệu cố điển hình Điện lực Thành phố Cà Mau 54 4.3 Áp dụng tính tốn cho phát tuyến 477AX 54 4.3.1 Kết tính tốn giải thuật GA 55 4.3.2 Kết tính tốn phần mềm PSS Adept 59 4.4 Kết luận 63 CHƯƠNG KẾT LUẬN VÀ HƯỚNG PHÁT TRIỂN CHO ĐỀ TÀI 64 5.1 Những hạn chế đề xuất hướng phát triển cho đề tài 64 5.1.1 Những hạn chế 64 5.1.2 Đề xuất hướng phát triển đề tài 64 5.2 Kết luận 64 Tài liệu tham khảo 66 Phụ lục 69 v Luan van GVHD: TS Trương Việt Anh Tài liệu tham khảo Reliability Cost of Distribution Systems With Dispersed Generation”, IEEE Transactions on power systems, vol 28, no 3, august 2013 [22] S Chaitusaney, Student Member, IEEE, and A Yokoyama, Member, IEEE, “Reliability Analysis of Distribution System with Distributed Generation Considering Loss of Protection Coordination”, 9th International Conference on Probabilistic Methods Applied to Power Systems KTH, Stockholm, Sweden – June 11-15, 2006 [23] M Sedighizadeh, and A Rezazadeh, “Using Genetic Algorithm for Distributed Generation Allocation to Reduce Losses and Improve Voltage Profile” World Academy of Science, Engineering and Technology 37 2008 [24] M Ahmadigorji, A Abbaspour, A Rajabi-Ghahnavieh, M FotuhiFiruzabad “Optimal DG Placement in Distribution systems Using Cost/Worth Analysis”, World Academy of Science, Engineering and Technology 25 2009 [25] A A Chowdhury, Senior Member, IEEE, Sudhir Kumar Agarwal, Senior Member, IEEE, and Don O Koval, Fellow, IEEE “Reliability Modeling of Distributed Generation in Conventional Distribution Systems Planning and Analysis” IEEE Transactions On Industry Applications, vol 39, no 5, september/october 2003 HVTH: Nguyễn Đức Duy trang 68 Luan van Phụ lục GVHD: TS Trương Việt Anh PHỤ LỤC: CHƯƠNG TRÌNH GA function varargout = GA_optimal_DG(varargin) % GA_OPTIMAL_DG MATLAB code for GA_optimal_DG.fig % GA_OPTIMAL_DG, by itself, creates a new GA_OPTIMAL_DG or raises the existing % singleton* % % H = GA_OPTIMAL_DG returns the handle to a new GA_OPTIMAL_DG or the handle to % the existing singleton* % % GA_OPTIMAL_DG('CALLBACK',hObject,eventData,handles, ) calls the local % function named CALLBACK in GA_OPTIMAL_DG.M with the given input arguments % % GA_OPTIMAL_DG('Property','Value', ) creates a new GA_OPTIMAL_DG or raises the % existing singleton* Starting from the left, property value pairs are % applied to the GUI before GA_optimal_DG_OpeningFcn gets called An % unrecognized property name or invalid value makes property application % stop All inputs are passed to GA_optimal_DG_OpeningFcn via varargin % % *See GUI Options on GUIDE's Tools menu Choose "GUI allows only one % instance to run (singleton)" % % See also: GUIDE, GUIDATA, GUIHANDLES % Edit the above text to modify the response to help GA_optimal_DG % Last Modified by GUIDE v2.5 01-Aug-2014 19:44:10 % Begin initialization code - DO NOT EDIT gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, 'gui_Singleton', gui_Singleton, 'gui_OpeningFcn', @GA_optimal_DG_OpeningFcn, 'gui_OutputFcn', @GA_optimal_DG_OutputFcn, 'gui_LayoutFcn', [] , 'gui_Callback', []); if nargin && ischar(varargin{1}) gui_State.gui_Callback = str2func(varargin{1}); end if nargout [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:}); else gui_mainfcn(gui_State, varargin{:}); end HVTH: Nguyễn Đức Duy trang 69 Luan van Phụ lục GVHD: TS Trương Việt Anh % End initialization code - DO NOT EDIT % - Executes just before GA_optimal_DG is made visible function GA_optimal_DG_OpeningFcn(hObject, eventdata, handles, varargin) % This function has no output args, see OutputFcn % hObject handle to figure % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % varargin command line arguments to GA_optimal_DG (see VARARGIN) % Choose default command line output for GA_optimal_DG handles.output = hObject; % Update handles structure guidata(hObject, handles); % UIWAIT makes GA_optimal_DG wait for user response (see UIRESUME) % uiwait(handles.figure1); % - Outputs from this function are returned to the command line function varargout = GA_optimal_DG_OutputFcn(hObject, eventdata, handles) % varargout cell array for returning output args (see VARARGOUT); % hObject handle to figure % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Get default command line output from handles structure varargout{1} = handles.output; function edit_CONGSUAT_Callback(hObject, eventdata, handles) % hObject handle to edit_CONGSUAT (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of edit_CONGSUAT as text % str2double(get(hObject,'String')) returns contents of edit_CONGSUAT as a double % - Executes during object creation, after setting all properties function edit_CONGSUAT_CreateFcn(hObject, eventdata, handles) % hObject handle to edit_CONGSUAT (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows % See ISPC and COMPUTER if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function edit_NUT_Callback(hObject, eventdata, handles) % hObject handle to edit_NUT (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of edit_NUT as text % str2double(get(hObject,'String')) returns contents of edit_NUT as a double % - Executes during object creation, after setting all properties function edit_NUT_CreateFcn(hObject, eventdata, handles) % hObject handle to edit_NUT (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called HVTH: Nguyễn Đức Duy trang 70 Luan van Phụ lục GVHD: TS Trương Việt Anh % Hint: edit controls usually have a white background on Windows % See ISPC and COMPUTER if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function edit_CHIPHITOIUU_Callback(hObject, eventdata, handles) % hObject handle to edit_CHIPHITOIUU (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of edit_CHIPHITOIUU as text % str2double(get(hObject,'String')) returns contents of edit_CHIPHITOIUU as a double % - Executes during object creation, after setting all properties function edit_CHIPHITOIUU_CreateFcn(hObject, eventdata, handles) % hObject handle to edit_CHIPHITOIUU (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows % See ISPC and COMPUTER if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function edit_ITERATION_Callback(hObject, eventdata, handles) % hObject handle to edit_ITERATION (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of edit_ITERATION as text % str2double(get(hObject,'String')) returns contents of edit_ITERATION as a double % - Executes during object creation, after setting all properties function edit_ITERATION_CreateFcn(hObject, eventdata, handles) % hObject handle to edit_ITERATION (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows % See ISPC and COMPUTER if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function edit_POPSIZE_Callback(hObject, eventdata, handles) % hObject handle to edit_POPSIZE (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of edit_POPSIZE as text % str2double(get(hObject,'String')) returns contents of edit_POPSIZE as a double % - Executes during object creation, after setting all properties function edit_POPSIZE_CreateFcn(hObject, eventdata, handles) % hObject handle to edit_POPSIZE (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called HVTH: Nguyễn Đức Duy trang 71 Luan van Phụ lục GVHD: TS Trương Việt Anh % Hint: edit controls usually have a white background on Windows % See ISPC and COMPUTER if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function edit_MUTRATE_Callback(hObject, eventdata, handles) % hObject handle to edit_MUTRATE (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of edit_MUTRATE as text % str2double(get(hObject,'String')) returns contents of edit_MUTRATE as a double % - Executes during object creation, after setting all properties function edit_MUTRATE_CreateFcn(hObject, eventdata, handles) % hObject handle to edit_MUTRATE (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows % See ISPC and COMPUTER if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function edit_KEPT_Callback(hObject, eventdata, handles) % hObject handle to edit_KEPT (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of edit_KEPT as text % str2double(get(hObject,'String')) returns contents of edit_KEPT as a double % - Executes during object creation, after setting all properties function edit_KEPT_CreateFcn(hObject, eventdata, handles) % hObject handle to edit_KEPT (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows % See ISPC and COMPUTER if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function edit_DONGIAHETHONG_Callback(hObject, eventdata, handles) % hObject handle to edit_DONGIAHETHONG (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of edit_DONGIAHETHONG as text % str2double(get(hObject,'String')) returns contents of edit_DONGIAHETHONG as a double % - Executes during object creation, after setting all properties function edit_DONGIAHETHONG_CreateFcn(hObject, eventdata, handles) % hObject handle to edit_DONGIAHETHONG (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB HVTH: Nguyễn Đức Duy trang 72 Luan van Phụ lục GVHD: TS Trương Việt Anh % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows % See ISPC and COMPUTER if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function edit_DONGIADG_Callback(hObject, eventdata, handles) % hObject handle to edit_DONGIADG (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of edit_DONGIADG as text % str2double(get(hObject,'String')) returns contents of edit_DONGIADG as a double % - Executes during object creation, after setting all properties function edit_DONGIADG_CreateFcn(hObject, eventdata, handles) % hObject handle to edit_DONGIADG (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows % See ISPC and COMPUTER if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function edit_DONGIABOITHUONG_Callback(hObject, eventdata, handles) % hObject handle to edit_DONGIABOITHUONG (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of edit_DONGIABOITHUONG as text % str2double(get(hObject,'String')) returns contents of edit_DONGIABOITHUONG as a double % - Executes during object creation, after setting all properties function edit_DONGIABOITHUONG_CreateFcn(hObject, eventdata, handles) % hObject handle to edit_DONGIABOITHUONG (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows % See ISPC and COMPUTER if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end % - Executes on button press in pushbutton_START function pushbutton_START_Callback(hObject, eventdata, handles) % hObject handle to pushbutton_START (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) dg(handles); % - Executes on button press in pushbutton_QUIT function pushbutton_QUIT_Callback(hObject, eventdata, handles) HVTH: Nguyễn Đức Duy trang 73 Luan van Phụ lục GVHD: TS Trương Việt Anh % hObject handle to pushbutton_QUIT (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) closereq; % - Executes on button press in pushbutton_RESET function pushbutton_RESET_Callback(hObject, eventdata, handles) % hObject handle to pushbutton_RESET (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) set(handles.uitable_SOSANH,'data',zeros(4,7)); set(handles.edit_NUT,'string','Nut'); set(handles.edit_CONGSUAT,'string','Cong suat'); set(handles.edit_CHIPHITOIUU,'string','Vnd'); function edit_SETQMAXDG_Callback(hObject, eventdata, handles) % hObject handle to edit_SETQMAXDG (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of edit_SETQMAXDG as text % str2double(get(hObject,'String')) returns contents of edit_SETQMAXDG as a double % - Executes during object creation, after setting all properties function edit_SETQMAXDG_CreateFcn(hObject, eventdata, handles) % hObject handle to edit_SETQMAXDG (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows % See ISPC and COMPUTER if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function edit_SETQMINDG_Callback(hObject, eventdata, handles) % hObject handle to edit_SETQMINDG (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of edit_SETQMINDG as text % str2double(get(hObject,'String')) returns contents of edit_SETQMINDG as a double % - Executes during object creation, after setting all properties function edit_SETQMINDG_CreateFcn(hObject, eventdata, handles) % hObject handle to edit_SETQMINDG (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows % See ISPC and COMPUTER if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function edit_SETPDG_Callback(hObject, eventdata, handles) % hObject handle to edit_SETPDG (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of edit_SETPDG as text % str2double(get(hObject,'String')) returns contents of edit_SETPDG as a double HVTH: Nguyễn Đức Duy trang 74 Luan van Phụ lục GVHD: TS Trương Việt Anh % - Executes during object creation, after setting all properties function edit_SETPDG_CreateFcn(hObject, eventdata, handles) % hObject handle to edit_SETPDG (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows % See ISPC and COMPUTER if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end -%Genetic Algorithm % function [bestcost,bestsolution,globalbestcost,bestC1,bestC2,bestC3,bestPloss,best Qdg,bestPsystem]=CGA(npar,varhi, varlo, popsize,maxit,mutrate,selection,busdata1,linedata1,thoigiancattai,Csys,Cd g,Cfail,rateQmin,rateQmax) % _ % I Setup the GA ff='testfunction'; % objective function % II Stopping criteria mincost=-9999999; % minimum cost % _ Nt=npar; % continuous parameter GA Nt=#variables keep=floor(selection*popsize); % #population (lam tron so nguyen nho nhat) % members that survive nmut = ceil((popsize-1)*Nt*mutrate); % total number of % mutations (lam tron ve so nguyen lon hon) M=ceil((popsize-keep)/2); % number of matings so luong sinh san %luu y: keep+nmut+M=pop size % _ % Create the initial population iga=0; % generation counter initialized FieldD=[varlo; varhi]; Nvar = size(FieldD,2); aux = rand(popsize,npar); m=[-1 1]*FieldD; ublb=ones(popsize,1)*m; lb=ones(popsize,1)*FieldD(1,:); par=ublb.*aux+lb; [cost,Qdg,Plo,Psy,C1,C2,C3]=feval(ff,par,busdata1,linedata1,thoigiancatta i,Csys,Cdg,Cfail,rateQmin,rateQmax); % calculates population cost [cost,ind]=sort(cost); % cost in element sap xep theo thu tu tang dan, ind tra ve vi tri cua bien par=par(ind,:); % sort continuous sap xep lai cac bien minc(1)=min(cost); % minc contains of meanc(1)=mean(cost); % meanc contains mean of population tra ve gia tri trung binh % _ % Iterate through generations HVTH: Nguyễn Đức Duy trang 75 Luan van Phụ lục GVHD: TS Trương Việt Anh while iga

Ngày đăng: 02/02/2023, 09:42

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

Tài liệu liên quan