开云体育

creating gm/Id vs Id/W plot in ltspice


 

Hello ,I have created a two plots of Id vs Vgs and? d(Id)/d(Vgs) [also known as gm] vs Vgs as shown in the attached link.
how can I create gm vs Id plot which unites the two?
Thanks.
?
?
/g/LTspice/files/Temp/2.zip


 

Hello, nasickly I have Y1 vs X? and Y2 vs X ,Is there a wat to combine them so I'll get a Y1 vs Y2 plot?
Thanks.


 

That depends.? Be more specific.
?
Andy


 

Hello Andy,I have two Y axes plots depending on the same X axes.
I want to create a plot of Y1 vs Y2.
Is it possible in LTspice?
Thanks.


 

开云体育

Open one plot pane, say the Y1 plot. Right-click on the X-axis and look at 'Quantity plotted' in the pane that opens. If it gives you a choice, pick Y2. It may not give you a choice.

On 2025-04-15 19:19, john23 via groups.io wrote:
Hello Andy,I have two Y axes plots depending on the same X axes.
I want to create a plot of Y1 vs Y2.
Is it possible in LTspice?
Thanks.
--
Best wishes John Woodgate RAYLEIGH Essex 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.


 

On Tue, Apr 15, 2025 at 02:19 PM, john23 wrote:
Hello Andy,I have two Y axes plots depending on the same X axes.
I want to create a plot of Y1 vs Y2.
Is it possible in LTspice?
As I wrote before, that depends.? Be more specific.
?
What kind of simulation are you using?? Transient?? .DC?? .OP augmented with .STEP commands?
?
What you are capable of plotting depends on the kind of simulation you used.
?
The answers to many of your questions can be found by reading the Help that comes with LTspice.? We can recommend the things for you to try, but those things we recommend come from reading the Help, and trying it ourselves.? You should be capable of doing both yourself.
?
Andy
?


 

Hello Andy , both plots are dc sweep.
?


 

开云体育

Try these lines in a pmos_vds_with_Width.plt

Plots Id(M1) and?d(Id(M1))/d(V(Vgs)) vs '?'

Donald.

[DC transfer characteristic]
{
?? Npanes: 1
?? {
????? traces: 2 {34603010,0,"Id(M1)"} {524291,1,"d(Id(M1))/d(V(Vgs))"}
????? Parametric: "Id(M1)"
????? X: ('?',1,-8.8e-06,8e-07,-0)
????? Y[0]: ('?',1,-8.8e-06,8e-07,-0)
????? Y[1]: ('?',0,0,1e-06,1.4e-05)
????? Amps: ('?',0,0,1,-8e-06,8e-07,-0)
????? Units: "ohm-1" ('?',0,0,0,0,1e-06,1.3e-05)
????? Log: 0 0 0
?? }
}

On 4/16/25 00:44, john23 via groups.io wrote:

Hello Andy , both plots are dc sweep.
?


 

Hello ,My original PLT file of the attached photo is shown below.
Where do I need to change this file ? and to what line do I need to change?
Thanks.
/g/LTspice/photo/294510/3906627?p=Created%2C%2C%2C20%2C2%2C0%2C0
[DC transfer characteristic]
{
? ?Npanes: 2
? ?{
? ? ? traces: 1 {34668548,0,"Is(M1)"}
? ? ? X: (' ',1,0.01,0.2,1.8)
? ? ? Y[0]: ('?',1,0,8e-07,8e-06)
? ? ? Y[1]: ('_',0,1e+308,0,-1e+308)
? ? ? Amps: ('?',0,0,1,0,8e-07,8e-06)
? ? ? Log: 0 0 0
? ?},
? ?{
? ? ? traces: 1 {524290,0,"-D(Is(M1))/D(V(Vgs))"}
? ? ? X: (' ',1,0.01,0.2,1.8)
? ? ? Y[0]: ('?',0,0,1e-06,1.3e-05)
? ? ? Y[1]: ('_',0,1e+308,0,-1e+308)
? ? ? Units: "ohm-1" ('?',0,0,0,0,1e-06,1.3e-05)
? ? ? Log: 0 0 0
? ?}
}


 

UPDATE:
?
I tried to change the line as shown below ,However I get a bug saying I got extra curly braces.
Where did I go wrong?
Thanks.
?
DC transfer characteristic]
{
? ?Npanes: 2
? ?{
? ? ? traces: 1 {34668548,0,"Is(M1)"}
? ? ? X: (' ',1,0.01,0.2,1.8)
? ? ? Y[0]: ('?',1,0,8e-07,8e-06)
? ? ? Y[1]: ('_',0,1e+308,0,-1e+308)
? ? ? Amps: ('?',0,0,1,0,8e-07,8e-06)
? ? ? Log: 0 0 0
? ?},
? ?{
? ? ? traces: 1 ?{34603010,0,"Id(M1)"} {524291,1,"d(Id(M1))/d(V(Vgs))"}
? ? ? X: (' ',1,0.01,0.2,1.8)
? ? ? Y[0]: ('?',0,0,1e-06,1.3e-05)
? ? ? Y[1]: ('_',0,1e+308,0,-1e+308)
? ? ? Units: "ohm-1" ('?',0,0,0,0,1e-06,1.3e-05)
? ? ? Log: 0 0 0
? ?}
}


 
Edited

