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

Different result for Autotuning example #5

Open
ZYY0844 opened this issue Aug 4, 2021 · 3 comments
Open

Different result for Autotuning example #5

ZYY0844 opened this issue Aug 4, 2021 · 3 comments

Comments

@ZYY0844
Copy link

ZYY0844 commented Aug 4, 2021

Hi,

When I try autotuning.ipynb, I got the result like

which is different from the result in the example at Out[41].

I tried to change the initial state to a non-zero vector to achieve a similar response

May I ask why the example doesn't output the same result?

@baggepinnen
Copy link
Member

baggepinnen commented Aug 4, 2021

I guess there can be any number of things that have changed in the years since that example was run. My guess would be that the diff eq solver behaves slightly differently or somthing, causing convergence to a different point.

Note that to make the example more practical, it would require some robustness constraint and control signal penalty as well. Some of this is done in the notebook
https://github.com/JuliaControl/ControlExamples.jl/blob/master/gain_scheduling.ipynb

@amburosesekar
Copy link

To solve similar problem in MATLAB, we use "rng default"
its similar to seed based random number generator. My guess if you use similar command in Julia and apply optimization gives always same result. thank you

@baggepinnen
Copy link
Member

Setting the random seed is good for reproducibility in general, but I don't think that's the problem here, there is nothing random in this example. The difference is probably because some library has changed slightly over the years.

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