How to get transfer function from two vectors (input and response vectors)

11 views (last 30 days)
I have a step response values for a system in Excel.
It's two columns. First column is time, the other is the response of the system. I can get a graph in Excel, but how do I get the equation in MATLAB?
I would like to really get the transfer function of the system. So if I have two columns in Excel, I assume thats a two 1x1 matrices.

Answers (2)

Walter Roberson
Walter Roberson on 4 Feb 2011
Unless you can place some constraints on the transfer function, there are an infinite number of solutions to finding a transfer function from a finite discrete set of points.

Jarrod Rivituso
Jarrod Rivituso on 4 Feb 2011
Generally, you need to guess the order of the transfer function and then fit the data to it as best you can.
The System Identification Toolbox provides tools that can help you with this for arbitrary system models (transfer function models, and others). Check out the tutorial for identifying low order transfer functions:
There is also a GUI that helps you work through the steps:
>> ident
Since your post is tagged homework, I feel obligated to mention that, for 1st and 2nd order systems, you can determine the system dynamics based on easily measurable properties, such as rise time, percent overshoot, steady-state error, etc.
You can determine these properties by looking at the plot of the data. Or, the Control System Toolbox has a function that can get the properties automatically...
>> doc stepinfo
Once you have that information, there are well-defined equations that you can use to get other properties, such as the natural frequency (for second order systems).
Hope this helps!

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!