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

MATLAB issue compilation #2

Open
brunolnetto opened this issue Mar 18, 2020 · 20 comments
Open

MATLAB issue compilation #2

brunolnetto opened this issue Mar 18, 2020 · 20 comments
Assignees

Comments

@brunolnetto
Copy link

Hi,

I try to compile the library on a MATLAB v2017a, but the default example "runme_para_im3kw" do not compile. The log on the terminal is below. If necessary, I can provide further information.

Error using getdp_numdof (line 58)
Octave:invalid-input-arg
@schoeps schoeps assigned schoeps and irynakulchytska and unassigned schoeps Mar 18, 2020
@schoeps
Copy link
Member

schoeps commented Mar 18, 2020

@irynakulchytska can you have look?

@schoeps
Copy link
Member

schoeps commented Mar 18, 2020

@brunolnetto just to be sure: you have getdp and gmsh installed? which platform are you running on?

@brunolnetto
Copy link
Author

brunolnetto commented Mar 18, 2020

Current update:

I HARDCODED the getdp path since it does not install as usual and now the log message is on Octave. On Matlab it still throws me the same error.

remove entire contents of /tmp/oct-kc5QzZ? (yes or no) yes
parareal: start 1/20 iteration
parareal: start coarse grid
resfile = /tmp/oct-GSsaLj/im_3kW.res
resfile = /tmp/oct-xf6htU/im_3kW.res
resfile = /tmp/oct-xT4xrx/im_3kW.res
resfile = /tmp/oct-Ci8gZ8/im_3kW.res
resfile = /tmp/oct-074eYc/im_3kW.res
resfile = /tmp/oct-PfICLj/im_3kW.res
resfile = /tmp/oct-591Jfg/im_3kW.res
resfile = /tmp/oct-7duRBq/im_3kW.res
resfile = /tmp/oct-i5ay7V/im_3kW.res
resfile = /tmp/oct-GBKIEP/im_3kW.res
resfile = /tmp/oct-TwdyuH/im_3kW.res
resfile = /tmp/oct-smVMmN/im_3kW.res
resfile = /tmp/oct-WhSNUn/im_3kW.res
resfile = /tmp/oct-Vz6fZl/im_3kW.res
resfile = /tmp/oct-VGx2an/im_3kW.res
resfile = /tmp/oct-8USOro/im_3kW.res
resfile = /tmp/oct-bLP5NE/im_3kW.res
resfile = /tmp/oct-x1B176/im_3kW.res
resfile = /tmp/oct-CH951P/im_3kW.res
resfile = /tmp/oct-VLfkwe/im_3kW.res
parareal: coarse grid took 104.656151s
parareal: start fine grid
parcellfun: 0/20 jobs done

@schoeps
Copy link
Member

schoeps commented Mar 18, 2020

Your latest output looks reasonable. If future problems occur it may be a good idea to disable the parallel package. It's obviously important for any speedup but it makes debugging more complicated (I can see that parcellfun is executed, so you are using parallelization).

@brunolnetto
Copy link
Author

brunolnetto commented Mar 18, 2020

It is reasonable, but does not got further. It both do not continue up this log and do not show up the simulation figures.

@schoeps
Copy link
Member

schoeps commented Mar 18, 2020

Did you try to disable the parallel toolbox?

@brunolnetto
Copy link
Author

It started the sequential time instead, which was awaited. I am waiting it finish to simulate.

warning: parareal: sequential time stepping

@brunolnetto
Copy link
Author

It would be good if a progress bar is on use. Advice: https://github.com/brunolnetto/matlab-utils/tree/master/interface

@irynakulchytska
Copy link
Collaborator

@brunolnetto, thanks for your interest in our code.

It is reasonable, but does not got further. It both do not continue up this log and do not show up the simulation figures.

Please be aware of the fact that the fine solver takes quite a lot of time due to the very fine discretization of the PWM-signal. In particular, based on my observations, the fine solution on one subinterval (out of 20) takes about one hour.

In case you are not specifically interested in the PWM-inputs you could alternatively solve the system with a sinusoidal excitation also on the fine level, i.e., assign the variable ode_f to be the same as ode_c. This would allow you to set a bigger step size in opt_f, e.g., 'TimeStep',1e-5, and shorten the simulation time by 10 times compared to the current setting.

I hope you could find this useful.
Best regards, Iryna

@brunolnetto
Copy link
Author

I am interested on it since we at University of São Paulo simulate dynamical systems with PWM signal, oftentimes without success. Almost certainly it occurs due to lack of mathematical rigor. Would you provide us some advice regarding the control of, for example, a high oscilatory LC system, when a PWM signal is on use?

@schoeps
Copy link
Member

schoeps commented Feb 5, 2023

@brunolnetto Sorry this issue was forgotten. I assume that you lost interest in the mean time hence I will close this issue. Feel free to contact me if I am wrong.

@brunolnetto
Copy link
Author

I will lost interest on questions only when I die. :-P

@schoeps
Copy link
Member

schoeps commented Feb 5, 2023

So you still want to simulate systems driven by PWM using Parareal?

@brunolnetto
Copy link
Author

brunolnetto commented Feb 5, 2023

A more interesting question is: Can we open either a bachelor or master opportunity to someone with interest on dynamic systems driven by pulse-width-modulated signals? I think Herr Adamy or Konigorski may have interest on it.

@brunolnetto
Copy link
Author

brunolnetto commented Feb 5, 2023

There are some conditions which may be of interest in case you provide some user-friendly warnings:

PWM Signal are specific enough to allow parametrization given by parameter tuple (V_-, V_+, alpha, T), such that V is a voltage with lower (-) and upper (+) values such that V_- is strictly lower than V_+, alpha is the duty cycle such that it is between 0 and 100 (or 0 and 1, although I prefer the 100-spanned inteval), and T is the period interval such that it is stricly greater than 0. Great! The parallel toolbox MUST be aware of these (such that)-conditions and provide (warning, error)-conditions to avoid confusion on library usage.

There are other conditions related to system under these PWM-input (for example, lipschtzian finity everywhere), but they are out of scope for the library itself.

@schoeps
Copy link
Member

schoeps commented Feb 5, 2023

A more interesting question is: Can we open either a bachelor or master opportunity to someone with interest on dynamic systems driven by pulse-width-modulated signals? I think Herr Adamy or Konigorski may have interest on it.

Feel free to open such a thesis (in São Paulo?). If you have contact to my colleagues Prof. Adamy or Prof. Findeisen (who is the successor of Prof. Konigorski) then please use this connection.
If you have Matlab or Octave implementations of your dynamical systems then this should be rather straightforward to use it with our Parareal code. If necessary, I can do some limited support in debugging. However, I will not supervise such a thesis. I have currently no one working on this topic in my team.

@brunolnetto
Copy link
Author

brunolnetto commented Feb 5, 2023

The main concern from user perspective is to provide both examples and a clean interface for usage. Such initiatives on thesis development must not have surprises to assure student success.

@brunolnetto
Copy link
Author

I am aware your results are assured by error decay, which assure results correctness given hypothesis. I want to present the article about barycenter procedure application on optimization

https://arxiv.org/abs/1801.10533

This may give some insights on decay for objetive function with unknown structure but its value for given point X. It has also a parallel version as you can check at page 6.

@schoeps
Copy link
Member

schoeps commented Feb 5, 2023

Thanks. I will have a look!

@brunolnetto
Copy link
Author

Ja wohl!

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