<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Theory Archives | Paul Bupe Jr, PhD</title>
	<atom:link href="https://paulbupejr.com/category/theory/feed/" rel="self" type="application/rss+xml" />
	<link>https://paulbupejr.com/category/theory/</link>
	<description>Hardware, software, and everything in between</description>
	<lastBuildDate>Thu, 18 Apr 2024 16:50:16 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://paulbupejr.com/wp-content/uploads/2019/07/cropped-paul_logo@2x-32x32.png</url>
	<title>Theory Archives | Paul Bupe Jr, PhD</title>
	<link>https://paulbupejr.com/category/theory/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>R&#038;D Case Study: Developing the OptiGap Sensor System</title>
		<link>https://paulbupejr.com/developing-the-optigap-sensor-system/</link>
					<comments>https://paulbupejr.com/developing-the-optigap-sensor-system/#comments</comments>
		
		<dc:creator><![CDATA[paulbupe]]></dc:creator>
		<pubDate>Wed, 10 Apr 2024 18:30:19 +0000</pubDate>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Robotics]]></category>
		<category><![CDATA[Theory]]></category>
		<category><![CDATA[3d printer filament]]></category>
		<category><![CDATA[air gap]]></category>
		<category><![CDATA[bend localization]]></category>
		<category><![CDATA[fiber]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[localization]]></category>
		<category><![CDATA[microcontroller]]></category>
		<category><![CDATA[optigap]]></category>
		<category><![CDATA[optigap sensor system]]></category>
		<category><![CDATA[raspberry pi]]></category>
		<category><![CDATA[research]]></category>
		<category><![CDATA[robotics]]></category>
		<category><![CDATA[sensor]]></category>
		<category><![CDATA[Serial]]></category>
		<category><![CDATA[soft robotics]]></category>
		<category><![CDATA[stm32]]></category>
		<category><![CDATA[zeromq]]></category>
		<guid isPermaLink="false">https://paulbupejr.com/?p=890</guid>

					<description><![CDATA[<p><span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> 9</span> <span class="rt-label rt-postfix">minutes</span></span>Update: You can follow the discussion of this article around the web on HN, Adafruit, Hackaday, and Hackster.io! This article explores the research and development journey behind my new sensor system, OptiGap, a key component of my PhD research. I&#8217;m writing this in a storytelling format to offer insights into my decision-making process and the &#8230; <a href="https://paulbupejr.com/developing-the-optigap-sensor-system/" class="more-link">Continue reading <span class="screen-reader-text">R&#38;D Case Study: Developing the OptiGap Sensor System</span></a></p>
<p>The post <a href="https://paulbupejr.com/developing-the-optigap-sensor-system/">R&amp;D Case Study: Developing the OptiGap Sensor System</a> appeared first on <a href="https://paulbupejr.com">Paul Bupe Jr, PhD</a>.</p>
]]></description>
										<content:encoded><![CDATA[<span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> 9</span> <span class="rt-label rt-postfix">minutes</span></span>
<p><strong>Update</strong>: You can follow the discussion of this article around the web on <a href="https://news.ycombinator.com/item?id=40003710" target="_blank" rel="noreferrer noopener">HN</a>, <a href="https://blog.adafruit.com/2024/04/12/making-sensors-for-soft-robotic-applications/" target="_blank" rel="noreferrer noopener">Adafruit</a>, <a href="https://hackaday.com/2024/04/13/__trashed-9/" target="_blank" rel="noreferrer noopener">Hackaday</a>, and <a href="https://www.hackster.io/news/optigap-turns-3d-printer-filament-into-a-bend-sensing-and-localization-system-for-soft-robots-e3352509838d" target="_blank" rel="noreferrer noopener">Hackster.io</a>!</p>



<p>This article explores the research and development journey behind my new sensor system, <a href="https://ieeexplore.ieee.org/document/10161357" target="_blank" rel="noreferrer noopener">OptiGap</a>, a key component of my PhD research. I&#8217;m writing this in a storytelling format to offer insights into my decision-making process and the evolution leading to the final implementation. It should hopefully provide a glimpse into the sometimes-shrouded world of PhD research and may appeal to those curious about the process. For a deeper dive into technical specifics, simulations, and existing research on this subject, my dissertation is <a href="https://ir.library.louisville.edu/etd/4213/" target="_blank" rel="noreferrer noopener">available online here</a>.</p>



<span id="more-890"></span>



<h3 class="wp-block-heading">What does it do?</h3>



<p>In very general terms, this sensor is basically a rope that if bent can tell you where along its length you bent it. The fancy term for that is &#8220;bend localization.&#8221;</p>



<p>OptiGap&#8217;s application is mainly within the realm of soft robotics, which typically involves compliant (or &#8216;squishy&#8217;) systems, where the use of<a href="https://paulbupejr.com/autonomous-robot-design/"> traditional sensors</a> is often not practical. The name OptiGap, a fusion of &#8220;optical&#8221; and &#8220;gap,&#8221; reflects its core principle of utilizing air gaps within flexible optical light pipes to generate coded patterns essential for bend localization. </p>



<h2 class="wp-block-heading">How the OptiGap Sensor System Started</h2>



<p>The idea for OptiGap came about while I was experimenting with light transmission through various light pipes (optical cables) for use as a bend detection sensor. I was initially trying to see how I could effectively &#8220;slow down&#8221; light through the fiber&#8230;a seemingly straightforward task, right?</p>



<p>During this process, I attached a section of clear 3D printer filament (1.75mm TPU) to a piece of tape measure for an experiment and incidentally discovered that when I bent the tape measure (and filament) at the spot where the electrical tape was attached, there was a significant drop in light transmission. I hypothesized that this was because the sticky residue of the electrical tape was causing the filament to stretch, which in turn reduced the light transmission.</p>



<p>To verify this hypothesis, I attached a longer piece of TPU to a tape measure and began bending it at various points to observe how light transmission would change.</p>


<div class="wp-block-image">
<figure data-wp-context="{&quot;imageId&quot;:&quot;69e90058a9351&quot;}" data-wp-interactive="core/image" data-wp-key="69e90058a9351" class="aligncenter size-large wp-lightbox-container"><img fetchpriority="high" decoding="async" width="768" height="1024" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://paulbupejr.com/wp-content/uploads/2024/04/black_tape-768x1024.jpg" alt="Tape measure experiment for OptiGap" class="wp-image-891" style="aspect-ratio:4/3;object-fit:cover" srcset="https://paulbupejr.com/wp-content/uploads/2024/04/black_tape-768x1024.jpg 768w, https://paulbupejr.com/wp-content/uploads/2024/04/black_tape-225x300.jpg 225w, https://paulbupejr.com/wp-content/uploads/2024/04/black_tape-1152x1536.jpg 1152w, https://paulbupejr.com/wp-content/uploads/2024/04/black_tape-1536x2048.jpg 1536w, https://paulbupejr.com/wp-content/uploads/2024/04/black_tape-scaled.jpg 1920w" sizes="(max-width: 768px) 100vw, 768px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="Enlarge"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button><figcaption class="wp-element-caption">Tape measure experiment with clear TPU filament.</figcaption></figure>
</div>


<p>I wrote a small Linux I2C driver for the <a href="https://www.st.com/en/imaging-and-photonics-solutions/vl53l0x.html">VL53L0X </a>ToF sensor to run on a <a href="https://zeromq.org/" target="_blank" rel="noreferrer noopener">Raspberry Pi</a> and push the data to a socket using <a href="https://zeromq.org/">ZeroMQ</a>. I then created a rough GUI in Python to pull the sensor data from the socket and visualize the light transmission data in realtime, shown in the GIF below, which very quickly validated my hypothesis. This validation marked the &#8220;Eureka!&#8221; moment that sparked the eventual development of the OptiGap sensor.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="800" height="450" src="https://paulbupejr.com/wp-content/uploads/2024/04/tape.gif" alt="Initial OptiGap discovery" class="wp-image-893"/><figcaption class="wp-element-caption">My excited face while validating my discovery.</figcaption></figure>



<h2 class="wp-block-heading">The OptiGap Realization</h2>



<p>I realized that since I could control where the light was being attenuated, I could use this to encode information about the position of the bend on the sensor. Using electrical tape was not a practical solution, so I started looking for a more reliable and consistent way to create these attenuations. This led me to the idea of cutting the filament and then reattaching it together using a flexible rubber (silicone) sleeve, leaving a small air gap, as shown in the image below.</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;69e90058aa007&quot;}" data-wp-interactive="core/image" data-wp-key="69e90058aa007" class="wp-block-image size-large wp-lightbox-container"><img decoding="async" width="1024" height="337" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://paulbupejr.com/wp-content/uploads/2024/04/tpu_gap-1024x337.jpg" alt="Proof-of-concept showing a light pipe with an air in a silicone sleeve." class="wp-image-895" srcset="https://paulbupejr.com/wp-content/uploads/2024/04/tpu_gap-1024x337.jpg 1024w, https://paulbupejr.com/wp-content/uploads/2024/04/tpu_gap-300x99.jpg 300w, https://paulbupejr.com/wp-content/uploads/2024/04/tpu_gap-768x252.jpg 768w, https://paulbupejr.com/wp-content/uploads/2024/04/tpu_gap-1536x505.jpg 1536w, https://paulbupejr.com/wp-content/uploads/2024/04/tpu_gap.jpg 1600w" sizes="(max-width: 1024px) 100vw, 1024px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="Enlarge"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button><figcaption class="wp-element-caption">Proof-of-concept showing a light pipe with an air gap in a silicone sleeve.</figcaption></figure>



<p>The main working principle of the air gap is that translation and/or rotation of one light pipe face relative to the other changes the fraction of light transmitted across the gap. The greater the bend angle, the more light escapes across the gap. The resulting change in intensity of the optical signal can then be correlated with known patterns for use as a sensor.</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;69e90058aa3ce&quot;}" data-wp-interactive="core/image" data-wp-key="69e90058aa3ce" class="wp-block-image size-large wp-lightbox-container"><img loading="lazy" decoding="async" width="1024" height="633" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://paulbupejr.com/wp-content/uploads/2024/04/operating_principle-1024x633.png" alt="OptiGap operating principle" class="wp-image-896" srcset="https://paulbupejr.com/wp-content/uploads/2024/04/operating_principle-1024x633.png 1024w, https://paulbupejr.com/wp-content/uploads/2024/04/operating_principle-300x185.png 300w, https://paulbupejr.com/wp-content/uploads/2024/04/operating_principle-768x474.png 768w, https://paulbupejr.com/wp-content/uploads/2024/04/operating_principle-1536x949.png 1536w, https://paulbupejr.com/wp-content/uploads/2024/04/operating_principle-825x510.png 825w, https://paulbupejr.com/wp-content/uploads/2024/04/operating_principle.png 1693w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="Enlarge"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button><figcaption class="wp-element-caption">This image is from a COMSOL simulation I made.</figcaption></figure>



