LT Spice Question

Suppose I have a bunch of delay lines on a schematic, and I'd like to have the impedance and delay time of each line expressed by a math equation. How would I do that? What might the expression be like for each line, and where would I plop the main controlling variables?

I assume that, for the delay line params...

Td=50n Z0=50

I could replace them with expressions that are connected to the outside world somehow.

I'm playing with approximating tapered delay lines and it would be easy if I could generalize things, rather than running sections on a calculator and typing the numbers into each line.

John

Reply to
John Larkin
Loading thread data ...

John,

You could use a simple transmission line (tline) and the .param Spice directive.

For a tline, you'd add the Spice directive somewhere on the page:

.param Td = expression .param Z0 = expression

I'm not sure what limitiations of the expression is, but simple math is certainly supported.

You can also use the directive: .stop param Td LIST 1n 2n 3n

This will step the time delay of the transmission line from 1ns to 3ns.

Bob

--
== All google group posts are automatically deleted due to spam ==
Reply to
BobW

.stop should be .step

Bob

Reply to
BobW

I don't want to step one transmission line, I want to cascade a bunch of them, 20 or so maybe, and have their impedances progress according to some formula; linear and exponential tapers are candidates.

This is an approximation to a continuously tapered line. The more lines, the better. Too much typing.

I suppose I could export the ascii file and write a PowerBasic program to edit it.

John

Reply to
John Larkin

You can use expressions just about anywhere in LTSpice by enclosing them in braces. That allows you to use .STEP PARAM to control any number of interrelated parameters.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058

email: hobbs (atsign) electrooptical (period) net
http://electrooptical.net
Reply to
Phil Hobbs

"John Larkin" schrieb im Newsbeitrag news: snipped-for-privacy@4ax.com...

Hello John,

You need the curly braces {} around the parameters on your devices.

Example: a 10ns delay line with 10 taps (1ns).

.param TTOT=10n .param TD1=TTOT/10

Instead of Td=50n Z0=50, you use

Td={TD1} Z0=50

You can use this parameter substitution with any value of R, C, L,...

Best regards, Helmut

Reply to
Helmut Sennewald

Helmut,

Thanks. I sometimes have trouble with LT Spice syntax, since I don't use it all that often, and the HELP is often obscure.

Suppose I say

.param TTOT=10n .param TD1=TTOT/10 .param TD2=TD1+2n

on a schematic, or something like that. What order are the expressions executed in? Is everything reinitialized and re-evaluated whan any sim is run?

I suppose the order will be the order as seen in the .asc file.

John

Reply to
John Larkin

The dot commands are handled by the post processor. I don't know how it does it, but the dot commands are handled in the appropriate order regardless of the order they are placed on the schematic.

John

Reply to
John KD5YI

But it can't know the appropriate order for general arithmetic expressions.

John

Reply to
John Larkin

Try it.

John

Reply to
John KD5YI

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.