Why step respose don’t work for first input of a MIMO? And how to use correctly feedback function for pole placement?
Hi!
I’m trying to make a step response for an unstable MIMO system. When I’m using the step function it’s only work for the second input and the first one doesn’t to anything. And also, I’m trying to make a feedback control of the system with pole placement, but I don’t really know how to write correctly the feedback function. Does anyone know what to do?
The model it’s from this study: https://www.mdpi.com/2079-9292/13/3/514#B17-electronics-13-00514
Step response:
Matlab code:
clc
clear all
close all
%% Model parameters
Mp = 0.272;
dM = 0.071;
g = 9.81;
J = 0.002;
Jw = 3.941*10^-5;
b_theta = 0.82*10^-3;
b_altha_kmke_Ra = 1.202*10^-4;
km_Ra = 1.837*10^-4;
%% Matrices for the state space model
A = [0 1 0 0;
(Mp*dM*g)/J -(b_theta)/J 0 1/J*b_altha_kmke_Ra;
0 0 0 1;
-(Mp*g*dM)/J b_theta/J 0 -(J+Jw)/(J*Jw)*b_altha_kmke_Ra];
B = [0 0;
-1/J*km_Ra 1/J;
0 0;
(J+Jw)/(J*Jw)*km_Ra -1/J];
C = [1 0 0 0;
0 1 0 0;
0 0 1 0;
0 0 0 1];
D = [0 0; 0 0;0 0;0 0];
%% Build system
sys = ss(A,B,C,0);
step(sys);
Sc = ctrb(sys);
So = obsv(sys);
%% Control
P = [-1;-2;-3;-4]*10;
K = place(A,B,P);
Alc = A-B*K;
sys_cl = ss(Alc,B,C,D);
closeLoop = feedback(sys*Alc,1);
%% Simulation
t = 0:0.001:10;
u = [ones(length(t),1) zeros(length(t),1) zeros(length(t),1) zeros(length(t),1)];
lsim(closeLoop,u,t)Hi!
I’m trying to make a step response for an unstable MIMO system. When I’m using the step function it’s only work for the second input and the first one doesn’t to anything. And also, I’m trying to make a feedback control of the system with pole placement, but I don’t really know how to write correctly the feedback function. Does anyone know what to do?
The model it’s from this study: https://www.mdpi.com/2079-9292/13/3/514#B17-electronics-13-00514
Step response:
Matlab code:
clc
clear all
close all
%% Model parameters
Mp = 0.272;
dM = 0.071;
g = 9.81;
J = 0.002;
Jw = 3.941*10^-5;
b_theta = 0.82*10^-3;
b_altha_kmke_Ra = 1.202*10^-4;
km_Ra = 1.837*10^-4;
%% Matrices for the state space model
A = [0 1 0 0;
(Mp*dM*g)/J -(b_theta)/J 0 1/J*b_altha_kmke_Ra;
0 0 0 1;
-(Mp*g*dM)/J b_theta/J 0 -(J+Jw)/(J*Jw)*b_altha_kmke_Ra];
B = [0 0;
-1/J*km_Ra 1/J;
0 0;
(J+Jw)/(J*Jw)*km_Ra -1/J];
C = [1 0 0 0;
0 1 0 0;
0 0 1 0;
0 0 0 1];
D = [0 0; 0 0;0 0;0 0];
%% Build system
sys = ss(A,B,C,0);
step(sys);
Sc = ctrb(sys);
So = obsv(sys);
%% Control
P = [-1;-2;-3;-4]*10;
K = place(A,B,P);
Alc = A-B*K;
sys_cl = ss(Alc,B,C,D);
closeLoop = feedback(sys*Alc,1);
%% Simulation
t = 0:0.001:10;
u = [ones(length(t),1) zeros(length(t),1) zeros(length(t),1) zeros(length(t),1)];
lsim(closeLoop,u,t) Hi!
I’m trying to make a step response for an unstable MIMO system. When I’m using the step function it’s only work for the second input and the first one doesn’t to anything. And also, I’m trying to make a feedback control of the system with pole placement, but I don’t really know how to write correctly the feedback function. Does anyone know what to do?
The model it’s from this study: https://www.mdpi.com/2079-9292/13/3/514#B17-electronics-13-00514
Step response:
Matlab code:
clc
clear all
close all
%% Model parameters
Mp = 0.272;
dM = 0.071;
g = 9.81;
J = 0.002;
Jw = 3.941*10^-5;
b_theta = 0.82*10^-3;
b_altha_kmke_Ra = 1.202*10^-4;
km_Ra = 1.837*10^-4;
%% Matrices for the state space model
A = [0 1 0 0;
(Mp*dM*g)/J -(b_theta)/J 0 1/J*b_altha_kmke_Ra;
0 0 0 1;
-(Mp*g*dM)/J b_theta/J 0 -(J+Jw)/(J*Jw)*b_altha_kmke_Ra];
B = [0 0;
-1/J*km_Ra 1/J;
0 0;
(J+Jw)/(J*Jw)*km_Ra -1/J];
C = [1 0 0 0;
0 1 0 0;
0 0 1 0;
0 0 0 1];
D = [0 0; 0 0;0 0;0 0];
%% Build system
sys = ss(A,B,C,0);
step(sys);
Sc = ctrb(sys);
So = obsv(sys);
%% Control
P = [-1;-2;-3;-4]*10;
K = place(A,B,P);
Alc = A-B*K;
sys_cl = ss(Alc,B,C,D);
closeLoop = feedback(sys*Alc,1);
%% Simulation
t = 0:0.001:10;
u = [ones(length(t),1) zeros(length(t),1) zeros(length(t),1) zeros(length(t),1)];
lsim(closeLoop,u,t) matlab, equation, matrices, control MATLAB Answers — New Questions