<h2 class="wp-block-heading">The Big Idea</h2>



<p>I then proceeded to test this idea by creating multiple air gaps in a row and bending the filament to measure the attenuation.</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;69e90058aab19&quot;}" data-wp-interactive="core/image" data-wp-key="69e90058aab19" class="wp-block-image size-large is-style-default wp-lightbox-container"><img loading="lazy" decoding="async" width="1024" height="631" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://paulbupejr.com/wp-content/uploads/2024/04/tpu_tof-1-1024x631.jpg" alt="Multiple air gaps along a single TPU lightpipe" class="wp-image-898" srcset="https://paulbupejr.com/wp-content/uploads/2024/04/tpu_tof-1-1024x631.jpg 1024w, https://paulbupejr.com/wp-content/uploads/2024/04/tpu_tof-1-300x185.jpg 300w, https://paulbupejr.com/wp-content/uploads/2024/04/tpu_tof-1-768x474.jpg 768w, https://paulbupejr.com/wp-content/uploads/2024/04/tpu_tof-1-1536x947.jpg 1536w, https://paulbupejr.com/wp-content/uploads/2024/04/tpu_tof-1-2048x1263.jpg 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="Enlarge"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button><figcaption class="wp-element-caption">Multiple air gaps along a single TPU lightpipe.</figcaption></figure>



<p>As depicted in the GIF below, the optical intensity decreases at each air gap, with a more noticeable decrease as the bend angle increases. This initial experimentation served as proof of concept, demonstrating the feasibility of the idea. It led to the formulation of my final hypothesis of <strong>utilizing a pattern of these air gaps to encode information regarding the sensor&#8217;s bending and employing a naive Bayes classifier on a microcontroller to decode the bend location.</strong></p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="800" height="450" src="https://paulbupejr.com/wp-content/uploads/2024/04/gaps.gif" alt="Validating the attenuation at the air gaps." class="wp-image-899"/><figcaption class="wp-element-caption">Validating the attenuation at the air gaps.</figcaption></figure>



<p>This concept resembles the functionality of a linear encoder. Linear encoders gauge an object&#8217;s linear movement, typically comprising a slider rail with a coded scale akin to a measuring ruler and a sensing head that moves across this scale to read it. Linear (absolute) encoders emit a distinct code at each position, ensuring consistent identification of displacement.</p>


<div class="wp-block-image">
<figure data-wp-context="{&quot;imageId&quot;:&quot;69e90058ab1c2&quot;}" data-wp-interactive="core/image" data-wp-key="69e90058ab1c2" class="aligncenter size-full wp-lightbox-container"><img loading="lazy" decoding="async" width="519" height="417" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://paulbupejr.com/wp-content/uploads/2024/04/block_diagram.png" alt="OptiGap system overview." class="wp-image-900" srcset="https://paulbupejr.com/wp-content/uploads/2024/04/block_diagram.png 519w, https://paulbupejr.com/wp-content/uploads/2024/04/block_diagram-300x241.png 300w" sizes="auto, (max-width: 519px) 100vw, 519px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="Enlarge"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button><figcaption class="wp-element-caption">OptiGap system overview.</figcaption></figure>
</div>


<p>The OptiGap system, functioning like an absolute encoder, would encode absolute positions using patterns of bend-sensitive air gaps along parallel light pipes, effectively serving as a singular fiber optic sensor.</p>



<h3 class="wp-block-heading"><strong>Encoding the Bend Location using Inverse Gray Code</strong></h3>



<p>Absolute encoders commonly employ Gray code, a binary system where two successive values differ in only one bit. This property allows for various applications, including error checking. However, Gray code isn&#8217;t optimal for the OptiGap sensor system. Here, we aim for consecutive values to differ by the maximum number of bits to facilitate easier differentiation. This necessity gave rise to Inverse Gray code.</p>


<div class="wp-block-image">
<figure class="aligncenter size-medium"><img loading="lazy" decoding="async" width="300" height="180" src="https://paulbupejr.com/wp-content/uploads/2024/04/Gray-Code-300x180.jpg" alt="" class="wp-image-902" srcset="https://paulbupejr.com/wp-content/uploads/2024/04/Gray-Code-300x180.jpg 300w, https://paulbupejr.com/wp-content/uploads/2024/04/Gray-Code-1024x615.jpg 1024w, https://paulbupejr.com/wp-content/uploads/2024/04/Gray-Code-768x461.jpg 768w, https://paulbupejr.com/wp-content/uploads/2024/04/Gray-Code.jpg 1176w" sizes="auto, (max-width: 300px) 100vw, 300px" /></figure>
</div>


<p>Inverse Gray code is a binary code where two successive values differ by the maximum (n-1) number of bits. To implement this, I simply create cuts in the filament wherever there&#8217;s a &#8220;1&#8221; in the Inverse Gray code sequence. This approach can scale to any bit number. For the prototype, I utilized 3 bits, providing 8 possible positions.</p>



<h3 class="wp-block-heading">Visualization of the OptiGap Sensor System</h3>



<p>The illustration below depicts the signal patterns of the OptiGap sensor system for each bend position using three fibers. By employing a naive Bayes classifier, the sensor system can discern bend positions based on signal patterns. The third graph represents actual sensor data from the prototype system, utilized for training the classifier on the microcontroller.</p>


<div class="wp-block-image">
<figure data-wp-context="{&quot;imageId&quot;:&quot;69e90058abb4b&quot;}" data-wp-interactive="core/image" data-wp-key="69e90058abb4b" class="aligncenter size-full wp-lightbox-container"><img loading="lazy" decoding="async" width="519" height="448" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://paulbupejr.com/wp-content/uploads/2024/04/signal_patterns.png" alt="OptiGap bending patterns." class="wp-image-903" srcset="https://paulbupejr.com/wp-content/uploads/2024/04/signal_patterns.png 519w, https://paulbupejr.com/wp-content/uploads/2024/04/signal_patterns-300x259.png 300w" sizes="auto, (max-width: 519px) 100vw, 519px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="Enlarge"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button><figcaption class="wp-element-caption">OptiGap bending patterns.</figcaption></figure>
</div>


