開發紀錄:前面九篇的每個係數都是我猜的——參數辨識,把 J、B、T_c 從機器上量回來

這是 LocalPapa Notes 開發紀錄系列的第二十七篇,也是雲台系列的第十篇,收尾的一篇。

回頭看整個系列會發現一件不太舒服的事:公式都對,數字全是猜的。

第二十三篇代進去的 J = 0.0020T_friction = 0.02 N·mKt = 0.10第二十四篇JX/JY/JZ、殘留重心偏移 0.5 mm——這些全部是我依量級推的估計值,我在每一篇的「分析界線」都講了。但一直沒有回答的問題是:那要怎麼量回來?

這篇補上那塊。而且它剛好有一個很漂亮的答案。

文獻基礎

Kim, S. (2019). Moment of Inertia and Friction Torque Coefficient Identification in a Servo Drive System. IEEE Transactions on Industrial Electronics, 66(1), 60–70.

這是本篇的核心。它要同時辨識轉動慣量與摩擦係數,用的性質是:正弦速度與摩擦力矩同相,而與慣性力矩差相。有了這個性質,兩者可以從低頻正弦速度控制下力矩指令的半週期積分中精確取得。論文也點出為什麼要做這件事:慣量是設計高性能速度/位置控制器的前提,而黏滯與庫倫摩擦係數量到之後,可以直接拿去降低速度與位置誤差,不必靠把速度環增益開大

System identification and mechanical resonance frequency suppression for servo control used in single gimbal control moment gyroscope (2022). PLOS ONE, 17(8), e0267450.

雲台專用的那一篇。它把單框架控制力矩陀螺的框架伺服系統簡化成雙質量塊模型,推導系統轉移函數與機械共振頻率的理論模型,並推導了正交相關分析法做系統辨識的數學模型。一個很實用的結論是:正交相關分析法辨識出的頻率特性曲線,雜訊比傅立葉轉換得到的少。它還給了三個防止機械共振的方向——提高馬達轉動慣量對負載轉動慣量的比值、提高系統剛度、設計濾波器。

Liang, M., & Zhou, D. (2022). A Nonlinear Friction Identification Method Combining Separable Least Squares Approach and Kinematic Orthogonal Property. International Journal of Precision Engineering and Manufacturing, 23, 139–152.

處理低速那一段。它明講:低速的非線性 Stribeck 效應會惡化精度,而這正是第二十三篇提過、但當時只能用一個常數帶過的東西。方法上有三個特點:用可分離最小平方(SLS)大幅降低計算量;用運動學正交性質(KOP)在完全不需要慣量資訊的前提下辨識摩擦模型參數,因此避開了加速度估測帶來的雜訊;而且可以在開迴路下做,不用先把控制器調好。

前兩篇解的是「怎麼量」,第三篇解的是「低速那一段怎麼量」。三篇都沒有回答「一個雲台總共有幾個參數要量」——那是下面第一節的內容,我把系列前九篇用過的每一個係數列出來,各自對應一種實驗。

本文的引用範圍

以上論文的方法與貢獻描述,來自摘要與公開的論文說明頁;受限於取用權限,我沒有逐篇核對全文,因此沒有引用任何未經查證的實驗數值。第三節的數字全部是我自己跑的數值驗證:先設定一組真值,用它合成力矩訊號,再用論文描述的相位分離法解回來,看解得準不準。那不是量測結果,是方法的正確性驗證

一、一個雲台總共有幾個參數要量

八個參數、四種實驗:哪一項該用什麼方式量 八個參數、四種實驗:哪一項該用什麼方式量 參數 出現在哪一項 怎麼激勵 靠什麼認出來 J T = J · α 正弦速度(2 Hz、兩組振幅) 與 α 同相(乘 cos 後平均) B T = B · ω 同上,同一批資料 與 ω 同相,且隨振幅線性成長 T_c T = T_c · sgn(ω) 同上,同一批資料 與 ω 同相,但不隨振幅變(方波基頻 4/π) T_s, v_s Stribeck 極低速定速掃描(< 0.04 rad/s) 低速段力矩不降反升,只在極低速看得到 K_t T = K_t · I 堵轉 + 測力計,掃電流 力矩對電流的直線斜率 m·g·e T = m·g·e·cos(el) 各俯仰角量靜態保持電流 隨 cos(el) 變化,過頂點換號 k_cable T = k · θ 慢速走完全行程、來回各一次 與角度同相、來回兩條不重疊(遲滯) f_res 掃頻或敲擊,看頻率響應 增益圖上的尖峰 前三項共用同一批資料——這是本篇最划算的一招:一次掃描同時給出 J、B、T_c。後五項各自需要不同的實驗,沒有捷徑。
圖 1:八個參數各自對應的實驗與辨識特徵。上方三列被框在一起,因為它們共用同一批資料——一次正弦掃描就同時給出 J、B、T_c。

