Is there a way to make a bode plot of a MIMO system

Hi,

I try to make a bode plot of a Multi Input Multi Output (MIMO) system using the code below
m1=100; %[kg]
k1=1e5; %[N/m]
d1=100; %[Ns/m]
m2=1000;%[kg]
k2=1e4; %[N/m]
d2=1500;%[Ns/m]

A=[0 1 0 0; [-k1 -d1 k1 d1]/m1; 0 0 0 1; [k1 d1 -k1-k2 -d1-d2]/m2];
B=[0 0; -1/m1 0; 0 0; [-1 k2+d2]/m2];
C=[1 0 0 0; 0 0 1 0];
D=0;
sys=ss(A,B,C,D)
figure(10)
step(sys)
figure(11)
bode(sys)

then I receive the following message:

error: bode: require SISO systems
error: called from
frequency_response at line 73 column 5
bode at line 66 column 24

indicating that I did not provide a SISO system. That’s correct, but is there a way to make a bode plot of a MIMO system?

My system

  • OS: Windows 11 Pro (version 21H2)
  • Octave version: Version 6.4.0
  • Installation method: Downloaded and installed “octave-6.4.0-w64-installer.exe” from Download

You can do it manually if there is no other way. Since Octave seems to force the figure to have the format subplot(2,1,__), it may not be possible to plot them in the same figure. To get them into the same figure, you may have to extract the data using [MAG, PHA, W] = bode (SYS) and plot manually.

for inp=1:2
for outp=1:2
  figure;

  %% extract a SISO system from a MIMO system
  bode(sys(outp, inp));


  title(['input ', num2str(inp), ' to output ', num2str(outp)])
end
end