Forum Replies Created
What a fantastic response. You can alway tell someone that really loves what they do. you are a credit to your interest
I am only delaying my response as I want to digest all that you have said and come back with a worthy response (or not if I finally get it)
once again meeting people like you in hyper space is a real pleasure
In the spreadsheet the GPS heading is in column I
AimPoint is in column O
the error for the PID is either I-o or O-I can not remember I minus will make a turn one way and a + will make a turn the other way
The error will generate a turnspeed as recorded in column U.
This is then apportioned (added and subtracted ) to the left and right wheel speeds ie with a constant forward speed of 550.
the robot drives and then we calculate the error in cross track ie the CTE. This value is not currently feedback as we only use the aimpoint gps error.
Shortly we are going to implement a separate PID to be totally comtrolled by the CTE.
Eventually we may use both PID’s cross track and pure persuit, At the moment we are still learning and a combo could be one step to far
looking at your site in detail.
The data in the output grapg the data is the gps heading only.
The data in the input graph is turnSpeed.
In our program is is the error between the aim point on the desired track – the gps heading is generating the turnSpeed and not the gps by itself.
In section select a setp. You have selected what we call the pivot this is when the robot to two 90 degree turns with a short 20 inch straight section to move to the next lane.
We are more interested in the longer straight tracks between the pivots, These trcks are about 60 ft long and we want the robot to not wonder off the straight line in between. Currently we can control the robot to be +-5cm from the desired line. We want to see if we can reduce this cross track error CTE even further. Ie that the robot drives even straighter.
In section 3 I have not clue as to which model to select. I normally use Brett Beauregards PID library and we tune for Kp Ki Kd
I am not sure about the other form of the PID equation that uses a general gain and Time constants approach.
currently the gps is updating at 5hz. So the microprocessor loop time is also 5 hz. If you want me to record the mission data I can do this at 5hz or anything lower like 1 hz
Really appreciate your assistance. Please continue to have patience with me as I am new to all this. I want to continue as I want to learn as much about this as possible
OK The purpose of this robo is to drive a predetermined course. The coirse consists of parallel tracks separated by the width of the robot. The spreadsheet that I enclosed was based on a autonomously operated robot mission driven by a microprocessor. The steering is controlled by a pure persuit PID. The input to the PID is GPS-Aim point heading (or other way round I can not remember) and the output is as you said turnSpeed. The turnspeed is then approtioned to the left and right wheels, If the error between the GPS and AIM point is 0 then turnspeed is 0 and the robot drives straight at the constant forward speed of 550. if the error is plus or minus and is non zero the robot will turn to the left or right as turnSpeed will be also non 0.
The robot is supposed to drive between 2 way points marked as A and B in the drawings. This is the desired track. We measure the cross track error and is is the distance the robot is off the desired track. Currently the cross track error (CTE) is not used in a PID to further reduce the error and to get the robot to better follow the desired track.
I am trying to think of a way to give you useful data manually. Currently the only way to drive between the 2 wp is in auto mode with the microprocessor generating the turn commands.In manual mode the desired track is virtual. I do have a manual mode it is when the robot is controlled by an rc transmitter. In this mode I can drive the robot in any direction and I can make any turn I like. However in this mode we are not generating the aim pint so I can not determine the error (aimpoint -gps heading)
I could lay down some string and manually drive along the string and make manual turns off the desired track and see what is obtained. So help would be needed to further define what is required
I also could set up a long line mission and then in manual drive the robot off the desired track by a fixed amount and then switch to auto so the the robot will try to get back onto the line. I would try point the robot 5 degre then 10 the 20 degrees from where I think the ain point would be,
I am happy to run any experiment that you think will work.
I also do not have a clue regarding what model to choose?
To date I have been using the following gains
D5 is the look ahead distance
purePursuitD5 = 2.0
purePursuitKp = 0.75
purePursuitKi = 0.025
purePursuitKd = 0
I can also provide our excel file of the data we record
Many thanks for your reply. I am looking forward to getting my data into your tuner as I am sure I will then get a better understanding of the whole system. Currently I do have quite a few gaps in my control theory knowledge
I am enclosing a data file that we record from each robot mission.
I am also enclosing 2 drawing to explain what we are attempting to do with the pure pursuit PID We first start with 2 waypoints. The robot calculates the heading to a point on the straight line between the 2 way points at is a fixed distance from the robot. As the robot moves the aim point is continuously recalculated.
We then calculate a heading to this aimpoint and from the RTK dual antenna gps we determing an accurate heading of the robot. The difference in the angle between the aimpoint and the gps heading (error) is fed into the PID controller on an Arduino Due.
The output of the controller is a turnSpeed. This turnSpeed is then added to a constant forwardSpeed of 550 to formulate a left and right wheel speed. So if both L and R wheel speeds are 550 the robot drives straight. As the turnspeed increases in one direction so does the differential between the 2 wheels speeds. The wheelspeeds are fed to the Roboteq MDC2230 motor controller with a number from -1000 to +1000 and this generates a voltage to the wheel motors. The application of the differential voltage caused the robot to drive forward and if required drive in a direction to reduce the error between the Aimpoint and GPS to ZERO
So the input to the controller is the difference between aimpoint and gps heading The output of the PID controller is a turnSpeed which is modified to by 2 wheelspeeds.
These wheelspeeds then cause the robot to drive in some direction until the whole system is updated
The loop time for the PID is 5 Hz. We print the data for the excel every second however we can increase that to 5 Hz as well
If you can use the info I have provided to help me select the correct data for your tuning model I would be very grateful.
Also not sure how to do a step impulse for this system. A little clarity on this will also be appreciated.