把前九篇用過的係數全部攤開,是這八個:

  • J(轉動慣量) —— 出現在 T = J·α第二十三二十四篇的力矩需求裡。
  • B(黏滯摩擦) —— 出現在 T = B·ω前面九篇根本沒有這一項,因為我一直用常數摩擦。這是這篇補的第一個洞。
  • T_c(庫倫摩擦) —— 出現在 T = T_c·sgn(ω)。就是前面一路寫的 T_friction = 0.02 N·m
  • T_sv_s(Stribeck 參數) —— 低速段摩擦不降反升的那一段。
  • Kt(力矩常數) —— T = Kt·I第二十三篇把力矩換成電流時用的。
  • m·g·e(殘留重心偏移) —— 第二十四篇的重力項,隨 cos(el) 變化。
  • k_cable(線束彈性) —— 第二十二篇提過走線該用 Kirchhoff 桿模型當彈簧、而不是當摩擦。
  • f_res(結構共振) —— 第二十一篇第六層f_res/f_bw ≥ 5,也是第二十五篇速率環的天花板。

前三個共用同一批資料。 這是這篇最划算的一件事,下面兩節就在講它。後五個各自需要不同的實驗,沒有捷徑。

二、為什麼一次掃描能分出三個參數

一次實驗分出三個參數:慣性與摩擦差 90° 一次實驗分出三個參數:慣性與摩擦差 90° (甲)激勵:速度 ω(t) 與角加速度 α(t) ω(t) = A·sin(2πft) α(t) = A·2πf·cos(2πft) (甲格歸一化) (乙)力矩拆解:慣性項跟 α 走、摩擦項跟 ω 走 T_慣性 = J·α T_摩擦 = B·ω + T_c·sgn(ω) (丙)你量到的:兩項相加 T_量測 0 T/4 T/2 3T/4 T 時間(2 Hz 的一個週期) 乘 cos → 只剩慣性 乘 sin → 只剩摩擦 真值 J=0.0036 B=0.005 T_c=0.020 → 辨識 J=0.0036 B=0.005 T_c=0.020 摩擦項在 ω 過零時跳一階(庫倫的 sgn),慣性項在同一瞬間剛好是峰值——這個 90° 的錯開就是能分離的原因。單一振幅只能給出「B·A +T_c·4/π」這個組合,所以要兩組振幅才拆得開 B 與 T_c。
圖 2:三格波形。甲格是激勵——速度是 sin、角加速度是 cos,本來就差 90°。乙格把力矩拆成兩項:慣性項跟著 α 走、摩擦項跟著 ω 走。丙格是你實際量到的和。乘 cos 取平均只留下慣性、乘 sin 取平均只留下摩擦。

單軸的力矩平衡(先不管 Stribeck):

`` T(t) = J·α(t) + B·ω(t) + T_c·sgn(ω(t)) ``

給一個正弦速度指令 ω(t) = A·sin(2πf·t),那麼 α(t) = A·2πf·cos(2πf·t)

關鍵在這裡:ω 是 sin、α 是 cos,兩者天生正交。 所以:

  • T 裡跟 cos 同相的成分,只可能來自 J·α
  • T 裡跟 sin 同相的成分,只可能來自摩擦(B·ωT_c·sgn(ω) 都跟 ω 同號同相)

把量到的 T(t) 分別乘上 cos(2πf·t)sin(2πf·t) 再取一個週期的平均(這就是正交相關),會得到:

`` cos 分量 = J · A · 2πf sin 分量 = B · A + T_c · (4/π) ``

那個 4/π = 1.2732 是方波的基頻傅立葉係數——sgn(ω) 是方波,它在基頻上的投影就是 4/π 倍。

J 直接就出來了,一個振幅就夠:J = cos分量 / (A·2πf)

BT_c 分不開。 單一振幅只給你 B·A + T_c·4/π 這一個組合。解法是跑兩個不同的振幅B 那一項隨 A 線性成長,T_c 那一項不隨 A 變。兩式相減,T_c 就消掉了。

`` B = (sin分量₂ − sin分量₁) / (A₂ − A₁) T_c = (sin分量₁ − B·A₁) / (4/π) ``

物理上的直覺是:摩擦在 ω 過零的瞬間跳一階(庫倫的 sgn),而慣性項在同一瞬間剛好是峰值。兩件事發生在完全不同的相位上,所以分得開。

三、數值驗證:這個方法真的解得回來嗎

我沒有實機可以量,所以退而求其次做正確性驗證:設一組真值 → 合成力矩訊號 → 用上面的公式解回來 → 比對。

