# Resolução da DFT e adição de zeros

Neste notebook avaliaremos aspectos de resolução da DFT e da adição de zeros (zero padding).

Notamos que um sinal com $N$ amostras, amostrado a uma taxa $F_s$ {Hz] possuirá um vetor de frequências

\begin{equation}
f_{Hz}^{(k)} = \left\{\frac{0F_{s}}{N}, \ \frac{1F_{s}}{N}, \  \frac{2F_{s}}{N}, \ ... \ \frac{(N-1)F_{s}}{N}\right\}
\end{equation}


```python
# importar as bibliotecas necessárias
import numpy as np # arrays
import matplotlib.pyplot as plt # plots
plt.rcParams.update({'font.size': 14})
import IPython.display as ipd # to play signals
import sounddevice as sd
import soundfile as sf
```

## Vamos criar uma resposta ao impulso ideal

Esta é a resposta ao impulso de um sistema massa-mola (1DOF)

\begin{equation}
h(t) = \frac{A}{\omega_d} \mathrm{e}^{-\zeta \omega_n t} \mathrm{sin}(\omega_d t)
\end{equation}
com $\zeta$ sendo o amortecimento, $\omega_n = 2 \pi f_1$ e $\omega_d = \omega_n\sqrt{1-\zeta^2}$, que possui TF, dada por

\begin{equation}
H(\mathrm{j}\omega) = \frac{A}{\omega_n^2 - \omega^2+ \mathrm{j}2\zeta\omega_n\omega} 
\end{equation}


```python
# Define the sampling rate fs = 100 Hz and total record time T = 5 seconds
Fs=100
T=5 
# time vector
time = np.arange(0, T, 1/Fs) # Ts = 0.01 [s]

# Sinal puro (Fenômeno) - original - h(t) de um S1GL (massa-mola)
A=200
zeta=0.3
wn=2*np.pi*10
wd=np.sqrt(1-zeta**2)*wn
# Impulse response
ht=(A/wd)*np.exp(-zeta*wn*time)*np.sin(wd*time)
# FRF teorica
freq = np.arange(0, Fs, 0.1)

Hw=A/(wn**2 - (2*np.pi*freq)**2+ 1j*2*zeta*wn*(2*np.pi*freq));


plt.figure(figsize=(12,4))
plt.subplot(1,2,1)
plt.title(r'$h(t)$ - (fenômeno original)')
plt.plot(time, ht, '-b', linewidth = 2)
plt.grid(linestyle = '--', which='both')
plt.xlabel('Tempo [s]')
plt.ylabel('Amplitude [-]')
plt.xlim((0, time[-1]))

plt.subplot(1,2,2)
plt.title(r'$|H(j\omega)|$ - (fenômeno original)')
plt.plot(freq, 20*np.log10(np.abs(Hw)), '-b', linewidth = 2)
plt.grid(linestyle = '--', which='both')
plt.xlabel('Frequência [Hz]')
plt.ylabel('Magnitude [dB]')
plt.xlim((0, Fs))
plt.ylim((-80, -20))
plt.tight_layout()
plt.show()
```

## Adicionamos ruído a resposta ao impulso (fenômeno ideal)

Tipicamente, é isso que acontece em uma medição. Ela sempre estará contaminada por ruído em algum grau. O ruído vai ter característica de ruído branco (distribuição normal com média zero e uma variância).


```python
noise = np.random.normal(loc = 0, scale = 0.01, size = len(time))
ht_med = ht+noise
```


```python
plt.figure()
plt.title(r'$h(t)$ - (fenômeno original vs. medido)')
plt.plot(time, ht, '-b', linewidth = 2, label = 'Fenômeno original')
plt.plot(time, ht_med, '-r', linewidth = 1, label = 'Fenômeno medido')
plt.legend(loc = 'upper right')
plt.grid(linestyle = '--', which='both')
plt.xlabel('Tempo [s]')
plt.ylabel('Amplitude [-]')
plt.xlim((0, time[-1]));
```

## Agora podemos investigar a FFT e sua resolução para alguns casos

### 1. Resolução original

"If n is not given, the length of the input along the axis specified by axis is used."

Se n não for dado, to comprimento da entrada (ao longo do eixo especificado) é usado - Em outras palavras, o espectro tem o mesmo número de pontos que o sinal no domínio do tempo.