<h2 class="wp-block-heading">The OptiGap Prototype</h2>



<p>I proceeded to construct a prototype of the OptiGap sensor system, utilizing 3 strands of clear TPU 3D printer filament, each featuring a distinct pattern of air gaps. The image below showcases the filament just before cutting, with the cut pattern indicated on a piece of tape.</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;69e90058ac1ac&quot;}" data-wp-interactive="core/image" data-wp-key="69e90058ac1ac" class="wp-block-image size-large wp-lightbox-container"><img loading="lazy" decoding="async" width="1024" height="156" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://paulbupejr.com/wp-content/uploads/2024/04/making_cuts-1024x156.jpg" alt="Beginning stages of an OptiGap sensor prototype." class="wp-image-905" srcset="https://paulbupejr.com/wp-content/uploads/2024/04/making_cuts-1024x156.jpg 1024w, https://paulbupejr.com/wp-content/uploads/2024/04/making_cuts-300x46.jpg 300w, https://paulbupejr.com/wp-content/uploads/2024/04/making_cuts-768x117.jpg 768w, https://paulbupejr.com/wp-content/uploads/2024/04/making_cuts-1536x234.jpg 1536w, https://paulbupejr.com/wp-content/uploads/2024/04/making_cuts-2048x312.jpg 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="Enlarge"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button><figcaption class="wp-element-caption">Beginning stages of an OptiGap sensor prototype.</figcaption></figure>



<p>For the prototype, I employed a commercial 3:1 fiber optic coupler to merge the light from the 3 strands into a single fiber optic cable, resulting in the completion of the sensor prototype, as depicted below.</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;69e90058ac703&quot;}" data-wp-interactive="core/image" data-wp-key="69e90058ac703" class="wp-block-image size-large wp-lightbox-container"><img loading="lazy" decoding="async" width="1024" height="842" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://paulbupejr.com/wp-content/uploads/2024/04/first_assembled_prototype-1024x842.jpg" alt="Assembled sensing head of an OptiGap sensor." class="wp-image-906" srcset="https://paulbupejr.com/wp-content/uploads/2024/04/first_assembled_prototype-1024x842.jpg 1024w, https://paulbupejr.com/wp-content/uploads/2024/04/first_assembled_prototype-300x247.jpg 300w, https://paulbupejr.com/wp-content/uploads/2024/04/first_assembled_prototype-768x632.jpg 768w, https://paulbupejr.com/wp-content/uploads/2024/04/first_assembled_prototype-1536x1264.jpg 1536w, https://paulbupejr.com/wp-content/uploads/2024/04/first_assembled_prototype-2048x1685.jpg 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="Enlarge"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button><figcaption class="wp-element-caption">Assembled sensing head of an OptiGap sensor.</figcaption></figure>



<p>This marked the final phase of validating the hypothesis and operational theory behind the OptiGap sensor.</p>



<h3 class="wp-block-heading">Reducing the Physical Size</h3>



<p>The initial prototype proved to be large and bulky, primarily due to the size of the 3D printer filament used. Drawing from previous experience, I recognized that PMMA (plastic) optical fiber offered a smaller and more flexible alternative suitable for this application. Consequently, I assessed 500, 750, and 1000 micron unjacketed PMMA optical fibers from Industrial Fiber Optics, Inc. for the sensor strands, resulting in a significant reduction in sensor size.</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;69e90058acd4f&quot;}" data-wp-interactive="core/image" data-wp-key="69e90058acd4f" class="wp-block-image size-large wp-lightbox-container"><img loading="lazy" decoding="async" width="1024" height="544" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://paulbupejr.com/wp-content/uploads/2024/04/fiber_label-1024x544.jpg" alt="500 micron PMMA fiber spool." class="wp-image-907" srcset="https://paulbupejr.com/wp-content/uploads/2024/04/fiber_label-1024x544.jpg 1024w, https://paulbupejr.com/wp-content/uploads/2024/04/fiber_label-300x159.jpg 300w, https://paulbupejr.com/wp-content/uploads/2024/04/fiber_label-768x408.jpg 768w, https://paulbupejr.com/wp-content/uploads/2024/04/fiber_label-1536x815.jpg 1536w, https://paulbupejr.com/wp-content/uploads/2024/04/fiber_label-2048x1087.jpg 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="Enlarge"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button><figcaption class="wp-element-caption">500 micron PMMA fiber spool.</figcaption></figure>



<p>I conducted tests on all three types of fibers to evaluate their light transmission and flexibility. Among them, the 500 micron fiber emerged as the optimal choice overall, although all three exhibited sufficient flexibility for this application.</p>



<h3 class="wp-block-heading"><strong>Reducing the Optical Transceiver Complexity</strong></h3>



<p>I decided to switch from using the complex VL53L0X ToF sensor to a simple photodiode and IR LED setup to reduce the complexity of the system and to increase modularity. This also allowed me to use a &nbsp;microcontroller to read the sensor data, which was a significant improvement over the initial prototype.</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;69e90058ad2cf&quot;}" data-wp-interactive="core/image" data-wp-key="69e90058ad2cf" class="wp-block-image size-large wp-lightbox-container"><img loading="lazy" decoding="async" width="1024" height="792" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://paulbupejr.com/wp-content/uploads/2024/04/new_fiber_tx-1024x792.jpg" alt="IR LED prototype board." class="wp-image-908" style="aspect-ratio:4/3;object-fit:cover" srcset="https://paulbupejr.com/wp-content/uploads/2024/04/new_fiber_tx-1024x792.jpg 1024w, https://paulbupejr.com/wp-content/uploads/2024/04/new_fiber_tx-300x232.jpg 300w, https://paulbupejr.com/wp-content/uploads/2024/04/new_fiber_tx-768x594.jpg 768w, https://paulbupejr.com/wp-content/uploads/2024/04/new_fiber_tx-1536x1188.jpg 1536w, https://paulbupejr.com/wp-content/uploads/2024/04/new_fiber_tx-2048x1584.jpg 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="Enlarge"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button><figcaption class="wp-element-caption">IR LED prototype board with 1000 micron PMMA fiber.</figcaption></figure>



<p>I then created a demo system for the sensor based around an STM32 microcontroller and a photodiode/IR LED setup.</p>


<div class="wp-block-image">
<figure data-wp-context="{&quot;imageId&quot;:&quot;69e90058ad6fc&quot;}" data-wp-interactive="core/image" data-wp-key="69e90058ad6fc" class="aligncenter size-full wp-lightbox-container"><img loading="lazy" decoding="async" width="519" height="298" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://paulbupejr.com/wp-content/uploads/2024/04/demo_system.png" alt="Full OptiGap demo system using 500 micron PMMA fiber." class="wp-image-909" srcset="https://paulbupejr.com/wp-content/uploads/2024/04/demo_system.png 519w, https://paulbupejr.com/wp-content/uploads/2024/04/demo_system-300x172.png 300w" sizes="auto, (max-width: 519px) 100vw, 519px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="Enlarge"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button><figcaption class="wp-element-caption">Full OptiGap demo system using 500 micron PMMA fiber.</figcaption></figure>
</div>


<h2 class="wp-block-heading"><strong>Realtime Machine Learning on a Microcontroller</strong></h2>



<p>The final stage in developing the OptiGap sensor system involved integrating a naive Bayes classifier onto the STM32 microcontroller to decode the bend location from the sensor data. <strong><em>I opted for a naive Bayes classifier due to its efficiency compared to if-statements or lookup tables, its capability to handle new or previously unseen data, and its potential for increased accuracy by considering relationships between multiple input variables.</em></strong></p>



<p>Implementing the naive Bayes classifier proved to be relatively straightforward. This classifier is a probabilistic model based on applying Bayes&#8217; theorem to determine how a measurement can be assigned to a particular class, with the class representing the bend location in this context. I utilized the <a href="https://www.arm.com/technologies/cmsis">Arm CMSIS-DSP library</a> for the classifier implementation.</p>



<h3 class="wp-block-heading">Fitting the Sensor Data</h3>



