Installing and using LTspice IV (now including LTXVII), From beginner to advanced

I try .meas op Ie(Q1) and It work

May be you have assumed that it worked while actually it didn't?
May be you are trying to do/achieve something which is not what others would do to do/achieve the exact same thing? (I think it is better if you ask a general question such that you are not tied to a procedure which might not be a best practice)

The operating points of the devices are already complete in the log file. "Ie" is not displayed but it is a function of "Ib" and "Ic". "Is" is also not displayed but it is a function of "Ig" and "Id" (but of course you should be aware of the issue with signed numeric in LTSpice).

So what for is these "Ie" and "Is"? If you need to build an equation, the following (see attachment) will do it, if it is what you want.

I displayed the simulated OP on the circuit (Ib/Ic/Ie/Ig/Id/Is) so you can compare and validate the result.
 

Attachments

  • meas1.png
    meas1.png
    74.2 KB · Views: 397
Hi Mooly

I have been playing a lot on FFT following your post #19 and #20. I notice even when I run at 1KHz, longer time and finer steps really makes a big difference in the result. I end up using 50mS ( 50cycles) and step at 0.005uS and see very clear result. I overcome the problem of DC shifting by shorting out the input AC coupling and make it DC. BUT it is still so so slow!!!! Any way to speed up short of getting a super computer?

Your thread is very helpful. I am doing square wave and going into models. Next is to import Cordell's model.

Thanks
 
Last edited:
what window are you using? Blackman is my default

I assume feedback works just fine at 1 kHz and adopt 10 kHz or 2-tone input like 19+20 kHz 1:1

then you can use shorter sim time, and the tilt in the fft floor doesn't obscure the interesting parts of the spectrum at the higher frequencies

another trick is the .savebias and .loadbias commands - you can run at coarse time step with zero input for long times to get settled values and save them, then use them to initialize your higher time res, shorter run time sims as long as your circuit changes don't change the offset or renumber the nodes

for really difficult convergence, usually very high dc loop gain circuits I sometimes have to resort to scattershot .nodeset statements to get any initial DC solution at all
 
what window are you using? Blackman is my default

I assume feedback works just fine at 1 kHz and adopt 10 kHz or 2-tone input like 19+20 kHz 1:1

then you can use shorter sim time, and the tilt in the fft floor doesn't obscure the interesting parts of the spectrum at the higher frequencies

another trick is the .savebias and .loadbias commands - you can run at coarse time step with zero input for long times to get settled values and save them, then use them to initialize your higher time res, shorter run time sims as long as your circuit changes don't change the offset or renumber the nodes

for really difficult convergence, usually very high dc loop gain circuits I sometimes have to resort to scattershot .nodeset statements to get any initial DC solution at all
What is Blackman window?

Thanks, I have to look into .savebias and .loadbias commands. I am still struggling around this right now.

For 20KHz, I did lower to 5mS but I have to run steps at 0.0005uS. The graph is very pretty, the floor is almost a straight line. I totally bypass the coupling cap so I don't have to delay before collecting data.
Thanks
 
Hi Mooly

I followed your post #85 to include the Cordell models per your instruction using "add spice directive" on the top right corner icon. I typed ".include Cordell models.txt" exactly like the file name. I can place the ".include Cordell models.txt"onto the work place already.

But then when I pointed to a transistor and right click to choose a different transistor, I looked through the available models, I cannot find the ones in Cordell models.txt.

What did I do wrong?

Also, I tried to add models into the "cmp" bjt file in the LTC folder. I can open the file with note pad, I can copy the new models in. BUT it won't allow me to save back to the original file. Am I missing something?

Thanks
 
Last edited:
Administrator
Joined 2007
Paid Member
The only way to use the models from the included .txt file is to right click the devices designator and then manually type the exact name of the device it is to use. It must match exactly that on the txt file.

So its,

1/ Add the transistor (or diode or whatever) symbol to the circuit. Let us say we have added an NPN device.

2/ Right click the transistor on the text saying NPN.

3/ A new window opens. Type your device number in to overwrite the NPN wording already present in the window. For example type 2N5551C to replace the default NPN device type.

I have tried adding models to the appropriate libraries and it does work but you are then altering the installation files and libraries. There is no way of knowing how that will behave if/when some new LT update comes along. Probably fine but I prefer to have any models related to a specific project as a separate file.
 
