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

Not able to replicate the solution #1

Closed
Sangeethbala opened this issue Jan 13, 2019 · 5 comments
Closed

Not able to replicate the solution #1

Sangeethbala opened this issue Jan 13, 2019 · 5 comments
Assignees

Comments

@Sangeethbala
Copy link

Sangeethbala commented Jan 13, 2019

It does not converge during the iteration, so I have put maximum iteration limit as 100.
I have modified your code for the problem example as given in the IEEE paper,example 2, and then it worked. However, I am not able to replicate the solutions exactly as given by the author in the IEEE paper (problem Example 2). Have you tried this problem using your code?.I have got outputs as attached below. But as you can see, the maximum values are limited to .32. Do you know what I could do to not restrict the maximum values of the output?. blue is the controleed output and red is the reference
Also shouldn't we iterate over until the desired output converges with plant output (i mean a loop below time step loop)?.

Note: i am not normalizing as I donot know the inputs beforehand, as its real time.
untitled

@ArkaJU ArkaJU self-assigned this Jan 14, 2019
@ArkaJU
Copy link
Owner

ArkaJU commented Jan 14, 2019

No, I haven't tried that problem. But I remember encountering issues like these when the reference was varying at a reasonably high rate (like in your case). I had tried solving the issue but things didn't quite work out. Anyways, I'll approach the problem with a fresh perspective and will let you know if I find something new. Cheers :)

@Sangeethbala
Copy link
Author

Sangeethbala commented Jan 14, 2019

untitled
Thanks for your reply. I tried with couple other problems. I see that this is very sensitive to the initial input.
In the normalization part, would you know how I can normalize the inputs when the data is not available already?. I think you are normalizing the state outputs, control inputs (from the already existing data) and feeding its mean as and when real time data comes.
I have the plant output equation, excitation signal and reference signal equations. So in the already existing data, should I take the running average of the reference signal equation (or plant output equation?) for my case as the mean of state data set output (in your case)?.
The above plot is an issue I am facing now. Would you know why this is?

@ArkaJU
Copy link
Owner

ArkaJU commented Jan 15, 2019

I don't think normalizing using a running average will solve the issue since the normalized variable might diverge from the beginning itself(since the running average will tend towards the true mean later on, but is expected to be far away from it in early stages). You can try though. Regarding your output, I don't know the reason. I guess the model needs to be improved for a varying reference. Feel free to open a pull request if you manage to improve the code.

@Sangeethbala
Copy link
Author

I tried layer normalisation, now the problem as seen in the previous plot (divergence at the end of time step) is solved. So the output seems to be controlled. However, the output plot is just above the desired as shown below.
Anyways, I think i will try some other methods or try types of RNNs like encoder decoder etc. Thanks for your code and will get back to you if some improvement is seen.
image

@ArkaJU ArkaJU closed this as completed Jun 22, 2019
@hanswzq
Copy link

hanswzq commented Jul 7, 2022

The code is very inspiring! I have also modified your code for the problem example 2 in the IEEE paper, however, I have a disappointing result as is shown in the figure below. I just modified
Plant_output = [0.4*math.sin(math.cos(x[:1]+1.5*x[1:]))] and
Desired_output = [0.06*math.sin(math.pi*t/80+math.pi/4)+0.3]
and the size of W and W_star to be (1,2) , and I also try to add some hidden neurons , it doesn't work as well. Is anywhere else that needs to be modified? Thank you very much.

image

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