I have some frequency response data (amplitude, phase and frequency)
of a system that I collected using a frequency response analyzer and
am trying to obtain its transfer function (poles and zeros).
This general problem is addressed in
http://www.mathworks.com/support/solutions/data/7423.shtml . In short,
I tried to use the invfreqs approach suggested in this link, but got
horrible results. The other suggestion mentioned is to use the
3rd-party Frequency Domain Toolbox ($950). Other than buying a new
toolbox, does anyone have any suggestions for obtaining the transfer
function from frequency domain data?
If your data is the typical frequency sweep with lots of noise at the
high-frequency end that may interfere with your ability to pull out a
If your system was hitting some nonlinearity such as actuator saturation,
backlash in the geartrain, friction, etc., that will corrupt your data (an
s- or z-domain transfer function is only valid for a linear system). If you
have a chance to go back and re-do your data you can usually tell that this
is happening by changing the level of the excitation -- if the transfer
function changes much then there's a good chance your system's bumping into
a nonlinearity. Keep in mind that depending on the nonlinearity it could
show up at either excitation level -- friction and backlash will affect the
small-excitation behavior, and actuator saturation will affect the
I have three suggestions:
One: Check that your data is good from DC to light. If not, find out if the
math package provides a way to discount the data at certain (higher?)
frequencies. If it doesn't, restrict the data yourself by hacking off its
Two: dummy up your own transfer function using your knowledge about the
system. Plot your transfer function against the measured transfer function
and diddle the numbers until they match to your satisfaction. This is an
obvious non-starter if you're trying to make an automatic tuner or some such
thing, but for a one off it should work.
Three (this is what I do and highly recommend): change the rules, and win
the new game. This is a non-starter if you're working to a specific
assignment, but otherwise I certainly like it! When confronted with this
sort of data I usually just load the phase/gain plot into my math package
and design my compensator using Nyquist diagrams and Bode plots. This does
have the downside of never knowing the symbolic transfer functions. The
upside, however, is that you're working with data that's as little removed
from the real system as humanly possible (and the gain and phase margins are
easy to see). You can directly extract all of the frequency-domain
performance paremeters straight from your data, and if you absolutely must
have time domain responses you can extract them using the inverse Fourier
Thank you for the quick response. Of your three suggestions, the only
viable one for me was the first, i.e, discounting the higher
frequencies. I played around with this and it resulted in a transfer
function closer to what I would have expected. This appears to be a
promising route to continue to investigate.
Thanks again for your help!
Uh, no. A nonlinear system does not corrupt data. It results in data that
you are not capable of handling. The fault, dear Brutus, lies not in the
system but in ourselves.
If the theories do not fit the facts they must be changed.
From the perspective that you're trying to get data about the system when it
is operating linearly, driving it nonlinear does corrupt the data. You're
right, none the less, in that I didn't point out that you should never
assume that your system is linear, and furthermore that you should never ask
if your system will hit a nonlinearity, but when and how.
None the less, linear analysis can do wonderful things for you, as long as
you keep your eyes open.
Fully agree here, and I could add that the type of excitation applied
should correspond to the particular character of the system that you are
trying to identify. In the case of a linear system, each mode to be
identified should experience "sufficient excitation" (Ljung?), or else
we run into numerical difficulties (such as rank deficiency in batch
mode least squares) - hence the value of band-limited excitation for
I would suggest successful identification relies on establishing the
nature of the dynamic modes to be identified, and this process might
involve some preliminary investigation (and modelling to identify
significant mode shapes and approximate characteristic frequencies, and
simulations to find the effect of non-linearities....)
Tim Wescott wrote:
I never tried using the frequency response. I can't count on being able to
shake the system to the ground just to tune it. I use least squares
system identification. This requires that you know the number of poles and
zeros ahead of time or fit the data to many models and choose the best one.
You can do this with an Excel spread sheet, no fancy math package required
but it helps.
I would like to use a step jump. On machines that are very stiff, with
little load, this works well, but it abuses the machine. Step jumps make my
whole hydraulic test system shake so I usually use open loop ramps that are
slow enough not to cause the machine frame to shake yet fast enough to so it
is beyond the response bandwidth of the system. If the machine shakes then
it will induce oscillations on the actuator and ruin the calculations by
substuting the machine oscillations for the oscillations caused by the
What I like about the least squares is that set jumps are not required.
Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here.
All logos and trade names are the property of their respective owners.