¿ªÔÆÌåÓý

Date

Saving and restoring inductor current

 

LTspice can save and restore node voltages, but not branch currents.? This means that by using ".savebias time=<tstop>" and ".loadbias" a simulation with inductors is only partially saved and restored because inductor currents are ignored.? It occurred to me that by making a "dual inductor" using current sources and a capacitor, one might trick LTspice into saving "inductor" currents.? The inductor dual is very simple and can be a subcircuit with the inductor symbol edited to represent the dual inductor with the expected symbol.

.subckt L 1 2
.param L=1 Rser=1m Rpar=1/Gmin
C1 3 0 {L} Rser={1/Rpar} Rpar={1/Rser}
G1 1 2 3 0 1
G2 3 0 2 1 1
.ends L


This seems to work well and each run picks up where the previous run left off.? Here is a test simulation.


V1 1 0 1 AC 1
X1 1 2 L L=1m
C2 2 0 1
R1 2 0 1k
.tran 0 50 1u uic
.savebias bias.txt time=49.9
.loadbias bias.txt


Don't how this compares speed-wise and coupled inductors would require an extension, but this technique might prove useful in certain stepped simulations that could run much quicker if the operating point did not need to be refound each time.



Re: Using BV exp(), log() for numerical compression ,wrong result ?

 

Hi, Andy:

Before your explanation, I didn't notice "complex logarithm" is a special case, maybe not supposed to be supported by any SPICE.

About the compression application, I didn't really have the complete idea, maybe it would be like the,....
For example, when someone reading a book, the edge on every page often empty, and be used to sketch some thing on, some graphs/pictures to decorate the layout of the page. They often are not the primary parts.

To analogy, if there are some main data, which typically are numerical values, and has its general scale on the range of greater than 0.01, though its format could support to very least 1e^-16, or some, such that, maybe I could merge those loged numbers secretly into the "main data", and leak .... to somewhere who concern it, without interference others who typically don't care those smaller values which is under 0.01.

Just some ignorant ideas. I didn't implement it yet.

Best regards.


---In LTspice@..., <ai.egrps@...> wrote :

ericsson.sunshine wrote:

? ? "LTspice couldn't treat the negative value of nature log very well, which normally return the complex value ..."

? ? "LTspice couldn't see the complex (imaginary) parts. And treat it very well, as it should be treated in the normal math world."

I think most people here understand this: "The natural logarithm function ln(x) is defined only for x>0.? So the natural logarithm of a negative number is undefined."? Undefined means it has no defined value when x is negative, or zero.? I think in math, this would be represented by NaN (but I might be wrong).

The "complex logarithm" is an extension to complex numbers, but it differs from an ordinary logarithm.? Perhaps you work in a math world that treats the complex logarithm as a normal logarithm function, but I think most of us engineers do not.? The logarithm functions in LTspice are not defined to be complex logarithms, therefore one should not expect them to behave as complex logarithms; they are the ordinary variety of logarithm functions, which are undefined for negative arguments.? The exponential function exp() is not the inverse of the complex logarithm function.