```python
N = len(ht) # Número de pontos da FFT
Hw_med = np.fft.fft(ht_med)
freq_vec = np.linspace(0, (N-1)*Fs/N, N)
print("Vetor de frequência: {:.2f}, {:.2f}, {:.2f}, ... {:.2f}".format(freq_vec[0], freq_vec[1], freq_vec[2], freq_vec[-1]))
print("Resolução do espectro: {:.2f} [Hz]".format(freq_vec[1]-freq_vec[0]))


plt.figure(figsize=(10,6))
plt.title(r'$|H(j\omega)|$')
plt.plot(freq, 20*np.log10(np.abs(Hw)), '-b', linewidth = 2, label = 'Fenômeno original')
plt.plot(freq_vec, 20*np.log10(np.abs(Hw_med)/Fs), '-r', linewidth = 1, label = 'Fenômeno medido')
plt.legend(loc = 'lower left')
plt.axvline(Fs/2, color='grey',linestyle = '--', linewidth = 4, alpha = 0.4)
plt.grid(linestyle = '--', which='both')
plt.xlabel('Frequência [Hz]')
plt.ylabel('Magnitude [dB]')
plt.xlim((0, Fs))
plt.ylim((-80, -20))
plt.tight_layout()
#plt.savefig('dft_mag_par.pdf')
plt.show()
```

## Cheque o teorema de Parseval

\begin{equation}
\sum\limits_{n=-\infty}^{\infty}|x[n]|^{2} = \frac{1}{N} \sum\limits_{k=-\infty}^{\infty}|X(k)|^{2}
\end{equation}


```python
# Domínio do tempo
Et = np.sum(ht_med**2)
# Domínio da frequência
Ef = np.sum(np.abs(Hw_med)**2)

print("A energia no domínio do tempo é {:.2f}".format(Et))
print("A energia no domínio da frequência é {:.2f}".format(Ef/N))
```

    A energia no domínio do tempo é 13.45
    A energia no domínio da frequência é 13.45


### 2. Sinal truncado

Agora vamos truncar $h(t)$. Note que o ruído tende a dominar a resposta ao impulso a partir de $0.4$ [s]

"If n is smaller than the length of the input, the input is cropped."

Se n for menor que que o comprimento do sinal, o sinal será truncado. É indiferente fazer:

a. Truncar o sinal no tempo:
- ht_med_trunc = ht_med[time<=0.4]
- Hw_med_trunc = np.fft.fft(ht_med_trunc)

b. Passar Nt como o segundo argumento da FFT
- Hw_med_trunc = np.fft.fft(ht_med, Nt)


```python
ht_med_trunc = ht_med[time<=0.4]

Nt = len(time[time<=0.4]) # Número de pontos da FFT
# Hw_med_trunc = np.fft.fft(ht_med_trunc) # Tente esta linha depois
Hw_med_trunc = np.fft.fft(ht_med, Nt)
freq_vec_t = np.linspace(0, (Nt-1)*Fs/Nt, Nt)
print("O número de pontos na DFT é {}".format(Nt))
print("Vetor de frequência: {:.2f}, {:.2f}, {:.2f}, ... {:.2f}".format(freq_vec_t[0], freq_vec_t[1],
    freq_vec_t[2], freq_vec_t[-1]))
print("Resolução do espectro: {:.2f} [Hz]".format(freq_vec_t[1]-freq_vec_t[0]))


plt.figure(figsize=(10,6))
plt.title(r'$|H(j\omega)|$ - (fenômeno original)')
plt.plot(freq, 20*np.log10(np.abs(Hw)), '-b', linewidth = 2, label = 'Fenômeno original')
plt.plot(freq_vec_t, 20*np.log10(np.abs(Hw_med_trunc)/Fs), '-r', linewidth = 1, label = 'Fenômeno medido truncado')
plt.legend(loc = 'lower left')
plt.axvline(Fs/2, color='grey',linestyle = '--', linewidth = 4, alpha = 0.4)
plt.grid(linestyle = '--', which='both')
plt.xlabel('Frequência [Hz]')
plt.ylabel('Magnitude [dB]')
plt.xlim((0, Fs/2)) # Extenda até Fs se desejar
plt.ylim((-60, -20))
plt.tight_layout()
plt.show()
```

### 3. Sinal truncado e com zeros no final.

Agora vamos truncar $h(t)$ e adicionar zeros no final. Note que a resolução do espectro no caso anterior diminuiu (maior $\Delta f$).

"If n is larger, the input is padded with zeros."

Se n for maior que que o comprimento do sinal, o sinal será completado com zeros. É indiferente fazer:

a. Truncar o sinal no tempo:
- ht_med_trunc = ht_med[time<=0.4]
- Nt = len(time[time<=0.4]) 
- ht_med_zp = np.concatenate((ht_med_trunc, np.zeros(N-Nt)))
- Hw_med_zp = np.fft.fft(ht_med_zp) # Tente esta linha depois

b. Passar Nt como o segundo argumento da FFT
- Hw_med_zp = np.fft.fft(ht_med_trunc, N)


