开云体育

Probing phase


 

Howdy


I am tying myself in knots trying to examine the buildup of phase in a relatively simple regulator circuit. ?I have uploaded Phase Analysis.zip to the files section. File darlington.asc contains two schematics, the second of which has been set up to examine phase and gain margin by breaking the feedback loop and inject AC small signal of 1. Run the simulation and plot -V(Vout_DD_stab)/V(Y) provides loop gain and phase. ?I read phase margin as the absolute difference between the reading for phase at the UGF and 0 or 180/-180 whichever is closer. ?In this case, I read -91 degrees for phase at UGF of 1.35Mhz and hence understand my phase margin is 89 degrees. (I understand that the -180 degree phase shift from the op amp inversion is omitted, presumably for simplicity.)


[Incidentally, a few days ago LTspice produced the plot in Phase and Gain Margin - old.jpg. Note the differences in gain below about 10kHz. That plot was produced in an earlier schematic. I later encountered problems with the schematic no longer recognising .inc statements and hence refusing to work. I therefore produced a new schematic from scratch but updated LTspice at the same time. I've examined every inch of the schematic and there are no differences that I can see from old to new (all components and values are the same) and yet, while the UGF and phase margin results are the same, the gain plot below 10kHz is significantly different and seemingly 'less correct.' At this stage I can only (very gingerly) conclude that this resulted from the update to LTspice. ?Eek...]


I now want to understand the contributors to the additional 91 degrees of phase shift and I am unsure of how best to probe the schematic when the loop is broken in this fashion. I have plotted several other traces.


A. ?-V(vout_dd_stab)/V(OA_Out2) is intended to look at the phase shift from feedback network through to the output of the op amp. (Perhaps I have to change the numerator and denominator to see a plot of -180 degrees.) In a perfect world I would expect to see a flat line at 180 degrees. ?


B. ?-V(vout_dd_stab)/V(Shift_Out2) is intended to add in the level shift network. As I would expect, judging from the lack of difference between this and the trace discussed above, the level shift is not contributing to phase shift.?


C. ?-V(vout_dd_stab)/V(Driver_Out2) is intended to add in the driver transistor EF. Given the very limited difference between this trace and those above I conclude there is little contribution to phase shift from the driver transistor.?


D. ?Presumably one would ordinarily conclude the balance of the (modelled) phase shift it coming from the pass transistor.?


Am I 'probing' the schematic in correct fashion? Is there an easier way? I don't seem to be able to use a differential probe to identify phase shift between two points. For example, it would seem 'natural'?(on a Mac)?to be able to place the probe on Shift_Out2, left-click and hold while dragging it to OA_Out2 before releasing in order to examine any phase shift from the level shift network. ?Doing so, however, does not produce a flat phase line at 0 which one would conclude from examining the (lack of difference between) the first two traces discussed above (A and B). How can I directly plot the phase shift contribution of the pass transistor to test D above? ?Ordinarily I would not have thought it would contribute any significant phase shift.?


Thanks in advance for any assistance


Steve



 

Steve wrote a rather lengthy message, including:

? ?"I read phase margin as the absolute difference between the reading for phase at the UGF and 0 or 180/-180 whichever is closer."

It can't be either/or.? It must be only one of them, depending on how you have kept track of polarities.? Phase margin can be >90 degrees, so it's not the one that is closer (which forces it to be <90 degrees).

The fact that you added a minus sign to the thing being plotted, adds -180 degrees to the phase plot.

? ?"[Incidentally, a few days ago LTspice produced the plot in Phase and Gain Margin - old.jpg. ...
? ? At this stage I can only (very gingerly) conclude that this resulted from the update to LTspice.? Eek...]"

It's very unlikely.

There probably was a difference between your circuits.? But they can be hard to find.? Sometimes, comparing the .net files makes it easier to find their differences.

One problem with visually comparing schematics, is that attributes can be made not visible.

? ?"...?problems with the schematic no longer recognising .inc statements ..."

That should not have happened either, and points to something being wrong in the schematic, or with the included files themselves.? Typo?

Sorry, your questions are very complicated and it's late.? I'll try to write more later.

Andy



Steve Kale
 

开云体育


On 9 Aug 2016, at 07:17, Andy wrote:


It can't be either/or.? It must be only one of them, depending on how you have kept track of polarities.? Phase margin can be >90 degrees, so it's not the one that is closer (which forces it to be <90 degrees).

The fact that you added a minus sign to the thing being plotted, adds -180 degrees to the phase plot.


