Thanks'. I will start to look in to the source code. The book might be helpful also.
Hello! Yes I agree. It is more like "operating point output variables ". I just used the name convention in section 31.5.1.1 in the user manual v33. Sorry, I made a typo when calculating cb. Now I get fairly similar result when I compare cb + cje with @q1[cpi]. I submitted the code below if someone is interested. However, I'm still interested in how ngspice calculates the "operating point output variables" (section 31.5.1.1 in the manual). If any documentation is available I would be happy. Otherwise...
Hello! How are the BJT instance parameters calculated in ngspice? For instance cpi and cmu. It is a level 1 NPN. Is there any reference documentation I can read? I have understood that the calculations are based on the Gummel-Poon model. However, when I manually calculate cpi based on the model parameters and the Q-point values I get a cpi that seems normal but the cpi from ngspice, using print @q1[cpi], is more than 10 timer higher. Probably I have made some mistake somewhere but it would help if...
Ok, it seems difficult to realise this 2-port! About the last section; Normally, BJT's have complex-valued y-parameters that are frquency dependent and thus the gain is frequency dependent. In my case, I'm only interested in one frequency so it would be good enough to put in y-parameters for that particular frequency. I have briefly been looking at code models in XSpice. It seems to be possible to define models with complex math operations. But it's a major step (for me) to start to compile models....
Ok, it seems difficult to realise this 2-port! About the last section; Normally, BJT's have complex-valued y-parameters and the gain is frequency dependent. I have briefly been looking at code models in XSpice. It seems to be possible to define models with complex math operations. But it's a major step (for me) to start to compile models. I didn't know it was possible to use complex numbers in the interpreter as you are writing, thanks for that! /Fredrik
Thanks for your answer! It's in the frequency domain. In the code balow I have simulated an 3 db attenuator with y-parameters. In the general case yxx is a complex number. Is it possible to assign a complex number to yxx here? I'm looking for a way to solve the 2-port equation. /Fredrik * .param y11={1/292 + 1/17.6} .param y12={-1/17.6} .param y21=y12 .param y22={1/292 + 1/17.6} *source V1 10 0 dc 0 ac 1 Rin 10 1 50 *2-port, B1 is port 1, B2 is port 2 B1 1 0 I = v(1)*{y11} + v(2)*{y12} B2 2 0 I =...
Hello! Is it possible to simulate a 2-port network with y-parameters in ngspice? The equations are I1 = y11V1 + y12V2 I2 = y21V1 + y22V2 yxx are complex numbers I was looking at the nonlinear dependent source Bx to generate the currents I1 and I2 but I can't find out how to handle complex numbers. Any ideas?
OK! I would like to plot ic in a BJT in ac mode. Would the best way be to add a 0V voltage source in serie with the collector?