From: John Larkin on
On Tue, 13 Apr 2010 17:31:20 -0700, Joerg <invalid(a)invalid.invalid>
wrote:

>John Larkin wrote:
>> On Tue, 13 Apr 2010 23:08:23 +0200, "Helmut Sennewald"
>> <helmutsennewald(a)t-online.de> wrote:
>>
>>> "John Larkin" <jjlarkin(a)highNOTlandTHIStechnologyPART.com> schrieb im
>>> Newsbeitrag news:sfd9s511ormdiedjk9o725omcntmkttgpq(a)4ax.com...
>>>> On Tue, 13 Apr 2010 10:58:03 -0700, Joerg <invalid(a)invalid.invalid>
>>>> wrote:
>>>>
>>>>> Hello Folks,
>>>>>
>>>>> Got stuck when trying to simulate an NTC. This temperature-variant
>>>>> resistor will be the only variable input so ".STEP" and stuff do not cut
>>>>> it because that only overlays multiple curve in an AC or DC simulation.
>>>>> I want just one curve: Output of my circuit versus varying NTC resistor
>>>>> value.
>>>>>
>>>>> Tried to make a voltage dependent resistor this way:
>>>>>
>>>>> http://www.electro-tech-online.com/attachments/general-electronics-chat/40714d1269571000-sine-variable-resistor-ltspice-d2.png
>>>>>
>>>>> It works but is incredibly slow. Any better ideas?
>>>> Do you need a voltage to resistance converter? That's easy if you have
>>>> a multiplier. Interestingly, LT Spice doesn't provide a multiplier
>>>> component.
>>>>
>>>> John
>>>
>>> Hello John,
>>>
>>> LTspice has B-deviecs. They can do a lot of math.
>>> *
>>> ** power
>>> / divide
>>> sin
>>> tanh
>>> exp
>>>
>>> See the help pages for B-devices.
>>> The B-device is the best device to implement a NTC-resistor
>>> with it's exponential resistance versus temperature function.
>>>
>>> The LTspice Yahoo group provides examples.
>>>
>>> Best regards,
>>> Helmut
>>>
>>>
>>>
>>
>> Sure, but a canned multiplier component would be handy, without a
>> bunch of typing. As would an ideal diode. At least they have ideal
>> opamps.
>>
>
>There are modulators though, regular and I/Q, under special functions.

Yeah, I saw those. But it would be handy for the occasional user (like
me) to have some basic math functions all boxed up; mul, log, antilog,
clippers, deadband come to mind. Adds and subs are easy... just stack
VCVS's.

They do have a programmable transzorb, which looks to me like a
programmable clipper/deadband of sorts.

I Spice a circuit maybe once a month, if that, so it's a minor
nuisance to prowl through the sometimes-helpful Help to re-learn the
syntax for stuff like this.

John

From: Joerg on
John Larkin wrote:
> On Tue, 13 Apr 2010 17:31:20 -0700, Joerg <invalid(a)invalid.invalid>
> wrote:
>
>> John Larkin wrote:
>>> On Tue, 13 Apr 2010 23:08:23 +0200, "Helmut Sennewald"
>>> <helmutsennewald(a)t-online.de> wrote:
>>>
>>>> "John Larkin" <jjlarkin(a)highNOTlandTHIStechnologyPART.com> schrieb im
>>>> Newsbeitrag news:sfd9s511ormdiedjk9o725omcntmkttgpq(a)4ax.com...
>>>>> On Tue, 13 Apr 2010 10:58:03 -0700, Joerg <invalid(a)invalid.invalid>
>>>>> wrote:
>>>>>
>>>>>> Hello Folks,
>>>>>>
>>>>>> Got stuck when trying to simulate an NTC. This temperature-variant
>>>>>> resistor will be the only variable input so ".STEP" and stuff do not cut
>>>>>> it because that only overlays multiple curve in an AC or DC simulation.
>>>>>> I want just one curve: Output of my circuit versus varying NTC resistor
>>>>>> value.
>>>>>>
>>>>>> Tried to make a voltage dependent resistor this way:
>>>>>>
>>>>>> http://www.electro-tech-online.com/attachments/general-electronics-chat/40714d1269571000-sine-variable-resistor-ltspice-d2.png
>>>>>>
>>>>>> It works but is incredibly slow. Any better ideas?
>>>>> Do you need a voltage to resistance converter? That's easy if you have
>>>>> a multiplier. Interestingly, LT Spice doesn't provide a multiplier
>>>>> component.
>>>>>
>>>>> John
>>>> Hello John,
>>>>
>>>> LTspice has B-deviecs. They can do a lot of math.
>>>> *
>>>> ** power
>>>> / divide
>>>> sin
>>>> tanh
>>>> exp
>>>>
>>>> See the help pages for B-devices.
>>>> The B-device is the best device to implement a NTC-resistor
>>>> with it's exponential resistance versus temperature function.
>>>>
>>>> The LTspice Yahoo group provides examples.
>>>>
>>>> Best regards,
>>>> Helmut
>>>>
>>>>
>>>>
>>> Sure, but a canned multiplier component would be handy, without a
>>> bunch of typing. As would an ideal diode. At least they have ideal
>>> opamps.
>>>
>> There are modulators though, regular and I/Q, under special functions.
>
> Yeah, I saw those. But it would be handy for the occasional user (like
> me) to have some basic math functions all boxed up; mul, log, antilog,
> clippers, deadband come to mind. Adds and subs are easy... just stack
> VCVS's.
>
> They do have a programmable transzorb, which looks to me like a
> programmable clipper/deadband of sorts.
>
> I Spice a circuit maybe once a month, if that, so it's a minor
> nuisance to prowl through the sometimes-helpful Help to re-learn the
> syntax for stuff like this.
>

