# Control systems and convolution

I think i am not understanding the concept of convolution well.

Lets say we are given a system impulse response in the S-domain, and we have implemented a controller $G_c(s)$ that will adjust the system response to some kind of input. Now when we are implementing this controller say using an operational amp. circuit all we need to do is to get the differential equation of $G_c(s)$ and start implementing it with the correct component values. Is this correct?

And if so, lets say we are trying to implement this controller on a computer, where our inputs, outputs are no longer continuous signals. And our controller in the Z-domain is represented by $G_c(z)$. Now the next step to implement this controller in a computer is to get the difference equation and implement it in a software. Is this correct?

And if so, what is the difference between implementing the controller difference equation on a software and implementing the convolution algorithm on the software?

For example if we are given g[n] as an array of samples representing the the controller unit impulse response, and our input is stored inside x[n] a simple for loop might do this algorithm for us. As far as i know

for i in len(x):      #loop through the input elements
for j in len(g):     #loop through the controller unit impulse response elements
y[i+j] += x[i]*g[j]  #Store the conv. result in the output array y


Which is just telling the software to scale every point in the impulse response by x[n] and then shift the response by n, then add them all up.

I am probably missing something here !

This's a too broad question including continuous time systems, discrete time systems, control systems, convolution operation, difference operation and differentiaiton operations.

However your main focus is on convolution. Therefore I will state in plain simple terms that the operation of convolution defines and calculates the output of a linear time invariant system to a given input from the impulse response of the system. This is performed by the convolution integral for continuous time systems and convolution sum for discrete time systems. Therefore convolution forms the core of signal processing. Just as integration or differentiation forms the core of calculus.

Control theory is an application of extensive signal processing, feedback theory, linear algebra, calculus, matrix theory, transform theory and probability theory. Therefore it will naturaly utilize convolutions in its many formulations. Nevertheless convolution is nothing more than a tool for the control field point of view.

A physical process requires an analog (continuous time) system to control it. But modern technology enables digital computers (sampled data systems) to be used instead. As a consequence, integrations and differentiations of the continuous time system are replaced by sums and differences in digital software implementation of analog systems. Whereas the link between the digital and continuous time systems can be defined via sampling theorem or some other mapping relations.

• Thanks so much for your answer. So does this mean that implementing the controller difference equation would give the same results as a convolution algorithm will do? – Elbehery Mar 1 '17 at 0:13
• Yes true! The theoretical solution (or the numerical iterations) of the LCCDE (linear constant coefficient difference equation) with initial rest is equivalent to the result from the convolution sum of the input and the impulse respone of the LTI system. – Fat32 Mar 1 '17 at 0:46