真值用系列自己的數量級(J第二十四篇的內框慣量 JYT_c 取一路在用的 0.02):

  • J = 0.0036 kg·m²
  • B = 0.005 N·m·s/rad
  • T_c = 0.020 N·m
  • 激勵頻率 f = 2 Hz,兩組振幅 A = 0.51.0 rad/s

跑出來的相關分量:

  • A = 0.5:cos 分量 0.02262J = 0.00360;sin 分量 0.02796
  • A = 1.0:cos 分量 0.04524J = 0.00360;sin 分量 0.03046

兩個振幅的 sin 分量聯立:

  • B = (0.03046 − 0.02796) / (1.0 − 0.5) = 0.00500(真值 0.005)
  • T_c = (0.02796 − 0.005×0.5) / 1.2732 = 0.02000(真值 0.020)

三個參數都解回到小數點後五位。 這證明的是公式推導沒錯,不是說實機上會這麼準——實機上有量測雜訊、有 Stribeck、有齒槽力矩、有電流環的相位延遲,那些都會進到殘差裡。

值得注意的是三項的量級:A = 1.0 時慣性力矩峰值 0.0452、庫倫 0.0200、黏滯 0.0050慣性項最大,所以 f 不能取太低——f 太低,α 就小,慣性項會被摩擦淹沒,J 解不準。但 f 也不能取太高,否則會撞到結構共振。2 Hz 對一個 f_res ≥ 60 Hz 的機構是安全的。

四、低速那一段:為什麼常數摩擦是錯的

摩擦曲線:系列一路用的 T_friction = 0.02 N·m 只是這條線上的一個點 摩擦曲線:系列一路用的 T_friction = 0.02 N·m 只是這條線上的一個點 0.00 0.01 0.02 0.03 0 0.02 0.05 0.1 0.25 0.5 1 角速度 ω(rad/s) 摩擦力矩(N·m) ↑ 這一段是低速潛變區:靜摩擦比動摩擦大,會造成 stick-slip 靜摩擦 T_s = 0.028 v_s = 0.02 rad/s Stribeck/LuGre 穩態 庫倫 + 黏滯(辨識時擬合的) 定值 T_c = 0.02 N·m(第 21~25 篇的假設) 正弦激勵掃過的範圍(A = 1.0 rad/s) 常數摩擦在中高速夠用,這也是前幾篇一直這樣算的理由。但雲台在追慢速目標時就工作在左邊那一段——那裡常數模型會低估、而且形狀是錯的。
圖 3:三條摩擦模型。橫軸用平方根刻度攤開低速段,否則 Stribeck 那一段會被擠成一根針。虛線是庫倫+黏滯的擬合結果——它在 0.05 rad/s 以上跟完整模型完全重合,在那以下就整個錯掉。

上面第二、三節擬合的是「庫倫+黏滯」,那是個線性化的模型。真實摩擦在極低速有一段 Stribeck 下凹

`` T_friction(v) = [ T_c + (T_s − T_c)·exp(−(|v|/v_s)²) ] · sgn(v) + B·v ``

T_s 是靜摩擦(比動摩擦大),v_s 是特徵速度。把 T_s = 0.028v_s = 0.02 rad/s 代進去畫出來,可以看到:

  • v &gt; 0.05 rad/s:完整模型與庫倫+黏滯完全重合。 圖上那條虛線壓在實線上,看不出差別。
  • v &lt; 0.05 rad/s:兩條分開。v = 0.005 rad/s,完整模型是 0.0275、線性模型是 0.0200——低估 27%

這對雲台的意義很具體:追慢速目標時,你就工作在左邊那一段。 一個在 3 km 外以 10 m/s 橫向移動的目標,對應的 LOS 角速率是 3.3 mrad/s——遠在 Stribeck 區裡面。那裡不只是力矩被低估,還會出現 stick-slip:靜摩擦大於動摩擦,馬達推不動、推動了就衝過頭,畫面上看起來就是一頓一頓的。

所以前面九篇用常數摩擦,不是錯,是有適用範圍的:算最大力矩需求時,工作點在中高速,常數夠用;但要解釋「為什麼慢速追蹤會抖」,就得換這條曲線。

量它的方法跟前面不一樣:不能用正弦,要用極低速定速掃描——固定一個很慢的速度、等它穩下來、量穩態力矩,然後換下一個速度。這就是 Liang & Zhou 2022 那篇處理的題目,而它們用 KOP 的好處正是不必先知道 J,因為定速下沒有加速度項要扣。

五、其餘五個參數怎麼量

Kt(力矩常數) —— 堵轉加測力計,掃電流量力矩,取直線斜率。沒有測力計的話,可以退而用 Kt ≈ 9.5493/KV 從規格書推,但那是標稱值,實機通常低幾個百分點。