Maybe it would help to understand what you are trying to accomplish.? I understand that you may be interested in compressing a wide dynamic range into a smaller one; but is this for signal processing?? Waveform visualization?? Theoretical analysis of non-physical signals or entities?? (Not that I'm asking for my own sake.? But it helps to know where one is going, before making the first steps, and finding that one has stepped into a hole.)

Regards,
Andy



Adding Potentiometer

 

Hey guys I¡¯m totally new to LTspice. I¡¯m using it to build guitar tube amps. One thing I need is to add a potentiometer. I tried following the help text file but could not get the potentiometer to actually work. I amable to use the symbol but that is as far as I¡¯ve gotten. I don¡¯t know how to install the .lib file to get it to work. I¡¯m sure this is very easy for everyone here but not for me as I am completely new to the program. If someone could provide a step by step instruction on how exactly to go about adding a potentiometer to LTspice I would greatly appreciate it. Thanks!


Adding A Potentiometer

 

Hey guys I'm totally new to LTspice. I'm using it to build guitar tube amps. One thing I need is to add a potentiometer. I tried following the help text file but could not get the potentiometer to actually work. I am able to use the symbol but that is as far as I've gotten. I'm sure this is very easy for everyone here but not for me as I am completely new to this program. If someone could provide a step by step instruction on how exactly to go about adding a potentiometer to LTspice I would greatly appreciate it. Thanks!


How To Add Potentiometer

 

Hey guys,

I'm totally new to LTspice. I'm using it for building guitar tube amps. I really need to add a potentiometer to LTspice. I'm sure it is probably simple to everyone here but not to me. I read the help text file and I'm not able to get the potentiometer to actually work. If someone can please help with this I would greatly appreciate it. I would like a step by step guide on how exactly I go about adding a potentiometer. As far as I could get is being able to use the symbol. But I can't figure out how to add the .lib file and have the potentiometer actually work. Again, if I could get a step by step explanation on how exactly to add a working potentiometer that would be awesome. Sorry if I sound like such a newbie, because I am. thanks!


Re: LTspice model for capacitor start single phase motor

 

¿ªÔÆÌåÓý

Try these links:

?

?

?

?

?

?

?

?

From: LTspice@... [mailto:LTspice@...]
Sent: Thursday, November 22, 2018 6:17 PM
To: LTspice@...
Subject: [LTspice] Re: LTspice model for capacitor start single phase motor

?

?

just trying to study how to proper run/ start a single phase motor with a inverter, I already have the inverter model , but seems have problem with the motor model with speed/torque.

?

I can find a two phase motor and three phase examples. but nut sure how to build a single phase one.

?

any example of single phase motor would be very helpful

?

thanks!!


Re: Dark lines on light screens was : LTSpice Model for Photo Triac - VOM160

 

Jim wrote:

"My assumption of the reason I like it, is that the increased overall light level, causes the pupil to shrink, giving you better visual acuity & focus. YMMV"

Yup, makes sense.

It used to be that all computer CRTs were green or white on black. In my workplace I was one of few (early adopters?) who inverted the colors to make it look more like a printed page.

Andy


Dark lines on light screens was : LTSpice Model for Photo Triac - VOM160

 

¿ªÔÆÌåÓý

¡°What I do even differently from you, is to use a white (or
very light grey) background. I'm not the only one doing that. I am not
sure why I like dark waveforms on a light background, because oscilloscopes
didn't do that; but I find it more pleasing to my eye.
¡±
My assumption of the reason I like it, is that the increased overall light level, causes the pupil to shrink, giving you better visual acuity & focus. YMMV
More of an issue for me with cad files, yellow on black?? Why ???????.? Give me dark blue on white, or light grey any day.
?
?
R James (Jim) Klessig P.E. | Senior Power Systems Engineer |
Electrical Reliability Services, VERTIV
jim.klessig@..., jim_klessig@...
1876 Gwin Rd, Mckinleyville | CA | 95519 | USA
| Cell (707) 497-9611 | eFax 614-410-0653
?
?
CONFIDENTIALITY NOTICE: This e-mail and any files transmitted with it are intended solely for the use of the individual or entity to whom they are addressed and may contain confidential and privileged information protected by law. If you received this e-mail in error, any review, use, dissemination, distribution, or copying of the e-mail is strictly prohibited. Please notify the sender immediately by return e-mail and delete all copies from your system.


Re: Using BV exp(), log() for numerical compression ,wrong result ?

 

ericsson.sunshine wrote:

? ? "LTspice couldn't treat the negative value of nature log very well, which normally return the complex value ..."

? ? "LTspice couldn't see the complex (imaginary) parts. And treat it very well, as it should be treated in the normal math world."

I think most people here understand this: "The natural logarithm function ln(x) is defined only for x>0.? So the natural logarithm of a negative number is undefined."? Undefined means it has no defined value when x is negative, or zero.? I think in math, this would be represented by NaN (but I might be wrong).

The "complex logarithm" is an extension to complex numbers, but it differs from an ordinary logarithm.? Perhaps you work in a math world that treats the complex logarithm as a normal logarithm function, but I think most of us engineers do not.? The logarithm functions in LTspice are not defined to be complex logarithms, therefore one should not expect them to behave as complex logarithms; they are the ordinary variety of logarithm functions, which are undefined for negative arguments.? The exponential function exp() is not the inverse of the complex logarithm function.

Maybe it would help to understand what you are trying to accomplish.? I understand that you may be interested in compressing a wide dynamic range into a smaller one; but is this for signal processing?? Waveform visualization?? Theoretical analysis of non-physical signals or entities?? (Not that I'm asking for my own sake.? But it helps to know where one is going, before making the first steps, and finding that one has stepped into a hole.)

Regards,
Andy



Re: CD4060 and CD4063 LTSpice models needed

 

Hi Eric, problem solved with CD4060, thanks.


Re: CD4060 and CD4063 LTSpice models needed

 

Hi Andy, right now I found the CD4060 model in ToC, thanks.


Re: Using BV exp(), log() for numerical compression ,wrong result ?

 

Hello,

Even log(0) is a big problem. The result be -infinity which is useless in a real circuit. That's why my suggested IF() has used a limit of 1e-6.

Best regards,
Helmut


Re: Using BV exp(), log() for numerical compression ,wrong result ?

 

Hi, Helmut:

Thank you for the suggestions, but if I use the IF() as you mentioned, x couldn't be recovered as it was before compression.
But your answer seems LTspice couldn't treat the negative value of nature log very well, which normally return the complex value, eg: log(-2) =?0.6931 +? 3.1416i.
As I said, LTspice couldn't see the complex (imaginary) parts. And treat it very well, as it should be treated in the normal math world.

Though I found another solution, it's using the dc-bias in the source signal, after recovered it, eliminate the dc-bias, this could be done well, too. But I am thinking, why LTspice couldn't treat those math functions equal-footing, alternatively, some math functions are biased, while some are? "NOT SUPPORTED/PARTLY SUPPORTED". Is it fair , unfair ?

Best regards,
---In LTspice@..., <helmutsennewald@...> wrote :

Hello,

You have used log() from negative numbers. Normal calculators will fail in this case.

I recommend to use an IF() to workaround.

V=IF(V(x)<1e-6,0,log(V(x))

Be aware that log() is the same as ln(). log10() is the logarithm base 10.

Best regards,
Helmut


Re: CD4060 and CD4063 LTSpice models needed

 

¿ªÔÆÌåÓý

4063 is a 4-bit magnitude comparator (for comparing the dimensions of 1 dollar bills?), so is a purely digital device and not very suitable for Spice simulation at all.

Best wishes
John Woodgate OOO-Own Opinions Only
J M Woodgate and Associates 
Rayleigh, Essex UK
On 2018-11-26 04:34, Andy ai.egrps@... [LTspice] wrote:

?
electronicafrind (Juan Esteban) wrote, "I need CD4060 and CD4063 LTSpice models, .subckt and .asy files."

When you joined this group, you read about the "Table of Contents" file (all_files.htm), which led you to the CD4060 model and symbol.? How did that work out for you?

Sorry, I can't help you with the CD4063.

Regards,
Andy



Re: Have anyone built black hole model already ?

 

¿ªÔÆÌåÓý

Hello, ES.

It's not easy to interpret your musings on space-time, but in your first paragraph you actually ask for two different, but related, things. There are many textbooks on semiconductor theory and design, but don't expect them to include the application of the theory to the design of Spice models. You might be lucky to find a book that does that, however. There are also textbooks and papers on the design of Spice models, but they start from a prior understanding of the concepts and relationships of semiconductor theory.

I can't give you references to actual publications, but I'm sure there are others here who can.

'CMOS circuit design and simulation' is, I think, about designing ICs, i.e. processes to make CMOS devices, device dimensions required for a given performance, interactions between nearby devices and many other things, This is neither the basic theory that you want or the link from basic theory to model design; it's more a 'workshop manual'.

Best wishes
John Woodgate OOO-Own Opinions Only
J M Woodgate and Associates 
Rayleigh, Essex UK
On 2018-11-26 02:38, ericsson.sunshine@... [LTspice] wrote:

?

Hello, John:


Thank you for the replies. Though several days ago, I would like someone could suggest some materials (textbook) about the semiconductors, electron-hole pairs, carriers, etc. Everything needed for a SPCE modeling. I even don't have the concept of where to begin. (Though I have heard "CMOS circuit design layout and simulation", but I am not sure if that's enough. And haven't done reading it yet.)

Though same "hole" things in this thread, but size is completely different. I have less things to say about black hole and the space things, I agree what you have said about the 1-dimension or 3-dimension, that's what I am familiar about, too. The idea is just an illusion. As you said , no one could prove it. Especially this/(those) body(ies) none exist in space (has no dimensions/size). No bodies...so that, I just think if the time-space is exchanged, time could be traveled, and space couldn't be traveled, but still in it, how to explain ? does that mean, fully filled the space , feel the all space ? Have (in) it all, but couldn't travel move forward/backward.

Just some interesting thoughts, has anyone ever dreamed about "being a small fish pursuit by a bigger one, and felt the bloody mouth of the hunter", thus feel the feeling/thoughts of the instances ?

Actually, this shouldn't be discussed here, so that, in fact, what I really hope to learn is , more inspirations about SPICE modeling.

If you could kindly help more inspirations.

Thank you very much.

Best regards.


---In LTspice@..., wrote :

Yes, there are many models of black holes, but none, I suppose, that are compatible with LTspice! No existing models are considered satisfactory. More research is, of course, needed.

There is a good explanation of the distorting effects of black hole gravity on space-time in 'From Eternity to Here' by Sean Carroll, ISBN9781-85168-795-4.

If the Universe is a black hole (as has indeed been suggested), we would almost certainly not be able to prove it, because we are inside it. Your question about 'outside it' is meaningless in terms of what we can know, and may be absolutely meaningless, by which I mean that if there are other black hole Universes, that might observe ours, no-one there could tell what is happening inside our Universe.

Opinion is divided on whether other Universes exist, and whether they could have different Laws of Physics, such as you suggest, where time-travel is easy and three-dimensional, but space is one-dimensional and space travel is not easy. Note that physical bodies cannot exist in a Universe with fewer than two space dimensions, and living bodies as we know them require three dimensions.

Best wishes
John Woodgate OOO-Own Opinions Only
J M Woodgate and Associates 
Rayleigh, Essex UK
On 2018-11-23 03:13, ericsson.sunshine@... [LTspice] wrote:
?

Hi, :


I am curious about the black hole, so though it's almost impossible, but ...maybe someone who might have studied that before...that's did anyone study hard about the black hole very well and? have built black hole model already ?


Recently, I heard that, there is theoretically sayings which states "in the black hole, the time-space is exchanged,? which says in the black hole, the moving-direction is only one way direction, and the time for the one inside the black hole is very slow (from viewpoint of the outside one from black hole), it seems meaning, in the black hole, space is only one way direction while the time could be varying forward ,backward, rightward, leftward, etc.(time-space exchanged)" , so that this saying caused me the question , is that possible that we are all living in a bigggggg BLACK HOLE, which includes the whole universe, and in this bigggggg BLACK HOLE, the time is one way direction, the space is traveling-abled,? as we experienced so far, but if this theory states is correct, would that means outside this bigggggg BLACK HOLE, OUT THERE, time is traveling-abled, and space is .....one way direction- LINED UP ? I don't quite know what's that, so that's why I'm here and the request, I hope to know more about the black hole , have anyone already built one ?


Thank you very much


Best regards.


Re: Using BV exp(), log() for numerical compression ,wrong result ?

 

Hello,

You have used log() from negative numbers. Normal calculators will fail in this case.

I recommend to use an IF() to workaround.

V=IF(V(x)<1e-6,0,log(V(x))

Be aware that log() is the same as ln(). log10() is the logarithm base 10.

Best regards,
Helmut


Re: Using BV exp(), log() for numerical compression ,wrong result ?

 

You know, if my window could tolerate a swing of 100, this method will help avoiding ruin my window. Since the swing could minimize from 1Mega to thirteen degree.
Wouldn't you like to know the answer, possible or impossible ?

Or still the old problem, LTspice could see the complex (imaginary) part. Which does exist in the real world.

Best regards.

---In LTspice@..., <ericsson.sunshine@...> wrote :

Hi, :

Please help, do you know how much powerful this will help, it could minimize the numerical value from 120dB to number '13.8155'. Which help to plot/sketch them in a single graph. Where stores much info and without distort it.

thank you very much.

---In LTspice@..., <ericsson.sunshine@...> wrote :

Hi, :


While I am thinking using a mathematical compression (limit the numerical values to a scaled range, then revert them) algorithm, I found that in the BV device, the exp(), log() (natural algorithm) couldn't work as expect, normally I wish to use the math equation, x = log ( exp(x) ) or x = exp( log(x) ), but the waveform output disappointed me, the result from BV makes the 'x ' won't be the source of the signal.


Does anyone know why ? Can it be fixed ? Do I need any bias in LTspice ? I pretty sure some tools didn't need bias.


I have uploaded a file '20181126_20181126_BV_exp_log_convert.zip' at the temp folder.


Thank you very much.


Best regards.


Re: Using BV exp(), log() for numerical compression ,wrong result ?

 

Hi, :

Please help, do you know how much powerful this will help, it could minimize the numerical value from 120dB to number '13.8155'. Which help to plot/sketch them in a single graph. Where stores much info and without distort it.

thank you very much.

---In LTspice@..., <ericsson.sunshine@...> wrote :

Hi, :


While I am thinking using a mathematical compression (limit the numerical values to a scaled range, then revert them) algorithm, I found that in the BV device, the exp(), log() (natural algorithm) couldn't work as expect, normally I wish to use the math equation, x = log ( exp(x) ) or x = exp( log(x) ), but the waveform output disappointed me, the result from BV makes the 'x ' won't be the source of the signal.


Does anyone know why ? Can it be fixed ? Do I need any bias in LTspice ? I pretty sure some tools didn't need bias.


I have uploaded a file '20181126_20181126_BV_exp_log_convert.zip' at the temp folder.


Thank you very much.


Best regards.


Using BV exp(), log() for numerical compression ,wrong result ?

 

Hi, :


While I am thinking using a mathematical compression (limit the numerical values to a scaled range, then revert them) algorithm, I found that in the BV device, the exp(), log() (natural algorithm) couldn't work as expect, normally I wish to use the math equation, x = log ( exp(x) ) or x = exp( log(x) ), but the waveform output disappointed me, the result from BV makes the 'x ' won't be the source of the signal.


Does anyone know why ? Can it be fixed ? Do I need any bias in LTspice ? I pretty sure some tools didn't need bias.


I have uploaded a file '20181126_20181126_BV_exp_log_convert.zip' at the temp folder.


Thank you very much.


Best regards.


Re: CD4060 and CD4063 LTSpice models needed

 

Hi Juan,
The CD4060 is there in the files. There are several locations. You need to unzip the file. In one of them you will see the symbol and the subckt with a test schematic. But the subckt is a .M00 file.
I tried the trial schematic. It works.
Best regards,
Eric


On Sun, Nov 25, 2018 at 11:38 PM Andy ai.egrps@... [LTspice] <LTspice@...> wrote:
?

electronicafrind (Juan Esteban) wrote, "I need CD4060 and CD4063 LTSpice models, .subckt and .asy files."

When you joined this group, you read about the "Table of Contents" file (all_files.htm), which led you to the CD4060 model and symbol.? How did that work out for you?

Sorry, I can't help you with the CD4063.

Regards,
Andy