Restore sgn(f(x)), f(x)=abs(sinc(x)) ?

  • Thread starter Thread starter blighme
  • Start date Start date
Click For Summary
SUMMARY

The discussion centers on the challenge of restoring the oscillating sinc function after performing an Inverse Discrete Fourier Transform (IDFT) in LTspice, which does not handle complex numbers. The user, Vlad, attempts to implement a simple IDFT using real and imaginary components defined by sine and cosine functions but initially struggles with the representation of the sinc function. Ultimately, Vlad discovers that using discrete cosine and sine transforms effectively resolves the issue, allowing for the desired oscillating sinc function.

PREREQUISITES
  • Understanding of Inverse Discrete Fourier Transform (IDFT)
  • Familiarity with LTspice simulation software
  • Knowledge of sine and cosine functions in signal processing
  • Basic concepts of discrete transforms
NEXT STEPS
  • Explore the implementation of discrete cosine and sine transforms in LTspice
  • Research the mathematical properties of the sinc function in signal processing
  • Learn about complex number handling in signal simulations
  • Investigate alternative methods for restoring oscillating functions in digital signal processing
USEFUL FOR

Signal processing engineers, LTspice users, and anyone involved in digital signal transformations and simulations will benefit from this discussion.

blighme
Messages
12
Reaction score
0
Hello

I don't know if this is the right place to place this, but here it goes:

I tried an IDFT approach in LTspice, which doesn't know sqrt(-1). If z=a+i*b then, in LTspice, z=a, |z|=a, so b is lost. With this in mind, the IDFT is done with sin^2+cos^2 which gives me |sinc(x)|, but I need the sinc to be "regular" sinc, oscillating. So, the question is: is it possible through whatever trick/cheat/etc to restore or get an oscillating sinc(x) after the transform? Anything.

I am using this chain of .funcs:

real(n,t)=sin(2*pi*n*(t-M/2)/(M+1))*f(n)
imag(n,t)=cos(...)
re(t)=real(0,t)+real(1,t)+...
im(t)= ...
h(t)=hypot(re(t),im(t))/(M+1)


Anticipated thanks,
Vlad


PS: No homework,their time is long past. This is to try and implement a simple IDFT in LTspice.
 
Engineering news on Phys.org
Unfortunately, I was in a hurry to fight a headache last night, so I mixed up: real(n,t)=cos(...), imag=sin. Also, the resulting impulse response can't be a result of a simulation, for example, I can't just use u(sinc-1m) and then divide the pulses with a DFLOP -- that would require simulating to find out the coefficients, then applying them to h[n], then running the simulation again.

A small test for if(abs(x)<wc,1,0) reveals it works, but it's still |sinc| (by the way, the title is actually sgn(abs(f(x))), f(x)=sinc(x), it was a really bad headache, apparently). To actually test the coefficients, I could use sgn(sinc(wc))*result, but that would only work for rectangular spectrum or one band only.

So, there you have it, if anyone knows just a little bit, please let me know.Vlad
 
No need anymore, the discrete cosine/sine transforms do the trick.
 

Similar threads

  • · Replies 0 ·
Replies
0
Views
1K
  • · Replies 3 ·
Replies
3
Views
3K
Replies
8
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 14 ·
Replies
14
Views
2K
Replies
4
Views
2K
Replies
16
Views
2K
Replies
4
Views
2K