m·g·e(殘留重心偏移) —— 這一項有個很省事的量法:在各個俯仰角量靜態保持電流。沒有運動就沒有慣性項、沒有黏滯項,剩下的就是重力項加庫倫摩擦。而重力項隨 cos(el) 變化、過頂點換號,庫倫摩擦不會——用這個特徵可以把兩者分開。順帶一提,這也是第二十四篇那個 0.5 mm 偏心的來源,用這個方法可以驗證它到底是 0.5 mm 還是 2 mm。

k_cable(線束彈性) —— 慢速走完全行程,來回各一次。線束彈性的特徵是與角度同相(不是與速度同相),而且來回兩條曲線不重疊——那個遲滯迴圈的寬度就是線束的耗散。

f_res(結構共振) —— 掃頻或敲擊,看頻率響應的尖峰。第十八篇講過怎麼量。上面 PLOS ONE 那篇提醒的是:用正交相關分析法做掃頻,得到的曲線比 FFT 乾淨。

T_sv_s —— 就是上一節的極低速掃描。

六、量完之後,回頭改什麼

這是整個系列的收尾,所以值得說清楚量完之後該做什麼:

改力矩預算。JT_c 的實測值代回第二十三二十四篇的算式。第二十三篇的敏感度分析說過,J 加倍只影響 T_required 1.4%,但摩擦影響 12~24%——所以摩擦量準比慣量量準重要得多。這正好對應第二節:摩擦要兩個振幅才分得開,值得多跑那一趟。

改控制器。 量到 BT_c 之後,最直接的用途是前饋補償:在速率環的輸出上直接加 B·ω* + T_c·sgn(ω*)。這樣速率環就不必靠回授去對抗一個它其實已經知道的東西。Kim 2019 那篇明講這能降低速度與位置誤差,而且不必把速度環增益開大——增益開大是要付雜訊代價的,第二十五篇講的頻寬階梯也限制了你能開多大。

改增益排程。 量到各俯仰角的 J_az(el) 之後,可以驗證第二十五篇那個「全行程只變 1.81 倍、固定增益撐得住」的判斷在你的機構上成不成立。1.81 是我從估計的慣量張量算的;實機可能是 1.3,也可能是 4。

本文的分析界線

  • 第三節是數值驗證,不是量測。 我沒有實機。合成訊號裡沒有雜訊、沒有量化誤差、沒有電流環延遲,所以解回小數點後五位是理所當然的,實機不會這樣。它證明的只有「公式推導沒錯」。
  • 正弦法假設力矩指令等於實際力矩。 也就是假設電流環是理想的、Kt 是常數。實際上有齒槽力矩與 Kt 的角度相依,它們會以諧波的形式進到殘差裡。要嚴謹就得先量 Kt(θ)
  • 沒有處理雙質量塊。 上面 PLOS ONE 那篇把框架伺服簡化成雙質量塊,那才是共振的來源。本文的 T = J·α + 摩擦 是單質量塊模型,在遠低於共振頻率時才成立——2 Hz60 Hz 的共振是安全的,但如果你的機構共振在 15 Hz,這個假設就要重新檢查。
  • Stribeck 那一段只給了模型形狀,沒給辨識流程的細節。 極低速穩態量測本身很難做(要克服 stick-slip 才能得到穩定的低速),那是另一篇的份量。

想一起把這件事做完整

要把這套跑在你的雲台上,需要這些:

  • 驅動器能不能下速度指令、能不能回讀力矩(或 q 軸電流)指令,取樣率多少
  • 有沒有編碼器可以微分出速度,解析度多少(速度雜訊直接決定 J 的精度)
  • 機構的第一階共振在哪(決定激勵頻率的上限)
  • 能不能開迴路驅動(Liang & Zhou 的 KOP 法需要)
  • 有沒有測力計或扭力計(Kt 要用)

沒有的就說沒有,我不會幫你猜一個值填進去。

參考文獻

  • Kim, S. (2019). Moment of Inertia and Friction Torque Coefficient Identification in a Servo Drive System. IEEE Transactions on Industrial Electronics, 66(1), 60–70. DOI: 10.1109/TIE.2018.2826456
  • System identification and mechanical resonance frequency suppression for servo control used in single gimbal control moment gyroscope (2022). PLOS ONE, 17(8), e0267450. DOI: 10.1371/journal.pone.0267450
  • Liang, M., & Zhou, D. (2022). A Nonlinear Friction Identification Method Combining Separable Least Squares Approach and Kinematic Orthogonal Property. International Journal of Precision Engineering and Manufacturing, 23, 139–152. DOI: 10.1007/s12541-021-00611-0
  • Dahl, P. R. (1968). A Solid Friction Model. The Aerospace Corporation, TOR-0158(3107-18)-1.
  • de Wit, C. C., Olsson, H., Åström, K. J., & Lischinsky, P. (1995). A New Model for Control of Systems with Friction. IEEE Transactions on Automatic Control, 40(3), 419–425.
  • Ekstrand, B. (2001). Equations of Motion for a Two-Axes Gimbal System. IEEE Transactions on Aerospace and Electronic Systems, 37(3), 1083–1091. Link
  • Hilkert, J. M. (2008). Inertially Stabilized Platform Technology: Concepts and Principles. IEEE Control Systems Magazine, 28(1), 26–46.

