×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

LT Spice generating a repetitive signal

LT Spice generating a repetitive signal

LT Spice generating a repetitive signal

(OP)
Using LT Spice, how could I simulate a repetitive signal with 12 levels between +2V and -2V?

Intention to use it as the input for a passband filter.

Initially I tried a voltage cell with PWL output but found that it does not repeat! My fault.

Any help out there? I will appreciate that!

Agustín Tomás

RE: LT Spice generating a repetitive signal

Stick in a voltage source.
Edit it.
Fill in the table as shown in this picture.
Have a blast.

Keith Cress
Flamin Systems, Inc.- http://www.flaminsystems.com

RE: LT Spice generating a repetitive signal

(OP)
Hola Keith,

I found that even if able to repeat, PWL is not what I need.

I think is a step-like function for I want to generate a 24 steps signal following a sine-like law.

And that signal has to repeat continuously to test a filter response. See the thread about "lowpass active filter" that I started today somewhere here in this forum.

Somebody adviced to use "REPEAT" command(?) but LT Spice doesn't explain the syntax for that.

Because of my job I use to stay away from internet, sometimes for more than 24 hours. Don't worry. I will revert sooner or later.

Thanks for replying.

Agustín Tomás

RE: LT Spice generating a repetitive signal

PWL can do that if it allows you enough points.  Pairs of points at the same voltage seperated by the time you want, then another pair following very closely in time.  For example:

0 V   0.0 Sec
0 V   0.99999 Sec
1 V   1 Sec
1 V   1.99999 Sec
2 V   2 Sec
2 V   2.99999 Sec

Will approximate a waveform stepping up by one volt every second.  Unfortunately many SPICEs only allow 8 or 10 points, so you may not get 12 levels.

An uglier approach I've used for that sort of thing with no limit on the number of steps (unless there's a maximum number of circuit elements) is by putting several PULSE sources in series.

Set the voltage of each pulse to a voltage you want in the sequence.  Set the Ton and Period appropriately.  Use the minimum Trise and Tfall.  Then tinker with the Tdelay to sequence the pulses in order so they add up to the output you want.  Looks like you also have a number of pulses parameter as well, set that to some very large number if necessary.  You might need to add a small RC filter to remove spikes that might remain as the step edges transition from one to another.

RE: LT Spice generating a repetitive signal

I found this in the above LTSPICE forum, from "Rick". Apparently, pwl has a hidden file option:

A pwl (piece wise linear) file should work for this. Place a voltage or current source on the schematic. Then put the cursor over the source and the press Ctrl right click. Now in the value field enter:
pwl file=mydata.txt

mydata.txt should be a test file of the form

time1 data1
time2 data2
timen datan

This file should be in the same folder as your circuit. pwl is only briefly mentioned in the LTspice help file.  

Rick

RE: LT Spice generating a repetitive signal

Is there some reason everyone is ignoring the PULSE command?  Doesn't anyone bother reading the manual?

Quote:

Syntax: Vxxx n+ n- PULSE(V1 V2 Tdelay Trise Tfall Ton
Tperiod Ncycles )
Time-dependent pulsed voltage source

TTFN

FAQ731-376: Eng-Tips.com Forum Policies

RE: LT Spice generating a repetitive signal

(OP)

After reading the manual (yes I do/did!) found that STEP is closer to what I need. And as I said already I just need to find how to employ REPEAT to get a string of steps, repeted forever.

Agustín Tomás

RE: LT Spice generating a repetitive signal

STEP is a batch command; it basically changes some sort of DC condition for a particular run.

Since you haven't really described what you're trying to do, I can only guess.  You need sum up a bunch of different PULSES, each pulse for its particular time slot in your waveshape, allowing to you configure the voltages independently.

TTFN

FAQ731-376: Eng-Tips.com Forum Policies

RE: LT Spice generating a repetitive signal

(OP)
Problem solved using PULSE function.

Just 20 minutes calculating timing and done!

Agustín Tomás

RE: LT Spice generating a repetitive signal

Okay... Explain. Please.

I see pulse as a single voltage, not stepping, declining.

Keith Cress
Flamin Systems, Inc.- http://www.flaminsystems.com

RE: LT Spice generating a repetitive signal

I think you'd need to sum a bunch of PULSEs together, hence, 20 minutes of calculation time.

Each Pulse would cover a particular time slot in the composite signal.

TTFN

FAQ731-376: Eng-Tips.com Forum Policies

RE: LT Spice generating a repetitive signal

(OP)

If you like to see how I did it, just download the file "sine 24-steps input.asc" from here:

http://www.4shared.com/dir/3379830/4177d351/sharing.html

To be opened with LT Spice.

Please note that V1 is not PULSEd but plain DC (-1V).

Agustín Tomás

RE: LT Spice generating a repetitive signal

Very nice atferrari.
Well done.

Now I really see.
Thanks!

Keith Cress
Flamin Systems, Inc.- http://www.flaminsystems.com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources