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

solve_question #18

Open
412222 opened this issue Nov 30, 2024 · 6 comments
Open

solve_question #18

412222 opened this issue Nov 30, 2024 · 6 comments

Comments

@412222
Copy link

412222 commented Nov 30, 2024

"I have a question: what impact will the coefficients of my state equations have on this program? Based on my attempts, when I multiply the term 𝑓(𝑥)˙for 𝑥1 by a large coefficient, the problem becomes unsolvable, even though this coefficient is reasonable and I can plot the phase trajectory using a phase diagram. Does this issue have any relation to the simulation time 𝑇?"

@412222
Copy link
Author

412222 commented Nov 30, 2024

"Could the issue be related to this piece of code? These two different weight terms represent the system's sensitivity to time or the current state. For certain systems, the time dependence might be more significant, which could cause an issue when using the solver. As the coefficients grow, 𝑓(𝑥)˙ might increase, leading to an inability to solve the system properly."

con = [con, sos(-(max(1, 1/T) * jacobian(v,s) + max(1,T) * jacobian(v,z) * f) - hs - l * q2)];

@412222
Copy link
Author

412222 commented Dec 1, 2024

image
"The code for plotting 𝑉(𝑋) seems to be incorrect. Should it be corrected to match the plot shown below?"
image
@droste89

@412222
Copy link
Author

412222 commented Dec 1, 2024

Thank you very much for your toolbox. I have verified the effective solution of the attraction region in the example, but it may not solve high-degree polynomial problems because it cannot optimize multiple variables simultaneously. This is a step in solving the attraction domain in a paper. What is the difference between solving these two cases? The solution steps you use — I don't quite understand why time 𝑇 is included, and how the range around the equilibrium point is established. Why is ℎ included?
image
image
image

@droste89
Copy link
Owner

droste89 commented Dec 4, 2024

Hello, thanks for your questions ! I'll try to answer them one by one (and sorry for the time taken to reply):

  1. There can be numerical instabilities when the order of magnitude of the dynamics is greater than 1. Basically, as we are looking into polynomials of possibly high degree, it is preferable to have everything not so far from the interval $[0,1]$. So it does not seem so strange to me that the behaviour of the toolbox changes drastically when we distort the problem in one direction (however, I would say that it should not be the case if you multiplied all the terms of $f$ by the same amount).
  2. Hence, we try to solve the sensitivity to high numbers by normalizing everything inside some square $[-1,1]^n$. The toolbox does manage the normalization of variables, but as you pointed out it does not manage the normalization of the dynamics. On the constraint we are pointing out, the idea is that we have normalize the time variable $s=t/T$ (to also have it in the range $[0,1]$. So we need to compensate it in the dynamics (which is what is done here). And as you say, that may create too large coefficients inside the constraint and lead the solver to struggle to solve the problem. Ideally, the best thing to do would be to find a way to also normalize the dynamics, which is not done for the moment. Many thanks for your remark, because it was only by writing this reply that I realized the importance of that issue. NB: the $max(...)$ is meant to handle both cases $T>1$ and $T<1$
  3. Yes, the code is indeed not right. Thanks for finding that!

@droste89
Copy link
Owner

droste89 commented Dec 4, 2024

  1. I'm not sure what is the article you are citing, so I hope it won't make my answer irrelevant (it makes me realize that I don't see any reference to the paper we wrote about the toolbox, which we can find here in case you haven't read it). In short terms, in the literature, there are two types of "attraction region", the one in "finite time" and the one in "infinite time" (for the latter, the time notion is usually omitted, which can lead do confusions between the notions). As I understand, the paper you are citing is about the "infinite time" region, which means $T$ is no longer needed. This is for cases when the speed at which the system moves to its equilibrium point is not critical. Usually, the target set is then the equilibrium point only. And you just want to know what is the "stable" region around that point.
    On the other hand, the toolbox handles the case of a system for which you have critical time threshold : you want to get in some safe region, defined here as a range around the equilibrium, in a given time $T$. As you have only a limited time to get there, you need to define a target which is not only the equilibrium point.

I hope this answers your question, don't hesitate to ask for precision if needed!

@412222
Copy link
Author

412222 commented Dec 19, 2024

Thank you very much for your response. You are a great contributor to open source, and I truly appreciate your work. I am currently studying the analysis of attraction regions in the infinite time domain, but my knowledge in this area is not yet sufficient. Thank you for your explanation.

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