# Multiply a measured quantity of a control-system in the frequency domain during continious operation

Currently I am working on a feed-forward control system to actively control vibrations. For that purpose I need to measure accelerations on a vibrating structure and use a transfer function in the frequency domain to calculate a force which should be applied back to the structure. As the measured acceleration trace is in the time domain I need to perform a fourier transformation, multiply my signal in the frequency domain and do an inverse fourier transform to get back to the time domain to apply the force on the structure using a shaker device.

The whole process looks somewhat like this:

As this whole signal chain should work continously I am unsure how to handle the FFTs? I need a certain signal length in order to perform a fft. So I need to cut my continious signal into chunks and do the ffts of them. Is it usefull to use overlaps with those chunks and how do I determine a suitable FFT length?

Of course I want to get a continious signal at the output. So I need to somehow smooth the cutting points between the chunks after the idft.

So basicaly I know about the individual parts of this process chain, but I have never done such a chain in total and so I am somewhat lost on how to deal with the delay and the stepping I get due to the fft.

Edit:

• Why not just filter in the time domain? – fibonatic Feb 5 at 17:33
• Hey fibonatic! Filtering in time domain would also be fine for me. But wouldn't that need a convolution which again needs cutting the continious signal in chunks? And I would need to transform my transfer function from frequency to time domain. – Matthias La Feb 6 at 9:05
• you could discretize your transfer function and then use the resulting difference equation. – fibonatic Feb 6 at 11:11
• Could you please help me understand what you exactly mean? The trasfer function is discrete in the frequency domain (Δf). Do you mean changing to the time domain by replacing the multiplication in the frequency domain by a convolution in the time domain? And then replacing the convolution by a difference equation? – Matthias La Feb 8 at 15:10

I assume that the transfer function that you are using is of a similar form as $$V(\eta)$$ in the image of your question, with $$\eta = \Delta f / f_0$$. Often a transfer function is written in terms of the complex Laplace variable $$s$$, but I assume that your $$\eta$$ represents some sort of normalized frequency. That is equivalent to using $$s = i\,k\,\omega$$ with $$i$$ the unit imaginary number, $$k$$ some normalization constant and $$\omega$$ the angular frequency. If you rewrite your transfer function in terms of $$s$$ instead of $$\eta$$ you can use one of the many known discretization methods. A simple but good discretization method is the bilinear transform, which requires you to substitute $$s$$ with the following expression in the transfer function

$$s = \frac{2}{T} \frac{z - 1}{z + 1}, \tag{1}$$

with $$T$$ the sample time of your sensor. After simplifying the resulting (discrete time) transfer function you should have something of the form

$$V(z) = \frac{b_m\,z^m + b_{m-1}\,z^{m-1} + \cdots + b_0}{z^n + c_{n-1}\,z^{n-1} + \cdots + c_0}, \tag{2}$$

with $$n \geq m$$ and all $$b_i$$ and $$c_i$$ real scalar constants. When multiplying a discrete signal with the variable $$z$$ can be interpreted as shifting that signal one sample in time. So given the input signal $$a[k]$$ (with $$k$$ an integer used as an index and the time associated with that index could for example be $$t = k\,T$$) the output $$F[k]$$ can be related to each other using $$(2)$$

\begin{align} (z^n + c_{n-1}\,z^{n-1} + \cdots + c_0)\,F[k] &= (b_m\,z^m + b_{m-1}\,z^{m-1} + \cdots + b_0)\,a[k], \\ F[k+n] + c_{n-1}\,F[k+n-1] + \cdots + c_0\,F[k] &= b_m\,a[k+m] + b_{m-1}\,a[k+m-1] + \cdots + b_0\,a[k]. \end{align}

Solving this for $$F[k]$$ gives

$$F[k] = b_m\,a[k+m-n] + b_{m-1}\,a[k+m-1-n] + \cdots + b_0\,a[k-n] - c_{n-1}\,F[k-1] - \cdots - c_0\,F[k-n],$$

so a weighted sum of previous inputs and outputs. This relation for $$F[k]$$ allows you to calculate a new output every time you get a new input, so no need to calculate it using chunks. I can be noted that initially you do not know the past values of the input and output. However, usually one set those to zero or some other initial value, which should only change the initial transient behavior of the output (assuming that the filter is stable).