上一篇:座標轉換鏈與地理定位的誤差預算。要算馬達?雲台馬達選型計算機。想追這個系列?把 LocalPapa Notes 加進書籤。

Dev Log: Every Coefficient in the Previous Nine Posts Was a Guess — Identifying J, B and T_c From the Actual Machine

This is the twenty-seventh post in the LocalPapa Notes dev-log series, the tenth on gimbals, and the one that closes it out.

Looking back at the whole series turns up something uncomfortable: the formulas are right and every number is a guess.

The J = 0.0020, T_friction = 0.02 N·m and Kt = 0.10 fed into post 23, the JX/JY/JZ and the 0.5 mm residual CG offset in post 24 — all of them are order-of-magnitude estimates, and I said so in every "limits of this analysis" section. The question never answered was: how do you measure them?

This post fills that in. And it happens to have a rather elegant answer.

The literature

Kim, S. (2019). Moment of Inertia and Friction Torque Coefficient Identification in a Servo Drive System. IEEE Transactions on Industrial Electronics, 66(1), 60–70.

The core of this post. To identify moment of inertia and friction coefficients simultaneously, it uses the fact that sinusoidal speed is in phase with the friction torque and out of phase with the inertia torque. With that, both can be obtained exactly from a half-period integration of the torque reference under low-frequency sinusoidal speed control. The paper also states why this matters: inertia is a prerequisite for designing a high-performance speed and position controller, and once the viscous and Coulomb coefficients are known they can be used directly to reduce speed and position error without resorting to a high speed-loop gain.

System identification and mechanical resonance frequency suppression for servo control used in single gimbal control moment gyroscope (2022). PLOS ONE, 17(8), e0267450.

The gimbal-specific one. It simplifies the SGCMG gimbal servo system to a two-mass model, derives the theoretical transfer function and mechanical resonance frequency, and derives the mathematical model for orthogonal correlation analysis as an identification method. A practically useful conclusion: the frequency characteristic curve identified by orthogonal correlation analysis carries less noise than one obtained by Fourier transform. It also gives three directions for preventing mechanical resonance — raise the ratio of motor inertia to load inertia, raise system stiffness, design a filter.

Liang, M., & Zhou, D. (2022). A Nonlinear Friction Identification Method Combining Separable Least Squares Approach and Kinematic Orthogonal Property. International Journal of Precision Engineering and Manufacturing, 23, 139–152.

This handles the low-speed band. It says plainly that the nonlinear Stribeck effect at low velocity degrades accuracy — exactly the thing post 23 mentioned and then papered over with a constant. Three methodological features: separable least squares (SLS) cuts computational cost sharply; the kinematic orthogonal property (KOP) identifies the friction parameters without any inertial information, avoiding the noise that acceleration estimation introduces; and it runs open-loop, so no controller tuning is needed first.

The first two answer "how to measure it"; the third answers "how to measure the low-speed part." None of the three answers "how many parameters does a gimbal have in total" — that is section one, where I list every coefficient used across the previous nine posts and pair each with an experiment.

Scope of citation in this post

The method and contribution descriptions above come from abstracts and public paper pages. Access limits meant I could not read every full text, so no unverified experimental values are quoted. The numbers in section three are my own numerical verification: set a ground truth, synthesize the torque signal from it, then solve it back with the phase-separation method the paper describes and see how close it lands. That is not a measurement — it is a correctness check on the method.

1. How many parameters does a gimbal have

Eight parameters, four experiments: how each one gets measured Eight parameters, four experiments: how each one gets measured Parameter Appears in Excitation Signature J T = J · α Sinusoidal velocity (2 Hz, two amplitudes) In phase with α (average after ×cos) B T = B · ω Same run, same data In phase with ω, grows linearly with amplitude T_c T = T_c · sgn(ω) Same run, same data In phase with ω but amplitude-independent (square-wave 4/π) T_s, v_s Stribeck Very slow constant-speed sweep (< 0.04 rad/s) Torque rises as speed falls; only visible very slow K_t T = K_t · I Locked rotor + dynamometer, sweep current Slope of torque against current m·g·e T = m·g·e·cos(el) Static holding current at each elevation Follows cos(el), flips sign over the top k_cable T = k · θ Slow full-travel sweep, both ways In phase with angle; the two sweep directions do not overlap (hysteresis) f_res Frequency sweep or tap test, read the FRF Peak in the gain plot The first three share one dataset — the best bargain in this post: a single sweep yields J, B and T_c at once. The otherfive each need their own experiment; there is no shortcut.
Figure 1: Eight parameters, the experiment each needs, and the signature that identifies it. The top three rows are boxed together because they share one dataset — a single sinusoidal sweep yields J, B and T_c at once.

