|
Ferromagnetic Hysteresis
<<Previous<<
>>Next>>
-- VHDL-AMS model of
Ferromagnetic Hysteresis -- (c) Southampton University
2005
-- Southampton VHDL-AMS
Validation Suite
-- author:
Hessa Al-Junaid and Tom
Kazmierski
-- Department of Electronics
and Computer Science, University of Southampton
-- Highfield, Southampton
SO17 1BJ, United Kingdom
-- Tel. +44 2380 593520
Fax +44 2380 592901
-- e-mail: hjaa01r@ecs.soton.ac.uk, tjk@ecs.soton.ac.uk
-- Created: August 2005 -- Last revised:
15 August 2005 (by Shaolin Wang)
--
--------------------------------------------------------------------------------
--1. VHDL-AMS Model of Ferromagnetic Hysteresis
library IEEE;
use IEEE.math_real.all;
use IEEE.electrical_systems.all;
entity ferrohys is
generic(k: real:= 4000.0;
c: real:=
0.1;
ms: real:=
1.6e6;
alpha: real:=
3.0e-3;
a: real:=
3.5e3;
area: real:=
4.0e-6);
port (terminal p,m: magnetic);
end entity ferrohys;
architecture core_ja of ferrohys is
constant MU0:real:=4.0e-7*Math_pi;
constant mg:real:=MU0*area;
constant dhmax:real:=12.0;
quantity H across flux through p to m;
quantity He,B,mrev,mirr,mtotal,man:real:=0.0;
signal lasth,deltah,mirrsig:real:=0.0;
signal hchanged,trig: boolean:=false;
function lang_mod(x:real) return real is
variable lang_x:real:=0.0;
begin
lang_x:=(2.0/math_pi)*arctan(x);
return lang_x;
end function;
begin
-- hchanged signal assignment triggered by
-- sufficient changes in field strength
hchanged<=H'above(lasth+dhmax) or not H'above(lasth-dhmax);
--simultaneous statement to calculate He
He == H +(alpha*ms*mtotal);
--Anhysteretic Magnetization
man == lang_mod(He/a);
mrev == c*man/(1.0+c);
--calculate total magnetization
mirr == mirrsig;
mtotal == mrev+ mirrsig;
-- Calculate flux and flux density
flux==mg*(ms*mtotal+H);
B== flux/area;
--process to monitor H triggered by hchanged
process (hchanged) is
variable dh: real:=0.0;
begin
trig<=false;
dh:=(H-lasth);
if abs(dh) > dhmax then
deltah<=dh;
lasth<=H;
trig<=true;
end if;
end process;
-- process to integrate dM/dH with Euler method
process (trig) is
variable dk: real:= 0.0;
variable deltam,dm,dmdh,dmdhl,dh:real;
begin
if deltah > 0.0 then
-- get field
direction
dk:=k;--rising
else
dk:=-k;--falling
end if;
--forward Euler integration method
dh := deltah;
deltam:=man-mtotal;
dmdhl:=deltam/((1.0+c)*(dk-(alpha*ms*deltam)));
if dmdhl>0.0 then
dmdh:=dmdhl;
else
dmdh:=0.0;
end if;
dm:=dh*dmdh;
if dh*dm <0.0 then
dm:=0.0;
end if;
--JA Model
mirrsig<=mirrsig+dm;
end process;
end
architecture core_ja;
-------------------------------------------------------------------------------
--2. Testbench
library IEEE;
use IEEE.electrical_systems.all;
entity test_ferrohys is
end entity test_ferrohys;
architecture test of test_ferrohys is
terminal p: magnetic;
begin
hsource: entity h_pulse port map (p=>p,m=>Magnetic_REF);
fh: entity ferrohys port map(p=>p,m=>Magnetic_REF);
end architecture test;
--------------------------------------------------------------------------------
--3. H Source
library IEEE;
use IEEE.math_real.all;
use IEEE.electrical_systems.all;
entity h_pulse is
generic(
pulse:
real:=10.0e3;
bias:
real:=0.0;
--anhysterisis:2.0e3,hysterisis:0.0
tbias:
time:=0sec; --anhysterisis:2sec,hysterisis:0.0
tc : time :=
10sec --
initial to pulse [Sec]
);
port(terminal p,m: magnetic);
end entity h_pulse;
architecture behaviour of h_pulse is
quantity h across flux through p to
m;
-- Signal used in CreateEvent process below
signal pulse_signal : real := 0.0;
begin
h==pulse_signal'slew(1.0e3);
CreateEvent : process
begin
wait until domain = time_domain;
-- Run process in Time Domain only
pulse_signal <=pulse;
wait for (tc);
pulse_signal <=-pulse;
wait for (2*tc);
pulse_signal <=pulse;
wait for (2*tc);
pulse_signal<=bias;
wait for (tc-tbias);
pulse_signal<=bias-pulse/10.0;
wait for (tc/10);
loop
pulse_signal <= bias+pulse/10.0;
wait for (tc/5);
pulse_signal <= bias-pulse/10.0;
wait for (tc/5);
end loop;
end process CreateEvent;
end architecture behaviour;
--------------------------------------------------------------------------------
--4. Simulation Results
--Non-biased
Minor loops

--Minor
loops biased at H=2kA/m

<<Previous<<
>>Next>>
Top^
|