marvin:lab2
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
marvin:lab2 [2008/09/19 09:56] – rieper | marvin:lab2 [2008/10/09 20:50] – rieper | ||
---|---|---|---|
Line 1: | Line 1: | ||
=====LAB2===== | =====LAB2===== | ||
- | ====Delopgave1==== | + | **Date:** September 12th 2008\\ |
+ | **Duration of activity:** 9-13\\ | ||
+ | **Participants: | ||
+ | |||
+ | **Formål: | ||
+ | |||
+ | |||
+ | ====Afstandsmåling med ultralydssensoren==== | ||
{{: | {{: | ||
{{: | {{: | ||
- | compile and download | + | Programmet |
- | Download gav ingen problemer, vores modul genkendt som Marwin :-) Med hjælp fra Gustav (praktikant fra 9.klasse) får vi hurtigt monteret transduceren. | + | Test af funktionen |
- | + | ||
- | The method getDistance returns 255 if there is no echo, hence no object, and otherwise a number less than 255 which is the distance in cm. Try to use the sensor with an object at a distance of up to 254 cm, can the sensor measure such a distance and under what conditions is it possible ? | + | |
- | + | ||
- | Test af funktionen getDistanceTest() og ultrasonic sensoren: | + | |
Line 24: | Line 27: | ||
| 240 | 255 (Max ca. 230) | | | 240 | 255 (Max ca. 230) | | ||
- | Betingelserne er, at hvis der skal måles 230cm, skal der være frit udsyn i en ca. 30 graders vinkel (slag på tasken). | + | Betingelserne er, at hvis der skal måles 230cm, skal der være frit udsyn i en ca. 30 graders vinkel (slag på tasken). |
- | + | ||
- | ====Delopgave 2==== | + | |
- | The test program was compiled and uploaded with leJOS NXJ version alfa_03 as indicated in the comment to the program. Because of a known limitation of alfa_03 there is a 300 msec sample interval between readings of the distance. This limitation is no longer in the README list so try different values of the sample interval e.g. very small values. | + | |
- | What is the time limit for the measurement - remember the speed of sound is 340.29 m/sec ? Does this limit usage of the sensor ? | + | |
- | + | ||
- | Med 20ms sampling kan lyden nå at bevæge sig 6,8m inkl. ekko, hvilket vil sige 3,4m effektivt. Der er ikke taget højde for forsinkelse gennem A/D konverter I2C kommunikation. Blot konstateres, | + | |
- | + | ||
- | ====Delopgave 3==== | + | |
- | Describe the behaviour of the car controlled by the program and try to change the different constants of the program. | + | |
- | Marwin kører med en hastighed proportionel med afstanden | + | ====Test af sample-tidsgrænsen==== |
+ | Det oplyses, at der pga en begrænsning er et 300ms sample-interval mellem aflæsning af afstanden. | ||
- | The power to the car motors is the controlled variable and the distance is the measured variable. What kind of control is it ? | + | Med 20ms sampling kan lyden nå at bevæge sig 6,8m inkl. ekko, hvilket vil sige 3,4m effektivt. Der er ikke taget højde for forsinkelse gennem A/D konverter I2C kommunikation. Blot konstateres, |
- | P controller, Proportional Gain i feedback loop. Her er fasemarginen afhængig af gainet, hvilket vil kunne afhjælpes med Lead/Lag controllere (PID) | + | ====Implementering af Wallfollower==== |
+ | Marwin kører med en hastighed proportionel med afstanden til en fastsat grænse, dvs den bremser gradvist ned efterhånden som den nærmer sig sin grænseværdi. Når gain-variablen øges, øges accelerationen/ | ||
marvin/lab2.txt · Last modified: 2008/10/09 21:16 by rieper