Duh. ?The first point makes sense. ?I’ve clearly been getting confused between the graph portraying phase (excluding the op amp's 180 degrees) and phase margin directly. Plus the impact of the minus sign. ?Of course, in the example I posted, if it is not applied then the graph would read +89 degrees. If it is then the graph reads -91 degrees. It seems odd to talk about a negative margin but Helmut had some time ago told me to plot with the minus sign.

??

? ?"[Incidentally, a few days ago LTspice produced the plot in Phase and Gain Margin - old.jpg. ...
? ? At this stage I can only (very gingerly) conclude that this resulted from the update to LTspice.? Eek...]"

It's very unlikely.

There probably was a difference between your circuits.? But they can be hard to find.? Sometimes, comparing the .net files makes it easier to find their differences.

One problem with visually comparing schematics, is that attributes can be made not visible.

? ?"...?problems with the schematic no longer recognising .inc statements ..."

That should not have happened either, and points to something being wrong in the schematic, or with the included files themselves.? Typo?


I have poured over the two schematics including all value/spice line statements (CTRL-left click on a device) and can see no differences. ?I can’t run the old schematic at the moment as I’m currently getting an error “missing model definition for QD44VH10” even though I clearly have the .inc statement for the model file (I have even deleted the Spice directive - it’s not a comment - and added it again) and CTRL-left click on every QD44VH10 device reveals exactly the same as the new file I posted. (Both .asc files sit in the same folder and so both have access to the same model text file.) I will go back to it at some point (and may even check older versions via Mac’s Time Machine facility) as I do want to see if the sub 1k behaviour remains the same. ?However, for now I have just moved on as I am most focused on how to appropriately probe the circuit for the loss of phase margin. I want to understand how each piece of the circuit degrade phase margin beyond the 180 degrees from the op amp. ?Of course, when I don’t have confidence I am using LTspice properly in this regard it becomes rather hard to have confidence in the results.?


Sorry, your questions are very complicated and it's late.? I'll try to write more later.

Andy

I very much appreciate it Andy.

I’m also focused on ‘disconnects’** between the two forms of analysis: ?top circuit AC injection at Vin and modelling Vout vs freq for line rejection and bottom circuit loop gain and phase analysis. ?If, for example, I make a change to the output caps in the bottom circuit such that UGF is extended (output cap pole or zero is affected) and/or greater loop gain is applied I would expect the identical change in the top circuit to extend the line rejection in similar fashion (greater feedback being applied or being applied to higher frequencies). ?Yet it doesn’t.?

** disconnects that may well be just my lack of knowledge


regards

Steve


Steve Kale
 

开云体育

Actually I just now found the problem with the missing model definition statement although I don’t understand why it is one. ?In my older schematic I had, at one stage, wanted to test the impact of a different pass transistor and rather than use a .inc statement for this new transistor’s subcircuit statement I had pasted it directly into the circuit (see below). ?If I make it a comment, I no longer get the error message in relation to the missing model statement for Qd44vh10. ?If I make it a Spice directive I do - even though I am not using the subcircuit at all in the sim and the error doesn’t relate to the 2sc6144sg at all. ?

???

Now, the sub 1kHz behaviour remains the same as the image I had uploaded in the zip file (i.e. different from my new circuit) so I need to track down what’s causing that difference.



2SC6144SG SPICE PARAMETER ***
* DATE : 2015/03/13 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
* Temp = 27 deg

.SUBCKT 2SC6144SG 1 2 3
Q1 1 2 3 ?C6144SG ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
.MODEL C6144SG npn ( ? ? ? IS ? ? ? = 3.500p ? ? ? ? BF ? ? ? = 335 ? ? ? ? ??
+NF ? ? ? = 1 ? ? ? ? ? ? ?VAF ? ? ?= 9 ? ? ? ? ? ? ?IKF ? ? ?= 13 ? ? ? ? ? ?
+ISE ? ? ?= 50.00p ? ? ? ? NE ? ? ? = 2 ? ? ? ? ? ? ?BR ? ? ? = 160 ? ? ? ? ??
+NR ? ? ? = 1 ? ? ? ? ? ? ?VAR ? ? ?= 26 ? ? ? ? ? ? IKR ? ? ?= 2.9 ? ? ? ? ??
+ISC ? ? ?= 230.0p ? ? ? ? NC ? ? ? = 2 ? ? ? ? ? ? ?RB ? ? ? = 910.0m ? ? ? ?
+IRB ? ? ?= 100.0m ? ? ? ? RBM ? ? ?= 22.20m ? ? ? ? RE ? ? ? = 20.50m ? ? ? ?
+RC ? ? ? = 3.300m ? ? ? ? XTB ? ? ?= 1.9 ? ? ? ? ? ?EG ? ? ? = 1.11 ? ? ? ? ?
+XTI ? ? ?= 3 ? ? ? ? ? ? ?CJE ? ? ?= 1.420n ? ? ? ? VJE ? ? ?= 750.0m ? ? ? ?
+MJE ? ? ?= 383.0m ? ? ? ? TF ? ? ? = 450p ? ? ? ? ? XTF ? ? ?= 7 ? ? ? ? ? ??
+VTF ? ? ?= 1.000K ? ? ? ? ITF ? ? ?= 20 ? ? ? ? ? ? PTF ? ? ?= 0 ? ? ? ? ? ??
+CJC ? ? ?= 230.0p ? ? ? ? VJC ? ? ?= 520.0m ? ? ? ? MJC ? ? ?= 418.0m ? ? ? ?
+XCJC ? ? = 1 ? ? ? ? ? ? ?TR ? ? ? = 1.000n ? ? ? ? FC ? ? ? = 500.0m ? ? ? ?
+KF ? ? ? = 0 ? ? ? ? ? ? ?AF ? ? ? = 1 ? ? ? ? ? ? ?) ? ? ? ? ? ? ? ? ? ? ? ?
* ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
.ENDL 2SC6144SG ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
* ?Information herein is for example only; ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
* ?it is not guaranteed for volume production. ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
* ON Semiconductor