Laying out every coefficient the previous nine posts used gives eight:

  • J (moment of inertia) — appears in T = J·α, in the torque demand of posts 23 and 24.
  • B (viscous friction) — appears in T = B·ω. The previous nine posts do not have this term at all, because I used a constant friction throughout. That is the first hole this post fills.
  • T_c (Coulomb friction) — appears in T = T_c·sgn(ω). This is the T_friction = 0.02 N·m used all along.
  • T_s, v_s (Stribeck parameters) — the band at low speed where friction rises instead of falling.
  • Kt (torque constant)T = Kt·I, used in post 23 to convert torque into current.
  • m·g·e (residual CG offset) — the gravity term in post 24, varying as cos(el).
  • k_cable (cable harness stiffness)post 22 noted the harness should be modeled as a Kirchhoff rod acting as a spring, not as friction.
  • f_res (structural resonance) — the f_res/f_bw ≥ 5 of post 21, layer 6, and the rate loop's ceiling in post 25.

The first three share one dataset. That is the best bargain in this post, and the next two sections are about it. The other five each need their own experiment; there is no shortcut.

2. Why one sweep separates three parameters

Three parameters from one run: inertia and friction are 90° apart Three parameters from one run: inertia and friction are 90° apart (a) Excitation: velocity ω(t) and angular acceleration α(t) ω(t) = A·sin(2πft) α(t) = A·2πf·cos(2πft) (a) normalized (b) Torque split: the inertia term tracks α, the friction term tracks ω T_inertia = J·α T_friction = B·ω + T_c·sgn(ω) (c) What you actually measure: their sum T_measured 0 T/4 T/2 3T/4 T Time (one period at 2 Hz) ×cos → inertia only ×sin → friction only truth J=0.0036 B=0.005 T_c=0.020 → identified J=0.0036 B=0.005 T_c=0.020 The friction term steps at every zero crossing of ω (the Coulomb sgn), and the inertia term peaks at exactly that instant— that 90° offset is what makes them separable. A single amplitude only gives the combination B·A + T_c·4/π, so twoamplitudes are needed to split B from T_c.
Figure 2: Three panels of waveforms. (a) is the excitation — velocity is a sine, angular acceleration a cosine, inherently 90° apart. (b) splits the torque in two: the inertia term follows α, the friction term follows ω. (c) is what you actually measure. Multiplying by cos and averaging leaves only inertia; multiplying by sin leaves only friction.

The single-axis torque balance (leaving Stribeck aside for now):

`` T(t) = J·α(t) + B·ω(t) + T_c·sgn(ω(t)) ``

Command a sinusoidal velocity ω(t) = A·sin(2πf·t), so α(t) = A·2πf·cos(2πf·t).

Here is the key: ω is a sine and α is a cosine — they are orthogonal by construction. Therefore:

  • Any component of T in phase with cos can only come from J·α
  • Any component in phase with sin can only come from friction (both B·ω and T_c·sgn(ω) share ω's sign and phase)

Multiplying the measured T(t) by cos(2πf·t) and by sin(2πf·t) and averaging over one period — that is the orthogonal correlation — gives:

`` cos component = J · A · 2πf sin component = B · A + T_c · (4/π) ``

That 4/π = 1.2732 is the fundamental Fourier coefficient of a square wave — sgn(ω) is a square wave, and its projection onto the fundamental is 4/π times its amplitude.

J falls straight out, from a single amplitude: J = cos component / (A·2πf).

But B and T_c do not separate. One amplitude only gives you the combination B·A + T_c·4/π. The fix is to run two different amplitudes: the B term grows linearly with A, the T_c term does not. Subtract, and T_c cancels.

`` B = (sin component₂ − sin component₁) / (A₂ − A₁) T_c = (sin component₁ − B·A₁) / (4/π) ``

The physical intuition: friction steps discontinuously at every zero crossing of ω (the Coulomb sgn), and the inertia term is at its peak at exactly that instant. The two events happen at completely different phases, which is why they are separable.

3. Numerical verification: does the method actually recover them

I have no hardware to measure, so the next best thing is a correctness check: set a ground truth → synthesize the torque signal → solve it back with the formulas above → compare.

The truth values use the series' own magnitudes (J is post 24's inner-frame inertia JY; T_c is the 0.02 used throughout):

  • J = 0.0036 kg·m²
  • B = 0.005 N·m·s/rad
  • T_c = 0.020 N·m
  • Excitation frequency f = 2 Hz, two amplitudes A = 0.5 and 1.0 rad/s

