Ph−ơng pháp Taguchi 61

Một phần của tài liệu giám sát tự động quá trình gia công (Trang 66)

(28)

Phụ lục Ch−ơng trình 1: Dùng chức năng xấp xỉ hμm (Fit Function) của ANN để dự báo độ nhám bề mặt theo dữ liệu chế độ cắt (v, f, d), lực cắt vμ gia tốc rung động. Kết quả đ−ợc so sánh với hμm xấp xỉ đa thức (Polyfit).

%============================

% Fit Function from Exel data stored in "data" % Use of Radial Basis Network

%============================ clc;clear;

data=xlsread('Turning','Data','B3:F28');

I=data(:,1:4)';T=data(:,5)';

test=xlsread('Turning','Data','B23:F28');

Ti=test(:,1:4)';To=test(:,5)'; %============================ %Use Generalized Regression NN spread=0.5;

net=newgrnn(I,T,spread);% Generalized Regression NN O1=net(I);

x=size(data,1); subplot(2,1,1);

plot(1:x,T,'mo',1:x,O1,'k-x',1:x,T-O1,'r');grid; %Compare T&O1

title('GRNN Function Approximation');

xlabel('Input');ylabel('Target, Output, Error');

legend('Target','Ouput','Error');

out1=O1';

[SUCCESS,MESSAGE]=xlswrite('Turning',out1,'Data','G3')

% Test

O2=net(Ti);out2=O2';

[SUCCESS,MESSAGE]=xlswrite('Turning',out2,'Data','G23')

%===================

