Author Topic: emulate an ideal filter in LTSPICE?  (Read 5537 times)

0 Members and 1 Guest are viewing this topic.

Offline ledtesterTopic starter

  • Super Contributor
  • ***
  • Posts: 3249
  • Country: us
emulate an ideal filter in LTSPICE?
« on: February 11, 2016, 05:48:29 pm »
Hi all,

Is there an easy way to emulate an "ideal" filter in ltspice?

For example, suppose I wanted to see what my signal would look like if I connected an ideal low-pass filter with a certain cut-off frequency and a certain db rolloff per octave. I'm not interested in simulating any specific device or circuit.

Or maybe there is a way to work with the FFT?

Thanks!
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22377
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: emulate an ideal filter in LTSPICE?
« Reply #1 on: February 11, 2016, 10:34:32 pm »
You might use a Laplace block. You have to write down the transfer function, but this is easier (look up the coefficients for a stupidly high order Bessel polynomial, for instance) than solving for the RLC values.

I don't think there's anything precooked.  Not very useful.  SPICE primitives are all about general use.

If you just want to see what a signal looks like with bandlimiting, you don't need a full quantitative simulation.  Normalize the frequency to something convenient, sample it, then run it through an FT, filter that (by truncating or windowing the frequencies), then back again.  With the demise of Java, I think there will be a relative shortage of demos, but this looks fun at least:
http://madebyevan.com/dft/

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline uncle_bob

  • Supporter
  • ****
  • Posts: 2441
  • Country: us
Re: emulate an ideal filter in LTSPICE?
« Reply #2 on: February 12, 2016, 01:21:26 am »
Hi

Even with a filtering function, SPICE is not a very good signal analysis tool. There is not much of a way to put real signal samples into it. Stuff like Matlab (or it's clones) are generally used for signal processing sort of analysis. If you are a student, you can get a copy pretty cheap.

Bob
 

Offline Morgoroth

  • Regular Contributor
  • *
  • Posts: 123
  • Country: cl
Re: emulate an ideal filter in LTSPICE?
« Reply #3 on: February 12, 2016, 01:34:09 am »
SPICE is not an option for signal analysis, was never designed for that, Octave is a Matlab clone with a lot of examples and documentation.

http://www.dsprelated.com/freebooks/mdft/Matlab_Octave_Examples.html
----------------------------------------------------------
If works, doesn't means it is right.
 

Offline f5r5e5d

  • Frequent Contributor
  • **
  • Posts: 349
Re: emulate an ideal filter in LTSPICE?
« Reply #4 on: February 12, 2016, 04:05:00 am »
LTspice does have .wav import and export - the sample time is limited but to sub-nanosecond so its not just for audio, likewise resolution can be 32 bits

the Laplace behavioral functions are fine for .AC, there are issues for .Tran, the Laplace has to be inverted, discretized and there are advanced options you may have to set to get reasonable results


Computer Algebra Systems can be helpful, are different from discrete/matrix oriented SW like Matlab and free workalikes Octave, SciLab - full featured CAS can treat Symbolic equations, do transforms in the Symbolic domain
Maple, Mathematica are the big ones, the free stuff is way behind
« Last Edit: February 12, 2016, 05:26:23 am by f5r5e5d »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf