I am researching a method to determine the optimal PID gains for a line follower robot. The problem is, I don't know how to setup the performance index IAE and ISE in the matlab. Any tips on how to do it?
My current progress are as follows:
- I have a copy of simulink based PID control of line follower mobile robot
- I have some optimization algorithms in mind (I can use it to compute for optimal PID gains)
Edit: Attached here is the picture of the simulink (credits to mobile robotics training for Matlab). Basically, the error here is computed using the subtract block from reference (2900) to measured (anything from 2850 to 2950 - measured by the sensor). Now my problem is on how to record the IAE and ISE before it reaches the end point of line follower.