On 9 Aug 2016, at 11:11, Steve ?wrote:

I have poured over the two schematics including all value/spice line statements (CTRL-left click on a device) and can see no differences. ?I can’t run the old schematic at the moment as I’m currently getting an error “missing model definition for QD44VH10” even though I clearly have the .inc statement for the model file (I have even deleted the Spice directive - it’s not a comment - and added it again) and CTRL-left click on every QD44VH10 device reveals exactly the same as the new file I posted. (Both .asc files sit in the same folder and so both have access to the same model text file.) I will go back to it at some point (and may even check older versions via Mac’s Time Machine facility) as I do want to see if the sub 1k behaviour remains the same. ?


 

Hello Steve

You wrote:
" That plot was produced in an earlier schematic. I later encountered problems with the schematic no longer recognising .inc statements and hence refusing to work. "

Have you still the .log file you got when you tried to run the earlier schematic ?

Note that in
.SUBCKT 2SC6144SG 1 2 3
Q1 1 2 3? C6144SG??????????????????????????????????????????????????????????????
?????????????????????????????????????????????????????????????????????????????
.MODEL C6144SG npn (?????? IS?????? = 3.500p???????? BF?????? = 335??????????
+NF?????? = 1????????????? VAF????? = 9????????????? IKF????? = 13???????????
+ISE????? = 50.00p???????? NE?????? = 2????????????? BR?????? = 160??????????
+NR?????? = 1????????????? VAR????? = 26???????????? IKR????? = 2.9??????????
+ISC????? = 230.0p???????? NC?????? = 2????????????? RB?????? = 910.0m???????
+IRB????? = 100.0m???????? RBM????? = 22.20m???????? RE?????? = 20.50m???????
+RC?????? = 3.300m???????? XTB????? = 1.9??????????? EG?????? = 1.11?????????
+XTI????? = 3????????????? CJE????? = 1.420n???????? VJE????? = 750.0m???????
+MJE????? = 383.0m???????? TF?????? = 450p?????????? XTF????? = 7????????????
+VTF????? = 1.000K???????? ITF????? = 20???????????? PTF????? = 0????????????
+CJC????? = 230.0p???????? VJC????? = 520.0m???????? MJC????? = 418.0m???????
+XCJC???? = 1????????????? TR?????? = 1.000n???????? FC?????? = 500.0m???????
+KF?????? = 0????????????? AF?????? = 1????????????? )???????????????????????
*????????????????????????????????????????????????????????????????????????????
.ENDL 2SC6144SG


.ENDL? should be ENDS

LTspice can't run with .endl

Regards
PhB


Steve Kale
 

开云体育

Hi Philippe

I have pasted below the log file I get when (a) the 2SC6144SG subcircuit Spice directive is not made a comment and (b) I “OK” through the errors rather than cancelling the run.

Thanks for the correction to the .subckt. ?I got this from the On Semi website. Could this be a Spice D vs LTspice translation issue or just error?


Note I also found I had to alter their pin order in the line beginning Q1. They had:

Q1 2 1 3 ?C6144SG

But I’m not sure why this should give me the issue I encountered when the Spice directive wasn’t even being called upon…

Regards

Steve

Circuit: * /Users/steve/Desktop/Spice Modelling/Sziklai AD817A/Reg Circuits.asc