<p>The initial step in integrating the classifier was to fit the sensor data to a Gaussian distribution for each air gap pattern. To expedite this process, I developed a Python GUI for rapid labeling and fitting of the data using GNB (Gaussian Naive Bayes) from the scikit-learn library.</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;69e90058adcf2&quot;}" data-wp-interactive="core/image" data-wp-key="69e90058adcf2" class="wp-block-image size-large wp-lightbox-container"><img loading="lazy" decoding="async" width="1024" height="452" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://paulbupejr.com/wp-content/uploads/2024/04/ui_2-1024x452.jpg" alt="Initial data labeling and fitting UI." class="wp-image-910" srcset="https://paulbupejr.com/wp-content/uploads/2024/04/ui_2-1024x452.jpg 1024w, https://paulbupejr.com/wp-content/uploads/2024/04/ui_2-300x132.jpg 300w, https://paulbupejr.com/wp-content/uploads/2024/04/ui_2-768x339.jpg 768w, https://paulbupejr.com/wp-content/uploads/2024/04/ui_2.jpg 1431w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="Enlarge"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button><figcaption class="wp-element-caption">Initial data labeling and fitting UI.</figcaption></figure>



<p>I later improved this UI to be more general and to allow for more complex data fitting.</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;69e90058ae145&quot;}" data-wp-interactive="core/image" data-wp-key="69e90058ae145" class="wp-block-image size-large wp-lightbox-container"><img loading="lazy" decoding="async" width="1024" height="511" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://paulbupejr.com/wp-content/uploads/2024/04/ui-1024x511.jpg" alt="Improved UI." class="wp-image-911" srcset="https://paulbupejr.com/wp-content/uploads/2024/04/ui-1024x511.jpg 1024w, https://paulbupejr.com/wp-content/uploads/2024/04/ui-300x150.jpg 300w, https://paulbupejr.com/wp-content/uploads/2024/04/ui-768x383.jpg 768w, https://paulbupejr.com/wp-content/uploads/2024/04/ui.jpg 1453w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="Enlarge"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button><figcaption class="wp-element-caption">Improved UI.</figcaption></figure>



<p>The probabilities for each class were computed and saved as a header for use on the microcontroller.</p>



<h3 class="wp-block-heading">Filtering the Sensor Data</h3>



<p>To enhance the accuracy of the classifier, I implemented a two-stage filtering process on the STM32 . The initial stage involved a basic moving average filter, followed by a Kalman filter in the second stage. </p>


<div class="wp-block-image">
<figure data-wp-context="{&quot;imageId&quot;:&quot;69e90058ae850&quot;}" data-wp-interactive="core/image" data-wp-key="69e90058ae850" class="aligncenter size-full wp-lightbox-container"><img loading="lazy" decoding="async" width="554" height="190" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://paulbupejr.com/wp-content/uploads/2024/04/dsp.jpg" alt="Signal filtering stages." class="wp-image-913" srcset="https://paulbupejr.com/wp-content/uploads/2024/04/dsp.jpg 554w, https://paulbupejr.com/wp-content/uploads/2024/04/dsp-300x103.jpg 300w" sizes="auto, (max-width: 554px) 100vw, 554px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="Enlarge"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button><figcaption class="wp-element-caption">Signal filtering stages. Noise reduction relative to input signal.</figcaption></figure>
</div>


<h2 class="wp-block-heading">The OptiGap Sensor System Demo</h2>



<p>The GIFs provided below illustrate various stages of the OptiGap sensor system, encompassing assembly and the operational demonstration of the final sensor system.</p>



<h4 class="wp-block-heading has-text-align-center">System Overview</h4>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="800" height="450" src="https://paulbupejr.com/wp-content/uploads/2024/04/System_Overview.gif" alt="" class="wp-image-914"/></figure>



<h4 class="wp-block-heading has-text-align-center">Assembly of an OptiGap Sensor using TPU Filament</h4>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="800" height="450" src="https://paulbupejr.com/wp-content/uploads/2024/04/Assembly.gif" alt="" class="wp-image-915"/></figure>



<h4 class="wp-block-heading has-text-align-center">Attenuation of Light through the OptiGap Sensor</h4>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="800" height="450" src="https://paulbupejr.com/wp-content/uploads/2024/04/Attenuation.gif" alt="" class="wp-image-916"/></figure>



<h4 class="wp-block-heading has-text-align-center"><strong>Fitting of the Sensor Data</strong></h4>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="800" height="450" src="https://paulbupejr.com/wp-content/uploads/2024/04/Training.gif" alt="" class="wp-image-918"/></figure>



<h4 class="wp-block-heading has-text-align-center"><strong>Segment Classification using PMMA Optical Fiber</strong></h4>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="800" height="450" src="https://paulbupejr.com/wp-content/uploads/2024/04/Segment_Classification.gif" alt="" class="wp-image-919"/></figure>



<h4 class="wp-block-heading has-text-align-center"><strong>Segment Classification using TPU Filament</strong></h4>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="800" height="450" src="https://paulbupejr.com/wp-content/uploads/2024/04/Validation.gif" alt="" class="wp-image-920"/></figure>



<h4 class="wp-block-heading has-text-align-center"><strong>Underwater Operation</strong></h4>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="800" height="450" src="https://paulbupejr.com/wp-content/uploads/2024/04/Underwater_Validation.gif" alt="" class="wp-image-921"/></figure>



<h2 class="wp-block-heading">OptiGap Design Specifications</h2>



<h3 class="wp-block-heading has-text-align-center">Key Properties &amp; Parameters</h3>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="191" src="https://paulbupejr.com/wp-content/uploads/2024/04/properties-1024x191.png" alt="" class="wp-image-979" srcset="https://paulbupejr.com/wp-content/uploads/2024/04/properties-1024x191.png 1024w, https://paulbupejr.com/wp-content/uploads/2024/04/properties-300x56.png 300w, https://paulbupejr.com/wp-content/uploads/2024/04/properties-768x143.png 768w, https://paulbupejr.com/wp-content/uploads/2024/04/properties.png 1176w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<h3 class="wp-block-heading has-text-align-center">Material Recommendations</h3>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="636" src="https://paulbupejr.com/wp-content/uploads/2024/04/materails-1024x636.png" alt="" class="wp-image-980" srcset="https://paulbupejr.com/wp-content/uploads/2024/04/materails-1024x636.png 1024w, https://paulbupejr.com/wp-content/uploads/2024/04/materails-300x186.png 300w, https://paulbupejr.com/wp-content/uploads/2024/04/materails-768x477.png 768w, https://paulbupejr.com/wp-content/uploads/2024/04/materails.png 1174w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<h2 class="wp-block-heading">Next Steps</h2>



<p>I&#8217;ve made significant progress on the OptiGap system beyond what&#8217;s documented here, including its integration into another modular actuation and sensing system I developed called EneGate.</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;69e90058afb91&quot;}" data-wp-interactive="core/image" data-wp-key="69e90058afb91" class="wp-block-image size-large wp-lightbox-container"><img loading="lazy" decoding="async" width="1024" height="814" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://paulbupejr.com/wp-content/uploads/2024/04/enegate_optigap-1024x814.jpg" alt="" class="wp-image-922" srcset="https://paulbupejr.com/wp-content/uploads/2024/04/enegate_optigap-1024x814.jpg 1024w, https://paulbupejr.com/wp-content/uploads/2024/04/enegate_optigap-300x239.jpg 300w, https://paulbupejr.com/wp-content/uploads/2024/04/enegate_optigap-768x611.jpg 768w, https://paulbupejr.com/wp-content/uploads/2024/04/enegate_optigap-1536x1221.jpg 1536w, https://paulbupejr.com/wp-content/uploads/2024/04/enegate_optigap-2048x1628.jpg 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="Enlarge"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button><figcaption class="wp-element-caption">My EneGate PCB integrating an OptiGap sensor.</figcaption></figure>



<p>This has involved custom PCB design and systems integration, detailed in my dissertation. Additionally, I&#8217;ve prototyped miniature PCB versions of the optics to interface with the PCBs for the EneGate system.</p>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex">
<figure data-wp-context="{&quot;imageId&quot;:&quot;69e90058aff71&quot;}" data-wp-interactive="core/image" data-wp-key="69e90058aff71" class="wp-block-image size-large wp-lightbox-container"><img loading="lazy" decoding="async" width="1024" height="768" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" data-id="924" src="https://paulbupejr.com/wp-content/uploads/2024/04/daughterboard-1024x768.jpg" alt="" class="wp-image-924" srcset="https://paulbupejr.com/wp-content/uploads/2024/04/daughterboard-1024x768.jpg 1024w, https://paulbupejr.com/wp-content/uploads/2024/04/daughterboard-300x225.jpg 300w, https://paulbupejr.com/wp-content/uploads/2024/04/daughterboard-768x576.jpg 768w, https://paulbupejr.com/wp-content/uploads/2024/04/daughterboard-1536x1152.jpg 1536w, https://paulbupejr.com/wp-content/uploads/2024/04/daughterboard.jpg 1600w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="Enlarge"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button><figcaption class="wp-element-caption">Mini OptiGap PCB</figcaption></figure>



