Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > sci.electronics.design > #510554

Re: LT Spice FFT scaling

Subject Re: LT Spice FFT scaling
Newsgroups sci.electronics.design
References <vmb7kdtber3b9oebufudaatvgkqsl2siiq@4ax.com> <L7ydnVBOFJcbNNnGnZ2dnUU7-ROdnZ2d@supernews.com>
From bitrex <user@example.net>
Message-ID <vx91D.176200$VB3.39081@fx11.iad> (permalink)
Organization frugalusenet - www.frugalusenet.com
Date 2018-07-10 17:27 -0400

Show all headers | View raw


On 07/10/2018 08:41 AM, Phil Hobbs wrote:
> On 07/09/18 15:00, John Larkin wrote:
>>
>>
>> Suppose I create a current source that's a sine wave, amplitude 1,
>> frequency 1, and then run a transient response. Then plot current and
>> FFT. On a linear scale, it has some harmonics (no surprise) but the
>> amplitude of the fundamental is 690 mA.
>>
>> Why 690? Is that a bad approximation of 707?
>>
>> Update: if I set the time step to 10 us, it runs slow but the FFT
>> amplitude is 706.9 mA. So the FFT reports RMS.
> 
> LTspice, like most simulators apart from FDTD EM simulators, uses a 
> variable time step.  That means that it has to interpolate to get 
> regularly-spaced samples for the FFT.  That interpolation introduces 
> significant amounts of truncation error, which is probably what's 
> responsible for both the harmonics and the reduced fundamental.
> 
> Cheers
> 
> Phil Hobbs
> 
> 

the fact that the fundamental is 690 instead of 707 is not a "bad 
approximation" it's a perfectly valid and correct Fourier transform of 
some other sequence of samples generated through a given interpolation 
algorithm, that's not a mathematically abstract pure sine wave. SPICE 
doesn't "know" anything about sine waves or that they should be treated 
any different than any other random sequence of samples.

The implication by the OP seems to be that the FFT in LTSpice is somehow 
a wrong or "sloppy" implementation, maybe so but I don't think that 
follows from the observed symptoms at all.

Back to sci.electronics.design | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

LT Spice FFT scaling John Larkin <jjlarkin@highland_snip_technology.com> - 2018-07-09 12:00 -0700
  Re: LT Spice FFT scaling Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> - 2018-07-09 12:54 -0700
    Re: LT Spice FFT scaling John Larkin <jjlarkin@highland_snip_technology.com> - 2018-07-09 15:52 -0700
    Re: LT Spice FFT scaling Martin Brown <'''newspam'''@nezumi.demon.co.uk> - 2018-07-10 08:13 +0100
      Re: LT Spice FFT scaling Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2018-07-10 09:14 -0400
  Re: LT Spice FFT scaling boB <boB@K7IQ.com> - 2018-07-09 13:06 -0700
    Re: LT Spice FFT scaling Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> - 2018-07-09 15:14 -0700
      Re: LT Spice FFT scaling Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2018-07-10 09:24 -0400
    Re: LT Spice FFT scaling John Larkin <jjlarkin@highland_snip_technology.com> - 2018-07-09 16:03 -0700
      Re: LT Spice FFT scaling Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> - 2018-07-09 16:47 -0700
        Re: LT Spice FFT scaling John Larkin <jjlarkin@highland_snip_technology.com> - 2018-07-09 17:00 -0700
          Re: LT Spice FFT scaling Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> - 2018-07-09 19:53 -0700
            Re: LT Spice FFT scaling John Larkin <jjlarkin@highlandtechnology.com> - 2018-07-09 21:48 -0700
            Re: LT Spice FFT scaling Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2018-07-10 09:28 -0400
              Re: LT Spice FFT scaling John Larkin <jjlarkin@highland_snip_technology.com> - 2018-07-10 10:26 -0700
                Re: LT Spice FFT scaling Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2018-07-10 13:31 -0400
                Re: LT Spice FFT scaling Martin Brown <'''newspam'''@nezumi.demon.co.uk> - 2018-07-12 09:05 +0100
                Re: LT Spice FFT scaling Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2018-07-13 04:49 -0400
                Re: LT Spice FFT scaling Martin Brown <'''newspam'''@nezumi.demon.co.uk> - 2018-07-16 14:17 +0100
                Re: LT Spice FFT scaling Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2018-07-16 10:08 -0400
          Re: LT Spice FFT scaling bitrex <user@example.net> - 2018-07-09 23:09 -0400
            Re: LT Spice FFT scaling bitrex <user@example.net> - 2018-07-09 23:16 -0400
              Re: LT Spice FFT scaling John Larkin <jjlarkin@highland_snip_technology.com> - 2018-07-10 10:33 -0700
                Re: LT Spice FFT scaling bitrex <user@example.net> - 2018-07-10 17:10 -0400
                Re: LT Spice FFT scaling John Larkin <jjlarkin@highland_snip_technology.com> - 2018-07-10 14:37 -0700
                Re: LT Spice FFT scaling bitrex <user@example.net> - 2018-07-10 17:57 -0400
                Re: LT Spice FFT scaling upsidedown@downunder.com - 2018-07-11 09:19 +0300
                Re: LT Spice FFT scaling John Larkin <jjlarkin@highlandtechnology.com> - 2018-07-11 07:08 -0700
                Re: LT Spice FFT scaling makolber@yahoo.com - 2018-07-11 07:55 -0700
                Re: LT Spice FFT scaling John Larkin <jjlarkin@highlandtechnology.com> - 2018-07-11 08:32 -0700
                Re: LT Spice FFT scaling Martin Brown <'''newspam'''@nezumi.demon.co.uk> - 2018-07-12 09:18 +0100
                Re: LT Spice FFT scaling Martin Brown <'''newspam'''@nezumi.demon.co.uk> - 2018-07-12 09:14 +0100
  Re: LT Spice FFT scaling bitrex <user@example.net> - 2018-07-09 18:04 -0400
  Re: LT Spice FFT scaling Martin Brown <'''newspam'''@nezumi.demon.co.uk> - 2018-07-10 08:03 +0100
    Re: LT Spice FFT scaling bitrex <user@example.net> - 2018-07-10 17:53 -0400
      Re: LT Spice FFT scaling Martin Brown <'''newspam'''@nezumi.demon.co.uk> - 2018-07-11 09:04 +0100
  Re: LT Spice FFT scaling Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2018-07-10 08:41 -0400
    Re: LT Spice FFT scaling bitrex <user@example.net> - 2018-07-10 17:27 -0400
      Re: LT Spice FFT scaling John Larkin <jjlarkin@highland_snip_technology.com> - 2018-07-10 14:46 -0700
        Re: LT Spice FFT scaling bitrex <user@example.net> - 2018-07-10 19:37 -0400
      Re: LT Spice FFT scaling Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2018-07-11 21:17 -0400
  Re: LT Spice FFT scaling bitrex <user@example.net> - 2018-07-11 22:24 -0400
    Re: LT Spice FFT scaling Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2018-07-13 04:37 -0400
      Re: LT Spice FFT scaling Martin Brown <'''newspam'''@nezumi.demon.co.uk> - 2018-07-16 14:18 +0100

csiph-web