Error on line 101 : q13 n053 n062 vout-darlpp 0 qd44vh10
Unable to find definition of model "qd44vh10"
Error on line 133 : q18 n092 n102 vout-darl 0 qd44vh10
Unable to find definition of model "qd44vh10"
Error on line 199 : q27 n123 n131 vout-darlpp2 0 qd44vh10
Unable to find definition of model "qd44vh10"
Error on line 236 : q33 n056 n066 vout-darlpp-stab 0 qd44vh10
Unable to find definition of model "qd44vh10"
Error on line 273 : q38 n095 n103 vout-darl-stab 0 qd44vh10
Unable to find definition of model "qd44vh10"
Error on line 315 : q41 n126 n134 vout-darlpp2-stab 0 qd44vh10
Unable to find definition of model "qd44vh10"
C81: Increased Cpar to 4.7e-10
C80: Increased Cpar to 4.7e-10
C79: Increased Cpar to 1e-09
C78: Increased Cpar to 1e-09
C72: Increased Cpar to 4.7e-10
C71: Increased Cpar to 4.7e-10
C70: Increased Cpar to 1e-09
C69: Increased Cpar to 1e-09
C63: Increased Cpar to 4.7e-10
C62: Increased Cpar to 4.7e-10
C61: Increased Cpar to 1e-09
C60: Increased Cpar to 1e-09
C54: Increased Cpar to 4.7e-10
C53: Increased Cpar to 4.7e-10
C52: Increased Cpar to 1e-09
C51: Increased Cpar to 1e-09
C43: Increased Cpar to 4.7e-10
C42: Increased Cpar to 4.7e-10
C41: Increased Cpar to 1e-09
C40: Increased Cpar to 1e-09
C34: Increased Cpar to 4.7e-10
C33: Increased Cpar to 4.7e-10
C32: Increased Cpar to 1e-09
C31: Increased Cpar to 1e-09
C25: Increased Cpar to 4.7e-10
C24: Increased Cpar to 4.7e-10
C23: Increased Cpar to 1e-09
C22: Increased Cpar to 1e-09
C17: Increased Cpar to 4.7e-10
C16: Increased Cpar to 4.7e-10
C15: Increased Cpar to 1e-09
C14: Increased Cpar to 1e-09
C7: Increased Cpar to 4.7e-10
C6: Increased Cpar to 4.7e-10
C5: Increased Cpar to 1e-09
C4: Increased Cpar to 1e-09
WARNING: Less than two connections to node D1:5. ?This node is used by R:D1:3.
WARNING: Less than two connections to node D2:5. ?This node is used by R:D2:3.
WARNING: Less than two connections to node D3:5. ?This node is used by R:D3:3.
WARNING: Less than two connections to node D4:5. ?This node is used by R:D4:3.
WARNING: Less than two connections to node D5:5. ?This node is used by R:D5:3.
WARNING: Less than two connections to node D6:5. ?This node is used by R:D6:3.
WARNING: Less than two connections to node D7:5. ?This node is used by R:D7:3.
WARNING: Less than two connections to node D8:5. ?This node is used by R:D8:3.
WARNING: Less than two connections to node D13:5. ?This node is used by R:D13:3.
WARNING: Less than two connections to node N158. ?This node is used by R127.
Early termination of direct N-R iteration.
Direct Newton iteration failed to find .op point. ?(Use ".option noopiter" to skip.)
Starting Gmin stepping
Gmin = 10
Gmin = 1.07374
Gmin = 0.115292
Gmin = 0.0123794
Gmin = 0.00132923
Gmin = 0.000142725
Gmin = 1.5325e-05
Gmin = 1.6455e-06
vernier = 0.5
vernier = 0.25
vernier = 0.125
Gmin = 7.68205e-07
vernier = 0.166667
vernier = 0.0833333
Gmin = 6.25527e-07
vernier = 0.111111
vernier = 0.148148
Gmin = 4.58853e-07
vernier = 0.197531
vernier = 0.263374
Gmin = 2.81252e-07
vernier = 0.351165
Gmin = 1.31537e-07
vernier = 0.46822
vernier = 0.624294
Gmin = 3.79017e-08
vernier = 0.832392
vernier = 1
Gmin = 5.83787e-09
Gmin = 6.26837e-10
Gmin = 6.73061e-11
Gmin = 0
Gmin stepping succeeded in finding the operating point.

