Position Measurement for Quadcopter
Master thesis
Permanent lenke
https://hdl.handle.net/11250/3023114Utgivelsesdato
2022Metadata
Vis full innførselSamlinger
Sammendrag
Denne oppgaven utforsker muligheten for å benytte ultralydsensorer til å måle og kommunisere posisjonen til et flyvende quadcopter til en ekstern server. Ultralydsensorene har tidligere blitt testet for denne spesifikke hensikten, men i upresise omgivelser. I denne oppgaven har kvaliteten og nøyaktigheten av testene blitt drastisk forbedret. Spesifikasjonene til ultralydsensorene er også sammenlignet med andre type avstandssensorer.
Å få kommunikasjonen til å fungere krevde endringer i en større kodebase for å passe til komponentene brukt i dette prosjektet. En av disse endringene var å lage og implementere koden som brukes for å operere ultralydsensorene.
Sensorens evne til å måle avstander ble testet ved å koble dem opp til en mikrokontroller. Et etui ble designet, 3D-printet og brukt for å holde utstyret på plass og samtidig gjøre det enklere å bevege sensorene rundt når de skulle testes.
En test ble gjennomført for å sjekke om sensorene kunne kommunisere og kartlegge måle avstander. En annen test utforsket sensorenes mulighet til å estimere posisjonen til et quadcopter. Denne estimeringen ble gjennomført ved bruk av tre sensorer pekende i tre forskjellige retninger i et tre-dimensjonalt rom. Et bevegelsesdeteksjons-system ble brukt for å analysere resultatene og danne et bilde av nøyaktigheten til den estimerte posisjonen.
Tiden som ble brukt for å forbedre kvaliteten av testene for ultralydsensorene var verdifull. Usikkerhetsmomentene fra den forrige rapporten ble borte og tolking av resultater ble mindre komplisert.
Å få kommunikasjonen til å fungere var utfordrende grunnet mangel på kunnskap innenfor de benyttede programmeringsspråkene. Visse argumenterbare, men nødvendige endringer ble utført for å få koden til å fungere. Resultatet ble at serveren mottok målte avstander fra mikrokontrolleren og konstruerte virtuelle kart.Resultatet fra den tre-dimensjonale testen demonstrerte at bruk av tre eller flere ultralydsensorer kan estimere posisjonen med en feilmargin på $\pm$ 2 cm. Denne feilen er stor nok til å vises i det virtuelle kartet. Ultralydsensorene har også en svakhet grunnet begrenset avstandsmåling. Hvis området som skal kartlegges er større en omtrent åtte meter i en retning, vil HC-SR04 ultralydsensoren ikke klare å måle avstanden.
En annen type sensorer kreves for å fjerne feilen i målingene og gjøre posisjonsestimeringen mulig for større avstander. Det beste alternativet ville vært å benytte en lys-basert avstandsmåler grunnet bedre målefrekvens og muligheten for å måle lengre avstander. This thesis investigates the possibility of using ultrasonic sensors to measure and communicate the position of a hovering quadcopter to an external server. The ultrasonic sensors had previously been tested for this specific intention but under imprecise conditions. For this thesis, the quality and accuracy of the testing were improved drastically. The specifications of the ultrasonic sensor were also compared with other types of distance sensors.
Getting the communication to work required altering a larger piece of software to fit the specific hardware used for this project. One such alteration was creating and implementing the software used to operate the ultrasonic sensors.
The sensor's ability to measure distance was tested by wiring them up to a microcontroller. A casing was designed, 3D-printed, and used to hold this wiring in place and make it easier to maneuver the sensors during the tests.
A test was conducted to see if the sensors could communicate and map measured distances. Another test investigated the sensor's ability to estimate the position of a quadcopter. This estimate was done using three sensors pointing in three different directions in a three-dimensional space. A motion capture system was used to analyze the results and get a picture of how accurate the estimated position provided by the sensors was.
The time spent increasing the quality of the test regarding the ultrasonic sensor was valuable. The uncertainties from the previous report were gone, and interpreting the results was uncomplicated.
Getting the communication working was challenging due to a lack of knowledge in the programming language. Specific arguable but necessary changes were made to get the code working. In the end, the server could receive measured distances from the microcontroller and create the virtual map.The results from the three-dimensional test demonstrated that by using three or more ultrasonic sensors, the position could be estimated with an error of $\pm$ 2 cm. This error is significant enough to be displayed in the virtually created map. The ultrasonic sensor is also disadvantaged due to its limited detection range. If the space to be mapped is wider than approximately eight meters in either direction, the HC-SR04 Ultrasonic Sensor will not be able to measure the needed distances.
A different type of sensor is required to eliminate the error and make a suitable positioning estimate for larger spaces. The best option would be to use a light-based distance sensor due to its faster measuring frequency and longer range.