Cannot find a suitable controller for my state space system
Show older comments
%Define the parameters and system matrices as before
global g c k L m M Io f tau wn Ig K wb q z alpha ct
set(0,'defaulttextinterpreter','latex')
g=1.62; %lunar gravity
tau=-0.005; %envelope function 1/time constant
wn=117; %natural frequency of regolith foundation
m=2187500; %regolith foundation mass
M=3000; %telescope mass
Ig=1500; %Moment of Inertia for telescope Used Ig=1/2*M*R^2 assumed radius of 1m
Io=(M*L^2)+Ig;
c=42485.625; %damping coefficient
L=10; %length of telescope
k=29.96*(10^9); %spring constant of regolith
K=7*(10^10);
wb=18.85; %angular velocity of seismic input
q=M+m;
z=(M^2)*(L^2);
alpha=Io*(q)-z;
ct=2*sqrt(M*K)*0.1; %damping of telescope
% Define the state-space matrices
A = [0, 1, 0, 0; (-Io * k / alpha), (-Io * c / alpha), ((M * L * K - z * g) / alpha), M*L*ct/alpha; 0, 0, 0, 1; ((M * L * k) / alpha), ((M * L * c) / alpha), (((M * L * g *q) - (K*q)) / alpha), -q*ct/alpha];
B = [0; (Io / alpha); 0; (-M * L / alpha)];
Cgood=[1 0 0 0; 0 0 1 0]; %want to measure x and theta
C = [1, 0, 0, 0]; %x
C2= [0, 1, 0, 0]; %xdot
C3= [0, 0, 1, 0]; %theta
C4= [0, 0, 0, 1]; %thetadot
D = [0];
% Define the time vector
t = linspace(0, 1000, 1000000);
% define seismic input u
u = @(time) (k * exp(tau * time) * sin(wb * time) + c * (tau * exp(tau * time) * sin(wb * time) + wb * exp(tau * time) * cos(wb * time)));
% Evaluate the input function for the entire time vector (so i can use u in lsim function)
u_matrix = arrayfun(u, t);

I am trying to design a controller for my state space system which is modelling a response of an inverted pendulum (telescope) on a base that is subject to ground motion (y). When making the state space model, I have u=ky+cydot where I define y as a damped sine wave to model an earthquake. However, whether it is using pid tuner, pole placement, or lqr control, I cannot design a controller that reduces oscillations of the system. The system is controllable and observable as the ranks of the controllability and observability matrices are 4. However, no matter what kind of technique I use, the controllers I design often do not change the sytem. I was wondering if there is something inherently wrong in the way I am approaching this problem. Thank you

Accepted Answer
More Answers (0)
Categories
Find more on Linear Model Identification in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!





