How to get output of 2X2 transfer function for a MIMO system using either "spafdr" or "n4sid" function

I have a mechanical system with 2 inputs and 2 outputs. Currently I use the “spafdr” system id command to get the frequency response and transfer function from each input to each output (total 4 transfer functions).
I need to use either "spafdr" or "n4sid" command to find the 2 by 2 MIMO transfer function in one shot as opposed to map the individual inputs to the individual outputs. 
I haven’t been successful in obtaining the right MIMO transfer function which matches the MIMO transfer function obtained from my first approach of finding them one by one.
I expect output to be of this form 
G=[G11 G12;G21,G22];

 Accepted Answer

The data appears quite clean and benefits from use of periodic excitations. For such data (inputs that are periodic), identification is better performed in frequency domain. I suggest using "ssest" function. This will return a MIMO system in state space.
For example,
>> m=ssest(fft(data_fsm),1:20);
suggests a 4th order model and fits the data >=80 %.
Please refer the documentation below for more information
You can convert this state space system to a transfer function using "ss2tf" function.
>>[b,a] = ss2tf(A,B,C,D,ni)
 returns the transfer function that results when the ni th input of a system with multiple inputs is excited by a unit impulse.
Please refer the link below for more information

More Answers (0)

Products

Release

R2013b

Community Treasure Hunt

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

Start Hunting!