Also, I tried to add models into the "cmp" bjt file in the LTC folder. I can open the file with note pad, I can copy the new models in. BUT it won't allow me to save back to the original file. Am I missing something?

Thanks

On Windows Vista and above, the LTC directory "C:\Program Files (Program Files (x86) if on a 64 bit system)\LTC..." is protected. You will need to take ownership of the "LTC" directory. If you are logged in as administrator you can do this, but be very careful as you could bork your system. Search the web for "windows take ownership". ;)
 
The only way to use the models from the included .txt file is to right click the devices designator and then manually type the exact name of the device it is to use. It must match exactly that on the txt file.

So its,

1/ Add the transistor (or diode or whatever) symbol to the circuit. Let us say we have added an NPN device.

2/ Right click the transistor on the text saying NPN.

3/ A new window opens. Type your device number in to overwrite the NPN wording already present in the window. For example type 2N5551C to replace the default NPN device type.

I have tried adding models to the appropriate libraries and it does work but you are then altering the installation files and libraries. There is no way of knowing how that will behave if/when some new LT update comes along. Probably fine but I prefer to have any models related to a specific project as a separate file.
Thanks, that I did not know. I right click the transistor to open the window and going nowhere.

How can I verify the parameter is right? Is there anyway to read the model as it is hard to tell from just doing simulation.

Thanks
 
On Windows Vista and above, the LTC directory "C:\Program Files (Program Files (x86) if on a 64 bit system)\LTC..." is protected. You will need to take ownership of the "LTC" directory. If you are logged in as administrator you can do this, but be very careful as you could bork your system. Search the web for "windows take ownership". ;)

Thanks

How do you lock in as Administrator? In both my Win 7 and Win 8 laptops, I am the only one that is using them, I created my user name and password when I bought the laptops, I never managed to log out and log in as administrator.

Sickening thing is I set up all 3 computers in the last 3 years. I started from step one, creating user names, passwords. Never ones was I asked to set up administrator. Then later, all started to tell me that I can only do certain things as administrator!!! I lock out and try and fail as I have no information. I have only ONE user name and ONE password on that computer. If that does not work, that's the end of the road!!!

Thanks
 
Last edited:
Thanks

How do you lock in as Administrator? In both my Win 7 and Win 8 laptops, I am the only one that is using them, I created my user name and password when I bought the laptops, I never managed to log out and log in as administrator.

Sickening thing is I set up all 3 computers in the last 3 years. I started from step one, creating user names, passwords. Never ones was I asked to set up administrator. Then later, all started to tell me that I can only do certain things as administrator!!! I lock out and try and fail as I have no information. I have only ONE user name and ONE password on that computer. If that does not work, that's the end of the road!!!

Thanks

Then you are logged-in as admin :) and UAC will manage your privileges. Do a right-click on the folder, select the security tab, then add yourself to the list of users with full access rights. See also https://msdn.microsoft.com/en-us/library/bb727008.aspx
 
Administrator
Joined 2007
Paid Member
Thanks, that I did not know. I right click the transistor to open the window and going nowhere.

How can I verify the parameter is right? Is there anyway to read the model as it is hard to tell from just doing simulation.

Thanks

Not quite following you on that. Once the correct device is showing its going to use the data in the text file... up to you to know its a good model :)

FdW helped me out a couple of years back with admin problems on W7,

http://www.diyaudio.com/forums/soft...w7-x64-professional-wont-run.html#post3051613
 
Not quite following you on that. Once the correct device is showing its going to use the data in the text file... up to you to know its a good model :)

FdW helped me out a couple of years back with admin problems on W7,

http://www.diyaudio.com/forums/soft...w7-x64-professional-wont-run.html#post3051613

I tested by changing the device to KSC1000( a make up part that is not exist in the Cordell models). It takes the name. That's what I want to verify that the transistor symbol actually have the right model in it. Obviously it is not in this case.
 
I tested by changing the device to KSC1000( a make up part that is not exist in the Cordell models). It takes the name. That's what I want to verify that the transistor symbol actually have the right model in it. Obviously it is not in this case.

If LTspice can't find the .model statement for your fake KSC1000, it will throw up an error when you try to run the sim. Also if it finds any duplicates it will print that out in the spice error log (CTRL + L). The .model statement or directive on the schematic takes precedent over the ones found in the library.
 
Last edited: