STEM 隨筆︰古典力學︰運動學【六‧下】

俗諺說︰『天要下雨 ,娘要嫁人』何謂也?這事徐尚禮先生曾經在中時電子報上解釋過。假使『百度』一下,也許那『娘』娘當真是『純潔美好』之『姑娘』也!若考之以漢字淵源︰

說文解字

孃:煩擾也。一曰肥大也。从女襄聲。女良切

《說文解字注》

(孃) 煩www.zdic.net也。煩、熱頭痛也。www.zdic.net、煩也。今人用擾攘字、古用孃。賈誼傳作搶攘。莊子在宥作傖囊。楚詞作恇攘。俗作劻勷。皆用叚借字耳。今攘行而孃廢矣。又按廣韵孃女良切、母稱。娘亦女良切 、少女之号。唐人此二字分用畫然。故耶孃字斷無有作娘者。今人乃罕知之矣。一曰肥大也。方言。www.zdic.net-1、盛也。秦晉或曰www.zdic.net-1。凡人言盛及其所愛偉其肥晠謂之www.zdic.net-1。郭注云。肥多肉。按肉部旣有字矣。此與彼音義皆同也。漢書。壤子王梁、代。壤卽www.zdic.net-1孃字。从女。襄聲。女良切。十部。按前後二義皆當音壤。

 

誠然『娘』有『少女心』耶??如此『天要下雨』必然發生,正對少女懷春『娘要嫁人』無法阻攔乎!!故知於一定之『時空』條件下,『娘要嫁人』之『緣』或等於『天要下雨 』之『因』,那麼這兩者的『機遇』能不相同的嗎??!!如是亦可知『蘇格拉底』之『不得不死』矣!!??

─── 《神經網絡【轉折點】一

 

放眼未來、思接千載,今日談『認識自己』依舊難矣哉!

1280px-Gnothi_Sauton_Reichert-Haus_in_Ludwigshafen

認識你自己γνῶθι σεαυτόν (gnothi seauton)),相傳是刻在德爾斐阿波羅神廟的三句箴言之一,也是其中最有名的一句。另外兩句是「你是」(Ἑγγύα πάρα δ’ἄτη )和「毋過」(μηδεν αγαν)。或說這句話出自古希臘七賢之一、斯巴達的喀隆(Χίλων),或說出自泰勒斯,或說出自蘇格拉底。傳統上對這句話的闡釋,是勸人要有自知,明白人只是人,並非諸神。

根據第歐根尼·拉爾修的記載,有人問泰勒斯「何事最難為?」他應道:「認識你自己。」(見《哲人言行錄》卷一)尼采在《道德的系譜》(Zur Genealogie der Moral)的前言中,也針對「認識你自己 」來大做文章,他說:「我們無可避免跟自己保持陌生,我們不明白自己,我們搞不清楚自己,我們的永恆判詞是:『離每個人最遠的,就是他自己。』──對於我們自己,我們不是『知者』……」(Wir bleiben uns eben notwendig fremd, wir verstehen uns nicht, wir müssen uns verwechseln, für uns heisst der Satz in alle Ewigkeit „Jeder ist sich selbst der Fernste“—für uns sind wir keine „Erkennenden“ …

─── 摘自《勇闖新世界︰ W!O《卡夫卡村》變形祭︰品味科學‧教具教材‧【專題】 GEM‧PD‧學習零點

 

所謂『人』與『物』有別乎?莊子恐認為無別也!!

250px-Dschuang-Dsi-Schmetterlingstraum-Zhuangzi-Butterfly-Dream

莊子在《齊物論》中說了一個故事,問著人到底是可不可能分別『現實』與『夢境』︰

昔者莊周夢為胡蝶,栩栩然胡蝶也。自喻適志與!不知周也 。
俄然覺,則蘧蘧然周也。不知周之夢為胡蝶與?胡蝶之夢為周與?周與胡蝶則必有分矣。
此之謂物化

─── 摘自《桶中之腦??

 

然則既『都是夢』,或不必被『物欲所化』吧??

那麼奈何煩惱是否『夢裡做學問』耶?☆

也許果然不能『自我觀察』︰

可觀測性

控制理論中的可觀察性(observability)是指系統可以由其外部輸出推斷其其內部狀態的程度。系統的可觀察性和可控制性是數學上對偶的概念。可觀察性最早是匈牙利裔工程師魯道夫·卡爾曼針對線性動態系統提出的概念[1][2]。若以信號流圖來看,若所有的內部狀態都可以輸出到輸出信號,此系統即有可觀察性。

一系統的信號流圖,其狀態X1, X2 都連到輸出Y,因此系統具有可觀察性

定義

若以正式的定義來看,一系統具有可觀察性若且唯若,針對所有的狀態向量及控制向量[需要解釋],都可以在有限時間內,只根據輸出信號來識別目前的狀態(此定義比較接近狀態空間的表示方式)。比較不正式的說法,就表示可以根據系統輸出來判斷整個系統的行為。若系統不可觀察,表示其中部份狀態的值無法透過輸出信號來判定。這也表示控制器無法知道這個狀態的值(此時就要透過其他的估測技術才能知道其狀態)。

在用狀態空間表示的線性時不變系統中,有一個簡單的方式來確認系統是否可觀測。考慮一個有 \displaystyle n 個狀態的SISO系統,若以下可觀測性矩陣(observability matrix)中的列

\displaystyle {\mathcal {O}}={\begin{bmatrix}C\\CA\\CA^{2}\\\vdots \\CA^{n-1}\end{bmatrix}}

等於 \displaystyle n ,則此系統為可觀測系統。此一測試的原理是若 \displaystyle n 個列是線性獨立的,則 \displaystyle n 個狀態可以透過輸出變數 \displaystyle y(k) 的線性組合來得知。

有些系統會利用對輸出的量測來估計系統的狀態,這類功能的模組稱為狀態觀測器(state observer)或簡稱為觀測器(observer)。

可觀測性指數

線性時不變系統的可觀測性指數(Observability index) \displaystyle v 是滿足 \displaystyle {\text{rank}}{({\mathcal {O}}_{v})}={\text{rank}}{({\mathcal {O}}_{v+1})} 的最小自然數,其中

\displaystyle {\mathcal {O}}_{v}={\begin{bmatrix}C\\CA\\CA^{2}\\\vdots \\CA^{v-1}\end{bmatrix}}.

不可觀測子空間

線性系統(A,,C)不可觀測子空間N是線性映射G的[3]

\displaystyle G:R^{n}\rightarrow {\mathcal {C}}(t_{0},t_{1};R^{n})

\displaystyle x_{0}\mapsto C\Phi (t_{0},t_{1})x_{0} ,

其中 \displaystyle {\mathcal {C}}(t_{0},t_{1};R^{n}) 是連續函數 \displaystyle f:[t_{0},t_{1}]\to R^{n} 的集合,且 \displaystyle \Phi (t_{0},t_{1}) 是和A相關的狀態傳遞矩陣。
若(A,,C)是自主系統(autonomous system),N可以改寫為 [3]

\displaystyle N=\bigcap _{k=0}^{n-1}\ker(CA^{k})=\ker {\mathcal {O}}

例子:考慮以下的A和C:
\displaystyle A={\begin{bmatrix}1&0\\0&1\end{bmatrix}} , \displaystyle C={\begin{bmatrix}0&1\\\end{bmatrix}} .

若可觀測性矩陣定義為 \displaystyle {\mathcal {O}}:=(C^{T}|A^{T}C^{T})^{T} ,可以計算如下:

\displaystyle {\mathcal {O}}={\begin{bmatrix}0&1\\0&1\end{bmatrix}}

因此可以計算可觀測性矩陣的核。
\displaystyle {\mathcal {O}}v=0

\displaystyle {\begin{bmatrix}0&1\\0&1\end{bmatrix}}{\begin{bmatrix}v1\\v2\end{bmatrix}}={\begin{bmatrix}0\\0\end{bmatrix}}\to v={\begin{bmatrix}v1\\0\end{bmatrix}}\to v=v1{\begin{bmatrix}1\\0\end{bmatrix}}

\displaystyle Ker({\mathcal {O}})=N=span\{{\begin{bmatrix}1\\0\end{bmatrix}}\}

若 Rank(\displaystyle {\mathcal {O}})=n,n為可觀測性矩陣中獨立列的個數,表示系統可觀測。在此例中 det(\displaystyle {\mathcal {O}})=0,因此Rank(\displaystyle {\mathcal {O}})<n,此系統不可觀測。

因為不可觀測子空間為 \displaystyle R^{n} 的子空間,因此以下的性質成立: [3]

  • \displaystyle N\subset Ke(C)
  • \displaystyle A(N)\subset N
  • \displaystyle N=\bigcup {\{S\subset R^{n}\mid S\subset Ke(C),A(S)\subset N\}}
可偵測性

可偵測性(detectability)是比可觀測性略弱一些的條件。若系統內所有不可偵測的狀態都是穩定的,此系統即具有可偵測性[4]

 

自我控制︰

Controllability

Controllability is an important property of a control system, and the controllability property plays a crucial role in many control problems, such as stabilization of unstable systems by feedback, or optimal control.

Controllability and observability are dual aspects of the same problem.

Roughly, the concept of controllability denotes the ability to move a system around in its entire configuration space using only certain admissible manipulations. The exact definition varies slightly within the framework or the type of models applied.

The following are examples of variations of controllability notions which have been introduced in the systems and control literature:

  • State controllability
  • Output controllability
  • Controllability in the behavioural framework

State controllability

The state of a deterministic system, which is the set of values of all the system’s state variables (those variables characterized by dynamic equations), completely describes the system at any given time. In particular, no information on the past of a system is needed to help in predicting the future, if the states at the present time are known and all current and future values of the control variables (those whose values can be chosen) are known.

Complete state controllability (or simply controllability if no other context is given) describes the ability of an external input (the vector of control variables) to move the internal state of a system from any initial state to any other final state in a finite time interval.[1]:737

Controllability does not mean that a reached state can be maintained, merely that any state can be reached.

Continuous linear systems

Consider the continuous linear system [note 1]

\displaystyle {\dot {\mathbf {x} }}(t)=A(t)\mathbf {x} (t)+B(t)\mathbf {u} (t)

\displaystyle \mathbf {y} (t)=C(t)\mathbf {x} (t)+D(t)\mathbf {u} (t).
There exists a control \displaystyle u from state \displaystyle x_{0} at time \displaystyle t_{0} to state \displaystyle x_{1} at time \displaystyle t_{1}>t_{0} if and only if \displaystyle x_{1}-\phi (t_{0},t_{1})x_{0} is in the column space of
\displaystyle W(t_{0},t_{1})=\int _{t_{0}}^{t_{1}}\phi (t_{0},t)B(t)B(t)^{T}\phi (t_{0},t)^{T}dt
where \displaystyle \phi is the state-transition matrix, and \displaystyle W(t_{0},t_{1}) is the Controllability Gramian.

In fact, if \displaystyle \eta _{0} is a solution to \displaystyle W(t_{0},t_{1})\eta =x_{1}-\phi (t_{0},t_{1})x_{0} then a control given by \displaystyle u(t)=-B(t)^{T}\phi (t_{0},t)^{T}\eta _{0} would make the desired transfer.

Note that the matrix \displaystyle W defined as above has the following properties:

\displaystyle {\frac {d}{dt}}W(t,t_{1})=A(t)W(t,t_{1})+W(t,t_{1})A(t)^{T}-B(t)B(t)^{T},\;W(t_{1},t_{1})=0
  • \displaystyle W(t_{0},t_{1}) satisfies the equation
\displaystyle W(t_{0},t_{1})=W(t_{0},t)+\phi (t_{0},t)W(t,t_{1})\phi (t_{0},t)^{T} [2]

Rank condition for controllability

The Controllability Gramian involves the integration of the state-transition matrix of the system. A simpler condition for controllability is a rank condition analogous to the Kalman rank condition for time-invariant systems.

Consider a continuous-time linear system \displaystyle \Sigma smoothly varying in an interval \displaystyle [t_{0},t] of \displaystyle \mathbb {R} :

\displaystyle {\dot {\mathbf {x} }}(t)=A(t)\mathbf {x} (t)+B(t)\mathbf {u} (t)

\displaystyle \mathbf {y} (t)=C(t)\mathbf {x} (t)+D(t)\mathbf {u} (t).
The state-transition matrix \displaystyle \phi is also smooth. Introduce the n x m matrix-valued function \displaystyle M_{0}(t)=\phi (t_{0},t)B(t) and define
\displaystyle {\frac {\mathrm {d^{k}} M_{0}}{\mathrm {d} t^{k}}}(t),k\geqslant 1 .

Consider the matrix of matrix-valued functions obtained by listing all the columns of the \displaystyle M_{i} , \displaystyle i=0,1,\ldots ,k :

\displaystyle M^{(k)}(t):=\left[M_{0}(t),\ldots ,M_{k}(t)\right] .

If there exists a \displaystyle {\bar {t}}\in [t_{0},t] and a nonnegative integer k such that \displaystyle \operatorname {rank} M^{(k)}({\bar {t}})=n , then \displaystyle \Sigma is controllable.[3]

If \displaystyle \Sigma is also analytically varying in an interval \displaystyle [t_{0},t] , then \displaystyle \Sigma is controllable on every nontrivial subinterval of \displaystyle [t_{0},t] if and only if there exists a \displaystyle {\bar {t}}\in [t_{0},t] and a nonnegative integer k such that \displaystyle rank \displaystyle M^{(k)}(t_{i})=n .[3]

The above methods can still be complex to check, since it involves the computation of the state-transition matrix \displaystyle \phi . Another equivalent condition is defined as follow. Let \displaystyle B_{0}(t)=B(t) , and for each \displaystyle i \geq 0, define

\displaystyle B_{i+1}(t) = \displaystyle A(t)B(t)-{\frac {\mathrm {d} }{\mathrm {d} t}}B_{i}(t).

In this case, each \displaystyle B_{i} is obtained directly from the data \displaystyle (A(t),B(t)). The system is controllable if there exists a \displaystyle {\bar {t}}\in [t_{0},t] and a nonnegative integer \displaystyle k such that \displaystyle {\textrm {rank}}(\left[B_{0}({\bar {t}}),B_{1}({\bar {t}}),\ldots ,B_{k}({\bar {t}})\right])=n .[3]

Example

Consider a system varying analytically in \displaystyle (-\infty ,\infty ) and matrices

\displaystyle A(t)={\begin{bmatrix}t&1&0\\0&t^{3}&0\\0&0&t^{2}\end{bmatrix}},

\displaystyle B(t)={\begin{bmatrix}0\\1\\1\end{bmatrix}}.

Then \displaystyle [B_{0}(0),B_{1}(0),B_{2}(0),B_{3}(0)]={\begin{bmatrix}0&1&0&-1\\1&0&0&0\\1&0&0&2\end{bmatrix}} and since this matrix has rank 3, the system is controllable on every nontrivial interval of \displaystyle \mathbb {R} .

Continuous linear time-invariant (LTI) systems

Consider the continuous linear time-invariant system

\displaystyle {\dot {\mathbf {x} }}(t)=A\mathbf {x} (t)+B\mathbf {u} (t)

\displaystyle \mathbf {y} (t)=C\mathbf {x} (t)+D\mathbf {u} (t)
where
\displaystyle \mathbf {x} is the \displaystyle n\times 1 “state vector”,
\displaystyle \mathbf {y} is the \displaystyle m\times 1 “output vector”,
\displaystyle \mathbf {u} is the \displaystyle r\times 1 “input (or control) vector”,
\displaystyle A is the \displaystyle n\times n “state matrix”,
\displaystyle B is the \displaystyle n\times r “input matrix”,
\displaystyle C is the \displaystyle m\times n “output matrix”,
\displaystyle D is the \displaystyle m\times r “feedthrough (or feedforward) matrix”.

The \displaystyle n\times nr controllability matrix is given by

\displaystyle R={\begin{bmatrix}B&AB&A^{2}B&...&A^{n-1}B\end{bmatrix}}

The system is controllable if the controllability matrix has full row rank (i.e. \displaystyle \operatorname {rank} (R)=n).

 

的呦!★

豈可寄望『善補過』者,會『不二過』吔◎

 

※ 參考

/scipy-cookbook

Scipy Cookbook

This is a conversion and second life of SciPy Cookbook (previously at http://wiki.scipy.org/Cookbook/); as a bunch of Ipython notebooks.

It can be found live at http://scipy-cookbook.readthedocs.org/

Rank and nullspace of a matrix

Date: 2011-09-14 (last modified), 2011-09-14 (created)
 The following module, rank_nullspace.py, provides the functions rank() and nullspace(). (Note that !NumPy already provides the function matrix_rank(); the function given here allows an absolute tolerance to be specified along with a relative tolerance.)