<figure data-wp-context="{&quot;imageId&quot;:&quot;69e90058b02de&quot;}" data-wp-interactive="core/image" data-wp-key="69e90058b02de" class="wp-block-image size-large wp-lightbox-container"><img loading="lazy" decoding="async" width="907" height="599" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" data-id="923" src="https://paulbupejr.com/wp-content/uploads/2024/04/enegate_optigap_pcb.jpg" alt="" class="wp-image-923" srcset="https://paulbupejr.com/wp-content/uploads/2024/04/enegate_optigap_pcb.jpg 907w, https://paulbupejr.com/wp-content/uploads/2024/04/enegate_optigap_pcb-300x198.jpg 300w, https://paulbupejr.com/wp-content/uploads/2024/04/enegate_optigap_pcb-768x507.jpg 768w" sizes="auto, (max-width: 907px) 100vw, 907px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="Enlarge"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button><figcaption class="wp-element-caption">Another mini OptiGap PCB</figcaption></figure>
</figure>



<p>I&#8217;ve also validated OptiGap on a real-world soft robotic system, with full details set to be presented in an upcoming RoboSoft paper titled &#8220;<strong><em>Embedded Optical Waveguide Sensors for Dynamic Behavior Monitoring in Twisted-Beam Structures.</em></strong>&#8220;</p>



<h3 class="wp-block-heading"><strong>Commercialization</strong></h3>



<p>There&#8217;s an ongoing commercialization aspect to this research as well. Feel free to reach out if you&#8217;re interested in further details.</p>



<h2 class="wp-block-heading">That&#8217;s it for now!</h2>



