Southampton VHDL-AMS Validation Suite

School of Electronics and Computer Science, University of Southampton

 

  Home Example Models Web Parser Acknowledgement ESD Group ECS University of Southampton
 

Van der Pol Oscillator

Lorenz Chaos

Bouncing Ball

Level3 MOS Transistor

Bipolar Transistor with Thermal Effects

AnalogueSchmitt Trigger

Voltage Controlled Oscillator with Integration of Phase

Phase-Locked-LoopFrequency Multiplier

Switch-mode Power Regulator

Ferromagnetic Hysteresis

Sigma-Delta Modulator

MEMS accelerometer with SD control loop

 

 

Bipolar Transistor With Thermal Effects

 

<<Previous<<        >>Next>>

 

-- VHDL-AMS model of Bipolar Transistor With Thermal Effects
-- (c) University of Southampton 1997
-- Southampton VHDL-AMS Validation Suite - example 4
-- author: 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: tjk@ecs.soton.ac.uk
-- Created:  29 May 1997
-- Last revised: 15 August 2005 (by Shaolin Wang)
--
------------------------------------------------
-- Description:
-- This is a DC model which uses the standard Ebers-Moll equations
-- with temperature dependent physical parameters. Unlike the
-- SPICE models, this model contains a set of heat
-- flow equations which evaluate the temperature dynamically
-- as one of the system quantities. A differential equation models
-- the inertial heat storage effect.
--
-- The heat flow equations are connected to a terminal
-- of nature Heat and can contribute to an external heat flow
-- network. If the thermal terminal is left open (i.e. unconnected),
-- the calculated temperature will be local to the transistor.
--
----------------------------------------------

--1. VHDL-AMS Model of BJT with Heat

library IEEE;
use IEEE.math_real.all;
use IEEE.electrical_systems.all;

library work;
use work.heat_system.all;

entity BJTwithHeat is -- self heating BJT
    generic
    ( -- model parameters:
    Is0: real:= 1.0E-14; -- transport saturation current
    Bf : real:= 100.0; -- ideal forward beta
    Nf : real:= 1.0; -- forward emission coeff
    Br : real:= 3.0; -- ideal reverse beta
    Nr : real:= 1.0; -- reverse emission coeff
    Xtb: real:= 1.0; -- fwd & rev'se beta temperature exponent
    Xti: real:= 3.0; -- Is temperature exponent
    Nc : real:= 2.0; -- base-collector leakage emission coeff
    Rb : real:= 100.0; -- base resistance
    Rc : real:= 2.0; -- collector resistance
    Re : real:= 1.0; -- emitter resistance
    CoolingConductance : real:= 0.001; -- [Watt/K]
    HeatCapacity : real:= 1.0E-4 -- [Watt*sec/K]
    );
    port (terminal collector,base,emitter: electrical);

end entity BJTwithHeat;

architecture Heater of BJTwithHeat is

    terminal ThermalTerminal: Heat; -- the thermal terminal can be part of a heat flow network
    terminal b1,c1,e1:electrical;
    -- some physical constants:
    constant ElectronCharge: real := 1.6021892E-19; -- [C]
    constant Boltzmann: real := 1.380662E-23; -- [J/K]
    constant EgSi: real := 1.12; -- energy gap in Si [V]

    -- BJT model quantities
    quantity Vb1 across Ib through base to b1;
    quantity Vc1 across Ic through collector to c1;
    quantity Ve1 across Ie through emitter to e1;
    quantity Vbc across Ibc through b1 to c1;
    quantity Vbe across Ibe through b1 to e1;
    quantity Itc through c1 to e1; -- transport current

-- temperature quantities:
-- 'Temp' is the local transistor temperature above Tambient
-- 'Dissipation' is the colling heat flow
-- 'Heating' is the power delivered to the transitor
-- 'Storage' is the stored heat energy rate

    quantity Temp across Dissipation through ThermalTerminal to Tambient;
    quantity Heating through Tambient to ThermalTerminal;

    quantity AbsTemp,Vth,Bfe,Bre,Ise,BetaFactor,IsFactor: real;

