STEM 隨筆︰古典力學︰運動學【七】

竹枝詞九首‧唐‧劉禹錫

白帝城頭春草生,白鹽山下蜀江清。
南人上來歌一曲,北人莫上動鄉情。

山桃紅花滿上頭,蜀江春水拍山流。
花紅易衰似郎意,水流無限似儂愁。

江上朱樓新雨晴,瀼西春水縠紋生。
橋東橋西好楊柳,人來人去唱歌行。

日出三竿春霧消,江頭蜀客駐蘭橈。
憑寄狂夫書一紙,家住成都萬里橋。

兩岸山花似雪開,家家春酒滿銀杯。
昭君坊中多女伴,永安宮外踏青來。

城西門前灩澦堆,年年波浪不能摧。
懊惱人心不如石,少時東去複西來。

瞿塘嘈嘈十二灘,人言道路古來難。
長恨人心不如水,等閑平地起波瀾。

巫峽蒼蒼煙雨時,清猿啼在最高枝。
個里愁人腸自斷,由來不是此聲悲。

山上層層桃李花,雲間煙火是人家。
銀釧金釵來負水,長刀短笠去燒畬。

『小汽車』自洛水『小神龜』處得聞大道,若有所思乎?若有所知耶!或已先得『四知說』哩◎

詩經《大明》言

上帝臨女,無貳爾心。

,因『文』能『明』、『武』有『功』,可持守『不大聲以色』乎 !至於所謂『無知』耶?

後漢書‧卷五十四‧楊震傳》:當之郡,道經昌邑,故所舉荊州茂才王密為昌邑令,謁見,至夜懷金十斤以遺震。震曰:『故人知君,君不知故人,何也?』密曰:『暮夜無知者。』震曰:『天知 ,神知,我知,子知。何謂無知!』密愧而出。

,後『磕磕碰碰』自偏喜『竹枝詞』?因緣際會雷 ☳ 風 ☴ 一時裡,怎不出

楊柳青青江水平,聞郎江上唱歌聲。

東邊日出西邊雨,道是無晴卻有晴。

人天『吉凶』外??!!

據聞早能夜追螢火!!??

……

若問誰曉『 □ 在做, ○ 在看』,世間『第一車』☆

─── 《GOPIGO 小汽車︰格點圖像算術《什麼是影像》三之○□

 

雖然俗語道︰慢工出細。切莫太遲了,趕不上市集!

嘗聞得道者有

神通

神通(梵語:abhiññā),又譯為神力、通力、通,為佛教術語,指因禪定力而得到的超越凡人神秘力量,也有可能只是普通的幻術而已。這個名詞出現在多部佛經中,例如《大薩遮尼乾子所說經》、《楞嚴經》。

 

,故爾懷疑耳朵近日所生之哼哼聲,是『小汽車』有話要說耶?所以不管是否黃道吉日,趕緊收文『派生動力學』的乎??

Equations of motion

In mathematical physics, equations of motion are equations that describe the behaviour of a physical system in terms of its motion as a function of time.[1] More specifically, the equations of motion describe the behaviour of a physical system as a set of mathematical functions in terms of dynamic variables: normally spatial coordinates and time are used, but others are also possible, such as momentum components and time. The most general choice are generalized coordinates which can be any convenient variables characteristic of the physical system.[2] The functions are defined in a Euclidean space in classical mechanics, but are replaced by curved spaces in relativity. If the dynamics of a system is known, the equations are the solutions to the differential equations describing the motion of the dynamics.

There are two main descriptions of motion: dynamics and kinematics. Dynamics is general, since momenta, forces and energy of the particles are taken into account. In this instance, sometimes the term refers to the differential equations that the system satisfies (e.g., Newton’s second law or Euler–Lagrange equations), and sometimes to the solutions to those equations.

However, kinematics is simpler as it concerns only variables derived from the positions of objects, and time. In circumstances of constant acceleration, these simpler equations of motion are usually referred to as the SUVAT equations, arising from the definitions of kinematic quantities: displacement (s), initial velocity (u), final velocity (v), acceleration (a), and time (t).

Equations of motion can therefore be grouped under these main classifiers of motion. In all cases, the main types of motion are translations, rotations, oscillations, or any combinations of these.

A differential equation of motion, usually identified as some physical law and applying definitions of physical quantities, is used to set up an equation for the problem. Solving the differential equation will lead to a general solution with arbitrary constants, the arbitrariness corresponding to a family of solutions. A particular solution can be obtained by setting the initial values, which fixes the values of the constants.

To state this formally, in general an equation of motion M is a function of the position r of the object, its velocity (the first time derivative of r, v = dr/dt), and its acceleration (the second derivative of r, a = d2r/dt2), and time t.Euclidean vectors in 3D are denoted throughout in bold. This is equivalent to saying an equation of motion in r is a second order ordinary differential equation (ODE) in r,

\displaystyle M\left[\mathbf {r} (t),\mathbf {\dot {r}} (t),\mathbf {\ddot {r}} (t),t\right]=0\,,

where t is time, and each overdot denotes one time derivative. The initial conditions are given by the constant values at t = 0,
\displaystyle \mathbf {r} (0)\,,\quad \mathbf {\dot {r}} (0)\,.
The solution r(t) to the equation of motion, with specified initial values, describes the system for all times t after t = 0. Other dynamical variables like the momentum p of the object, or quantities derived from r and p like angular momentum, can be used in place of ras the quantity to solve for from some equation of motion, although the position of the object at time t is by far the most sought-after quantity.

Sometimes, the equation will be linear and is more likely to be exactly solvable. In general, the equation will be non-linear, and cannot be solved exactly so a variety of approximations must be used. The solutions to nonlinear equations may show chaotic behavior depending on how sensitive the system is to the initial conditions.

 

忽爾夢醒發現尚在『枕中』!早忘卻所言何事的矣!!

呂翁

開元十九年,道者呂翁,經邯鄲道上邸舍中,設榻施席。擔明鈔本擔作解。囊而坐。俄有邑中少年盧生,衣短裘,乘青駒,將適于田,亦止邸中,與翁接席。言笑殊暢,久之。盧生顧其衣裝弊褻。乃歎曰:「大丈夫生世不諧。而困如是乎。翁曰:「觀子膚極腧,體胖無恙,談諧方適;而歎其困者,何也。生曰。吾此苟生耳。何適之為。」翁曰:「此而不適,而何為適。生曰:「當建功樹名,出將入相,列鼎而食,選聲而聽,使族益茂而家用肥 ,然後可以言其適。吾志于學而游于藝,自惟當年,朱紫可拾,今已過壯室,猶勤田畆。非困而何。言訖,目昏思寐,是時主人蒸黃粱為饌,翁乃探囊中枕以授之曰:「子枕此,當令子榮適如志。」其枕瓷而竅其兩端。生俛首就之。寐中,見其竅大而明朗可處,舉身而入,遂至其家。娶清河崔氏女,女容甚麗而產甚殷 。由是衣裘服御,日已華侈,明年,舉進士,登甲科,解褐授校書郎,應制舉,授渭南縣尉,遷監察御史起居舍人,為制誥。三年即真。出典同州。尋轉陝州。生好土功。自陝西開河八十里以濟不通。邦人賴之,立碑頌德。遷汴州嶺南道採訪使。入京為京兆尹。是時神武皇帝方事夷狄。吐蕃新諾羅、龍莽布攻陷爪沙。節度使王君㚟新被敍投河隍戰恐。明鈔本新被叙投河隍戰恐八字作與之戰于河隍敗績。帝思將帥之任,遂除生御史中丞河西隴右節度使,大破戎虜七千級,開地九百里,築三大城以防要害,北邊賴之。以石紀功焉。歸朝策勳,恩禮極崇,轉御史大夫吏部侍郎。物望清重,群情翕習,大為當時宰相所忌,以飛語中之,貶端州刺史。三年徵還。除戶部尚書。未幾,拜中書侍郎同中書門下平章事,與蕭令嵩、裴侍中光庭同掌大政,十年,嘉謀密命,一日三接,獻替啟沃,號為賢相。同列者害之,遂誣與邊將交結 ,所圖不軌,下獄,府吏引徒至其門,追之甚急,生惶駭不測。泣其妻子曰。吾家本山東,良田數頃,足以禦寒餒,何苦求祿,而今及此,思復衣短裘,乘青駒,行邯鄲道中,不可得也。」引刀欲自裁,其妻救之得免。共罪者皆死,生獨有中人保護,得減死論。出授驩牧。數歲,帝知其冤,復起為中書令,封趙國公,恩旨殊渥,備極一時。生有五子。僔、倜,儉、位、倚。僔為考功員外,儉為侍御史,位為太常丞,季子倚最賢。年二十四,為右補闕。其姻媾皆天下族望。有孫十餘人。凡兩竄嶺表,再登台鉉,出入中外。廻翔臺閣。三十餘年間。崇盛赫弈。一時無比。末節頗奢蕩,好逸樂,後庭聲色皆第一。前後賜良田甲第,佳人名馬,不可勝數。後年漸老,屢乞骸骨,不許,及病,中人候望 ,接踵於路,名醫上藥畢至焉。將終,上疏曰:「臣本山東書生 ,以田圃為娛,偶逢聖運。得列官序。過蒙榮獎,特受鴻私,出擁旄鉞,入昇鼎輔,周旋中外,綿歷歲年,有忝恩造,無裨聖化 。負乘致寇。履薄戰兢。日極一日,不知老之將至。今年逾八十 ,位歷三公。鍾漏並歇。筋骸俱弊。彌留沈困。殆將溘盡。顧無誠効。上答休明,空負深恩。永辭聖代,無任感戀之至。謹奉表稱謝以聞。詔曰:「卿以俊德,作余元輔。出雄藩垣。入贊緝熙 ,昇平二紀。寔卿是賴。比因疾累,日謂痊除。豈遽沈頓。良深憫默,今遣驃騎大將軍高力士就第候省,其勉加針灸,為余自愛 。讌冀無妄。期丁有喜。」其夕卒。盧生欠伸而寤。見方偃於邸中,顧呂翁在傍,主人蒸黃粱尚未熟,觸類如故,蹶然而興曰:「豈其夢寐耶。」翁笑謂曰:「人世之事,亦猶是矣。」生然之。明鈔本然之作默然。良久謝曰:「夫寵辱之數,得喪之理,生死之情,盡知之矣。此先生所以窒吾欲也,敢不受教。」再拜而去。出《異聞集》

 

只好造起工來行呦◎

/pydy-tutorial-human-standing

n06_equations_of_motion.ipynb

 

 

 

 

 

 

 

 

 

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.)

 

 

 

 

 

 

 

 

 

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

已經拉格朗日方法談過了Kane’s method ,本想著簡寫輕描 n-鏈擺筆記。但思有助於學習者自我審查,且有許多作者筆有未到之處 ,故此去掉大半說明格子 cell ,希望讀者專心 numpy 、 scipy 、 sympy … 等等程式庫基本實務功夫也!

 

特別點出 sympy

符號運算通往快速數值計算

之 API ︰

sympy.utilities.lambdify.lambdify(args, expr, modules=None, printer=None, use_imps=True, dummify=True)

Returns a lambda function for fast calculation of numerical values.

If not specified differently by the user, modules defaults to ["numpy"] if NumPy is installed, and ["math", "mpmath", "sympy"] if it isn’t, that is, SymPy functions are replaced as far as possible by eithernumpy functions if available, and Python’s standard library math, or mpmath functions otherwise. To change this behavior, the “modules” argument can be used. It accepts:

  • the strings “math”, “mpmath”, “numpy”, “numexpr”, “sympy”, “tensorflow”
  • any modules (e.g. math)
  • dictionaries that map names of sympy functions to arbitrary functions
  • lists that contain a mix of the arguments above, with higher priority given to entries appearing first.

Warning

Note that this function uses eval, and thus shouldn’t be used on unsanitized input.

The default behavior is to substitute all arguments in the provided expression with dummy symbols. This allows for applied functions (e.g. f(t)) to be supplied as arguments. Call the function with dummify=False if dummy substitution is unwanted (and argsargs is not a string). If you want to view the lambdified function or provide “sympy” as the module, you should probably set dummify=False.

For functions involving large array calculations, numexpr can provide a significant speedup over numpy. Please note that the available functions for numexpr are more limited than numpy but can be expanded with implemented_function and user defined subclasses of Function. If specified, numexpr may be the only option in modules. The official list of numexpr functions can be found at: https://github.com/pydata/numexpr#supported-functions

In previous releases lambdify replaced Matrix with numpy.matrix by default. As of release 1.0 numpy.array is the default. To get the old default behavior you must pass in [{'ImmutableDenseMatrix':numpy.matrix}, 'numpy'] to the modules kwarg.

 

用者自己可實證的呦◎

22-lambdify.ipynb

 

 

 

 

 

 

 

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

熟悉 numpy 、 scipy 、 sympy … 者,或早已能讀

Dynamics with Python balancing the five link pendulum

Dynamics with Python

