¿ªÔÆÌåÓý


Re: Hello guys. Please help my Thesis. I want to make Comparators design of sar adc i have built Comparator in LTspice i wanna analysis. But i cant PLEASE HELP ME OUT

 

Input Offset Voltage, Input-Referred Noise, Regeneration Time, Power Consumption, Kickback Noise, Input Common-Mode Range, Supply Voltage. I need these parameters analysis in LTspice PLEASE HELP ME
?


Hello guys. Please help my Thesis. I want to make Comparators design of sar adc i have built Comparator in LTspice i wanna analysis. But i cant PLEASE HELP ME OUT

 

Hello guys. Please help my Thesis. I want to make Comparators design of sar adc i have built Comparator in LTspice i wanna analysis. But i cant PLEASE HELP ME OUT


Re: LTspice accuracy, used for calculations and measurements

 

Udo,
?
I have more detail to add to this discussion, which might be marginally helpful to you.
?
First, I was incorrect when I suggested that LTspice's?value for pi maybe had only 12 digits.? That was wrong.? But .MEAS command printouts are limited to 12 digits maximum.
?
The internal value for pi appears to be approximately
3.1415926535897931...
which compares favorably with the value quoted in Help:
3.14159265358979323846
both of which are shown here with more digits than double-precision theoretically provides.? ?(Which means that both numbers might have meaningless digits by the end of what is displayed here.)
?
When comparing your pi and sqrt(x)**2 calculations, they differed by less than 1e-15, so they are at about the limit of double-precision math.? I saw no difference in that calculation between the Normal and Alternate solvers.? But I tried this on only one version of LTspice.? (My plans are to get several versions up and running again, but not for today.)
?
NUMDGT and MEASDGT do things differently:
?
If NUMDGT is omitted or set to 6 or below, LTspice's .raw output file uses single-precision floating point numbers, giving you about 6 digits of resolution.? If NUMDGT is 7 or above, the .raw file uses double-precision and about 16 digits of resolution.? The .raw output file is used to save all voltages and currents, but not internal parameters.? All internal calculations are either double-precision or x86-extended-precision, regardless of the value of NUMDGT.
?
MEASDGT has a useful range from 6 to 12.? Within that range, MEASDGT directly sets the number of digits printed to the .log file.? If omitted or set to a number smaller than 6, it defaults to 6 and .MEAS commands print with 6 digits.? If set to a number greater than 12, it maxes at 12 digits.? That is why we saw pi, x, and z displayed with only 12 digits, despite being internally stored with more resolution and accuracy than that.
?
.MEAS printouts of internal PARAM values do not use the .raw file, so they are unaffected by NUMDGT.? .MEAS printouts that involve voltages or currents (including .MEAS ... PARAM of previous .MEAS command results involving voltages or currents) must read them back from the .raw file, so they are affected by NUMDGT first, and then by MEASDGT.? In that case, NUMDGT indirectly affects the accuracy but not the number of printed digits, whereas MEASDGT sets the number of printed digits.
?
Andy
?


Re: Non-converging oscillation problem of inverse Jiles-Atherton model in LTspice

 

?
It helps to say why it does not run, or what happens when it does run.
?
There were major program changes between LTspice 24.0.x and 24.1.x.? It was like a change in the major revision number.? Many things that ran OK previously stopped working when version 24.1.x was introduced.? Any major change like that can have problems.? Telling the folks at Analog Devices why it stops running (or perhaps, it runs but why it does not produce the same output), it might help them restore the functionality that was lost.
?
Andy
?
Thanks for your suggestion. I will report this issue to them.


Re: Non-converging oscillation problem of inverse Jiles-Atherton model in LTspice

 

On Tue, Apr 22, 2025 at 11:31 PM, <limengfan81@...> wrote:
Also, I was surprised to find that this model doesn¡¯t seem to run in LTspice 24.1.5, even though it works fine with the same settings in version 24.0.7.
It helps to say why it does not run, or what happens when it does run.
?
There were major program changes between LTspice 24.0.x and 24.1.x.? It was like a change in the major revision number.? Many things that ran OK previously stopped working when version 24.1.x was introduced.? Any major change like that can have problems.? Telling the folks at Analog Devices why it stops running (or perhaps, it runs but why it does not produce the same output), it might help them restore the functionality that was lost.
?
Andy
?


Re: Non-converging oscillation problem of inverse Jiles-Atherton model in LTspice

 

Also, I was surprised to find that this model doesn¡¯t seem to run in LTspice 24.1.5, even though it works fine with the same settings in version 24.0.7.


Re: Non-converging oscillation problem of inverse Jiles-Atherton model in LTspice

 

