I have some samples of readings from an accelerometer (unit: g) and I did a FFT (on MATLAB) on the vector generated from these samples to see its frequency spectrum. Then I have isolated the peaks and located its frequency. OK, now the control theory question. Let's say, to simplify the example, the only peak is 2 g at the frequency of 10 Hz. The accelerometer acquired the samples over a vibration system, so I assume it is undamped oscillating endelessly at a natural frequency of 10 Hz. My transfer function would be:

$$F(s) = \dfrac{(10\cdot2\pi)^2}{s^2 + (10\cdot2\pi)^2} = \dfrac{3948}{s^2 + 3948}$$

I multiplied by $2\pi$ before raising because it's given in Hz and I have to convert it into rad/s (right?)

I intend to make a PID control (on Simulink) to analyze some parameters, as overshoot, settling time, etc.

The REAL question is: how do I "tell" the system that the amplitude of it is 2 g? Is it like a gain that I insert before the transfer function block?

PID control

  • $\begingroup$ If you're not getting any answers, it may be because a transfer function does not have an amplitude. Signals have amplitudes. Transfer functions have gain. If you're getting your 10Hz tone under vibration, but not when the platform is unmoving, then you're not seeing an undamped harmonic oscillator, although you might be seeing a 10Hz resonance with very little damping. $\endgroup$
    – TimWescott
    May 19, 2019 at 3:27
  • $\begingroup$ OK, it makes sense, but what if I intend to test the same PID gains on the next peak? I mean, if the next peak is at 12 Hz, how can I write my new transfer function? The idea is to see how much % of the maximum peak I can consider as noise and discard it. $\endgroup$ May 19, 2019 at 17:15
  • 1
    $\begingroup$ You seem to be utterly confusing the concept of a transfer function and the concept of a signal. They are different things. Yes, by happenstance a transfer function happens to also be the system's unit impulse response -- but a signal is not a system, a system is not a signal, and they cannot be mixed. So your idea of putting a signal description into a block in a transfer function is meaningless. $\endgroup$
    – TimWescott
    May 19, 2019 at 20:26
  • $\begingroup$ Understood. Well, are there any tips on how can I simply measure how much of a magnitude I can consider as noise and discard it? That's pretty much what the exercise is about... $\endgroup$ May 19, 2019 at 23:18
  • $\begingroup$ I believe that this is an XY problem. Could you either edit your question, or start another one, that states what you're really doing, and what you really need to do? $\endgroup$
    – TimWescott
    May 19, 2019 at 23:55

1 Answer 1


It sounds like you have some experimental data, and from that you would like to be able to estimate the transfer function of your system so that you could use it for control system design purposes.

If that's the case, and given that you are using MATLAB, I would suggest looking at the tfest function, which is part of the System Identification Toolbox:


sys = tfest(data,np) estimates a continuous-time transfer function, sys, using time- or frequency-domain data, data, and contains np poles. The number of zeros in the sys is max(np-1,0).

sys = tfest(data,np,nz) estimates a transfer function containing nz zeros.

sys = tfest(data,np,nz,iodelay) estimates a transfer function with transport delay for input/output pairs iodelay.

sys = tfest(___,Name,Value) uses additional options specified by one or more Name,Value pair arguments. All input arguments described for previous syntaxes also apply here.

sys = tfest(data,init_sys) uses the linear system init_sys to configure the initial parameterization of sys.

sys = tfest(___,opt) specifies the estimation behavior using the option set opt. All input arguments described for previous syntaxes also apply here.

Once you have your transfer function as an idtf model, you should be able to use it in your Simulink. It may be necessary to do some pre-processing on your data before fitting.


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.