On Thu, Apr 17, 2025 at 10:35 AM, john23 wrote:
Hello ,My original PLT file of the attached photo is shown below.
Where do I need to change this file ? and to what line do I need to change?
I strongly recommend that you do NOT ever edit your .PLT file.? That is not the way to change your LTspice plots.? It is too dangerous, for one thing.
?
Instead, make the changes the normal way: by editing settings in the program (LTspice) itself.
?
You told us that you are doing a .DC sweep, but that is not nearly enough information to give you sound advice.? Plus your questions are somewhat spread out over multiple topics and multiple simulations, and I find it difficult to track which one(s) you are talking about.? What EXACTLY are you trying to do, this time?? Did you follow Tony's [oops!] John Woodgate's advice earlier?? Did it work?? If it did not work, what happened instead?
?
Sending us a screenshot of a simulation, as you have done this time, is absolutely unhelpful.? How does that screenshot relate to your question?? How can I simulate your screenshot on MY computer to help answer your question?
?
And what is your objective, anyway?? You have lost me.

Andy
?


 

On Thu, Apr 17, 2025 at 10:44 AM, john23 wrote:
Where did I go wrong?
Well, as I said, you edited your .PLT file, which you should not have done.? Don't go there.? That would be like "the blind leading the blind".
?
But I see this looks wrong:
?
? ? ? traces: 1 ?{34603010,0,"Id(M1)"} {524291,1,"d(Id(M1))/d(V(Vgs))"}
It says "traces: 1" but then it lists two traces.? That's a mistake.
?
I'll say this once again:? Do not try hand-editing your .PLT file, in hopes that some magic will happen.? Magic usually does not happen.
?
Figure out what you want to plot.
?
Then set up the plots to give you that plot.
?
So -- what exactly do you want to plot?
?
Andy
?


 

Hello John Woodgate,Your method worked perfectly as shown in the photo.
Thank you very much.
?
/g/LTspice/photo/294510/3906658?p=Created%2C%2C%2C20%2C2%2C0%2C0


 
Edited

john23,
?
FYI, in the plot you uploaded today, the lower plotted waveform is -D(Is(M1))/D(V(Vgs)).
?
But the denominator is 1.0, because the X-axis is V4, and V4 directly controls V(Vgs).? So it can be eliminated.? Perhaps you did not understand how LTspice's derivative operator D() works.? It should not be written as D(y)/D(x).? It is normally written as just D(expression).? That expression alone takes the derivative of the quantity, with respect to the X-axis variable.
?
Also it looks like you are confused about whether to plot the MOSFET's Source current or its Drain current.? Yes, they are almost the same magnitude with opposite polarity, so this is more a question of principle than of numerical error.
?
Andy
?


 

开云体育

Thanks. I do occasionally get one right.

On 2025-04-17 15:54, john23 via groups.io wrote:
Hello John Woodgate,Your method worked perfectly as shown in the photo.
Thank you very much.
?
--
Best wishes John Woodgate RAYLEIGH Essex 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.


 

On Thu, Apr 17, 2025 at 11:48 AM, John Woodgate wrote:

Thanks. I do occasionally get one right.

You do get them right!? And I mistakenly credited Tony instead of you - which I already fixed in the online message but I should give you the credit.
?
Andy
?


 

开云体育

Sorry to hear that. I often tweak the .plt file after figuring out what I really want it to display. (Though I admit to starting with a Ctl-S in the plot pane to provide a starter file.)

Donald.

On 4/17/25 10:45, Andy I via groups.io wrote:

On Thu, Apr 17, 2025 at 10:35 AM, john23 wrote:
Hello ,My original PLT file of the attached photo is shown below.
Where do I need to change this file ? and to what line do I need to change?
I strongly recommend that you do NOT ever edit your .PLT file.? That is not the way to change your LTspice plots.? It is too dangerous, for one thing.
?
Instead, make the changes the normal way: by editing settings in the program (LTspice) itself.
?
You told us that you are doing a .DC sweep, but that is not nearly enough information to give you sound advice.? Plus your questions are somewhat spread out over multiple topics and multiple simulations, and I find it difficult to track which one(s) you are talking about.? What EXACTLY are you trying to do, this time?? Did you follow Tony's advice earlier?? Did it work?? If it did not work, what happened instead?
?
Sending us a screenshot of a simulation, as you have done this time, is absolutely unhelpful.? How does that screenshot relate to your question?? How can I simulate your screenshot on MY computer to help answer your question?
?
And what is your objective, anyway?? You have lost me.

Andy
?


 

开云体育

Change the whole file. I gave you a complete .plt file that provides the plot you wanted (if I understood your request correctly; there seems to be some potential language confusion).

Donald.

On 4/17/25 10:35, john23 via groups.io wrote:

Hello ,My original PLT file of the attached photo is shown below.
Where do I need to change this file ? and to what line do I need to change?
Thanks.
/g/LTspice/photo/294510/3906627?p=Created%2C%2C%2C20%2C2%2C0%2C0
[DC transfer characteristic]
{
? ?Npanes: 2
? ?{
? ? ? traces: 1 {34668548,0,"Is(M1)"}
? ? ? X: (' ',1,0.01,0.2,1.8)
? ? ? Y[0]: ('?',1,0,8e-07,8e-06)
? ? ? Y[1]: ('_',0,1e+308,0,-1e+308)
? ? ? Amps: ('?',0,0,1,0,8e-07,8e-06)
? ? ? Log: 0 0 0
? ?},
? ?{
? ? ? traces: 1 {524290,0,"-D(Is(M1))/D(V(Vgs))"}
? ? ? X: (' ',1,0.01,0.2,1.8)
? ? ? Y[0]: ('?',0,0,1e-06,1.3e-05)
? ? ? Y[1]: ('_',0,1e+308,0,-1e+308)
? ? ? Units: "ohm-1" ('?',0,0,0,0,1e-06,1.3e-05)
? ? ? Log: 0 0 0
? ?}
}