Thanks for the suggestion ¡ª increasing rtol? is truly helpful.

This model seems to struggle when dH/dt is near zero, causing oscillations in all conditional terms. Sometimes it converges, sometimes it doesn't.

Three ways to improve it:

  1. Increase delay time (tau): Helps stability, but too large tau introduces more phase shift between B and H,which increases B-H loop area. At an input frequency of f = 50 Hz, using tau?= 300 ns still gives acceptable results, but if the frequency increases, tau must be reduced accordingly.

  2. Reduce max timestep: Slower simulation, but improves convergence near dH/dt ¡Ö 0. Dropping it from 1e-6 to 1e-7 helped. It seems that better numerical resolution earlier in the simulation helps the solver predict the behavior more accurately at those critical points.

  3. Increase rtol: Improves convergence but may distort waveforms. But combining this with a smaller timestep can balance accuracy. rtol = 0.005 worked better than the default rtol=0.001.

At this point, I haven¡¯t found a way to eliminate the oscillations, but I can improve both convergence and accuracy by balancing the three strategies above. I¡¯ll continue experimenting to see whether it's possible to reduce the oscillation by improving the inverse Jiles-Atherton algorithm itself.


Re: MJ11021 Darlington NPN & PNP pair model help needed.

 

On Tue, Apr 22, 2025 at 10:01 PM, nima wrote:
I am trying to build a model for MJ11021 to be used in an AB amplifier simulation.? Link to .
I made an attempt in building a model for the part PNP type first.? I also created a simulation to validate against the datasheet.
Validation part 1: DC simulation to Verify hFE and VCE.??
Never got past part 1!?
The main problem is this:? Your subcircuit pin-order is wrong.
?
The 'standard' SPICE pin-order for BJTs is C-B-E.? For .SUBCKT models you do not absolutely need to use that order, but it's a good idea if you do.? Your Darlington symbol uses that order.? But your .SUBCKT model definition has the wrong order, meaning that it does not agree with the Darlington symbol:
.SUBCKT MJ11021 B C E
Change that line, to this:
.SUBCKT MJ11021 C B E
and I think most of the problems go away; at least it gets you going in the right direction.
?
While you are editing the model file, also fix the last line:
.END
which must not be the .END command.? It should be this:
.ENDS
?
I also note that your .DC command has the wrong polarity for the increment value:
.dc V2 -1 -2.8 0.2
which should be:
.dc V2 -1 -2.8 -0.2
It might be better to use a current source instead of a voltage source, to drive the base pin.? But that's up to you.
?
Andy
?


MJ11021 Darlington NPN & PNP pair model help needed.

 

Hello,
New LTspice user.
?
I am trying to build a model for MJ11021 to be used in an AB amplifier simulation.? Link to .
I made an attempt in building a model for the part PNP type first.? I also created a simulation to validate against the datasheet.
Validation part 1: DC simulation to Verify hFE and VCE.??
Never got past part 1!?
Part 2: Transient simulation? to measure switching time.
?
I have uploaded the files to temp directory under /g/LTspice/files/Temp/MJ11021.zip
?
It is not working and I am having a hard time figuring out how to fix the parameters in order to get it validated.? Any help and guidance in how to proceed to fix/tune the model parameters and how to setup the simulation to validate the model against key datasheet specs. would be greatly appreciated.
?
Thank you in advance.
?
?


Re: LTspice models do not work in Qspice

 

Hi Andy,
I will try to post more there to earn some trust I guess!
Regards,
Suded


Re: LTspice accuracy, used for calculations and measurements

 
Edited

On Tue, Apr 22, 2025 at 10:24 AM, Udo Huhn-Rohrbacher wrote:

To summarize: There was only a difference in version LTspice XVII(x64) 17.0.36.0 for different solver settings > Alternate vs. Normal

In my opinion, that is very odd that the solver would make a significant difference in the calculation of parameters x, y, and z.
?
The fact that one of them printed a value of 3.14159?strongly suggests that this particular simulation forgot to set NUMDGT MEASDGT to greater than 6.? I think that's the only way the value would be limited to 6 digits.? I think the solver could not be the only difference.
?
On a side note, it is slightly disappointing that LTspice seems to know pi to only 12 digits.? Perhaps it was programmed with only that many digits, making its remaining double-precision digits zeros.? Perhaps Mike Engelhardt found that more digits were truly unnecessary, in a circuit simulation program.
?
All this is without verification on my part.? I am away from my work computer today, and I need to do some re-installations and fixing up, eventually.
?
Thanks,
Andy
?


Re: LTspice accuracy, used for calculations and measurements

 