%Use POLYFIT & POPYVAL Functions e=ones(length(data),1); y=data(:,5); %[y,k]=sort(y); [p,S]=polyfit(1:x,y',2); newfit=polyval(p,1:x,S); subplot(2,1,2);

plot(1:x,y,'mo',1:x,newfit,'b',1:x,(newfit'-y),'r');

title('Polynominal Function Approximation');

xlabel('Input');ylabel('Polyfit');

legend('Data','Polyfit','Error');grid

Ch−ơng trình 2: Cực đại hóa hμm f(x) = 1+sin(ax) với GA Định nghĩa hμm mục tiêu

% ==== Fitness Function

function y=ga_fitness2(x) x=x*180/pi; % Radian to Degree

Ch−ơng trình chính

% ====== Main GA Program: ga_main1.m (adsbygoogle = window.adsbygoogle || []).push({});

% Fitness Function = 10-(1+sin(ax)) -> Max clc;

nvars=1; % Number of Variables lb=0; % Lower Boundary ub=31; % Uprer Boundary options = gaoptimset;

options = gaoptimset(options,'PlotFcns',{@gaplotbestf

@gaplotbestindiv });

[x,fval] =ga(@ga_fitness2,nvars,[],[],[],[],lb,ub,[],options)

Ch−ơng trình 3: Tối −u hóa chế độ cắt, sử dụng mô hình tuyến tính (26), (27). Định nghĩa hμm mục tiêu % ==== Fitness Function % ==== ga_fitness.m function y=ga_fitness4(x) y = -5*x(1)-3.5*x(2)+1.225; Ch−ơng trình chính

% Cutting Condition Optimizaton using GA % Program ga_main4.m clc nvars=2;lb=[1 0];ub=[1.6 1.7]; Aineq=[1.63 1.18;1 0.72]; bineq=[3.624;2.879]; Aeq=[3 1.5];beq=5.04;

% Start with the default options options = gaoptimset;

% Options setting

options = gaoptimset(options,'CrossoverFcn',

@crossoverscattered);

options = gaoptimset(options,'Display', 'off');

options = gaoptimset(options,'PlotFcns',{@gaplotbestf

@gaplotbestindiv}); [x,fval]

=ga(@ga_fitness4,nvars,Aineq,bineq,Aeq,beq,lb,ub,[],options); % Experimental Data

Cm=40;Cd=0.42; % Hang so ham muc tieu Cf=8.17; vf=1.63;sf=1.18; % Luc cat Cp=20; vp=1.0;sp=0.72; % Cong suat Cv=2744; m=-3;n=-1.5; % Tuoi ben % Calculation

x1=x(:,1);x2=x(:,2);

v=10^x1; s=10^x2/100; % Toc do cat, Luong chay dao F=Cf*v^vf*s^sf; P=Cp*v^vp*s^sp; % Luc & Cong suat T=Cv*v^m*s^n; % Tuoi ben

C1= Cm*v^(-1)*s^(-1); % Chi phi gia cong truc tiep C2= Cd*v^(-4)*s^(-2.5); % Chi phi dao

% Display of Optimal Results

fprintf(' =============================================\n')

fprintf(' TOI UU HOA CHE DO CAT NHO GENETIC ALGORITHM\n');

fprintf(' Toc do cat toi uu : v = %6.3f (m/ph)\n',v);

fprintf(' Luong an dao toi uu: s = %6.3f (mm/r)\n',s);

fprintf(' Chi phi gia cong : C = %6.3f (ng.vnd/mm^3)\n',C);

fprintf(' Luc cat : F = %6.3f (N)\n',F);

fprintf(' Cong suat cat : P = %6.3f (W)\n',P);

fprintf(' Tuoi ben dung cu : T = %6.3f (ph)\n',T);

Tμi liệu tham khảo

[1]. Đμo Văn Hiệp: Nghiên cứu xây dựng hệ thống tạo lập, quản lý tμi liệu thiết kế - công nghệ phục vụ sản xuất vμ phục hồi các chi tiết vũ khí trên cơ sở công nghệ nhóm, báo cáo tổng kết đề tμi cấp Tổng cục Kỹ thuật, 11-1999. (adsbygoogle = window.adsbygoogle || []).push({});

[2]. Đμo Văn Hiệp: Tối −u hóa chế độ cắt vật liệu nhẹ, có độ bền cao dùng trong kỹ thuật không quân vμ hải quân, báo cáo tổng kết đề tμi Học viện KTQS,

năm 1999.

[3]. Đμo Văn Hiệp: Nghiên cứu ứng dụng lý thuyết tập mờ vμo tự động hóa thiết kế quy trình công nghệ chế tạo chi tiết vũ khí, báo cáo tổng kết đề tμi Học viện

KTQS, năm 2006

[4]. Đμo Văn Hiệp: Nghiên cứu ứng dụng điều khiển thích nghi để nâng

cao hiệu quả gia công trên máy công cụ điều khiển số, báo cáo tổng kết đề tμi cấp

Bộ Quốc phòng, năm 2008.

[5]. Đμo Văn Hiệp, Phạm Vũ Dũng: Giám sát mòn của đá mμi có ứng dụng mạng nơ ron nhân tạo, Kỷ yếu hội nghị toμn quốc lần thứ 2 về điều khiển (VCCA-2013).

[6]. J. V. Abellan-Nebot, F. R. Subirón: A review of Machining Monitoring System based on Artificial Intelligence Process Models, Int. J. Adv.

Manuf. Technol. (2010) 47:237-257.

[7]. Sankha Deb, U.S. Dixit: Intelligent Machining: Computational

Methods and Optimization, in Machining Fundamentals and Recent Advances,

Springer, 2008.

[8]. A. Al-Habaibeh, N. Gindy: A new approach for systematic design of condition monitoring systems for milling processes, Journal of Materials

Processing Technology 107 (2000) 243-251.

[9]. Boris Muravin: Acoustic Emission Method - Hystory, Fundamentals,

Applications, www.muravin.com.

[10]. R. Teti, et al: Advanced Monitoring of Machine Operations, CIRP

Annals - Manufacturing Technology 59 (2010) 717-739.

[11]. J. Balic: Neural Network Based CNC Control for Machine Tools, University of Maribor, Laboratory for Intelligent Manufacturing, Slovenia.

[12]. J. Balic: Intelligent Computer Numerical Control Unit for Machine

Tools, University of Maribor, Laboratory for Intelligent Manufacturing, Slovenia.

[14]. S. Y. Nof: Springer Handbook of Automation, Springer, 2009.

[15]. D. Dornfeld, Dae-Eun Lee: Precision Manufacturing, Springer, 2008. [16]. Yoram Koren: Control of Machine Tools, Journal of Manufacturing

Science and Engineering, Vol. 119 (Nov. 1997) 749-755.

[17]. Y. J. CAO, Q. H. WU: Teaching Genetic Algorithm Using Matlab,

Int. J. Elect. Enging. Educ., Vol. 36, pp. 139–153. Manchester U.P., 1999.

[18]. S. N. Sivanandam, S. N. Deepa: Introduction to Genetic Algorithm, Springer, 2008.

[19]. Roland S. Burns: Advanced Control Engineering, Butterworth - Heinemann, 2001.

(adsbygoogle = window.adsbygoogle || []).push({});

Một phần của tài liệu giám sát tự động quá trình gia công (Trang 66)