Error using InputOutputModel/feedback
Hi,
I am new to designing controller. Here is my code
m = 4; %mass of the system
g = 9.8; %gravitational force
A = [0, 1, 0, 0;
-g/m, 0, 0, 0;
0, 0, 0, 1;
0, 0, -g/m, 0];
B = [0, 0;
1/m, 0;
0, 0;
0, 1/m];
C = eye(4); %identity matrix
D = [1,0;
0,1;
0,0;
0,0];
Kp = 1;
Ki = 1;
Kd = 1;
inputSignal = pid(Kp,Ki,Kd);
sys = ss(A,B,C,D);
closedLoop = feedback(sys*inputSignal,1);
It gives me below error
Error using InputOutputModel/feedback (line 137)
The first and second arguments of the "feedback" command must have compatible I/O sizes.
Error in pidmodel (line 29)
closedLoop = feedback(sys*inputSignal,1);
I am not sure what’s wrong.Hi,
I am new to designing controller. Here is my code
m = 4; %mass of the system
g = 9.8; %gravitational force
A = [0, 1, 0, 0;
-g/m, 0, 0, 0;
0, 0, 0, 1;
0, 0, -g/m, 0];
B = [0, 0;
1/m, 0;
0, 0;
0, 1/m];
C = eye(4); %identity matrix
D = [1,0;
0,1;
0,0;
0,0];
Kp = 1;
Ki = 1;
Kd = 1;
inputSignal = pid(Kp,Ki,Kd);
sys = ss(A,B,C,D);
closedLoop = feedback(sys*inputSignal,1);
It gives me below error
Error using InputOutputModel/feedback (line 137)
The first and second arguments of the "feedback" command must have compatible I/O sizes.
Error in pidmodel (line 29)
closedLoop = feedback(sys*inputSignal,1);
I am not sure what’s wrong. Hi,
I am new to designing controller. Here is my code
m = 4; %mass of the system
g = 9.8; %gravitational force
A = [0, 1, 0, 0;
-g/m, 0, 0, 0;
0, 0, 0, 1;
0, 0, -g/m, 0];
B = [0, 0;
1/m, 0;
0, 0;
0, 1/m];
C = eye(4); %identity matrix
D = [1,0;
0,1;
0,0;
0,0];
Kp = 1;
Ki = 1;
Kd = 1;
inputSignal = pid(Kp,Ki,Kd);
sys = ss(A,B,C,D);
closedLoop = feedback(sys*inputSignal,1);
It gives me below error
Error using InputOutputModel/feedback (line 137)
The first and second arguments of the "feedback" command must have compatible I/O sizes.
Error in pidmodel (line 29)
closedLoop = feedback(sys*inputSignal,1);
I am not sure what’s wrong. input, output, pid MATLAB Answers — New Questions