Ejemplo n.º 1
0
from OSIM.Modeling.CircuitSystemEquations import CircuitSystemEquations
from OSIM.Simulation.CircuitAnalysis.CircuitAnalyser import CircuitAnalyser
from OSIM.Simulation.NetToComp import NetToComp

seq = CircuitSystemEquations(NetToComp('twoTrans.net').getComponents())
ca = CircuitAnalyser(seq)
ca.printDCOp(["R1"])
#ca.plot_lin(ca.getDCParamSweep('V1',0.7,1.3,0.005,["VoutMinus","VoutPlus"],'VCC',[2.3]))
Ejemplo n.º 2
0
from OSIM.Modeling.CircuitSystemEquations import CircuitSystemEquations
from OSIM.Simulation.CircuitAnalysis.CircuitAnalyser import CircuitAnalyser
import numpy as np
from OSIM.Simulation.NetToComp import NetToComp

seq = CircuitSystemEquations(NetToComp('GilbertMixer/GilberMixerEasy.net').getComponents())
ca = CircuitAnalyser(seq)
ca.printDCOp(["vCurMirror","Q7IT","Q6C","LOPlus","RFPlus","Q1C"])
imp1_180 = ca.getImpedanceAt("V1",180e9)
imp4_18 = ca.getImpedanceAt("V4",18e9)
imp5_18 = ca.getImpedanceAt("V5",18e9)

print("IMP1_180 @180G: %s"%str(imp1_180))
print("IMP4_18 @18G: %s"%str((imp4_18)))
print("IMP5_18 @18G: %s"%str(imp5_18))

#print(imp6)
#v1 = seq.getCompByName("V1").setInnerImpedance(imp[0])
#seq.getCompByName("V3").setInnerImpedance(imp[0])
#print(v1.getInnerImpedance())
#ca.plot_smith(ca.getSPAnalysis_semilogx(8,12,10,["V1","V3"]))
#ca.plot_semilogx(ca.getACAnalysis_semilogx("V1",["Q1C"],9,11,10)[0])

res = ca.getTrans(0,2e-10,1e-13,["Q3C","Q1C","LOPlus","RFPlus"])

# how to get a diff-Signal
out = np.zeros((2,res[0].shape[1]),dtype = np.float64)
for i in range(res[0].shape[1]):
    out[0][i] = (res[0])[0][i]
    out[1][i] = (res[0])[1][i] - (res[0])[2][i]
Ejemplo n.º 3
0
from OSIM.Modeling.CircuitSystemEquations import CircuitSystemEquations
from OSIM.Simulation.CircuitAnalysis.CircuitAnalyser import CircuitAnalyser
from OSIM.Simulation.NetToComp import NetToComp
import numpy as np

seq = CircuitSystemEquations(
    NetToComp('LoBuffer/LoBuffer.net').getComponents())
ca = CircuitAnalyser(seq)
#ca.printDCOp(["R11","Cur2Out","IN1","Q7IT","Q4IT","Q3IT"])
#ca.plot_semilogx(ca.getACAnalysis_semilogx("V2",["OUT1"],1,12,10)[0])
#ca.plot_smith(ca.getSPAnalysis_semilogx(2,12,10,["V2"]))

res = ca.getTrans(0, 3e-6, 1e-9, ["OUT2", "OUT1", "Cur2Out"])

# how to get a diff-Signal
out = np.zeros((2, res[0].shape[1]), dtype=np.float64)
for i in range(res[0].shape[1]):
    out[0][i] = (res[0])[0][i]
    out[1][i] = (res[0])[1][i] - (res[0])[2][i]

ca.plot_lin([out, ["diffout"], "transient"])

print("Max %G " % np.amax(np.absolute(out[1][:])))

ca.plot_lin(res)
Ejemplo n.º 4
0
#!/usr/bin/python
from OSIM.Modeling.CircuitSystemEquations import CircuitSystemEquations
from OSIM.Simulation.CircuitAnalysis.CircuitAnalyser import CircuitAnalyser
from OSIM.Simulation.NetToComp import NetToComp

