Find Transfer Function from Experimental Data

Click For Summary
SUMMARY

The discussion focuses on deriving a transfer function from experimental input and output data using Fourier transforms. The user attempts to compute the transfer function by applying FFT to both input and output signals, but struggles with prediction accuracy. Suggestions include using GNU Octave's system identification functions, specifically the ARX model, and calculating new outputs through inverse FFT of the product of the transfer function and new inputs.

PREREQUISITES
  • Understanding of Fourier Transforms and FFT (Fast Fourier Transform)
  • Familiarity with transfer functions in control systems
  • Basic knowledge of GNU Octave and its system identification toolbox
  • Experience with Arduino programming for implementing algorithms
NEXT STEPS
  • Explore GNU Octave's ARX model for system identification
  • Learn about inverse FFT and its application in signal processing
  • Research methods for offset and gain adjustment in transfer function calculations
  • Investigate alternative methods for transfer function estimation from time-domain data
USEFUL FOR

Engineers, control system designers, and hobbyists working on signal processing and system identification projects, particularly those using Arduino and open-source tools like GNU Octave.

arcticMouse
Messages
1
Reaction score
0
I would like to find a useful function to predict the output based on the input. I'm trying to figure out how to get the transfer function given actual input and output data.

What I've tried is getting a transfer function using Fourier transforms. I'm attemping to do a fft on both the input and the output and dividing the output over the input and using fft of the absolute value to get the transfer function. The problem is it doesn't allow me to predict the output very well, though it does give me something that looks like a sum of exponential which is what I expect. Do I need to subtract an offset or apply gain and an offset? (y = mx + b sort of thing). I think I'm missing some key concept that I don't know how to describe.

Here's a simple sketch of what I'm trying to do.

http://i.imgur.com/4eo1x.png

Here's some pseudo code of what I've tried. I don't have MATLAB or anything fancy to do this for me, I'm trying to write it for an arduino project.

input_fft = fft(input);
output_fft = fft(output);
tf_fd = output_fft / input_fft;
tf = fft(abs(tf_fd));

Just a point in the right direction would be great! Maybe I'm going about this all wrong.
 
Engineering news on Phys.org
You can download opensource Octave. It has system identification functions, arx for example.
 
Welcome to PF, arcticMouse! :smile:

Are you aware that you should calculate a newoutput for some newinput with:
newoutput = fftinverse(fft(newinput) * tf_fd)
 
Last edited:

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
Replies
1
Views
1K
  • · Replies 11 ·
Replies
11
Views
9K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 3 ·
Replies
3
Views
1K
Replies
3
Views
5K