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

  • Thread starter Thread starter blighme
  • Start date Start date
AI Thread 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 well. The user, Vlad, explains that while he can obtain the absolute value of sinc, he needs the regular oscillating form. He shares his approach using a series of functions to compute the real and imaginary parts but notes a mistake in his initial setup. Ultimately, he concludes that using discrete cosine and sine transforms successfully resolves his issue. The thread highlights the complexities of signal processing in LTspice and the importance of correct function implementation.
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.
 
Hi all, I have a question. So from the derivation of the Isentropic process relationship PV^gamma = constant, there is a step dW = PdV, which can only be said for quasi-equilibrium (or reversible) processes. As such I believe PV^gamma = constant (and the family of equations) should not be applicable to just adiabatic processes? Ie, it should be applicable only for adiabatic + reversible = isentropic processes? However, I've seen couple of online notes/books, and...
Thread 'How can I find the cleanout for my building drain?'
I am a long distance truck driver, but I recently completed a plumbing program with Stratford Career Institute. In the chapter of my textbook Repairing DWV Systems, the author says that if there is a clog in the building drain, one can clear out the clog by using a snake augur or maybe some other type of tool into the cleanout for the building drain. The author said that the cleanout for the building drain is usually near the stack. I live in a duplex townhouse. Just out of curiosity, I...
I have an engine that uses a dry sump oiling system. The oil collection pan has three AN fittings to use for scavenging. Two of the fittings are approximately on the same level, the third is about 1/2 to 3/4 inch higher than the other two. The system ran for years with no problem using a three stage pump (one pressure and two scavenge stages). The two scavenge stages were connected at times to any two of the three AN fittings on the tank. Recently I tried an upgrade to a four stage pump...
Back
Top