After consulting 3 users regarding pi-measurements, we came to the conclusion

pi measurements resulted in ?3.14159265359 (11 digits after the decimal point) observed in the LT - versions

?

user 1 : XVII(x64) 17.037.0;?? LTspice 24.1.6; solver: Alternate & Normal, no difference

user 2 :?LTspice 24.0.8 solver: Normal

user3: LTspice XVII(x64) 17.0.36.0 solver Alternate;

user3:?LTspice XVII(x64) 17.0.36.0 solver: Normal: pi = 3.14159

?

To summarize: There was only a difference in version LTspice XVII(x64) 17.0.36.0 for different solver settings > Alternate vs. Normal

?

We are satisfied with all your clarifications.

?

Thank you very much

?

Regards

Udo

?

?


Re: Non-converging oscillation problem of inverse Jiles-Atherton model in LTspice

 

On Tue, Apr 22, 2025 at 08:03 AM, §¡§Ý§Ö§Ü§ã§Ñ§ß§Õ§â §¢§à§â§Õ§à§Õ§í§ß§à§Ó wrote:
I found that LTspice does not want to read the voltage in the delta node correctly!
That looks like it might be a language translation problem.
?
I can't see a reason why LTspice would be unable to correctly read the voltage on any node.? But maybe that node's voltage was created (driven) wrongly, such that its voltage is incorrect?? That is a different problem than inability to read that voltage.
?
I saw small oscillations here and there on various node voltages in this simulation.? I did not study it so I don't know what is supposed to happen.? That is just an observation.? I wonder if different simulation settings (plotwinsize, *tol tolerances, solver, timestep control) might be needed here?
?
Andy
?
?


Re: CD14538B for ngspice Kicad

 

On Tue, Apr 22, 2025 at 02:47 AM, Gamma Kiwi Al wrote:
Those are the files I am having trouble getting to work.
I get a Warning: can't find the initialization file spinit.
It seems that it is an ngspice question.? LTspice does not have nor use that file, as far as I can tell.? I don't use ngspice, but I'm guessing it is something that ngspice (only) needs.
?
Why didn't you ask this question in the ngspice forum?? That should be the place to start.? Did you ask there already?
?
Andy
?


Re: Non-converging oscillation problem of inverse Jiles-Atherton model in LTspice

 

Hi.
I found that LTspice does not want to read the voltage in the delta node correctly! The result is huge, unreal values of H and M.


Re: CD14538B for ngspice Kicad

 

Thanks Andy, sorry to post in the wrong forum.
Those are the files I am having trouble getting to work.
I get a Warning: can't find the initialization file spinit.
Thanks?
Al


Re: CD14538B for ngspice Kicad

 

On Tue, Apr 22, 2025 at 01:31 AM, Gamma Kiwi Al wrote:
I wondered if anyone has seen a spice library for the CD14538B that will work in Kicad (ngspice).
This group is not about ngspice.? To the extent that ngspice model requirements differ from LTspice, we can not help with those.
?
Did you try looking at these?
?
??? Files > z_groups.io > Lib > Digital CD4000 > CD14538B and CD4538B
?
If they have LTspice-unique elements in them, I can't help you there.
?
I would also consider the part number without the "B" suffix.? And perhaps without the "1" prefix.
?
Andy
?


CD14538B for ngspice Kicad

 

I wondered if anyone has seen a spice library for the CD14538B that will work in Kicad (ngspice). So far I haven't found one that works inside Kicad without spitting out errors.
Thanks
Al??


Re: LTspice models do not work in Qspice

 

On Sun, Apr 20, 2025 at 08:41 PM, suded emmanuel wrote:
I could not upload my simulation file to Qspice it says that I have to earn few badges to do that!
It is kind of a "bummer" that Qorvo's QSPICE forum is like that.? New, first-time members there can't attach/upload their files.? On the one hand it makes some sense to stop new forum members from spamming them, but IMHO it makes little sense for customer support where first-time posters are the ones likely to need help with their models and schematics.? One hopes their settings are liberal enough to quickly overcome that hurdle.
?
I guess it is one of the problems of corporate-run support.
?
Andy
?
?


Re: Modeling a CPE in LTPSICE

 

On Mon, Apr 21, 2025 at 03:25 PM, Maile, Keith wrote:

This has been asked before and I am just looking for the schematic: Files > Temp > Constant_phase_element1.asc

All files in Temp are there temporarily.? Hence the directory name "Temp".
?
That file is now found here:
?
Files > z_yahoo > Examples > Educational
Files > z_yahoo > Examples > Educational > Constant_phase_element1.asc
?
There are other files near it with similar filenames.
?
Andy
?