| ... | @@ -65,13 +65,12 @@ In this experiment we combine the above two experiments in an attempt to increas |
... | @@ -65,13 +65,12 @@ In this experiment we combine the above two experiments in an attempt to increas |
|
|
|
|
|
|
|
Finally, we made it balance for a whole 17 seconds! In this case, we used the balance-bar, the light setting shown in image 1 above, and the following PID constants:
|
|
Finally, we made it balance for a whole 17 seconds! In this case, we used the balance-bar, the light setting shown in image 1 above, and the following PID constants:
|
|
|
|
|
|
|
|
**Power = 40**
|
|
````java
|
|
|
|
|
Power = 40
|
|
|
**Integral = 20**
|
|
Integral = 20
|
|
|
|
|
Differential = 40
|
|
|
**Differential = 40**
|
|
Scale = 18
|
|
|
|
|
````
|
|
|
**Scale = 18**
|
|
|
|
|
|
|
|
|
|
**This performance can be seen in this video: [Self-balancing robot with light sensor - Balance Bar + Optimized PID Constants](http://1drv.ms/1EFRebE)**
|
|
**This performance can be seen in this video: [Self-balancing robot with light sensor - Balance Bar + Optimized PID Constants](http://1drv.ms/1EFRebE)**
|
|
|
|
|
|
| ... | @@ -111,17 +110,16 @@ Instead of calibrating the robot on start, we tried to specify the offset manual |
... | @@ -111,17 +110,16 @@ Instead of calibrating the robot on start, we tried to specify the offset manual |
|
|
|
|
|
|
|
Through the same kind of trial-and-error as in the first section, we tried to optimize the configuration of the robot's PID control system constants. It's worth noting, that the GUI we created in the previous section made it a lot faster to try out different configurations. It was a bit easier to find the balance point because the robot's NXT brick was horizontal instead of vertical. This also meant that the balance point was lower and thus less subject to change, however it was still a great challenge to make it balance. Once the robot starts tilting towards one side it accelerates out of control. We've spent a lot of time trying to optimize our PID constants. However, this was an issue we could not solve entirely. Conclusively, the robot can only keep its balance for a few seconds, which was also the case with the light sensor.
|
|
Through the same kind of trial-and-error as in the first section, we tried to optimize the configuration of the robot's PID control system constants. It's worth noting, that the GUI we created in the previous section made it a lot faster to try out different configurations. It was a bit easier to find the balance point because the robot's NXT brick was horizontal instead of vertical. This also meant that the balance point was lower and thus less subject to change, however it was still a great challenge to make it balance. Once the robot starts tilting towards one side it accelerates out of control. We've spent a lot of time trying to optimize our PID constants. However, this was an issue we could not solve entirely. Conclusively, the robot can only keep its balance for a few seconds, which was also the case with the light sensor.
|
|
|
|
|
|
|
|
**The best performance we obtained with the color sensor can be seen in this video: [NXT Segway with Color Sensor]()**
|
|
**The best performance we obtained with the color sensor can be seen in this video: [NXT Segway with Color Sensor](http://1drv.ms/19UHzq5)**
|
|
|
|
|
|
|
|
The PID constants were as follows:
|
|
The PID constants were as follows:
|
|
|
|
|
|
|
|
**Power = 100**
|
|
````java
|
|
|
|
|
Power = 100
|
|
|
**Integral = 20**
|
|
Integral = 20
|
|
|
|
|
Differential = 80
|
|
|
**Differential = 80**
|
|
Scale = 18
|
|
|
|
|
````
|
|
|
**Scale = 18**
|
|
|
|
|
|
|
|
|
|
The offset is very circumstantial and is pointless to provide.
|
|
The offset is very circumstantial and is pointless to provide.
|
|
|
|
|
|
| ... | @@ -152,7 +150,7 @@ We use [these building instructions](http://robotsquare.com/2012/02/12/tutorial- |
... | @@ -152,7 +150,7 @@ We use [these building instructions](http://robotsquare.com/2012/02/12/tutorial- |
|
|
|
|
|
|
|
### Findings
|
|
### Findings
|
|
|
|
|
|
|
|
We had a lot of trouble implementing the PID using the Gyro Sensor. We only achieved a few seconds of balance time, as seen in this video: [PID Short Balance]().
|
|
We had a lot of trouble implementing the PID using the Gyro Sensor. We only achieved a few seconds of balance time, as seen in this video: [PID Short Balance](http://1drv.ms/1Ce0l54).
|
|
|
|
|
|
|
|
After hours of trial-and-error with our own PID we decided to explore alternatives. We tried to replicate the control system used in the HTWay [9]. The full source code can be seen here: [SegwayGyro.java](https://www.dropbox.com/s/allwymb30bd4vl1/SegwayGyro.java?dl=0).
|
|
After hours of trial-and-error with our own PID we decided to explore alternatives. We tried to replicate the control system used in the HTWay [9]. The full source code can be seen here: [SegwayGyro.java](https://www.dropbox.com/s/allwymb30bd4vl1/SegwayGyro.java?dl=0).
|
|
|
|
|
|
| ... | | ... | |