The correlation components that come out:

  • A = 0.5: cos component 0.02262J = 0.00360; sin component 0.02796
  • A = 1.0: cos component 0.04524J = 0.00360; sin component 0.03046

Solving the two sin components simultaneously:

  • B = (0.03046 − 0.02796) / (1.0 − 0.5) = 0.00500 (truth 0.005)
  • T_c = (0.02796 − 0.005×0.5) / 1.2732 = 0.02000 (truth 0.020)

All three recover to five decimal places. What that proves is that the derivation is correct, not that hardware will be this clean — real measurements carry noise, Stribeck, cogging torque and current-loop phase lag, all of which land in the residual.

The relative magnitudes are worth noting: at A = 1.0 the inertia torque peaks at 0.0452, Coulomb is 0.0200, viscous 0.0050. Inertia is the largest term, which is why f must not be too low — a low f makes α small, friction drowns the inertia term, and J comes out poorly. But f must not be too high either, or you run into structural resonance. 2 Hz is safe for a mechanism with f_res ≥ 60 Hz.

4. The low-speed band: why a constant friction is wrong there

The friction curve: the T_friction = 0.02 N·m used throughout is one point on it The friction curve: the T_friction = 0.02 N·m used throughout is one point on it 0.00 0.01 0.02 0.03 0 0.02 0.05 0.1 0.25 0.5 1 Angular velocity ω (rad/s) Friction torque (N·m) ↑ The low-speed creep band: static exceeds kinetic, which is what causes stick-slip Static T_s = 0.028 v_s = 0.02 rad/s Stribeck / LuGre steady state Coulomb + viscous (what getsfitted) Constant T_c = 0.02 N·m (theassumption in posts 21–25) Range swept by the sinusoidal excitation (A = 1.0 rad/s) A constant is good enough at moderate and high speed, which is why the earlier posts used one. But a gimbal tracking a slowtarget lives in the left-hand band — there a constant both underestimates the torque and has the wrong shape.
Figure 3: Three friction models. The horizontal axis uses a square-root scale to open up the low-speed band, which a linear axis would squeeze into a needle. The dashed line is the Coulomb + viscous fit — it coincides exactly with the full model above 0.05 rad/s and goes completely wrong below it.

What sections two and three fit is "Coulomb + viscous", a linearized model. Real friction has a Stribeck dip at very low speed:

`` T_friction(v) = [ T_c + (T_s − T_c)·exp(−(|v|/v_s)²) ] · sgn(v) + B·v ``

T_s is static friction (larger than kinetic) and v_s is the characteristic velocity. Plotting with T_s = 0.028 and v_s = 0.02 rad/s:

  • Above v = 0.05 rad/s the full model and Coulomb + viscous coincide exactly. The dashed line sits right on the solid one; you cannot tell them apart.
  • Below v = 0.05 rad/s they separate. At v = 0.005 rad/s the full model gives 0.0275 against the linear model's 0.0200a 27% underestimate.

For a gimbal this is very concrete: tracking a slow target puts you in that left-hand band. A target 3 km away moving laterally at 10 m/s corresponds to a LOS rate of 3.3 mrad/s — deep inside the Stribeck region. There the torque is not just underestimated; you also get stick-slip, where static friction exceeds kinetic, the motor cannot break free, then overshoots when it does. On screen that reads as a juddering image.

So the constant friction in the previous nine posts is not wrong, it just has a domain: computing peak torque demand puts the operating point at moderate to high speed, where a constant is fine. But explaining "why does slow tracking judder" requires this curve.

Measuring it needs a different experiment: not a sinusoid but a very slow constant-speed sweep — hold one slow speed, let it settle, measure the steady-state torque, then move to the next speed. That is what Liang & Zhou 2022 addresses, and the advantage of their KOP approach is precisely that you do not need J first, because at constant speed there is no acceleration term to subtract.

5. Measuring the other five

Kt (torque constant) — locked rotor plus a dynamometer, sweep current against torque, take the slope. Without a dynamometer you can fall back on Kt ≈ 9.5493/KV from the datasheet, but that is a nominal value and hardware usually comes in a few percent low.

m·g·e (residual CG offset) — this one has a very cheap measurement: static holding current at each elevation angle. No motion means no inertia term and no viscous term; what remains is gravity plus Coulomb friction. And the gravity term varies as cos(el) and flips sign over the top while Coulomb does not — that signature separates them. Incidentally this is where post 24's 0.5 mm eccentricity came from, and this method will tell you whether it is really 0.5 mm or 2 mm.

k_cable (cable stiffness) — a slow full-travel sweep, once in each direction. Cable stiffness shows up in phase with angle (not with velocity), and the two sweep directions do not overlap — the width of that hysteresis loop is the harness's dissipation.