circuit = 'TransistorTB.net'
#circuit = '__Circuits/TransistorInversTB.net'
#circuit = '__Circuits/twoTrans.net'
#circuit = '__Circuits/DiodeTB.net'
#circuit = '__Circuits/AmplifierTB2.net'
#circuit = '__Circuits/AmplifierTB.net'
#circuit = '__Circuits/lowpassTB.net'
#circuit = '__Circuits/CapacityTB.net'
#circuit = '__Circuits/SParameterTB.net'
#circuit = '__Circuits/TransAnalysisTB.net'
#circuit = '__Circuits/TransTransistorAnalysisTB.net'
#circuit = '__Circuits/LoBuffer.net'
#circuit = '__Circuits/Diffamp.net'

seq = CircuitSystemEquations(NetToComp(circuit).getComponents())
ca = CircuitAnalyser(seq)
#CharactersiticCurves(seq).createCharacteristicCurves('V2',-0.7, 1.3, 0.005,'P1V',1, 1.2 , 0.1, ["Q1IT"])
ca.plot_lin(ca.getDCParamSweep('V2', 0, 1.3, 0.005, ["Q1IT"], 'P1V', [0.9]))

#CircuitAnalysis(seq).calcDCOperatingPoint()
#ACAnalysis(seq).show(3, 11, 10, "OUT", 'P1V')
#SParameterAnalysis(seq).show(8, 12, 10)
#DCAnalysis(seq).show('V1', -1, 2, 0.01, ["D1", "1"])
#TransAnalysis(seq).show(0, 1e-10, 1e-13, ["OUT", "Q1IT"], "Q1IT")
Ejemplo n.º 5
0
from OSIM.Modeling.CircuitSystemEquations import CircuitSystemEquations
from OSIM.Simulation.CircuitAnalysis.CircuitAnalyser import CircuitAnalyser
from OSIM.Simulation.NetToComp import NetToComp

seq = CircuitSystemEquations(
    NetToComp('CurrentMirror/CurrentMirror.net').getComponents())
ca = CircuitAnalyser(seq)

ca.printDCOp(["R1", "RL"])
dcs = ca.getDCOpAt(["VIN", "N004"])
print(dcs)
print(dcs[1] - dcs[0])

ca.plot_lin(ca.getDCParamSweep('V2', 0, 3.3, 0.05, ["R2", "R1"], 'V1', [3.3]))
Ejemplo n.º 6
0
from OSIM.Modeling.CircuitSystemEquations import CircuitSystemEquations
from OSIM.Simulation.CircuitAnalysis.CircuitAnalyser import CircuitAnalyser
from OSIM.Simulation.NetToComp import NetToComp

seq = CircuitSystemEquations(NetToComp('ECLLatch/ECLLatch.net').getComponents())
ca = CircuitAnalyser(seq)
ca.printDCOp(["R1","OUT+"])
Ejemplo n.º 7
0
from OSIM.Modeling.CircuitSystemEquations import CircuitSystemEquations
from OSIM.Simulation.CircuitAnalysis.CircuitAnalyser import CircuitAnalyser
from OSIM.Simulation.NetToComp import NetToComp

seq = CircuitSystemEquations(NetToComp('Transistor/TransDiode.net').getComponents())
ca = CircuitAnalyser(seq)

#ca.printDCOp(["R1","R2","Q1IT"])
#dcs = ca.getDCOpAt(["Q_BC","Q_E"])
#print(dcs)
#print(dcs[1]-dcs[0])
#print (seq.compDict)
#np.set_printoptions(precision=1)
#print(seq.A.real)
#print("#############")
#print(seq.b.real)
#print("#############")
#print(seq.g.real)

ca.plot_lin(ca.getDCParamSweep('V1',0.0,3.3,0.01,["Q1IT"],'bla',[3.3]))
#ca.plot_lin(ca.getDCParamSweep('V1',0.6,1,0.001,["Q1IT"],'bla',[3.3]))

Ejemplo n.º 8
0
from OSIM.Modeling.CircuitSystemEquations import CircuitSystemEquations
from OSIM.Simulation.CircuitAnalysis.CircuitAnalyser import CircuitAnalyser
import numpy as np
from OSIM.Simulation.NetToComp import NetToComp

seq = CircuitSystemEquations(
    NetToComp('GilbertMixer/GilberMixerAdvanced.net').getComponents())
