Interpolation and approximate feedback for an linear quadratic regulator (LQR) problem
    2 views (last 30 days)
  
       Show older comments
    
The problem is to perform the following numerical experiment:
Suppose i have a second order controlled dynamical system:

And the performance index is 

Next i have solved the system in MATLAB and found the state and control trajectories as follows:
clear all
close all
clc
x10=2; 
x20=-3; 
X0=[x10;x20];
A=[0 1;-2 1]; 
B=[0;1]; 
Q=[2 3;3 5]; 
R=[0.25]; 
[K,P,EV]=lqr(A,B,Q,R) 
BIN=[0;0]; 
C= [1 1];
D= [1] ;
tfinal=10;
t=0:0.05:tfinal;
[Y,X,t]=initial(A-B*K,BIN,C,D,X0,t);
x1t=[1 0]*X'; 
x2t=[0 1]*X';
ut=-K*X' ;
figure(1)
plot(t,x1t, 'k' ,t,x2t, 'k'); grid on
xlabel ( 't' )
figure(2)
plot (t ,ut , ' k ' ); grid on
xlabel ('t')
The output i.e states and control is attached.
Now the question says : "make-believe" that you know the values of feedback only on a certain grid, construct such a grid by specifying 'h', and evaluate optimal feedback at those points only, and use some quasi interpolation to build approximate feedback for entire state space  .
.
 .
.My queries are as follows:
(1) so here the gain  , as far as i understand i need to grid the states x1(t) and x2(t) by some step size 'h' on a certain interval, and then evaluate the feedback
, as far as i understand i need to grid the states x1(t) and x2(t) by some step size 'h' on a certain interval, and then evaluate the feedback   and then use those values to interpolate, am i right?
 and then use those values to interpolate, am i right?
 , as far as i understand i need to grid the states x1(t) and x2(t) by some step size 'h' on a certain interval, and then evaluate the feedback
, as far as i understand i need to grid the states x1(t) and x2(t) by some step size 'h' on a certain interval, and then evaluate the feedback   and then use those values to interpolate, am i right?
 and then use those values to interpolate, am i right?(2) If this is right then how do i grid the data (x1,x2)? and interpolate ? i haven't solved this kind of problem in the past, so any help will be appreciated.
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!