Ignoring empty pin current: Ix(u2:11)
Ignoring empty pin current: Ix(u4:11)
Ignoring empty pin current: Ix(u6:11)
Ignoring empty pin current: Ix(u8:11)
Ignoring empty pin current: Ix(u10:11)
Ignoring empty pin current: Ix(u12:11)
Ignoring empty pin current: Ix(u14:11)
Ignoring empty pin current: Ix(u16:11)
Ignoring empty pin current: Ix(u18:11)
Ignoring empty pin current: Ix(u19:11)
Ignoring empty pin current: Ix(u2:11)
Ignoring empty pin current: Ix(u4:11)
Ignoring empty pin current: Ix(u6:11)
Ignoring empty pin current: Ix(u8:11)
Ignoring empty pin current: Ix(u10:11)
Ignoring empty pin current: Ix(u12:11)
Ignoring empty pin current: Ix(u14:11)
Ignoring empty pin current: Ix(u16:11)
Ignoring empty pin current: Ix(u18:11)
Ignoring empty pin current: Ix(u19:11)

Date: Tue Aug ?9 15:30:59 2016
Total elapsed time: 51.922 seconds.

tnom = 27
temp = 27
method = trap
totiter = 1287
traniter = 0
tranpoints = 0
accept = 0
rejected = 0
matrix size = 834
fillins = 1891
solver = Alternate
Matrix Compiler1: ? ?9656 opcodes
Matrix Compiler2: ? ?7661 opcodes


On 9 Aug 2016, at 15:27, philippe wrote:

Hello Steve

You wrote:
"??That plot was produced in an earlier schematic. I later encountered problems with the schematic no longer recognising .inc statements and hence refusing to work.?"

Have you still the .log file you got when you tried to run the earlier schematic ?

Note that in?
.SUBCKT 2SC6144SG 1 2 3
Q1 1 2 3? C6144SG???????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????????
.MODEL C6144SG npn (?????? IS?????? = 3.500p???????? BF?????? = 335???????????
+NF?????? = 1????????????? VAF????? = 9????????????? IKF????? = 13????????????
+ISE????? = 50.00p???????? NE?????? = 2????????????? BR?????? = 160???????????
+NR?????? = 1????????????? VAR????? = 26???????????? IKR????? = 2.9???????????
+ISC????? = 230.0p???????? NC?????? = 2????????????? RB?????? = 910.0m????????
+IRB????? = 100.0m???????? RBM????? = 22.20m???????? RE?????? = 20.50m????????
+RC?????? = 3.300m???????? XTB????? = 1.9??????????? EG?????? = 1.11??????????
+XTI????? = 3????????????? CJE????? = 1.420n???????? VJE????? = 750.0m????????
+MJE????? = 383.0m???????? TF?????? = 450p?????????? XTF????? = 7?????????????
+VTF????? = 1.000K???????? ITF????? = 20???????????? PTF????? = 0?????????????
+CJC????? = 230.0p???????? VJC????? = 520.0m???????? MJC????? = 418.0m????????
+XCJC???? = 1????????????? TR?????? = 1.000n???????? FC?????? = 500.0m????????
+KF?????? = 0????????????? AF?????? = 1????????????? )????????????????????????
*?????????????????????????????????????????????????????????????????????????????
.ENDL?2SC6144SG


.ENDL? should be ENDS

LTspice can't run with .endl

Regards
PhB



Steve Kale
 

I tracked this down to a missing resistor. Stupid. ?Now off to the opticians for a new set of glasses…

I’ve updated the zip file in the Temp files section to Phase Analysis Rev B and deleted the old one.?


On 9 Aug 2016, at 11:32, Steve wrote:

Now, the sub 1kHz behaviour remains the same as the image I had uploaded in the zip file (i.e. different from my new circuit) so I need to track down what’s causing that difference.


 

Hello Steve

" I have pasted below the log file I get when (a) the 2SC6144SG subcircuit Spice directive is not made a comment "

Coul you set "generate expanded listing" in control Panel \ Operatons and send again the file .log ?
Don't cancel the run.
Upload in Temp it if it is too big.

" q13 n053 n062 vout-darlpp 0 qd44vh10" :


Regards
PhB


Steve Kale
 

开云体育

Hi

I have added Reg Circuits.zip to the Temp files folder. ?It contains (1) the (old) reg circuits.asc file which has the problem you are exploring (just change the subcircuit Spice directive between a Spice directive and comment to see the error behaviour) plus (2) the log file and (3) Qd45vh10.txt which I believe is the only file missing to enable reg circuits.asc to run if ?both files are added to the folder I uploaded previously (Phase Analysis Rev B.zip). (You will see that Darlington.asc is basically just the bottom two schematics in reg circuits.asc with minor amendments.)

Thanks

Steve


On 9 Aug 2016, at 16:31, basier.philippe@... [LTspice] <LTspice@...> wrote:

Hello Steve

"?I have pasted below the log file I get when (a) the 2SC6144SG subcircuit Spice directive is not made a comment?"

