Ask Your Question
0

How derive minimization frequencies formula ?

asked 2022-04-14 14:41:51 +0200

Andr gravatar image

updated 2022-04-14 14:42:28 +0200

Fourier DFT transformation of sawtooth wave (0, a, 2 a, 3a..a*(N-1).) has coefficients

$a \frac{N(N+1)}{2}, k=0$

$-a \frac{N}{1-e^{-j2\pi k/N}}$, $k\in [1,N-1]$

https://dsp.stackexchange.com/questio...

I want remove it from samples, but I must compute optimal slope a.

X means Fourier transformation of samples, S - Fourier transformation of sawtooth wave

Slope is optimal when difference (X-S) has minimum high frequencies <=>

$\sum_{frequencies} (frequency \cdot amplitude^2)$ is minimal.

Maybe better $\sum_{frequencies} (frequency^2 \cdot amplitude^2)$ is minimal.

I must equate to zero the derivative of this sum and compute slope a. How do it with SageMath?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-04-14 19:45:55 +0200

Andr gravatar image

updated 2022-04-15 05:19:58 +0200

slelievre gravatar image

Try this:

sage: derivative(abs(xn - a*N/(1 - exp(-i*2*pi*k/N)))^2, a)
8*(xn + 8*a/(e^(-1/4*I*pi*k) - 1))/(e^(1/4*I*pi*k) - 1) + 8*(8*a/(e^(1/4*I*pi*k) - 1) + conjugate(xn))/(e^(-1/4*I*pi*k) - 1)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2022-04-14 14:41:51 +0200

Seen: 88 times

Last updated: Apr 15 '22