<p>I don&#8217;t want to make this too long so I&#8217;ll end here. I hope this provided some insight into the research and development process involved in something like this. If you have any questions or would like to learn more, don&#8217;t hesitate to contact me!</p>
<p>The post <a href="https://paulbupejr.com/developing-the-optigap-sensor-system/">R&amp;D Case Study: Developing the OptiGap Sensor System</a> appeared first on <a href="https://paulbupejr.com">Paul Bupe Jr, PhD</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://paulbupejr.com/developing-the-optigap-sensor-system/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
			</item>
		<item>
		<title>Soldering to Shape Memory Alloy (SMA) Wire is Really Hard</title>
		<link>https://paulbupejr.com/soldering-to-shape-memory-alloy-sma-wire-is-really-hard/</link>
					<comments>https://paulbupejr.com/soldering-to-shape-memory-alloy-sma-wire-is-really-hard/#respond</comments>
		
		<dc:creator><![CDATA[paulbupe]]></dc:creator>
		<pubDate>Mon, 23 May 2022 18:26:08 +0000</pubDate>
				<category><![CDATA[Theory]]></category>
		<category><![CDATA[anisotropic]]></category>
		<category><![CDATA[nitinol]]></category>
		<category><![CDATA[nitinol wire]]></category>
		<category><![CDATA[SCRAM]]></category>
		<category><![CDATA[scrambots]]></category>
		<category><![CDATA[sem]]></category>
		<category><![CDATA[shape memory alloy]]></category>
		<category><![CDATA[shape memory alloy wire]]></category>
		<category><![CDATA[sma]]></category>
		<category><![CDATA[sma flux]]></category>
		<category><![CDATA[sma solder]]></category>
		<category><![CDATA[sma soldering]]></category>
		<category><![CDATA[sma wire]]></category>
		<category><![CDATA[solder]]></category>
		<guid isPermaLink="false">https://paulbupejr.com/?p=813</guid>

					<description><![CDATA[<p><span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> 2</span> <span class="rt-label rt-postfix">minutes</span></span>Over the past couple of years we&#8217;ve been working on a rather cool new class of robots called Soft Curved Reconfigurable Anisotropic Mechanism(s), or SCRAM, under this National Science Foundation EFRI project. For my latest paper, Electronically Reconfigurable Virtual Joints by Shape Memory Alloy-Induced Buckling of Curved Sheets, I spent a lot of time working &#8230; <a href="https://paulbupejr.com/soldering-to-shape-memory-alloy-sma-wire-is-really-hard/" class="more-link">Continue reading <span class="screen-reader-text">Soldering to Shape Memory Alloy (SMA) Wire is Really Hard</span></a></p>
<p>The post <a href="https://paulbupejr.com/soldering-to-shape-memory-alloy-sma-wire-is-really-hard/">Soldering to Shape Memory Alloy (SMA) Wire is Really Hard</a> appeared first on <a href="https://paulbupejr.com">Paul Bupe Jr, PhD</a>.</p>
]]></description>
										<content:encoded><![CDATA[<span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> 2</span> <span class="rt-label rt-postfix">minutes</span></span>
<p>Over the past couple of years<a href="https://www.scrambots.com/team" target="_blank" rel="noreferrer noopener"> we&#8217;ve</a> been working on a rather cool new class of robots called Soft Curved Reconfigurable Anisotropic Mechanism(s), or SCRAM, under this <a href="https://www.nsf.gov/awardsearch/showAward?AWD_ID=1935324&amp;HistoricalAwards=false" target="_blank" rel="noreferrer noopener">National Science Foundation EFRI project</a>. For my latest paper, <a href="https://ieeexplore.ieee.org/document/9763962" target="_blank" rel="noreferrer noopener">Electronically Reconfigurable Virtual Joints by Shape Memory Alloy-Induced Buckling of Curved Sheets</a>, I spent a lot of time working with shape memory alloy (SMA) wire while developing a SCRAM device. Much of this time was spent trying to figure out exactly how to solder to SMA wire, specifically a nickel (Ni) &#8211; titanium (Ti) alloy called nitinol. My conclusion after all that time? Soldering to SMA wire is really hard! </p>



<span id="more-813"></span>



<h4 class="wp-block-heading">Visualizing an SMA Wire Solder Joint</h4>



<p>Soldering to SMA wire is hard due to the tough oxide layer on the surface. Solder beads off the wire as if trying to solder to glass! This can be seen in the two SEM images below (shout-out to the research facilities at the University of Louisville). I prepared two samples by tying some stranded wire around a piece of SMA wire (with the oxide layer ground off) and a piece of standard hook-up wire (tin-coated copper). I then applied some non-acidic flux followed by a healthy blob of tin/silver solder. Finally, I ground down one surface of each wire in order to perform some cross-sectional imaging. </p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="459" src="https://paulbupejr.com/wp-content/uploads/2022/05/comparison-1024x459.png" alt="Soldering to sma wire" class="wp-image-826" srcset="https://paulbupejr.com/wp-content/uploads/2022/05/comparison-1024x459.png 1024w, https://paulbupejr.com/wp-content/uploads/2022/05/comparison-300x134.png 300w, https://paulbupejr.com/wp-content/uploads/2022/05/comparison-768x344.png 768w, https://paulbupejr.com/wp-content/uploads/2022/05/comparison.png 1313w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>It&#8217;s apparent from the images that there is no bond to the SMA wire  (right) while the regular wire (left) has a great bond! </p>



<p></p>



<h4 class="wp-block-heading">Soldering to SMA wire</h4>



<p>The &#8220;easy&#8221; solution is to use a really aggressive acidic flux to eat away the oxide layer when soldering. The main disadvantage of this is the need to <strong>thoroughly </strong>wash the joint with water after soldering. Acidic flux will keep eating away long after soldering so it must be completely washed off! Another option is to use an inert gas as shielding while soldering (as in MIG welding) after grinding away the oxide layer. This again is not practical for most applications. </p>



<p>Here are some tips for soldering to SMA wire without acidic flux based on my aforementioned soldering adventures:</p>



<ul class="wp-block-list"><li>Grind off the oxide layer first to improve wetting. </li><li>Crimping is king. If possible, join wires with a crimp and then apply solder. This produces the most reliable connections.</li><li>&#8220;Tie&#8221; the wire once around the SMA first to create a mechanical hold then apply solder.</li><li>Use a silver alloy solder to increase the chances of proper wetting.</li><li>Use the lowest temperature possible for the solder since heating up the SMA too high will cause an oxide buildup.</li></ul>



<p><a href="https://superiorflux.com/soldering-stainless-steel-components-pcb/" target="_blank" rel="noreferrer noopener">These techniques</a> for soldering to stainless steel actually apply to SMA wire as well so they are worth studying. </p>



<hr class="wp-block-separator"/>



<p><a href="https://harnettlab.org/join-the-lab/" target="_blank" rel="noreferrer noopener">If you enjoy research and things like this interest you then take a look at our lab page for some potential opportunities!</a></p>
<p>The post <a href="https://paulbupejr.com/soldering-to-shape-memory-alloy-sma-wire-is-really-hard/">Soldering to Shape Memory Alloy (SMA) Wire is Really Hard</a> appeared first on <a href="https://paulbupejr.com">Paul Bupe Jr, PhD</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://paulbupejr.com/soldering-to-shape-memory-alloy-sma-wire-is-really-hard/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Indoor Localization &#8211; An Introduction</title>
		<link>https://paulbupejr.com/indoor-localization/</link>
					<comments>https://paulbupejr.com/indoor-localization/#respond</comments>
		
		<dc:creator><![CDATA[paulbupe]]></dc:creator>
		<pubDate>Mon, 06 Jul 2020 16:19:42 +0000</pubDate>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Theory]]></category>
		<category><![CDATA[lidar]]></category>
		<guid isPermaLink="false">http://paulbupejr.com/?p=658</guid>

					<description><![CDATA[<p><span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> 6</span> <span class="rt-label rt-postfix">minutes</span></span>Localization, in the context of robotics, is the process of determining the location of something within an environment. This article serves as a basic introduction to indoor localization, covering the commonly used techniques and technologies. The most well known and widely used method of localization is GPS. Even with its widespread use, GPS is not &#8230; <a href="https://paulbupejr.com/indoor-localization/" class="more-link">Continue reading <span class="screen-reader-text">Indoor Localization &#8211; An Introduction</span></a></p>
<p>The post <a href="https://paulbupejr.com/indoor-localization/">Indoor Localization &#8211; An Introduction</a> appeared first on <a href="https://paulbupejr.com">Paul Bupe Jr, PhD</a>.</p>
]]></description>
										<content:encoded><![CDATA[<span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> 6</span> <span class="rt-label rt-postfix">minutes</span></span>


<p>Localization, in the context of robotics, is the process of determining the location of something within an environment. This article serves as a basic introduction to indoor localization, covering the commonly used techniques and technologies. </p>



<span id="more-658"></span>



<p>The most well known and widely used method of localization is GPS. Even with its widespread use, GPS is not suitable for all applications because it largely relies on line-of-sight (LOS) communication to GPS satellites. In indoor environments, these signals are greatly attenuated by walls and roofs, meaning that GPS often does not work indoors. Even when signals from at least four satellites are received indoors, the localization accuracy is too low to be useful. In lieu of GPS, a large number of indoor localization techniques and real-time locating systems (RTLS) have been developed. These can be grouped into two broad categories: radio-frequency (RF) based (<em>wireless</em>), and non-RF based (<em>non-wireless</em>). </p>



<p>Non-wireless techniques generally use cameras and sensors like Inertial Measurement Units (IMU) and laser distance finders (like <a aria-label="undefined (opens in a new tab)" href="https://en.wikipedia.org/wiki/Lidar" target="_blank" rel="noreferrer noopener">LiDAR</a>) for localization. Cameras can use markers or extract visual features from an environment to perform localization using various techniques including the very common technique known as simultaneous localization and mapping (<a aria-label="undefined (opens in a new tab)" href="https://en.wikipedia.org/wiki/Simultaneous_localization_and_mapping" target="_blank" rel="noreferrer noopener">SLAM</a>). This technique involves building a map of an environment while at the same time localizing in that environment. Data from an IMU and laser scans can also be fused with the visual data to improve accuracy. These techniques are very computationally heavy, require specialized hardware, and are typically used in robotics or autonomous navigation applications (see <a href="https://www.tesla.com/autopilotAI">Tesla</a>, <a aria-label="undefined (opens in a new tab)" href="https://www.bostondynamics.com/spot" target="_blank" rel="noreferrer noopener">Boston Dynamics</a>). This is the same type of localization technique I <a aria-label="undefined (opens in a new tab)" href="https://paulbupejr.com/autonomous-robot-design/" target="_blank" rel="noreferrer noopener">used in my last robot</a> and  <strong><em>I will cover this in more detail in a separate article.</em></strong></p>



<p>Wireless techniques utilize technologies such as Wi-Fi, radio-frequency identification (RFID), Bluetooth, and ultra-wideband (UWB). These technologies are useful for indoor localization because they are already found in existing infrastructure and can be set up at very low cost. Wireless localization techniques can be classified as <strong>range-based</strong>, or <strong>range-free</strong>. </p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="708" height="262" src="https://paulbupejr.com/wp-content/uploads/2020/07/localization_types-1.png" alt="Indoor Localization type - Paul Bupe Jr" class="wp-image-666" title="Indoor Localization Types" srcset="https://paulbupejr.com/wp-content/uploads/2020/07/localization_types-1.png 708w, https://paulbupejr.com/wp-content/uploads/2020/07/localization_types-1-300x111.png 300w" sizes="auto, (max-width: 708px) 100vw, 708px" /></figure>



<h2 class="wp-block-heading">Ranged-based Indoor Localization</h2>



<p>Range-based (or distance-based) techniques are more accurate than range-free and involve measuring the distance from the unknown node being localized to some fixed nodes with known locations, typically called anchors. Most range-based localization algorithms utilize one of the common measurement techniques which fall into two categories: <em>angle-based</em> and <em>distance-based</em>. The most common angle-based measurement technique is Angle of Arrival (AoA) and the main distance measurement techniques are Time of Arrival (ToA), Time Difference of Arrival (TDoA) and Received Signal Strength (RSS).</p>



<h4 class="wp-block-heading">Angle-based Measurement</h4>



<p>AoA measurement techniques calculate the angle (bearing) between the unlocalized node and a fixed anchor with a known location. These measurements are obtained using two main techniques that include (1) measuring the amplitude response of the receiving antenna and (2) measuring the phase response of the receiving antenna. The location of the unknown node is a line having a certain angle from an anchor node &#8212; this requires at least two nodes to calculate the position as shown in the figure below. </p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="767" height="428" src="https://paulbupejr.com/wp-content/uploads/2020/07/aoa-1.png" alt="Angle of Arrival - Paul Bupe Jr" class="wp-image-667" title="Angle of Arrival" srcset="https://paulbupejr.com/wp-content/uploads/2020/07/aoa-1.png 767w, https://paulbupejr.com/wp-content/uploads/2020/07/aoa-1-300x167.png 300w" sizes="auto, (max-width: 767px) 100vw, 767px" /></figure></div>



<p>The accuracy of these measurements is affected by the directivity of the antenna and the environmental NLOS and multipath effects. Since AoA measures angles, it requires direct LOS between the receiver and transmitter because a reflected signal arriving at the receiver can be interpreted as coming from a completely different direction, which can result in very large errors in the measurement.</p>



<h4 class="wp-block-heading">Distance-based Measurement</h4>



<h4 class="has-text-align-center wp-block-heading"><strong>Time of Arrival</strong></h4>



<p>Time of Arrival (ToA) is a technique that calculates distance based on the measured time of arrival of a signal from a transmitting node to a receiving one. This is more formally referred to as a one way propagation time measurement. The primary drawback to this technique is that it requires perfect time synchronization between the clocks of the transmitter and receiver nodes; any difference between the two clocks can become a large error in the distance calculation. Assuming normal conditions (air as the medium and radio waves traveling at the speed of light) a small clock synchronization error of 1ns will relate to a distance measurement error of 0.3m. </p>



<p>One way of overcoming this issue is by measuring the round trip propagation time instead of the one way propagation. The first node sends a signal to a second node which in turn immediately sends that signal back to the first node and the distance is calculated using the round trip time. This removes the need for the transmitter and receiver to have synchronized clocks. The primary issue with this round trip method is the processing delay accrued from the second node receiving the signal then sending it back in turn. This delay is usually known and specified by the manufacturer (or during a calibration process) so it can be subtracted from the measurement at the first node.</p>



<h4 class="has-text-align-center wp-block-heading"><strong>Time Difference of Arrival</strong></h4>



<p>Time Difference of Arrival (TDoA) is another technique that measures propagation time but in this case the difference between the arrival time of a signal at two different fixed receivers is measured. This requires that the location of the two receivers are known and those two receivers also have synchronized clocks. Unlike ToA, there is no need for the clocks between the transmitter and receivers to be in perfect sync.</p>



<h4 class="has-text-align-center wp-block-heading"><strong>Received Signal Strength</strong></h4>



<p>There are two main methods of estimating distance using the Received Signal Strength (RSS): using the path loss log-normal shadowing model and RSS fingerprinting. Distance estimation using the path loss model is accomplished by measuring the signal attenuation as it propagates from the transmitting node to the receiving node. The relationship between distance and signal attenuation is heavily dependent on channel characteristics and as a result requires a very accurate propagation model in order to have acceptable results. The standard log-normal model used in this technique is as follows:</p>



<p><p class="ql-center-displayed-equation" style="line-height: 43px;"><span class="ql-right-eqno"> (1) </span><span class="ql-left-eqno"> &nbsp; </span><img loading="lazy" decoding="async" src="https://paulbupejr.com/wp-content/ql-cache/quicklatex.com-e3a126c90c9732dcbd49aa8ef7c5378c_l3.png" height="43" width="406" class="ql-img-displayed-equation quicklatex-auto-format" alt="&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;&#80;&#95;&#114;&#40;&#100;&#41;&#91;&#100;&#66;&#109;&#93;&#32;&#61;&#32;&#80;&#95;&#48;&#40;&#100;&#95;&#48;&#41;&#91;&#100;&#66;&#109;&#93;&#32;&#45;&#32;&#49;&#48;&#110;&#95;&#112;&#92;&#108;&#111;&#103;&#95;&#123;&#49;&#48;&#125;&#92;&#108;&#101;&#102;&#116;&#40;&#92;&#102;&#114;&#97;&#99;&#123;&#100;&#125;&#123;&#100;&#95;&#48;&#125;&#92;&#114;&#105;&#103;&#104;&#116;&#41;&#32;&#43;&#32;&#88;&#95;&#123;&#92;&#115;&#105;&#103;&#109;&#97;&#125;&#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;" title="Rendered by QuickLaTeX.com"/></p></p>



<p>with <img loading="lazy" decoding="async" src="https://paulbupejr.com/wp-content/ql-cache/quicklatex.com-ff805bc00924fd4f222accc3247403aa_l3.png" class="ql-img-inline-formula quicklatex-auto-format" alt="&#80;&#95;&#48;&#40;&#100;&#95;&#48;&#41;&#91;&#100;&#66;&#109;&#93;" title="Rendered by QuickLaTeX.com" height="19" width="97" style="vertical-align: -5px;"/> being the reference power at distance <img loading="lazy" decoding="async" src="https://paulbupejr.com/wp-content/ql-cache/quicklatex.com-5fe8174ada8a5c941edeea39af840862_l3.png" class="ql-img-inline-formula quicklatex-auto-format" alt="&#100;&#95;&#48;" title="Rendered by QuickLaTeX.com" height="15" width="16" style="vertical-align: -3px;"/> from the transmitter, <img loading="lazy" decoding="async" src="https://paulbupejr.com/wp-content/ql-cache/quicklatex.com-49a560f549b27afd9f22c619dc9456ec_l3.png" class="ql-img-inline-formula quicklatex-auto-format" alt="&#110;&#95;&#112;" title="Rendered by QuickLaTeX.com" height="14" width="18" style="vertical-align: -6px;"/> being the path loss exponent measuring the rate at which the RSS decreases with distance, and <img loading="lazy" decoding="async" src="https://paulbupejr.com/wp-content/ql-cache/quicklatex.com-a8a29ec3c3fc8bd634260fbcf692875d_l3.png" class="ql-img-inline-formula quicklatex-auto-format" alt="&#88;&#95;&#123;&#92;&#115;&#105;&#103;&#109;&#97;&#125;" title="Rendered by QuickLaTeX.com" height="15" width="23" style="vertical-align: -3px;"/> being a zero mean Gaussian random variable with standard deviation <img loading="lazy" decoding="async" src="https://paulbupejr.com/wp-content/ql-cache/quicklatex.com-1c9cc40f96a1492e298e7da85a2c1692_l3.png" class="ql-img-inline-formula quicklatex-auto-format" alt="&#92;&#115;&#105;&#103;&#109;&#97;" title="Rendered by QuickLaTeX.com" height="8" width="11" style="vertical-align: 0px;"/> which accounts for random showing effects.</p>



<h3 class="wp-block-heading">Multilateration</h3>



<p>Multilateration is a core technique for estimating the location of a node using the measured distances to multiple anchors. Traditionally, this is achieved using 3 anchors (for 2D localization) and is referred to as trilateration. The locations of the anchors is assumed to be known and the location of the unknown node is the intersection of the three circles with the center at the location of each anchor and radius equal to the measured distance to the unknown node.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="465" height="403" src="https://paulbupejr.com/wp-content/uploads/2020/07/trilat.png" alt="Trilateration - Paul Bupe Jr" class="wp-image-672" title="Trilateration" srcset="https://paulbupejr.com/wp-content/uploads/2020/07/trilat.png 465w, https://paulbupejr.com/wp-content/uploads/2020/07/trilat-300x260.png 300w" sizes="auto, (max-width: 465px) 100vw, 465px" /></figure></div>



<p>An example of the relationship between the node and anchors is shown in the figure above. In practice the measurements aren&#8217;t always accurate so the circles don&#8217;t intersect at a single point, as shown below.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="476" height="435" src="https://paulbupejr.com/wp-content/uploads/2020/07/trilat2.png" alt="Trilateration 2 - Paul Bupe Jr" class="wp-image-673" title="Trilateration 2" srcset="https://paulbupejr.com/wp-content/uploads/2020/07/trilat2.png 476w, https://paulbupejr.com/wp-content/uploads/2020/07/trilat2-300x274.png 300w" sizes="auto, (max-width: 476px) 100vw, 476px" /></figure></div>



<p>In this case with the locations of the anchors and the estimated distances between the anchors and node known, trilateration then becomes a problem of solving three nonlinear circle equations</p>



<p><p class="ql-center-displayed-equation" style="line-height: 78px;"><span class="ql-right-eqno"> (2) </span><span class="ql-left-eqno"> &nbsp; </span><img loading="lazy" decoding="async" src="https://paulbupejr.com/wp-content/ql-cache/quicklatex.com-ee166ac9cd2b44705bee982e28deb883_l3.png" height="78" width="200" class="ql-img-displayed-equation quicklatex-auto-format" alt="&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#97;&#108;&#105;&#103;&#110;&#101;&#100;&#125;&#40;&#120;&#32;&#45;&#32;&#120;&#95;&#49;&#41;&#94;&#50;&#32;&#43;&#32;&#40;&#121;&#32;&#45;&#32;&#121;&#95;&#49;&#41;&#94;&#50;&#32;&#61;&#32;&#114;&#95;&#49;&#94;&#50;&#92;&#92;&#40;&#120;&#32;&#45;&#32;&#120;&#95;&#50;&#41;&#94;&#50;&#32;&#43;&#32;&#40;&#121;&#32;&#45;&#32;&#121;&#95;&#50;&#41;&#94;&#50;&#32;&#61;&#32;&#114;&#95;&#50;&#94;&#50;&#92;&#92;&#40;&#120;&#32;&#45;&#32;&#120;&#95;&#51;&#41;&#94;&#50;&#32;&#43;&#32;&#40;&#121;&#32;&#45;&#32;&#121;&#95;&#51;&#41;&#94;&#50;&#32;&#61;&#32;&#114;&#95;&#51;&#94;&#50;&#92;&#101;&#110;&#100;&#123;&#97;&#108;&#105;&#103;&#110;&#101;&#100;&#125;&#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;" title="Rendered by QuickLaTeX.com"/></p></p>



<p>where <img loading="lazy" decoding="async" src="https://paulbupejr.com/wp-content/ql-cache/quicklatex.com-662ad98ad51ca9c464529fd64dbea5d4_l3.png" class="ql-img-inline-formula quicklatex-auto-format" alt="&#40;&#120;&#95;&#49;&#44;&#32;&#121;&#95;&#49;&#41;" title="Rendered by QuickLaTeX.com" height="19" width="54" style="vertical-align: -5px;"/>, <img loading="lazy" decoding="async" src="https://paulbupejr.com/wp-content/ql-cache/quicklatex.com-043a1f099556a13e92a2cafd268fdd68_l3.png" class="ql-img-inline-formula quicklatex-auto-format" alt="&#40;&#120;&#95;&#50;&#44;&#32;&#121;&#95;&#50;&#41;" title="Rendered by QuickLaTeX.com" height="19" width="54" style="vertical-align: -5px;"/>, and <img loading="lazy" decoding="async" src="https://paulbupejr.com/wp-content/ql-cache/quicklatex.com-851e6d8b95f1d4a3fc1d50bc2eb7b3ae_l3.png" class="ql-img-inline-formula quicklatex-auto-format" alt="&#40;&#120;&#95;&#51;&#44;&#32;&#121;&#95;&#51;&#41;" title="Rendered by QuickLaTeX.com" height="19" width="54" style="vertical-align: -5px;"/>, are the coordinates of anchors 1, 2, and 3. These equations can be linearized into the form</p>



<p><p class="ql-center-displayed-equation" style="line-height: 13px;"><span class="ql-right-eqno"> (3) </span><span class="ql-left-eqno"> &nbsp; </span><img loading="lazy" decoding="async" src="https://paulbupejr.com/wp-content/ql-cache/quicklatex.com-86f417d36197d170b2ff6acb5b3ada46_l3.png" height="13" width="55" class="ql-img-displayed-equation quicklatex-auto-format" alt="&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;&#65;&#120;&#32;&#61;&#32;&#98;&#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;" title="Rendered by QuickLaTeX.com"/></p></p>



<p>with</p>



<p><p class="ql-center-displayed-equation" style="line-height: 42px;"><span class="ql-right-eqno"> (4) </span><span class="ql-left-eqno"> &nbsp; </span><img loading="lazy" decoding="async" src="https://paulbupejr.com/wp-content/ql-cache/quicklatex.com-baa133486baa86058590fea5d1e7d73e_l3.png" height="42" width="227" class="ql-img-displayed-equation quicklatex-auto-format" alt="&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;&#92;&#109;&#97;&#116;&#104;&#98;&#102;&#123;&#65;&#125;&#32;&#61;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#98;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#50;&#40;&#120;&#95;&#49;&#45;&#120;&#95;&#51;&#41;&#32;&#38;&#50;&#40;&#121;&#95;&#49;&#45;&#121;&#95;&#51;&#41;&#32;&#92;&#92;&#50;&#40;&#120;&#95;&#50;&#45;&#120;&#95;&#51;&#41;&#32;&#38;&#50;&#40;&#121;&#95;&#50;&#45;&#121;&#95;&#51;&#41;&#32;&#92;&#92;&#92;&#101;&#110;&#100;&#123;&#98;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;" title="Rendered by QuickLaTeX.com"/></p></p>



<p><br><p class="ql-center-displayed-equation" style="line-height: 43px;"><span class="ql-right-eqno"> (5) </span><span class="ql-left-eqno"> &nbsp; </span><img loading="lazy" decoding="async" src="https://paulbupejr.com/wp-content/ql-cache/quicklatex.com-cb42c97db1e27229f2c6d74c2191efa5_l3.png" height="43" width="260" class="ql-img-displayed-equation quicklatex-auto-format" alt="&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;&#92;&#109;&#97;&#116;&#104;&#98;&#102;&#123;&#98;&#125;&#32;&#61;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#98;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#114;&#95;&#123;&#49;&#125;&#94;&#50;&#32;&#45;&#32;&#114;&#95;&#123;&#51;&#125;&#94;&#50;&#32;&#45;&#32;&#120;&#95;&#123;&#49;&#125;&#94;&#50;&#32;&#43;&#32;&#120;&#95;&#123;&#51;&#125;&#94;&#50;&#32;&#45;&#32;&#121;&#95;&#123;&#49;&#125;&#94;&#50;&#32;&#43;&#32;&#121;&#95;&#123;&#51;&#125;&#94;&#50;&#32;&#92;&#92;&#114;&#95;&#123;&#50;&#125;&#94;&#50;&#32;&#45;&#32;&#114;&#95;&#123;&#51;&#125;&#94;&#50;&#32;&#45;&#32;&#120;&#95;&#123;&#50;&#125;&#94;&#50;&#32;&#43;&#32;&#120;&#95;&#123;&#51;&#125;&#94;&#50;&#32;&#45;&#32;&#121;&#95;&#123;&#50;&#125;&#94;&#50;&#32;&#43;&#32;&#121;&#95;&#123;&#51;&#125;&#94;&#50;&#32;&#92;&#92;&#92;&#101;&#110;&#100;&#123;&#98;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;" title="Rendered by QuickLaTeX.com"/></p></p>



<p><br><p class="ql-center-displayed-equation" style="line-height: 42px;"><span class="ql-right-eqno"> (6) </span><span class="ql-left-eqno"> &nbsp; </span><img loading="lazy" decoding="async" src="https://paulbupejr.com/wp-content/ql-cache/quicklatex.com-4f207f69fd6d3722e6780aae67001dd5_l3.png" height="42" width="59" class="ql-img-displayed-equation quicklatex-auto-format" alt="&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;&#92;&#109;&#97;&#116;&#104;&#98;&#102;&#123;&#120;&#125;&#32;&#61;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#98;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#92;&#104;&#97;&#116;&#123;&#120;&#125;&#32;&#92;&#92;&#92;&#104;&#97;&#116;&#123;&#121;&#125;&#32;&#92;&#92;&#92;&#101;&#110;&#100;&#123;&#98;&#109;&#97;&#116;&#114;&#105;&#120;&#125;&#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;" title="Rendered by QuickLaTeX.com"/></p></p>



<p>which can be solved using the least squares method:<br><p class="ql-center-displayed-equation" style="line-height: 22px;"><span class="ql-right-eqno"> (7) </span><span class="ql-left-eqno"> &nbsp; </span><img loading="lazy" decoding="async" src="https://paulbupejr.com/wp-content/ql-cache/quicklatex.com-157d0c8daccaf5be5619489f0d45303b_l3.png" height="22" width="149" class="ql-img-displayed-equation quicklatex-auto-format" alt="&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;&#120;&#32;&#61;&#32;&#40;&#65;&#94;&#123;&#84;&#125;&#65;&#41;&#94;&#123;&#45;&#49;&#125;&#40;&#65;&#94;&#84;&#98;&#41;&#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;" title="Rendered by QuickLaTeX.com"/></p></p>



<p><strong><em>Multilateration is not to be confused with triangulation which uses knowledge of the angles between the node and anchors to find the node-to-anchor distances using the law of sines.</em></strong></p>



<h2 class="wp-block-heading">Range-Free Indoor Localization</h2>



<p>Range-free techniques use the relative positions of existing nodes, connectivity information, or detecting the proximity of the unknown node to fixed anchors with known locations (using RFID or Bluetooth beacons) to localize. They are simpler, cheaper, and more energy efficient than range-based algorithms at the cost of having low localization accuracy. Because of this, range-free algorithms are generally only useful when coarse locations are desired.</p>



<h4 class="wp-block-heading">Connectivity-based</h4>



<p>Connectivity-based localization works by checking if a node is connected to another node. If each node is aware of all the connected nodes then coarse locations can be determined by counting the hops between nodes using an algorithm DV-Hop. Another technique is simply detecting the presence of a node near a knwon beacon, typically using RFID or Bluetooth.</p>



<h4 class="wp-block-heading">Profiling / Fingerprinting</h4>



<p>Another type of range free localization is the use of RSS profiling or fingerprinting in order to overcome the inaccuracies of RSS-based distance measurements. Fingerprinting involves taking RSS measurements at various locations and building a map of those measurements and their position. Localization then becomes a matter of matching RSS measurements, not distances, to the map in order to localize. This type of localization is very well suited for machine learning.</p>



<h2 class="wp-block-heading">Next Steps</h2>



<p>This should hopefully have been a quick introduction to the concept of localization and the common techniques currently in use. The next article will include some code samples for implementing some of these techniques using Python. </p>



<p>The content of this article is based off the work I did for my <a aria-label="undefined (opens in a new tab)" href="https://digitalcommons.georgiasouthern.edu/etd/2048/" target="_blank" rel="noreferrer noopener">Masters thesis</a>. </p>



<p></p>
<p>The post <a href="https://paulbupejr.com/indoor-localization/">Indoor Localization &#8211; An Introduction</a> appeared first on <a href="https://paulbupejr.com">Paul Bupe Jr, PhD</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://paulbupejr.com/indoor-localization/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Lazy Loading (feed)

Served from: paulbupejr.com @ 2026-04-22 13:07:36 by W3 Total Cache
-->