f_res (structural resonance) — frequency sweep or tap test, read the peak in the frequency response. Post 18 covers the measurement. The reminder from the PLOS ONE paper above: run the sweep through orthogonal correlation analysis and the curve comes out cleaner than with an FFT.

T_s, v_s — the very slow sweep from the previous section.

6. What to change once you have the numbers

This closes the series, so it is worth saying what to do with the measurements:

Redo the torque budget. Feed measured J and T_c back into the arithmetic of posts 23 and 24. Post 23's sensitivity analysis showed that doubling J moves T_required by 1.4% while friction moves it 12–24% — so measuring friction accurately matters far more than measuring inertia accurately. That maps neatly onto section two: friction needs two amplitudes to separate, and it is worth the extra run.

Change the controller. The most direct use of measured B and T_c is feedforward compensation: add B·ω* + T_c·sgn(ω*) straight onto the rate loop's output. The rate loop then does not have to fight, through feedback, something it already knows. Kim 2019 states this reduces speed and position error without raising the speed-loop gain — and gain costs noise, while post 25's bandwidth ladder caps how far you could raise it anyway.

Revisit gain scheduling. With J_az(el) measured across elevation you can check whether post 25's "varies only 1.81× over full travel, a fixed gain copes" holds on your mechanism. That 1.81 came from an estimated inertia tensor; on hardware it might be 1.3, or it might be 4.

The limits of this analysis

  • Section three is numerical verification, not measurement. I have no hardware. The synthetic signal has no noise, no quantization, no current-loop lag, so recovering five decimal places is a foregone conclusion and hardware will not do that. All it proves is that the derivation is correct.
  • The sinusoidal method assumes torque command equals actual torque — i.e. an ideal current loop and a constant Kt. In reality cogging torque and the angular dependence of Kt enter the residual as harmonics. Doing this rigorously means measuring Kt(θ) first.
  • No two-mass treatment. The PLOS ONE paper simplifies the gimbal servo to two masses, and that is where resonance comes from. The T = J·α + friction here is a single-mass model, valid only well below resonance — 2 Hz against a 60 Hz resonance is safe, but if your mechanism resonates at 15 Hz the assumption needs rechecking.
  • The Stribeck section gives the model's shape, not the identification procedure in detail. Very-low-speed steady-state measurement is genuinely hard (you have to beat stick-slip to get a stable slow speed) and is a post of its own.

How to work through this with me

To run this on your gimbal, have these ready:

  • Whether the drive accepts a velocity command and can report back torque (or q-axis current) command, and at what sample rate
  • Whether there is an encoder to differentiate for velocity, and its resolution (velocity noise sets the accuracy of J directly)
  • Where the mechanism's first resonance sits (this caps the excitation frequency)
  • Whether open-loop drive is possible (Liang & Zhou's KOP method needs it)
  • Whether you have a dynamometer or torque transducer (needed for Kt)

If something's missing, say it's missing — I won't guess a value and fill it in for you.

References

  • Kim, S. (2019). Moment of Inertia and Friction Torque Coefficient Identification in a Servo Drive System. IEEE Transactions on Industrial Electronics, 66(1), 60–70. DOI: 10.1109/TIE.2018.2826456
  • System identification and mechanical resonance frequency suppression for servo control used in single gimbal control moment gyroscope (2022). PLOS ONE, 17(8), e0267450. DOI: 10.1371/journal.pone.0267450
  • Liang, M., & Zhou, D. (2022). A Nonlinear Friction Identification Method Combining Separable Least Squares Approach and Kinematic Orthogonal Property. International Journal of Precision Engineering and Manufacturing, 23, 139–152. DOI: 10.1007/s12541-021-00611-0
  • Dahl, P. R. (1968). A Solid Friction Model. The Aerospace Corporation, TOR-0158(3107-18)-1.
  • de Wit, C. C., Olsson, H., Åström, K. J., & Lischinsky, P. (1995). A New Model for Control of Systems with Friction. IEEE Transactions on Automatic Control, 40(3), 419–425.
  • Ekstrand, B. (2001). Equations of Motion for a Two-Axes Gimbal System. IEEE Transactions on Aerospace and Electronic Systems, 37(3), 1083–1091. Link
  • Hilkert, J. M. (2008). Inertially Stabilized Platform Technology: Concepts and Principles. IEEE Control Systems Magazine, 28(1), 26–46.

Previous post: The Transform Chain and a Geolocation Error Budget. Want to size a motor? Gimbal Motor Sizing Calculator. Want to follow the series? Bookmark LocalPapa Notes.

探索 61 個隱私優先的瀏覽器工具
全程本地運算、檔案不上傳。
前往 LocalPapa →
Explore 61 privacy-first browser tools
Everything runs locally — your files never leave your device.
Visit LocalPapa →

想看英文版?點右上角 EN 切換語言。

Prefer Chinese? Tap at the top-right to switch.