I find myself SPICE-ing many hours a week by now. With some of the more
unorthodox circuits there is no other way. Like PWM chips used flat-out
as solenoid drivers and so on.

--
Regards, Joerg

http://www.analogconsultants.com/

"gmail" domain blocked because of excessive spam.
Use another domain or send PM.
From: Joerg on
Jim Thompson wrote:
> On Tue, 13 Apr 2010 17:28:51 -0700, Joerg <invalid(a)invalid.invalid>
> wrote:
>
>> Jim Thompson wrote:
>>> On Tue, 13 Apr 2010 15:10:51 -0700, Joerg <invalid(a)invalid.invalid>
>>> wrote:
>>>
>>>> Jim Thompson wrote:
>>>>> On Tue, 13 Apr 2010 10:58:03 -0700, Joerg <invalid(a)invalid.invalid>
>>>>> wrote:
>>>>>
>>>>>> Hello Folks,
>>>>>>
>>>>>> Got stuck when trying to simulate an NTC. This temperature-variant
>>>>>> resistor will be the only variable input so ".STEP" and stuff do not cut
>>>>>> it because that only overlays multiple curve in an AC or DC simulation.
>>>>>> I want just one curve: Output of my circuit versus varying NTC resistor
>>>>>> value.
>>>>>>
>>>>>> Tried to make a voltage dependent resistor this way:
>>>>>>
>>>>>> http://www.electro-tech-online.com/attachments/general-electronics-chat/40714d1269571000-sine-variable-resistor-ltspice-d2.png
>>>>>>
>>>>>> It works but is incredibly slow. Any better ideas?
>>>>> Sorry, Joerg, I misread your need. It's actually quite simple, IF you
>>>>> can describe the TC with coefficients of T and T^2... make your own
>>>>> resistor model:
>>>>>
>>>>> Resistor
>>>>>
>>>>> General form
>>>>>
>>>>> R<name> <(+) node> <(-) node> [model name] <value>
>>>>> + [TC = <TC1> [,<TC2>]]
>>>>>
>>>>> TC1, and TC2 are the linear and squared coefficients, respectively.
>>>>>
>>>>> See the LTspice manual for clarity (the above was pasted from
>>>>> PSPCREF.pdf)
>>>>>
>>>> In the current case it's a whole lot uglier than that, see under
>>>> "Inverse of the equation":
>>>>
>>>> http://en.wikipedia.org/wiki/Steinhart%E2%80%93Hart_equation
>>>>
>>>> T (Temperature) must be scooted. I think LTSpice will have a cow when I
>>>> try this.
>>> Then use a resistance vs temperature table... trivial in PSpice,
>>> probably so in LTspice.
>>>
>>> Besides, that smells like unnecessary obfuscation :-)
>>>
>> Depends on the client, how much precision they want, how much MIPS is
>> there, how much RAM is there.
>>
>>
>>> What kind of NTC?
>>>
>> Just the regular kind, silicon-based resistor.
>>
>>
>>> They're usually spec's as R = Ro*e^(beta*(1/T-1/To))
>>>
>> In industry it's usually the 2-term or the 3-term Steinhart-Hart equation.
>
> It's "usually" the equation I cited... I have several books here that
> say so ;-)
>
> And it's trivial to do in Spice.
>

Well, books are one thing but I usually must do what the manufacturer
sez :-)

--
Regards, Joerg

http://www.analogconsultants.com/

"gmail" domain blocked because of excessive spam.
Use another domain or send PM.
From: Joerg on
Jim Thompson wrote:
> On Tue, 13 Apr 2010 10:58:03 -0700, Joerg <invalid(a)invalid.invalid>
> wrote:
>
>> Hello Folks,
>>
>> Got stuck when trying to simulate an NTC. This temperature-variant
>> resistor will be the only variable input so ".STEP" and stuff do not cut
>> it because that only overlays multiple curve in an AC or DC simulation.
>> I want just one curve: Output of my circuit versus varying NTC resistor
>> value.
>>
>> Tried to make a voltage dependent resistor this way:
>>
>> http://www.electro-tech-online.com/attachments/general-electronics-chat/40714d1269571000-sine-variable-resistor-ltspice-d2.png
>>
>> It works but is incredibly slow. Any better ideas?
>
> Thompson's Fundamental Rule #1, Stay away from PhD's, use this
> instead....
>
> http://www.efunda.com/designstandards/sensors/thermistors/thermistors_theory.cfm
>