We’ve been working on a conference paper to demonstrate the ability to do multibody dynamics with Python. We’ve been calling this work flowPyDy, short for Python Dynamics. Several pieces of the puzzle have come together lately to really demonstrate the power of the scientific python software packages to handle complex dynamic and controls problems (i.e. IPython notebooks, matplotlib animations, python-control, and our software package mechanics which is a part of SymPy). After writing the draft of our paper, which uses a general n-link pendulum as it’s main example, I came across this blog post by Wolfram demonstrating their ability to symbolically derive the equations of motion for the n-link pendulum and stabilize it with an LQR controller. It inspired me to replicate the example as I realized that it was relatively easy to do with all free and open source software!

In this example problem we will derive the equations of motion of an n-link pendulum on a laterally sliding cart and then develop a controller to stabilize it. Balancing a single inverted pendulum is a classic problem that is many times a student’s first experience with non-linear dynamics and control. The problem here is extended to a general n-link pendulum and as we will see the equations of motion quickly get messy with greater than 2 links.

 

也。早就了然

pydy/examples/npendulum/

The equations of motion are derived for a multi-pendulum with n links, the system is simulated, animated and a controller is developed to balance the pendulum. The problem is detailed in-depth in the IPython notebook file. It is hosted as a blog post athttp://www.moorepants.info/blog/npendulum.html.

 

 

範例於胸矣。但又何妨溫故知新耶?

/scipy-2017-codegen-tutorial

SymPy code generation tutorial at SciPy 2017 http://www.sympy.org/scipy-2017-codeg…

Automatic Code Generation with SymPy

sympy logo

Watch the video of the tutorial online

Automatic Code Generation with SymPy | SciPy 2017 Tutorial | Jason, Aaron, Björn & Kenneth

 

This tutorial will introduce code generation concepts using the SymPy library. SymPy is a pure Python library for symbolic mathematics. Code generation refers to the act of converting a SymPy symbolic expression into equivalent code in some language, typically for numeric evaluation. This allows one to use SymPy to symbolically model a problem and generate fast numerical code for specific platforms that executes that model. This is a powerful tool that is useful to scientists in many domains. Code generation allows users to speed up existing code, to deal only with the high level mathematics of a problem, avoids mathematical errors and typos, makes it possible to deal with expressions that would otherwise be too large to write by hand, and opens possibilities to perform automatic mathematical optimizations of expressions.

SymPy supports generating code for C, C++, Fortran, MATLAB/Octave, Python, Cython, Julia, JavaScript, LLVM, Rust, Haskell, Mathematica, Tensorflow, and Theano, and can easily be extended to other languages. SymPy’s code generation is used by libraries such as PyDy, pyodesys, sympybotics, pycalphad, and many other programs.

SciPy 2017 Codegen Tutorial

Introduction

This repository contains all of the source code and Jupyter notebooks for the SciPy 2017 tutorial “Automatic Code Generation with SymPy”.

The original proposal for this tutorial can be found on the SymPy Wiki.

The statically rendered Jupyter notebooks in this repository can be viewed at sympy.org/scipy-2017-codegen-tutorial or onNBViewer.

 

此所以引用

Numerical integration of Ordinary Differential Equations

※ 註

ODEPACKOrdinary Differential Equation Solvers


ODEPACK is a FORTRAN77 library which implements a variety of solvers for ordinary differential equations, by Alan Hindmarsh.

The library includes routines commonly referred to as

  • LSODE solves nonstiff or stiff systems y’ = f(y,t);
  • LSODES is like LSODE, but in the stiff case the Jacobian matrix is assumed to be sparse, and treated with sparse routines;
  • LSODA automatically switches between nonstiff and stiff solvers depending on the behavior of the problem;
  • LSODAR is like LSODE, but includes the ability to detect and solve for solutions of a related set of algebraic equations;
  • LSODPK is like LSODE, but uses preconditioned Krylov space iterative methods for the linear equation solvers;
  • LSODKR includes the rootfinding ability of LSODA, and the Krylov solvers of LSODPK.
  • LSODI solves the implicit system A(y,t)*y'(t) = g(y,t).
  • LSOIBT is like LSODI, but assumes the matrix A is block tridiagonal.
  • LSODIS is like LSODI, but assumes the matrix A is sparse.

ODEPACK is a collection of Fortran solvers for the initial value problem for ordinary differential equation systems. It consists of nine solvers, namely a basic solver called LSODE and eight variants of it — LSODES, LSODA, LSODAR, LSODPK, LSODKR, LSODI, LSOIBT, and LSODIS. The collection is suitable for both stiff and nonstiff systems. It includes solvers for systems given in explicit form, dy/dt = f(t,y), and also solvers for systems given in linearly implicit form, A(t,y) dy/dt = g(t,y). Two of the solvers use general sparse matrix solvers for the linear systems that arise. Two others use iterative (preconditioned Krylov) methods instead of direct methods for these linear systems. The most recent addition is LSODIS, which solves implicit problems with general sparse treatment of all matrices involved.

