I have a system consisting of two bodies (It and Ic) connected by a rotational spring (constant k). Control is placed on the second body Ic. The state vector consists of the angles and angular rates of the bodies wrt an inertial frame.
It = 1000;
Ic = 10;
k = 1;
A = [0 0 1 0;
0 0 0 1;
-k/It k/It 0 0;
k/Ic -k/Ic 0 0];
B = [0;0;0;1/Ic];
I want to control the angle between the two bodies (it has to be reduced to zero) using PID control. I have full state output available.
Now, the pid-function in Matlab only works on SISO systems. Would it be an idea to modify the output to be just a single output y = [1 -1 0 0]'? And feed this into the PID controller as the error? Or are there other options to make this multiple output system work with the pid controller function in Matlab?
(I want to avoid using Simulink)