That ain't the normal thermistor curve. There are some switching types
where there's reversal but those are typically used sans controller, as
triggers, before something goes kablouie.


> Do you really have one bad enough to need the high order corrections?
>

The client asked that they'd like to see at least 12 bits so I figure
they have a reason for that.

--
Regards, Joerg

http://www.analogconsultants.com/

"gmail" domain blocked because of excessive spam.
Use another domain or send PM.
From: John Larkin on
On Tue, 13 Apr 2010 20:38:34 -0700, Joerg <invalid(a)invalid.invalid>
wrote:

>John Larkin wrote:
>> On Tue, 13 Apr 2010 17:31:20 -0700, Joerg <invalid(a)invalid.invalid>
>> wrote:
>>
>>> John Larkin wrote:
>>>> On Tue, 13 Apr 2010 23:08:23 +0200, "Helmut Sennewald"
>>>> <helmutsennewald(a)t-online.de> wrote:
>>>>
>>>>> "John Larkin" <jjlarkin(a)highNOTlandTHIStechnologyPART.com> schrieb im
>>>>> Newsbeitrag news:sfd9s511ormdiedjk9o725omcntmkttgpq(a)4ax.com...
>>>>>> On Tue, 13 Apr 2010 10:58:03 -0700, Joerg <invalid(a)invalid.invalid>
>>>>>> wrote:
>>>>>>
>>>>>>> Hello Folks,
>>>>>>>
>>>>>>> Got stuck when trying to simulate an NTC. This temperature-variant
>>>>>>> resistor will be the only variable input so ".STEP" and stuff do not cut
>>>>>>> it because that only overlays multiple curve in an AC or DC simulation.
>>>>>>> I want just one curve: Output of my circuit versus varying NTC resistor
>>>>>>> value.
>>>>>>>
>>>>>>> Tried to make a voltage dependent resistor this way:
>>>>>>>
>>>>>>> http://www.electro-tech-online.com/attachments/general-electronics-chat/40714d1269571000-sine-variable-resistor-ltspice-d2.png
>>>>>>>
>>>>>>> It works but is incredibly slow. Any better ideas?
>>>>>> Do you need a voltage to resistance converter? That's easy if you have
>>>>>> a multiplier. Interestingly, LT Spice doesn't provide a multiplier
>>>>>> component.
>>>>>>
>>>>>> John
>>>>> Hello John,
>>>>>
>>>>> LTspice has B-deviecs. They can do a lot of math.
>>>>> *
>>>>> ** power
>>>>> / divide
>>>>> sin
>>>>> tanh
>>>>> exp
>>>>>
>>>>> See the help pages for B-devices.
>>>>> The B-device is the best device to implement a NTC-resistor
>>>>> with it's exponential resistance versus temperature function.
>>>>>
>>>>> The LTspice Yahoo group provides examples.
>>>>>
>>>>> Best regards,
>>>>> Helmut
>>>>>
>>>>>
>>>>>
>>>> Sure, but a canned multiplier component would be handy, without a
>>>> bunch of typing. As would an ideal diode. At least they have ideal
>>>> opamps.
>>>>
>>> There are modulators though, regular and I/Q, under special functions.
>>
>> Yeah, I saw those. But it would be handy for the occasional user (like
>> me) to have some basic math functions all boxed up; mul, log, antilog,
>> clippers, deadband come to mind. Adds and subs are easy... just stack
>> VCVS's.
>>
>> They do have a programmable transzorb, which looks to me like a
>> programmable clipper/deadband of sorts.
>>
>> I Spice a circuit maybe once a month, if that, so it's a minor
>> nuisance to prowl through the sometimes-helpful Help to re-learn the
>> syntax for stuff like this.
>>
>
>I find myself SPICE-ing many hours a week by now. With some of the more
>unorthodox circuits there is no other way. Like PWM chips used flat-out
>as solenoid drivers and so on.

I do most ordinary control loop design pretty much by eyeball Bode
plot, math in my head. That's fine for stuff with plenty of margin.
And design is usually easier than analysis.

The picosecond stuff has exotic parasitics and, usually, no worthwhile
nonlinear device models, so that's out too.

I did do a fairly high-order loop simulation last week. It's
technically a 4-20 mA output stage but can run in constant-voltage or
constant-current mode, like a CV/CC power supply. The voltage/current
mode transitions are interesting enough to make simulation worthwhile.
I did it in LT Spice, but the loop will actually run in a 100 MHz ARM
processor with ADCs/DACs and the actual loop coded in C. Should be
interesting. There will be 13 ARMs and one FPGA on this VME board!

It is fun to Spice a circuit then implement it digitally. I've done
lots of filters that way. I haven't found any references to
implementing double-integrator (state-variable) or Sallen-Key active
filters digitally, but they work great and are easy to design (right
out of Don Lancaster's book!). One nice feature, compared to classic
Z-1 butterfly filters, is that stage gain is exactly 1. If you round
all the coefficients into right shifts, it's good to Spice it first to
see how weird it will be.

Spice can simulate thermal systems, too. There are some surprisingly
simple equivalences.

John


First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9 10 11 12
Prev: unexpected delay in a TWT
Next: memristors