The ODEPACK solvers are written in standard Fortran 77, with a few exceptions, and with minimal machine dependencies. There are separate double and single precision versions of ODEPACK. The actual solver names are those given above with a prefix of D- or S- for the double or single precision version, respectively, i.e. DLSODE/SLSODE, etc. Each solver consists of a main driver subroutine having the same name as the solver and some number of subordinate routines. For each solver, there is also a demonstration program, which solves one or two simple problems in a somewhat self-checking manner.

Recently, the ODEPACK solvers were upgraded to improve their portability in numerous ways. Among the improvements are (a) renaming of routines and Common blocks to distinguish double and single precision versions, (b) use of generic intrinsic function names, (c) elimination of the Block Data subprogram, (d) use of a portable routine to set the unit roundoff, and (e) passing of quoted strings to the error message handler. In addition, the prologue and internal comments were reformatted, and use mixed upper/lower case. Numerous minor corrections and improvements were also made.

The above upgrade operations were applied to LSODE earlier than they were to the rest of ODEPACK, and the two upgrades were done somewhat independently. As a result, some differences will be apparent in the source files of LSODE and the other solvers — primarily in the formatting of the comment line prologue of the main driver routine. In Subroutines DLSODE/SLSODE and their subordinate routines, the prologue was written in “SLATEC format”, while for the other solvers a more relaxed style was used. The differences are entirely cosmetic, however, and do not affect performance.

Documentation on the usage of each solver is provided in the initial block of comment lines in the source file, which (in most cases) includes a simple example.

 

筆記,願君更上一層樓呦!

 

 

 

 

 

 

 

 

STEM 隨筆︰古典力學︰動力學【五‧五‧己】

曾聞小學堂的蟲食算考倒了大專生?想來其實也沒什麼奇怪!學而不思則罔,思其所學整理明辨,自有所得而且記憶長久,否則日遠時遷,早忘之矣!不會算豈不很正常!!舉例來說︰

孤獨的n

在一堆空格的數式中,剛好只有一個數字n。以下是一個「孤獨的六」:

<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> \begin{matrix}<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> & & & \Box & \Box & \Box \\<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> \hline<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> \Box & ) & \Box & \Box & \Box & \Box \\<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> & & & \Box & & \\<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> \hline<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> & & & \Box & \Box & \\<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> & & & & \Box & \\<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> \hline<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> & & & & 6 & \Box \\<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> & & & & \Box & \Box \\<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> \end{matrix}<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />

這個孤獨的六是1053/9的直式

求解需要個下手處。那個『被除數』的千位首數必是 1 。為什麼呢 ?觀其直式除法之『商』的首數與『除式寫法』未及於『被除數』的千位首數而得知。再者那個『除數』由『商』的尾數乘法知道,只能是『7 * 9 = 63』、『8 * 8 = 64』或『9 * 7 = 63』。添上直式除法首起『兩數相乘是一位數』,可以推知『商』的首數是 1 。否則就成兩位數的了。接著推『二位數 減 一位數 等於 一位數 1 』,此 1 來於其下的直式之寫法。如此可得『被除數』首起『二位數』為 10,而且『除數』是 9 。同理『商』的十位數也必是 1 ,以及 1 □ – 9 = 6 ,所以『被除數』的十位數是 5 。故得解。

『正算反推』雖都依賴『加減乘除』的『性質』,熟悉其一,不通另一,大半因為練習多寡所致。正如《邂逅 W!o ?!》文本中講的『逆問題』

Li Bai

A Quiet Night Thought

In front of my bed, there is bright moonlight.
It appears to be frost on the ground.
I lift my head and gaze at the August Moon,
I lower my head and think of my hometown.

 

Contemplation

Moon twilight approaches, coating the ground through the window,
Resembles a touch of frost,
Moon at the window,
Taking me back to where I am from.

李白

静夜思

床前明月光
疑是地上霜
舉頭望明月
低頭思故鄉

假使將李白的《靜夜思》翻譯成英文,藉由『中英對照』,是否更能『理解』原作之『意境』呢?還是會少了點『』的『味道』??或許這個『利弊得失』就落在︰

