RyuYamamoto / PreviewControl

0 stars 0 forks source link

Questions about LQR #12

Open chang-liang opened 7 years ago

chang-liang commented 7 years ago

Hello! I have questions about the LQR you used in the codes. And I really appreciated if you could answer them.

In the “Init_PreviewControl_Paramter.m” file, there are

    %Error System
    ZERO=[0;0;0];
    phi=[1 -C_d*A_d;ZERO A_d];
    G=[-C_d*B_d;B_d];
    GR=[1;ZERO];

Q1. What kind of Error System were you trying to build? And what is the definition of the Error here or what does this Error mean?

In the end of this file “Init_PreviewControl_Paramter.m”, there are:

K=-(H+G'*P*G)^(-1)*G'*P*phi;
xi = (eye(4,4)-G*(H+G'*P*G)^(-1)*G'*P)*phi;

Q2. So my questions are why the K is calculated like this and what the equation of “xi” comes from.

In file “calc_preview_control.m”, there are

for ttt = tt : sample_time : (tt + pc_time) ;
          j = j + 1;
          if (foot_p_x(count+j) - foot_p_x(count+j-1)) ~= 0 
          f  = -(H+G'*P*G)^(-1)*G'*(xi')^(j-1)*P*GR;         %ZMP feedforward term
             dux = dux + f * (foot_p_x(count+j) - foot_p_x(count+j-1));  
            end
    end

Q3. So my questions here are what the equation of “f” here comes from, and did you refer to any book or paper that could be introduced to me?

RyuYamamoto commented 7 years ago

I'm sorry I'm late for the reply.

This system is preview control considering the error system of ZMP. I refer to this paper.

Here, Error is error between the reference ZMP and output ZMP.

The correspondence of variables is in accordance with the above reference paper.

RyuYamamoto commented 7 years ago

Sorry for my poor English... :'(

chang-liang commented 7 years ago

No worries... Your English is good. Thank you very much, Mr. Ryu Yamamoto!