Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the caculation of mRPI set #14

Open
XingyanMao opened this issue Apr 16, 2021 · 24 comments
Open

the caculation of mRPI set #14

XingyanMao opened this issue Apr 16, 2021 · 24 comments

Comments

@XingyanMao
Copy link

hello! I change your model to three order model,
where A = [1,0.2,-1; 0, 1, -0.2;0,0, 0.6],
B= [ 0; 0; 0.6],
Q = diag([1, 1,0.1]),
R = 0.1 ;
W_vertex = [5 5 5;5 5 -5;5 -5 5;5 -5 -5;-5 5 5;-5 5 -5;-5 -5 5;-5 -5 -5];
During the caculation of mRPI set of disturbance linear system, this setting leads to the value of alpha converges to epsilon/(epsilon + Ms) very slowly ,so the value of s is very big. Then the calculation of Fs is beyond the ability of MATLAB. Could you please give some guidance? Thank you very much.

@XingyanMao
Copy link
Author

I also try to limit "s" equal to a small value less than 10, while I worry about that the specified system structure leads to slow convergence rate of alpha, then the calculation result of mRPI set is larger than real mRPI set.

 function Fs = compute_mrpi_set(obj, epsilon)
      s = 5;
      alpha = max(obj.W.support(obj.Ak^s*(obj.W.A)')./obj.W.b);
      Fs = obj.W;
            for i =1:s-1
                Fs = Fs+obj.Ak^i*obj.W;
            end
            Fs = (1/(1-alpha))*Fs;
end

which leads to mRPI set is super big, I think this may caused by "Ak" matrix, but I don't know the exact reason.

@HiroIshida
Copy link
Owner

HiroIshida commented Apr 16, 2021

Thanks for reporting the issue.

I'm currently busy on my other project, so let me give you a quick response. And also sorry that I don't have time to see your code. In my implementation, MPI set is computed using while loop (it works fine with small dimension) but probably not successful with higher dimension.

Actually, in the book I referred, the MPI set is suggested to be computed by linear programming (LP) see p.23 of the book [2]. (the book can probably freely downloaded from https://scholar.google.com/scholar?cluster=12353944254191849328&hl=en&as_sdt=0,5 ). So I suggest using LP. If you succeed implemented this, it it quite nice if you create a Pull Request!

Also, my past presentation (pp. 9 ~ 11) may help understanding this (but this is when I was master student, so sorry for some mistake). So I attach this pdf:
seminar.pdf

@l1224655201
Copy link

hello! I change your model to three order model,
where A = [1,0.2,-1; 0, 1, -0.2;0,0, 0.6],
B= [ 0; 0; 0.6],
Q = diag([1, 1,0.1]),
R = 0.1 ;
W_vertex = [5 5 5;5 5 -5;5 -5 5;5 -5 -5;-5 5 5;-5 5 -5;-5 -5 5;-5 -5 -5];
During the caculation of mRPI set of disturbance linear system, this setting leads to the value of alpha converges to epsilon/(epsilon + Ms) very slowly ,so the value of s is very big. Then the calculation of Fs is beyond the ability of MATLAB. Could you please give some guidance? Thank you very much.

hello! I change your model to three order model,
where A = [1,0.2,-1; 0, 1, -0.2;0,0, 0.6],
B= [ 0; 0; 0.6],
Q = diag([1, 1,0.1]),
R = 0.1 ;
W_vertex = [5 5 5;5 5 -5;5 -5 5;5 -5 -5;-5 5 5;-5 5 -5;-5 -5 5;-5 -5 -5];
During the caculation of mRPI set of disturbance linear system, this setting leads to the value of alpha converges to epsilon/(epsilon + Ms) very slowly ,so the value of s is very big. Then the calculation of Fs is beyond the ability of MATLAB. Could you please give some guidance? Thank you very much.

Hello, I also met the same problem. Do you find a solution? Thank you very much.

@XingyanMao
Copy link
Author

The calculation of an accuracy mRPI is very hard. if you don't set the small bound of disturbance or enlarge a large domain of constraints, i think the only way is to set "s" equal to a small value and specify a value of alpha. While after reading the reference book and analyzing this code, you will know the pros and cons of this approach. There also have many improved tube-based mpc while i didn't try, such as using the varying set instead of S(∞).
Reference: "model predictive control theory,computation and design"
The page 231 of this book introduces the approximation of mRPI set.

@l1224655201
Copy link

The calculation of an accuracy mRPI is very hard. if you don't set the small bound of disturbance or enlarge a large domain of constraints, i think the only way is to set "s" equal to a small value and specify a value of alpha. While after reading the reference book and analyzing this code, you will know the pros and cons of this approach. There also have many improved tube-based mpc while i didn't try, such as using the varying set instead of S(∞).
Reference: "model predictive control theory,computation and design"
The page 231 of this book introduces the approximation of mRPI set.

Thank you very much for your detailed explanation. I would like to read this book carefully.

@WeichenWangbit
Copy link

l

The calculation of an accuracy mRPI is very hard. if you don't set the small bound of disturbance or enlarge a large domain of constraints, i think the only way is to set "s" equal to a small value and specify a value of alpha. While after reading the reference book and analyzing this code, you will know the pros and cons of this approach. There also have many improved tube-based mpc while i didn't try, such as using the varying set instead of S(∞).
Reference: "model predictive control theory,computation and design"
The page 231 of this book introduces the approximation of mRPI set.

Thank you very much for your detailed explanation. I would like to read this book carefully.

Hello, I also encountered a similar problem when building an example of more than two dimensions. The solution of the invariant set cannot be calculated. I wonder if you have solved the problem now, thank you very much

@XingyanMao
Copy link
Author

l

The calculation of an accuracy mRPI is very hard. if you don't set the small bound of disturbance or enlarge a large domain of constraints, i think the only way is to set "s" equal to a small value and specify a value of alpha. While after reading the reference book and analyzing this code, you will know the pros and cons of this approach. There also have many improved tube-based mpc while i didn't try, such as using the varying set instead of S(∞).
Reference: "model predictive control theory,computation and design"
The page 231 of this book introduces the approximation of mRPI set.

Thank you very much for your detailed explanation. I would like to read this book carefully.

Hello, I also encountered a similar problem when building an example of more than two dimensions. The solution of the invariant set cannot be calculated. I wonder if you have solved the problem now, thank you very much

I don't have a good idea yet. Maybe you can reconsider the value of the control gain matrix $K$, which plays an important role in tube mpc.

@WeichenWangbit
Copy link

WeichenWangbit commented Mar 5, 2022 via email

@XingyanMao
Copy link
Author

I read some opinions, and everyone thinks that the calculation of invariant sets with more than three dimensions is too large. It is said that there are many simplified invariant set calculation methods. Originally, I also thought that the multi-dimensional tube was not feasible, but I did see the application of the multi-dimensional tube algorithm in some papers. The specific method of calculating the invariant set has not been explained. I will first study how to simplify the calculation of the invariant set. At 2022-03-05 11:04:02, "XY_Mao" @.> wrote: l The calculation of an accuracy mRPI is very hard. if you don't set the small bound of disturbance or enlarge a large domain of constraints, i think the only way is to set "s" equal to a small value and specify a value of alpha. While after reading the reference book and analyzing this code, you will know the pros and cons of this approach. There also have many improved tube-based mpc while i didn't try, such as using the varying set instead of S(∞). Reference: "model predictive control theory,computation and design" The page 231 of this book introduces the approximation of mRPI set. Thank you very much for your detailed explanation. I would like to read this book carefully. Hello, I also encountered a similar problem when building an example of more than two dimensions. The solution of the invariant set cannot be calculated. I wonder if you have solved the problem now, thank you very much I don't have a good idea yet. Maybe you can reconsider the value of the control gain matrix $K$, which plays an important role in tube mpc. — Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.Message ID: @.>

I can't help with simplifying tube calculations beyond the above methods. It is nice if you could improve the algorithm. Good luck.

ps~~~~
it would be better to make the magnitude of the eigenvalues of A+BK close to zero.

@HiroIshida
Copy link
Owner

HiroIshida commented Mar 5, 2022

@WeichenWangbit
@XingyanMao

Thanks for your feedback! Sorry for I didn't follow up this issue so long. I'll make time today and try fix this issue.

Also, it could be really nice if you could open a PR to this repo!

@WeichenWangbit
Copy link

Hello, if you solve the problem, I look forward to your guidance. I will now try to solve the problem with a simplified minimal robust invariant set algorithm.

@WeichenWangbit
Copy link

WeichenWangbit commented Mar 5, 2022 via email

@HiroIshida
Copy link
Owner

Actually, I have many thing to do these days and today I don't have time to look into this problem. I'm so sorry. But I will put this to on top of my bucket list.

@XingyanMao
我不明白你最后一句是什么意思?
Are you talking about maybe "Also, it could be really nice if you could open a PR to this repo!". I just thought it would be really helpful if anyone who can fix the bug make a pull request to this repository.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request

@klix0
Copy link

klix0 commented Mar 30, 2022

Hello,

  • I have read your comments and just want to ask if you have the code for calculation of mRPI by Moritz Schulze Darup and Teichrib method. image

@wtllll
Copy link

wtllll commented Mar 30, 2022 via email

@XingyanMao
Copy link
Author

Hello,

  • I have read your comments and just want to ask if you have the code for calculation of mRPI by Moritz Schulze Darup and Teichrib method. image

Sorry, I don't have any code for this method. This method may be efficient as the calculation of polyhedron is avoided.

@klix0
Copy link

klix0 commented Apr 6, 2022

Hello, can you help me please to write the code for this method. I can pay you for it.

@XingyanMao
Copy link
Author

Hello, can you help me please to write the code for this method. I can pay you for it.

Ten thousand and without time limit.

@klix0
Copy link

klix0 commented Apr 7, 2022

Ten thousand JPY? Okay, but I need it before Sunday. I have write this code with apmonitor, but I have to use MPT3 Toolbox. Can you do it?

@klix0
Copy link

klix0 commented Apr 7, 2022

Can you give me an easier way to communicate with you? I can explain you the problems and we can see what can we do.

@XingyanMao
Copy link
Author

XingyanMao commented Apr 8, 2022 via email

@klix0
Copy link

klix0 commented Oct 11, 2022 via email

@WeichenWangbit
Copy link

WeichenWangbit commented Oct 11, 2022 via email

Repository owner deleted a comment from xuchenteng Apr 19, 2023
@lweidsab
Copy link

lweidsab commented Jul 5, 2023

I also met a similar problem in using tube mpc to a 4-order linear system, 4 states, 1 control input, and 2 outputs, does anyone can help?

Repository owner deleted a comment from wtllll Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants