Beruflich Dokumente
Kultur Dokumente
Lecture 6
Slide 1
SAMME, RMIT
AUTO-1029
Lecture 6
Slide 2
Lecture 7: INTRODUCTION INTO OPTIMAL CONTROL LINEAR QUADRATIC REGULATOR (LQR) LQR Control of 2-DOF Systems using SIMULINK (diagram method)
SAMME, RMIT
AUTO-1029
Lecture 6
Slide 3
ANNOUNCEMENT: A-2 Assignment is due on Friday, 21-Sept-2012, 18:00 Groups (with up to 4 Members) Registration of your Groups is due today!
Lecturer: Prof P.M.Trivailo c 2012 SAMME, RMIT
AUTO-1029
Lecture 6
Slide 4
SAMME, RMIT
AUTO-1029
Lecture 6
Slide 5
HINTS: LQR Let us inspect a cost function J for a linearised nDOF system with state vector x = [q q ]T
COST:
J=
0
(xT Qx + uT Ru + 2xT N u) dt
Firstly, let us determine the dimensions of the matrices in the cost function matrix expression: for n-DOF:
Lecturer: Prof P.M.Trivailo c 2012
AUTO-1029
Lecture 6
Slide 6
These matrices will be used in the lqr(SYS,Q,R,N) or lqr(A,B,Q,R,...) MATLAB commands. Note, that in these commands, there are peculiar requirements to the matrices, for example: the [R] matrix must be symmetric positive denite with as many columns as [B ]. Also, [Q N;N R] must be positive denite (you can use EIG to check positivity).
SAMME, RMIT
AUTO-1029
Lecture 6
Slide 7
Let us then distinquish a special case (we will call it Case-V ), for which [ k ] n n [ 0 ] n n ; [Q ] = [ 0 ] n n [ 0 ] n n
[R] [0]nn;
[N ] = [0]2nn;
Please observe that for this case the cost is approximately equal to the doubled POTENTIAL ENERGY of the system V : J 2q T [k ]q = 2V
Lecturer: Prof P.M.Trivailo c 2012 SAMME, RMIT
AUTO-1029
Lecture 6
Slide 8
Therefore,
strategy, where the main consideration is given to the minimisation of the potential energy of the system. Similarly, let us distinquish a case (we will call it Case-T ), for which [0]nn [0]nn ; [Q ] = [ 0 ] n n [ m ] n n
Lecturer: Prof P.M.Trivailo c 2012
[R] [0]nn;
[N ] = [0]2nn;
SAMME, RMIT
AUTO-1029
Lecture 6
Slide 9
Prove that for this case the cost is approximately equal to the doubled system T : J 2q T [m]q = 2T Therefore, Case-T will correspond to the control KINETIC ENERGY of the
strategy, where the main consideration is given to the minimisation of the kinetic energy of the system.
Lecturer: Prof P.M.Trivailo c 2012 SAMME, RMIT
AUTO-1029
Lecture 6
Slide 10
Combining two previous cases, we can introduce case (we will call it
[ k ] n n [ 0 ] n n ; [Q ] = [ 0 ] n n [ m ] n n
[R] [0]nn;
[N ] = [0]2nn;
Please observe that for this case the cost is approximately equal to the doubled of the system E = V + T : J 2 q T [k ]q + 2 q T [m]q = 2V + 2T = 2E
Lecturer: Prof P.M.Trivailo c 2012 SAMME, RMIT
TOTAL ENERGY
AUTO-1029
Lecture 6
Slide 11
control strategy, where the main consideration is given to the minimisation of the total energy of the system. We can also introduce some other control strtategies, including minimisation of the control eorts (Case-u) : [Q] [0]2n2n; [R] = [diag (1)]nn; [N ] = [0]2nn OR a mixture of the abovementioned Cases.
Lecturer: Prof P.M.Trivailo c 2012 SAMME, RMIT
AUTO-1029
Lecture 6
Slide 12
All of these control strategies can be easily implemented in MATLAB and/or SIMULINK. You may employ the following steps:
AUTO-1029
Lecture 6
Slide 13
Based on the requirements to your system, introduce matrices [Q], [R] and [N ], as discussed before on Slides 5-11.
Lecturer: Prof P.M.Trivailo c 2012 SAMME, RMIT
AUTO-1029
Lecture 6
Slide 14
Calculate the optimal control gain matrix K using the MATLAB command >> [K,S,e] = lqr(SYS,Q,R,N) In the Project, we do not need to use calculated matrices [S ] and [e]. However, the matrix [K ] will be very important. The values in this matrix, gains, will be used to calculate the optimal control feedback as u = Kx.
Lecturer: Prof P.M.Trivailo c 2012 SAMME, RMIT
AUTO-1029
Lecture 6
Slide 15
SAMME, RMIT
AUTO-1029
Lecture 6
Slide 16
Parameters:
ADDED DAMPING:
AUTO-1029
Lecture 6
Slide 17
0.5 Q [N]
0.5
5 time [s]
10
15
SAMME, RMIT
AUTO-1029
Lecture 6
Slide 18
SAMME, RMIT
AUTO-1029
Lecture 6
Slide 19
SAMME, RMIT
AUTO-1029
Lecture 6
Slide 20
Q1 Q2
5
3
10
15
x 10
5 0 5 0 5 10 15
q [m]
5 time [s]
10
15
SAMME, RMIT
AUTO-1029
Lecture 6
Slide 21
SAMME, RMIT
AUTO-1029
Lecture 6
Slide 22
NO CONTROL 15 10 5 0 5
x 10
LQR CONTROL
10
15
x 10 15 10 q2 [m] 5 0 5 0
5 time [s]
10
15
SAMME, RMIT
AUTO-1029
Lecture 6
Slide 23
INSPECT MATLAB FILE My detailed MATLAB/SIMULINK example le is provided. In order to re-produce simulation you can run one single le twoDOFprojectALL.m: >> twoDOFprojectALL
Note that the SIMULINK model twoDOFprojectLQR.md (shown on Slide 18) is run from inside MATLAB using the following command: >> sim(twoDOFprojectLQR);
Lecturer: Prof P.M.Trivailo c 2012 SAMME, RMIT