VolumetricDisplayResearch
AMajorQualifyingProjectReport
SubmittedtotheFacultyof
WorcesterPolytechnicInstitute
Inpartialfulfillmentoftherequirementsforthe
DegreeofBachelorofScience
By:
AndrewSantos
OliverSimon
Advisor:
ProfessorR.JamesDuckworth
April26,2017
1
AbstractThegoalofthisprojectwastoresearchanddevelopavolumetricdisplaysystemthatallowsathree-
dimensionalCADfiletobedisplayedinrealspace.ThesystemusedaXilinxZynqSoCtoprocessaCAD
modelintoaseriesoftwo-dimensionalimagestobeprojectedontoaspinninghelicoidsurfaceusing
DLPtechnology.TheSoCcontainedacombinationofcustomlogiconFPGAfabricaswellassoftwareon
anembeddedprocessortoimplementtheuniquesystemfunctionality.
2
ExecutiveSummaryThree-dimensionaldisplaytechnologyisagrowingmarket,withapplicationsrangingfromthe
movieindustryandgaming,toengineeringdesign,medicine,andadvertising.Currently,many
technologiesarebasedontwo-dimensionalscreensandareusedwithspeciallensesorglassestocreate
three-dimensionalillusions,andthereisalackoftruethree-dimensionaldisplays.Thedevelopmentof
volumetricdisplaytechnologiesisanopportunitytofillthisgap.
Thisprojectresearchedanddevelopedavolumetricdisplaysystemthatcandisplaya3DCAD
modelinrealspace.Anembeddedend-to-endsolutionwasdesigned,howeverthefinalsystem
implementedperformedthemainprocessingonaPCinsteadofbeingembedded.Initialresearch
providedthenecessarybackgroundonvolumetricdisplaymethodsandtechniques,andtheprojectwas
basedonthemethodofprojectingontoaspinninghelicoidsurfacetocreateathree-dimensionalimage.
Thisisachievedbyprojectingthetwo-dimensionalintersectionsofa3Dmodelandhelicoidontothe
helicoidatthesamepositionofintersection.Asthesurfacespins,eachintersectioncorrespondingwith
thehelicoidpositionwillbeprojected,andathighspeeds,createsathree-dimensionalimage.A
simulationwasdevelopedinMATLABtoverifytheconceptandshowedsuccessfulresults.
Thesystemprocessesa.STLCADfileandgeneratestwo-dimensionalslicesthatareprojected
ontoaspinninghelicoidsurface.AnAvnetZedBoardwasusedasthemaindevelopmentplatform,which
featuresaXilinxZynq-7020System-on-Chip(SoC)withadual-coreARMCortexA9processorandXilinx
Artix-7FPGAfabric.TheutilizationofaSystem-on-Chip(SoC)providedanidealplatformtodevelopthe
customlogicandsoftwarerequiredforsuchasystem.Inaddition,aTexasInstrumentsLightCrafter
developmentboardwasusedtoprovidetheDLPtechnologycapableofmeetingtheframerate
requirementsofthesystem.
Thedesignedembeddedsystemcanbebrokenupintofourmainparts:theProgrammableLogic
(PL),ProcessingSystem(PS),projectionsystem,andmechanicalhardware.ThePLsystemwasdesigned
usingacombinationofcustomlogicandXilinxIPblockstocreatethememoryinterfaceandslice
processormodulesthatimplementthecoredataprocessingfunctionality,aswellastheencoder
calibrationmodulethatsynchronizesthemotorwiththeprojectedframes.Theprocessingsystemis
comprisedofmultiplefunctionallayers.ThelowestlayerrunningonthedualcoreARMprocessorofthe
ZynqisaLinuxoperatingsystemdesignedbyXilinxcalledPetaLinux.Petalinuxwaschosenforits
versatilityandinteroperabilitywiththeFPGAfabricandhardwaredesignsthereon.Theoperating
systemlayersupportstheembeddedsoftwarecreatedforBRAMaccess,voxelizationprocessing,and
imagegenerationfromrawslicedata.Finally,themechanicalsystemconsistsoftherotational
3
hardware,theframe,andtherotaryencoder.TherotationalhardwareisdrivenbyaDCmotorthatcan
spinthehardwareataratefastenoughforasmoothprojection.Thishardwareincludesthehelical
projectionsurface,theencoderwheel,andthesteelshaftonwhichtheaforementionedpiecesare
mounted.Theencoderwheelhastwosetsofholesarrangedintwocirculartracks,atrackwithhome
positionsandageneralencodertrack.Usedintandem,thesetwosetsofholesarenecessarytotrack
theabsoluterotationalpositionofthemotor.Theencodercircuitryconsistsofphototransistorsand
infraredLEDsthatdetectwhenanewpositionhasbeenpassedduetoIRlightbeingsensedthroughthe
holesoftheencoderwheel.Theframewasconstructedofsteelchannel,withmountsforthemotor,
encodercircuitryhousing,andprojector.
Thedatapathofthedesignedembeddedsystembeginswithvoxelizationintheprocessing
system.Thisistheprocessofconvertingthe.STLmeshmodelintoagraphicalrepresentationin3D
spaceonathree-dimensionalgrid(x,y,z).ThisdataiswrittenintomemorytobeaccessedbythePL.
Fromthere,thePLsystemisenabledandthememoryinterfacereadsthevoxeldata,whichisthenfed
intothesliceprocessormodule.Thesliceprocessormodulecalculatesthetwo-dimensionalintersection
betweentheobjecttobedisplayedandeachhelixrotation,andtheslicedataiswrittenbackintoBRAM
bythememoryinterfacetobeaccessedinthePS.AnembeddedbitmapgenerationprograminthePS
thenreadstheslicedataandgenerates.bmpfilestobesenttotheLightCrafter.Onceallsliceimages
havebeengenerated,theLightCrafterisconfiguredinthePS,theencodermoduleisenabled,andthe
motorisswitchedon.Whentheencodermoduledetectsthehomeposition,theprojectioninitiates.The
LightCrafterutilizesaninputtrigger,displayingeachconsecutiveframeonlyonceitscorresponding
positionisdetectedbytheencodermodule,thusallowingasynchronizedsystemthatdisplaysathree-
dimensionalimage.
Theimplementedsystemsuccessfullycreatedavolumetricdisplaysystemthatconvertsa3D
CADfileintoathree-dimensionalimage,howeveraspectsoftheprocessingmoduleswereleftoff-board
duetotimingconstraintsandthescopeoftheproject.Inthedesignedsystem,thevoxelization,slicing,
andLightCrafterconfigurationwouldbeembeddedintheZynqSoC,howeverthisfunctionalitywaskept
onaPCusingMATLABforthevoxelizationandslicing,andaGUIprovidedbyTexasInstrumentsforthe
LightCrafterconfiguration.Thegoalssetforthemechanicalsystem,slicingalgorithm,voxelization
algorithm,projection,andmotorsynchronizationwereallindividuallymettocreatefunctional
componentsofavolumetricdisplay.TheZynqSoChasbeenproventobethebestplatformforthe
implementationoftheprojectduetoitsversatilityandperformance.Futureworkmightinclude
embeddingthevoxelizationalgorithmintothesystem,moreaccuratehandlingandconsiderationof
4
projectiondistortion,aswellasimprovingtheconnectivitybetweenandtheeventuallytheunification
oftheZynqSoCandDLPhardware.Thiswouldresultinatrueend-to-endsystem.
5
TableofContents
CHAPTER1:INTRODUCTION................................................................................................................9
CHAPTER2:BACKGROUND.................................................................................................................102.1VOLUMETRICDISPLAYCONCEPTS.............................................................................................................10
2.1.1SweptHelixApproach................................................................................................................102.1.2ModelProcessing......................................................................................................................11
2.2MOTORTECHNOLOGY...........................................................................................................................152.3PROJECTIONTECHNOLOGY.....................................................................................................................162.4HARDWAREPLATFORMOVERVIEW..........................................................................................................17
2.4.1ZedBoard...................................................................................................................................172.4.2LightCrafterEVM.......................................................................................................................20
CHAPTER3:ALGORITHMDEVELOPMENT&SYSTEMSIMULATION......................................................233.1DATAPROCESSINGFLOW.......................................................................................................................233.2VOXELIZATIONALGORITHM....................................................................................................................233.3SLICINGALGORITHM..............................................................................................................................253.4SYSTEMSIMULATION.............................................................................................................................26
CHAPTER4:SYSTEMDESIGN&IMPLEMENTATION.............................................................................294.1EMBEDDEDSYSTEMDESIGN...................................................................................................................294.2PROJECTION.........................................................................................................................................294.3PROCESSINGSYSTEM.............................................................................................................................31
4.3.1PetaLinux...................................................................................................................................324.3.2VoxelizationandPS-PLInterface...............................................................................................324.3.3LightCrafterAPI.........................................................................................................................334.3.4BitmapGeneration....................................................................................................................33
4.4PROGRAMMINGLOGIC...........................................................................................................................354.4.1Memory.....................................................................................................................................364.4.2SliceProcessor...........................................................................................................................364.4.3EncoderModule.........................................................................................................................394.4.4PSInterfaceandPLSystemIntegration.....................................................................................40
4.5MECHANICALSYSTEM............................................................................................................................434.6FINALSYSTEMIMPLEMENTATION.............................................................................................................47
CHAPTER5:SYSTEMTESTING&RESULTS...........................................................................................495.1PROCESSINGSYSTEM.............................................................................................................................49
5.1.1PetaLinux...................................................................................................................................495.1.2LightCrafterAPI.........................................................................................................................495.1.3BitmapGeneration....................................................................................................................49
5.2PROGRAMMABLELOGIC.........................................................................................................................505.2.1BRAMread/write.......................................................................................................................505.2.2SliceProcessor...........................................................................................................................525.2.3EncoderModule.........................................................................................................................58
5.3MECHANICALSYSTEM............................................................................................................................58
6
5.4FULLSYSTEMTESTS...............................................................................................................................59
CHAPTER6:CONCLUSION...................................................................................................................626.1FUTUREWORK......................................................................................................................................63
REFERENCES.......................................................................................................................................64
APPENDICES.......................................................................................................................................66APPENDIXA:MATLABSIMULATIONCODE.....................................................................................................66APPENDIXB:LIGHTCRAFTERAPICODE..........................................................................................................66APPENDIXC:BITMAPGENERATIONCODE.......................................................................................................66APPENDIXD:SLICEMODULETESTCODE........................................................................................................66APPENDIXE:SLICEPROCESSORCODE.............................................................................................................66APPENDIXF:ENCODERMODULECODE..........................................................................................................66APPENDIXG:FULLPLSYSTEMCODE..............................................................................................................66APPENDIXH:WIRECOLORGUIDE.................................................................................................................66
7
ListofFiguresFIGURE2-1-CUBEINTERSECTIONSWITHHELICOID[2]...........................................................................................................11FIGURE2-2-CUBEEXPRESSEDASVERTICES,EDGES,FACES[6].................................................................................................12FIGURE2-3-DOLPHINTRIANGLEMESH...............................................................................................................................12FIGURE2-4-STANFORDBUNNY3DMODEL.........................................................................................................................13FIGURE2-5-HELICOIDVOXELREPRESENTATION...................................................................................................................14FIGURE2-6-STANFORDBUNNYHELICOIDINTERSECTIONSLICES..............................................................................................14FIGURE2-7–ZEDBOARD..................................................................................................................................................18FIGURE2-8-ZYNQPLATFORMOVERVIEW............................................................................................................................19FIGURE2-9–ZEDBOARDPLATFORMOVERVIEW...................................................................................................................20FIGURE2-10-LIGHTCRAFTER............................................................................................................................................21FIGURE2-11–LIGHTCRAFTERDIAGRAM.............................................................................................................................22FIGURE3-1-DATAPROCESSING.........................................................................................................................................23FIGURE3-2-CARMESHMODEL........................................................................................................................................24FIGURE3-3-VOXELIZEDCARMODEL(UNMODIFIEDSCRIPT)....................................................................................................24FIGURE3-4-VOXELIZEDCARMODEL(MODIFIEDSCRIPT)........................................................................................................25FIGURE3-5-(A)20X20X20CARVOXELMODEL(B)20X20X20HELIXVOXELMODEL(C)20X20CARSLICE.......................................26FIGURE3-6-ROTATEDHELIXMODELS.................................................................................................................................26FIGURE3-7-3DINTERSECTIONS.........................................................................................................................................27FIGURE3-8-2DINTERSECTIONS.........................................................................................................................................27FIGURE3-9-(A)VOXELIZEDCARMODEL,(B)COMBINEDHELIXSLICERESULT................................................................................28FIGURE4-1-SYSTEMDESIGN............................................................................................................................................29FIGURE4-2-LIGHTCRAFTERGUI.......................................................................................................................................30FIGURE4-3-CONICALHELIX..............................................................................................................................................31FIGURE4-4-PSBLOCKDIAGRAM......................................................................................................................................32FIGURE4-5-CONVERSIONEXAMPLE...................................................................................................................................34FIGURE4-6-BITMAPSTRUCTURE.......................................................................................................................................35FIGURE4-7-PROGRAMMABLELOGICSYSTEM......................................................................................................................35FIGURE4-8-SLICEPROCESSOR..........................................................................................................................................37FIGURE4-9-READMODULEDESIGN..................................................................................................................................38FIGURE4-10-SLICEPROCESSORWRITEMODULE.................................................................................................................39FIGURE4-11-ZYNQ7PROCESSINGSYSTEMGUI...................................................................................................................41FIGURE4-12-PLSYSTEMBLOCKDIAGRAM.........................................................................................................................42FIGURE4-13-MECHANICALSYSTEMPHOTOGRAPH...............................................................................................................43FIGURE4-14-ENCODERWHEEL........................................................................................................................................44FIGURE4-15-ENCODERCIRCUITRY....................................................................................................................................45FIGURE4-16A-MOTORMOUNT.......................................................................................................................................46FIGURE4-16B-PROJECTORMOUNT...................................................................................................................................46FIGURE4-17–EMBEDDEDDESIGNMODIFICATIONS..............................................................................................................47FIGURE4-18-FINALSYSTEMIMPLEMENTATION....................................................................................................................47FIGURE5-1-MEMORYINITIALIZATIONTESTBENCHRESULTS...................................................................................................50FIGURE5-2-4000-BITDATAINITIALIZATIONTESTBENCHRESULTS..........................................................................................51FIGURE5-3A-TESTBENCHRESULTS.....................................................................................................................................51FIGURE5-3B-TESTBENCHRESULTS.....................................................................................................................................52FIGURE5-4-3DOBJECT(LEFT)ANDINTERSECTINGSURFACE(RIGHT).........................................................................................52FIGURE5-5-TESTBENCHRESULTS.......................................................................................................................................53FIGURE5-6-SLICETESTMODULEBLOCKDIAGRAM.................................................................................................................54FIGURE5-7-HARDWAREIMPLEMENTATIONRESULT..............................................................................................................54
8
FIGURE5-8-BLANK20X20X0GRID....................................................................................................................................55FIGURE5-9-(A)MATLABSLICERESULTS(B)HARDWAREIMPLEMENTATIONRESULTS..................................................................55FIGURE5-10-PLSLICESIMULATIONRESULTS......................................................................................................................56FIGURE5-11-PLSLICEPROCESSORSIMULATION..................................................................................................................57FIGURE5-12-ENCODERMODULETESTRESULTS...................................................................................................................58FIGURE5-13A-ENCODERDETAILVIEW...............................................................................................................................59FIGURE5-13B-HOMEPOSITIONDETAILVIEW.....................................................................................................................59FIGURE5-14-VOXELIZATIONRESULTS................................................................................................................................59FIGURE5-15-SLICINGRESULTS.........................................................................................................................................60FIGURE5-16-VOLUMETRICDISPLAYRESULT........................................................................................................................61
9
Chapter1:Introduction
Athree-dimensionaldisplayallowsausertoperceiveathree-dimensionalimage.Asopposedto
atwo-dimensionaldisplay,athree-dimensionaldisplayallowsfortheperceptionofdepth.Theevolution
ofthree-dimensionaldisplayscomprisesanarrayofdifferenttechnologiesandapplications.From
moviesandgamingconsolestomechanicaldesignandhumananatomy,themarketforsuchdisplays
continuestogrow.Three-dimensionaldisplaytechnologiescanbesplitupintothreemaincategories:
stereoscopic,autostereoscopic,andautomultiscopicdisplays.Outofthesethree,automultiscopic
displaysaretheonlysystemsthatcandisplaymultipleanglesofanimageatonce[1].
Stereoscopicdisplayscreateanillusionofdepthusingequipmentsuchasspecialglasses,
commonlyusedinthemovieindustry.Autostereoscopicdisplaysontheotherhanddisplaythree-
dimensionalimageswithouttheneedforspecialgearorlenses,suchaswhatisfoundontheNintendo
3DS.Automultiscopicdisplays,however,areabletodisplaymultipleanglesatonce,allowingaviewerto
movearoundandviewanimageatdifferentangles[1].
Volumetricdisplaysareanexampleofanautomultiscopicsystem,displayinganimagewithina
three-dimensionalvolume.Thisallowsmultipleviewerstomovearoundandseeathreedimensional
imagesimultaneouslyatdifferentangleswithouttheneedforspecialvisualeffectsorlenses[1].The
termvolumetricimpliesthattheimageisdisplayedinthreedimensions,asopposedtousingaflat
screenorusingparallaxorholographictechniques.Onetypeofvolumetricdisplayinparticularutilizes
projectingontoasweptvolumetocreateathreedimensionalimage[2].
Thepurposeofthisprojectwastoresearchanddesignafunctional,self-contained
automultiscopicvolumetricdisplaysystemcapableofdisplayinga3DCADfileinrealspace.Theproject
wasbasedonthevolumetricdisplaymethodofprojectingontoaspinning,swepthelixtocreateathree-
dimensionalimage.Thedesignconsistedofamechanicalhardwaresystem,projectionsystem,
programmablelogic,andprocessingsoftwarethatallworkedtogethertodisplayathree-dimensional
objectinrealspace.
Thisreportwilldetailthestepstakenduringthedesignandcreationofavolumetricdisplay
system,startingwithresearchconductedintovolumetricdisplayconceptsanddesignmethods.The
technologyrequiredforsuchsystemisexploredandimmediatelyfollowingarethestepstakentodesign
andimplementeachsectionofthesystem.Thestepstakentotesteachareaofthesystemandresults
obtainedfromthetestingareexplorednext.Lastly,theoverallresultsoftheresearchandfinalized
designandimplementation,includingconclusionsdrawnfromtheproject,arediscussed.
10
Chapter2:Background
Thischapterpresentsinformationfrombackgroundresearchconductedonrelevanttopicsfor
creatingthevolumetricdisplaysystem.Thisincludedgaininganunderstandingofvolumetricdisplay
conceptsandthetechnologyrequiredtodevelopsuchasystem.
2.1VolumetricDisplayConcepts
AccordingtoBarryG.Blundell,volumetricdisplays“enablethedepictionofthree-dimensional
(3D)imageswithinatransparentvolume(imagespace).”)[3]Hisresearchstatedthatavolumetric
displayhasthreesubsystems:imagespaceformation,voxelgeneration,andvoxelactivation[3].
Imagespaceformationisthesystemormethodusedtoimplementthephysicalimagespace.
Voxelgenerationisthetechniqueusedtoproduceavisiblegraphicalunittodescribeapointinthree
dimensionalspace.Itisparalleltowhatapixelisfor2Dimages.Asopposedtovoxelgeneration,voxel
activationisthetechniqueusedtoproducethe3Dimageinspace.Blundellalsodefinestwoimportant
variablesinavolumetricdisplay:voxelactivationcapacity,andfillfactor[3].Thesevariablesgivea
metricthatdefinestheeffectivenessofavolumetricdisplayimplementation.
Voxelactivationcapacityisdefinedasthe‘totalnumberofvoxelsactivatedduringarefreshperiod’:
(1)
Pisthenumberofvoxelsthatcanbeactivatedsimultaneously,Tisthetimeittakestogenerateavoxel,
andfistheimagerefreshfrequency.
Fillfactoristhe‘percentageofavailablevoxelsitesthatcanbeactivatedduringanimagerefreshperiod:
(2)
Naistheactivationcapacity,Nlisthenumberofpossiblevoxellocations.
2.1.1SweptHelixApproach
Theprojectfocusedontheswepthelixapproachtocreatingavolumetricdisplaysystem,based
onresearchbyY.Jian,J.Feng,andS.Chun-lin[4]andMichelDavid[2].Theresearchdiscussesthekey
conceptsofaswepthelixvolumetricdisplayandapproachestothedesign.
David’sworkstatesthatavolumetricdisplaycanbecreatedbyprojectingaseriesof2D
intersectionsofamodelontoahelicoidsurfacerotatingatafastrateinordertocreatethevolumetric
11
displayphenomenon.AnexampleofacubeisshownbelowinFigure2-1.Thecoloredlinesbelowthe
helicoidrepresentsthe2Dimagesbeingprojected.
Figure2-1-CubeintersectionswithHelicoid[2]
Inordertoachieveavolumetricimage,theprojectionsurface(helicoid)needstobespinningat
aminimumof15rotationspersecondtoprovideaclear,stableimage.Theresolutionoftheimageis
dependentupontheframerateoftheprojection.Thequalityoftheresolutioncanbedescribedusing
theangleofretrieveddata,orthenumberofframesprojectedperrotation.Forexample,a36-degree
resolutionwouldmean10images/rotationat15rotations/secor150images/sec.A36-degree
resolutionwouldrequireaprojectorwithaframerateof150Hz.
Aswepthelixismoreadvantageousforavolumetricdisplaythanaplaneasitenlargesthe
imagespaceandimprovesthedeadzone[4].Adeadzoneisanareawherethereisalackofvoxels.Itis
affectedbycharacteristicssuchastheimagespaceshapeandsize.Jianandco.foundthatahelixmore
adequatelyutilizesspaceandminimizesthedeadzoneoveraplanarshape.
2.1.2ModelProcessing
Theconversionfroma3Dmeshmodelintoavolumetricimageinvolvesaseriesofprocessing
steps,namelyvoxelizationandslicing.
3DMeshModels
3Dobjectscanbeconstructedandrepresentedincomputeraideddesigntoolsusingpolygon
meshes.Thesemeshesareacollectionofvertices,edges,andfacesthatareusedtodefineathree-
dimensionalobjectinacomputermodel[5].BelowinFigure2-2isanexampleofacuberepresentedin
theseparameters:
12
Figure2-2-Cubeexpressedasvertices,edges,faces[6]
Theuseofpolygonmeshesisvastincomputergraphics,aseachobjectcanbeexpressedusing
themathematicalparametersmentionedforcomputermodellingapplications.BelowinFigure2-3isan
exampleofadolphinrepresentedusingtrianglemeshes:
Figure2-3-DolphinTriangleMesh[6]
Meshmodelsmayconsistoftriangles,quadrilaterals,orotherconvexpolygonstomodelan
object.Anumberofdifferentfileformatscurrentlyexistthatusepolygonmeshmodelingtostore3D
objectdata.Thisincludes.3ds,.obj,.stl,andmanyothers.Thesefileformatsconsistofdifferent
structures,butessentiallystorethesametypeofdata(vertices,faces,edges)[5].Themathematical
representationofthree-dimensionalobjectsincomputermodellingmakesitpossibleformanipulation
andconversionintothenecessarydatarepresentationforavolumetricdisplay.
13
Voxelization
AccordingtoapaperfromNanjingUniversity[7],asignificantstepinconvertingameshmodel
intothe2Dslicesisvoxelization.Thisconceptisdiscussedandpresentedasfarbackas1996inapaper
byMarkJones[8]wherehedescribesvoxelizationas“thetermgiventotheprocessofconvertingdata
fromonesourcetypeintoathreedimensionalvolumeofdatavalues.”Thisinvolvesconvertingthe3D
meshmodelintographicaldatawithx,y,andzvariables.ThepaperfromNanjingUniversitypresents
thisconceptusingtheStanfordBunny[9]asanexample,asseeninFigure2-4:
Figure2-4-StanfordBunny3Dmodel[7]
Theprocessinvolvestakingthe3Dmodel(Figure2-4a),andmappingittothe3Dspaceitwillbe
projectedonto(Figure2-4b).Themappingisintheformofx,y,andzvariables(voxels).Intheexample
given,thevoxelsaresetasabinarypattern,with1indicatingtheobjectand0indicatingtheabsenceof
theobject.Figure2-4cshowsthesame3Dmodelrepresentedinvoxelsinsteadofthemesh.
Thevoxelizationofameshmodelisessentiallyanapproximation,convertingthegeometric
representationofthemodelintoasetofvoxelsofdesiredresolution.ThisisdiscussedinapaperbyS.
PatilandB.Ravi[10]whichdiscussesdifferentmethodstoimplementthevoxelizationprocess,and
presentsanalgorithmforvoxelization.Themethodusedinthedevelopmentoftheiralgorithmisthe
‘ray-stabbing’method.Thismethodcreatesa‘boundingbox’,orthree-dimensionalgridaroundthe
meshmodel(Figure2-4b),andcalculatestheintersectionsbetweenaraythattraversesalongthex-axis,
withthenormalvectorsofthetriangularmeshfacetsofthemodel.Theraytraversesthroughthex-axis
alongthey-axisateachz-axislayertogenerateathree-dimensionalbinaryapproximationofthemesh
model,thusachievingvoxelization.
14
Thesizeandresolutionforaswept-helixvolumetricdisplayisdeterminedbythesizeofthe
projectionsurfaceandtheresolutionoftheprojector.Belowishowtheprojectionsurfacecanbeseen
tomatchthevoxelmappingabove.ThisisdisplayedinFigure2-5:
Figure2-5-HelicoidVoxelRepresentation[7]
Slicing
Convertingthevolumedatainto2Dslicesisthendonebycalculatingtheintersectionsofthe
volumedatawiththehelicoidateachpositionasitrotates.BelowinFigure2-6isanexampleofthe
intersectionslices:
Figure2-6-StanfordBunnyHelicoidIntersectionSlices[7]
Thethreedimensionalintersectionmustbecalculatedandthenconvertedintoatwo-
dimensionalslicetobeprojected.
15
2.2MotorTechnology
Onevitalpieceinmanysystemswithradialmotionisthemotor.Therearemanykindsof
motors,eachwithitsadvantagesanddisadvantages.Althoughoftenrelated,differentkindsofmotors
aresuitedfordifferentapplications.Therearenumerouscategoriesofsmallelectricmotorsthatare
poweredbyadirectcurrentpowersource.TheseincludeDCmotors,servomotors,andsteppermotors.
Aptlynamed,aDCmotorrunswhendrivenbyadirectcurrentvoltagesource.Therateatwhich
themotorspinsiscorrelatedtothemotor’sinputvoltage.Thesemotorsareoftennotdirectlydriven
usingchangingvoltagelevels,however.Athighfrequencies,theaveragevoltageofapulsewidth
modulatedsignalactsindistinguishablyfromaconstantsourceatthesamevoltage.BecauseaPWM
(PulseWidthModulation)signalisoftentimeseasiertogeneratethanadifferentialconstantvoltage
source,DCmotorsareoftentimesdrivenusingPWM.
TherearetwoprimarytypesofDCmotors.ThesearethebrushedDCmotorandbrushlessDC
motor.BrushedDCmotorsutilizeaphysicalelectronicconnection—calledabrush—betweenthe
voltagesourceandcoilsonthemotor’sshafttocontrolwhichcoilsarepositivelychargedandwhich
coilsarenegativelycharged,effectingfurtherrotationoftheshaft.BrushedDCmotorsareverysimple
mechanicallyandareeasyandinexpensivetoproduce.Theircontinueduse,however,causesthebrush
towearoutovertimeandthemotorwilllosealargeamountofenergyasheat.
AbrushlessDCmotor,asthenamemightimply,doesnothavethisconnectionbetweenthe
statorandtheshaft.InsteadoftheshafthavingmountedcoilssuchasthoseonabrushedDCmotor,a
brushlessDCmotorhasapermanentmagnetmountedtotheshaftwhilethecoilsaremountedtothe
stator.Hall-effect(magneticfield)sensorsareusedtodetecttherotationofthepermanentmagnetand
appropriatelychargethecorrectcoilstopositive,negative,orground.BrushlessDCmotorsrequire
internalcircuitrytodrivethecoilvoltages,makingthemmoreexpensiveandcomplicatedtoproduce
thanabrushedDCmotor.Thelackofmechanicalcontact,however,allowsforalongerlifeandgreater
powerefficiencyinrotation,whichinturnallowsbrushlessDCmotorstorotatefasteratagivenvoltage
thanabrushedDCmotor.Thesemotorsareoftenusedinapplicationssuchasaviationduetotheir
powertoweightratio[11].
Thesecondkindofmotor,theservomotor,isoftenfoundinsystemsthatrequireahighdegree
ofrotationalprecisionsuchasroboticsandmanufacturingequipment.Aservomotoroperatesbytaking
inaPWMsignalandusingthedutycycletorotatetoaspecificangle.Thisisaccomplishedbyusinga
standardDCmotorthatisconnectedtoaradialencoder.TheoutputoftheencoderisfedintoaPID
(Proportional-Integral-Derivative)controllerinordertoensurerotationalaccuracyofthesystem.Servos
16
areoftenlimitedtoaconfinedrotationalrange,howevertherearealsoservosthatdonotcontainthese
limitationsandcanrotatefreely[12].
Steppermotors,likeservos,areoftenfoundinhighprecisionapplicationssuchas
manufacturingandrobotics.Thesemotorsareoftenmeanttobeusedinhigh-torque,low-speed
applications.Asteppermotorhasadiscretenumberofstepsperrevolutionandwillalwaysrotatetothe
nextbeforecontinuing.Thisallowsforcontrolaspreciseasthenumberofstepsinthemotor.Thereare
numerouskindsofsteppermotorsthataredriveninvariousways,howeverthecoreconceptofdriving
eachisthesame:chargingthecorrectcoilsinsidethemotortothecorrectvoltagesinordertorotate
theshaft[13].
2.3ProjectionTechnology
Mostmoderndayconsumerlevelprojectionsystemsuseoneofthreeprimarytechnologies:
DLP(DigitalLightProcessing),LCD(LiquidCrystalDisplay),andlaserscanners.Therearealsonumerous
hybridsbetweenthesetechnologies,suchasLCoS(LiquidCrystalonSilicon)andlaser-drivenLCDand
DLPprojectors.Eachofthesetechnologieshasareasandapplicationswhereitexcelsaswellas
drawbacks.
TexasInstrumentscreatedDLPtechnologyinthelate1980’s.ThetechnologyusesaDMD
(DigitalMicromirrorDevice)toreflectlightthroughasystemofopticallensestoprojectanimage[14].
EachmirrorontheDMDrepresentsoneormorepixelsintheendprojection.Themirrorsmodulate
rapidlybetweenreflectinglightthroughtheopticalsystemandreflectinglightontoaheatsink.This
modulationproducesvariousintensitiesoflightateachmirror,allowingforcomplexgradientsorrapid
binarypatterns.DLPtechnologyisusedinmanyareasfromconsumerandcinemaprojectionsystemsto
manufacturingandrapidprototypingequipment.MultibitcolorprojectionusingDLPisachievedby
rapidlyswitchingbetweenanumberofcoloredlightsourceswhilstsimultaneouslyswitchingtheDMD
torepresentthecorrectcolorintensities[15].ManyDLPprojectorsusedinresidentialsettingsusea
halogenlamppairedwithrapidlyspinningcolorwheelwiththreeorfourcolors.Manymodern
commercialprojectorsutilizecoloredLEDsorlasertechnologytogenerateabrighterimagewithfewer
visibleartifactsintheprojection.
Laserprojectionisalsousedinmanyapplications,fromliveentertainmenttoindustrialscanning
andevenprinting.Oneormorelasersareprojectedagainstgalvanometerswithmirrorsattached,called
scanners.OnescannercontrolstheXaxisoftheprojectionandtheothertheYaxis.UnlikeDLPandLCD
technology,laserprojectionproducesavectorimage.Thismeansthattheimageproducedthroughlaser
17
projectiondoesnothavediscretepixels,butratheriscomposedofmathematicalcurvesthatrepresent
theimage.Thisisbecausethelaserprojectsasthescannersmove,generatingacontinuousline[16].In
polychromaticapplications,numerouslasersarecombinedintoasinglebeambyinternalopticsofthe
projector.
ThefinalprojectiontechnologyisLCD.Foundanywherefrommonitorstoresearchequipment,
LCDworksonasimilarprincipletoDLP:differentintensitiesoflightareallowedtopassforeach
individualpixel.WhereDLPandLCDdiffer,however,ishowtheyachievethisgoal.WhereasDLPusesan
arrayofmirrorstoreflectlight,LCDprojectionusesapanelfullofliquidcrystalstomodulatelight
passingthrough[17].TherearetwocommonlayoutsforpolychromaticLCDprojectionsystems,which
aresingleLCDand3LCD.AsingleLCDsystemwilluseasingleLCDpanelwithsubpixelsforeachofred,
green,andblue,whilea3LCDsystemusesaseparateLCDpaneldesignatedtoeachaforementioned
color.
2.4HardwarePlatformOverview
Twohardwareplatformswerechosenforthisproject.ThesearetheAvnetZedBoardandTexas
InstrumentsDLPLightCrafterEVM.Bothoftheseplatformspossessuniquefunctionalityimportantto
thedesigngoalsoftheproject.
2.4.1ZedBoard
TheAvnetZedBoardisanevaluationkitthatutilizesaXilinxZynq-7000SoC.Theboardiscalled
assuchbecauseitstandsforthe'ZynqEvaluationandDevelopmentBoard.'Thespecificmemberofthe
Zynq-7000SoCfamilythattheZedboardUtilizesistheZynqXC7Z020.Forthepurposesofsimplicity,
Zynq-7000andZynqXC7Z020areusedinterchangeably.TheZynq-7000isasystemonachipthat
includesbothadual-coreARMCortexA9processingsystem(PS)aswellasFPGAfabricforthe
programmablelogic(PL).ThePLisrunoffofanon-board100MHzclockwhilethePSissuppliedbya
33.33MHzclock.TheZedBoardCanbeseeninFigure2-7.
18
Figure2-7–ZedBoard[18]
TheXilinxFPGAfabricisequivalenttoaXilinxArtix-7FPGAandcontains85,000logiccells,
106,400flip-flops,and53,200LUTs.TheFPGAfabricalsocontainscontains140modulesof36KbBlock
RAM(BRAM).TheARMprocessorcontains256Kbofon-chipmemory,8DirectMemoryAccess(DMA)
channels,aswellasperipheralinterfacesforUART,CAN,I2C,SPI,GPIO,USB2.0OTG,andTri-mode
GigabitEthernet.InorderforthePLtocommunicatewiththePS,theZynq-7000seriesincludesa
numberofAXIbussesand16internalinterruptsbetweenthetwosectionsoftheSoC[19].ThefullZynq-
7000SoCsystemisdisplayedbelowinFigure2-8:
19
Figure2-8-ZynqPlatformOverview[20]
AlongwiththeZynq-7000SoC,theZedBoardalsocontainstwoMicronDDR3chipsthathavea
totalmemoryof512MB.TheZedBoardalsohasaslotforanSDcard,allowingtheARMprocessorto
bootanexternaloperatingsystem.OntheboardtheUSB2.0OTG,Ethernet,UART,VGA,HDMI,and
CANarebrokenouttotheirrespectiveconnectors,withUARTbeingbrokenouttoaUSBtoUART
interface.Theboardalsofeaturesnumerousinputsandoutputs.Theinputsincludesevenpushbuttons
andeightswitcheswhiletheoutputsinclude8LEDsandanOLEDdisplay[21].Acomprehensive
ZedBoardblockdiagramcanbeseeninFigure2-9.
20
Figure2-9–ZedBoardPlatformOverview[22]
2.4.2LightCrafterEVM
The TexasInstrumentsLightCrafterDLPEVMisanevaluationkitforDLPprojectiontechnology.
TheLightCrafterutilizesa0.3"DMDwithatotalof415,872mirrorsinadiamondpatternwithawidthof
608mirrorsandaheightof684mirrors.Whenrunningtheboardinone-bitmonochromemode,a
4000Hzframerateisachievable.TheopticsoftheLightCrafterproduceathrowratioof1.66andcan
produceaminimumdiagonalimageat10"andamaximumat60"[23].TheLightCraftercanbeseenin
Figure2-10.
21
Figure2-10-LightCrafter[24]
TheDMDandlightengineoftheLightCrafterarecontrolledusingacombinationofadigital
videoprocessorandFPGA.TheFPGAreceivesinputdirectlyfromDVI(miniHDMI)andanexternal
trigger.Otherinputssuchascamera,USB,UART,andMicroSDaretakeninbyadigitalvideoprocessing
chiprunninganembeddedLinuxoperatingsystem.ThisvideoprocessingchiphasGPIOanddigitalvideo
connectionswiththeFPGA,whichisinturnresponsibleforprocessingandstreamingvideoandLED
colordata.ThesetwostreamsofdataaresenttotheDMDcontrollerandLEDdriverrespectively[23].
ThefullsystemblockdiagramcanbeseeninFigure2-11.
22
Figure2-11–LightCrafterDiagram [23]
23
Chapter3:AlgorithmDevelopment&SystemSimulation
ThedataprocessingofthevolumetricdisplaysystemwasinitiallyimplementedinMATLABfor
developmentandsimulation.ThevoxelizationandslicingalgorithmsweredevelopedasMATLABscripts
beforetheirimplementationsinsoftwareandcustomlogic.Inaddition,asimulationwascreatedofthe
volumetricdisplaysystemasaproof-of-concept.
3.1DataProcessingFlow
Theconversionofthemeshmodelintoatwo-dimensionalsliceinvolvestwomainprocesses:
voxelizationandslicing.Thedesignedsystemutilizestheseprocessesinthreesteps:voxelizetheobject
andhelix,calculatethethree-dimensionalintersection,andgeneratethetwo-dimensionalslice.Thisis
outlinedinFigure3-1below:
Figure3-1-DataProcessing
Thisprocessisrepeatedforeachhelixrotationpositioninordertogeneratetheslicesnecessaryforthe
fullvolumetricdisplay.
3.2VoxelizationAlgorithm
ThevoxelizationalgorithmwasdevelopedusingaMATLABpackagecreatedbyAdam
Aitkenhead[25].Thepackageincludesavoxelizationscriptthatconvertsa.STLfileintoabinaryvoxel
representationasathree-dimensionalarray.ThescriptwasbasedontheresearchofPatilandRavi
mentionedpreviously[10].Thepackageincludedanexamplevoxelizationscriptwhichwasmodifiedto
suittheneedsoftheprojectbyaddingfeaturessuchasthegenerationofthree-dimensionalfiguresof
thevoxelizedobjectaswellasthemanipulationoftheoutputdatatosuittheneedsoftheslicing
algorithm.
Thevoxelizationscripttakesina.STLfileandaspecifiedgridsizeforthevoxelizedobject.The
outputofthescriptisathree-dimensionalarrayrepresentingthex,y,andzdimensionsofthevoxel
24
grid.A‘1’representswheretheobjectispresent,and‘0’representsitsabsenceorthebackground.The
originalscriptalsogeneratedfiguresofthemeshmodel(Figure3-2),aswellasthreetwo-dimensional
figuresofthevoxelizedresult(Figure3-3).Thescriptwasmodifiedtogenerateasinglethree-
dimensionalfigureofthevoxelizedresult.
CADModels
Totestthevoxelizationalgorithm,severalCADmodelswereutilized.Acarmodelfromthe
NationalUniversityofSingapore’sSTLLibrary[26]wasselectedasanexampleoftheobjecttobe
projected,andahelixmodelwascreatedtobevoxelizedaswell.
VoxelizationScriptTesting
Thevoxelgridsizewasinitiallyselectedas100x100x100.Theresultsusingtheoriginalscript
(withoutmodification)areshowninFigures3-2and3-3:
Figure3-2-CarMeshModel
Figure3-3-VoxelizedCarModel(unmodifiedscript)
25
Themodifiedscriptwasthentestedtogenerateathree-dimensionalfigureinsteadofthethree
separateangles,andtheresultcanbeseeninFigure3-4:
Figure3-4-VoxelizedCarModel(modifiedscript)
3.3SlicingAlgorithm
TheslicingalgorithmwascreatedasanextensiontothevoxelizationMATLABscript.The
algorithmtraversesthrougheachpositionofthethree-dimensionalarraysforthevoxelizedobjectand
helixandconstructsanewarrayasaresult.Ateacharrayindex,thebitfortheobjectandhelixare
compared.Iftheyarebothsetto1atthatposition,anintersectionhasbeenfound,andthebitforthe
newarrayissetto1,otherwise,itissetto0.Togeneratethetwo-dimensionalintersection,thesame
processisfollowedbutatwo-dimensionalarrayisconstructed,butthezdimensionisignored.Ifan
intersectionisfoundinthex-yplaneatanylevel,thex-ybitinatwo-dimensionalarraywillbesetto1.
Theoutputofthescriptgeneratesafigurewiththethree-dimensionalintersection,aswellasthetwo-
dimensionalslice.
SliceAlgorithmTesting
Thecarmodelwasslicedwiththehelixusingtheresultingdatafromvoxelization.Theresultsof
theprocesscanbeseeninFigure5-3.
26
(a) (b) (c)Figure3-5-(a)20x20x20carvoxelmodel(b)20x20x20helixvoxelmodel(c)20x20carslice
Thetestshowedsuccessfulresults,verifiedbyrotatingthe3Dintersectiontoviewthex-yplane
andcomparingitwiththe2Dresult.Furthermore,thetestutilizedavoxelgridsizeof20x20x20gridto
verifyadequateresolutionwithlessvoxels.ThiswasasignificantconsiderationforthePLdesignin
termsofmemoryresourcerequirementdiscussedfurtherinthisreport.
3.4SystemSimulation
Thevoxelizationandslicingscriptswereexpandedtobeabletosimulatethefullvolumetric
displaysystem.Thisincludedbeingabletogenerateslicesforeachhelixrotation.MeshLabwasusedto
re-orienttheoriginal.STLmodelofthehelixtothedesiredrotationangles.Therotatedmodelswere
thensavedtobevoxelizedinMATLAB.Thegoalwastogenerate20slices,thusanangleof180/20=9
degreeswasusedforeachrotation,asthesameintersectionsarefoundafter180degrees.InFigure3-6
areafewexamplesoftherotatedhelixmodels:
Figure3-6-Rotatedhelixmodels
27
Thescriptwasthenmadetoreadineach.STLfileandperformthevoxelizationandslice
algorithm(both3dand2d)foreachrotation(withthecarmodelusedpreviously),savingtheresultsto
theworkingdirectory.Thescriptessentiallysimulatesthevolumetricdisplayconceptfully,generatinga
finalimagewitheachrotationslicecombined.Theresultsforslices1,10,and19areshownbelowin
voxelizedformintersectingthehelixvoxelmodelsinFigure3-7,2DformafterbeingslicedinFigure3-8,
andinrecombined3DforminFigure3-9:
3Dintersections
Figure3-7-3Dintersections
2DIntersections
Figure3-8-2Dintersections
28
Combined3Dresult
(a) (b)
Figure3-9-(a)voxelizedcarmodel,(b)combinedhelixsliceresult
Asseenabove,thesimulationsuccessfullyreconstructedthecarmodelusingthehelixslices.Thecode
fortheMATLABscriptscanbefoundinAppendixA.
29
Chapter4:SystemDesign&Implementation
Thefollowingchapterdescribesthedesignandimplementationofeachaspectofthesystem.
Theoveralldesignispresentedandeachfunctionalmoduleisexpandedupon.
4.1EmbeddedSystemDesign
Thegoaloftheprojectwastoresearchanddevelopanend-to-endvolumetricdisplaysystem.
Theteamfocusedontheswept-helixapproach,anddesignedasystemasisshowninFigure4-1below:
Figure4-1-SystemDesign
Thesystemtakesina3DCADmodelandconvertsitintotwo-dimensionalimagestobe
projectedontoaspinninghelix.Thisisachievedthroughaseriesofprocessingsteps,utilizingboththe
ARMprocessorandFPGAfabricoftheZynqSoC.Thedesigncanbesplitupintofourmaincategories:
projection,processingsystem,programmablelogic,andmechanicalhardware.Eachofthefollowing
sectionswilldescribethedesignandimplementationofeachaspect,aswellasdiscussthe
modifications,tradeoffsandlimitationsinimplementingthedesign.
4.2Projection
Therequirementfortheprojectoristohaveahighenoughframeratetogenerateastable
volumetricimage.Thedesignedsystemdisplayed40framesoverasinglerotation,andtherateofthe
motormustbeatleast15rotations/secondasfoundinthebackgroundresearch.Thisresultsin15*40
frames/seconds,or600Hz.TheLightCrafterEVMwasselectedasitisabletoachievesuchrates.
30
Inordertosuccessfullydisplayavolumetricimage,theprojectorneededtobesetuptothe
correctspecifications.Inorder,theseincludeddisplaymode,patterncount,inputtriggermode,LED
color,exposure,andinputtriggerdelay.Thedisplaymodeneededforprojectingapatternofbinary
bitmapsathighspeedsisreferredtobyTexasInstrumentsas“StoredPatternSequence”mode.Because
thereweretwentyimagesinacycle,thepatterncountwasthensetto20.TheLightCrafterreceived
inputpulsesthathadanactivehigh,sotheinputtriggermodewassetto“External(Positive)”tosignify
thattheinputtriggerwasbothactiveandactedonarisingpulseedge.Theexposureandtriggerdelay
werebothleftat0µSsotheimagewouldremainbrightandtheframewouldchangedirectlyatthe
pulseedge.AfterthesesettingswerechangedtheseriesofimageswasloadedontotheLightCrafter.A
viewoftherequiredsettingscanbeseeninthescreenshotoftheLightCrafterGUIapplicationinFigure
4-2.
Figure4-2-LightCrafterGUI
Becausetheprojectordoesnotproduceaperfectisometricprojectionbeam,aneffortwasmadeto
adjustfortheconeangleoftheLightCrafter.Thiswasaccomplishedbycreatinganalternativehelical
modelforuseinslicing.Thisnewhelicoidwasdeformedalongtheupwards-facingaxis,decreasingradial
sizeincorrelationwiththe1.66:1throwratiodefinedbytheLightCrafter’soptics.Orthogonalityofthe
31
beamwasnottakenintoaccountincorrelationwiththeisometricqualityofthebeam.Thisdeformed
helicoidcanbeseeninFigure4-3.
Figure4-3-ConicalHelix
4.3ProcessingSystem
Theembeddedsystemdesignrequiredanumberofpiecesofsoftwaretomeetthegoalsofthe
processingsystemdesign.ThesewereimplementedintheClanguageandbuiltonanembeddedLinux
operatingsysteminordertoutilizetheARMprocessoroftheZedBoard.Thesystemdesigncanbeseen
inFigure4-4.
32
Figure4-4-PSBlockDiagram
4.3.1PetaLinux
Anoperatingsystemwaschosenoverabare-metalapproachtoprogrammingtheARM
processorfortwomainreasons.Thesereasonsaretheneedforfilesystemaccessandtherequirement
forlibrariesthatareincludedwithvariousoperatingsystems.Thefilesystemwasneededtointeract
withtheoriginalSTLfileaswellasthegeneratedimages,andthelibrarieswereneededforinterfacing
withtheLightCrafter’sprovidedAPI.PetaLinux,aLinuxdistributionprovidedbyXilinxforuseontheir
FPGAproducts,waschosentobethebaselayerforallprocessingsystemfunctionality.Becausethe
operatingsystemisdesignedforuseonaZynqSoC,thereisinherentfunctionalitythatallowsforease
ofcommunicationbetweenthePLandPSoftheoveralldigitalsystem.ThePetaLinuxoperatingsystem
providesabaselayerandframeworkonwhichallotherprocessingfunctionalitywasbuilt.Thisincludes
directGPIOandBRAMaccessaswellasstandardLinuxlibraries,USBfunctionality,andfilesystem
access.
4.3.2VoxelizationandPS-PLInterface
Theembeddedsystemdesignincludedthevoxelizationalgorithmasanembeddedsoftware
applicationthatgeneratedthevoxeldataandwritesthisdataintomemoryinthePLsystem.However,
duetothescopeoftheproject,thevoxelizationalgorithmwaskeptasaMATLABscript.Thescriptmay
beconvertedintoaCapplicationusingMATLABCoder,butthetooldidnotsupportallthefunctions
necessaryinthevoxelizationpackage.Theconversionprocesswouldinvolvefurtherresearchofthe
voxelizationalgorithmanditsprogramming,whichwasoutsidethescopeoftheproject.
33
ThePS-PLinterfacewasinvestigated,howeverduetothetimingconstraintsoftheproject,the
implementationwasleftoutofthefinalsystem.BRAMaccessinPetaLinuxiscanbeachievedthrough
thecombinationoftwomethods.ThefirstofthesemethodsistheuseofthemmapLinuxsystemcallto
accessamemorymanageddevice,inthiscaseBRAM.Thesecondisassigningeachhardwaredevice,
suchastheGPIOandBRAMinterfaces,asadeviceintheUserspaceIO(UIO)inPetaLinux.Thecreation
ofaUIOdrivercreatesafileinthe/dev/folderoftheLinuxfilesystem.
4.3.3LightCrafterAPI
TheLightCrafterAPIisasetofsoftwarelibrariesprovidedbyTexasInstruments.Thesewere
neededtocreatesoftwarethatinteractswiththeLightCrafterEVM.BecausetheZedBoardisaheadless
embeddedsystem,softwareneededtobewrittenforPetaLinuxthatreplacedtheGUILightCrafter
ControlprogramthathadpreviouslybeenusedonaworkstationPC.TheLightCraftercontrolprogram
waswrittenusingcallstotheLightCrafterAPIprovidedbyTexasInstruments.Thecontrolprogram
worksbyfirstcheckingtheconnectiontomakesuretheLightCrafterisconnectedandisvisibleasan
RNDISethernetgadget.Theprogramthengoesthroughandchangestheprojectionmodeto‘Stored
ImageSequence’andsetsthecolor,sequencelength,andtriggertypebeforeuploadingalltheimages
totheprojector.Thetriggertypeissetto‘External(positive)’becausetheoutputfromtheZedBoardis
anactivehighsignal,sotheLightCraftermustbetriggeredontherisingclockedgesratherthanthe
fallingclockedges.TheLightCrafterAPIcodecanbeseeninitsentiretyinAppendixB.
4.3.4BitmapGeneration
Thebitmapconversionprogramtakesinabitarrayrepresentationoftheslicedandflattened
dataandturnsitintooneoftheimagesthatisuploadedtotheLightCrafter.Thebitmapgeneration
happensinfourmainsteps:initialfilecreation,dataprocessing,imagepadding,andwritingtothefile.
TheLightCraftertakesinaone-bitBMPfile,soaheaderforthisformatisfirstgeneratedbythe
software.ABMPfilehastwoheaders,agenericfileheaderandadataheaderspecifictothebitmap
format[27].Bothofthesemustbeformattedproperlyinordertogenerateauseableimage.
FirstthefileheaderisgeneratedanditisgivenasignatureuniquetotheBMPformat.Nextthe
totalfilesizeandheaderlengtharecalculatedandplacedintotheirrespectivespotsintheheader.The
secondpartofformattingthefilecorrectlyistheBMPdataheader.Thisincludesinformationsuchas
thesize,pixeldensity,andbitdepthoftheimage.Alloftheneededvaluesarecalculatedandplaced
intotheirrespectivespotsinthedataheader.
34
Nexttheinputdatamustbescaledandformattedtofittheprojector.Thisisaccomplishedby
copyingthedataoutofmemoryandthenscalingthedatabyafactorof25.Thedataisscaledby
iteratingthrougheachpixelinthescaledarrayandmappingittoapixelinthesourcearray.Thiscanbe
seendemonstratedinFigure4-5,whichshowsfirstanarraybeingscaledandthentheimageresultofa
scaledarray.
InputData OutputImage
[0x00,0xff,0x00,
0x00,0xff,0x00,
0x00,0xff,0x00,
0x00,0xff,0x00,
0x00,0xff,0x00,
0x00,0xff,0x00,
0x00,0xff,0x00,
0x00,0xff,0x00,
0xff,0x00,0xff,
0xff,0x00,0xff,
0xff,0x00,0xff,
0xff,0x00,0xff,
0xff,0x00,0xff,
0xff,0x00,0xff,
0xff,0x00,0xff,
0xff,0x00,0xff,
0x00,0xff,0x00,
0x00,0xff,0x00,
0x00,0xff,0x00,
0x00,0xff,0x00,
0x00,0xff,0x00,
0x00,0xff,0x00,
0x00,0xff,0x00,
0x00,0xff,0x00]
Figure4-5-ConversionExample
Afterthepixelsarescaled,theyarepaddedinordertobringeachrowofpixelstoamultipleof
fourbytestopreventimageskew.Theaddedpaddingbringstheimageto608x684pixels,which
matchestheresolutionrequiredbytheLightCrafter.ThedataisthenwrittentotheBMPfileinorder.
35
Firstthefileheaderiswrittenfollowedbythedataheader.Beforetheactualimagedataiswritten,
however,acolortableisincludedtostatewhichtwocolorsarerepresentedbythemonochrome
bitmap.ThefullbitmapfilestackcanbeseeninFigure4-6below.FormoreinformationabouttheBMP
generationcode,seeAppendixC.
1 FileHeader(14bytes)
2 DataHeader(32bytes)
3 ColorTable(2*4bytes)
4 ImageData(51,984bytes)
Figure4-6-BitmapStructure
4.4ProgrammingLogic
Theprogrammablelogicsystemconsistsofthesliceprocessor,encoder,andprocessingsystem
interface.AblockDiagramofthefulldesigncanbeseeninFigure4-7below:
Figure4-7-ProgrammableLogicSystem
ThesystemwasdesignedandimplementedinVerilog,usingacombinationofcustomIPand
XilinxIPblocks.Theonlyexternalinputandoutputtothesystemisfortheencodermodule,which
handlestheprojectionsynchronization.
36
4.4.1Memory
AsignificantaspectinthePLdesignwasthememoryrequirementofthesystem.Thedatasent
fromtheprocessingsystemisa20x20x20arrayrepresentingthevoxelizedobject,thus20x20x20,or
8000bitsarerequiredforstorageofone3Dmodel.Thecompletesystemrequirestwenty-one3D
models:onefortheobject,andtwentyforeachhelixrotation.Inaddition,memoryisrequiredtostore
thetwentytwo-dimensionalslicesgenerated,needing20x20or400bitsforeach2Dslice.Thisresultsin
atotalof21*8000+20*400bits,or176000bits.
TheZynqSoCfeatures140x36KbblocksofRAM,witheachblockhavingamaximumbus-width
of75bits.TheseblocksofmemorycanbegeneratedusingXilinxIP,namelytheBlockMemory
Generator.ThegeneratorallowstheconfigurationofcustomBRAM,allowingthespecificationforthe
widthanddepthforthedatatobestoredwithintheblock.Thesystemwasdesignedsothateachthree-
dimensionalmodelwouldbestoredinitsownblockRAMforeasyaccess,andalltwentyofthe2Dslices
wouldbestoredinasingleblocktobeaccessedbythePS,resultinginatotalutilizationof22blocksof
RAM.TheBlockMemoryGeneratoralsoallowsforthememorytobepre-initializedwithdata.This
allowedthetwentyhelixmodelstobepreloadedintothememoryblocksusingmemoryinitialization
files(.coe)containingthevoxeldataforeachhelixrotation.
4.4.2SliceProcessor
Thesliceprocessorfindstheintersectionbetweenthevoxelizedobjectandhelix,andconvertsit
intotwo-dimensionalslicedata.Thisisdoneforeachhelixrotation.Theoveralldesigncanbeseenin
Figure4-8.
37
Figure4-8-SliceProcessor
Theuseofcustomlogicforthesemodulesallowsforfast,parallel,computationsofthe
intersections.ThesliceprocessorisactivatedbyanenablesignalsentthroughGPIOfromtheprocessing
system,whichactivatesthereadmoduleofthesliceprocessor.Thereadmoduleextractsthevoxeldata
oftheobjectfromBRAM,aswellasthevoxeldataofthehelix.Itcontainstwentymemoryblocks,each
containingthedataofonehelixrotationasmentionedabove.Eachblockofmemoryhasadatabus
widthof50bitsandadepthof160bits,andthemodulereadsfromoneBRAMatatime.Themodule
selectsanewmemoryblocktoreadfromonceeachaddresshasbeenvisitedfromthepreviousblock.
ThereadmoduledesigncanbeseeninFigure4-9.
38
Figure4-9-ReadModuleDesign
Theoutputofthereadmodulepopulatesthe8000registersforafullmodel.Onceallthedataof
ahelixisextracted,theslicemoduleisenabledtogeneratethetwo-dimensionalslicedataforthat
rotation.Theslicemoduleperformstwooperations-calculatingthethree-dimensionalintersectionand
thenconvertingitintotwo-dimensionalslicedata.Insteadoftraversingthroughthethree-dimensional
arrayasdoneinthesimulation,thethree-dimensionalintersectioniscalculatedbyabitwiseANDofthe
objectandhelixdata,andthetwo-dimensionalsliceiscalculatedbymappingeachxandypositionon
everyzleveltothesamebitonthe20x20array.Thisallowsforafasterparallelcomputationofthe
intersection.
Oncethesliceisgenerated,thewritemoduletakestheoutputfromtheslicemoduleasitsmain
input,storeseachsliceinaslicebuffer,andwritestheslicesintoBRAMasseeninFigure4-10.
39
Figure4-10-SliceProcessorWriteModule
Theread_countcountsfrom0to19inordertoloadthe20slicesintobufferregisters.The
buffersarethenfedintoamultiplexer,whichselectsonesliceatatimetobewrittenintoBRAM.The
BRAMhasa32-bitdatawidth,thuseachsliceisfedintoanothermultiplexertofeedthedatain
sequentially.Theread_countbeginsattheinputenablesignal.Whenallsliceshavebeenreadin,
write_nextandwrite_countareenabledtoallowfortheBRAMwriteoperationstooccur.Thismoduleis
enabledsimultaneouslywiththeslicemodule.OnceeachslicehasbeenwrittenintoBRAM,the
processingsystemcancommencereadingthedatatogeneratethebitmapimagesforprojection.The
codeforthesliceprocessorcanbefoundinAppendixE.
4.4.3EncoderModule
Theencodermoduleisanintegralpartoftheprojectioncontrolsystemthatenables
synchronizationbetweenthespinninghelixandprojectedframes.Themoduletakesinthehomeand
helixpositionsignalsfromencodercircuitryasitsinputsandoutputsapulsesignalthatissenttothe
LightCrafter.
Themodulehastwostates-standbyandactive.Themoduleisinitializedinitsstandbystate,
anditsfunctionalityistodetectthehomeposition.Thehomepositionisthestartingpositionofthe
helixwherethefirstframeistobeprojected.Whileinstandbystate,thereisnooutputtothe
40
LightCrafter.Thesignalscomingfromtheencodercircuitryareactivelow,thusthehomesignalis
detectedwhenthereisalogic0inthe‘home’input.Oncedetected,themoduleisputintoitsactive
state,wherethehelixpositionsignalinputisdirectedasthepulsesignaloutput.Thus,foreverynew
positiondetected,thenextframeistriggeredforprojection.Theencodermodulecodecanbeseenin
AppendixF.
4.4.4PSInterfaceandPLSystemIntegration
TheprogrammablelogicsysteminteractswiththeprocessingsystemviatheZynq7Processing
SystemIPblock,whichwrapstheARMprocessortoenablecommunicationbetweenthecustomlogic
andsoftware.Communicationbetweenthetwosystemsisnecessarytobeabletotransferthe
voxelizationdatafromPStoPL,andtheslicedatafromPLtoPS.Inaddition,thecustomlogicmodules
areactivatedthroughGPIOsignalssentfromthePS.Thecommunicationbetweenthetwosystemswas
configuredusinganAdvancedeXtensibleInterface(AXI)bus,whichprovidestheinterfaceforboth
memoryandGPIO.
ProcessingSystemWrapper
TheZynq7IPblockintegratestheprocessingsystemwiththeprogrammablelogicsystem.This
allowsthePStohaveaccesstobothon-chipandexternalmemory,PLclocks,andadditionalI/O
peripherals.ThePSinterfaceconfigurationcanbecustomizedusingtheuserinterfaceoftheIPblockas
seeninFigure4-11below:
41
Figure4-11-Zynq7ProcessingSystemGUI
Settingssuchastheperipherals,systemboot-mode,clocks,andthePS-PLinterfacecanbe
configuredbytheuser.ThePSwasconfiguredtohaveUSB,UART,andSDcardperipherals.TheUSB
peripheralallowstheLightCraftertobeconnected,UARTallowsaconnectionbetweentheheadlessPS
systemandahostPC,andtheSDcardperipheralallowsthesystemtobebootedfromanoperating
systemresidingonanSDcard.Inaddition,thePSwasconfiguredwithanAXIinterfacefor
communicationwithBRAMandGPIO.
AdvancedeXtensibleInterface
AXIisaprotocoladoptedbyXilinxasaninterconnectionbetweenIPcores[28].Specifically,AXI
enablesaninterconnectionformemory-mappedIO.AnAXIinterconnectionwasgeneratedinthePL
systemtocreatethenecessaryconnectionswiththePS.Theinterconnectwasautomaticallygenerated
42
aspartofVivado’s‘runblockautomation’toolinblockdesignmode,creatingthenecessaryabstractions
forasimpleconnection.
TheAXIinterconnectwasusedforboththeGPIOandBRAMconnectionsinthePL.AnAXIBRAM
controllerwasgeneratedusingXilinxIPthatallowsthePSsystemtoaccesstheon-chipBRAMinPL.Two
blocksofRAMweregeneratedinthetopleveldesignofthePLfortheseparatereadandwrite
operationsofthedatapath.ThefirstBRAMisusedtostorethevoxeldatawrittenfromPStobereadin
PL,andthesecondBRAMistostoretheslicedatawrittenbyPLtobereadbackintoPS.
SystemIntegration
ThePSwrapper,AXIinterconnect,andblockmemorycoreswereintegratedintoasingleblock
designasseeninFigure4-12below:
Figure4-12-PLSystemBlockDiagram
InordertoconnecttheblockdesignwiththecustomsliceprocessorandencoderIP,theGPIO
andBRAMportswereconfiguredasexternalports.Atop-levelmodulewasthencreatedusingVerilog
thatinstantiatedandconnectedthemoduleabovewiththesliceprocessorandencodermodulesto
completethecomprehensiveprogrammablelogicsystem.ThefullPLsystemcodecanbeseenin
AppendixG.
43
4.5MechanicalSystem
Inordertoproduceavolumetricimage,arotationalhardwaresystemneededtobecreatedto
spinandtrackthehelicalprojectionscreen.Aframealsoneededtobeconstructedinordertomount
rotationalsystemandprojectionsystem.Themechanicalsystemconsistsofthreemaincomponents:
theencoder,therotationalhardware,andtheframe.Thepurposeofthedesignwastoprioritize
stabilityandstructurearoundtherotationalhardwarewhilstmaintainingtheproperdistancesbetween
thehelixandtheprojector.AnimageofthefullsystemcanbeseeninFigure4-13below.
Figure4-13-MechanicalSystemPhotograph
Onerequirementofthesystemwastosynchronizethemotorwiththeprojection,inorderto
generateacorrectimage.Theencoderwasdesignedtoallowthesystemtotrackboththerateof
rotationaswellasabsoluterotationalposition.Thiswasaccomplishedthroughtheinclusionofbotha
forty-positionencoderaswellastwohomepositions.Thehomepositionmarksthestartingpointofthe
rotationalsequence.Twohomepositionswereincludedduetotheradialsymmetryofthehelixat180°.
Thesetwohomepositionsactidentically,buttheinclusionofbothhalvestheworst-case-scenariowait
44
timeforthesystemtobecomesynchronized.Inordertotrackthis,40encoderpositionswereincluded
equidistantfromeachotheraroundtheperimeteroftheencoderbelowthehomeposition.Each
positionindicatesanewframetobeprojected.Acomputer-generatedmodelofthisencodercanbe
seeninFigure4-14.
Figure4-14-EncoderWheel
TheencodercircuitryconsistsoftwophototransistorsandtwoinfraredLEDs.Pullinglowwhen
theysenselightoveracertainthreshold,thephototransistorsaremountedacrossfromtheLEDswith
thebeamofbothLEDscenteredonandperpendiculartoeachtrackontheencoderwheel.Thisallows
fortheencoderandhomepositionsonthewheeltobeseparatelytracked.TheLEDsand
phototransistorsshareacommonpowersource,howevertheoutputsareseparatedandfedinto
separateinputsoftheZedBoard.AcircuitdiagramforthetwoLED/phototransistorpairscanbeseenin
Figure4-15.InformationaboutthewirecolorcodingschemecanbefoundinAppendixH.
45
Figure4-15-EncoderCircuitry
Therotationalhardwarewasselectedtoallowforthehelicalloadtospinataratefastenough
toprojectasteadyimageataconstantspeed.Themotorselectedwasabrushedmotorwithapower
drawunderfullloadof6W.Thismotorwaschosenduetocost,speed,andeaseofintegrationintothe
design.Themotor,aHyongyangHRS-755S,islowcostandadvertisedforapplicationsinhigh-speed
applicationssuchasincordlessleafblowersandhedgetrimmers.Themotoralsohaseasilyaccessible
mountingpointsthatwereutilizedincouplingtherotationalsystemtotherestofthehardware.In
ordertopreventthehelixfromfreelyrotatingaroundacircularshaftwhilstspinning,aD-shaft–named
foritsshape–waschosentoallowfortheshaftcoupler,shaftcollars,encoderwheel,andhelixtoeasily
limitnon-motorradialmotionwhilesimultaneouslymaintainingeasyverticalmotiontoassembleand
disassemblethecomponents.
Inordertoholdeachpieceofthemechanicalsystemtogether,aframewasconstructedfrom
steelanglechannelandacrylic.Twoacrylicpanelsweredesignedfortheframeinordertomountthe
motorandLightCraftertothesystem.Thesetwomountingplateswerelasercutfromacrylicsheetsand
attachedtothesteelframeusingL-brackets.Themotorplate,asseeninFigure4-16a,wasdesignedto
accommodatetheshaftofthemotoralongwithtwoscrewstoallowforthemotorfacetobemounted
flushwiththepanel.TheprojectormountseeninFigure4-16bwasdesignedtoutilizethreeslotsinthe
acrylic.Thewidecenterslotistoallowtheprojectedimagetopassthroughthepaneluninterrupted
whilethetwoouterslotsareformountingtheprojectortothepanel,allowingforslidingtoadjustand
calibratetheimage.
46
Figure4-16a-MotorMount Figure4-16b-ProjectorMount
Afterinvestigationintoanumberofpossibletechniquestocreatethehelix,extrusion-based3D
printingwasdecidedtobethemostfeasible.Duetorestrictionsofthe3Dprinterusedfor
manufacturing,thehelixwassplitintothreepiecesinordertoallowittofitonthebedoftheprinter.
Nylonwasusedastheprintmaterialduetoitslowcost,highstrength,andlightweightnature.The
housingfortheencodercircuitrywasalso3Dprinted.Thisenclosurewasdesignedbothtoallowfor
easymountingtotheframeandtoprovideampleheadroomtotherotatingencoderwheel.
47
4.6FinalSystemImplementation
Duetothetimingconstraintsandscopeoftheproject,thefinalsystemimplementation
processedtheCADfileonaPC.Thisincludedvoxelization,slicing,generatingbitmapimages,and
configuringtheLightCrafter.Figure4-17showstheoriginalembeddedsystemdesign.Themodules
highlightedingreenwereimplementedonaPCforthefinalimplementation,andthemoduleinblue
wasimplementedontheZedBoard:
Figure4-17–EmbeddedDesignModifications
ThePCwasconnectedtotheLightCrafterviaUSB,andtheZedBoardwasconnectedtoboththe
encodercircuitryandtheLightCrafter(seeAppendixH).ThisisshowninFigure4-18below:
Figure4-18-FinalSystemImplementation
48
TheCADfilewasprocessedinMATLABforvoxelizationandslicingusingthesimulationscript.
Thescriptgeneratedthetwentyslicesandwereautomaticallysaved.Theseimageswerethenconverted
tothenecessaryresolution(608x684)andfiletype(monochromebitmap).TheLightCrafterGUIwas
thenusedtoconfiguretheLightCrafterforstoredpatternsequence,andthe20bitmapswereuploaded.
ThemotoristurnedononcetheimageshavebeenuploadedtotheLightCrafter,andtheprojection
commenceswhenthehomepositionisdetectedbytheencoder.Theintegrationofthesepartscreate
thecompletevolumetricdisplaysystem.
49
Chapter5:SystemTesting&Results
Inordertoensurethateverypieceoftheprojectwasfunctional,astrictandcomprehensiveset
oftestingguidelineswasdevelopedforeachpart.Thissectionoutlinesthestepstakentotesteachpart
oftheprojectaswellastheresultsfromtesting.
5.1ProcessingSystem
5.1.1PetaLinux
PetaLinuxwastestedbybuildingtheoperatingsystemsuccessfullyandloadingittoanSDcard
withtwopartitions,oneforthebootdiskandonefortherootfilesystem.Thesepartitionswereaptly
named“BOOT”and“rootfs”asperthePetaLinuxdocumentation.Theoperatingsystemwasthen
bootedontheZedBoardandthefunctionalitywaschecked.ThesoftwarebeingrunontopoftheOS
layerwastestedinasimilarmanner,asitscompilationcoincidedwiththePetaLinuxcompilation.
AlthoughbothPetaLinuxandthesoftwarecompiledsuccessfullyandranontheZedBoard,functionality
innumerouspiecesofsoftwarewasnotworking,asisexplainedinthefollowingsections.
5.1.2LightCrafterAPI
TheLightCraftersoftwarewasinitiallytestedsuccessfullyonaPC.Sampleimageswereplacedin
afolder,theLightCrafterwasconnected,andthesoftwarewasthenrununderUbuntu.TheLightCrafter
wassuccessfullyloadedwiththeimagesandrespondedtotheinputtriggerwhileprojectingusingthe
correctLED.
TheLightCraftercontrolprogramwasthentestedinthePSbycompilingitwithPetaLinux,
attachingtheLightCrafterviaUSBOTGtotheZedBoard,andrunningtheprogram.Althoughthe
programsuccessfullyranwithoutissue,itcouldnotutilizetheRNDISconnectiontotheLightCrafterover
USBOTG.NumerousstepsweretakentoresolvethisbyalteringthePetaLinuxkernelconfiguration,
howevernostepstakenprovedeffective.TheunderlyingcauseoftheRNDISconnectivityissueis
unknown.
5.1.3BitmapGeneration
Thebitmapgenerationsoftware,whilesuccessfullyrunonthedevelopmentPC,produceda
segmentationfaultwhenrunontheZedBoard.Thisproblemarisesduetothelimitedresourcesofthe
ZedBoardandtheprogramrunningoutofvirtualmemory.Thisisduetotheneedtoallocateanarray
50
fortheoutputimageandthetemporaryarrayresidinginprogrammemory.Whentestingthebitmap
generationsoftwareonthedevelopmentworkstationPC,testingincludedthegenerationofmultiple
sizesofimagesaswellasusingmultiplepatternsasthesourcedata.Resultsshowedthatduetothe
BMPspecificationsoutputimagesthatdidnotincludeanxdimensiondivisiblebyfourbitswouldbe
skewedunlessotherwisepadded.Theprogramalsoworkedonlyforaselectnumberofpatterns,
resultinginimproperlyscaleddataforotherpatterns.Thecauseofthisbehaviorwasnarroweddownto
anerrorinthescalingalgorithm.
5.2ProgrammableLogic
EachfunctionalblockinthePLwastestedindividuallytoverifythefunctionalityofeachmodule
beforedoingintegratedtests.Thefollowingsectionsoutlinethetestsperformedandexplaintheresults.
5.2.1BRAMread/write
CustomlogictoreadandwritefromBRAMwastestedtoverifythatthedatabeingbothread
andwrittenwasaccurate.Inaddition,thememoryinitializationfileswereconfiguredandtestedto
verifyaccuratedataaswell.
BRAMMemoryInitialization
AblockRAMwasconfiguredtoloadwithaninitialization(.coe)file.Thisfilecontainedtheinitial
contentstobeloadedontheBRAM.Thefilesimplyrequiredaradixanddatavectortodefinethe
desiredcontents.Thememoryinitializationwastestedbyloading4dataelementsof8-bitseach:0xAA,
0xBB,0xCC,0xDD.TheBRAMwasconfiguredtohaveadatabus-widthof8bitsandadepthof4bits
(fouraddresses/elements).Thememoryblockwasinstantiatedintoatestbenchtodetermine
successfuldatainitializationandreadfunctionality.TheresultsareshowninFigure5-1below:
Figure5-1-MemoryInitializationTestBenchResults
51
TheBRAMwasthenmodifiedtohaveadatabus-widthof4000bitsanddepthof2,andwas
testedagain.Theresultsofthe4000-bitdata-bustestcanbeseeninFigure5-2:
Figure5-2-4000-bitDataInitializationTestBenchResults
AsdisplayedinFigures5-1and5-2,bothtestsshowedsuccessfulresultsforreadingpre-loaded
data.Thiswasusedforthefinalimplementation,asthehelixdatawasbepre-loadedinthesystem.
SequentialReadModule
Thereadmoduleinthesliceprocessorcontains20memoryblocks,eachcontainingthedataof
onehelixrotation.Thiswassimulatedinatestdesignwitheachblockofmemoryconfiguredwithadata
bus-widthof50bits,andadepthof160bits.ThemodulereadsfromoneBRAMatatime,withthe
doutbofonemodulebeingtheoutputofthemodule.Themodulethenselectsanewmemoryblockto
readfromonceeachaddresshasbeenvisitedfromthepreviousblock.Onceeachmemoryblockhas
beenvisited,themodulewillstopreadingfrommemory(enableislow).Thedesignwasimplemented
with4blocksofmemoryinatestbenchwiththefollowingresults.TheseresultscanbeseeninFigures
5-3aand5-3b.
Figure5-3a-Testbenchresults
52
Figure5-3b-Testbenchresults
Asseeninthefiguresabove,themodulesuccessfullyreadallthedatafrommemoryblock0,
andshowedasuccessfulswitchtomemoryblock1.Thedoutbvalueswerealsovalidatedbycomparing
themtothememoryinitializationfiles.Thistestverifiedthesequentialreadfunctionalityofthecustom
logicandallowedforexpansiontothefull20blockimplementation.
5.2.2SliceProcessor
Eachfunctionalmodulewithinthesliceprocessorwastestedbeforeintegratingthemintoa
singlefunctionalunit.Thisincludedtheslicemodule,sequentialreading,andsequentialwriting.
SliceModule
Theslicemodulewasinitiallytestedusinga3x3x3gridtoverifyfunctionality.Theinputstothe
modulewereafullyvoxelizedcubeforthe3Dobject(obj)andaslantedplaneoutlineastheintersecting
surface.Imagerepresentationsoftheseareshownbelow:
Figure5-4-3Dobject(left)andintersectingsurface(right)
53
Theexpectedprocessingwouldresulttothefollowing:
27’b 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
& 27’b 1 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 1
--------------------------------------------------------------------
27’b1 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 1
--------- CONVERT TO 2D-------
=> 9’b1 1 1 1 0 1 1 1 1
ThetestbenchwassimulatedandshowedtheexpectedresultasseeninFigure5-5.
Figure5-5-Testbenchresults
ThemodulewasthenimplementedinhardwareusingtheZedBoardtodisplaythe2Dresulton
aVGAdisplay.Thefollowingtestmodulewasdesignedandimplemented.Themoduletotestslicing
usingVGAcanbeseeninFigure5-6.
54
Figure5-6-Slicetestmoduleblockdiagram
Thesameinputswereused(generatedwithintheVerilogcode)asthetestbench.The9-bit
outputwasmappedtothecorresponding3x3gridandresultedintheimageshowninFigure5-7.
Figure5-7-HardwareImplementationResult
55
Theinitialtestswerethenexpandedforthe20x20x20resolution.Todoso,a20x20x20VGA
displaygridwasdesignedandimplemented.Bydefault,thegridwoulddisplayasallpurple(indicating
anoutputofallzeros)asseeninFigure5-8:
Figure5-8-Blank20x20x0grid
Eachsquareonthegridwasmappedtoabitthatcorrespondstotheoutputoftheslicemodule
(twoD).Whenabitisequalto1,itsetthecorrespondingsquaretowhite.Thefunctionalityofthegrid
wastestedusingtoverifythebitsweremappedtothecorrespondingsquaresbeforetestingtheslice
module.Theslicemodulewasthenimplementedusingthevoxelmodelsofthecarandhelixexported
fromtheMATLABsimulationsasinputs.TheresultsareshowninFigure5-9bwiththeMATLABresultfor
comparisoninFigure5-9a:
(a) (b)Figure5-9-(a)MATLABsliceresults(b)Hardwareimplementationresults
Theresultsshowedasuccessfulimplementationoftheslicingmodule,withthe20x20grid
outputshowingtheexactsameresultastheMATLABsimulation.TheVGAtestmodulecodecanbeseen
inAppendixD.
56
SequentialSlices
Theslicemodulewasthenintegratedwiththesequentialreadmoduletoensurethesystem
wasabletoloadthehelixdataforeachrotation,andgeneratetheslices.Thistestmoduledirectedthe
outputoftheBRAMreadtotheslicemodule,andtheslicemodulewasenabledoncetheBRAMread
modulehadfinishedloadingtheentiremodel.Themodulewastestedinatestbenchandtheresultscan
beseeninFigure5-10:
Figure5-10-PLSliceSimulationResults
Thefigureshowsslice_engoinghighaftersurf_counthasreached9f,indicatingthat0to159
dataaddresseshadbeenreadfromandloadedreadyforslicing.Theslice_enbitenablesthevoxelslice
module,andtheoutputtwoDwasproduced,representinga2Dslice.Thesimulationshowedsuccessful
resultsinloadingandslicingall20models.
FullSliceProcessorTesting
Thefinalaspectwastointegratethewritingmoduleintothesliceprocessorsystem.Themodule
wasintegratedintothetoplevelsliceprocessordesignandwassimulatedwiththewholesystem.The
fullsystemtestbenchresultscanbeseeninFigure5-11:
57
Figure5-11-PLSliceProcessorSimulation
Thesimulationshowedsuccessfulresultsforthecontrolofthewritemodule.Thewaveform
aboveshowsthatthemomentthatread_countreachesthelastslice,thuswritingwillbeenabled
(write_engoeshigh).Aswrite_engoeshigh,theappropriatedinandaddressisgeneratedfortheBRAM
writeoperation.
58
5.2.3EncoderModule
Theencodermodulewastestedusingatestbenchtosimulatetheencodercircuitry.Thetest
casesverifiedthatthepulsesignalfollowstheoppositeoftheinputoftheencodersignal,butonlyafter
thehomesignalhasbeendetected.AsseeninFigure5-12,thetestbenchshowedsuccessfulresultsfor
theencodermodule:
Figure5-12-EncoderModuleTestResults
Inaddition,theencoderhardwareimplementationwastestedinwiththemechanicaland
projectionsystem.TheencodercircuitrywasconnectedtotheZedBoard,andanoutputwasconnected
totheLightCrafter(seeAppendixH).TheZedBoardwasprogrammedandthefunctionalityofthe
encodermodulewasverifiedbyturningtheencoderwheelbyhand.Atestimagesequencewasused
andshowedsuccessfulresults,witheachframetriggereduponeachpositoindetectedbytheencoder.
5.3MechanicalSystem
Theencodercircuitrywastestedtoensureareliableandconsistentsignalwhilstrotating.This
wasaccomplishedbymeasuringtheoutputofbothencodersensorsusingadigitaloscilloscope.The
widthsofboththehomepositionpulseandencoderpulsemeasuredtobe640µswhenspinning.The
encodertestingincludedmotortestingbymeasuringspeedwhilstspinningunderfullload.Thisequates
to1.563kHz,whichiswellbelowthe4KHzmaximuminputtriggerconstraintoftheLightCrafter.Itcan
beseenbelowinFigures5-13aand5-13bthatbothsetsofpulsesappearconsistentandoccurata
consistentrate.Theencodersignalisrepresentedbythesecondchannelinbothoscillogramswhilethe
homepositionisdisplayedonthefirst.Theencodermoduletakesanactivelowsignalduetothe
phototransistorspullinglow,thereforethepulsesoccurwhenthehighsignalfallslow.
59
Figure5-13a-EncoderDetailView Figure5-13b-HomePositionDetailView
5.4FullSystemTests
Thefinalsystemimplementationwastestedtoverifythefunctionalityofthevolumetricdisplay
system.TheStanfordBunnymodel[9]wasusedtodoso.Theresultsforeachstageofthesystemare
presentedbelow.
Voxelization&Slicing
ThefirststageofthesystemwastovoxelizetheBunnymodel.TheMATLABsystemsimulation
scriptwasutilizedtogenerateavoxelizedmodelwithagridsizeof20x20x20asseeninFigure5-14
below:
Figure5-14-VoxelizationResults
60
Slicing
Thenextstageofthesystemwastoslicethevoxelizedmodel.TheMATLABsimulationscript
accomplishedthisbyrunningtheslicingalgorithmwiththeBunnymodelandavoxelizedmodelofevery
helixrotationposition.TheresultsoftwoslicesareshowninFigure5-15below:
Figure5-15-SlicingResults
Theslicesgeneratedwereverifiedwiththethree-dimensionalintersectionsgeneratedbythe
script,toensurethatthex-yplanewascapturedaccurately.TheMATLABgeneratedfigureswerethen
convertedintomonochromebitmapfileswithasizeof608x684(arequirementforLightCrafter
configuration)usingMicrosoftPaint.
Projection
TheLightCrafterwasthenconfiguredtoStoredPatternSequencemode,withtheexternal
triggersettingactivatedusingtheLightCrafterGUI.The20bitmapsofthesliceswereuploadedtothe
LightCrafterreadyforprojection.TheZedBoardwasthenprogrammedwiththeencodermodule,and
theDCmotorwasswitchedon.Theprojectionsequencecommencedonceahomepositionwas
detected,andtheresultingvolumetricimagecanbeseeninFigure5-16.
61
Figure5-16-VolumetricDisplayResult
Thevoxelizationandslicingalgorithmsshowedsuccessfulresults,andtheprojectionsystemwas
abletogenerateathree-dimensionalimage.LookingcloselyatFigure5-16above,individualvoxelscan
beseenwithinthecylindricalshapeofthespinninghelix,andavisiblefigureisobserved.However,the
imagewasdistorted,andthebunnymodelwasdifficulttodistinguish.Thedistortionisinpartdueto
theangleofprojectionoftheLightCrafter.Inaddition,theStanfordBunnymodelwasnotconically
distortedtoaccountfortheconeangleoftheLightCrafter.Eventhoughtheimagewassomewhat
distorted,theresultsofthesystemwasconsideredasuccessduetoitsabilitytoprojectastatic,visibly
voxelizedvolumetricimage.
62
Chapter6:Conclusion
Thisprojectsuccessfullycreatedavolumetricdisplaysystemthatdisplaysa3DCADfileintoa
three-dimensionalvolume.ThefinalsystemimplementedprocessedaCADmodelonaPCtogenerate
thetwo-dimensionalslices,configuredtheLightCrafterusingaGUI,andcontrolledtheprojection
synchronizationusingencodercircuitryandcustomlogicontheZynqSoC.
TheresearchconductedonvolumetricdisplayconceptsandCADfilemanipulationresultedin
thedevelopmentofworkingvoxelizationandslicingalgorithms.Thesecanbeusedtosimulatea
volumetricdisplay,aswellasgeneratethesliceimagestobeprojectedfromaPC.Customlogicfor
slicingwassuccessfullydesigned,implementedandtestedtoshowcasethehardwareprocessing
functionalityinthesystem.Additionally,theimplementationofPetaLinuxontheARMProcessor
allowedforexperimentationandtestingofanembeddedoperatingsystemaswellasthetestingof
embeddedsoftwareapplications.Acompleteprojectioncontrolsystemwasalsosuccessfullydesigned,
built,andtested,includingmechanicalhardware,a3Dprintedhelix,andencodermodulethatwas
capableoftrackinghelixrotationalpositionsandthesynchronizationofthemotorwithprojected
frames.
Althoughmanyaspectsoftheembeddeddesignweresuccessfullyimplementedinsimulation,
theteamwasunabletoimplementtheseintothefinalsystemimplementation.Inordertotransform
theprojectdeliverablesintoafullend-to-endembeddedsystem,multipleitemsthatwereinthe
proposedandsimulateddesignbutnotinthefinalimplementationmustbetakenintoaccount.First,
thevoxelizationsoftwarewasnotfullydevelopedinCandthuswasnotimplementedinPetaLinux.This
isduetotimeconstraintsandprojectscope.Thisholdsequallytrueforthebitmapgenerationsoftware,
whichattemptstoutilizemoreresourcessuchasvirtualmemorythantheZynq-7000SoChasavailable
toit.ThedeliverablealsoreliesonaconnectiontoaPCinordertoloadtheprojectionimagesbecause
theUSBconnectivitywiththeLightCrafterusingRNDIScouldnotbeimplementedontheZedBoarddue
totimeandtechnologyconstraints.Althoughmanyattemptsweremadetomendtheconnectionissue,
asolutioncouldnotbefound.Thefunctionaldeliverablereliesonthevoxelizationbeingcompletedin
MATLABandtheLightCrafterbeingconfiguredusingaworkstationPC.
Therearealsovariousitemsthatwerenottakenintoaccountintheinitialdesignprocess.Each
componentofthedesignedsystemreliesonaseparatepowersourcewhileideallyafinalproductwould
utilizeasinglepowersourceresponsibleforeverycomponent.Themotorisalsonotcontrolledbythe
systembutinsteadmustbemanuallystartedafterboththeprojectorandprojectioncontrolsystemare
readyfortherotationtobegin.
63
TheZedboardandZynqSoCprovedtobetheidealplatformfortheresearchanddevelopment
ofthesystem.Thecombinationoftheembeddedprocessorandprogrammablehardwareprovided
flexibilityintheexperimentationanddevelopmentofthedifferentprocessingmodules,allowingfor
changesinthesystemdesign.TheSoCwouldbeidealforacompleteembeddedsystemtoreapthe
benefitsofbothsoftwareandhardwareprocessing.
6.1Futurework
Therearevariouscomponentsofthesystemthatcanbeimproveduponthroughfuturework.
Oneimportantissuethatisapparentwithboththecurrentdesignandphysicalsystemisthelackof
distortioncompensation.Theconeanglehasbeencompensatedforbyusingaconically-distortedhelix
toslicethemodel,howevertheangleofthebeamoutoftheprojectorisnotdirectlytangenttothe
normalvectoroftheprojectorlensandthusneedstobetakenintoaccountbytheslicingalgorithm.
OtherfutureworkwouldinvolveunifyingtheZynqSoCplatformandDLPplatformontoasinglepieceof
hardware.BothsystemsutilizeanFPGAforparallelprocessingandafutureunificationwouldallowthe
twosystemstoshareFPGAfabric,removingtheneedfortheRNDISUSBconnectivityaswellastheneed
tobringtheslicesbackintotheprocessingsystemforthegenerationofbitmaps.Thisalsowouldlower
latencyinthattheLightCrafterwouldnotneedtorelyonitsownonboardLinuxsystem.Inaddition,the
resolutionoftheprojectedimagecanbeimprovedfrom20x20x20forabetterqualityimage.Thismay
requiretheuseofexternalDDR3memoryasopposedtothesoleuseofon-chipblockRAMtomeet
memorycapacityrequirementsofincreasedresolution.
64
References[1] J. Geng, “Three-dimensional display technologies,” Advances in Optics and Photonics, vol. 5, no. 4,
p. 456, 2013. [2] M. David, “New Approach to Volumetric Displays,” The Critical Technologist, 2012. [3] B. G. Blundell, “Volumetric Displays,”AccessScience (McGraw-Hill Education, 2014). [4] J. Yue, F. Jiao and C. Shen. “The key technologies of helix rotating screen volumetric-swept
display system.” 2009, . DOI: 10.1109/ICISE.2009.1227. [5] Scratchapixel. "Introduction to Polygon Meshes." Scratchapixel. 02 Apr. 2015. Web. [6] “Polygon mesh,” Wikipedia, 2017. [Online]. Available:
https://en.wikipedia.org/wiki/Polygon_mesh.[7] J. Xing et al. “Imaging algorithm for volumetric display based on double-helicoid scanning screen.”
2012, . DOI: 10.1109/IBCAST.2012.6177531 [8] M. W. Jones, “The production of volume data from triangular meshes using voxelization,”Computer
Graphics Forum, vol.15, pp. 311-318, 1996. [9] G. Turk, “The Stanford Bunny,” The Stanford Bunny, 2000. [Online]. Available:
http://www.cc.gatech.edu/~turk/bunny/bunny.html. [10] S. Patil and B. Ravi. “Voxel-based representation, display and thickness analysis of intricate shapes.”
2005, . DOI: 10.1109/CAD-CG.2005.86. [11] A. Hughes, “Electric motors and drives: fundamentals, types, and applications.” Kidlington: Elsevier,
2006. [12] F. Reed, “How Do Servo Motors Work,” Jameco Electronics, Belmont, CA. [Online]. Available:
http://www.jameco.com/jameco/workshop/howitworks/how-servo-motors-work.html. [13] B. Lipták,” Instrument Engineers' Handbook.” Boca Raton, FL: CRC Taylor & Francis, 2006. [14] “Geometric Optics for DLP®,” Texas Instruments, Dallas, TX, 2013. [Online]. Available:
http://www.ti.com/lit/an/dlpa044/dlpa044.pdf [15] T. Wilson, “How DLP Sets Work,” HowStuffWorks, 2005. [Online]. Available:
http://electronics.howstuffworks.com/dlp2.htm [16] G. F. Marshall, “Handbook of optical and laser scanning,” Lincoln Laser, Boca Raton, FL: CRC
Press Taylor & Francis, 2012 [17] “DLP vs LCD Projectors - Guide,” Purple Cat - Audio Visual products and installation, Ossett, UK.
[Online]. Available: http://www.purple-cat.co.uk/dlp-or-lcd-projectors-guide [18] Zedboard. http://zedboard.org/sites/default/files/product_spec_images/ZedBoard_RevA_sideA_0_
0%20%281%29_0.jpg [19] "Zynq-7000APSoCFamilyProductTablesandProductSelectionGuide,"Xilinx.[Online].Available:
https://www.xilinx.com/support/documentation/selection-guides/zynq-7000-product-selection-guide.pdf
[20] Xilinx. http://www.wiki.xilinx.com/file/view/block_sata.png/516676974/800x483/block_sata.png [21]"ZedBoard(Zynq™EvaluationandDevelopment)HardwareUser’sGuide,"ZedBoard.[Online].
Available:http://zedboard.org/sites/default/files/documentations/ZedBoard_HW_UG_v2_2.pdf[22] ZedBoard. http://zedboard.org/sites/default/files/product_spec_images/block%20diagram
_0_0.jpg [23] “DLP® LightCrafter™ Evaluation Module (EVM) User's Guide,” Texas Instruments, Dallas, TX,
2014. [Online]. Available: http://www.ti.com/lit/ug/dlpu006e/dlpu006e.pdf [24] Texas Instruments. http://www.ti.com/diagrams/dlplightcrafter_dlp_lightcrafter_board_1.jpg [25] Adam A. “Mesh voxelisation,” MathWorks. [Online].
65
https://www.mathworks.com/matlabcentral/fileexchange/27390-mesh-voxelisation[26] “Porsche,” National University of Singapore STL Library. [Online].
http://www.eng.nus.edu.sg/LCEL/RP/u21/wwwroot/stl_library.htm.[27] “Bitmap Storage,” Microsoft. [Online]. Available: https://msdn.microsoft.com/en-
us/library/windows/desktop/dd183391(v=vs.85).aspx [28] “AXI Reference Guide,” Xilinx, 2011. [Online]. Available: https://www.xilinx.com/support/document
ation/ip_documentation/ug761_axi_reference_guide.pdf
66
Appendices
AppendixA:MATLABSimulationCodeTheSystemSimulationMATLABscriptcanbefoundin:
VDR_MQP_FILES/MATLAB Algorithm and Sims/Mesh_voxelization/VOXELIZE_SLICE_SIMULATION.m
AppendixB:LightCrafterAPICode
TheLightCrafterAPIcodecanbefoundin:VDR_MQP_FILES/PS System/lightcrafter_code_arm/main.c
AppendixC:BitmapGenerationCodeTheBitmapGenerationcodecanbefoundin:
VDR_MQP_FILES/PS System/bmpgen.c
AppendixD:SliceModuleTestCodeTheSliceTestwiththeVGAdisplayVivadoProjectarchivecanbefoundin:
VDR_MQP_FILES/PL System/Slice_Test.xpr.zip
AppendixE:SliceProcessorCode
TheSliceProcessorVivadoProjectarchivecanbefoundin:VDR_MQP_FILES/PL System/Slice_Processor.xpr.zip
AppendixF:EncoderModuleCodeTheEncoderModuleVivadoProjectarchivecanbefoundin:
VDR_MQP_FILES/PL System/Encoder_Module.xpr.zip
AppendixG:FullPLSystemCodeTheFullPLSystemVivadoProjectarchivecanbefoundin:
VDR_MQP_FILES/PL System/Full_PL_System.xpr.zip
AppendixH:WireColorGuideThecolorcodedwiresofthesystemareconnectedtotheZedBoardpinsasseeninthefollowing
image.PleaserefertotheZedBoardHardwareUser'sGuideforpinoutlocations.