Order ID | 0173061382 |
Subject | Data Engineering (Machine Learning) |
Topic | Machine-Learning/Genetic Algorithm Report Preparation |
Type | Term paper |
Writer level | University |
Style | APA |
Sources / references | 7 |
Language | English(U.S.) |
Description / paper instructions
The core of the project is completed (MATLAP coding), introduction with some questions need to be answered for Report submission as instructed in the attachment (all material that need for answering the questions is exists in the attachment). Please refer to the attached (Course-1 Project Student Template) from page 4 to 9 for clear description of the deliverables… The paper is; A Machine-Learning/Genetic Algorithm (using MATLAP) that optimizes the combinations of matrix and particles to deliver a desired overall macro) response while controlling the (micro) load distributions and the internal heating of the material..
Introduction; Material learning algorithm is valuable technique used in many application to tailor certain inputs in a way to deliver and achieve required targets. Recently, it plays anintegral role in many applications especially whichare related to artificial intelligent (AI). Robotic controller, for instance,….
In this project, MLA is used aiming to design material with desired behaviors. This will be achieved by combining moldable matrix and particles having properties of some mechanical, electrical conductivity, and thermal conductivity as needed. MATLAP is used as a tool to analysis and simulate the model along with evaluation. The simulation includes generating population, computing the function along with the evaluating the performance, ranking the best outcomes, mating to generate children, repeating the same process again and again until the best resultswith least cost reached. Moreover, the analysis includes further optimization to the martial by determiningany microscopic responsesin the system beside the macroscopic that analyzed earlier. In the electromagnetic, for instance, these micro responses can generate hot spots which lead into stresses and eventually failure, thus it is important to be examined.
Objectives; ———————– write something
Procedures: brief explanation, key equation, flow-charts, difficulties(codes for the mating since you wrote about it), assumptions To develop a material with required behaviors, an effective properties for the mixture have been estimated. The three main interest properties of particle-functionalized dielectric consist from the overall electrical conductivity, mechanical stiffness, and thermal conductivity. The project implemented in five main parts; first part is “Define” which include setting the given parameters as per requirement, to ease coding… Secondly, “Populate” part has a table generatingrandom values/creating population for the properties mixture. This occursby selecting numbers within specified ranges“maximum and minimum”ofthe two selected materials in each required property; electrical conductivity, thermal conductivity and mechanical shear and bulk modules, besides having volume fraction (V2) that denote the maximum and minimum doping in the mixture for each material (ex; 5 to 15% doping to get required property with least cost). This table consist of 9 columns that calculate theElectrical_min, Electrical_max, Thermal_min, Thermal_max, Mechanical_Shear_min, Mechanical_Shear_max, Mechanical_Bulk_min, Mechanical_Bulk_maxbased on Hashin and Shtrikmanformulas, and V2_voulme fraction. “Evaluate”is the second part toassessthe table population and the result will be represented in the same table in column 10. Each row will be evaluated/calculated to get score/performance for each combination of the properties based onbased on Hashin and Shtrikmanformulas. Thirdly is the “sorting” part to rank based on the performance. The cost will be arranged from lowest cost that represent the better performance of the combination to highest score of the cost which represent the bad mixture of the combination. Then it comes to the mating part to generate two children from the first two parents (best costs), and the scores will be represented in third and fourth rows, and remaining scores will be overwritten by new populations starting from row five in the second generation. The index in this part generated for the purpose to have proper arrangements/avoid overwrite of the parents, doing mating/generate children, sorting to best costs and repeating the process with populate starting from five row and so on for upcoming generations/rounds “S” (populate from index to S; evaluate from parent+1 or from zero “will not be effected”, evaluate the two children, evaluate the new population, sorting “new table”, repeat the process for the second generation, the first two is the new parents, new two children, populate, evaluate, sorting.…..“S”), the best combination will be remaining in top of the table/least cost. This mixture with its features of all properties; mechanical, electrical, and thermal is the winner with least cost that a mixture can get, and it might be process further with fabrication or other. (Index = Parents+1 for each child) (Index+1 for the next populate)
(Key equations) (Assumptions/Considerations) will write better in the discussion section below
σ=Ee J= σ∗ E q = – K .dT/dx
{1/((1−v2/σ1)+ (v2/σ2))} =σ∗,-≤σ∗≤σ∗,+ = {((1−v2)σ1)+ (v2σ2))} {1/((1−v2/E1)+ (v2/E2))} =E∗,-≤E ∗≤ E ∗,+ = {((1−v2)E1)+ (v2E2))} {1/((1−v2/K1)+ (v2/K2))} =K ∗,-≤K∗≤ K ∗,+ = {((1−v2)K1)+ (v2K2))}
{ E1 +(v2/((1/( E2−E1)+ (1−v2)/3 E1))} = E∗,- ≤E∗≤ E∗,+ = { E2 +(1-v2/((1/( E1−E2)+ (v2/3 E2))}
A uniform distribution throughout the materials and responses(isotropic) have been estimated thus Hashin and Shtrikman bounds have been considered for the upper and lower bounds, in order to lead to better results.The following equation utilizesfor the estimates and thetrue effective property lies in between the upper and lower bounds; {σ1 +(v2/((1/(σ2−σ1)+ (1−v2)/3σ1))} =σ∗,- ≤σ∗≤σ∗,+ = {σ1+(1-v2/((1/(σ1−σ2)+ (v2/3σ2))} { E1 +(v2/((1/( E2−E1)+ (1−v2)/3 E1))} = E∗,- ≤E∗≤ E∗,+ = { E2 +(1-v2/((1/( E1−E2)+ (v2/3 E2))}
E
Write Equations……………. Where the v2 corresponds to the more conductive. Similarly for Hashin and Shtrikman bounds related to mechanical and thermal v2 refers to the stiffer, more conductive respectively. For example, if Gold and Aluminum is the mixture, then for HS mechanical v2 = vAL, and for HS thermal v2=vGold. If the system is anisotropic, Hashin and Shtrikman bounds will not be applicableas the material is not symmetry. Consequently all parameters need to be considered for macroscopic response and it might reach 93 in this case instead of 15 in isotropic, then calculated by matrices and liner algebra. Likewise, the microscopic in each component required to be calculated by matrix‘s determinant and eigenvalue to estimate if the response is high to neglect and vice versa. Microscopic “called also penalty” is going to do strange thing in smaller scale thus need to be neglect or consider. These micro is binary will be turn on/off based on positivity or negativity. Microscopic is process to optimize the material properties.
Equation for micro (optimization) Reached.. 3.4) page 22 σc,* = φσc∗,+ + (1 −φ)σc∗,−
in each components (properties) macro/micro)
Logic statement should be entered
The design of the codes will be for all parameters and based on the required you will be having/pick the weights (zero) so For ITfibrotic cable, you will pick thermal and you give weight Battery everything, or dominant thermal and mechanical
(Flow chart) part of the procedure Draw the process in flowchart (already in the notebook/slides)
(Findings; figures, plots, tables with titles, labels, etc…) Results from the codes Observations and discussion; some interpretation and insight into the results Write about isoto, HS bounds… Appendix: the messy stuff like your code or raw data %% Define
global elec_want elec_w1 elec_w2 elec_w3 elec_tol1 elec_tol2; global ther_want ther_w1 ther_w2 ther_w3 ther_tol1 ther_tol2; global mech_bulk_want mech_shear_want mech_w1 mech_w2 mech_bulk_w3 mech_bulk_w4 mech_shear_w5 mech_shear_w6 mech_tol_B1 mech_tol_B2 mech_tol_mu1 mech_tol_mu2 global HSp_ratio;
%Selection for the number of population S=100;
%Desired Properties elec_want = 2; ther_want = 35; mech_bulk_want = 111; mech_shear_want = 47;
%Two materails selected for the mixture with the blow given values for %the maximum and minimum ranges:
%Material 1: elec1_min = (1); % *10^7 S/m elec1_max = (1); % *10^7 S/m ther1_min = (4.3); % W/m-k ther1_max = (4.3); % W/m-k mech1_bulk_min = (80); % GPa mech1_bulk_max = (80); % GPa mech1_shear_min = (30); % GPa mech1_shear_max = (30); % GPa
%Material 2: elec2_min = (1); elec2_max = (1*10); ther2_min = (4.3); ther2_max = (4.3*10); mech2_bulk_min = (80); mech2_bulk_max = (80*10); mech2_shear_min = (30); mech2_shear_max = (30*10);
%Volume Fraction for the mixture v2_min = 0; v2_max = 2/3;
%Elec_Weights & Tolarance: elec_w1 = 1; elec_w2 = 0.5; elec_w3 = 0.5; elec_tol1 = 0.5; elec_tol2 = 0.5;
%Ther_Weights & Tolarance: ther_w1 = 1; ther_w2 = 0.5; ther_w3 = 0.5; ther_tol1 = 0.5; ther_tol2 = 0.5;
%Mech_Weights & Tolarance: mech_w1 = 1; mech_w2 = 1; mech_bulk_w3 = 0.5; mech_bulk_w4 = 0.5; mech_shear_w5 = 0.5; mech_shear_w6 = 0.5; mech_tol_B1 = 0.5; mech_tol_B2 = 0.5; mech_tol_mu1 = 0.5; mech_tol_mu2 = 0.5;
%Total Cost Weights: elec_w = 1/3; ther_w = 1/3; mech_w = 1/3;
%For mating/generate childern parents = 20; children = 2; generations = 1000;
HSp_ratio = 0.5;
%% Setp 1: Generate Population & Formulation for the Properties
%ploting ax = axes(); hold on; %set(ax,’xscale’,’log’) line1 = line(0, 2); %handle for line 1 line2 = line(0, 2); %handle for line 2 line2.Color = ‘r’; axis([0 generations 0 1]); axis(‘auto x’); title(‘Machine Learning For the Material Mixture’); xlabel(‘Number of Rounds’); ylabel(‘Cost/Performance’);
%Creating matrix to fill in for the loop A = zeros (S,9); B = zeros (S,1); index = 1;
%Main loop for the MLA for c = 1:generations
for i = index:S %***************************
r = rand(); A(i,1) = elec1_min*r + elec1_max*(1-r); r = rand(); A(i,2) = elec2_min*r + elec2_max*(1-r); r = rand(); A(i,3) = ther1_min*r + ther1_max*(1-r); r = rand(); A(i,4) = ther2_min*r + ther2_max*(1-r); r = rand(); A(i,5) = mech1_bulk_min*r + mech1_bulk_max*(1-r); r = rand(); A(i,6) = mech2_bulk_min*r + mech2_bulk_max*(1-r); r = rand(); A(i,7) = mech1_shear_min*r + mech1_shear_max*(1-r); r = rand(); A(i,8) = mech2_shear_min*r + mech2_shear_max*(1-r); r = rand(); A(i,9) = v2_min*r + v2_max*(1-r);
end
for i = index:S elec1 = A(i,1); elec2 = A(i,2); ther1 = A(i,3); ther2 = A(i,4); mech_bulk1 = A(i,5); mech_bulk2 = A(i,6); mech_shear1 = A(i,7); mech_shear2 = A(i,8); v2 = A(i,9);
B(i) = (elec_w*elec_cost(elec1,elec2,v2))+(ther_w*ther_cost(ther1,ther2,v2))+(mech_w*mech_cost(mech_bulk1,mech_bulk2,mech_shear1,mech_shear2,v2))
end
%sort [~,id]=sort(B); B = sort(B); A = A(id,:);
%mate index = parents+1;
for i = 1:2:parents-1 for j = 0:children-1 for p = 1:9 r = rand(); A(index,p) = A(i,p)*r + A(i+1,p)*(1-r); end
end index = index +1; end
%ploing ****** pause(0.001); line1.XData = [line1.XData c]; line1.YData = [line1.YData B(1)]; line2.XData = [line2.XData c]; line2.YData = [line2.YData mean(B)]; end
%% Step 2: Evaluation to Compute the Cost Function
%% Electrical Equation
%% function y = elec_cost(sigma1, sigma2, v2) global elec_want elec_w1 elec_w2 elec_w3 elec_tol1 elec_tol2; global HSp_ratio v1 = 1-v2;
if(sigma2 < sigma1) v1 = v2; v2 = 1-v1; tmp = sigma2; sigma2 = sigma1; sigma1 = tmp; end
f = HSp_ratio; w1 = elec_w1; w2 = elec_w2; w3 = elec_w3; tol1 = elec_tol1; tol2 = elec_tol2; want = elec_want;
HSmin_elec = sigma1+((v2)/((1/(sigma2-sigma1))+((1-v2)/(3*sigma1)))); % equation 2.9 HSmax_elec = sigma2+((1-v2)/((1/(sigma1-sigma2))+((v2)/(3*sigma2)))); % equation 2.9
got = HSmax_elec*f + HSmin_elec*(1-f); sigma_min = HSmax_elec; sigma_max = HSmin_elec;
CE1CJ1 = ((sigma1)/(f*sigma_max+(1-f)*sigma_min))*((1/(1-v2))*((sigma2-(f*sigma_max+(1-f)*sigma_min))/(sigma2-sigma1)))^2; %equation 3.21 CE2CJ2 = ((sigma2)/(f*sigma_max+(1-f)*sigma_min))*((1/(v2))*(((f*sigma_max+(1-f)*sigma_min)-sigma1)/(sigma2-sigma1)))^2; %
cons1 = (CE1CJ1-tol1)/tol1; cons2 = (CE2CJ2-tol2)/tol2;
if (cons1 <= tol1) w2 = 0; end
if (cons2 <= tol2) w3 = 0; end
y = w1*(abs((want-got)/want))+w2*abs(cons1)+w3*abs(cons2);
end %———————————————————————————————————-
%% Thermal Equation
function y = ther_cost(K1, K2, v2) global ther_want ther_w1 ther_w2 ther_w3 ther_tol1 ther_tol2; global HSp_ratio; v1 = 1-v2;
if (K2 < K1) v1 = v2; v2 = 1-v1; tmp = K2; K2 = K1; K1 = tmp; end
f= HSp_ratio; w1 = ther_w1; w2 = ther_w2; w3 = ther_w3; tol1 = ther_tol1; tol2 = ther_tol2; want = ther_want;
HSmin_ther = K1+(v2)/((1/(K2-K1))+((1-v2)/(3*K1))); %equation 3.25 HSmax_ther = K2+(1-v2)/((1/(K1-K2))+((v2)/(3*K2))); %equation 3.25
got = HSmax_ther*f + HSmin_ther*(1-f); K_got = got; %om = HSmax_ther; ************ %op = HSmin_ther; *********
C02 = (1/(v2))*(K2-K1)^-1*(K_got-K1); %equation under 3.5 C01 = (1-v2*C02)/(1-v2); % equation under 3.5 Cq2 = K2*C02*(K_got)^-1; % equation under 3.5 Cq1 = (1-v2*Cq2)/(1-v2); % equation under 3.5
cons1 = (Cq1-tol1)/tol1; cons2 = (Cq2-tol2)/tol2;
if (cons1 <= tol1) w2 = 0; end
if (cons2 <= tol2) w3 = 0; end
y = w1*abs(want-got)/want+ w2*abs(cons1) + w3*abs(cons2-tol2);
end
%———————————————————————————————————-
%% Mechanical Equation
function y = mech_cost (B1, B2, mu1, mu2, v2) global mech_bulk_want mech_shear_want mech_w1 mech_w2 mech_bulk_w3 mech_bulk_w4 mech_shear_w5 mech_shear_w6 mech_tol_B1 mech_tol_B2 mech_tol_mu1 mech_tol_mu2 global HSp_ratio
if (B2 < B1) B2b = B2; mu2b = mu2; B2 = B1; mu2 = mu1; B1 = B2b; mu1 = mu2b; v1 = v2; v2 = 1-v1; end
f= HSp_ratio; v1 = 1 – v2; w1 = mech_w1; w2 = mech_w2; w3 = mech_bulk_w3; w4 = mech_bulk_w4; w5 = mech_shear_w5; w6 = mech_shear_w6; tol1 = mech_tol_B2; tol2 = mech_tol_mu2; tol3 = mech_tol_B1; tol4 = mech_tol_mu1; want1 = mech_bulk_want; want2 = mech_shear_want;
HSmin_bulk = B1+((v2)/((1/(B2-B1))+((3*(1-v2))/(3*B1+4*mu1)))); % equation 10.28 HSmax_bulk = B2+(1-v2)/((1/(B1-B2))+((3*v2)/(3*B2+4*mu2))); %equstion 10.28 HSmin_shear = mu1+((v2)/(1/(mu2-mu1)+(6*(1-v2)*(B1+2*mu1))/(5*mu1*(3*B1+4*mu1)))); %equation 10.35 HSmax_shear = mu2+(1-v2)/((1/(mu1-mu2))+(6*v2*(B2+2*mu2))/(5*mu2*(3*B2+4*mu2)));%equation 10.35
B_g = HSmax_bulk*f + HSmin_bulk*(1-f); mu_g = HSmax_shear*f + HSmin_shear*(1-f);
got1 = B_g; got2 = mu_g;
%mechanical concentration for Bulk & Shear CB2 = (1/(v2))*((B2)/(B_g))*((B_g-B1)/(B2-B1)); % equation 4.4 CMU2 = (1/(v2))*((mu2)/(mu_g))*((mu_g-mu1)/(mu2-mu1)); % equation 4.4 CB1 = (1/(v1))*(1-v2*CB2); % equation 4.6 CMU1 = (1/(v1))*(1-v2*CMU2); % equation 4.6
cons1 = CB2; cons2 = CMU2; cons3 = CB1; cons4 = CMU1;
if (cons1 <= tol1) w3 = 0; end if (cons2 <= tol2) w4 = 0; end if (cons3 <= tol3) w5 = 0; end if (cons4 <= tol4) w6 = 0; end
y = w1*abs((want1-got1)/want1)+w2*abs((want2-got2)/want2)+w3*abs((cons1-tol1)/cons1)+w4*abs((cons2-tol2)/cons2)+w5*abs((cons3-tol3)/cons3)+w6*abs((cons4-tol4)/cons4); end
%% Step 3: Ranking from Lowest Cost to Highest Cost
% [~,id]=sort(B); % B = sort(B); % A = A(id,:);
%ploing ****** %pause(0.0005); %line1.XData = [line1.XData c]; %line1.YData = [line1.YData B(1)]; %line2.XData = [line2.XData c]; %line2.YData = [line2.YData mean(B)];
%% Step 4: Mating to generate children
%index = parents+1;
%for i = 1:2:parents-1 % for j = 0:children-1 % for p = 1:9 % r = rand(); % A(index,p) = A(i,p)*r + A(i+1,p)*(1-r);
%end
%end % index = index +1; %end %end
%ploting %ax = axes(); %hold on; %set(ax,’xscale’,’log’) %line1 = line(0, 2); %handle for line 1 %line2 = line(0, 2); %handle for line 2 %line2.Color = ‘r’; %axis([0 rounds 0 1]); %axis(‘auto x’); %title(‘Machine Learning For the Material Mixture’); %xlabel(‘Number of Rounds’); %ylabel(‘Cost/Performance’);
|