Coul you set "generate expanded listing" in control Panel \ Operatons and send again the file .log ?
Don't cancel the run.?
Upload in Temp it if it is too big.

" q13 n053 n062 vout-darlpp 0 qd44vh10" :


Regards
PhB



 

Hello Steve

The error
" Error on line 101 : q13 n053 n062 vout-darlpp 0 qd44vh10 " appears because you have a bad

.SUBCKT 2SC6144SG 1 2 3 finishing by
.ensL

Correct .endL in .endS and your circuit will run.

It's not so obvious.

Regards
PhB


 

I'm not up to date yet with newer replies, but I want to respond to this, from the original message:

? ?"I don't seem to be able to use a differential probe to identify phase shift between two points.?"

A differential measurement doesn't show the phase between the two points.? It would show you the differential voltage between those two points. ?

It can show you the magnitude and the phase of that one voltage.? But it definitely would not be the phase between one voltage and the other.

Andy



 

Hello,

If one want the phase between two signals in the .AC analysis, then one should plot V(a)/V(b).?
This will plot the ratio |V(a)|/|V(b)| and the phase difference phi(a)-phi(b).

Best regards,
Helmut


Steve Kale
 

开云体育

Hi Philippe

OK so a weird one. First, On Semi have two errors (assuming the pin order is indeed also a problem) in their Spice model (?) and then, second, LTspice doesn’t have a problem with the .subckt statement when it is invoked but does have a problem with it when it isn’t and when it does have a problem it points to an error unrelated to the .subckt statement. Perhaps one for Mike...

Thanks?

Steve

(back to probing phase)


On 9 Aug 2016, at 17:30, basier.philippe@... [LTspice] <LTspice@...> wrote:

Hello Steve

The error
" Error on line 101 : q13 n053 n062 vout-darlpp 0 qd44vh10 " appears because you have a bad?

.SUBCKT 2SC6144SG 1 2 3 finishing by
.ensL

Correct .endL in .endS and your circuit will run.

It's not so obvious.

Regards
PhB



Steve Kale
 

On 9 Aug 2016, at 19:57, Andy wrote:

A differential measurement doesn't show the phase between the two points. It would show you the differential voltage between those two points.

It can show you the magnitude and the phase of that one voltage. But it definitely would not be the phase between one voltage and the other.
Ok. "Phase of that one voltage"...Phase of the differential? (Not so intuitive to a newbie.)

On 9 Aug 2016, at 20:03, helmut wrote:


If one want the phase between two signals in the .AC analysis, then one should plot V(a)/V(b).
This will plot the ratio |V(a)|/|V(b)| and the phase difference phi(a)-phi(b).
Ok thanks. So it seems my plots were indeed steps in the right direction. As done they showed the phase difference between that at Vout and each of my selected points in the circuit. I can now amend them to show directly the incremental step in phase as I move around the feedback loop (for example).

I just now need to clarify the use of the minus sign ahead of, e.g, V(Vout)/V(Y) where Y is a node label at the minus side of the AC small signal injection point. (See previous comment.)