```python
ht_med_trunc = ht_med[time<=0.4]
Nt = len(time[time<=0.4]) 

ht_med_zp = np.concatenate((ht_med_trunc, np.zeros(N-Nt)))

#Hw_med_zp = np.fft.fft(ht_med_zp) # Tente esta linha depois
Hw_med_zp = np.fft.fft(ht_med_trunc, N)

freq_vec_zp = np.linspace(0, (N-1)*Fs/N, N)
print("O número de pontos na DFT é {}".format(len(ht_med_zp)))
print("Vetor de frequência: {:.2f}, {:.2f}, {:.2f}, ... {:.2f}".format(freq_vec_zp[0], freq_vec_zp[1],
    freq_vec_zp[2], freq_vec_zp[-1]))
print("Resolução do espectro: {:.2f} [Hz]".format(freq_vec_zp[1]-freq_vec_zp[0]))


plt.figure(figsize=(10,6))
plt.title(r'$|H(j\omega)|$ - (fenômeno original)')
plt.plot(freq, 20*np.log10(np.abs(Hw)), '-b', linewidth = 2, label = 'Fenômeno original')
plt.plot(freq_vec_zp, 20*np.log10(np.abs(Hw_med_zp)/Fs), '-r', linewidth = 1, label = 'Fenômeno med. trunc. comp. zeros')
plt.legend(loc = 'lower left')
plt.axvline(Fs/2, color='grey',linestyle = '--', linewidth = 4, alpha = 0.4)
plt.grid(linestyle = '--', which='both')
plt.xlabel('Frequência [Hz]')
plt.ylabel('Magnitude [dB]')
plt.xlim((0, Fs/2)) # Extenda até Fs se desejar
plt.ylim((-60, -20))
plt.tight_layout()
plt.show()
```

## Trabalhando na IFFT

Vamos tratar rapidamente da transformada inversa e recuperar $h(t)$, a partir do espectro do sinal truncado e completado com zeros.


```python
ht_rec = np.fft.ifft(Hw_med_zp) # ifft
N_rec = len(ht_rec) # Número de amostras
t_mrec = (N_rec-1)/Fs # tempo máximo da ifft
time_rec = np.linspace(0, t_mrec, N_rec) # vetor temporal recuperado da ifft

plt.figure()
plt.title(r'$h(t)$ - (fenômeno original vs. IFFT do medido)')
plt.plot(time, ht, '-b', linewidth = 2, label = 'Fenômeno original')
plt.plot(time_rec, ht_rec, '-r', linewidth = 1, label = 'Fenômeno med. trunc. comp. zeros')
plt.legend(loc = 'upper right')
plt.grid(linestyle = '--', which='both')
plt.xlabel('Tempo [s]')
plt.ylabel('Amplitude [-]')
plt.xlim((0, time[-1]));
```

### Inspecione ht_rec

Você vai notar que:

1. O sinal recuperado da IFFT tem uma pequena parte imaginária
2. Você precisa do espectro de $0$ a $F_s$ pra operar a IFFT corretamente.


```python
ht_rec
```




    array([ 3.03473634e-03-4.44089210e-19j,  1.57135236e+00+2.19269047e-17j,
            2.12465154e+00-6.51700915e-17j,  1.83876444e+00+3.07531778e-17j,
            1.07222624e+00-4.10326538e-17j,  1.93397750e-01-3.45487781e-17j,
           -4.74665289e-01+5.11553631e-18j, -7.83418685e-01+3.51304474e-17j,
           -7.33526554e-01+2.19443448e-17j, -4.70259620e-01-6.02252471e-18j,
           -1.43474479e-01-3.69773687e-17j,  1.15733472e-01+1.94508565e-17j,
            2.53649923e-01+1.38079301e-17j,  2.78635127e-01+1.86513978e-17j,
            1.85013369e-01-2.58488803e-17j,  7.18095183e-02+2.81220863e-18j,
           -1.48454576e-02-6.84186881e-18j, -9.47827683e-02-1.77983237e-17j,
           -9.96100019e-02-2.62776591e-17j, -9.44913691e-02+6.44431131e-18j,
           -3.01236414e-02+1.81815443e-17j,  1.41454977e-02-6.77124340e-18j,
            3.52049718e-02+2.22568781e-17j,  3.74063838e-02+1.41984806e-17j,
            2.27410337e-02-4.47826638e-17j,  2.45316427e-02+2.31801495e-18j,
            6.14179695e-03-3.64602687e-17j,  6.09361575e-03+9.55502480e-18j,
           -1.46307978e-02+2.10068252e-17j, -7.76829581e-03-1.72079678e-17j,
            2.92373209e-03+1.33171131e-17j, -3.84174250e-03-2.07897556e-17j,
           -3.75142945e-03-2.47233292e-17j,  6.07448275e-03-3.02423424e-17j,
            1.58512460e-02-6.42362947e-18j,  2.12363096e-02-6.47906880e-18j,
            2.36137125e-03+5.49647394e-18j, -4.99812340e-03+8.92287868e-18j,
           -1.41746782e-04+1.97094542e-17j,  4.34323607e-03+2.56991411e-17j,
            4.68851936e-03+1.33268321e-17j,  1.93949391e-17+1.35941541e-17j,
            1.44110928e-17-2.41953402e-17j, -2.16895365e-17-2.11359456e-17j,
            3.23660073e-17+7.26372982e-18j, -7.14582697e-18+3.74789039e-18j,
           -1.61356509e-17+4.90110362e-18j,  1.26553712e-17-3.67115732e-18j,
           -5.68369543e-19-6.46577611e-18j, -1.61814385e-17-1.95162973e-17j,
            2.40867200e-17+6.93345143e-18j, -3.93618182e-17-3.03449884e-18j,
            1.79660887e-17-9.23198636e-18j,  5.39504176e-18-1.80402300e-17j,
            4.40324057e-17-5.05823316e-18j,  2.53458298e-17-8.75945661e-18j,
           -7.88724984e-18+7.31161266e-18j, -2.99023373e-17-1.85176889e-17j,
           -3.89350084e-17-2.81215739e-17j, -3.55305865e-17-3.20192125e-17j,
           -1.08563958e-17+2.18044771e-19j, -1.32324453e-17+3.20621735e-17j,
            1.76236574e-17+3.79333123e-17j, -4.60752290e-17-3.07638100e-17j,
            5.53162842e-17+2.10895179e-17j,  3.94136988e-17-2.06016506e-17j,
            2.96593123e-17-6.27856759e-17j,  2.47728089e-17+3.20291929e-17j,
            1.89060109e-17+2.08007475e-17j, -2.51487625e-17-1.47162809e-17j,
           -1.00224844e-17+1.31565096e-17j, -2.07513184e-17-2.10825447e-17j,
            2.07335966e-17-6.31795905e-17j,  1.39443699e-18-2.44673938e-17j,
           -2.09374895e-17+1.93964997e-17j, -1.78210232e-17-2.25708577e-17j,
            3.08099087e-17+4.76010326e-17j, -1.42259548e-17-1.84998472e-17j,
           -2.03893537e-18+5.80106862e-17j,  3.91697248e-17+1.49731376e-17j,
           -1.20913641e-17-3.80086239e-18j, -2.96196372e-17+2.11152629e-17j,
           -3.15080291e-17-9.54348889e-17j, -2.73025787e-17+5.58313090e-17j,
            1.79580762e-17+2.89424083e-18j,  6.29795065e-19-1.42136132e-17j,
            1.49716614e-17-2.72970632e-18j,  3.92732353e-17+7.42739006e-18j,
            4.33436509e-17-7.54679250e-18j, -3.80140979e-17-1.17962472e-17j,
           -3.33046196e-17+1.59618139e-17j, -7.22579868e-18-1.61713662e-17j,
            1.61768056e-17-3.33774780e-17j,  1.13875477e-17+1.66321843e-17j,
            3.00673592e-17-4.02597917e-17j, -4.32070998e-18-8.72287755e-18j,
            5.97164713e-18-2.26354739e-18j,  1.98437645e-17+2.02425262e-17j,
            1.55063745e-17-1.99665739e-18j,  2.52020735e-17+4.03680170e-17j,
           -9.47302283e-19-3.29295747e-18j,  1.83436696e-17-5.43149608e-17j,
           -1.37605572e-16+9.00947044e-17j, -2.58814299e-18-3.14710085e-18j,
            7.20190673e-17-2.47922771e-17j, -2.91545180e-18+5.82078739e-18j,
            6.46101995e-17-5.31639151e-18j, -9.31532359e-18+4.61166827e-17j,
           -2.14607774e-17-1.76840775e-17j, -5.28634198e-17+1.39818742e-17j,
           -2.43644854e-17-7.21459470e-18j,  1.86452185e-17-1.93462963e-17j,
            4.79308169e-17-3.15106123e-17j,  2.90419188e-17-6.00480838e-19j,
           -5.88960675e-18+2.51738341e-17j,  1.66061434e-17-2.88888539e-18j,
            1.74096520e-17-1.58984085e-17j, -9.30716218e-18+4.58798806e-17j,
           -4.18635837e-17-2.05645626e-18j, -1.05396320e-17-1.55339882e-17j,
           -1.50824952e-17+2.08284482e-17j, -1.09982377e-17+2.97485005e-18j,
            4.56081460e-17-8.82012200e-17j,  2.10783399e-17+1.19253188e-17j,
           -1.03736415e-17-8.66146288e-18j, -3.18800172e-18+7.02599744e-18j,
            6.87860077e-17-7.89165097e-18j, -8.87762988e-17-1.01708767e-16j,
            5.96827069e-17-7.98954685e-17j, -2.14788472e-17+1.07201292e-17j,
           -2.20258062e-17-1.61257194e-17j,  1.93020569e-17+8.34111758e-18j,
            2.29922116e-17+4.48062895e-17j, -1.38814270e-17+1.68253786e-17j,
           -2.75595431e-18+2.16453811e-17j, -5.70997963e-18+3.47193272e-18j,
           -1.60374492e-18+2.58587155e-17j,  6.48340088e-18-4.35431300e-17j,
            3.90155760e-17+3.76315079e-19j,  1.24035804e-18+1.02316125e-17j,
           -1.05101155e-17-1.58916984e-17j,  3.02923963e-17-3.68641160e-17j,
            4.32273194e-17+6.33886994e-17j, -5.12971379e-17-3.54331897e-18j,
            6.08765062e-17+1.96153002e-17j, -1.15197228e-17-5.61823420e-18j,
           -1.09722281e-17+5.29353961e-17j, -5.62849246e-18-3.00268992e-17j,
            7.22272414e-18+1.95492052e-17j, -2.46026853e-17+4.64760734e-18j,
            3.78354987e-17-8.70330791e-18j, -1.31698721e-18-2.91415106e-17j,
            2.71009997e-17-2.30431872e-18j, -3.90242141e-17-5.31996557e-17j,
            3.30036355e-17+4.00646773e-17j, -4.48600240e-17-3.28542889e-18j,
            4.95022180e-18-3.02436429e-18j, -1.28402142e-17+4.13088538e-18j,
           -1.10239823e-17+1.53219852e-17j,  6.97197088e-17+2.79079771e-17j,
            2.73072646e-18+2.27022083e-17j,  5.28406143e-17-1.57695140e-17j,
           -5.32322367e-18-1.45450694e-17j, -1.02409197e-17+1.05033035e-17j,
            9.48317210e-18+1.04410957e-17j, -1.18364000e-17+2.03419417e-17j,
           -3.83412942e-17+3.11215589e-18j,  2.32550170e-18+1.99259417e-17j,
            1.22913507e-17-5.57794309e-17j,  2.55950182e-17+3.78743521e-17j,
            2.88885492e-18-2.25457235e-17j,  1.61504539e-17+1.05429727e-17j,
           -4.10792645e-17-2.30701721e-17j, -2.91978965e-17-1.35669838e-17j,
            1.86810597e-17+9.03753454e-18j, -1.88022339e-17-1.86941382e-17j,
            4.42513924e-18+1.88734787e-17j, -3.08822933e-17+2.17835379e-17j,
           -4.13020070e-17-1.09838321e-17j,  1.75308646e-17-2.18338128e-17j,
           -3.37106915e-19-3.53156920e-18j, -2.05409562e-17+5.36783814e-17j,
            2.86393893e-17-1.23650824e-17j,  3.98532764e-17-4.25144873e-18j,
           -4.77942829e-17-2.99079535e-17j, -3.06541729e-18+1.37260277e-17j,
            3.79094770e-17-3.78221738e-17j,  3.11386766e-17-1.42205689e-17j,
            1.56994699e-18+8.99832038e-18j,  1.01438728e-17-1.15288812e-17j,
           -2.24919325e-17-2.08719426e-18j, -1.01941316e-17+1.61148098e-17j,
            4.47805625e-18+4.69405142e-17j, -1.21649453e-17-2.18414123e-17j,
            3.07409937e-17+1.35381047e-17j, -2.75279006e-17+6.42714422e-18j,
           -5.73387068e-18+1.38247121e-17j,  8.06164023e-18+1.64437826e-17j,
            1.26570754e-17+1.68198606e-18j, -2.01010488e-17-2.75381873e-18j,
            1.06344439e-17-1.02266124e-17j,  3.01958858e-18-5.38359702e-17j,
           -7.22096881e-17-2.51031258e-17j, -1.45537819e-17-3.55441716e-17j,
            2.45547149e-17-5.53036388e-18j, -3.61109866e-17+1.53674071e-17j,
           -4.49719138e-17+2.72048059e-17j,  3.78423784e-18-4.28019525e-17j,
           -8.01038081e-18+3.38724187e-17j,  3.15664448e-17+2.05714092e-17j,
            1.30735883e-17-9.02167454e-18j, -6.05143050e-18-1.78587419e-18j,
            2.99607764e-17-1.46081223e-18j, -1.46017805e-17+1.21033455e-18j,
            2.74365324e-18+1.42761471e-17j, -4.29797558e-18+5.41117176e-18j,
           -3.38948618e-17-6.20777399e-18j,  4.79487645e-17+1.40812492e-17j,
            5.34821454e-17+1.19389094e-17j,  2.43741981e-17+1.57259679e-17j,
           -3.41519813e-18+1.76211629e-17j, -4.28039163e-17-1.74261714e-17j,
           -3.40259464e-17-1.11512809e-17j, -2.53271677e-17-2.13101551e-17j,
            2.69428856e-17-2.79778634e-18j, -2.57974711e-17+1.48179242e-18j,
            2.49024823e-17-1.23243633e-17j,  2.17584724e-17+7.17872890e-17j,
           -1.79985740e-17+2.06417929e-17j,  1.51112754e-17+1.44066878e-17j,
            3.09663475e-17-2.34610280e-17j, -8.57862893e-19+3.74664003e-17j,
           -1.34473790e-18+9.15678956e-18j, -1.77851220e-17+2.87381904e-17j,
           -7.10250394e-18+6.01273485e-18j,  1.90677212e-17+1.61035343e-17j,
            1.29964184e-17-2.19880083e-17j,  7.67066825e-18+3.06463447e-17j,
            1.59651618e-17+1.56092437e-17j,  3.53957086e-17-1.74933127e-17j,
           -1.00704895e-17+6.28771158e-18j,  1.40758623e-17+1.74708533e-17j,
           -4.73488575e-17-1.56307670e-17j, -3.05003593e-17+2.78463970e-19j,
           -1.91359717e-17-1.71325130e-17j,  1.19265623e-17+3.28157874e-17j,
            1.50544954e-18-2.56558614e-17j,  3.29152165e-17-1.06991826e-17j,
            7.12714591e-18+4.12440464e-18j, -2.53071294e-17+3.97262804e-18j,
            2.01791681e-17+1.97523219e-17j, -1.17660075e-16-2.30011308e-17j,
            2.96133231e-17-7.25200938e-18j, -5.97178779e-17-3.91179202e-18j,
            3.23125496e-17-1.31265136e-17j,  1.95720776e-17+3.26451454e-17j,
           -6.10072198e-19+2.59526735e-17j,  2.99711172e-18-4.18495964e-17j,
            5.82545509e-17-2.90873474e-17j,  3.13190425e-17-8.28616375e-18j,
           -3.30824138e-18-1.44382986e-17j,  3.72066085e-17-5.51905618e-17j,
           -4.33224363e-17-6.74944851e-18j, -5.46727069e-17+6.99444724e-18j,
           -3.39704330e-17-2.59905867e-17j,  2.06409908e-17-2.73452339e-20j,
            3.12596418e-17+2.38171388e-17j,  1.89849283e-17+9.67497674e-18j,
            9.54632689e-18-1.72545500e-18j,  2.85881996e-17-1.74323253e-17j,
           -1.43974585e-17+1.77495555e-18j,  2.14826820e-17-2.13252851e-17j,
           -9.00229369e-18-1.23531890e-17j, -7.64158956e-17-1.47102303e-17j,
           -7.02189115e-18+3.04783775e-17j, -1.67332185e-18+1.61137300e-17j,
           -1.46600973e-17-1.04742052e-17j,  1.50591054e-18-4.29551383e-17j,
            4.90072924e-17-1.03660403e-18j,  1.29644417e-17-2.18834329e-17j,
           -5.33491284e-18-2.07655437e-17j,  1.60567727e-18-5.15217509e-18j,
           -4.18296697e-18-2.47517172e-17j, -2.17635488e-17-3.61813894e-17j,
           -1.98799420e-18-2.67408213e-17j,  1.55063043e-17+2.41083210e-17j,
           -2.95673643e-17+4.94079875e-18j,  3.53772431e-17-1.61895889e-17j,
           -1.33154640e-17-1.30018039e-17j, -3.44220633e-17-2.07488660e-18j,
           -5.60178757e-18-1.17931313e-17j, -1.06349694e-17+2.66840978e-17j,
           -1.84598494e-17+2.05378711e-17j, -8.64860846e-18+3.49301125e-17j,
            1.73908548e-17-1.06724624e-17j,  9.61107701e-19-9.44777396e-18j,
           -4.70986463e-18+7.36647324e-18j, -6.63612530e-18+8.20172947e-19j,
           -1.86886002e-17-7.40541886e-18j, -1.42644405e-18+1.54819624e-17j,
            4.79765609e-18-2.69684353e-17j, -3.01958858e-18+1.29874764e-17j,
           -4.14771496e-17+1.61960355e-17j, -4.22896369e-17-3.55441716e-17j,
           -2.45547149e-17+2.78813594e-17j, -2.78378597e-17-1.33845456e-18j,
           -2.60823598e-17+2.72048059e-17j,  2.46374716e-17+1.12593515e-17j,
            8.01038081e-18-2.01888852e-17j,  3.94878287e-17-2.31651044e-17j,
            1.13726646e-18-1.16028721e-17j, -1.05399686e-18-2.04635953e-17j,
           -1.57499217e-17+1.52450494e-17j,  3.90925772e-19-1.23049914e-17j,
           -9.84908060e-18+5.92321630e-18j, -9.91287914e-18-6.81355543e-18j,
           -2.52045338e-18+1.10104048e-18j, -8.86891399e-18-4.21988031e-18j,
            6.91398717e-18+2.70495032e-17j, -6.61062968e-18+1.73212357e-17j,
            3.41519813e-18-1.64718211e-17j, -3.84644091e-17-2.31397180e-17j,
            4.82368011e-17+1.22043598e-17j,  4.30907361e-17+3.37952652e-17j,
           -2.87192425e-17+3.02510813e-17j, -3.51241672e-18+1.05741706e-17j,
           -6.47278008e-18-2.66955098e-17j,  3.24204112e-17+1.44579705e-17j,
            4.55321050e-17+2.22166686e-18j, -1.64435430e-17-2.60998948e-17j,
           -1.06492661e-17-1.28685911e-17j, -4.11085674e-17+1.31249846e-17j,
           -1.73070089e-17+3.31693433e-17j, -3.32851371e-17-3.25343461e-17j,
           -1.28815105e-17+3.14951929e-17j,  6.08683366e-17-2.21659151e-17j,
            1.14284882e-17-5.29068377e-18j,  3.69602973e-17+4.49099427e-19j,
           -1.94137921e-17+2.25045343e-17j,  7.97562000e-19-1.16918303e-17j,
           -8.35921275e-18-2.54930331e-17j,  2.07218318e-17+1.74306974e-17j,
           -2.53016197e-17-9.90729804e-18j, -2.09044217e-17-2.19998747e-17j,
           -7.84456255e-18+1.41605619e-17j, -5.27686196e-18+1.53138484e-17j,
           -3.52414823e-17-5.59857718e-18j,  6.42819498e-17-3.14822871e-17j,
            4.18342171e-18+2.52491442e-17j,  3.08314636e-17-3.97733824e-17j,
            4.42780287e-17-9.84448043e-18j, -4.21900753e-17+3.48314409e-17j,
            4.53187184e-17-5.55046002e-17j, -8.46634367e-17+2.13425863e-17j,
            2.04170299e-17-5.89820435e-18j,  3.10570235e-17-1.53498121e-17j,
            9.35507327e-18-5.69074181e-17j, -7.38526989e-17+1.69437679e-17j,
           -5.40413975e-18-2.42040982e-17j,  2.62230059e-18-5.99303539e-18j,
            9.60405712e-18+1.59846494e-18j,  6.74479164e-18+2.83460014e-17j,
            9.09327345e-17-3.11147341e-17j, -2.21401718e-17+1.74925203e-17j,
            5.28486532e-17-1.56006130e-17j, -1.69802384e-17+2.88744996e-17j,
            7.63221487e-18-1.05691506e-17j,  2.43172908e-17+1.36655409e-17j,
            6.34144224e-18-2.38066773e-17j,  1.92534254e-17-4.39196823e-17j,
           -3.21137466e-18-1.71275415e-17j,  1.88441503e-17-2.81613637e-17j,
           -4.58454378e-19-1.39732053e-17j,  5.82576503e-19+3.37156121e-17j,
            1.05575206e-17-1.24947730e-17j,  9.69947404e-18+1.22164185e-18j,
            6.24043580e-17+2.22974716e-17j, -1.65160021e-16+7.38702376e-17j,
            2.79991923e-17+1.03009040e-16j,  8.05493406e-18-8.65452784e-18j,
            7.96410951e-18+1.14257329e-18j, -1.69246991e-17-1.51291452e-17j,
            2.36619181e-17+1.06512421e-16j, -2.48285584e-17-6.37725188e-18j,
           -4.29626433e-17-4.62725739e-18j, -8.88762584e-18-2.73421601e-17j,
           -3.74950703e-18-1.01952765e-17j,  5.14113147e-17-6.80184687e-18j,
           -1.63255857e-17+2.61573497e-17j, -2.00499274e-17+1.15230027e-17j,
            3.91680994e-17-1.09133279e-17j, -5.24534152e-18+3.51071159e-17j,
            2.31042768e-17+1.98350899e-17j,  2.95714488e-18-3.44952852e-19j,
           -2.30882155e-17+4.05826504e-18j, -2.14858103e-18-3.14378391e-17j,
            3.80591359e-17+5.48524362e-18j, -1.71047146e-17+2.14588847e-18j,
           -2.97952813e-17-1.20925029e-17j,  1.10925747e-17+1.43521760e-17j,
            8.49681885e-18+1.87276339e-17j, -1.83436696e-17+5.38076470e-17j,
           -8.97681039e-17-8.48513500e-17j,  2.58814299e-18-3.14710085e-18j,
            4.16677704e-17+2.92690268e-17j,  2.91545180e-18-2.12098646e-17j,
           -7.76678060e-18-5.31639151e-18j,  9.31532359e-18+1.27049594e-17j,
            2.14607774e-17+1.57276458e-17j, -6.08234179e-17+3.65708388e-18j,
            1.01536307e-17+3.71953370e-18j, -4.43436377e-18+1.08748913e-17j,
            8.91260195e-18-4.47996031e-18j,  2.78015001e-17+7.75244999e-18j,
           -8.32124797e-18+1.16585081e-17j, -2.39528864e-18-3.01876478e-21j,
            3.53916371e-19-4.07249826e-18j,  3.06234442e-17+1.15743723e-18j,
           -1.49798352e-17+7.28240431e-18j,  3.89613415e-17+2.15780318e-18j,
            1.86352088e-17+1.85519196e-17j, -2.09761855e-17+8.84073120e-18j,
           -3.85027187e-17+8.18066964e-17j,  1.08960832e-17-1.97969887e-17j,
           -1.44953543e-17-8.07435009e-18j, -1.81282804e-17-9.28116428e-19j,
           -3.96269410e-19-3.86999514e-17j,  1.77220253e-17-2.54197843e-17j,
            1.13715667e-17-1.71474714e-17j,  4.45714862e-17-4.53767771e-17j,
            1.55865127e-17-1.36251842e-17j,  1.17841878e-17+4.49810548e-17j,
            6.13847383e-17+3.17167514e-17j,  2.80922817e-17-1.24291716e-17j,
           -3.09948256e-17-2.21202258e-17j,  1.28154070e-17-5.56225880e-18j,
           -3.25911242e-17-1.08722636e-17j, -2.38028801e-17+1.09349991e-18j,
           -3.41583502e-17+3.98359801e-17j,  1.96318348e-17+7.81345679e-18j,
           -2.81256084e-18+8.71115168e-18j, -7.87964074e-18-1.37113550e-17j,
            2.27836261e-17-1.70492897e-18j, -5.10237824e-17+4.53523229e-17j,
            8.12296336e-18-1.82517142e-17j,  1.20158494e-17+1.36864548e-17j,
           -1.29859195e-17+1.27932507e-17j,  9.29625928e-18+1.24378930e-18j,
            3.81013405e-17+1.09550132e-17j, -2.44146981e-17+4.20014770e-17j,
            1.57291316e-17+1.01613971e-18j,  5.68481502e-18-1.66230886e-17j,
           -2.53526171e-17+4.45838652e-17j,  1.09219218e-17+1.55972730e-17j,
            3.28820524e-17-7.05823358e-18j,  5.26449354e-19-1.05262155e-17j,
           -2.57919875e-17-1.59872619e-17j,  2.22822949e-17-5.39034157e-18j,
            3.58343494e-18-7.78664577e-19j, -2.16398762e-17-9.14930894e-18j,
            1.01565263e-17-2.06746312e-17j, -1.80564107e-17-1.73398411e-17j,
            3.37198049e-18+2.64263049e-17j, -4.67271026e-17-5.27481349e-18j,
            1.95730647e-17+1.57159508e-17j, -4.59269867e-18+1.04759742e-17j,
           -6.29614540e-17-1.55641012e-17j, -6.28515005e-18+6.10419764e-18j,
           -3.20971199e-17-8.32446508e-18j, -6.37696157e-18+1.66199812e-17j,
           -3.29891346e-17-6.34538438e-18j,  3.68694961e-18+2.30574328e-17j,
           -1.15493918e-17+8.61144293e-19j,  4.27181795e-18+4.34641586e-17j,
            4.82702697e-18-2.45881582e-17j,  2.58215473e-17+1.88892262e-17j,
            1.58305405e-17+4.39496321e-18j,  1.09119843e-16+2.82300658e-17j,
           -1.79359372e-17+2.16462581e-17j, -4.42744965e-17-1.37236287e-17j,
           -1.90665243e-17+1.41018565e-17j,  1.66298022e-17+1.93074085e-17j,
           -3.28763509e-18+4.29547009e-17j,  8.73321147e-17+9.79070176e-18j,
           -9.59010557e-18+2.43166096e-17j,  9.13962001e-18-9.59503138e-18j,
            2.26242079e-17-1.36184051e-17j,  4.51199872e-19-5.12846453e-17j,
            1.80341426e-17-3.89210624e-17j,  1.51737228e-17+4.98983174e-18j,
            7.79734088e-18+4.28607798e-18j, -4.74684838e-17+2.13891443e-17j,
            1.24482937e-17+2.08308655e-17j,  1.59057569e-17+4.23467221e-17j,
           -3.73474237e-17+9.27469584e-18j, -4.71149889e-18-1.82901986e-17j,
            3.74672259e-17+2.99460490e-17j, -1.22848199e-21+8.45332843e-18j,
           -6.45595881e-17-1.72707993e-17j,  9.26469222e-17+3.17269847e-17j])



cd08bd0679d417a10bb6c8163450fb2712d94544
ipynb
Jupyter Notebook
Aula 44 - DFT resolucao e zero padding/DFT - resolucao e zero padding.ipynb
RicardoGMSilveira/codes_proc_de_sinais
e6a44d6322f95be3ac288c6f1bc4f7cfeb481ac0
CC0-1.0
2020-10-01T20:59:33.000Z
2021-07-27T22:46:58.000Z
Aula 44 - DFT resolucao e zero padding/DFT - resolucao e zero padding.ipynb
RicardoGMSilveira/codes_proc_de_sinais
e6a44d6322f95be3ac288c6f1bc4f7cfeb481ac0
CC0-1.0
Aula 44 - DFT resolucao e zero padding/DFT - resolucao e zero padding.ipynb
RicardoGMSilveira/codes_proc_de_sinais
e6a44d6322f95be3ac288c6f1bc4f7cfeb481ac0
CC0-1.0
2020-10-15T12:08:22.000Z
2021-04-12T12:26:53.000Z
Qwen/Qwen-72B
1. YES
2. YES