[Ktechlab-devel] Use case analysis, 2A3 amp. =P

Alan Grimes agrimes at speakeasy.net
Tue Nov 18 15:17:05 UTC 2008


Glen wrote:
> I care about the tubes. They're important for what I want to do as well.



> Ugh, modeling transformers. Has to happen, but ugh!

;)
I don't think it will be too bad to start out with the basics, the
primary number of turns and the turns ratio, but after that we get into
all kinds of issues such as the geometry of the windings and parasitic
effects...

> If the instantaneous approximation doesn't work, what would you suggest?
> I'll need to hit response up to 20Hz, but to simulate RF frequencies I
> dunno about. The current simulator uses a QTimer to fire the steps, and
> in the code it says this is limited to 1000 per sec. I don't know if
> it's still a limit, though.

The limit is hard coded into Simulator.h, see LINEAR_UPDATE_RATE.

It basically sets the time quantum for digital at 1 microsecond, and the
analog time quantum at 100 microseconds. (if I'm doing my math right...)

So for the a linear component, at the coded limit of 1khz, the simulator
is only integrating the waveform over ten intervals, and even still it
is VERY slow, I estimate that it's worse than 1/50th real time.

So it's great for DC, OK for line frequencies, but it's just not good
enough to usefully do AF...

One thing that could be done to speed it up is to use multiple threads.
Right now I think it does everything in a single thread.. I was trying
to use VCCS components to simulate tubes last night and the simulation
quickly bogged down to a crawl and the UI became unresponsive. (okay
okay, I built my machine in 2003 and it uses DDR 266 memory). That
should earn us maybe 20%, but not the orders of magnitude improvements
we need. -- A 20 mhz oscilloscope is considered minimal for audio work. =\

OpenMP is the current preferred method of implementing paralellism...
Doing that would require profiling and a structural review of the code. =\

I think the component library is a much higher priority right now.


-- 
New president: Here we go again...
Chemistry.com: A total rip-off.
Powers are not rights.





More information about the Ktechlab-devel mailing list