QuantumWise Forum
May 24, 2013, 04:48 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1] 2   Go Down
  Print  
Author Topic: IV curves from analyzer  (Read 1297 times)
0 Members and 1 Guest are viewing this topic.
esp
Supreme ATK Wizard
*****

Reputation: 3
Offline Offline

United States United States

Posts: 318



View Profile WWW
« on: February 27, 2012, 03:34 »

when i plot IV curves from a transmission spectrum, i see a lot of bumps in the curve, corresponding to a bumpy trans spectrum .. but when i plot using the analyzer, it smoothes them out somehow .. the question is, is it physically correct to smooth it out .. or not?
Logged

--------------------------
E.Pataky    [Shocked>-<
Anders Blom
QuantumWise Staff
Supreme ATK Wizard
*****

Reputation: 36
Offline Offline

Denmark Denmark

Posts: 2816



View Profile WWW
« Reply #1 on: February 27, 2012, 15:34 »

No smoothing is done. I don't recognize the effect you mention.
Logged
esp
Supreme ATK Wizard
*****

Reputation: 3
Offline Offline

United States United States

Posts: 318



View Profile WWW
« Reply #2 on: February 27, 2012, 20:03 »

attached are the curves as seen in ATK analyzer, and also from the standard plotting script from the tutorials
Logged

--------------------------
E.Pataky    [Shocked>-<
Anders Blom
QuantumWise Staff
Supreme ATK Wizard
*****

Reputation: 36
Offline Offline

Denmark Denmark

Posts: 2816



View Profile WWW
« Reply #3 on: February 27, 2012, 20:37 »

Something is wrong. My best guess is that the plotting script making the jumpy curve does not sort the bias points - the values are correct by come in the wrong order, they are assigned to the wrong bias values.

Can you send me the details, since you have them at hand (and where you found them, exactly) then I don't have to go look for them, then I can fix them for you.
Logged
esp
Supreme ATK Wizard
*****

Reputation: 3
Offline Offline

United States United States

Posts: 318



View Profile WWW
« Reply #4 on: February 27, 2012, 21:12 »

ok let me piece this together ..

To do this simulation i start here:

Code:

gate_voltage_list = numpy.linspace(0.0, 1.5,16)*Volt
bias_voltage_list = [0.8]*Volt

doTransmission()


do transmission looks like this:

Code:


def doTransmission():
global logs
global nc_files
global plots
global dopingLvl
global dopingOn
global dopingType
global rowSelect
global colSelect
global dopeL
global dopeC
global dopeR
global rip
global outFileName
global outFileName2
global gate_voltage_list
global bias_voltage_list
global N_vals
global lengthVals
global transSpecEnergies
global kPntsX
global kPntsY
global kPntsZ
global ldos_energies
global iteration_control_parameters
global numerical_accuracy_parameters
global pps
global bafl
global SCF
global ldosBiasVoltage
global ldosGateVoltage
global vac
global doubleGate
global gateOverlap
global dist_1
global dist_2
global dist_3
global simType
global host

global length
global dopeType
global validDopingCfgs

# http://www.quantumwise.com/documents/tutorials/latest/GrapheneDevice/index.html/chap.further.html#chap.further.sect1.both

nlprint(str(gate_voltage_list));
nlprint(str(bias_voltage_list));

#read in the old configuration
device_configuration = nlread(nc_files + outFileName, object_id="cfg")[0]
calculator = my_DeviceHuckelCalculator()
metallic_region0 = device_configuration.metallicRegions()[0]
metallic_region1 = None
if doubleGate:
metallic_region1 = device_configuration.metallicRegions()[1]
device_configuration.setCalculator(calculator)
device_configuration.update()

# Define gate_voltages
for bias in bias_voltage_list:
for gate_voltage in gate_voltage_list:

if doubleGate:
device_configuration.setMetallicRegions([metallic_region0(value = gate_voltage), metallic_region1(value = gate_voltage)] )
else:
device_configuration.setMetallicRegions([metallic_region0(value = gate_voltage)] )

# Set calculator with applied bias on the configuration
# use the old selfconsistent state as starting input.
device_configuration.setCalculator(
calculator(electrode_voltages=(bias,0.0*Volt)),
initial_state=device_configuration)

gate_voltage_str = str(gate_voltage)
gate_voltage_str = gate_voltage_str.replace("_", "")
gate_voltage_str = gate_voltage_str.replace(" ", "")

bias_str = str(bias)
bias_str = bias_str.replace("_", "")
bias_str = bias_str.replace(" ", "")

voltageStr = "[vg" + gate_voltage_str + "][vds" + bias_str + "]"

#Analysis
#electron_density = ElectronDifferenceDensity(device_configuration)
#nlsave(nc_files + outFileName2, electron_density,object_id='dens'+voltageStr)

#electrostatic_potential = ElectrostaticDifferencePotential(device_configuration)
#nlsave(nc_files + outFileName2, electrostatic_potential, object_id='pot'+voltageStr)

# -------------------------------------------------------------
# Transmission spectrum
# -------------------------------------------------------------
transmission_spectrum = TransmissionSpectrum(
configuration = device_configuration,
energies = transSpecEnergies,
kpoints = MonkhorstPackGrid(1,1),
energy_zero_parameter = AverageFermiLevel,
infinitesimal = 1e-06*eV,
self_energy_calculator = KrylovSelfEnergy(),
)

nlsave(nc_files + outFileName2, transmission_spectrum,object_id='trans'+voltageStr)
now = date.today()
nlprint("doTransmission " + voltageStr + " " + str(now.strftime("%m-%d-%y %I:%M %p")))



the plotting function looks like this:

Code:

gate_voltage_list = numpy.linspace(0.0, 1.5,16)*Volt
bias_voltage_list = [0.8]*Volt
makeIVPlot_vsVgs()


and

Code:

def makeIVPlot_vsVgs():
global logs
global nc_files
global plots
global dopingLvl
global dopingOn
global dopingType
global rowSelect
global colSelect
global dopeL
global dopeC
global dopeR
global rip
global outFileName
global outFileName2
global gate_voltage_list
global bias_voltage_list
global N_vals
global lengthVals
global transSpecEnergies
global kPntsX
global kPntsY
global kPntsZ
global ldos_energies
global iteration_control_parameters
global numerical_accuracy_parameters
global pps
global bafl
global SCF
global ldosBiasVoltage
global ldosGateVoltage
global vac
global doubleGate
global gateOverlap
global dist_1
global dist_2
global dist_3
global simType
global host

global length
global dopeType
global validDopingCfgs

#make list of relevant temperatures
temperature=300*Kelvin

#make list to hold the current calculations
current_list = numpy.zeros( (len(bias_voltage_list), len(gate_voltage_list)) )

print str(current_list)

#plot the current as function of gatevoltage
import pylab
pylab.figure()

for m in range(len(bias_voltage_list)):
bias  = bias_voltage_list[m]

for n in range(len(gate_voltage_list)):
gate_voltage = gate_voltage_list[n]

gate_voltage_str = str(gate_voltage)
gate_voltage_str = gate_voltage_str.replace("_", "")
gate_voltage_str = gate_voltage_str.replace(" ", "")

bias_str = str(bias)
bias_str = bias_str.replace("_", "")
bias_str = bias_str.replace(" ", "")

voltageStr = "[vg" + gate_voltage_str + "][vds" + bias_str + "]"

if processIsMaster():
print voltageStr

transmission_spectrum = nlread(nc_files + outFileName2, object_id="trans"+voltageStr)[0]
(current_list[m])[n] = transmission_spectrum.current(electrode_temperatures=(temperature,temperature))

#print "vg(" + str(gate_voltage) + ")", current_list[n]
# for each gate voltage plot the IV curve versus bias voltage
pylab.plot(gate_voltage_list,current_list[m],label="vds(" + str(bias) + ")")

print str(current_list)

pylab.xlabel("Vgs (V)")
pylab.ylabel("Current (A)")

pylab.legend(loc="lower right")
pylab.grid(True)
pylab.savefig(plots + outFileName2 + "IVplot2.png",dpi=150)
#pylab.show()


Logged

--------------------------
E.Pataky    [Shocked>-<
Anders Blom
QuantumWise Staff
Supreme ATK Wizard
*****

Reputation: 36
Offline Offline

Denmark Denmark

Posts: 2816



View Profile WWW
« Reply #5 on: February 28, 2012, 11:23 »

Hmm, your Python code is a bit ... "non-pythonish" Smiley In general, don't use "global" unless you absolutely really 100% must have to! Instead, pass variables as arguments to functions.

Also, you can avoid the processIsMaster check by using nlprint(string), it's MPI safe.

Moreover, a general tip for the Forum is to embed Python code using the tag "code=python" (instead of just "code"), it gives nice formatting!

Now, I can't spot the error in your code, but I see one thing that may be an error or oversight. You attempt to plot the current as function of source-drain bias, for a fixed gate voltage. But actually you obtain the current as function of gate voltage, for a given source-drain bias.
Logged
esp
Supreme ATK Wizard
*****

Reputation: 3
Offline Offline

United States United States

Posts: 318



View Profile WWW
« Reply #6 on: February 28, 2012, 18:47 »

The points are obtained, as points, and unless I am missing something, it should not matter what order they are obtained ... (?)  i have two plotting functions, one for I vs Vds at each Vgs and one for I vs Vgs at each Vds ... the points themselves are identified with the voltageStr string variable .. when i plot, i simply read back (whether over Vgs or Vds it shouldn't matter), and plot them ... the points themselves each have thier own objid ... and each trans calc is independent isnt it?  no oversight there ... but i suppose i could run vs Vgs seperately from vs Vds, although that will double the time ... ?  I will try for simplicity but i don't understand why it would work ..

thank you
Logged

--------------------------
E.Pataky    [Shocked>-<
Anders Blom
QuantumWise Staff
Supreme ATK Wizard
*****

Reputation: 36
Offline Offline

Denmark Denmark

Posts: 2816



View Profile WWW
« Reply #7 on: February 28, 2012, 22:39 »

It is confusing, so let's simplify Smiley

First of all, you have to compare the same things. The IV tool only plots current against bias, it doesn't know anything about gate voltage. So if all those points are in the same file, it can probably get confused.

Moreover, you are looking at I against Vg for fixed , and comparing a curve of I against Vs (your two attached plots), so we really can't expect these to be equal.

I still think your jumpy curves from the fact that you have the right values of I, but they come in the wrong order. I can't see, in the Python, however, how that is possible, as you also say.

So, sure, we can ignore the IV tool and focus on getting your plot correct. I'm still stumped there, however... Is the NC file huge? Maybe you can http://letscrate.com it to me.

The point about the wrong plot I made was caused by the comment on one of the last lines in makeIVPlot_vsVgs which says "# for each gate voltage plot the IV curve versus bias voltage" - probably just a copy/pasted comment you forgot to change.

Btw, you can do

Code: (python)
bias_str = str(bias).replace("_", "").replace(" ", "")


Saves lines Wink
Logged
esp
Supreme ATK Wizard
*****

Reputation: 3
Offline Offline

United States United States

Posts: 318



View Profile WWW
« Reply #8 on: February 28, 2012, 22:53 »

I see, i did not realize the plot was against bias from the analyzer ...

attached is the nc file, it is not large at all ..

thank you for the comments
Logged

--------------------------
E.Pataky    [Shocked>-<
Anders Blom
QuantumWise Staff
Supreme ATK Wizard
*****

Reputation: 36
Offline Offline

Denmark Denmark

Posts: 2816



View Profile WWW
« Reply #9 on: February 28, 2012, 23:15 »

I extracted the currents without using your script and got the same jumpy behavior. So, it must be inherent in the saved transmission. Can't say more at this point; either it's an effect that is supposed to be there, for some reason, or something is not done right in the computation.
Logged
esp
Supreme ATK Wizard
*****

Reputation: 3
Offline Offline

United States United States

Posts: 318



View Profile WWW
« Reply #10 on: February 28, 2012, 23:18 »

ok yes and to give some more insight i have opened each trans spectrum manually and i see the "area under the curve" seems to increase and decrease .. so i figured it was correct ... when i plotted in the GUI i got confused, but that is because as i know now, the GUI does not plot versus gate voltage ... so now i know .. interesting effect though and I suppose it is a real effect due to the selective doping at different energies .. most papers use electrostatic doping, or some other method which is not atomically precise .. so maybe this effect is real and no one has shown it (cool for me) .. i have tons of data on this so i will investigate further ...
Logged

--------------------------
E.Pataky    [Shocked>-<
Anders Blom
QuantumWise Staff
Supreme ATK Wizard
*****

Reputation: 36
Offline Offline

Denmark Denmark

Posts: 2816



View Profile WWW
« Reply #11 on: February 28, 2012, 23:31 »

One thing I would suggest you to try, is to do lower, more realistic doping levels. This cannot be done by replacing individual atoms, because then you get into the n++ regime immediately, as you have now with "metallic semiconductors". While this can certainly be interesting and relevant sometimes, you may want to have a more traditional situation as well, with n/p doping instead (i.e. with the Fermi level in the gap).

To do this, you can manually add a certain amount of charge to the electrodes. In the script, at some point you will set the calculator on each electrode. Here, you can insert an additional keyword charge=0.001 or -0.001. You can convert this charge to a real doping density by considering the electrode cell size. The doping level needs to be calibrated, so check the electrode band structure again the charge (just for the bulk system), and you can see how nicely you can tune the Fermi level to any position you want in the gap.

In this case you should of course not have any dopant atoms as well, and don't forget to dope both electrodes, if needed. You can even do a gated p-i-n in this scheme. This approach also gets rid of having dopants in the central region, disturbing the transport properties in the part that nominally should be i-type.

Keep in mind you must do the gates simulations self-consistent, and you must set this explicitly since the default for Huckel is (unfortunately, I say) non-self-consistent for now.
Logged
esp
Supreme ATK Wizard
*****

Reputation: 3
Offline Offline

United States United States

Posts: 318



View Profile WWW
« Reply #12 on: February 28, 2012, 23:40 »

thank you very much ... i always do self-consistent, and i do not dope the center region .. i am not interested in Ef in the gap because i am looking at TFETs, but I will try the charge keyword for doping .. i wanted to try atomic level doping because I was thinking that is more realistic than specifiying a doping level that comes from some unknown source .. maybe I am wrong there, but certainly what you are suggesting would be much simpler .. i will try it.  thank you
Logged

--------------------------
E.Pataky    [Shocked>-<
esp
Supreme ATK Wizard
*****

Reputation: 3
Offline Offline

United States United States

Posts: 318



View Profile WWW
« Reply #13 on: February 29, 2012, 01:59 »

actually again i am curious about how this works .. if you specify a charge level in something like silicon, where you assume random doping locations .. this makes sense, but from what i have seen in Graphene, the specific location of the dopant atoms make a large difference .. so then, if you specify what seems to be a ficticious charge level, how does it take into account real interactions between the dopant atoms? ... or does it assume electrostatic doping?
Logged

--------------------------
E.Pataky    [Shocked>-<
Anders Blom
QuantumWise Staff
Supreme ATK Wizard
*****

Reputation: 36
Offline Offline

Denmark Denmark

Posts: 2816



View Profile WWW
« Reply #14 on: February 29, 2012, 09:37 »

You are right, it really depends on which physical situation you want to model. And for graphene, maybe explicit doping is more relevant.
Logged
Pages: [1] 2   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2006-2008, Simple Machines Valid XHTML 1.0! Valid CSS!