Qucs-GUI  0.0.19
/home/travis/build/Qucs/qucs/qucs/qucs/components/jfet.cpp
Go to the documentation of this file.
00001 /***************************************************************************
00002                                 jfet.cpp
00003                                ----------
00004     begin                : Fri Jun 4 2004
00005     copyright            : (C) 2003 by Michael Margraf
00006     email                : michael.margraf@alumni.tu-berlin.de
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #include "jfet.h"
00019 
00020 
00021 JFET::JFET()
00022 {
00023   Description = QObject::tr("junction field-effect transistor");
00024 
00025   // this must be the first property in the list !!!
00026   Props.append(new Property("Type", "nfet", true,
00027   QObject::tr("polarity")+" [nfet, pfet]"));
00028   Props.append(new Property("Vt0", "-2.0 V", true,
00029   QObject::tr("threshold voltage")));
00030   Props.append(new Property("Beta", "1e-4", true,
00031   QObject::tr("transconductance parameter")));
00032   Props.append(new Property("Lambda", "0.0", true,
00033   QObject::tr("channel-length modulation parameter")));
00034   Props.append(new Property("Rd", "0.0", false,
00035   QObject::tr("parasitic drain resistance")));
00036   Props.append(new Property("Rs", "0.0", false,
00037   QObject::tr("parasitic source resistance")));
00038   Props.append(new Property("Is", "1e-14", false,
00039   QObject::tr("gate-junction saturation current")));
00040   Props.append(new Property("N", "1.0", false,
00041   QObject::tr("gate-junction emission coefficient")));
00042   Props.append(new Property("Isr", "1e-14", false,
00043   QObject::tr("gate-junction recombination current parameter")));
00044   Props.append(new Property("Nr", "2.0", false,
00045   QObject::tr("Isr emission coefficient")));
00046   Props.append(new Property("Cgs", "0.0", false,
00047   QObject::tr("zero-bias gate-source junction capacitance")));
00048   Props.append(new Property("Cgd", "0.0", false,
00049   QObject::tr("zero-bias gate-drain junction capacitance")));
00050   Props.append(new Property("Pb", "1.0", false,
00051   QObject::tr("gate-junction potential")));
00052   Props.append(new Property("Fc", "0.5", false,
00053   QObject::tr("forward-bias junction capacitance coefficient")));
00054   Props.append(new Property("M", "0.5", false,
00055   QObject::tr("gate P-N grading coefficient")));
00056   Props.append(new Property("Kf", "0.0", false,
00057   QObject::tr("flicker noise coefficient")));
00058   Props.append(new Property("Af", "1.0", false,
00059   QObject::tr("flicker noise exponent")));
00060   Props.append(new Property("Ffe", "1.0", false,
00061   QObject::tr("flicker noise frequency exponent")));
00062   Props.append(new Property("Temp", "26.85", false,
00063   QObject::tr("simulation temperature in degree Celsius")));
00064   Props.append(new Property("Xti", "3.0", false,
00065   QObject::tr("saturation current temperature exponent")));
00066   Props.append(new Property("Vt0tc", "0.0", false,
00067   QObject::tr("Vt0 temperature coefficient")));
00068   Props.append(new Property("Betatce", "0.0", false,
00069   QObject::tr("Beta exponential temperature coefficient")));
00070   Props.append(new Property("Tnom", "26.85", false,
00071   QObject::tr("temperature at which parameters were extracted")));
00072   Props.append(new Property("Area", "1.0", false,
00073   QObject::tr("default area for JFET")));
00074 
00075   createSymbol();
00076   tx = x2+4;
00077   ty = y1+4;
00078   Model = "JFET";
00079   Name  = "T";
00080 }
00081 
00082 // -------------------------------------------------------
00083 Component* JFET::newOne()
00084 {
00085   JFET* p = new JFET();
00086   p->Props.getFirst()->Value = Props.getFirst()->Value;
00087   p->recreate(0);
00088   return p;
00089 }
00090 
00091 // -------------------------------------------------------
00092 Element* JFET::info(QString& Name, char* &BitmapFile, bool getNewOne)
00093 {
00094   Name = QObject::tr("n-JFET");
00095   BitmapFile = (char *) "nfet";
00096 
00097   if(getNewOne)  return new JFET();
00098   return 0;
00099 }
00100 
00101 // -------------------------------------------------------
00102 Element* JFET::info_p(QString& Name, char* &BitmapFile, bool getNewOne)
00103 {
00104   Name = QObject::tr("p-JFET");
00105   BitmapFile = (char *) "pfet";
00106 
00107   if(getNewOne) {
00108     JFET* p = new JFET();
00109     p->Props.getFirst()->Value = "pfet";
00110     p->recreate(0);
00111     return p;
00112   }
00113   return 0;
00114 }
00115 
00116 // -------------------------------------------------------
00117 void JFET::createSymbol()
00118 {
00119   Lines.append(new Line(-10,-15,-10, 15,QPen(Qt::darkBlue,3)));
00120   Lines.append(new Line(-30,  0,-10,  0,QPen(Qt::darkBlue,2)));
00121   Lines.append(new Line(-10,-10,  0,-10,QPen(Qt::darkBlue,2)));
00122   Lines.append(new Line(  0,-10,  0,-30,QPen(Qt::darkBlue,2)));
00123   Lines.append(new Line(-10, 10,  0, 10,QPen(Qt::darkBlue,2)));
00124   Lines.append(new Line(  0, 10,  0, 30,QPen(Qt::darkBlue,2)));
00125 
00126   Lines.append(new Line( -4, 24,  4, 20,QPen(Qt::darkBlue,2)));
00127 
00128   if(Props.getFirst()->Value == "nfet") {
00129     Lines.append(new Line(-16, -5,-11,  0,QPen(Qt::darkBlue,2)));
00130     Lines.append(new Line(-16,  5,-11,  0,QPen(Qt::darkBlue,2)));
00131   }
00132   else {
00133     Lines.append(new Line(-18,  0,-13, -5,QPen(Qt::darkBlue,2)));
00134     Lines.append(new Line(-18,  0,-13,  5,QPen(Qt::darkBlue,2)));
00135   }
00136 
00137   Ports.append(new Port(-30,  0));
00138   Ports.append(new Port(  0,-30));
00139   Ports.append(new Port(  0, 30));
00140 
00141   x1 = -30; y1 = -30;
00142   x2 =   4; y2 =  30;
00143 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines