¿ªÔÆÌåÓý

Date

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
?


Re: Noise modelling

 

¿ªÔÆÌåÓý

I node there was something wrong. More data, please. Is this a physical SMPS, or a design, or a simulation? I guess it might be physical, in which case SPICE simulation may not be of much help. An SMPS produces a spectrum of all the harmonics of the switching frequency, usually of fairly constant amplitude up to a high harmonic (maybe the 51st; even harmonics are usually weaker) and above that, the amplitudes roll off quite steeply. So the next question is, what do? you count as 'noise'; harmonics above the 11th, say, or hash that is not significantly harmonic related? The third one is, are you measuring the noise at the mains input, as is suggested by your mention of 'filter'? I'd better stop at three questions, lest Father William kicks me downstairs.

This sounds like an EMC problem, rather than a simulation problem, You could use LTspice to help with the filter design, but it's usually more satisfactory to select a commercially-available filter, since they use tricks that are not in the public domain.

On 2025-02-21 19:55, Bell, Dave via groups.io wrote:

Reposting with the right Subject spelling!

?

From: [email protected] <[email protected]> On Behalf Of Bell, Dave via groups.io
Sent: Friday, February 21, 2025 11:54 AM
To: [email protected]
Subject: EXTERNAL: [LTspice] Node modelling

?

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

?

There has been some chatter here about noise generation over the years, but one simulation mode I don¡¯t recall seeing is use of the OTA Special Function with its various noise specs.

Does anyone have suggestions on how to use this Library device?

?

Thanks,

Dave

?

--
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: Noise modelling

 

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

Does anyone have suggestions on how to use this Library device?

I recommend examining the subcircuit models for LTspice's built-in UniversalOpamps, found in UniversalOpamp.lib.? Pair that with the symbols for each UniversalOpamp to see the typical parameter values.
?
It might also help to check a few physical op-amps that use the OTA.? For example, look at the LT1001 or LT1028 models which can be found inside the file LTC.lib.
?
These library files are in your computer's LTspice library, in the folder ...\lib\sub\ .
?
Using it in a schematic is simpler because you don't need to deal with all those extra grounded nodes that add up to 8.? Just add the OTA or OTA2 symbol to your schematic.? Then right-click on the symbol and add whatever parameters you want it to have.? The Help page shows the default values for each parameter, when they are not specified.
?
Andy
?


Re: Noise modelling

 

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

There has been some chatter here about noise generation over the years, but one simulation mode I don¡¯t recall seeing is use of the OTA Special Function with its various noise specs.

The OTA is not a simulation mode.? It is a device.
?
Think op-amp, but with a current output instead of voltage.? That's an Operational Transconductance Amplifier.
?
It happens that many OTAs in real life are meant to be used open-loop instead of closed-loop, and many of those have the added feature of a variable transconductance gain, which makes them usable as a VCA (voltage controlled amplifier), or modulator or multiplier.
?
You have probably used LTspice's OTA and not realized it.? It is at the heart of many of LTspice's op-amp models, including its Universal op-amps, and some of the models of physical op-amps too.? Add a load at the output of an OTA, and now you have a traditional op-amp with a voltage output.? And it is more SPICE-friendly.? (SPICE is more happy with Norton sources than Thevenin sources.)
?
The OTA's noise parameters are well documented in LTspice's Help.? It is considered one of the A-devices (Special Functions).? The bottom half of the Help page about A. Special Functions lists the OTA's parameters.
?
I do not think the OTA has anything in common with noise from a SMPS.? SMPS "noise" is predictable noise from switching currents.? It is not random.? The noise of an op-amp (either normal or OTA) is a random noise.? In SPICE, they are as much different from one another as you can make them.
?
Andy
?


Noise modelling

 

¿ªÔÆÌåÓý

Reposting with the right Subject spelling!

?

From: [email protected] <[email protected]> On Behalf Of Bell, Dave via groups.io
Sent: Friday, February 21, 2025 11:54 AM
To: [email protected]
Subject: EXTERNAL: [LTspice] Node modelling

?

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

?

There has been some chatter here about noise generation over the years, but one simulation mode I don¡¯t recall seeing is use of the OTA Special Function with its various noise specs.

Does anyone have suggestions on how to use this Library device?

?

Thanks,

Dave

?


Noise modelling

 

¿ªÔÆÌåÓý

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

?

There has been some chatter here about noise generation over the years, but one simulation mode I don¡¯t recall seeing is use of the OTA Special Function with its various noise specs.

Does anyone have suggestions on how to use this Library device?

?

Thanks,

Dave

?


Re: 12AU7 tube heater model

 

On Fri, Feb 21, 2025 at 11:56 AM, Carlo wrote:
Is that a sort of LTspice "internal" option not tracked as SPICE Netlist directive ?
Yes.
?
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.
?
Andy
?


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

 

On Fri, Feb 21, 2025 at 10:30 AM, john23 wrote:
How do I involve the opamp2 symbol into the symbol menu window shown below?
?
I'm sorry, but that question does not make sense.
?
The photo does not show a symbol menu.? It is a photo of your auto-generated symbol.? If you want to not use the auto-generated symbol, then do not add it to your schematic.? If it is on your schematic already, delete it from the schematic.
?
Add the opamp2 symbol to your schematic.? Edit the name next to it, from "opamp2", to the name you use for your "wrapper" subcircuit (the one that "wraps around" the actual AD797).? I used "MyAD797" in the example I showed previously.? Also get the netlist of that "wrapper" subcircuit into your simulation - either paste it directly onto the schematic (as a SPICE Directive), or include it as an .INCluded file.
?
Andy
?


Re: 12AU7 tube heater model

 

BTW, I checked the "Add GMIN across current sources" checkbox in Control Panel. However I can't see anything added or changed in the netlist (SPICE Netlist).
?
Is that a sort of LTspice "internal" option not tracked as SPICE Netlist directive ?
?
?


Re: 3 Phase Voltage Sense model

 

Andre,
?
Not driving any device, monitoring outputs to determine what the input voltage levels are.
?
Larry


Re: 3 Phase Voltage Sense model

 

Andy, straightened out the pin order on the schematic symbol to match the .sub file, really thought I had it straight but they were off.? Guess that's what happens when you're doing several things at one time.? Circuit simulates properly now with the 3Phase_Voltage_Sense.asy symbol.
?
Want to thank everyone for their feedback.
?
Larry


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

 

Hello Andy , very intresting Idea .Indeed I will keep the decomp pin open.
I am used to start with the netlist and generating a symbol automatickly.
How do I involve the opamp2 symbol into the symbol menu window shown below?
?
/g/LTspice/photo/294510/3888971?p=Created%2C%2C%2C20%2C2%2C0%2C0
?