LQR control for 2DOF system

2 views (last 30 days)
Rajat
Rajat on 9 Aug 2023
Hello,
I am trying to design active tuned mass for main structure control used LQR
I have simple 2DOF system with disturbing force(wind force) on lower mass(main structure) and control action on upper mass(tuned mass damper).
I wrote code for using state space equations and LQR control command (K= lqr(A,B(:,2),C,D)) and created simulink model for same. Although my gain values are very low(of power 10^-3) and even if i remove the gain block entirely, I still get same results as output.
It seems like my gain value has absolutely no influence on my output and hence the system has barely any effect of having control action on tuned mass.
I would love to know if I am missing something or there is any other mistake I am doing.
Thank you in advance.
I have my attached code as well as screenshot of simulink model (system1 and A1,B1,C1,D1 matrices in code refers to uncontrolled system i.e., without tuned mass essentially making it SDOF so that part can be ignored)
clc
%Main Structure
DR=0.01; %Damping Ratio
Ms=882600;
Ks=2532070;
Ang_freq= sqrt(Ks/Ms);
freq=Ang_freq/(2*pi);
CritD=2*Ms*Ang_freq;
ActD=DR*CritD;
%Passive TMD
MR=0.02; %Mass ratio adopted=5%
Mtmd=Ms*MR;
fopt=1/(1+MR);
Si=sqrt((3*MR)/(8*(1+MR)));
Ktmd=((fopt^2)*(Ang_freq^2)*Mtmd);
Ctmd=(2*Si*fopt*Ang_freq*Mtmd);
dts=0.01;
%Passive TMD
A=[0 1 0 0;
(-((Ks+Ktmd)/Ms)) (-((Ctmd+ActD)/Ms)) (Ktmd/Ms) (Ctmd/Ms);
0 0 0 1;
(Ktmd/Mtmd) (Ctmd/Mtmd) (-(Ktmd/Mtmd)) (-(Ctmd/Mtmd))];
B=[0 0;
1/Ms 0;
0 0;
0 1/Mtmd];
C=eye(4);
D=[0 0 ;0 0 ;0 0;0 0];
%Uncontrolled system
A1=[ 0 1;
-(Ks/Ms) -(ActD/Ms)];
B1=[0 ; 1/Ms];
C1=eye(2);
D1=[ 0; 0];
System=ss(A,B,C,D);
System1=ss(A1,B1,C1,D1);
Tf=120-1/100;
[T,L]=SODF_white(Tf);
Q=eye(4)*10000;
R=0.01;
Klqr=lqr(A,B(:,1),Q,R);
sim("LQRsim.slx")
time=0:0.01:Tf;
figure(1)
plot(time,UNCL(:,1))
grid on
hold on
plot(time,LQR(:,1))
legend('Uncontrolled','With LQR')
xlabel('Time(s)')
ylabel('Displacement(m)')
AbsMaxDisUnc=max(abs(UNCL(:,1)))
AbsMaxDisLQR=max(abs(LQR(:,1)))
RMS_DisUNCL=rms(UNCL(:,1))
RMS_DisLQR=rms(LQR(:,1))

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!