Pattern Recognition Neural Network Input and Target Data Preparation

조회 수: 2 (최근 30일)
Christos Skoufis
Christos Skoufis 2021년 1월 31일
답변: Avadhoot 2024년 5월 16일
Hello, and thank you for reading my question.
My situation:
I have a differential drive mobile robot system in Simulink. The system gets fed X and Y coordinates and outputs the X and Y coordinates of the robots trajectory to match the X and Y input coordinates. I basically have an X and Y input, and get X and Y output by varying the robot's angular and linear velocity (ω and u respectively).
To get a better understanding here is the simulink system.
Problem:
My goal is to train a neural network to replace the kinematics and dynamics model of the robot. I save the input and output coordinates but when i try to input everything into the Pattern Recognition diaolog it will happily accept my input data but not my target coordinates.
The data are saved in 2X10001 matrices for each X, Y, Xout, Yout. My method of processing the data is first to inverse the matrices which results in four 10001X2 matrices. After that due to the sample time being the same for each matrix, I remove the time column for every set leaving me with a 10001X1 matrix for X,Y, Xout, Yout.
Finally, I combine the X and Y matrices and the Xout Yout matrices which results in two 10001X2 matrices. One containing X and Y and the other Xout and Yout.
What is wrong with my data processing method? Do I need to train two different networks (one with X and X out and one with Y and Yout)?
Edit: Is my methodology correct? The angular and linear velocities play a role in the movement of the robot but I cannot think of how to include them.
(The sample time and the simulation time are set to 0.01 and 1000 respectively)
Thank you in advance.

답변 (1개)

Avadhoot
Avadhoot 2024년 5월 16일
From your question I gather that you have data for the X and Y co-ordinates of your robot. Your methodology seems to be correct. However, there are a few suggestions for you to implement in this particular case. Please try to implement the below suggestions and let me know how it goes.
  1. Consider the linear and angular velocities in the dataset, as they too are responsible for calculating the output co-ordinates for the robot, especially if you are modelling the kinematics system. It would be better to have a 4x10001 matrix containing X,Y,ω and u as inputs.
  2. Training two different networks might not be suitable for your case as motion on X axis and Y axis are interdependent in the case of a robot. So, separating them might not be a good idea.
  3. You need to use a regression output in this case as this is a regression problem to predict the output co-ordinates.
  4. Use appropriate network architecture for the model which contains 2 units in the output layer for predicting Xout and Yout respectively. Try to experiment with the number of layers and number of neurons in each layer to achieve optimal results. Usually this case won't require a too complex network architecture.
I hope this helps.

카테고리

Help CenterFile Exchange에서 Sequence and Numeric Feature Data Workflows에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by