User:Divyanshu: Difference between revisions

From ASCEND
Jump to navigation Jump to search
Divyanshu (talk | contribs)
No edit summary
Divyanshu (talk | contribs)
No edit summary
Line 7: Line 7:




Model of a simple diode with dc resistance
Model of a simple diode circuit with dc voltage source and a resistance


<source lang="a4c">
<source lang="a4c">
Line 46: Line 46:
END diode;
END diode;
</source>
</source>
[[Image:Diode.png|500px|thumb|left|Screenshot of solving various parameters of a transistor]]
[[Image:Diode.png|500px|thumb|left|Model Diode]]





Revision as of 19:31, 4 April 2011

Name : Divyanshu Bandil

University  : Delhi University

College  : Netaji Subhas Institute of Technology, Dwarka, Delhi, India


Model of a simple diode circuit with dc voltage source and a resistance

REQUIRE "atoms.a4l";

MODEL diode;
	(*variables*)
	
	V IS_A voltage;
	R IS_A resistance;
	VD IS_A voltage;
	Is IS_A current;
	I IS_A current;

	(*equations*)
	(V - VD)/R = Is * ((exp(VD/0.043478261)) - 1);
	I = Is * ((exp(VD/0.043478261)) - 1);

	
METHODS
	(*Fixing values for a simple circuit connecting a diode , a dc voltage and a resistor in series*)
	
	METHOD on_load;
		FIX V;
		V := 5 {volt};
		FIX R ;
		R := 1000 {ohm};
		FIX Is;
		Is := 1e-10 {amp};
	END on_load;

	METHOD default_self;
		VD := 0.7 {volt};
		VD.lower_bound := 0.7 {volt};
		VD.upper_bound := 0.8 {volt};
	END default_self;

END diode;
Error creating thumbnail: File missing
Model Diode


Model of a transistor with fixed collector voltage and collector current.

REQUIRE "atoms.a4l";

MODEL transistor;
	
	(*variables*)
	VE IS_A voltage; (* Emitter Voltage *)
	VB IS_A voltage; (* Base Voltage *)
	VC IS_A voltage; (* Collector Voltage *)

	(* Biasing Voltages *)
	VCC IS_A voltage;
	VBB IS_A voltage;
	VEE IS_A voltage;

	VBE IS_A voltage;

	RC IS_A resistance;
	RE IS_A resistance;
	RB IS_A resistance;
	VT IS_A voltage;
	Is IS_A current;
	
	IE IS_A current; (* Emitter Current *)
	IB IS_A current; (* Base Current *)
	IC IS_A current; (* Collector Current *)

	aF IS_A variable;
	bF IS_A variable;
	aR IS_A variable;
	bR IS_A variable;

	(* Equations *)
	aF = bF/(1 + bF);
	aR = bR/(1 + bR);
	VBE = VB - VE;

	(*Ebers-Moll Model Equations*)
	IE = (Is/aF)*(exp((VB - VE)/VT) - 1) - (Is)*(exp((VB - VC)/VT) - 1);
	IC = (Is)*(exp((VB - VE)/VT) - 1) - (Is/aR)*(exp((VB - VC)/VT) - 1);
	IB = (Is/bF)*(exp((VB - VE)/VT) - 1) + (Is/bR)*(exp((VB - VC)/VT) - 1);

	(VE - VEE)/RE = (Is/aF)*(exp((VB - VE)/VT) - 1) - (Is)*(exp((VB - VC)/VT) - 1);
	(VCC - VC)/RC = (Is)*(exp((VB - VE)/VT) - 1) - (Is/aR)*(exp((VB - VC)/VT) - 1);
	(VB - VBB)/RB = (Is/bF)*(exp((VB - VE)/VT) - 1) + (Is/bR)*(exp((VB - VC)/VT) - 1);	

METHODS
	METHOD on_load;
		FIX Is;
		Is := 1e-15 {amp};
		FIX VT;
		VT := 0.025 {volt};
		FIX bF;		
		bF := 100;
		FIX bR;
		bR := 0.02;
		VBE := 0.7 {volt} ;
		FIX VCC;
		VCC := 15 {volt};
		FIX VEE;
		VEE := -15 {volt};
		FIX VB;
		VB := 0.0 {volt};
		FIX RB;
		RB := 1e-100 {ohm}; (*RB set very low not zero because division by zero not possible*) 
		FIX VC , IC;
		VC := 5 {volt};
		IC := 0.002 {amp};
	END on_load;
END transistor;

Error creating thumbnail: File missing
Screenshot of solving various parameters of a transistor