Lecture 8: A Design Example An Electromagnet Objective Use a genetic algorithm to solve an engineering design example 2 The Problem Design an electromagnet to lift a mass. i rb vb Battery f M 3 Specifications Mass 10 kG 10 cm by 10 cm area Magnetic material should not overlap mass Must lift from distance of 5 mm Gravity is on surface of Earth (G=9.8 m/s2) Battery vb = 12 V rb = 0.5 Ω Current should not exceed 6 A 4 Specifications (Continued) Winding Should not exceed packing factor of 0.7 May use Aluminum (Al) or Copper (Cu) Aluminum Density (ρw) = 2701 Kg/m3 Conductivity (σw) = 35.4 1 1/(μmΩ) Current Density (jmax) = 6.14 MA/m2 Copper Density (ρw) = 8900 Kg/m3 Conductivity (σw) = 58.0 1/(μmΩ) Current Density (jmax) = 7.62 MA/m2 5 Specifications (Continued) Magnetic Material Microsil Bsat = 1.4 T, μ = 15000 μ0 , ρm = 7064 Kg/m3 Superperm Bsat = 0.7 T, μ = 6000 μ0 , ρm = 8069 Kg/m3 Superperm 80 49 Bsat = 1.2 T, μ = 3500 μ0 , ρm = 7892 Kg/m3 6 Specifications (Continued Again) Size (Mass) Total mass of electromagnet should be as small as possible 7 Electromagnet Dimensions ww wb Depth into page = d dw ds g wi we ws we 8 Design Variables Wire Material Type mw 1=Cu, 2=A) Conductor Cross Section ac Number of Turns N Magnetic Material Material Type mm 1=Microsil, 2=Superperm 80, 3=Superperm 49) 9 Design Variables (Continued) Core Slot width ws Wire window width ww Slot depth ds Wire window depth dw End width we I-core width wi Back width wb Depth d 10 Parameter Vector ⎡ mw ⎤ ⎢a ⎥ ⎢ w⎥ ⎢N ⎥ ⎢ ⎥ ⎢ mm ⎥ ⎢ ws ⎥ ⎢ ⎥ ⎢rww ⎥ θ =⎢ ⎥ d ⎢ s⎥ ⎢ rdw ⎥ ⎢ ⎥ ⎢ we ⎥ ⎢ rwi ⎥ ⎢ ⎥ ⎢ rwb ⎥ ⎢ d ⎥ ⎣ ⎦ ww = rww ws d w = rdw d s wi = rwi we wb = rwb we 11 Data Vector ⎡ M ⎤ ⎢ G ⎥ ⎥ ⎢ ⎢ g ⎥ ⎥ ⎢ ρ ⎢ w ⎥ ⎢ ρm ⎥ ⎥ ⎢ Ψ = ⎢ σw ⎥ ⎥ ⎢ B ⎢ sat ⎥ ⎢ imax ⎥ ⎥ ⎢ J ⎢ max ⎥ ⎢ l max ⎥ ⎥ ⎢ ⎢⎣ p f ,max ⎥⎦ 12 Electrical Analysis Goal ⎡pf ⎢ j ⎢ ⎢⎣ i ⎤ ⎥ = F (θ, Ψ) elec ⎥ ⎥⎦ Matlab m-file: Electrical_Analysis.m 13 Electrical Analysis Packing factor ac N pf = ww d w Winding volume (conductor) ( v w = p f ww d w (2d + 2 wb ) + πd w2 ww Winding length ) vw lw = ac 14 Electrical Analysis (Cont.) Winding resistance rw = Current Current Density lw a cσ w vb i= rb + rw i j= ac 15 Magnetic Analysis Goal ⎡ B0,1 ⎤ ⎢B ⎥ ⎢ 1, 2 ⎥ ⎢ B2,3 ⎥ = Fmag (θ, i, Ψ ) ⎢ ⎥ ⎢ B 4,5 ⎥ ⎢ fe ⎥ ⎣ ⎦ Matlab m-file: Magnetic_Analysis.m 16 Magnetic Equivalent Circuit ww N0 dw N1 N7 N2 N6 N3 N4 N5 we ws we wb ds g wi 17 Magnetic Equivalent Circuit (Cont) Pe Pvl Ni Φ 0 ,1 N0 Φ1,2 P0 ,1 P0 ,7 N1 P1, 2 N2 Φ 2 ,3 N7 Phl P6 ,7 P2, 3 N3 N6 P6, 3 P5, 6 P3 ,4 N5 P4 ,5 Φ 4 ,5 N4 18 Review: Magnetic Equivalent Circuits 19 Magnetic Material Permeances P0,1 wb dμ = ws + we P1, 2 = P0,7 P2,3 = P6,7 P4,5 ww 2 we dμ = wb + d w we dμ = ds − dw / 2 wi dμ = ws + we N0 dw N1 N7 N2 N6 N3 N4 N5 we ws wb ds g wi we 20 Air Gap Permeances P6,3 (d s − d w )dμ 0 2 μ 0 (d s − d w ) ⎛ πwe ln⎜⎜1 + = + ws ws π ⎝ ww ⎞ ⎟⎟ ⎠ N0 P3, 4 = P5,6 = we dμ 0 μ 0 d ⎛ πwi ⎞ ⎟⎟ + ln⎜⎜1 + + g g π 123 144⎝2443⎠ main face N7 N2 N6 N3 wb ds outer face 2μ 0 d ⎛ π min(ws , d s ) ⎞ 2μ 0 we ⎛ πwi ⎞ ⎟⎟ ⎟⎟ + ln⎜⎜1 + ln⎜⎜1 + π π 4g ⎝ 44g4 ⎝4 1444 4244444 3⎠ 14442 3⎠ inner face dw N1 g N4 N5 wi front / back faces we ws we 21 Hor. And Vert. Leakage Permeances ww 1 μ 0 d w d 2 μ 0 d w ⎛ πwe ln⎜⎜1 + + Phl = 3 ws 3π ws ⎝ Pvl = ⎞ ⎟⎟ ⎠ N0 N1 1 μ 0 dww 6 ds + g dw N7 N2 N6 N3 N4 N5 we ws we wb ds g wi 22 End Leakage Permeance ww wt = d s − d w Pe1 = μ 0 wt wb (d + 2we ) wt + wb 1 ww + k1 = d w − 2 ww ⎧ 2 ww ⎪ k2 = ⎨ d w ⎪ 2 ⎩ (2d w + wt + wb ) wt wb wt + wb d w > 2 ww dw d w ≤ 2 ww 1 2 2 ⎡ 4 3 + + k 2 k k k1 k 2 1 2 ⎢ 2 4 μ 0 (d + 2we ) ⎢ Pe 2 = 4 8ww2 d w2 ⎢− 2 k 3 k + k1 ln⎛⎜1 + 2 2 k 2 ⎢ 1 2 k1 8 16 ⎜⎝ ⎢⎣ Pe = Pe1 + Pe 2 ⎤ ⎥ ⎥ ⎞⎥ ⎟⎥ ⎟ ⎠⎥⎦ N0 N1 N7 N2 N6 N3 ds g N4 N5 we wb ws wi we 23 Nodal Equations Pe (F1 − Ni )P0,1 + F1 Pe + (F1 − F2 )P1,2 = 0 Pvl (F2 − F1 )P1,2 + (F2 − F7 )Phl + (F2 − F3 )P2,3 = 0 (F3 − F6 )P6,3 + (F3 − F4 )P3,4 + (F3 − F2 )P2,3 = 0 (F4 − F3 )P3,4 + (F4 − F5 )P4,5 = 0 (F5 − F4 )P4,5 + (F5 − F6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φ 0,1 wb d N0 N1 Φ1, 2 we d Φ 2, 3 dw N7 N2 N6 N3 wb ds we d Φ 4,5 wi d N4 N5 we ws g wi we 27 Force Using co-energy techniques and assuming magnetic linearity it can be shown ∂P3, 4 ∂g = ∂P5,6 ∂g =− we dμ 0 g2 2μ 0 d min(ws , d s ) μ 0 dwi 2μ 0 dwe wi − − − g (g + πwi ) 4 g (4 g + π min(ws , d s )) g (g + πwi ) ∂Pvl 1 μ 0 dww =− ∂g 6 (d s + g )2 28 Force (Cont.) ⎡0 ⎢0 ⎢ ⎢0 ⎢ ⎢ ∂P ⎢0 =⎢ ∂g ⎢ ⎢0 ⎢ ⎢ ⎢0 ⎢ ⎢⎣0 0 0 0 0 ∂P3, 4 0 0 − ∂g ∂P3, 4 0 − 0 ∂P3, 4 ∂g ∂P3, 4 ∂g ∂g 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ∂P5,6 − ∂g ∂P5,6 ∂g 0 − ∂P5,6 ∂g ∂P5,6 ∂g 0 0⎤ 0⎥⎥ 0⎥ ⎥ ⎥ 0⎥ ⎥ ⎥ 0⎥ ⎥ ⎥ 0⎥ ⎥ 0⎥⎦ 29 Force (Continued) [ ] ∂L = N 2 P012 P −1 ∂g 1st row [ ] ∂P −1 P ∂g ∂Pvl +N 1st column ∂g 2 1 ∂L 2 fe = − i 2 ∂g 30 Setting Up Constraints Less than function 1 ⎧ ⎪⎪ 1 ltne( x, xmax , Δx) = ⎨ x −x ⎪1 + max ⎪⎩ Δx x ≤ xmax x > xmax 31 Setting Up Constraints Greater than function 1 ⎧ ⎪⎪ 1 gtne( x, x min , Δx) = ⎨ x −x ⎪1 + min ⎪⎩ Δx x ≥ x min x < x min 32 Geometrical Constraints Recall, magnetic material should not overlap mass c1 = ltne( ws + 2we , lmax ,0.1lmax ) c2 = ltne(d , lmax ,0.1lmax ) 33 Electrical Constraints Packing Factor c3 = ltne( p f , p f ,max ,0.1 p f ,max ) Current Density c4 = ltne( j, jmax ,0.1J max ) Current c5 = ltne(i, imax ,0.1imax ) 34 Flux Density Constraints Back of U-Core c6 = ltne( B0,1 , Bsat ,0.01Bsat ) Back of Legs c7 = ltne( B1, 2 , Bsat ,0.01Bsat ) Front of Legs c8 = ltne( B2,3 , Bsat ,0.01Bsat ) I-Core c9 = ltne( B4,5 , Bsat ,0.01Bsat ) 35 Force Constraints We must lift mass (and I-core) f req = ( M + wi d ( ws + 2we ) ρ m )G c10 = gtne( f e , f req ,0.01 f req ) 36 Performance Metrics ww Total mass m1 = (2d s we d + ( ws + 2we )( wb + wi )d )ρ m + p f (ww d w (2d + 2 wb ) + πd w2 ww )ρ w wb Depth into page = d dw ds g wi we ws we 37 Fitness Function Combined constraint c = min(c1 , c2 ,L c10 ) Fitness Function 1 ⎧ c =1 ⎪⎪ m + ε f = ⎨ 10 1 ⎪ ∑ ci − 10 c < 1 ⎪⎩c =1 38 Code Organization Design Codes Electromagnet_Design.m GOSET Electromagnet_Fitness.m Electrical_Analysis.m Magnetic_Analysis.m 39 Code Organization (Cont) Supporting Routines Electromagnet_Drawing1 Electromagnet_Drawing2 Electromagnet_Design_Review Electromagnet_Design_Multirun Electromagnet_Design_Multrun_Review 40 Electromagnet_Design.m (1/3) % % % % % % % % Electromagnet Design Written by: Ricky Chan for S.D. Sudhoff School of Electrical and Computer Engineering 1285 Electrical Engineering Building West Lafayette, IN 47907-1285 E-mail: [email protected] % Set Up Population GAP = gapdefault; GAP.fp_ngen = 2500; GAP.fp_ipop = 500; GAP.fp_npop = 500; GAP.mc_alg = 4.0; GAP.dt_alg = 3; % Set Up Migrations GAP.mg_nreg=5; GAP.mg_tmig=100; GAP.mg_pmig=0.05; % Units mm=1.0e-3; cm=1.0e-2; % number of regions % mean time between migrations % probability of a individual migrating 41 Electromagnet_Design.m (2/3) % Problem Requirement Data Psi.M = 10; Psi.G = 9.8; Psi.g = 0.5*cm; Psi.rhow = [ 8900; 2701]; Psi.sigmaw = [ 58.0; 35.4]*1e6; Psi.jmaxw = [ 7.62; 6.14]*1e6; Psi.descw = ['Copper '; 'Aluminum']; Psi.bmaxm = [ 1.4; 0.7; Psi.rhom = [7064.1; 8069.4; Psi.myum = [ 15000; 6000; Psi.descm = ['Microsil '; ... 'Superperm 80'; ... 'Superperm 49']; Psi.imax = 6; Psi.lmax = 10e-2; Psi.pfmax = 0.7; Psi.vb = 12; Psi.rb = 0.5; 1.2]; 7892.1]; 3500]; % % % % % % % % % % Mass of object (Kg) Gravity (m/s2) Gap Width (m) Wire - Kg/m3 Wire - A/Ohm Wire - A/m2 Wire - Description Steel - Bsat, T Steel - Density Kg/m3 Steel - Perm., (relative) % % % % % % Steel Maximum Maximum Maximum Battery Battery Description current, A length packing factor Voltage Resistance 42 Electromagnet_Design.m (3/3) % Genetic Mapping % mw GAP.gd_min = [ 1 GAP.gd_max = [ 2 GAP.gd_type = [ 1 GAP.gd_cid = [ 1 ac 1e-8 1e-4 3 1 N 10 1e3 3 1 mm 1 3 1 1 ws 1*cm 10*cm 3 1 rww 0.1 1.0 3 1 ds 1*mm 20*cm 3 1 rdw 0.1 1.0 3 1 we 1*mm 5*cm 3 1 rwi 0.2 2.0 3 1 rwb d 0.2 1*mm]; 2.0 10*cm]; 3 3 ]; 1 1 ]; % Solve Problem [fP,GAS]= gaoptimize(@Electromagnet_Fitness,GAP,Psi,[],[],[]); % Get Final Answer and Plot final_parameters = GAS.bestgenes(:,end); f = Electromagnet_Fitness(final_parameters,Psi,23); % Save run s=input('Type 1 to Save Run '); if (s==1) save samplerun end 43 Electromagnet_Fitness.m (1/7) function fitness = Electromagnet_Fitness(param,Psi,figNum) % % % % % % % % % % % % % % % % % % ELECTROMAGNET_FITNESS fitness = Electromagnet_Fitness(param,Psi,x) Inputs: param Psi x = design parameters = data vectors = optional input to print out extra information Outputs: fitness = fitness value Written by: Ricky Chan for S.D. Sudhoff School of Electrical and Computer Engineering 1285 Electrical Engineering Building West Lafayette, IN 47907-1285 E-mail: [email protected] 44 Electromagnet_Fitness.m (2/7) % Map to nicer variable names mw = param(1); ac = param(2); N = round(param(3)); mm = param(4); ws = param(5); rww = param(6); ds = param(7); rdw = param(8); we = param(9); rwi = param(10); rwb = param(11); d = param(12); 45 Electromagnet_Fitness.m (3/7) % Computing the width of winding (ww), depth of winding (dw), width of the % I core (wi), and the width of the back of the U core (wb) ww = rww*ws; dw = rdw*ds; wi = rwi*we; wb = rwb*we; % Electrical Circuit Analysis [pf, j, i] = Electrical_Analysis(param,Psi); % Magnetic Analysis [B01, B12, B23, B45, fe] = Magnetic_Analysis(param,Psi,i); % Constraints lmax = Psi.lmax; pfmax = Psi.pfmax; jmaxw = Psi.jmaxw(mw); imax = Psi.imax; bmax = Psi.bmaxm(mm); rhom = Psi.rhom(mm); rhow = Psi.rhow(mw); 46 Electromagnet_Fitness.m (4/7) c1 = c2 = c3 = c4 = c5 = c6 = c7 = c8 = c9 = f_req c10 = ltne(ws+2*we,lmax,0.1*lmax); ltne(d,lmax,0.1*lmax); ltne(pf,pfmax,0.1*pfmax); ltne(j,jmaxw,0.1*jmaxw); ltne(i,imax,0.1*imax); ltne(B01,bmax,0.01*bmax); ltne(B12,bmax,0.01*bmax); ltne(B23,bmax,0.01*bmax); ltne(B45,bmax,0.01*bmax); = (Psi.M + wi*d*(ws+2*we)*rhom)*Psi.G; gtne(fe,f_req,0.01*f_req); % find the aggregrate constraint c = [c1 c2 c3 c4 c5 c6 c7 c8 c9 c10]; cmin = min(c); % design objective m1 = (2*ds*we*d + (ws+2*we)*(wb+wi)*d)*rhom + ... pf*(ww*dw*(2*d+2*wb)+pi*dw^2*ww)*rhow; % compute the fitness if (cmin == 1) fitness = 1/(m1+1e-6); else fitness = sum(c)-length(c); end 47 Electromagnet_Fitness.m (5/7) % if more than 3 arguments, plot the result % and write a report if nargin >= 3 format short g disp('Parameters'); disp(['Parameter 1: Wire type ',Psi.descw(mw,:)]); disp(['Parameter 2: Wire cross section is ', num2str(ac), ' m^2']); disp(['Parameter 3: Number of turns is ', num2str(N)]); disp(['Parameter 4: Magnetic material is ', Psi.descm(mm,:)]); disp(['Parameter 5: Slot width is ',num2str(ws*100),' cm']); disp(['Parameter 6: Winding width is ',num2str(rww*100),'% slot width']); disp(['Parameter 7: Slot depth is ',num2str(ds*100),' cm']); disp(['Parameter 8: Winding depth is ',num2str(rdw*100),'% slot depth']); disp(['Parameter 9: End width is ',num2str(we*100),' cm']); disp(['Parameter 10: I width is ',num2str(rwi*100),'% end width']); disp(['Parameter 11: Base width is ',num2str(rwb*100),'% end width']); disp(['Parameter 12: Depth is ',num2str(d*100),' cm']); disp(' '); 48 Electromagnet_Fitness.m (6/7) disp('Constraints'); disp(['Overall width is ',num2str(100*(ws+2*we)/lmax),'% allowed']); disp(['Overall depth is ',num2str(100*d/lmax),'% allowed']); disp(['Packing factors is ',num2str(100*pf/pfmax),'% allowed']); disp(['Current density is ',num2str(100*j/jmaxw),'% allowed']); disp(['Current is ',num2str(100*i/imax),'% allowed']); disp(['Back core flux density is ',num2str(100*B01/bmax),'% allowed']); disp(['Back end core flux density is ',num2str(100*B12/bmax),'% allowed']); disp(['Front end core flux density is ',num2str(100*B23/bmax),'% allowed']); disp(['I core flux density is ',num2str(100*B45/bmax),'% allowed']); disp(['Force required is ',num2str(f_req),' N']); disp(['Force produced is ',num2str(100*fe/f_req), '% required']); disp(' '); disp('Metrics'); disp(['Mass is ',num2str(m1),' Kg']); figure(figNum); clf; Electromagnet_Drawing1(param,Psi); figure(figNum+1) Electromagnet_Drawing2(param,Psi); end 49 Electromagnet_Fitness.m (7/7) function p = ltne(x,xmax,delta) if x <= xmax p = 1; else p = 1./(1+abs((xmax-x)./delta)); end function p = gtne(x,xmin,delta) if x >= xmin p = 1; else p = 1./(1+abs((xmin-x)./delta)); end 50 Sample Evolution Normalized Value 1 0.5 0 1 2 3 4 5 6 7 8 Parameter Number 9 10 11 12 f:B(b) Md(g) Mn(r) 2 0 -2 -4 -6 500 1000 1500 Generation 2000 2500 51 Evolution – Best Fit Individual (Matlab Demo) 52 Parameters Parameter 1: Wire type Copper Parameter 2: Wire cross section is 7.8519e-007 m^2 Parameter 3: Number of turns is 585 Parameter 4: Magnetic material is Microsil Parameter 5: Slot width is 7.1906 cm Parameter 6: Winding width is 97.7656% slot width Parameter 7: Slot depth is 0.96031 cm Parameter 8: Winding depth is 97.8117% slot depth Parameter 9: End width is 1.2104 cm Parameter 10: I width is 49.2545% end width Parameter 11: Base width is 52.2008% end width 53 Parameter 12: Depth is 3.7947 cm Constraints Overall width is 96.1141% allowed Overall depth is 37.9474% allowed Packing factors is 99.3753% allowed Current density is 99.4713% allowed Current is 99.1917% allowed Back core flux density is 99.442% allowed Back end core flux density is 50.9116% allowed Front end core flux density is 49.215% allowed I core flux density is 99.6887% allowed Force required is 99.5053 N Force produced is 100.3524% required 54 Metrics Mass is 0.86127 Kg 55 0.15 Profile View 0.15 0.1 0.1 0.05 0.05 0 0 -0.05 -0.05 -0.1 -0.1 -0.15 -0.15 -0.1 -0.05 0 0.05 0.1 -0.1 -0.05 0 0.05 0.1 56 3-D View 0.02 0.015 0.01 0.005 0 -0.005 -0.01 -0.015 0.02 0 -0.05 -0.02 0 0.05 57 Design Repeatability Repeat design 25 times: Parameter Min/Mn Max/Mn Std/Mn mw 100.00 100.00 0 aw 95.26 102.05 1.46 N 93.95 106.16 3.48 mn 100.00 100.00 0 58 Design Repeatability Parameter Min/Mn Max/Mn Std/Mn ws 88.44 110.01 5.06 rww 97.93 100.72 0.57 ds 92.18 105.86 4.07 rdw 96.46 101.94 1.46 59 Design Repeatability Parameter Min/Mn Max/Mn Std/Mn we 88.55 109.82 5.93 rwi 90.00 109.26 5.06 rwb 89.55 108.78 5.17 d 83.18 118.91 9.02 Fitness 97.55 102.00 1.09 60
© Copyright 2025 Paperzz