『文化』之『盲點』,常顯現在『意義』的『忽略』之中。

『人文』之『偏見』,普遍藏於『字詞』之『情感』之內。

故而同一『內容』的多種『語言文本』,也許可見那『通常之所不見』

Inverse problem

An inverse problem is a general framework that is used to convert observed measurements into information about a physical object or system. For example, if we have measurements of the Earth’s gravity field, then we might ask the question: “given the data that we have available, what can we say about the density distribution of the Earth in that area?” The solution to this problem (i.e., the density distribution that best matches the data) is useful because it generally tells us something about a physical parameter that we cannot directly observe. Thus, inverse problems are some of the most important and well-studied mathematical problems in science and mathematics. Inverse problems arise in many branches of science and mathematics, including computer vision, natural language processing, machine learning, statistics, statistical inference, geophysics, medical imaging (such as computed axial tomography and EEG/ERP), remote sensing, ocean acoustic tomography, nondestructive testing, astronomy, physics and many other fields.

逆問題

逆 問題是一個關於如何將觀測和測量的結果轉換為物體或系統的信息的廣義框架。比如,如果我們有一個關於地球重力場的測量結果,我們就會問:「利用現有的信 息,我們能否得到地球的密度分布?」。這類問題的解(即最符合測量數據的密度分布)通常就可以告訴我們一個無法直接測量的物理量。因此,逆問題是在數學和 物理學中最重要和被研究的最多的問題之一。逆問題廣泛的出現在諸如計算機視覺,自然語言處理,機器學習,統計學,推論統計學,地理,醫學成像(比如X射線 計算機斷層成像和腦電圖/事件相關電位),遙感,海洋聲學層析,無損檢測,航空,物理學中。

一般所以難解之故。所謂『去除盲點』,就是『能見己所未見』之功夫。

─── 《勇闖新世界︰ 《 PYDATALOG 》【專題】之約束編程‧五

 

有人說︰『學問』就是要『學』要『問』。這裡彷彿假設『教』者存在,那麼『教』者是誰呢?所謂『三人行,必有我師焉』,明講『擇其善者而從之,其不善者而改之』,直指以『天下人』為『師』也!真能自『問』自『學』,又自『改』之,何道不通乎??就像『未來』根源於『現在』,卻不決定於『過去』!!

故耳心思『邂逅 W!o ?!』,遙想『後裔之境』耶!?

如果一個『線性系統S 的『輸出O  與『輸入I 間之『刺激響應』聯繫可以用『關係矩陣M 表示為︰

O = M \cdot I

,那麼假使我們知道了 O ,是否可以推測出 I 是什麼?符號上或許可以形式的寫成︰

I = M^{-1}  \cdot O

,要是『關係矩陣』之『逆矩陣M^{-1} 存在的話。

由於可能的『非線性』,以及不同的『輸入組合』可以產生『相同輸出』,想要透過 O 得到 I ,一般是非常困難的。即使是在『線性系統』中,通常那個 M^{-1} 也不存在!因此也許只能用著『最小平方法』  Least Squares 去推估那個系統 S 之『最佳模型』的『組構參數』罷了!!

User-FastFission-brain
神經成像 Neuroimaging
Parasagittal_MRI_of_human_head_in_patient_with_benign_familial_macrocephaly_prior_to_brain_injury_(ANIMATED)

神經成像』 Neuroimaging 泛指能夠『直接』或『間接』的對神經系統 ── 主要是 ── 的『功能』,『結構』,以及『藥理』特性進行成像之技術。這個技術是現今之醫學,神經科學,和心理學較前沿的一個領域。

那麼我們可以依靠『圖像』來『解讀』一個人的『思想』、『情感』或是『健康』…等等的嗎?這樣的『讀解』和中醫『把脈』斷病如何比較其不同呢??說不定神奇的『大自然』充滿著『』與『』,正等待心中有『』的人去『』的哩!!

 

或可倒過來寫『逆問題』解法發展史哩!☆

GEOPHYSICS

 

TECHNICAL PAPERS

Jose Pujol1

1University of Memphis, Department of Earth Sciences, Memphis, Tennessee. .

 

