% Given Data l1 =29; % cm l2 = 28.8; % cm l3 = 6.9; % cm lg1 = 1*1E-3; % m lg2 = 2*1E-3; % m ur = 2500; % Relative permeability u0 = 4*pi*1E-7; % Permeability of free space n1 = 200; % Number of turns n2 = 500; % Number of turns (Part 2) I1 = 30; % Current in amperes A1 = 3*3*1E-4; % Cross-sectional area in m^2 A2 = 3*5*1E-4; % Cross-sectional area in m^2 % Reluctances r1 = ((l1*1E-2)/(ur*u0*A1)); r2 = ((l2*1E-2)/(ur*u0*A1)); r3 = ((l3*1E-2)/(ur*u0*A2)); rg1 = (lg1/(u0*A2)); rg2 = (lg2/(u0*A1)); % KVL Equations syms phi1 phi2 phi3 eq1 = r1*phi1 + (r3+rg1)*phi3 == n1*I1; eq2 = (r2+rg2)*phi2 - (rg1+r3)*phi3 == 0; % KCL Equations eq3 = phi1 - phi2 - phi3 == 0; % Solving the system sol = solve([eq1, eq2, eq3], [phi1, phi2, phi3]); phi1 = double(sol.phi1); phi2 = double(sol.phi2); phi3 = double(sol.phi3); % PART(i) B2 = phi2 / A1; % Flux density in gap two H1 = phi3 / (A2*u0); % Magnetic field intensity in gap one % Display Results disp(['Flux density of gap two = ' num2str(B2) ' Tesla']) disp(['Flux intensity of gap one = ' num2str(H1) ' AT/m']) % PART (ii) clear phi1 phi3 % Only clear necessary variables clc; phi2 = 5*1E-3; % Wb (Webers) % Redefine variables syms phi1 phi3 I2 % KVL Equations eq4 = r1*phi1 + (r3+rg1)*phi3 == n1*I1; eq5 = (rg2 + r2)*phi2 - (r3+rg1)*phi3== n2*I2 ; % KCL Equations eq6 = phi1 - phi2 - phi3 == 0; % Solving Part(ii) Equations sol = solve([eq4, eq6, eq5], [phi1, phi3, I2]); % Convert to Numeric phi1 = double(sol.phi1); phi3 = double(sol.phi3); I2 = double(sol.I2); % Display Results disp(['Phi1 = ' num2str(phi1) ' Wb']) disp(['Phi3 = ' num2str(phi3) ' Wb']) disp(['Current two = ' num2str(I2) ' Amperes'])