I’ve clearly been getting confused between the graph portraying phase (excluding the op amp's 180 degrees) and phase margin directly. Plus the impact of the minus sign. Of course, in the example I posted, if it is not applied then the graph would read +89 degrees. If it is then the graph reads -91 degrees. It seems odd to talk about a negative margin but Helmut had some time ago told me to plot with the minus sign.

I also don’t understand why when I alter both circuits (identically) in Darlington.asc so as to cause a change in the loop gain plot (e.g.extension/contraction of UGF, change in output cap pole leading to greater/lesser loop gain ahead of UGF) there isn’t a complementary change in the line rejection plot (first circuit where AC small signal is added to the supply voltage and output voltage plotted in dB). An example: if I change .param Cout 470u to step this parameter

.step param Cout list 470u 220u 100u

lower Cout increases loop gain between 100Hz and 100kHz while keeping UGF and phase margin about constant (second circuit) as the pole created by the output cap is moved to higher frequencies. I would expect the greater level of gain being applied at those frequencies by the feedback loop to lead to greater line rejection (modelled by first circuit) at those frequencies. But a plot of output voltage of the first circuit (for which Cout is also stepped) shows no change across the 3 steps.

Thanks for all the help

Steve


 

Hello Steve

You wrote :

A/ "assuming the pin order is indeed also a problem) "

'llI let others answer you about this point.

B/" then, second, LTspice doesn’t have a problem with the .subckt statement when it is invoked but does have a problem with it when it isn’t "

I suppose that by "invoked" you mean to say "used" : For me? as soon as there is a not commented command .subckt 2SC6144SG, the subcircuit is invoked even if there is no instance of this part.

I don't agree with you : in both cases, as long as subckt 2SC6144SG is not commented, you have an error in subckt 2SC6144SG and LTspice don't want to run.

If you choose the option "select OK to continue....." results are not what you are looking for.

Morality : I avoid to paste subckt code inside a schematic.

Regards
PhB


Steve Kale
 

开云体育

Hi Philippe

I don’t want to labour the point as it is not directly concerned with my outstanding questions regarding phase. However, I do?not?get any errors if the?2SC6144SG?.subckt Spice directive is active (not commented) and all instances of Qd44vh10 are replaced with?2SC6144SG. ?I do not need to “select OK to continue”. (This was what I had done when I tested the circuits with the higher fT transistor.) ?If there is any instance of Q44dvh10, then LTspice tells me I have a problem with the lack of a model statement for Q44dvh10 - even though I clearly have one. ?LTspice does not ever tell me there’s a problem with the?2SC6144SG?.subckt Spice directive - not when I have an active instance of the device in the circuit nor when I do. That made finding the problem that much more challenging.?

Regards

Steve

On 10 Aug 2016, at 14:17, basier.philippe@... [LTspice] <LTspice@...> wrote:

Hello Steve

You wrote :

A/ "assuming the pin order is indeed also a problem)?"

'llI let others answer you about this point.

B/"?then, second, LTspice doesn’t have a problem with the .subckt statement when it is invoked but does have a problem with it when it isn’t?"

I suppose that by "invoked" you mean to say "used" : For me? as soon as there is a not commented command .subckt 2SC6144SG, the subcircuit is invoked even if there is no instance of this part.

I don't agree with you : in both cases, as long as subckt 2SC6144SG is not commented, you have an error in subckt 2SC6144SG and LTspice don't want to run.

If you choose the option "select OK to continue....." results are not what you are looking for.

Morality : I avoid to paste subckt code inside a schematic.

Regards
PhB



 

Hello? Steve

"If there is any instance of Q44dvh10, then LTspice tells me I have a problem with the lack of a model statement for Q44dvh10 - even though I clearly have one.
LTspice does not ever tell me there’s a problem with the 2SC6144SG .subckt Spice directive - not when I have an active instance of the device in the circuit nor when I do. "

If I replace Q33 by an instance of? 2SC6144SG I have :
a pop window at the end of the run with:
Error on line 101 : q13 n053 n062 vout-darlpp 0 qd44vh10
??? ?Unable to find definition of model "qd44vh10"
Error on line 133 : q18 n092 n102 vout-darl 0 qd44vh10
??? ?Unable to find definition of model "qd44vh10"
Error on line 199 : q27 n123 n131 vout-darlpp2 0 qd44vh10
??? ?Unable to find definition of model "qd44vh10"
Error on line 1137 : .endl 2sc6144sg
??? ?Unknown control card
Error on line 273 : q38 n095 n103 vout-darl-stab 0 qd44vh10
??? ?Unable to find definition of model "qd44vh10"
Error on line 315 : q41 n126 n134 vout-darlpp2-stab 0 qd44vh10
??? ?Unable to find definition of model "qd44vh10"


Note? Error on line 1137 : .endl 2sc6144sg
??? ?Unknown control card

You can see the same thing in the log file.

If I replace all Dq44dvh10 by 2SC6144SG I have :
Error on line 1138 : .endl 2sc6144sg
??? ?Unknown control card
Error on line 1138 : .endl 2sc6144sg
??? ?Unknown control card
Error on line 1138 : .endl 2sc6144sg
??? ?Unknown control card
Error on line 1138 : .endl 2sc6144sg
??? ?Unknown control card
Error on line 1138 : .endl 2sc6144sg
??? ?Unknown control card
Error on line 1138 : .endl 2sc6144sg
??? ?Unknown control card

Regards
PhB


Steve Kale
 

开云体育

Philippe

Replace all 6 of the Qd44vh10 with 2SC6144SG and tell me if you get an error. ?I get none. ?If one Qd44vh10 remains then yes I get an error.

Regards

Steve

On 10 Aug 2016, at 17:37, basier.philippe@... [LTspice] <LTspice@...> wrote:

Hello? Steve

"If there is any instance of Q44dvh10, then LTspice tells me I have a problem with the lack of a model statement for Q44dvh10 - even though I clearly have one.
LTspice does not ever tell me there’s a problem with the 2SC6144SG .subckt Spice directive - not when I have an active instance of the device in the circuit nor when I do.?"

If I replace Q33 by an instance of? 2SC6144SG I have :
a pop window at the end of the run with:
Error on line 101 : q13 n053 n062 vout-darlpp 0 qd44vh10
??? ?Unable to find definition of model "qd44vh10"
Error on line 133 : q18 n092 n102 vout-darl 0 qd44vh10
??? ?Unable to find definition of model "qd44vh10"
Error on line 199 : q27 n123 n131 vout-darlpp2 0 qd44vh10
??? ?Unable to find definition of model "qd44vh10"
Error on line 1137 : .endl 2sc6144sg
??? ?Unknown control card
Error on line 273 : q38 n095 n103 vout-darl-stab 0 qd44vh10
??? ?Unable to find definition of model "qd44vh10"
Error on line 315 : q41 n126 n134 vout-darlpp2-stab 0 qd44vh10
??? ?Unable to find definition of model "qd44vh10"


Note? Error on line 1137 : .endl 2sc6144sg
??? ?Unknown control card

You can see the same thing in the log file.

If I replace all Dq44dvh10 by?2SC6144SG I have :
Error on line 1138 : .endl 2sc6144sg
??? ?Unknown control card
Error on line 1138 : .endl 2sc6144sg
??? ?Unknown control card
Error on line 1138 : .endl 2sc6144sg
??? ?Unknown control card
Error on line 1138 : .endl 2sc6144sg
??? ?Unknown control card
Error on line 1138 : .endl 2sc6144sg
??? ?Unknown control card
Error on line 1138 : .endl 2sc6144sg
??? ?Unknown control card

Regards
PhB



John Woodgate
 

It looks very much as though your model isn't called *exactly* ' Qd44vh10'. There could be a leading or trailing space or another invisible character. Have you ever uploaded the model?

With best wishes DESIGN IT IN! OOO – Own Opinions Only
<> www.jmwa.demon.co.uk J M Woodgate and Associates Rayleigh England

Sylvae in aeternum manent.

From: LTspice@... [mailto:LTspice@...]
Sent: Wednesday, August 10, 2016 7:44 PM
To: LTspice@...
Subject: Re: [LTspice] Probing phase


Philippe

Replace all 6 of the Qd44vh10 with 2SC6144SG and tell me if you get an error. I get none. If one Qd44vh10 remains then yes I get an error.

Regards

Steve
On 10 Aug 2016, at 17:37, basier.philippe@... <mailto:basier.philippe@...> [LTspice] <LTspice@... <mailto:LTspice@...> > wrote:

Hello Steve

"If there is any instance of Q44dvh10, then LTspice tells me I have a problem with the lack of a model statement for Q44dvh10 - even though I clearly have one.
LTspice does not ever tell me there’s a problem with the 2SC6144SG .subckt Spice directive - not when I have an active instance of the device in the circuit nor when I do. "

If I replace Q33 by an instance of 2SC6144SG I have :
a pop window at the end of the run with:
Error on line 101 : q13 n053 n062 vout-darlpp 0 qd44vh10
Unable to find definition of model "qd44vh10"
Error on line 133 : q18 n092 n102 vout-darl 0 qd44vh10
Unable to find definition of model "qd44vh10"
Error on line 199 : q27 n123 n131 vout-darlpp2 0 qd44vh10
Unable to find definition of model "qd44vh10"
Error on line 1137 : .endl 2sc6144sg
Unknown control card
Error on line 273 : q38 n095 n103 vout-darl-stab 0 qd44vh10
Unable to find definition of model "qd44vh10"
Error on line 315 : q41 n126 n134 vout-darlpp2-stab 0 qd44vh10
Unable to find definition of model "qd44vh10"


Note Error on line 1137 : .endl 2sc6144sg
Unknown control card

You can see the same thing in the log file.

If I replace all Dq44dvh10 by 2SC6144SG I have :
Error on line 1138 : .endl 2sc6144sg
Unknown control card
Error on line 1138 : .endl 2sc6144sg
Unknown control card
Error on line 1138 : .endl 2sc6144sg
Unknown control card
Error on line 1138 : .endl 2sc6144sg
Unknown control card
Error on line 1138 : .endl 2sc6144sg
Unknown control card
Error on line 1138 : .endl 2sc6144sg
Unknown control card

Regards
PhB


 

Hello

With all Qd44vh10 replaced
If I replace .endL? by .ends I get no error or warning.

If I keep .endL I get :


Error on line 1138 : .endl 2sc6144sg
??? ?Unknown control card
Error on line 1138 : .endl 2sc6144sg
??? ?Unknown control card
Error on line 1138 : .endl 2sc6144sg
??? ?Unknown control card
Error on line 1138 : .endl 2sc6144sg
??? ?Unknown control card
Error on line 1138 : .endl 2sc6144sg
??? ?Unknown control card
Error on line 1138 : .endl 2sc6144sg
??? ?Unknown control card

Regards
PhB