¿ªÔÆÌåÓý

Date

Re: 12AU7 tube heater model

 

FYI - My advice about adding GMIN across current sources, is that you should specifically add them to your current sources, by adding a resistor in parallel with them.
?
The checkbox in the Control Panel's Hacks! tab is not permanent (it goes away when you close and then re-start LTspice), and it does not solve any topology problems and won't eliminate that error you had.? If you think you need a conductance added across your current sources, do it by adding resistors to the schematic!? That is my advice.
?
Andy
?
?


Re: Build spice model of transimpedance amplifier

 

Keep in mind, this question was asked nearly a year ago.? This conversation ran out months ago and I don't know if the OP is still looking for answers.
?
If I remember correctly, that person was looking to find an actual transimpedance amp they could purchase, for a specific high-speed application.
?
Andy
?
?


Re: 12AU7 tube heater model

 

On Sat, Feb 22, 2025 at 11:55 AM, Carlo wrote:
Do you think .options gmin=<value> is actually the same as "Add GMIN across current sources" checkbox?
No, they are not the same.
?
".options gmin=<value>" sets GMIN to a number.? GMIN is used in a number of places in SPICE/LTspice, including in parallel with EVERY semiconductor junction.? GMIN is used in other places too.? If you search LTspice's Help for "GMIN", you can see some of the other places.
?
Checking the checkbox to "Add GMIN across current sources" adds yet another place where a conductance with value GMIN may be added.? But for that to work, first GMIN needs to have a value.? Giving GMIN a value does not cause it to magically appear in extra places where it does not normally appear.? Note that GMIN must always have a value.? SPICE won't run without it.

