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

question on computing mrpi #20

Open
lweidsab opened this issue Jul 19, 2023 · 3 comments
Open

question on computing mrpi #20

lweidsab opened this issue Jul 19, 2023 · 3 comments

Comments

@lweidsab
Copy link

Hi,

I have a 4-order linear discreted system with A, B, Q, R, when I use the function compute_mrpi_set() to solve the maximum robust invariant set, the result of Miniski addition is not convergered. I mean the alpha is becoming larger with the increasing iterative steps, while the correct alpha should become smaller. I want to know what's the reason, it is caused by the feedback maricx Ak or disturbance polyhedron W?

Your answer would be appreciated.

Yongxiang

@wtllll
Copy link

wtllll commented Jul 19, 2023 via email

@KKaiWang
Copy link
Contributor

just check if eigenvalues of A_K is strictly less than 1 and if W is bounded.

@lweidsab
Copy link
Author

lweidsab commented Aug 3, 2023

Thanks for your suggestions. I tried to use the continuous state-space function, it's converged. While when I discretize the state-space with a zero-order holder, it is not convergent. The eigenvalues of A_K is almost 1 and system is borderline stable.

clear all; clc;

% fix random seed
rng(0);

A = [0 1 0 0;
-60.723 -1.0795 -3.1167 -0.32884;
0 8 -13.59 -13.35;
0 0 8 0];

B = [0;
0.6577;
0;
0];

C = [1 0 0 0;
0 1 0 0];

D = [0;0];

sys = ss(A,B,C,D);
sysd = c2d(sys,0.01,'zoh');

Ad = sysd.A;
Bd = sysd.B;
Cd = sysd.C;
Dd = sysd.D;

Q = diag([1,1,1,1]);
R = 0.1;

w_min = 1e-3*[-0.1; -0.1; -0.1; -0.1];
w_max = -w_min;

D = normalized_inequality_constraint(w_min, w_max);
qw = length(D);
W = Polyhedron('A',D,'b',ones(qw,1));

disturbance_system = DisturbanceLinearSystem(Ad, Bd, Q, R, W);

x_min = [-0.2; -1; -1e3; -1e3];
x_max = [0.2; 1; 1e3; 1e3];

u_min = -12;
u_max = -u_min;

% constraints on state Xc and input Uc
Uc_vertex = [12; -12];
Xc =Polyhedron( 'A', [eye(4,4);(-1)*eye(4,4)], 'b',[0.0174;0.15;0.15;0.15;0.0174;0.15;0.15;0.15]);
Uc = Polyhedron(Uc_vertex);

%% State Constraints
G = normalized_inequality_constraint(x_min, x_max);
qx = length(G);
X = Polyhedron('A',G,'b',ones(qx,1));

%% Input Constraints
H = normalized_inequality_constraint(u_min, u_max);
qu = length(H);
U = Polyhedron('A',H,'b',ones(qu,1));

N_horizon = 10;
mpc = TubeModelPredictiveControl(disturbance_system, Xc, Uc, N_horizon);

just check if eigenvalues of A_K is strictly less than 1 and if W is bounded.

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

3 participants