Calculator
This page keeps a single-column content flow, while the calculator fields use 3 columns on large screens, 2 on medium, and 1 on mobile.
Formula Used
Linear discrete convolution: y[n] = Σ x[k] · h[n - k]
DFT of a sequence: X[m] = Σ x[n] · e^(-j2πmn/N)
Convolution theorem: Y[m] = X[m] · H[m]
Recovered time sequence: y[n] = IDFT{X[m] · H[m]}
Circular convolution: y_N[n] = Σ x[k] · h[(n - k) mod N]
For linear convolution, zero-padding to at least M + L − 1 prevents circular wraparound. For circular convolution, both sequences are evaluated over the selected transform length N.
The calculator computes the direct time-domain result and compares it with the inverse transform of the frequency-domain product. The absolute difference confirms the theorem numerically.
How to Use This Calculator
- Enter the two finite sequences you want to convolve.
- Choose linear or circular mode, depending on your problem.
- Select auto length or enter a custom transform length.
- Set sample interval and optional sequence start indices.
- Press Calculate Convolution to see results above the form.
- Review the output table, theorem reconstruction, and frequency magnitudes.
- Use the Plotly graphs to inspect sequence shapes and spectra.
- Download the computed report as CSV or PDF.
Example Data Table
This example uses x[n] = [1, 2, 3] and h[n] = [1, 1, 2]. The linear convolution becomes y[n] = [1, 3, 7, 7, 6].
| n | x[n] | h[n] | y[n] |
|---|---|---|---|
| 0 | 1 | 1 | 1 |
| 1 | 2 | 1 | 3 |
| 2 | 3 | 2 | 7 |
| 3 | — | — | 7 |
| 4 | — | — | 6 |
FAQs
1) What does this calculator actually verify?
It checks that time-domain convolution matches the inverse transform of the frequency-domain product. The output table shows both values side by side, along with numerical error.
2) Why is zero-padding important for linear convolution?
Without enough padding, transform multiplication produces circular wraparound. Padding both sequences to at least M + L − 1 preserves the full linear convolution result.
3) When should I use circular mode?
Circular mode is useful for periodic signals, FFT-based processing, block convolution, and problems defined over a fixed transform length. It wraps the indices modulo N.
4) Why is there a tiny imaginary part after IDFT?
That small imaginary residue comes from floating-point rounding during transform calculations. For real-valued inputs, it should stay extremely close to zero.
5) What do the start indices change?
They shift the displayed index labels. This is helpful when your discrete signals begin at negative indices or when you need index-aware convolution results.
6) What does the sample interval affect?
The sample interval scales the reported time axis and the frequency-bin spacing. It does not change the algebraic convolution values themselves.
7) Is this calculator suitable for long sequences?
It is designed for educational and practical analysis of moderate finite sequences. Very large transform lengths are limited here to keep the page responsive.
8) What can I export from this page?
You can export a CSV file containing summary and result tables, or generate a PDF report of the computed result section and graphs.