• norsk
    • English
  • English 
    • norsk
    • English
  • Login
View Item 
  •   Home
  • Fakultet for informasjonsteknologi og elektroteknikk (IE)
  • Institutt for teknisk kybernetikk
  • View Item
  •   Home
  • Fakultet for informasjonsteknologi og elektroteknikk (IE)
  • Institutt for teknisk kybernetikk
  • View Item
JavaScript is disabled for your browser. Some features of this site may not work without it.

Movement Control of Real-time Embedded Robot and Server System using MATLAB-generated C-code

Isdal Kolbeinsen, Magnus
Master thesis
Thumbnail
View/Open
no.ntnu:inspera:140443607:34432778.pdf (18.64Mb)
no.ntnu:inspera:140443607:34432778.zip (6.800Mb)
URI
https://hdl.handle.net/11250/3094267
Date
2023
Metadata
Show full item record
Collections
  • Institutt for teknisk kybernetikk [3518]
Abstract
Systemet er en tohjulet robot som kommuniserer med en java server. Den tar imot posisjonskommandoer fra serveren og beveger seg mot den lokasjonen. Denne masteroppgaven er en fortsettelse

på spesialiseringsprojectet Kolbeinsen 2022. Rapporten inneholder nødvendig informasjon om

hvordan robot systemet fungerer og om den nye implementasjonen av bevegelseskontrollsystemet.

MATLAB generert kode er brukt. controller_api() er den MATLAB genererte funksjonen som

kalkulerer pådrag for hvert av de to hjulene og estimerer robotens posisjon. controller_api()

inneholder en estimator() og en regulator(). For å styre roboten mot et mål, vil den først rotere

mot målet for så å bevege seg rett. Implementasjonen av gyroskopmålinger i rotate_robot() og

PID-regulator i move_forward() er viktige deler av utvkilingen i denne rapporten. I tillegg, har

det vært satt fokus på programvarekvalitet slik at det blir enklere for nye utviklere å vedlikeholde

koden.

vControllerApiTask(), tidligere kalt vApiTask(), har blitt endret slik at den virker sammen med

java serveren. Alle variabler som hører til controller_api() har blitt initialisert og virker sammen

med denne tasken. Gyroskopmålingene har blitt kalibrert slik at de ikke drifter når man leser av,

men implementasjonen av dette er en mulig kilde for feil.

Det implementerte systemet har blitt testet. Disse testene inkluderer; innledende tester for gyroscope og system, integrasjonstester for PID-regulator og server integrasjonstester for hele systemet.

Nøyaktig posisjon har blitt logget med Opti Track Motive og test prosedyrer bestående av firkant

tester og linje tester har blitt utført.

Bidrag har blitt gitt til GitHub Organisasjonen. Sammen med de andre studentene har det blitt

utført koderengjøringsøkter, diskusjoner om navn konvensjoner og utvikling av en wiki. Videre, har

den nye matlab-robot-koden blitt lastet opp som et eget repository i organisasjonen. Det inneholder

en README-fil for å sette opp matlab-roboten, den modifiserte robot-applikasjonskoden i c og

MATLAB-filer utviklet i dette prosjektet.

Roboten klarer nå å bevege seg i en rett linje. Den kan også motta flere kommandoer på rad

med god presisjon. Dette er grunnet ny implementasjon av en PID-regulator for å kjøre rett frem,

og gyroskopmålinger til estimator ved rotasjon. Siden roboten ikke har noen måte å rette opp

posisjonsestimatet hvis den begynner å drifte, vil den over tid miste oversikten over hvor den er.

Dette er spesielt tilfellet hvis roboten tar en sti til målet bestående av mange kurver eller sklir på

hjulene.
 
The system is a two wheeled robot that communicates with a java server. It takes set point

commands from the server and travels to the given location. This master thesis was a continuation

project from the specialization project Kolbeinsen 2022. The master thesis contains necessary

information about how the robot system works and about the implementation of a new movement

control system.

MATLAB was used to generate C code. controller_api() is the MATLAB generated function that

calculates the input for each wheel robot and estimates the position of the robot. controller_api()

is a function that contains an estimator() and regulator(). To control the robot towards a setpoint

it, the robot will first rotate towards the target and then move straight. Two core additions to the

system are the implementation of gyroscope readings to the rotate_robot() function and a PID

regulator in the move_forward() function of the regulator(). Additionally, a focus has been put

on software quality to make it easier to understand and maintain in the future.

vControllerApiTask(), previously called vApiTask(), has been modified such that it works with

the java server. All the variables required to run the new MATLAB generated code have been

initialized and works together with this task. The gyroscope readings have been calibrated such

that it does not drift, but this calibration implementation stands as a possible source of error.

The implemented system have been tested during development. These tests includes; initial tests

for gyroscope and system, integration tests for PID controller and server integration tests for the

whole system. Ground truth pose was captured with Opti Track Motive and test procedures such

as line tests and square tests were conducted.

Contributions have been made to the Github Organization. Collaborative work includes code

cleaning sessions and discussions about name conventions and the development of a documentation

wiki. Moreover, the newly developed matlab-robot-code has been uploaded as its own repository

to the organization. It contains a README for setting up the MATLAB robot, relevant reports,

robot-application C code and MATLAB files developed in this project.

The robot are now able to move in a straight line and can be sent several commands in succession

with good accuracy. This is due to the implementation of a PID controller for moving straight and

gyroscope measurements for feedback while rotating. However, because the robot has no aiding

measurement, it will over time lose track of where it is. This is especially the case if the robot

moves in a path involving several curves or slips on the wheels.
 
Publisher
NTNU

Contact Us | Send Feedback

Privacy policy
DSpace software copyright © 2002-2019  DuraSpace

Service from  Unit
 

 

Browse

ArchiveCommunities & CollectionsBy Issue DateAuthorsTitlesSubjectsDocument TypesJournalsThis CollectionBy Issue DateAuthorsTitlesSubjectsDocument TypesJournals

My Account

Login

Statistics

View Usage Statistics

Contact Us | Send Feedback

Privacy policy
DSpace software copyright © 2002-2019  DuraSpace

Service from  Unit