Custom Inductor (B-H Curve)

This example shows a comparison in behavior of a linear and nonlinear inductor. Starting with fundamental parameter values, the parameters for linear and nonlinear representations are derived. These parameters are then used in a Simscape™ model and the simulation outputs compared.

Open Model

modelName = 'ee_custom_inductor'; open_system( modelName ); 

Specification of Parameters

Fundamental parameter values used as the basis for subsequent calculations:

• Permeability of free space,

• Relative permeability of core,

• Number of winding turns,

• Effective magnetic core length,

• Effective magnetic core cross-sectional area,

• Core saturation begins,

• Core fully saturated,

mu_0 = pi*4e-7; mu_r = 3000; Nw = 100; le = 0.02; Ae = 1e-05; B_sat_begin = 0.75; B_sat = 1.5; 

Calculate Magnetic Flux Density and Magnetic Field Strength Data

Where:

• Magnetic flux density,

• Magnetic field strength,

Linear representation:

Nonlinear representation (including coefficient, a):

% Use linear representation to find value of H corresponding to B_sat_begin H_sat_begin = B_sat_begin/(mu_0*mu_r); % Rearrange nonlinear representation to calculate coefficient, a a = atanh( B_sat_begin/B_sat )/H_sat_begin; % Linear representation H_linear = [-500 500]; B_linear = mu_0*mu_r*H_linear; % Nonlinear representation H_nonlinear = -5*H_sat_begin:H_sat_begin:5*H_sat_begin; B_nonlinear = B_sat*tanh(a*H_nonlinear); 

Display Magnetic Flux Density Versus Magnetic Field Strength

The linear and nonlinear representations can be overlaid.

if ~exist('h1_ee_custom_inductor', 'var') || ... ~isgraphics(h1_ee_custom_inductor, 'figure') h1_ee_custom_inductor = figure('Name', 'ee_custom_inductor'); end figure(h1_ee_custom_inductor) clf(h1_ee_custom_inductor) plot( H_linear, B_linear, H_nonlinear, B_nonlinear ); grid( 'on' ); title( 'Magnetic flux density, B, versus Magnetic field strength, H' ); xlabel( 'Magnetic field strength, H (A/m)' ); ylabel( 'Magnetic flux density, B (T)' ); legend( 'B=\mu_0 \mu_r H', 'B-H curve', 'Location', 'NorthWest' ) 

Calculate Magnetic Flux and Current Data

Where:

• Magnetic flux,

• Current,

Linear representation:

Nonlinear representation:

% Linear inductance L_linear = mu_0*mu_r*Ae*Nw^2/le; % Linear representation I_linear = [-1.5 1.5]; phi_linear = I_linear.*L_linear/Nw; % Nonlinear representation I_nonlinear = le.*H_nonlinear./Nw; phi_nonlinear = B_nonlinear.*Ae; 

Display Magnetic Flux Versus Current

The linear and nonlinear representations can be overlaid.

if ~exist('h2_ee_custom_inductor', 'var') || ... ~isgraphics(h2_ee_custom_inductor, 'figure') h2_ee_custom_inductor = figure('Name', 'ee_custom_inductor'); end figure(h2_ee_custom_inductor) clf(h2_ee_custom_inductor) plot( I_linear, phi_linear, I_nonlinear, phi_nonlinear ); grid( 'on' ); title( 'Magnetic flux, \phi, versus current, I' ); xlabel( 'Current, I (A)' ); ylabel( 'Magnetic flux, \phi (Wb)' ); xlim([-0.2 0.2]); ylim([-2e-5 2e-5]); legend( '\phi=I L/N_w', '\phi-I curve', 'Location', 'NorthWest' ); 

Use Parameters in Simscape Model

The parameters calculated can now be used in a Simscape model. Once simulated, the model is set to create a Simscape logging variable, simlog_ee_custom_inductor.

sim( modelName ); 

Conclusion

The state variable for both representations is magnetic flux, . Current, I, and magnetic flux, , can be obtained from the Simscape logging variable, simlog_ee_custom_inductor, for each representation. Overlaying the simulation results from the representations permits direct comparison.

if ~exist('h3_ee_custom_inductor', 'var') || ... ~isgraphics(h3_ee_custom_inductor, 'figure') h3_ee_custom_inductor = figure('Name', 'ee_custom_inductor'); end figure(h3_ee_custom_inductor) clf(h3_ee_custom_inductor) plot( ... simlog_ee_custom_inductor.Inductor_linear_magnetic_flux.i.series.values,... simlog_ee_custom_inductor.Inductor_linear_magnetic_flux.phi.series.values,... simlog_ee_custom_inductor.Inductor_B_H_curve.i.series.values,... simlog_ee_custom_inductor.Inductor_B_H_curve.phi.series.values); grid( 'on' ); title( 'Magnetic flux, \phi, versus current, I' ); xlabel( 'Current, I (A)' ); ylabel( 'Magnetic flux, \phi (Wb)' ); xlim([-0.2 0.2]); ylim([-2e-5 2e-5]); legend( 'Linear (single inductance)', 'B-H characteristic', 'Location', 'NorthWest' );