yassinekebbati / GA-optimized-MLP-based-LPV_MPC

This is the implementation of the work done in "Optimized self-adaptive PID speed control for autonomous vehicles" paper.
MIT License
11 stars 1 forks source link

Asking for help #1

Open Neil4466 opened 10 months ago

Neil4466 commented 10 months ago

When I tried to launch the script "MAIN_LPV_MPC.m", I got the following bug:

Dot indexing is not supported for variables of this type.

Error in SeriesNetwork/predict (line 263) Y = this.UnderlyingDAGNetwork.predict(X, varargin{:});

Error in pred (line 12) pr = net.predict(Zx');

Error in MAIN_LPV_MPC (line 149) V = pred([XX(4,1); XX(5,1);UU(2,1);UU(1,1);Wz(1)] , xmean, xstdev, ymean,ystdev, mod); %use this when using : best_net/test_net

Can you please tell me which version of MATLAB you are using? Actualy, I don't know why this error occured. Can you help me? Thank you!

Neil4466 commented 10 months ago

My MATLAB version is R2020a.

yassinekebbati commented 10 months ago

Hello!If your MATLAB version is at least 2018a or more recent tgen it is okay.Check if you have the deep learning toolbox installed!?I will have a look at the error and let you know.RegardsOn Jan 12, 2024 5:39 AM, Neil4466 @.***> wrote: My MATLAB version is R2020a.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

Neil4466 commented 10 months ago

Thank you for reply! I have installed the deep learning toolbox before I launched the script.

yassinekebbati commented 10 months ago

After looking at the issue, it seems this is due to the Matlab version, it is related to the use of batch normalization in neural network. I do not face this issue on my machine although the version I tested on is 2022b. you can omit the neural network predictions by commenting lines :145 and 148 to 151 and replacing lines :146 and 147. (see screenshot below) to see if the rest of the code works MATLAB_Nea37QjXKi

Neil4466 commented 10 months ago

Thank you for your time! I have commented the code you mentioned, and the rest of the code actually works. Your advice helps me a lot.

yassinekebbati commented 9 months ago

Happy to help, for the neural network part a more recent version fo Matlab should work fine.