|
From: Patrick K. <p....@po...> - 2026-02-22 11:22:01
|
To Holger Vogt and Daniel Marks: Thanks for you quick advice on this question. Sorry for the delayed response. I had to work on other issues so I did not have to time to look into this more than superficially. I will check out what you have recommended and let you know the outcome. I am still busy with other things (I also have a tape-out coming up, that does not help :D), so it might be a while. I just wanted to let you know that I did not simply ignore your messages. Thanks, kind regards, Patrick On Sat, 2026-02-07 at 15:55 +0100, Holger Vogt wrote: > You are asking for a 'simple' way. Simplicity here depends on your > background know-how. > > You might use a circuit for the frequency measurement. > > In the ngspice distribution we offer a pll (phase locked loop) > circuit > ( > https://sourceforge.net/p/ngspice/ngspice/ci/pre-master-46/tree/exampl > es/xspice/pll/), > which probably could serve this task, but needs to be adapted to your > requirements (center frequency, frequency deviation). > > You might google for FM (frequency modulation) detectors. > > A (zero crossing) function may probably be constructed with > behavioural > sources like the B source (manual chapter 5). But this is tricky, as > the > transient simulation uses non-constant time steps, and the chosen > time > steps will not be exactly at the crossing. So one needs a sort of > interpolation. > > If you are fit in C programming, you might program a code model > (examples are described in chapter 8 of the manual) to fulfill > exactly > your requirements. > > > > > _______________________________________________ > Ngspice-users mailing list > Ngs...@li... > https://lists.sourceforge.net/lists/listinfo/ngspice-users |