Topics Topics Edit Profile Profile Help/Instructions Help Member List Member List  
Search Last 1|3|7 Days Search Search Tree View Tree View  

Rise time with simple LTSpice symbol

:: EPE Chat Zone ­:: ­Radio Bygones Message Board :: » EPE Forum Archives 2010 - » Archive through 08 August, 2010 » Rise time with simple LTSpice symbol « Previous Next »

  Thread Last Poster Posts Pages Last Post
  ClosedClosed: New threads not accepted on this page        

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

741
Frequent Contributor
Username: 741

Post Number: 184
Registered: 08-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, 29 July, 2010 - 10:43 am:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

Here is something that tripped me up recently:

I created a very simple 'block' for LTSpice which simply outputs K*[(v+)-v(-)]. I must admit I never gave a thought to rise-time:

This is 'DifAmp.sub'
* DifAmp
* dif = K * [(V+) - (V-)]
.SUBCKT DifAmp 1 2 3 4
EDIF 3 4 VALUE={K*V(1,2)}
.ENDS DifAmp


I applied 1V across the input, and I noticed that the output 'slews' at 1 V in 20uS. I need to change this value (20uS) to something smaller.

Out of interest, a simple, pre-canned 'Cell' also slews at this rate. Although LTSpice has a 'cell' symbol for this, it is just a 'voltage source' (as can be seen by right-clicking). In this case, I can change the 'function' from 'none' to 'pulse', and thus explicitly choose rise-time.

So I guess that I need to ammend my ultra-simple .sub file, and change

EDIF 3 4 VALUE={ K*V(1,2)}

to some variation on LTSPice's own voltage source.


Incidentally, although I think I've 'escaped' the curly brackets \{ and \} within the 'font' statement, when I post I get unwanted extra '}}'

This is unwanted-->}}
Top of pagePrevious messageNext messageBottom of page Link to this message

741
Frequent Contributor
Username: 741

Post Number: 186
Registered: 08-2005


Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, 29 July, 2010 - 01:22 pm:   Edit Post Delete Post Print Post    Move Post (Moderator/Admin Only)

By studying the simple 'OpAmp' model, I came up with:
voltage-dependant current source
R
C
All in parallel:

* DifAmp
* dif = K * [(V+) - (V-)] with some slew limiting
.SUBCKT DifAmp 1 2 3 4
G1 4 3 1 2 {K}
R1 3 4 1.0
C3 3 4 0.001pF
*OK, C is rather small..
.ENDS DifAmp

Administration Administration Log Out Log Out   Previous Page Previous Page Next Page Next Page