In other words, does .options gmin=<value> add a <value> Siemens conductance in parallel to each (controlled or independent) current sources as well ?
No, not unless you check that checkbox!
?
Again, I note that GMIN always has a value.? Its normal value is 1e-12, as shown on the Help page for .OPTIONS.? It can also be set in the Control Panel, and that is the same GMIN.? It might not be possible to set GMIN to 0.0000000000000.? Trying to do that might instead set it to its default value of 1e-12.? SPICE/LTspice might not run at all if GMIN were actually set to 0, or if it did, it might run poorly.? All this has nothing to do with current sources.? GMIN is a necessary convergence aide to help SPICE converge when there are semiconductor PN junctions, as well as a handful of other things.
?
(Interesting note:? LTspice also uses the value of GMIN to set a minimum resistance value, in certain cases where a resistance must not reach zero.? That is kind of contrary to engineering logic, because GMIN is supposed to be a small conductance, not a small resistance.? But it silently does that anyway.? I guess it does this as a way of avoiding yet one more OPTION variable.? Yes it's cheating, but it works.)
?
Andy
?
?


Re: Build spice model of transimpedance amplifier

 

I have never been mistaken for an analog designer but if your application demands bandwidth, would considering a current feedback amplifier as the basis of your transimpedance amp be a consideration?? I'm not sure if you're able to use a device with an external resistor or not.? I don't know your application and even if I did I probably wouldn't appreciate the intricacies of its design.? So, best wishes,
Coop, aa1ww
?


Re: 12AU7 tube heater model

 

Thank you Andy.
Do you think .options gmin=<value> is actually the same as "Add GMIN across current sources" checkbox? In other words, does .options gmin=<value> add a <value> Siemens conductance in parallel to each (controlled or independent) current sources as well ?


Re: using LTSPICE symbols for representation of spice netlist of OPAMP

 

john23,
?
Apparently, LTspice incorrectly processes the AD797 model file.? I don't understand why it did that, but here is how to fix it.
?
Change from this:
.SUBCKT MyAD797 In+ In- V+ V- Out
X? In+ In- V+ V- Out Decomp? AD797
.LIB AD797.cir
.ENDS MyAD797
to this:
.SUBCKT MyAD797 In+ In- V+ V- Out
X ?In+ In- V+ V- Out Decomp ?AD797
.ENDS MyAD797
.LIB AD797.cir
?
By the way, you uploaded the wrong schematic.? The schematic you simulated is not the one you uploaded.
?
Andy
?
?
?


12AU7 tube heater model

 

¿ªÔÆÌåÓý

For tubes/valves, I always look into Radio Designer's Handbook, because the editor was a particular expert on them. Well-hidden in Figure 35.14, in the chapter on communications receivers, is a current/voltage curve for a 6.3 V 0.3A heater, which is one way of powering the 12AU7 heater, both sections in parallel. A bit of Excel work gives a resistance trend line (for voltages between 3.0 and 6.5)? R = 0.22*V^2 + 3.61*V + 6.50. The R^2 (accuracy measure) = 0.9993, good enough for government work. With the sections? series, the resistance is obviously 4 times as large.

I think using this in the model will eliminate the potentially troublesome singularity. I have to say that I also found elsewhere resistivity/temperature data for pure tungsten, which shows very close to a linear law, but the RDH data above 6.5 V shows a steepish increase. Whether that is because the heater wire is not pure tungsten, I do not, of course, know.

--
OOO - Own Opinions only If something is true: * as far as we know - it's science *for certain - it's mathematics *unquestionably - it's religion

Virus-free.


Re: Looking for advice on TRAN timing #FFT

 

Ryu,
?
See the file STEP_Sine_FFT.zip that I uploaded to the Temp folder.? It shows what happens to your waveform when you .STEP the .TRAN simulation's stop time.? When the waveforms are separated into different plot panes, you can see that part of some waveforms are missing.? That causes the FFT to process a modulated signal, unless you restrict the time interval that is passed to the FFT.? Without that step, the FFT processes the waveform over the full extent of the simulated data, which includes time where some of the .STEPs were not simulated.
?
Andy
?


Re: 12AU7 tube heater model

 

On Sat, Feb 22, 2025 at 08:46 AM, Carlo wrote:
From , you can explicitly add specific option directives on .asc schematics, then to the auto-generated netlist:
You do not need to look in the LTwiki's "undocumented" options for that.? It is standard in LTspice, in fact in all SPICE programs.? LTspice's Help is somewhat terse about it and does not show you how to add the .options command, assuming that you know how to add SPICE Directives already.? But the list of (most of the) .options choices is on the Help page for LTspice?? > Dot Commands > .OPTIONS -- Set Simulator Options.
?
.options gmin
.options gshunt
.options gfarad
.options gfloat
The correct format should be something like this:
.options gmin = 1e-14
.options gshunt = 0
.options gfarad = 1e-13
.options gfloat = 0.001
or this:
.options gmin = 1e-12 gshunt=1e-13 gfarad=1e-14
where each option is given a numerical value.
?
BTW, just few days ago, I realized that LTspice can run a netlist directly (just open the netlist and run it).
I believe that this has been somewhat restricted now, in LTspice version 24.1.? Previous versions generated a SPICE Netlist file when they ran, which was saved on your drive but deleted when LTspice is closed.? Version 24.1 no longer generates a runnable SPICE Netlist file.? I believe it can still run (process) a Netlist file if you have one, but saving one might no longer be an option.? I could be wrong.
?
Andy
?


Re: Build spice model of transimpedance amplifier

 

You could start with a current controlled voltage source. It is the H device in the list of circuit elements.


Re: 12AU7 tube heater model

 

On Fri, Feb 21, 2025 at 11:41 AM, Andy I wrote:
?
SPICE (and by extension LTspice) adds GMIN and others such as GSHUNT, GFARAD, and GFLOAT wherever they are needed, and that is done internally and they do not appear in the netlist.? That's just how it is done.? They are not explicit components
From , you can explicitly add specific option directives on .asc schematics, then to the auto-generated netlist:
?
.options gmin
.options gshunt
.options gfarad
.options gfloat
?
BTW, just few days ago, I realized that LTspice can run a netlist directly (just open the netlist and run it).
?
Carlo.


Re: using LTSPICE symbols for representation of spice netlist of OPAMP

 

Hello Andy , I am trying to implement the method you reccomended.
I have added the OPAMP2 symbol and made the include command for the ad797.cir file.
then I tried to added the spice directive script? for a wrapper but I got and error.
It says U1:22 uknown circuit node.
Where did I go wrong?
Ltspice files and error massage are attached in the ZIP.?
.SUBCKT MyAD797 In+ In- V+ V- Out
X? In+ In- V+ V- Out Decomp? AD797
.LIB AD797.cir
.ENDS MyAD797
?
?
/g/LTspice/files/Temp/22_02_25.zip


Re: Looking for advice on TRAN timing #FFT

 

@Tony
Thank you for your answer, Tony. Is the new version available in the Files section?
I also had a look at the PDF file you mentioned.
I presume Tswp stands for sweep time, Tdel for the time you delete from the beginning,?
and Mcycles for the amount of cycles that you actually use for measuring, is that right?
?
Ryu


Re: Looking for advice on TRAN timing #FFT

 

On Sat, Feb 22, 2025 at 12:02 AM, Ryu wrote:
One more thing that troubles me is: when I step Tstop from let's say 12m to 18m in (1m or whatever) steps and thereafter do an FFT on v(out), only the very last step is displayed as an FFT as I expect it to be . . . :-(
I am a little confused whether it works as you expected, or not as you thought and this troubles you.
?
I suspect there could be a problem doing an FFT when .STEPping Tstop, if the requested time interval is not the same in all of them.? I think the FFT is performed all at once, and that would not work unless the time interval is correct.? I think you can compensate for that by specifying a time range for the FFT that is smaller than that of the shortest .STEP, and is appropriate for the waveform's frequency.? Thus it would apply the FFT over only a portion of the saved waveforms, which is hopefully the same time interval regardless of the .STEP.
?
It looks like some of your FFT spectra in your uploaded screenshots are corrupted.? Maybe that happened because of the time interval problem described above.? The "Run: 1/2" plot in your "FFT-step Tstop 10m + 12m.png" looks particularly bad.? "Run: 1/2" in "FFT-step Tstop 12m + 18m.png" looks bad too.
?
Note it might help to turn on View > Mark Data Points, to see where the "real" spectral data is.
?
Andy
?


Re: Looking for advice on TRAN timing #FFT

 

Maybe I should have mentioned that the D.U.T is nothing extraordinary, it is a Bryston DOA33 replacement (discrete opamp)?
and? a mere 10dB amplification.
?
--
Ryu


Re: Looking for advice on TRAN timing #FFT

 

To all who replied so far a hearty thanks! I will do some more experimenting as supposed by Andy.
?
One more thing that troubles me is: when I step Tstop from let's say 12m to 18m in (1m or whatever) steps and thereafter do an FFT on v(out), only the very last step is displayed as an FFT as I expect it to be . . . :-(
As a reference I've uploaded two screenshots to the Photos directory. They are in the album "TRAN param query (Ryu)"
?
--
Regards,
Ryu


Re: Build spice model of transimpedance amplifier

 

On Tue, May 21, 2024 at 05:14 AM, Andy I wrote:
I might be wrong, but it appears that ADI has rearranged their product selection pages and made them more difficult to navigate,?
You are not wrong.
--
Michael Stokowski
LTspice Team
Analog Devices Inc.


Re: Noise modelling

 

¿ªÔÆÌåÓý

Thanks, Andy, this helps.

The noise (I recently got some scope traces) appears to be uncorrelated to anything like the SMPS, but more likely environmental, within the equipment. Without a spectrum analysis, it looks similar to white noise.

I definitely need time-domain simulation now; may characterize any filter I come up with in the frequency doman later.

?

Dave

?

From: [email protected] <[email protected]> On Behalf Of Andy I via groups.io
Sent: Friday, February 21, 2025 1:29 PM
To: [email protected]
Subject: EXTERNAL: Re: [LTspice] Noise modelling

?

On Fri, Feb 21, 2025 at 02:54 PM, Bell, Dave wrote:

I just got tasked with trying to characterize (and filter) a noisy switch-mode power supply,

If what you want to do is make a substitute model that also generates semi-random noise, and if you want to do that in the time domain, then I refer you to LTspice's rand(x), random(x), and white(x) functions which are used with B-sources.? They generate TIME-DOMAIN semi-random signals, which could be used to simulate noisy things in the time domain.

?

Note well that SPICE (and LTspice) has two separate universes here: time-domain randomness, and frequency-domain noise.

  • When you do a time-domain simulation of real noisy semiconductors, they simulate with zero time-domain noise.? All noise parameters of transistors, diodes, and OTA devices are ignored when doing time-domain simulations.? But EMI noise from switching signals is revealed, in time-domain simulations.
  • When doing a .NOISE analysis, SPICE/LTspice uses the noise parameters of those semiconductors and OTA devices.? But it ignores the time-domain semi-random signals from SMPS switching, and from rand(x), random(x), and white(x)

?

I suppose one could use an OTA to mimic the frequency-domain noise coming from an SMPS.? It would take work.? You would need to characterize the SMPS's noise in the frequency domain (spectrum analyzer), then try to make the OTA mimic its shape.? That could be challenging since SMPS-based EMI is anything but random and it has peaks and gaping holes in its spectrum, which semiconductor-based random noise lacks.

?

Andy

?


Re: Noise modelling

 

Dave,
?
If you want to study the effectiveness of adding filters to reduce SMPS noise, you could use a B-source with rand(x), random(x), or white(x) to mimic a "typical" SMPS.? When simulated correctly, the noise spectrum from those semi-random sources is fairly flat, up to a point.? Then you could use LTspice's FFT feature and examine the before-and-after spectrum from adding a filter.
?
For most users, the differences between rand(x), random(x), and white(x) are rather minor except for the DC offset.? I recommend white(x).
?
Andy
?


Re: Noise modelling

 

On Fri, Feb 21, 2025 at 02:54 PM, Bell, Dave wrote:

I just got tasked with trying to characterize (and filter) a noisy switch-mode power supply,

If what you want to do is make a substitute model that also generates semi-random noise, and if you want to do that in the time domain, then I refer you to LTspice's rand(x), random(x), and white(x) functions which are used with B-sources.? They generate TIME-DOMAIN semi-random signals, which could be used to simulate noisy things in the time domain.
?
Note well that SPICE (and LTspice) has two separate universes here: time-domain randomness, and frequency-domain noise.
  • When you do a time-domain simulation of real noisy semiconductors, they simulate with zero time-domain noise.? All noise parameters of transistors, diodes, and OTA devices are ignored when doing time-domain simulations.? But EMI noise from switching signals is revealed, in time-domain simulations.
  • When doing a .NOISE analysis, SPICE/LTspice uses the noise parameters of those semiconductors and OTA devices.? But it ignores the time-domain semi-random signals from SMPS switching, and from rand(x), random(x), and white(x)
?
I suppose one could use an OTA to mimic the frequency-domain noise coming from an SMPS.? It would take work.? You would need to characterize the SMPS's noise in the frequency domain (spectrum analyzer), then try to make the OTA mimic its shape.? That could be challenging since SMPS-based EMI is anything but random and it has peaks and gaping holes in its spectrum, which semiconductor-based random noise lacks.
?
Andy
?