Although the Levenberg-Marquardt damped least-squares method is an extremely powerful tool for the iterative solution of nonlinear problems, its theoretical basis has not been described adequately in the literature. This is unfortunate, because Levenberg and Marquardt approached the solution of nonlinear problems in different ways and presented results that go far beyond the simple equation that characterizes the method. The idea of damping the solution was introduced by Levenberg, who also showed that it is possible to do that while at the same time reducing the value of a function that must be minimized iteratively. This result is not obvious, although it is taken for granted. Moreover, Levenberg derived a solution more general than the one currently used. Marquardt started with the current equation and showed that it interpolates between the ordinary least-squares-method and the steepest-descent method. In this tutorial, the two papers are combined into a unified presentation, which will help the reader gain a better understanding of what happens when solving nonlinear problems. Because the damped least-squares and steepest-descent methods are intimately related, the latter is also discussed, in particular in its relation to the gradient. When the inversion parameters have the same dimensions (and units), the direction of steepest descent is equal to the direction of minus the gradient. In other cases, it is necessary to introduce a metric (i.e., a definition of distance) in the parameter space to establish a relation between the two directions. Although neither Levenberg nor Marquardt discussed these matters, their results imply the introduction of a metric. Some of the concepts presented here are illustrated with the inversion of synthetic gravity data corresponding to a buried sphere of unknown radius and depth. Finally, the work done by early researchers that rediscovered the damped least-squares method is put into a historical context.

 

重新論述『曲線擬合』函數選擇術矣!★

Curve fitting

Curve fitting[1][2] is the process of constructing a curve, or mathematical function, that has the best fit to a series of data points,[3] possibly subject to constraints.[4][5] Curve fitting can involve either interpolation,[6][7] where an exact fit to the data is required, or smoothing,[8][9] in which a “smooth” function is constructed that approximately fits the data. A related topic is regression analysis,[10][11] which focuses more on questions of statistical inference such as how much uncertainty is present in a curve that is fit to data observed with random errors. Fitted curves can be used as an aid for data visualization,[12][13] to infer values of a function where no data are available,[14] and to summarize the relationships among two or more variables.[15] Extrapolation refers to the use of a fitted curve beyond the range of the observed data,[16]and is subject to a degree of uncertainty[17] since it may reflect the method used to construct the curve as much as it reflects the observed data.

Different types of curve fitting

Fitting functions to data points

Most commonly, one fits a function of the form y=f(x).

Fitting lines and polynomial functions to data points

Polynomial curves fitting a sine function

 Polynomial curves fitting points generated with a sine function.
Red line is a first degree polynomial, green line issecond degree, orange line is third degree and blue is fourth degree

The first degree polynomial equation

\displaystyle y=ax+b\;

is a line with slope a. A line will connect any two points, so a first degree polynomial equation is an exact fit through any two points with distinct x coordinates.

If the order of the equation is increased to a second degree polynomial, the following results:

\displaystyle y=ax^{2}+bx+c\;.

This will exactly fit a simple curve to three points.

If the order of the equation is increased to a third degree polynomial, the following is obtained:

\displaystyle y=ax^{3}+bx^{2}+cx+d\;.

This will exactly fit four points.

A more general statement would be to say it will exactly fit four constraints. Each constraint can be a point, angle, or curvature (which is the reciprocal of the radius of an osculating circle). Angle and curvature constraints are most often added to the ends of a curve, and in such cases are called end conditions. Identical end conditions are frequently used to ensure a smooth transition between polynomial curves contained within a single spline. Higher-order constraints, such as “the change in the rate of curvature”, could also be added. This, for example, would be useful in highway cloverleaf design to understand the rate of change of the forces applied to a car (see jerk), as it follows the cloverleaf, and to set reasonable speed limits, accordingly.

The first degree polynomial equation could also be an exact fit for a single point and an angle while the third degree polynomial equation could also be an exact fit for two points, an angle constraint, and a curvature constraint. Many other combinations of constraints are possible for these and for higher order polynomial equations.

If there are more than n + 1 constraints (n being the degree of the polynomial), the polynomial curve can still be run through those constraints. An exact fit to all constraints is not certain (but might happen, for example, in the case of a first degree polynomial exactly fitting three collinear points). In general, however, some method is then needed to evaluate each approximation. The least squares method is one way to compare the deviations.

