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

Issue in drawing the outer approximation #16

Open
DexterTsOH opened this issue Sep 19, 2024 · 1 comment
Open

Issue in drawing the outer approximation #16

DexterTsOH opened this issue Sep 19, 2024 · 1 comment

Comments

@DexterTsOH
Copy link

Thanks for sharing the toolbox. When I use it to draw the roa of a dynamic system of 4 state variables, the program failed to draw a outer approximation ,but successed in drawing an inner approximation. Is it normal? Thanks for your help!
Vdc=200;
rf=1.1;
Lf=39.5e-3;
C=501e-6;
pff=0.496;
f=2e-3;
J=3.2e-3;
Gamma0=1.6;
Gamma=1.6;
y=Gamma-Gamma0;
omega0=15002pi/60;
Iq0=(fomega0+Gamma0)/pff;
ps=pff
Iq0omega0;
Vs0=0.5
(Vdc+sqrt(Vdc^2-4psrf));
Kpo=0.194;
Kio=0.121;

SYS4eq = [0; 0; 0; 0];
DeltaSYS4 = [20; 200; 80; 40];
SYS4= SOStab(SYS4eq, DeltaSYS4);
f1=1/Vs0-1/Vs0^2SYS4.x(2)+1/Vs0^3SYS4.x(2)^2;
f2=SYS4.x(3)+omega0;
SYS4.dynamics=[ -rf/LfSYS4.x(1)-1/LfSYS4.x(2);...
1/CSYS4.x(1)+pff/(CVs0)f1(omega0Iq0SYS4.x(2)+Vs0*(Kpof2-Iq0)SYS4.x(3)-Vs0Kiof2SYS4.x(4));...
-1/J
(pffKpo+f)SYS4.x(3)+1/JpffKio*SYS4.x(4) ;...
-SYS4.x(3)];

T=10;
epsilon =200;
d=6;

[v1,vc1,wc1]=SYS4.SoS_out(d, T, epsilon);
SYS4.plot_roa(1,2,'outer',0);
[v2,vc2,wc2]=SYS4.SoS_in(d,T,epsilon);
SYS4.plot_roa(1,2,'inner',1);
% % figure
SYS4.plot_w(1,2,'outer')
image

@droste89
Copy link
Owner

Hello, thanks for your comment.
I'll just give you the short answer for the moment, as I unfortunately can't make the calculation on my side for the moment (I'm sorry I already took some days to answer you):

  • it is "not normal" that the inner approximation is plotted and not the outer: the latter should be more accurately/more easily be calculated, so it seems strange that the only the former is plotted. Moreover, the fact that the inner region is inside the target set is also strange.
  • I think the first thing to check is the value of the w polynomial: if it is too close to 1 (constant polynomial equals to 1, ie w as a vector looks like [1, 0.00001, 0.000, ...] it means that the polynomial degree is too low and the calculation result is not relevant. Then you could try to increase the degree to 10 and rerun the calculation.
  • I see another parameter that can impact the quality of the result: the time horizon T. When it is "too long", the dynamics become more complex to compute, so you could also try to make a calculation with T=1 to see what happens. And then increase it if the results are more satisfying.

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

2 participants