Electronics-Related.com
Forums

LTspice differentiation

Started by Piotr Wyderski November 15, 2016
On Wed, 16 Nov 2016 00:04:13 +0100, Piotr Wyderski
<piotr.wyderski.no.spam@gmail.com> wrote:

>Hello, > >I have a resistor R5 with some current flowing through it. >It is possible to plot I(R5) by simply selecting the resistor. >But is it possible to plot dI(R5)/dt? If yes, then how? >An example circuit: > >Version 4 >SHEET 1 916 680 >WIRE 256 16 144 16 >WIRE 464 16 336 16
[snip]
>SYMATTR Value U309 >TEXT 110 216 Left 2 !.tran 4
Download LTspiceTutorials.zip from the Simulation Tools & macros page of my website, and extract. LTspice will do the time derivative via ddt(x), but apparently doesn't do a general d(x)/d(x-axis-variable) like PSpice. ...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | STV, Queen Creek, AZ 85142 Skype: skypeanalog | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I'm looking for work... see my website.
On 11/15/2016 09:25 PM, John Larkin wrote:
> On Tue, 15 Nov 2016 20:08:22 -0600, Tim Wescott <tim@seemywebsite.com> > wrote: > >> On Tue, 15 Nov 2016 15:25:33 -0800, John Larkin wrote: >> >>> On Tue, 15 Nov 2016 17:17:00 -0600, Tim Wescott <tim@seemywebsite.com> >>> wrote: >>> >>>> On Wed, 16 Nov 2016 00:04:13 +0100, Piotr Wyderski wrote: >>>> >>>>> Hello, >>>>> >>>>> I have a resistor R5 with some current flowing through it. >>>>> It is possible to plot I(R5) by simply selecting the resistor. >>>>> But is it possible to plot dI(R5)/dt? If yes, then how? >>>>> An example circuit: >>>> >>>> Not directly, but you can make a current-dependent voltage source that >>>> has a Laplace transfer function for the gain. It'll need to be of the >>>> form H = s / (tau * s + 1), because SPICE doesn't like nekkid >>>> differentiators. >>> >>> Or just use a buffer and a C-R circuit. >> >> Killjoy. > > I like to build my own test equipment in Spice.
Is Spice Turing-complete? Could you simulate a digital computer within Spice? Given enough time and processing power, could one simulate an Spice computer that could run Spice?
On Wed, 16 Nov 2016 12:12:36 -0500, bitrex wrote:

> On 11/15/2016 09:25 PM, John Larkin wrote: >> On Tue, 15 Nov 2016 20:08:22 -0600, Tim Wescott <tim@seemywebsite.com> >> wrote: >> >>> On Tue, 15 Nov 2016 15:25:33 -0800, John Larkin wrote: >>> >>>> On Tue, 15 Nov 2016 17:17:00 -0600, Tim Wescott >>>> <tim@seemywebsite.com> >>>> wrote: >>>> >>>>> On Wed, 16 Nov 2016 00:04:13 +0100, Piotr Wyderski wrote: >>>>> >>>>>> Hello, >>>>>> >>>>>> I have a resistor R5 with some current flowing through it. >>>>>> It is possible to plot I(R5) by simply selecting the resistor. >>>>>> But is it possible to plot dI(R5)/dt? If yes, then how? >>>>>> An example circuit: >>>>> >>>>> Not directly, but you can make a current-dependent voltage source >>>>> that has a Laplace transfer function for the gain. It'll need to be >>>>> of the form H = s / (tau * s + 1), because SPICE doesn't like nekkid >>>>> differentiators. >>>> >>>> Or just use a buffer and a C-R circuit. >>> >>> Killjoy. >> >> I like to build my own test equipment in Spice. > > Is Spice Turing-complete? Could you simulate a digital computer within > Spice? Given enough time and processing power, could one simulate an > Spice computer that could run Spice?
You can make a NAND gate in SPICE, and if you have a NAND gate you can synthesize all other logic. You can build a Turing complete computer out of logic. So, assuming you can make an infinite number of NAND gates in SPICE, it is Turing complete. -- Tim Wescott Control systems, embedded software and circuit design I'm looking for work! See my website if you're interested http://www.wescottdesign.com
On Wed, 16 Nov 2016 11:59:37 -0600, Tim Wescott <tim@seemywebsite.com>
wrote:

>On Wed, 16 Nov 2016 12:12:36 -0500, bitrex wrote: > >> On 11/15/2016 09:25 PM, John Larkin wrote: >>> On Tue, 15 Nov 2016 20:08:22 -0600, Tim Wescott <tim@seemywebsite.com> >>> wrote: >>> >>>> On Tue, 15 Nov 2016 15:25:33 -0800, John Larkin wrote: >>>> >>>>> On Tue, 15 Nov 2016 17:17:00 -0600, Tim Wescott >>>>> <tim@seemywebsite.com> >>>>> wrote: >>>>> >>>>>> On Wed, 16 Nov 2016 00:04:13 +0100, Piotr Wyderski wrote: >>>>>> >>>>>>> Hello, >>>>>>> >>>>>>> I have a resistor R5 with some current flowing through it. >>>>>>> It is possible to plot I(R5) by simply selecting the resistor. >>>>>>> But is it possible to plot dI(R5)/dt? If yes, then how? >>>>>>> An example circuit: >>>>>> >>>>>> Not directly, but you can make a current-dependent voltage source >>>>>> that has a Laplace transfer function for the gain. It'll need to be >>>>>> of the form H = s / (tau * s + 1), because SPICE doesn't like nekkid >>>>>> differentiators. >>>>> >>>>> Or just use a buffer and a C-R circuit. >>>> >>>> Killjoy. >>> >>> I like to build my own test equipment in Spice. >> >> Is Spice Turing-complete? Could you simulate a digital computer within >> Spice? Given enough time and processing power, could one simulate an >> Spice computer that could run Spice? > >You can make a NAND gate in SPICE, and if you have a NAND gate you can >synthesize all other logic. You can build a Turing complete computer out >of logic. So, assuming you can make an infinite number of NAND gates in >SPICE, it is Turing complete.
LT Spice already has the basic logic gates and flops. They typically need a little timing fudging to build things like shift registers and state machines. -- John Larkin Highland Technology, Inc picosecond timing precision measurement jlarkin att highlandtechnology dott com http://www.highlandtechnology.com
On 11/16/2016 01:43 PM, John Larkin wrote:
> On Wed, 16 Nov 2016 11:59:37 -0600, Tim Wescott <tim@seemywebsite.com> > wrote: > >> On Wed, 16 Nov 2016 12:12:36 -0500, bitrex wrote: >> >>> On 11/15/2016 09:25 PM, John Larkin wrote: >>>> On Tue, 15 Nov 2016 20:08:22 -0600, Tim Wescott <tim@seemywebsite.com> >>>> wrote: >>>> >>>>> On Tue, 15 Nov 2016 15:25:33 -0800, John Larkin wrote: >>>>> >>>>>> On Tue, 15 Nov 2016 17:17:00 -0600, Tim Wescott >>>>>> <tim@seemywebsite.com> >>>>>> wrote: >>>>>> >>>>>>> On Wed, 16 Nov 2016 00:04:13 +0100, Piotr Wyderski wrote: >>>>>>> >>>>>>>> Hello, >>>>>>>> >>>>>>>> I have a resistor R5 with some current flowing through it. >>>>>>>> It is possible to plot I(R5) by simply selecting the resistor. >>>>>>>> But is it possible to plot dI(R5)/dt? If yes, then how? >>>>>>>> An example circuit: >>>>>>> >>>>>>> Not directly, but you can make a current-dependent voltage source >>>>>>> that has a Laplace transfer function for the gain. It'll need to be >>>>>>> of the form H = s / (tau * s + 1), because SPICE doesn't like nekkid >>>>>>> differentiators. >>>>>> >>>>>> Or just use a buffer and a C-R circuit. >>>>> >>>>> Killjoy. >>>> >>>> I like to build my own test equipment in Spice. >>> >>> Is Spice Turing-complete? Could you simulate a digital computer within >>> Spice? Given enough time and processing power, could one simulate an >>> Spice computer that could run Spice? >> >> You can make a NAND gate in SPICE, and if you have a NAND gate you can >> synthesize all other logic. You can build a Turing complete computer out >> of logic. So, assuming you can make an infinite number of NAND gates in >> SPICE, it is Turing complete. > > LT Spice already has the basic logic gates and flops. They typically > need a little timing fudging to build things like shift registers and > state machines.
I hear the robot civilizations of the far future will spend an enormous amount of effort searching for the remnants of the First Compiler, the assembly language program which boostrapped the first higher level program, from which the compilers for all future programs derived.
On 16-11-16 10:59 AM, Tim Wescott wrote:

> You can make a NAND gate in SPICE, and if you have a NAND gate you can > synthesize all other logic. You can build a Turing complete computer out > of logic. So, assuming you can make an infinite number of NAND gates in > SPICE, it is Turing complete. >
I finished assembling an infinite number of NAND gates just yesterday. It took slightly longer than I had anticipated. Sadly, my workbench being what it is, the assembly has gone missing. I'm not happy. Learn from my mistake and connect your next project to the power supply upon completion. That way, with any luck, you can follow the leads to the terminals. mike -- It is hard enough to remember my opinions, without also remembering my reasons for them! --Friedrich Nietzsche
On 17/11/16 06:47, bitrex wrote:
> I hear the robot civilizations of the far future will spend an enormous > amount of effort searching for the remnants of the First Compiler, the > assembly language program which boostrapped the first higher level > program, from which the compilers for all future programs derived.
There is only one program. All the programs that we see are just modified versions of that first one. Oommmmmmmmm!