There are several reasons given to get an approximate fit when it is possible to simply increase the degree of the polynomial equation and get an exact match.:

  • Even if an exact match exists, it does not necessarily follow that it can be readily discovered. Depending on the algorithm used there may be a divergent case, where the exact fit cannot be calculated, or it might take too much computer time to find the solution. This situation might require an approximate solution.
  • The effect of averaging out questionable data points in a sample, rather than distorting the curve to fit them exactly, may be desirable.
  • Runge’s phenomenon: high order polynomials can be highly oscillatory. If a curve runs through two points A and B, it would be expected that the curve would run somewhat near the midpoint of A and B, as well. This may not happen with high-order polynomial curves; they may even have values that are very large in positive or negative magnitude. With low-order polynomials, the curve is more likely to fall near the midpoint (it’s even guaranteed to exactly run through the midpoint on a first degree polynomial).
  • Low-order polynomials tend to be smooth and high order polynomial curves tend to be “lumpy”. To define this more precisely, the maximum number of inflection points possible in a polynomial curve is n-2, where n is the order of the polynomial equation. An inflection point is a location on the curve where it switches from a positive radius to negative. We can also say this is where it transitions from “holding water” to “shedding water”. Note that it is only “possible” that high order polynomials will be lumpy; they could also be smooth, but there is no guarantee of this, unlike with low order polynomial curves. A fifteenth degree polynomial could have, at most, thirteen inflection points, but could also have twelve, eleven, or any number down to zero.

The degree of the polynomial curve being higher than needed for an exact fit is undesirable for all the reasons listed previously for high order polynomials, but also leads to a case where there are an infinite number of solutions. For example, a first degree polynomial (a line) constrained by only a single point, instead of the usual two, would give an infinite number of solutions. This brings up the problem of how to compare and choose just one solution, which can be a problem for software and for humans, as well. For this reason, it is usually best to choose as low a degree as possible for an exact match on all constraints, and perhaps an even lower degree, if an approximate fit is acceptable.

 ※ 註

e^{kx} 函數無窮可微 \frac{d^n}{{dx}^n} e^{kx} = k^n e^{kx} ,無限平滑。

\cos (\theta) = \frac{1}{2} \left( e^{i \theta} + e^{- i \theta} \right)

\sin (\theta) = \frac{1}{2i} \left( e^{i \theta} - e^{- i \theta} \right)

 

進而跨越『混沌之澤』呦◎

Rössler attractor

The Rössler attractor /ˈrɒslər/ is the attractor for the Rössler system, a system of three non-linear ordinary differential equations originally studied by Otto Rössler.[1][2] These differential equations define a continuous-time dynamical system that exhibits chaotic dynamics associated with the fractal properties of the attractor.[3]

Some properties of the Rössler system can be deduced via linear methods such as eigenvectors, but the main features of the system require non-linear methods such as Poincaré maps and bifurcation diagrams. The original Rössler paper states the Rössler attractor was intended to behave similarly to the Lorenz attractor, but also be easier to analyze qualitatively.[1] An orbit within the attractor follows an outward spiral close to the \displaystyle x,y plane around an unstable fixed point. Once the graph spirals out enough, a second fixed point influences the graph, causing a rise and twist in the \displaystyle z-dimension. In the time domain, it becomes apparent that although each variable is oscillating within a fixed range of values, the oscillations are chaotic. This attractor has some similarities to the Lorenz attractor, but is simpler and has only one manifold. Otto Rössler designed the Rössler attractor in 1976,[1] but the originally theoretical equations were later found to be useful in modeling equilibrium in chemical reactions.

Rössler attractor as a stereogramwith \displaystyle a=0.2 ,  \displaystyle b=0.2 , \displaystyle c=14

Definition

The defining equations of the Rössler system are:[3]

\displaystyle {\begin{cases}{\frac {dx}{dt}}=-y-z\\{\frac {dy}{dt}}=x+ay\\{\frac {dz}{dt}}=b+z(x-c)\end{cases}}

Rössler studied the chaotic attractor with \displaystyle a=0.2 , \displaystyle b=0.2 , though properties of \displaystyle a=0.1 , \displaystyle b=0.1 , and \displaystyle c=14 have been more commonly used since. Another line of the parameter space was investigated using the topological analysis. It corresponds to \displaystyle b=2 , \displaystyle c=4 , and \displaystyle a was chosen as the bifurcation parameter.[4] How Rössler discovered this set of equations was investigated by Letellier and Messager.[5]

 

若斯叻吸引子

若斯叻吸引子(Rössler attractor)是一組三元非線性微分方程:[1][2]

\displaystyle {\frac {dx(t)}{dt}}=-y(t)-z(t)

\displaystyle {\frac {dy(t)}{dt}}=x(t)+a*y(t)

\displaystyle {\frac {dz(t)}{dt}}=b-c*z(t)+x(t)*z(t)

若斯叻方程沒有解析解,但可利用龍格-庫塔法求數值解並做圖 。

Rossler attractor plot.png