A long time since I posted the last time… I have been studying new topics. Today, I’d like to share a post about a DSP function on ARM processors. It is “convolution.”

Let’s begin with the definition. I can say that the magic keyword behind the convolution is “signal decomposition”. You should investigate their relationship. Also, you can also check out this chapter or this series. They describe the connection between impulse response and convolution function in a nutshell. I merely provide you with the source because I don’t have enough time to explain them from scratch or to make them animated.

Here is the discrete equation of the convolution:

    \[y[n]=h[n]{ }^{*} x[n]\]

\mathrm{x}[\mathrm{n}]: N-point signal from 0 to N-1
\mathrm{h}[\mathrm{n}] : M-point signal from 0 to M-1
\mathrm{h}[\mathrm{n}]{*}\mathrm{x}[\mathrm{n}]: N+M-2 point signal from 0 to N+M-2

    \[y[i]=\sum_{j=0}^{M-1} h[j] x[\mathrm{i-j}]\]

Let’s analyze a specific output point, how does it calculated…

Udemy (DSP From Ground Up™ on ARM Processors)

As can be seen from the explanation above, we can decompose the output signal to decide which scale/shift step of impulse response affects the 6th element at the output. The pattern can be seen clearly!

y[n]= x[3]h[n-3] + x[4]h[n-4] + x[5]h[n-5] + x[6]h[n-6]
y[6]= x[3]h[6-3] + x[4]h[6-4] + x[5]h[6-5] + x[6]h[6-6]
y[6]= x[3]h[3] + x[4]h[2] + x[5]h[1] + x[6]h[0]

So, the sum of i and j values which are index values of the input signal and the impulse response must be the same as the index value of the output signal which we’re analyzing. It is our algorithm…

The signals on the logic analyzer:

Keil Logic Analyzer, Signals in a Loop
Keil Logic Analyzer, Signals and Their Length

It’s the first part of the post… CMSIS Convolution will be described and implemented in the next post…

I am waiting for your feedback… tips and tricks, or my faults, etc.