begin

    Vb1==Ib*Rb; -- base resistance
    Ve1==Ie*Re; -- emitter resistance
    Vc1==Ic*Rc; -- collector resistance
    AbsTemp == Temp + TEMP0; -- add incremental temp to ambient

    -- thermal voltage
    Vth == Boltzmann*AbsTemp/ElectronCharge;

    -- temperature factors:
    BetaFactor == (AbsTemp/TEMP0)**Xtb;

    IsFactor == EgSi*(AbsTemp/TEMP0 - 1.0)/Vth + Xti*log(AbsTemp/TEMP0);

    -- effective transport saturation current
    Ise == (Is0/BetaFactor)*exp(IsFactor/Nc);

    -- effective forward beta
    Bfe == Bf*BetaFactor;
    -- effective reverse beta
    Bre == Br*BetaFactor;

    -- collector junction equation (assignment target is a quantity)
    Ibc == Ise/Bre*(exp(Vbc/(Nr*Vth)-1.0));

    -- emitter junction equation
    Ibe == Ise/Bfe*(exp(Vbe/(Nf*Vth)-1.0));

    -- transport current equation
    Itc == Ibe*Bfe - Ibc*Bre;

    -- heat flow equations
    Dissipation == Temp * CoolingConductance;
    Heating == abs(Itc * (Vbc-Vbe)); -- power flow

 
    -- heat storage rate due to thermal inertia:

    heatcapacitor1: entity heatcapacitor generic map(heatcapacity=>heatcapacity)
    port map(pos=>ThermalTerminal,neg=>Tambient);

end architecture Heater;

 

---------------------------------------------------------------------------------

 

--2. Package of Heat System
 

package heat_system is

subtype Temperature is real range -300.0 to 500.0; -- [Kelvins]
-- temperature is incremental with reference to the ambient point
subtype HeatFlow is real range -1.0E3 to 1.0E3; -- [Watts]

nature Heat is
    Temperature across
    HeatFlow through
    Tambient reference;

-- Heat'reference is the ambient temperature

-- TEMP0 is the recommended ambient temperature value
constant TEMP0: real := 300.0;

end package heat_system;

---------------------------------------------------------------------------------

 

--3. Heat Capacitor

 

library IEEE;
use IEEE.math_real.all;

library work;
use work.heat_system.all;

entity heatcapacitor is
    generic( initial: real:=0.0;
             heatcapacity: real);
    port(terminal pos,neg: heat);
end entity heatcapacitor;

architecture ideal of heatcapacitor is
    quantity temp across storage through pos to neg;
begin
    if domain = quiescent_domain use -- set initial temperature
        temp == initial;
    else         -- heat storage rate due to thermal inertia:
        storage == heatcapacity * temp'dot;
    end use;
end architecture ideal;

 

---------------------------------------------------------------------------------

 

--4. Testbench

 

library IEEE;
use IEEE.math_real.all;
use IEEE.electrical_systems.all;

library work;
use work.heat_system.all;

entity test_bjtwithheat is
end entity test_bjtwithheat;

architecture test of test_bjtwithheat is
    terminal b,c: electrical;
    alias ground is ELECTRICAL_REF;
begin
    vbe: entity v_constant generic map(level=>2.0)

                            port map(pos=>b,neg=>ground);
    vce: entity v_pulse generic map(pulse=>5.0,tchange=>10sec)

                            port map(pos=>c, neg=>ground);
    bjt1:entity bjtwithheat port map(collector=>c,base=>b,emitter=>ground);
end architecture test;

 

---------------------------------------------------------------------------------

 

--5. Constant Voltage Source

 

library IEEE;

use IEEE.math_real.all;

use IEEE.electrical_systems.all;

 

entity v_constant is

       generic(level: voltage);

       port(terminal pos,neg:electrical);

end entity v_constant;

 

architecture ideal of v_constant is

       quantity v across i through pos to neg;

begin

       v == level;

end architecture;

 

---------------------------------------------------------------------------------

 

--6. Pulse Voltage Source

 

