|
From: ngspice u. <d16...@ti...> - 2025-12-04 09:12:01
|
02.12.2025 01:37, Holger Vogt пишет:
> start at 1, end at 2.
> How many vector points do you have after linearization? 101
> How many intervals of 10ms each do you have between start and end? 100
Thanks for your reply.
It still looks odd, but maybe it's a quirk of ngspice. It seems obvious
to me that a specific time reference (and its surroundings within the
step duration) corresponds to a parameter value. You're describing a
different logic, which is probably at work in ngspice.
I've reworked the example, or rather, removed the simplifications I made
to ask the question on the mailing list with minimal details, and now it
still has oddities with the time scale even in the version you're
describing, if I understand correctly.
Perhaps you'd have a moment to look at my example? Thank you.
-------
* 1.sch
.PARAM freq = 100e6 omega = freq*3.14159265*2
.PARAM RK = 20
.PARAM Q = 4
.PARAM LK = RK/(omega*Q) CK = Q/(omega*RK)
QKT922B_1 Uk Ub 0 QMOD_KT922B_1 AREA=1
.MODEL QMOD_KT922B_1 npn (Is=292.3F Nf=1 Nr=1 Ikf=2.359 Ikr=1.68
Vaf=81.41 Var=0 Ise=4.199P Ne=1.406 Isc=17.13P Nc=1.803 Bf=84.63 Br=1
Rbm=0 Irb=0 Rc=0.9759 Re=0 Rb=2 Cje=153.3P Vje=0.75 Mje=0.33 Cjc=48.58P
Vjc=0.75 Mjc=0.33 Xcjc=1 Cjs=0 Vjs=0.75 Mjs=0 Fc=0.5 Tf=211.6P Xtf=0.45
Vtf=40 Itf=8 Tr=141.3N Kf=0 Af=1 Ptf=0 Xtb=1.5 Xti=3 Eg=1.11 Tnom=26.85 )
V2 _net0 0 DC 12
VIk _net1 Uk DC 0
VIb _net2 Ub DC 0
V3 _net2 0 DC 0 SIN(0 1.5 100MEG 0 0 0) AC 1.5 ACPHASE 0
C_K _net1 _net0 {CK}
R_K _net1 _net0 {RK} tc1=0.0 tc2=0.0
L_K _net0 _net1 {LK}
.control
; -- ~200 steps per period: 5e-11 --
; -- 99-th period starts with: 9.9e-7 --
; -- 100-th period starts with: 1e-6 --
; -- analyze 99-th period --
tran 5e-11 1e-6 9.9e-7
linearize vik#branch
fourier 100MEG vik#branch
exit
.endc
.END
-------
So, after simulating and linearizing the results, I get a time vector
that starts at 9.900000e-07 seconds and ends at 1.000000e-06 seconds.
The difference between the last and first time values is 1.00000e-08
seconds, which corresponds to a frequency period of 100 MHz. Great, I'm
trying to perform a Fourier analysis with the fundamental frequency of
100 MHz and getting the error "wavelength longer than time span" I don't
understand what's wrong this time.
Do you have any thoughts on this?
Thank you.
|