suppose I know the frequency response of a (linear) model approximating a real physical system but only at a specific frequency $f_0$ (so basically I have a complex number whose module is the magnitude response and the phase is the phase response).

In Matlab I want to filter a sinusoidal signal whose frequency is $f_0$ by a filter that approximates the response of my system at $f_0$ without altering the other frequencies. The filtering process must be done simulating the on-line behaviour, assuming that the next samples of the signal are unknown.

In other words my question is this: how can I build a filter whose behaviour at $f_0$ is the same of my system and does not modify the other frequency components?

The motivation I am asking this is that I need to perform some transformations on the frequency response at $f_0$ of the real system exploiting the results of the Singular Value Decomposition performed on the frequency response at $f_0$ of the identified (linear MIMO) model that approximates the real system.

Thanks in advance

  • $\begingroup$ Your question is not clear to me. You say that you want to filter a sinusoidal signal, but then you require that the system must not modify other frequency components. Which other components if the input is sinusoidal? $\endgroup$
    – Matt L.
    Jul 27, 2014 at 19:14
  • $\begingroup$ Be careful: I did not say frequency components of my signal. I meant if I would have another signal with more frequency components, I would like to modify the behaviour at $f_0$ only. $\endgroup$ Jul 27, 2014 at 19:47
  • $\begingroup$ Your signal is the total input signal, and you have to design the filter according to this total input signal if you care about what happens to other frequency components. $\endgroup$
    – Matt L.
    Jul 27, 2014 at 20:31
  • $\begingroup$ @FrancescoBoi, Could you please review my answer? Thank You. $\endgroup$
    – Royi
    Jun 30, 2022 at 5:57

1 Answer 1


Convolve the input signal with (Real Part) harmonic signal $ \alpha {e}^{-2 \pi i {f}_{0} t + \phi} $.
Let's call this output as $ {y}_{1} $.
The parameters $ \alpha $ and $ \phi $ are from your reference system response.

This will give you the output of the reference system on your input signal only at your desired frequency.

Now convolve the input signal with (Real Part) harmonic signal $ 1 {e}^{-2 \pi i {f}_{0} t} $.
Let's call this output as $ {y}_{2} $.
This will extract this component of your input signal.

Calculate $ {y}_{3} = {y}_{1} - {y}_{2} $ and all you need is to add $ {y}_{3} $ to your signal.

There are trickier and more efficient way to do so.
Yet I wanted to keep it simple and intuitive.

  • $\begingroup$ -1: But that won't pass all the components NOT at $f_0$, will it? $\endgroup$
    – Peter K.
    Aug 2, 2014 at 1:24
  • $\begingroup$ @PeterK., I thought what I wrote was enough to infer the rest. I now made it clearer. I think you can undo the -1 :-). $\endgroup$
    – Royi
    Aug 22, 2018 at 6:14
  • $\begingroup$ Yes, that's much clearer. Thank-you! $\endgroup$
    – Peter K.
    Aug 22, 2018 at 11:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.