ca = CircuitAnalyser(seq)
ca.printDCOp(["vCurMirror", "Q7IT", "Q6C", "LOPlus"])
imp1_180 = ca.getImpedanceAt("V1", 180e9)
imp4_18 = ca.getImpedanceAt("V4", 18e9)
imp5_18 = ca.getImpedanceAt("V5", 18e9)

print("IMP1_180 @180G: %s" % str(imp1_180))
print("IMP4_18 @18G: %s" % str((imp4_18)))
print("IMP5_18 @18G: %s" % str(imp5_18))

#print(imp6)
#v1 = seq.getCompByName("V1").setInnerImpedance(imp[0])
#seq.getCompByName("V3").setInnerImpedance(imp[0])
#print(v1.getInnerImpedance())
#ca.plot_smith(ca.getSPAnalysis_semilogx(8,12,10,["V1","V3"]))
ca.plot_semilogx(ca.getACAnalysis_semilogx("V1", ["Q1C"], 9, 11, 10)[0])

res = ca.getTrans(0, 0.1e-9, 1e-13, ["Q4C", "Q1C", "LOPlus"])

# how to get a diff-Signal
out = np.zeros((2, res[0].shape[1]), dtype=np.float64)
for i in range(res[0].shape[1]):
    out[0][i] = (res[0])[0][i]
    out[1][i] = (res[0])[1][i] - (res[0])[2][i]
Ejemplo n.º 9
0
from OSIM.Modeling.CircuitSystemEquations import CircuitSystemEquations
from OSIM.Simulation.CircuitAnalysis.CircuitAnalyser import CircuitAnalyser
from OSIM.Simulation.NetToComp import NetToComp

seq = CircuitSystemEquations(NetToComp('Diverses/SpileTB.net').getComponents())

print(seq.A)

ca = CircuitAnalyser(seq)

#ca.calcDCOperatingPoint()

ca.plot_lin(ca.getTrans(0, 3e-6, 1e-9, ["IN", "OUT"]))
Ejemplo n.º 10
0
from OSIM.Modeling.CircuitSystemEquations import CircuitSystemEquations
from OSIM.Simulation.CircuitAnalysis.CircuitAnalyser import CircuitAnalyser
from OSIM.Simulation.NetToComp import NetToComp

seq = CircuitSystemEquations(
    NetToComp('Diverses/PlusTest.net').getComponents())
ca = CircuitAnalyser(seq)

ca.plot_lin(ca.getTrans(0, 4e-6, 1e-9, ["VIN", "VOUT"]))

ca.plot_lin(ca.getTrans(0, 4e-6, 1e-9, ["VIN", "VOUT"]))
Ejemplo n.º 11
0
from OSIM.Modeling.CircuitSystemEquations import CircuitSystemEquations
from OSIM.Simulation.CircuitAnalysis.CircuitAnalyser import CircuitAnalyser
from OSIM.Simulation.NetToComp import NetToComp

#seq = CircuitSystemEquations(NetToComp('Transistor_invers.net').getComponents())
#ca = CircuitAnalyser(seq)
#ca.plot_lin(ca.getDCParamSweep('V2',0,0.3,0.001,["Q1bi","Q1ci","Q1ei"],'V1',[0.85]))

seq = CircuitSystemEquations(
    NetToComp('Transistor_invers.net').getComponents())
ca = CircuitAnalyser(seq)
ca.plot_lin(ca.getDCParamSweep('V2', 0, 0.5, 0.01, ["Q1IT"], 'V1', [0.85]))
Ejemplo n.º 12
0
from OSIM.Modeling.CircuitSystemEquations import CircuitSystemEquations
from OSIM.Simulation.CircuitAnalysis.CircuitAnalyser import CircuitAnalyser
from OSIM.Simulation.NetToComp import NetToComp

seq = CircuitSystemEquations(
    NetToComp('DiffAmplifier/Diffamp.net').getComponents())
ca = CircuitAnalyser(seq)
ca.printDCOp(["R6", "R3", "VCurSource"])
#print(seq.x)
#max = np.amax(np.absolute(seq.x))
#print(max)
#ca.plot_lin(ca.getDCParamSweep('V1',1,3.3,0.05,["VoutPlus","VoutMinus"],'VCC',[3.3]))
ca.plot_semilogx(ca.getACAnalysis_semilogx("V1", ["VoutPlus"], 2, 10, 11)[0])