How a Glass Fiber Knows Its Own Shape
Here’s a thing that still feels like magic to me. Take a glass fiber about as thick as a hair, run it through a flexible robot arm or a catheter, and plug one end into a box. The box tells you the full 3D shape of the fiber, every millimetre of it, many times a second. Nothing is attached at the tip. No camera, no X-ray, no magnets.
The whole trick rests on one sentence: the colour of reflected light is a ruler. If you’ve never done any optics, that sentence means nothing. That’s fine. By the end of this post it should feel obvious. Everything else (the stretch, the bending, the 3D shape) is bookkeeping on top of it.
Here’s the end result first. Drag to rotate.
有件事我到现在还觉得像魔术。拿一根跟头发差不多粗的玻璃光纤,穿进一根软体机械臂或者导管里,只把一头插进一个盒子。这个盒子就能告诉你整根光纤在三维空间里的形状,每一毫米都有,一秒钟好多次。光纤尖上什么都没接。没有摄像头,没有 X 光,也没有磁铁。
整个把戏就靠一句话:反射光的颜色是一把尺子。 如果你从没碰过光学,这句话等于没说。没关系。看完这篇,它应该会变得理所当然。剩下的一切(拉伸、弯曲、三维形状)都只是在这句话上面记账。
先看最终效果。可以拖动旋转。
Red and blue on the cores mean stretched and squeezed. The teal tube is what the box thinks the fiber looks like, recomputed once per laser sweep. Let’s build up to that from zero.
1. Colour is a length
Light is a wave. Not as a metaphor: an electric field wiggles up and down as it travels, like a wave running along a rope. The distance from one crest to the next is the wavelength, and that’s all colour is. Red light has crests about 650 nanometres apart. Violet, about 400. Your eye is a wavelength meter with three coarse bins, and your brain paints the answer as colour.
Keep going past red and the wave doesn’t stop existing. You just stop seeing it. That’s infrared. Fiber sensors work around 1550 nm, where glass is extremely transparent and the telecom industry has made the lasers cheap. Since nobody can see 1550 nm, every demo below paints it in false colour: shorter is bluer, longer is redder, same order as the rainbow.
核心上的红和蓝表示被拉长和被压缩。青绿色的管子是盒子认为的光纤形状,激光每扫一次就重新算一次。下面我们从零开始,一步步走到这里。
1. 颜色就是一个长度
光是一种波。不是打比方:电场一边往前走一边上下振动,就像绳子上跑过去的一道波。相邻两个波峰之间的距离叫波长,颜色说穿了就是这个。红光的波峰相隔大约 650 纳米,紫光大约 400 纳米。你的眼睛就是一个只有三个粗糙档位的波长计,大脑把读数涂成了颜色。
越过红色继续往长了走,波并没有消失,只是你看不见了。那就是红外。光纤传感器工作在 1550 纳米附近,这个波段玻璃特别透明,而且通信行业早就把这种激光器做得很便宜了。既然谁也看不见 1550 纳米,下面所有的演示都用伪彩色来画它:短一点就偏蓝,长一点就偏红,跟彩虹的顺序一样。
2. Two echoes either add up or cancel
Now the one piece of physics we actually need. Put two very weak mirrors in the light’s way, the kind that let almost everything through and bounce back only a sliver. Each sends back a small echo. The echo from the second mirror has travelled an extra round trip: twice the spacing.
If that extra trip is a whole number of wavelengths, the two echoes come back crest on crest and add up. If it’s half a wavelength off, crest lands on trough and they cancel. Same two mirrors, different colour, completely different answer.
You’ve seen this before. It’s why a soap bubble is coloured: light bounces off the front and the back of a film thinner than a wavelength, and the two bounces add up for some colours and cancel for others. As the film drains and gets thinner, the colours change. Spacing picks colour.
2. 两个回声,要么叠加,要么抵消
接下来是我们唯一真正需要的一点物理。在光走的路上放两面很弱的镜子,就是那种几乎什么都放过去、只反射回来一点点的镜子。每面镜子都送回一个小小的回声。第二面镜子的回声多走了一个来回:两倍的间距。
如果多走的这段路刚好是整数个波长,两个回声就是波峰对波峰地回来,叠加变强。如果差了半个波长,波峰撞上波谷,就互相抵消。还是那两面镜子,换个颜色,结果就完全不一样。
这个你其实见过。肥皂泡为什么是彩色的?光在一层比波长还薄的膜的前表面和后表面各反射一次,这两次反射对某些颜色叠加,对另一些颜色抵消。膜慢慢变薄,颜色也跟着变。间距决定了颜色。
3. Many mirrors pick out one colour
Two mirrors give a soft preference. Now line up thousands of them, evenly spaced, each one ridiculously weak. That’s a fiber Bragg grating: a pattern of tiny steps in the glass of the core, written in with a UV laser.
Here’s how I like to think about it. Every echo is a clock hand, and its angle says how far through its wave cycle it is when it arrives. To get the total reflection, lay all the hands head to tail. For one special colour, each mirror’s extra round trip is exactly one wavelength, so every hand points the same way and the chain shoots out in a straight line. Big reflection. Change the colour slightly and each hand is turned a little more than the one before. The chain curls up into a circle and ends near where it started. Almost nothing comes back.
So a grating reflects one colour and lets everything else through, and which colour is fixed by the spacing:
\[\lambda_B = 2\,n\,\Lambda\]$\Lambda$ is the mirror spacing, $n \approx 1.447$ says how much slower light moves in glass, and $\lambda_B$ is the colour that comes back. For 1550 nm you need $\Lambda \approx 535.6$ nm. More mirrors make the peak sharper. A real 10 mm grating has about 18,700 of them.
This is the answer to “why does the reflected colour mean anything”. The grating is a ruler. The reflected colour is the reading on that ruler.
3. 很多面镜子,挑出一种颜色
两面镜子只能给出一个模糊的偏好。现在排上几千面,间距完全相等,每一面都弱得离谱。这就是光纤布拉格光栅(FBG):用紫外激光在纤芯的玻璃里刻出的一串微小台阶。
我喜欢这样想。每个回声都是一根钟表指针,指针的角度表示它回来的时候走到了自己波动周期的哪个位置。要算总的反射,就把所有指针首尾相接排起来。对某一种特定的颜色,每面镜子多走的那个来回刚好是一个波长,于是所有指针都指向同一个方向,整条链子笔直地伸出去,反射很强。颜色稍微一变,每根指针都比前一根多转一点点,链子就卷成一个圈,最后又回到起点附近。几乎什么都反射不回来。
所以光栅只反射一种颜色,其余的全放过去,而反射哪种颜色由间距决定:
\[\lambda_B = 2\,n\,\Lambda\]$\Lambda$ 是镜子间距,$n \approx 1.447$ 表示光在玻璃里慢了多少,$\lambda_B$ 就是反射回来的颜色。要反射 1550 纳米,间距大约是 535.6 纳米。镜子越多,峰越尖。一段真实的 10 毫米光栅大约有 18,700 面。
这就是「反射光的颜色凭什么有意义」的答案。 光栅是一把尺子,反射回来的颜色就是尺子上的读数。
4. Stretch the ruler and the colour moves
So what happens when you stretch the ruler?
Stretch the fiber and the spacing grows, so the reflected colour slides longer. Measure the colour, get the stretch. The numbers are tiny. One microstrain (µε), one part per million of stretch, moves the colour by 1.21 picometres. That’s about a thousandth of a nanometre, and good instruments resolve it. (Why 1.21 and not 1.55? Stretching glass also lowers its refractive index a little, which cancels about 22% of the effect.)
Here’s the trap. Warm the fiber by one degree and the colour moves about 10 pm too, in the same direction. A single grating can’t tell “warmer” from “stretched”. Hold that thought; section 7 fixes it.
4. 尺子一拉长,颜色就挪了
那么,把尺子拉长会怎样?
拉伸光纤,间距变大,反射颜色就往长波方向滑。测出颜色,就知道拉了多少。这些数字小得惊人。一个微应变(µε),也就是拉长百万分之一,颜色只挪 1.21 皮米,大约千分之一纳米,而好的仪器分辨得出来。(为什么是 1.21 而不是 1.55?因为玻璃被拉长的同时折射率会稍微降低一点,把效果抵掉了大约 22%。)
陷阱在这里。把光纤加热一度,颜色也会挪大约 10 皮米,而且方向一样。单独一个光栅分不清「变热了」和「被拉长了」。先记住这一点,第 7 节会解决它。
5. You don’t even need to write the mirrors
Writing gratings is an extra manufacturing step. It turns out you can skip it.
Ordinary fiber glass isn’t perfectly uniform. When it froze out of the melt, tiny random density fluctuations got locked in, much smaller than a wavelength. Each one scatters a vanishingly small amount of light backwards. That’s Rayleigh backscatter, the same Rayleigh as in “why the sky is blue”.
A random set of specks is just a random grating. Instead of one clean peak, it reflects a messy spectrum. But it isn’t noise: the specks never move, so the messy spectrum is exactly repeatable. It’s a fingerprint, and every millimetre has its own.
Here’s the nice part. Stretch that millimetre and every gap between specks grows by the same fraction, so the whole fingerprint slides along the colour axis by exactly as much as a Bragg peak would. The system records every millimetre’s fingerprint once, with the fiber straight. Later it slides the stored copy over the new one until they line up best. How far it had to slide is the strain.
5. 其实连镜子都不用刻
刻光栅是额外的一道工序。结果发现,这一步可以省掉。
普通的光纤玻璃并不是完全均匀的。它从熔融状态凝固的时候,一些随机的、比波长小得多的密度起伏被冻在了里面。每一个都会把极其微弱的一点光散射回来。这叫瑞利背向散射,跟「天空为什么是蓝的」是同一个瑞利。
一堆随机分布的小斑点,其实就是一个随机光栅。它反射回来的不是一个干净的峰,而是一条乱糟糟的光谱。但这不是噪声:斑点从来不动,所以这条乱糟糟的光谱可以一模一样地重复测出来。它是一枚指纹,每一毫米都有自己的一枚。
妙的地方在这里。把这一毫米拉长,斑点之间的每个间隙都按同一个比例变大,于是整枚指纹沿着颜色轴平移,平移量跟布拉格峰的完全一样。系统先在光纤笔直的时候把每一毫米的指纹存一份。之后拿存下来的那份在新测的这份上滑动,滑到最吻合为止。滑了多远,就是应变是多少。
6. Which millimetre is talking?
Every millimetre is echoing at the same time, into the same detector. How do you know which one you’re hearing?
First guess: timing. Shout down a long hallway and the far echoes come back later. Good idea, wrong scale. Two points 1 mm apart answer about 10 picoseconds apart, and ordinary electronics can’t slice time that finely.
The real trick is cuter. The laser doesn’t pulse. It shines continuously while gliding its colour smoothly. Light echoing back from far away left the laser earlier, so it carries an older colour than the one the laser is making right now. The detector mixes the two, and two slightly different colours make a beat: a slow wobble in brightness, like two guitar strings slightly out of tune. A nearby point gives a small mismatch and a slow beat. A far point gives a big mismatch and a fast beat.
All the beats arrive mixed together, but a Fourier transform pulls them apart, the way a prism splits white light into colours. Each beat speed is a position. Cut one millimetre out of that position picture, transform back, and you get that millimetre’s own fingerprint from section 5. One sweep of the laser reads every millimetre at once. This is called OFDR (optical frequency domain reflectometry), and a sweep of about 40 nm tells apart points about 20 µm apart.
6. 是哪一毫米在说话?
每一毫米都在同时往同一个探测器里送回声。你怎么知道听到的是哪一个?
第一反应:看时间。在长走廊里喊一声,远处的回声回来得晚。想法没错,尺度不对。相距 1 毫米的两个点,回声只差大约 10 皮秒,普通电子学根本切不了这么细的时间。
真正的办法更巧。激光不打脉冲,而是一直亮着,同时让自己的颜色平滑地慢慢变。从远处反射回来的光离开激光器更早,所以它带着的是一种比激光器此刻发出的更旧的颜色。探测器把两者混在一起,两种略有差别的颜色会产生拍频:亮度一下一下地慢慢起伏,就像两根稍微没调准的吉他弦。近处的点颜色差得少,拍得慢;远处的点差得多,拍得快。
所有的拍都混在一起到达,但傅里叶变换能把它们拆开,就像棱镜把白光拆成各种颜色。每一种拍的快慢就对应一个位置。在这张「位置图」里切出一毫米,再变换回去,就得到第 5 节里那一毫米自己的指纹。激光扫一遍,所有毫米一次全读出来。这叫 OFDR(光频域反射),扫大约 40 纳米,就能分辨相距大约 20 微米的点。
7. Bending is stretching on one side
We can now read the stretch at every millimetre. But shape is about bending, not stretching.
Bend anything and the outside of the curve stretches while the inside squeezes. The line down the middle keeps its length. So a shape-sensing fiber carries several cores in one strand: one in the centre and three around it, 120° apart, about 35 µm off-centre. Bend it and the cores on the outside of the bend read stretch, the ones on the inside read squeeze. Which cores stretch tells you the direction. How much tells you how sharp. A bend with a 10 mm radius puts about 3,500 µε on the outermost core.
The centre core sits on that middle line, so bending doesn’t touch it. But heat and pulling stretch every core equally. So subtract the centre core from the outer three, and the temperature problem from section 4 simply cancels. What’s left is pure bend.
The outer cores also wind around in a slow spiral, so each one takes turns on every side. That lets the system measure twist too, which turns out to matter a lot in the next section.
7. 弯曲,就是一边被拉长
现在我们能读出每一毫米的拉伸了。但形状说的是弯曲,不是拉伸。
随便弯一样东西,弯的外侧会被拉长,内侧会被压缩,中间那条线长度不变。所以用来测形状的光纤,一根里面有好几个纤芯:中间一个,周围三个,彼此相隔 120°,离中心大约 35 微米。一弯,弯外侧的纤芯读到拉伸,内侧的读到压缩。哪几个被拉长,告诉你往哪个方向弯;拉长多少,告诉你弯得多急。半径 10 毫米的弯,最外侧的纤芯大约承受 3,500 µε。
中间的纤芯正好在那条中线上,弯曲碰不到它。但温度和拉力会让所有纤芯一起变长。所以用外面三个纤芯减去中间那个,第 4 节的温度问题就直接抵消了,剩下的纯粹是弯曲。
外面三个纤芯还会绕成一条缓慢的螺旋,每个都轮流转到各个方向。这样系统还能测出扭转,而扭转在下一节里会变得非常要紧。
8. From bends to a shape
Now we know, for every millimetre, how much it bends and which way. Turning that into a 3D shape is like following driving directions without a map. Start at the connector, where the position and heading are known. Then repeat: go forward 1 mm, turn by that millimetre’s bend. Do it a few hundred times and the shape draws itself.
That also explains the one real weakness. Every step builds on every step before it, so tiny errors compound. A slightly wrong turn near the start swings the entire rest of the fiber, so the error tends to grow with distance and the tip is usually the least accurate part. And the worst offender usually isn’t strain noise, it’s twist: if the system misjudges how far the cores have rotated, it turns by the right amount in the wrong direction, and the error runs away fast. Turn up the twist error and watch.
8. 从弯曲到形状
现在每一毫米弯了多少、往哪边弯,我们都知道了。把它变成三维形状,就像没有地图、只照着导航指令开车。从接头出发,那里的位置和朝向是已知的。然后不停重复:往前走 1 毫米,按这一毫米的弯曲转一下。重复几百次,形状就自己画出来了。
这也说明了它唯一真正的弱点。每一步都建立在之前所有步的基础上,所以微小的误差会越滚越大。开头附近转错一点点,后面整根光纤都会被甩偏,所以误差一般随距离越来越大,尖端通常是最不准的地方。而最大的元凶通常不是应变噪声,是扭转:系统要是把纤芯转过的角度估错了,它转的量是对的,方向却错了,误差会迅速失控。把扭转误差调大看看。
The whole chain
Put together:
- A laser glides its colour, and every millimetre of glass echoes a little.
- Each echo’s beat speed says which millimetre it came from, and a Fourier transform sorts them.
- Each millimetre’s reflected colour pattern is a ruler for its own spacing, so a colour shift is a stretch.
- Comparing the three outer cores with the centre one turns stretch into bend amount and direction, with temperature cancelled.
- Walk along the fiber, turning by each bend, and you have the shape.
Do that many times a second and the fiber reports its own shape live. Robotic bronchoscopes that steer a thin instrument deep into the lung use this kind of fiber to know where their tip is without an X-ray running the whole time.
Every step above is fairly mechanical except the first idea, which took me a while to really accept: the colour bouncing back from a piece of glass is a measurement of length, good to about a millionth. Once that clicks, the rest is bookkeeping.
整条链路
串起来就是:
- 激光让自己的颜色慢慢变,玻璃的每一毫米都反射回来一点点。
- 每个回声拍得多快,说明它来自哪一毫米,傅里叶变换把它们分开。
- 每一毫米反射回来的颜色图案,是它自身间距的一把尺子,所以颜色一挪就是被拉长了。
- 拿外面三个纤芯跟中间那个比,就把拉伸变成了弯曲的大小和方向,温度顺便抵消掉。
- 沿着光纤一路走,每一毫米按它的弯曲转一下,形状就出来了。
一秒钟做很多次,光纤就能实时报告自己的形状。有些机器人支气管镜要把细长的器械一路送到肺的深处,靠的就是这种光纤来知道尖端在哪,而不用一直开着 X 光。
上面每一步都挺机械的,只有第一个想法让我花了好一阵才真正接受:一块玻璃反射回来的颜色,是一次长度测量,精确到大约百万分之一。这一点想通了,剩下的都只是记账。