Maker Pro
Maker Pro

LTSpice wav steps?

G

George Steber

Jan 1, 1970
0
Hi,

I have been playing around with LTSpice (latest download) and using wav
files as input and they seem to work just fine. However when I zoom in
on the wav data I cannot see the individual steps that I expect to be
there... since it's sampled data. Either the waveform viewer is not
setup right or the data is fixed up (interpolated?) between the sample
points. Anyone else seen this? Any explanations available?

George
 
M

Mike Engelhardt

Jan 1, 1970
0
George,
I have been playing around with LTSpice (latest download)
and using wav files as input and they seem to work just
fine. However when I zoom in on the wav data I cannot
see the individual steps that I expect to be there...
since it's sampled data. Either the waveform viewer is
not setup right or the data is fixed up (interpolated?)
between the sample points. Anyone else seen this? Any
explanations available?

Yes, when playing a .wav file into a simulation, it
interpolates between steps in the interest of avoiding
discontinuities and uninteresting timesteps. Yes, this
is different than what would be done in a CD player,
which would look like a clocked sample and hold. The
difference does color the higher frequency content of
the input signal. You can either (i) live with it or
(ii) use a much higher sampling rate in your .wav or
(iii) put a sample and hold after the .wav source.

--Mike
 
G

George Steber

Jan 1, 1970
0
Hi Mike,

Thanks for the explanation. I actually discovered the "feature" when I
made a switched capacitor ZOH and some delays elements to simulate a
discrete system. The waveforms didn't compare well since the input wav
didn't show the steps typical of a sampled system.... now I know why.
Thanks again.

George
 
H

Helmut Sennewald

Jan 1, 1970
0
George Steber said:
Hi Mike,

Thanks for the explanation. I actually discovered the "feature" when I
made a switched capacitor ZOH and some delays elements to simulate a
discrete system. The waveforms didn't compare well since the input wav
didn't show the steps typical of a sampled system.... now I know why.
Thanks again.

Hello George,
exactly the same has been discussed in the LTSPICE-YAHOO group
some weeks ago.
There is an example file in the tutorial section which
includes such a sampler.

The group:
http://groups.yahoo.com/group/LTspice

The directory of the files:
"Files/Tut/Sampling a WAV-file and a FFT Example"

Best Regards,
Helmut
 
G

George Steber

Jan 1, 1970
0
Hi Helmut,

Thanks for info. Maybe I'll try to enroll in Yahoo again. Didn't work for me
after about three trys... they wouldn't accept their own check number they
sent me in email. Funny thing is I'm a Yahoo enrollee now for some of their
other stuff. Maybe their computer wasn't feeling well that day <grin>.

George
 
H

Helmut Sennewald

Jan 1, 1970
0
George Steber said:
Hi Helmut,

Thanks for info. Maybe I'll try to enroll in Yahoo again. Didn't work for me
after about three trys... they wouldn't accept their own check number they
sent me in email. Funny thing is I'm a Yahoo enrollee now for some of their
other stuff. Maybe their computer wasn't feeling well that day <grin>.

Hello George,
I have sent you these(my) files directly.
The LTSPICE YAHOO group is a great resource especially for LTSPICE users.
Don't give up to become a member.

Best Regards,
Helmut
 
G

George Steber

Jan 1, 1970
0
Hi Helmut,

I enrolled in Yahoo today and it finally worked. I read some of the posts there
today. I'm not a big spice user, only for a few academic type problems. We use
Pspice mainly here because of free student copies. I wanted to try the wave file
input of LTspice and it is nice... tried an adaptive filter and it worked
exactly as theory predicted. It's competitive with Simulink <grin>...

Regards,

George
 
Top