library IEEE;
use IEEE.math_real.all;
use IEEE.electrical_systems.all;

entity v_pulse is
    generic(
            initial: real:= 0.0;
            pulse : real:= 5.0;
            tchange : time:= 10sec); -- initial to pulse [Sec]
    port(terminal pos,neg: electrical);
end entity v_pulse;

architecture behaviour of v_pulse is
    function time2real(tt : time) return real is
    begin
    return time'pos(tt) * 1.0e-15;
    end time2real;

    constant slope:real:=pulse/time2real(tchange);

    quantity v across i through pos to neg;
    -- Signal used in CreateEvent process below
    signal pulse_signal : real := initial;
begin

    v==pulse_signal'slew(slope);

    CreateEvent : process
    begin
    wait until domain = time_domain; -- Run process in Time Domain only
    pulse_signal <=pulse;
    end process CreateEvent;

end architecture behaviour;

 

--7. Simulation Result of BJT with Heat

 

 

---------------------------------------------------------------------------------

 

--8. VHDL-AMS Model of BJT without Thermal Effect

 

library IEEE;
use IEEE.math_real.all;
use IEEE.electrical_systems.all;

entity BJT is
    generic( -- model parameters:
            Is0: real:= 1.0E-14; -- transport saturation current
            Bf : real:= 100.0; -- ideal forward beta
            Nf : real:= 1.0; -- forward emission coeff
            Br : real:= 3.0; -- ideal reverse beta
            Nr : real:= 1.0; -- reverse emission coeff
            Rb : real:= 100.0; -- base resistance
            Rc : real:= 2.0; -- collector resistance
            Re : real:= 1.0 --emitter resistance
            );
    port (terminal collector,base,emitter: electrical);
end entity BJT;

architecture Behaviour of BJT is
    -- internal terminals

    terminal b1,c1,e1: electrical;
    -- some physical constants:
    constant ElectronCharge: real := 1.6021892E-19; -- [C]
    constant Boltzmann: real := 1.380662E-23; -- [J/K]
    constant EgSi: real := 1.12; -- energy gap in Si [V]
    constant Temp0: real :=300.0;
    constant Vth :real:= Boltzmann*Temp0/ElectronCharge;
    -- BJT model quantities
   
quantity Vbc across Ibc through b1 to c1;
    quantity Vbe across Ibe through b1 to e1;
    quantity Itc through c1 to e1; -- transport current
    quantity Vb1 across Ib1 through base to b1;
    quantity Vc1 across Ic1 through collector to c1;
    quantity Ve1 across Ie1 through emitter to e1;

begin
    -- voltage and current through base resistor
    Vb1==Ib1*Rb;
    -- voltage and current through collector resistor
    Vc1==Ic1*Rc;
    -- voltage and current through emitter resistor
    Ve1==Ie1*Re;

    -- collector junction equation (assignment target is a quantity)
    Ibc == Is0/Br*(exp(Vbc/(Nr*Vth))-1.0);

    -- emitter junction equation
    Ibe == Is0/Bf*(exp(Vbe/(Nf*Vth))-1.0);

    -- transport current equation
    Itc == Ibe*Bf - Ibc*Br;


end architecture Behaviour;

 

---------------------------------------------------------------------------------

 

--9. Testbench of BJT without Heat

 

library IEEE;
use IEEE.math_real.all;
use IEEE.electrical_systems.all;

entity test_bjt is
end entity test_bjt;

architecture test of test_bjt is
    terminal b,c: electrical;
    alias ground is ELECTRICAL_REF;
begin
    vbe: entity v_constant generic map(level=>2.0)

                            port map(pos=>b,neg=>ground);
    vce: entity v_pulse generic map(pulse=>5.0,tchange=>10sec)

                            port map(pos=>c, neg=>ground);
    bjt1:entity bjt port map(collector=>c,base=>b,emitter=>ground);
end architecture test;

 

---------------------------------------------------------------------------------

 

--10. Simulation Results of BJT without Heat

 


 

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

 

School of Electronics and Computer Science, University of Southampton, Highfield, Southampton S017 1BJ, United Kingdom