分類彙整: 樹莓派之教育

勇闖新世界︰ W!o《卡夫卡村》變形祭︰感知自然‧幽夢‧三

在《制器尚象,恆其道。》的文本裡︰

人類如何『創造』呢?在此一篇短文中無法談及全豹,所以串講科學史上幾則逸事略窺一斑。就讓我們從『苯環之夢』談起,

【苯環之夢】

250px-Benzene_structure

凱庫勒夢到了分子是一個環狀結構

1864年冬,某天德國化學家凱庫勒 Friedrich August Kekulé von Stradonitz 正坐在壁爐前打瞌睡,迷糊中原子們開始飛舞,碳原子串成了鏈,像一般環繞,就像著自己的尾巴似的,在他眼前迴旋。 猛然地驚醒後,凱庫勒終於明白了苯分子是一個環狀結構。碳原子們在對稱的六邊形上跳動。

【雜訊放大器】

傳聞有一回愛因斯坦突發奇想,想將『雜訊』放大,人們都覺得很奇怪,幹嘛要把『沒用的』雜訊放大?難道愛因斯坦很了解『當其無』嗎︰

老子道德經 第十一章』

三十輻,共一,當其無,有之用。

埏埴以爲器,當其無,有器之用。

鑿戶牖以爲室,當其無,有室之用。

之以爲之以爲

或許應該說如果沒有無所不在』的雜訊,又怎麽能製作『任意頻率』── 放大雜訊,用慮波器選擇所要的頻率 ── 的振盪器呢?恰可比美於所謂的『腦力激盪』之法。

【研究不可能的好處】

Leonardo da Vinci eMoto

達文西之永動機

自古以來,許多人前仆後繼的不斷嘗試想發明『永動機』── 一種能夠 持續運轉工作的機器。今天的熱力學告訴我們這是『不可能』實現的。

既然『不可能』,那『為什麼』要研究呢?首先,熱力學的發展歷史,就是想要證實永動機』是可能的或是不可能的?其次,過去不可能的,現在還是不可能?牛頓蘋果如果能量不夠,是飛不出牆,打不到我的;但是量子力學電子,即使能量依然不夠,卻能穿牆而過── 隧道效應 ──。所以說,不可能未必然是『必然的不可能』。再者,過去也有人曾經說過︰設計高階的電腦語言是『不可能』的,因為人類自己都還『搞不懂』自己怎麽學會語言的,哪又怎能『教得會』電腦呢?答案不言而喻

專心致志恆一其道,或許是制器尚象的精粹。比擬︰

如何制作雷射

精誠所至 匹配濾波器選擇『所要的』波長的『共振腔』,

金石為開 共振放大後得到 『Laser』。

───

 

點出了『濾波』概念的重要性。怎麼從錯綜萬象中摘取『所需』?如何自複雜數據裡提煉『所要』??尚難盡『濾波』實務於萬一!略引維基百科若干條例,或可知其理念廣大的乎!!

【布林編程】

Filter (higher-order function)

In functional programming, filter is a higher-order function that processes a data structure (typically a list) in some order to produce a new data structure containing exactly those elements of the original data structure for which a given predicate returns the boolean value true.

 

【訊號處理】

Filter (signal processing)

In signal processing, a filter is a device or process that removes from a signal some unwanted component or feature. Filtering is a class of signal processing, the defining feature of filters being the complete or partial suppression of some aspect of the signal[clarification needed]. Most often, this means removing some frequencies and not others in order to suppress interfering signals and reduce background noise. However, filters do not exclusively act in the frequency domain; especially in the field of image processing many other targets for filtering exist. Correlations can be removed for certain frequency components and not for others without having to act in the frequency domain.

There are many different bases of classifying filters and these overlap in many different ways; there is no simple hierarchical classification. Filters may be:

 

【哲學思辨】

Category (Kant)

In Kant‘s philosophy, a category is a pure concept of the understanding. A Kantian category is a characteristic of the appearance of any object in general, before it has been experienced. Kant wrote that “They are concepts of an object in general….”[1] Kant also wrote that, “…pure cоncepts [Categories] of the undеrstanding…apply to objects of intuition in general….”[2] Such a category is not a classificatory division, as the word is commonly used. It is, instead, the condition of the possibility of objects in general,[3] that is, objects as such, any and all objects, not specific objects in particular.

Meaning of “category”

The word comes from the Greek κατηγορία, katēgoria, meaning “that which can be said, predicated, or publicly declared and asserted, about something.” A category is an attribute, property, quality, or characteristic that can be predicated of a thing. “…I remark concerning the categories…that their logical employment consists in their use as predicates of objects.”[4] Kant called them “ontological predicates.”[5]

Aristotle had claimed that the following ten predicates or categories could be asserted of anything in general: substance, quantity, quality, relation, action, affection (passivity), place, time (date), position, and state.

The Categories, or Predicaments — the former a Greek word, the latter its literal translation in the Latin language — were believed to be an enumeration of all things capable of being named, an enumeration by the summa genera (highest kind), i.e., the most extensive classes into which things could be distributed, which, therefore, were so many highest Predicates, one or other of which was supposed capable of being affirmed with truth of every nameable thing whatsoever.
— J.S. Mill, [6]

These are supposed to be the qualities or attributes that can be affirmed of each and every thing in experience. Any particular object that exists in thought must have been able to have the Categories attributed to it as possible predicates because the Categories are the properties, qualities, or characteristics of any possible object in general. The Categories of Aristotle and Kant are the general properties that belong to all things without expressing the peculiar nature of any particular thing. Kant appreciated Aristotle’s effort, but said that his table was imperfect because ” … as he had no guiding principle, he merely picked them up as they occurred to him…”[7]

The Categories do not provide knowledge of individual, particular objects. Any object, however, must have Categories as its characteristics if it is to be an object of experience. It is presupposed or assumed that anything that is a specific object must possess Categories as its properties because Categories are predicates of an object in general. An object in general does not have all of the Categories as predicates at one time. For example, a general object cannot have the qualitative Categories of reality and negation at the same time. Similarly, an object in general cannot have both unity and plurality as quantitative predicates at once. The Categories of Modality exclude each other. Therefore, a general object cannot simultaneously have the Categories of possibility/impossibility and existence/non–existence as qualities.

Since the Categories are a list of that which can be said of every object, they are related only to human language. In making a verbal statement about an object, a speaker makes a judgment. A general object, that is, every object, has attributes that are contained in Kant’s list of Categories. In a judgment, or verbal statement, the Categories are the predicates that can be asserted of every object and all objects.

───

 

也許有人會講康德的『範疇說』分明沒提到『濾波』一詞,豈非是胡塞硬套的呢!人的『分別』之心『分類』萬事萬物,『價值』之心『抉擇』想要不要,皆是『心靈濾波器』的耶?若是宇宙一切皆『無差別 』,『範疇』安將能存在的哩??如是當知『濾波』之『結果』正是人所『感知』之『自然』,可一探萬有運作之『心法 』乎!!??

 

 

 

 

 

 

 

 

 

 

勇闖新世界︰ W!o《卡夫卡村》變形祭︰感知自然‧幽夢‧二

從牛頓力學來講,假使我們知道一個物體的『加速度』 \vec{a} (t) ,而且如果『初始條件』︰該物位置在原點,速度為零。那麼任意時刻的『速度』是 \vec{v} (t)  = \int \limits_{0}^{t} \vec{a} (t) dt ,『位置』為 \vec{r} (t) = \int \limits_{0}^{t} \int \limits_{0}^{t} \vec{a} (t) dt 。這麼簡易的算術有什麼重要嗎?若是我們可以『追跡物體 』,舉凡相機拍照的防震、手腳運動之練習、肢體平衡復健的監督﹐…… 實有著不勝枚舉之『用途』。然而『微機電』所作的『慣性感測器』 IMU ,一有免不了的『加速度』之『度量誤差』,此誤差在長『時間』的『積累』下將越來『錯誤』越大!再者那個『量測值』只能是『加速度』的『時間序列』 \vec{a} ( t_i ) ,因此 t_mt_n 時刻間之事也就不得不有『假設』的了!!就像此處問答所說的一樣︰

Tracking 2D positioning with IMU Sensor

I am using a miniature car and I want to estimate the position. We can not use GPS modules and most of the tracking systems that I saw, are using IMU senson with the GPS module. In our car we are able to find our exact correct location with image processing but for some parts that dont have enough markings we can not do this. So we want to use the IMU as backup for our positioning. so as long as the positioning is close is good for us.

And we are only interested in our 2D position since the car is on a flat ground.

I am using a IMU 9DOF sensor and I want to calculate my movement. I have seen some amazing works with IMU for tracking body movements but no code or simple explanation is anywhere about it. So basically I have the reading from accelerometer, gyro and magnetometer. I also have orientation in quarternions. From the device I am getting also the linear acceleration but even when I am not moving it in any direction the values are not 0 which is really confusing.

Can you please help me how to approach this?

Thanks in advance

Update :

So right now we are getting the perfect heading from the quaternion values. We also have the delta_time between each heading. So what I believe we need right now is the velocity. either as a vector or as a total value.

shareimprove this question

───

Non-zero rates are normal for MEMS accelerometers and gyros. This is persistent error. It is eliminated by somehow making sure that the device is stationary for a couple of seconds (so the output can stabilize), then getting a reading. Henceforth, subtracting this steady-state error from all future measurements. Look up the datasheet of your sensor – there will be maximum values for this and other types of measurement tolerances.

Now, the much more complex subject of fusing the accelerometer, gyro and compass data. This can get hugely complicated, using Kalman filter, like Apolo once did. It can, however, be quite simple as well.

The general idea is that the magnetic sensor has slow response, low accuracy, but the error does not increase. On the other hand, a gyro’s output is velocity, which is integrated to get angular position. The error grows very fast – generally you can’t do dead reckoning for more than a minute with only a giro. The accelerometer is worse – it outputs acceleration, which gets integrated twice!

So, a simple fusing filter would be some linear combination of the readings of the accelerometer and compass, with the coefficient in front of the gyro descreasing over tyme.

Here is a discussion by much more knowledgeable people than me on the topic.

Note: What you are trying to do is called dead reckoning.

shareimprove this answer

───

 

於是為了能夠更好的『應用』 IMU ,終將走入『數據處理』之路。『卡爾曼濾波Kalman filter

Kalman filtering, also known as linear quadratic estimation (LQE), is an algorithm that uses a series of measurements observed over time, containing statistical noise and other inaccuracies, and produces estimates of unknown variables that tend to be more precise than those based on a single measurement alone. The filter is named after Rudolf E. Kálmán, one of the primary developers of its theory.

The Kalman filter has numerous applications in technology. A common application is for guidance, navigation and control of vehicles, particularly aircraft and spacecraft. Furthermore, the Kalman filter is a widely applied concept in time series analysis used in fields such as signal processing and econometrics. Kalman filters also are one of the main topics in the field of robotic motion planning and control, and they are sometimes included in trajectory optimization. The multi-fractional order estimator is a simple and practical alternative to the Kalman filter for tracking targets.

The algorithm works in a two-step process. In the prediction step, the Kalman filter produces estimates of the current state variables, along with their uncertainties. Once the outcome of the next measurement (necessarily corrupted with some amount of error, including random noise) is observed, these estimates are updated using a weighted average, with more weight being given to estimates with higher certainty. The algorithm is recursive. It can run in real time, using only the present input measurements and the previously calculated state and its uncertainty matrix; no additional past information is required.

The Kalman filter does not require any assumption that the errors are Gaussian.[1] However, the filter yields the exact conditional probability estimate in the special case that all errors are Gaussian-distributed.

Extensions and generalizations to the method have also been developed, such as the extended Kalman filter and the unscented Kalman filter which work on nonlinear systems. The underlying model is a Bayesian model similar to a hidden Markov model but where the state space of the latent variables is continuous and where all latent and observed variables have Gaussian distributions.

……

 

就是早年發展重要的一種『數據處理』方法。也許下面一篇論文的『摘要』

Displacement profile estimation using low cost inertial motion sensors with applications to sporting and rehabilitation exercises

Abstract
This paper investigates two methods of displacement estimation using sampled acceleration and orientation data from a 6 degrees of freedom (DOF) Inertial Measurement Unit (IMU), with the application to sporting training and rehabilitation. Currently, the use of low cost IMUs for this particular application is very impractical due to the accumulation of errors from various sources. Previous studies and projects that have applied IMUs to similar applications have used a lower number of DOF, or have used higher accuracy navigational grade IMUs. Solutions to the acceleration noise accumulation and gyroscope angle error problem are proposed in this paper. A zero velocity update algorithm (ZUPT) is also developed to improve the accuracy of displacement estimation with a low grade IMU. The experimental results from this study demonstrate the feasibility of using an IMU with loose tolerances to determine the displacement. Peak distances of a range of exercises are shown to be measured with accuracies within 5% for the numerical integration methods.

Keywords
estimation, profile, displacement, sporting, applications, sensors, motion, inertial, exercises, cost, rehabilitation, low

Disciplines
Engineering | Science and Technology Studies

Publication Details
J. Coyte, D. A. Stirling, M. Ros, H. Du & A. Gray, “Displacement profile estimation using low cost inertial motion sensors with applications to sporting and rehabilitation exercises,” in 2013 IEEE/ASME International Conference on Advanced Intelligent Mechatronics (AIM), 2013, pp. 1290-1295.

───

 

將引領我們走得更遠乎??終究莫忘那『微分』與『差分』方程式可以很不相同的耶!!

150px-Pierre_Francois_Verhulst

Logistic-curve.svg

P(t) = \frac{1}{1 + \mathrm e^{-t}}

350px-Logit.svg

\operatorname{logit}(p)=\log\left( \frac{p}{1-p} \right)

220px-Linear_regression.svg

Y \approx F(X, \Box)

Maple_logistic_plot_small

x_{n+1} = r x_n(1 - x_n)

Logistic_map_animation

Logistic_map_phase_plot_of_x-n+1--x-n-_vs_x-n-

相圖

512px-LogisticMap_BifurcationDiagram

Logistic_map

Logistic_map_scatterplots_large

LogisticCobwebChaos
定點震盪混沌

200px-Ganzhi001

300px-NewtonIteration_Ani

一八三八年,比利時數學家 Pierre François Verhulst 發表了一個『人口成長』方程式,

\frac{dN}{dt} = r N \left(1 - \frac {N}{K} \right)

,此處 N(t) 是某時的人口數,r 是自然成長率, K 是環境承載力。求解後得到

N(t) = \frac{K}{1+ C K e^{-rt}}

,此處 C = \frac{1}{N(0)} - \frac{1}{K} 是初始條件。 Verhulst 將這個函數稱作『logistic function』,於是那個微分方程式也就叫做『 logistic equation』。假使用 P = \frac{N}{K} 改寫成 \frac{dP}{dt} = r P \left(1 - P \right),將它『標準化』,取 CK = 1r = 1,從左圖的解答來看, 0 < P <1,也就是講人口數成長不可能超過環境承載力的啊!

如果求 P(t) 的反函數,得到 t = \ln{\frac {1 -P}{P}},這個反函數被稱之為『Logit』函數,定義為

\operatorname{logit}(p)=\log\left( \frac{p}{1-p} \right) , \ 0 < p < 1

,一般常用於『二元選擇』,比方說『To Be or Not To Be』的『機率分佈』,也用於『迴歸分析』 Regression Analysis 來看看兩個『變量』在統計上是『相干』還是『無干』的ㄡ!假使試著用『無窮小』 數來看 \log\left( \frac{\delta p}{1-\delta p} \right) = \log(\delta p) \approx - \infty\log\left( \frac{1-\delta p} {\delta p}\right) = \log(\frac{1}{\delta p}) = \log(H) \approx \infty,或許更能體會『兩極性』的吧!!

一九七六年,澳洲科學家 Robert McCredie May 發表了一篇《Simple mathematical models with very complicated dynamics》文章,提出了一個『單峰映象』 logistic map 遞迴關係式 x_{n+1} = r x_n(1 - x_n), \ 0\leq x_n <1。這個遞迴關係式很像是『差分版』的『 logistic equation』,竟然是產生『混沌現象』的經典範例。假使說一個『遞迴關係式』有『極限值x_{\infty} = x_H 的話,此時 x_H = r x_H(1-x_H),可以得到 r{x_H}^2 = (r - 1) x_H,於是 x_H \approx 0 或者 x_H \approx \frac{r - 1}{r}。在 r < 1 之時,『單峰映象』或快或慢的收斂到『』; 當 1 < r < 2 之時,它很快的逼近 \frac{r - 1}{r};於 2 < r < 3 之時,線性的上下震盪趨近 \frac{r - 1}{r};雖然 r=3 也收斂到 \frac{r - 1}{r},然而已經是很緩慢而且不是線性的了;當 r > 1 + \sqrt{6} \approx 3.45 時,對幾乎各個『初始條件』而言,系統開始發生兩值『震盪現象』,而後變成四值、八值、十六值…等等的『持續震盪』;最終於大約 r = 3.5699 時,這個震盪現象消失了,系統就步入了所謂的『混沌狀態』的了!!

連續的』微分方程式沒有『混沌性』,『離散的』差分方程式反倒發生了『混沌現象』,那麼這個『量子』的『宇宙』到底是不是『混沌』的呢??回想之前『λ 運算』裡的『遞迴函式』,與數學中的『定點』定義,『單峰映象』可以看成函數 f(x) = r \cdot x(1 - x) 的『迭代求值』︰x_1 = f(x_0), x_2 = f(x_1), \cdots x_{k+1} = f(x_k) \cdots。當 f^{(p)} (x_f) = f \cdots p -2 times f \cdots f(x_f) = x_f,這個 x_f 就是『定點』,左圖中顯示出不同的 r 值的求解現象,從有『定點』向『震盪』到『混沌』。如果我們將『 logistic equation』 改寫成 \Delta P(t) = P(t + \Delta t) - P(t) = \left( r P(t) \left[ 1 - P(t) \right]  \right) \cdot \Delta t,假使取 t = n \Delta t, \Delta t = 1,可以得到 P(n + 1) - P(n) =  r P(n) \left[ 1 - P(n) \right],它的『極限值P(H) \approx 0, 1,根本與 r 沒有關係,這也就說明了兩者的『根源』是不同的啊!然而這卻建議著一種『時間序列』的觀點,如將 x_n 看成 x(n \Delta t), \ \Delta t = 1,這樣 \frac{x[(n+1) \Delta t]  - x[n \Delta t]}{\Delta t} = x_{n+1} - x_n 就說是『速度』的了,於是 (x_n, x_{n+1} - x_n) 便構成了假想的『相空間』,這可就把一個『遞迴關係式』轉譯成了一種『符號動力學』的了!!

在某些特定的 r 值,這個『遞迴關係式』有『正確解』 exact solution,比方說 r=2 時,x_n = \frac{1}{2} - \frac{1}{2}(1-2x_0)^{2^{n}},因為 x_0 \in [0,1),所以 (1-2x_0)\in (-1,1),於是 n \approx \infty \Longrightarrow (1-2x_0)^{2^{n}} \approx 0,因此 x_H \approx \frac{1}{2}。再者由於『指數項2^n 是『偶數』,所以此『符號動力系統』不等速 ── 非線性 ── 而且不震盪的逼近『極限值』的啊。

對於 r=4 來講,它的解是

x_{n}=\sin^{2}(2^{n} \theta \pi)

,此處 \theta 是『初始條件』參數,可由 \theta = \tfrac{1}{\pi}\sin^{-1}(x_0^{1/2}) 來決定。假使 \theta 是『有理數』,那麼 \sin^{2}(2^{n} \theta \pi) 這個『周期函數』,多次『迭代』後就可能產生『極限循環』;要是 \theta 是『無理數』,它有一個『不循環』的無窮小數成份,這個『符號動力系統』就彷彿是『隨機亂動』一般,因此才說它是『混沌』的啊!假使思考 \theta = \tfrac{1}{\pi}\sin^{-1}(x_0^{1/2}) 是一個『有理數』的機會,怕是很渺茫的吧!!

── 引自《【Sonic π】電路學之補充《四》無窮小算術‧中下上

 

 

 

 

 

 

 

 

 

 

 

勇闖新世界︰ W!o《卡夫卡村》變形祭︰感知自然‧幽夢‧一

或許『幽竟夢卿』月下有『影』,以待世間『徘徊人』也!故曾有張潮者著

幽夢影》耶!!

  • 讀經宜冬,其神專也;讀史宜夏,其時久也;讀諸子宜秋,其致別也;讀諸集宜春,其機暢也。
  • 經傳宜獨坐讀;史鑑宜與友共讀。
  • 無善無惡是聖人(如:帝力何有於我,殺之而不怨,利之而不庸 ;以直報怨,以德報德;一介不與,一介不取之類。),善多惡少是賢者(如:顏子不貳 過,有不善未嘗不知;子路,人告有過則喜之類。),善少惡多是庸人,有惡無善是小人(其偶為善處 ,亦必有所為。),有善無惡是仙佛(其所謂善,亦非吾儒之 所謂善也。)。
  • 天下有一人知己,可以不恨。不獨人也,物亦有之。如菊以淵明為知己,梅以和靖為知己,竹以子猷為知己,蓮以濂溪為知己,桃以避秦人為知己,杏以董 奉為知己,石以米顛為知己,荔枝以太真為知己,茶以盧仝、陸羽為知己,香草以靈均為知己,□鱸以季鷹為知己,蕉以懷素為知己,瓜以邵平為知己,雞以處宗為 知己,鵝以右軍為知己,鼓以禰衡為知己,琵琶以明妃為知己。一與之訂,千秋不移。若松之於秦始、鶴之於衛懿,正所謂不可與作緣者也。
  • 為月憂雲,為書憂蠹,為花憂風雨,為才子佳人憂命薄。真是菩薩心腸。

……

維基百科詞條講︰

幽夢影》,清初文學家張潮著的隨筆格言小品文集,全文共219 則。民國二十五年(1936年),文學家章衣萍徽州用重金購買了同鄉張潮的《幽夢影》抄本,林語堂看後也很喜歡這本書。隨後章衣萍將此書校點後交上海中央書店出版社出版。

其實早幾個月千秋出版社出版史天行註解的《幽夢影》。

───

 

又說此書有林語堂中英對照翻譯本,略例開宗首篇,譯寫本作︰

【讀書與文學】之五

讀經宜冬,其神專也;讀史宜夏,其時久也;讀諸子宜秋,其致別也;讀諸集宜春,其機暢也。

(龐)筆奴曰︰讀《幽夢影》則春夏秋冬無時不宜。

Winter is good for reading the classics, for one’s mind is more collected. Summer is good for reading history, for one has plenty of time. The autumn is good for reading the ancient philosophers, because of the great diversity of thought and ideas. Finally, spring is suitable for reading literary works, for in spring one’s spirit expands.

Pinu: This Quiet Dream Shadows is good for reading for all seasons.

……

 

不知隨著時間推移,月將上中天,此『景』果可長乎?若無金剛鑽是否就不做那瓷器活的呢??彷彿正『校準』之時,有幸閱讀

 

redheader1

IMU stuff

This is why 9-dof IMU data is useless without magnetometer calibration

MagcalThe red blob is the uncorrected magnetometer data from an InvenSense MPU9150 IMU chip. The blue blob is the corrected data now centered at the origin. Even I was surprised to see how off-center the uncorrected data was! I think that the cable that connects to the board has become magnetized which might explain some of the asymmetry. But you can easily imagine how wrong the output of the 9-dof sensor fusion would be without calibration. With calibration, it all works very nicely.

───

 

之文本,實務上卻墜入難以排除之『電流生磁』干擾中。雖真叫人懷疑,難道時至今日,還有電路『 設計者』以為『磁』是『磁』;『電』是『電』的嗎??

220px-MagnetEZ

200px-Magnet0873

150px-Magnetic_field_near_pole.svg

300px-Descartes_magnetic_field

200px-Electromagnetism

200px-Regla_mano_derecha_Laplace.svg

200px-LoopCurrentMagneticMoment_300px

200px-VFPt_dipole_magnetic3.svg

200px-Torque_of_a_magnetic_dipole

220px-Ampere_Andre_1825
電流的單位是『安培

150px-Michael_Faraday_-_Project_Gutenberg_eText_13103
電容的單位是『法拉

230px-Heinrich_Rudolf_Hertz
頻率的單位是『赫茲

Hertz_schematic0TransverseEMwave

James_Clerk_Maxwell
馬克士威方程式
牛頓後的物理學第二次統一

古代人從『天然磁石』中認識了『磁性』,發現了那是會吸引鐵的『石頭』。希臘文中『磁鐵』的意思就是『來自馬格尼西亞 Magnesia 的石頭』;中國有關天然磁石吸引鐵以及製備磁鐵的描述文獻,可見之於《管子》、《呂氏春秋》、和《淮南子》,稱之為『慈石。約在西元前十二至十三世紀,中國、歐洲和其它地區的人已經用磁鐵做成的『指南針』來導航。然而『學術性』論述的發展,最早是一二六九年法國學者皮埃‧德馬立克 Pierre de Maricourt 所寫的《磁石書信》,他仔細標明了『鐵針』在塊狀磁石附近多個位置的『定向』,並用這些『定向記號』描繪出很多條『磁力線』,於是發現了這些『磁力線』聚會於磁石的『兩端』,就好比地球的經線交會於『南極』與『北極』。因此,他將這兩個特殊位置稱之為『磁極』。三百年後,威廉‧吉爾伯特主張『地球』本身就是一個大磁石,地球的磁極分別位於南極與北極。他的巨著《論磁石》開創了『磁學』這一門『科學』領域。

一八二零年是『磁學』發展的『黃金年』,吹響了現代『電磁理論』的號角。七月,丹麥物理學家漢斯‧奧斯特 Hans Ørsted 發現『載流導線的電流會施加作用力於磁針,使磁針偏轉指向。』;據聞在這條新聞抵達法國科學院僅僅一周後,法國化學家安德烈‧瑪麗‧安培 André-Marie Ampère 成功的實驗演示︰假使兩條平行導線所載的電流的『方向相同』,則會『互相吸引』;如果電流的『方向相反』,就會『彼此排斥』。 十月,法國物理學家讓‧巴蒂斯特‧必歐 Jean-Baptiste Biot 與法國物理學家菲利克斯‧沙伐 Félix Savart 共同發表了『靜磁學』的『磁場』方程式,現今叫做『必歐‧沙伐定律

B = \frac{\mu_0}{4\pi} \int_C \frac { l_s \  dl_c \times \hat r} {r^2}

,此處 dl_c 是『載流導線C 上的微小『線元素』,l_s 是那個線元素所載的『電流』量,而 \mu_0 是『磁常數』。

一八二四年法國數學家西莫恩‧德尼‧帕松 Siméon Denis Poisson 發展了一種類似『靜電學』電荷概念的『磁荷』理論來描述『磁場』。這個『物理模型』以『同類磁荷互相排斥,異類磁荷彼此吸引』,說明『磁性』是如何由『磁荷』產生的。雖然這個理論能夠解釋許多『磁場現象』,可是並無法說明『電磁感應』的現象,同時『分割磁鐵』最終也得不到『磁北極』、『磁南極』這樣的『磁單極』,縱使過往以來有一些物理學家持續『努力尋找』,至今依舊是『毫無跡象』的哇!其後一八二五年安培又發表了『安培定律』,說明『載流導線』所載的電流,與所引發的『磁通量』沿著圍繞導線的『閉合路徑』的關係為

\oint_\mathbb{C} \mathbf{B} \cdot d\boldsymbol{\ell} =\mu_0 I_{enc}

此處,\mathbb{C} 是圍繞導線的『閉合路徑』,\mathbf{B} 是『磁通量感應』強度,d \boldsymbol{\ell} 是此路徑上的微小『線元素』向量,\mu_0 是『磁常數』,I_{enc} 是『閉合迴徑\mathbb{C} 中所圈住的『電流量』。

一八三一年,英國物理學家麥可‧法拉第 Michael Faraday 實驗證實『隨著時間而變化的磁場會生成電場』,這使得『』與『』的關係更加密切。從一九六一年蘇格蘭數學物理學家詹姆斯‧克拉克‧馬克士威 James Clerk Maxwell 將『電學』與『磁學』的各種雜亂表述『方程式』加以整合,發表於在《論物理力線》On Physical Lines of Force 一文中,這方程組能夠解釋古典電學和磁學的各種現象。一九六五年,馬克士威在《電磁場的動力理論》A Dynamical Theory of the Electromagnetic Field 論文中,成功的擴充了『安培定律』,並以『分子渦流模型』提出『位移電流』的存在原由。現今稱之為『馬克士威修正項目』。其後他更推導出『電磁波方程式』,並且斷言『』是一種『電磁波』!!終於一八八七年德國物理學家海因里希‧赫茲 Heinrich Hertz 做實驗證明了這個『電磁波』的事實。馬克士威方程式統一了『電學』、『磁學』與『光學』理論,成為今天所說的『經典電磁學』!!

如果以『總電荷』和『總電流』為源頭的表述為︰
\nabla \cdot \mathbf{B} = 0
\nabla \cdot \mathbf{E} = \frac{\rho}{\epsilon_0}
\nabla \times \mathbf{B} = \mu_0\mathbf{J} + \mu_0 \varepsilon_0 \frac{\partial \mathbf{E}} {\partial t}
\nabla \times \mathbf{E} = - \frac{\partial \mathbf{B}} {\partial t}

假使用『自由電荷』和『自由電流』作考慮的表述是︰
\nabla \cdot \mathbf{B} = 0
\nabla \cdot \mathbf{D} = \rho_\mathrm{f}
\nabla \times \mathbf{H} = \mathbf{J}_\mathrm{f} + \frac{\partial \mathbf{D}} {\partial t}
\nabla \times \mathbf{E} = - \frac{\partial \mathbf{B}} {\partial t}

一九零五年,愛因斯坦的『狹義相對論』解釋了︰『電場』和『磁場』是處於不同『參考座標系』的『觀察者』所觀察到之同樣的『物理現象』!!

─── 引自《【Sonic π】電聲學導引《六》

………

220px-Induktionsapparat_hg

楞次定律

250px-060618_conductor_magnet.svg

400px-Moving_magnet

300px-Cyclotron_motion_wider_view

一九零五年愛因斯坦於《論動體的電動力學》中寫到『移動中的磁鐵與導體問題』:

如 大眾所知,馬克士威的電動力學 ── 若按當前 的普通看法 ── 當應用於移動物體,會導致不對稱性,而這不對稱性並非可見現象的內在屬性。舉例而言,磁鐵與導體兩者間相互的電動力學作用,其可觀測到的現象只和導體與磁 鐵的相對運動有關,然而,慣常的觀點卻將這兩種狀況劃下鮮明的界線,這些物體中不是一個在移動就是另一個在移動。若是磁鐵在移動而導體呈靜 止狀態,則磁鐵週遭會生成帶有特定能量的電場,在導體所坐落的位置造成電流。但若是磁鐵呈靜止狀態而導體在移動,則磁鐵週遭不會有電場生成,然而在導體 中,會發現電動勢,它並不帶有對應的能量,但卻可給出 ── 假設在所討論的這兩種情況中,相對運動是一樣的 ── 前例中電場力所造成的一模一樣的電流。

』與『』是直觀不同的現象,雖已先為電動力學方程式融為一體,但還是得等到相對論的問世,這個方程式在不同『觀察者』之間的轉換後,描述之一致性才得到了說明。

─── 引自《思想實驗!!

 

然而細思那個『設計者』打算避免各種『電磁干擾』恐怕是不可能的吧!因此打算使用『磁場感測器』定南北方位者,尚且需要知道『地磁場』之性質 ,否則顯示的『指向』到底是什麼?當真難說的很呦!?

 

地磁場,即把地球視為一個磁偶極子(magnetic dipole),其中一極位在地理北極附近,另一極位在地理南極附近,此兩極所產生的磁場即為地磁場;通過這兩個磁極的磁軸與地球的自轉軸大約成11.3 度的傾斜。地磁場的成因或許可以由發電機原理解釋。地磁場在地表強度為 0.3 高斯到 0.6 高斯,向太空則伸出數萬公里形成地球磁圈(magnetosphere),有防護太陽風的作用。

300px-Magnetosphere_rendition

地球磁圈對地球而言有屏障太陽風所挾帶的帶電粒子的作用。地球磁圈在白晝區(向日面)受到帶電粒子的力影響而被擠壓,在地球黑夜區(背日面)則向外伸出。(圖片未按照比例顯示。)

磁極

地球的磁北極實際上是磁場的指南極,它會吸引構成羅盤指針的磁鐵的指北極。這個已成慣例的錯誤稱呼已經是難以改變了。注意圖上象徵地球的磁鐵的北極實際上是指向地理南極的。目前磁北極在加拿大境內,距離地理北極大約 1000 公里。

磁極的位置並不是固定的,每年會移動數英哩。磁北極目前約以平均每年 40 公里向地理北極接近。兩個磁極的移動彼此之間是獨立的,而兩個磁極也不會正好在地球球體的兩端,也就是說,磁軸不會通過地球正中心。目前磁南極到地理南極的距離比磁北極到地理北極的距離遠。

180px-Geomagnetisme.svg

地球磁北極與「真」北極(地理北極)的差異。

220px-IGRF_2000_magnetic_declination

西元 2000 年相對於地理北極的的磁偏角

 

 

 

 

 

 

 

 

 

 

 

勇闖新世界︰ W!o《卡夫卡村》變形祭︰感知自然‧幽境夢鄉

不久後終於抵達北岸碼頭,空蕩蕩似無人煙。月兒升的更高了,望著眼前土丘,顯的有些淒冷。或許 Mrphs 見我不言不語,因說道︰跨過面前的小山,就到了『幽境夢鄉』。再穿越『幽境夢鄉』,即達《卡夫卡村》。邊聽邊走,登上了山丘,『幽境夢鄉』在目,黑壓壓的一片,不知何處是盡頭。 Mrphs 又講起︰說來『幽境夢鄉』之名原該是『幽竟夢卿』的古稱。當地原鄉人本叫它『奇幻森林』 ,林內多有五十步高之參天巨木,樹蔭之大可蔽日,又為奇藤異草纏繞,彷彿是個天然暖房。故而林中香草靈芝常生,卵生溼生常居 。遂因此生生不斷,變異驚奇而得名。此林之中央有個『林中道』正是前往《卡夫卡村》的門徑。路底有塊大石,將入村道路分成了東西兩向。誰知一日有人卻意外的用『紫外線』拍着了這石,之後驚訝的發現其上儼然有圖文。北面刻的是『 幽 竟 』,南面上頭有『 夢 鄉』。故詢之 M♪o ,得其解為『幽竟夢卿』,然而此人以為是 M♪o 誤寫,當是作『幽境夢鄉』,於是延誤至今。這麼一說反而倒讓人好奇起來,故問︰難到 M♪o 沒有分辯。 Mrphs 接答︰據『小學堂』同學講,一回有人問過這事,老師說︰『幽竟夢卿』之本義是『 幽 』幽靜將『 竟 』盡,此景恐不再,或終『 夢 』在夢裡相『 鄉 』向。總帶著點『傷春悲秋』之意。錯讀為『幽境夢鄉』沒什麼不好的吧!!多少可以『安定人心』的啊??

只覺一時惘然不知所之何境何鄉的了。或許真應該振奮精神,換個調子續彈『 Sense Hat 』的『 IMU 』inertial measurement unit 之曲的乎!!何不就反其道而行,從『實驗』起頭的哩??

Raspberry Pi Experiment: Foucault Pendulum

200px-Foucault_pendulum

The Foucault Pendulum with some RPi’s Mounted to it

Purpose

Analyze the motion of a pendulum using an inertial measurement unit (IMU) with a Raspberry Pi.

Equipment

The following items are necessary:

  • Raspberry Pi with your choice of IMU
  • Scissors or snips
  • Zip ties (at least 2)
  • A few small pylons
  • A cart

You’ll need to acquire the following pieces of equipment from the observatory:

  • Extended hook
  • 30 kg pendulum mass

Optional:

  • Raspberry Pi mount

Procedure

  1. Place all your necessities on the cart and wheel it to the main floor in CCIS where the hanging solar system is.
  2. Grab your snips and extended hook and head up to the second floor so that you’re near to the coiled-up pendulum wire. Use the extended hook to grab the coiled up bundle and use the snips to cut the zip ties from the previous user. Gently lower the pendulum wire to the main level.
  3. Head back downstairs to your cart and wheel it over to where the pendulum wire is hanging. If you have a mount to secure your Pi to the pendulum, place it over the hole on top of the pendulum mass. Then grab the mounting screw hanging on the pendulum wire, and place the washer on top of your Raspberry Pi mount. Screw the wire into the pendulum mass for 6 full turns, then tighten the locking nut down onto the washer.
  4. Carefully lift the mass off the cart with two hands and slowly lower it until it is hanging about an inch off the ground.
    • If you need to physically initiate IMU recording using a switch or some other piece of hardware, now would be a good time to to do so.
  5. Place the safety pylons around the desired space you want the pendulum to swing in.
  6. With two hands holding the pendulum mass, begin to pull it back so that the pendulum is displaced approximately 2 meters from it’s resting position. When you are ready, let the mass just slip out of your hands to minimize wobbling as it begins it’s motion.
  7. If you are initiating your data collection remotely (such as SSH), go ahead and do that now. Once you have collected data for around 3 minutes you should have enough data. Stop the pendulum and lift it back onto the cart. Unscrew the locking nut, and remove the screw from the mass. Make sure the washer is secured on the mounting screw.
  8. Grab two of your zip ties and the pendulum wire. Without letting go, walk up the stairs and around to where you cut the zip ties off from before. Coil the pendulum wire until there is no more slack. Zip tie the coil in two places and gently release it over the atrium

Analysis

Since this pendulum is so long, the radial acceleration will be very tiny, and therefore difficult for the IMU to detect. The collected data will be very noisy and hard to analyze. So we will try to fit a sine curve to our data and use that for analysis instead. There are 3 parameters we need to obtain from our data: frequency, amplitude, and vertical displacement. You could also find the phase of the sine wave, although it is not important or relevant to your results. Make sure to trim down your data to only include the times when it is swinging on the pendulum.

Here is some sample raw data of the acceleration in the z direction vs time:

1000px-Foucault_pend_data_sim

Finding the Frequency

To find the frequency of our pendulum, we’ll need to pass our data through something called a ‘Fourier transform’. It will output a graph which shows the prevalence of all the frequencies present in the original signal. There should be a large spike which will be the frequency we are looking for. This is the frequency of the radial acceleration that the Raspberry Pi experienced. This will be exactly double the frequency of the pendulum, since every time the pendulum goes through one period, the radial acceleration will go through two.

1000px-Pendulum_fourier

Finding the Amplitude

To find the amplitude, we’ll use the root mean square method. It utilizes the standard deviation of your data, which is a measure how ‘how spread out’ the data is. The formula you want to use for calculating it is:

a = \frac{3}{\sqrt{2}} \sigma
where:

  • a = the amplitude of the wave
  • σ = the standard deviation of your data

Finding the Vertical Displacement

If your data is trimmed down to only include times when it is swinging, the average should be equal to the vertical displacement. Luckily it is very easy to find the average. Simply sum up all of your data points, and divide by the number of them.

d = \frac{1}{n} \sum \limits_{1}^{n} a_n
At this stage you should have found the necessary values. If you would like to visualize your results, just plug them into your standard wave equation:

y = a \cdot sin(2 \pi f t ) + d
 

1000px-Foucault_pend_fitted_sine

 

Determining the Length of the Pendulum

In order to find the length of the pendulum, you’ll need to make use of the value you got for the frequency. You’ll also need to know the acceleration due to gravity; you can take it to be 9.8m/s2. The following equation will also prove useful:

\frac{1}{f} = T = 2 \pi \sqrt{\frac{l}{g}}
Just solve for l and plug in your numbers.

Determining the Maximum Speed

To find the maximum speed, you’ll need to know the value of the amplitude of the vertical acceleration. The value of the amplitude, is equal to the maximum radial acceleration the pendulum will experience. The pendulum will only experience maximum radial acceleration when it is moving at its highest velocity. So we can estimate the maximum velocity using the amplitude and this equation:

a_r = \frac{v^2}{r}
Here the radius is just the length of the pendulum from a previous step. This will most likely be a far more inaccurate result because of the low magnitude of the radial acceleration. Once you find the maximum speed you could also estimate how high the pendulum was raised to initiate swinging using your conservation of energy laws. Using that height you could estimate the arc length over which the pendulum traveled.

───

 

或終於明白萊昂‧傅科之意旨的耶??!!

EastHanSeismograph

錯誤的原理

懸垂擺原理

Foucault_pendulum_animated

300px-Pendule_de_Foucault
巴黎先賢祠傅科擺

Foucault-rotz

160px-Foucault_pendulum_at_north_pole_accurate
北極,角速度為零

Foucault_pendulum_plane_of_swing_semi3D
北緯 30° 一周兩天

之前曾經談過『張衡』的『候風地動儀』為何失傳,它與漢代『讖緯之學』的關係,於此摘引『前因後果』的一小段

既然叫做『候風地動儀』,它的命名必然有些來歷。西漢末年隨著社會的衝突加劇,『讖緯之學』開始廣泛大流行。 《後漢書‧光武帝紀》光武帝於中元元年宣布『圖讖』於天下,把圖讖國教化。生於之後的張衡自當深知讖緯之術。就像『物候曆』的傳統,比如說《禮記‧月令》 更是其來有自。然後發展成用『占候』來『預測』人事的『吉凶禍福』。因此命名裡那個『』字應是指『徵候』,藉著此徵候來『預測』之義。而『』字當是 『風角』之術的觀『八方』風的用法,藉以表達『八個方位 』的意思。如此看來這個候風地動儀的名義就是『測知八方地動之器』。
……
自公元一三二年張衡發明候風地動儀以來,接連發生了幾次地震,到公元一三四年的隴西地震,張衡名氣大造,候風地動儀也聲名遠播。然而因著『天象』結合了『政爭』,頻起的『地震』 究竟是『誰的過錯』?懺緯之說如是說︰地震起於『用人不當』,此上天之所以『罰罪』。縱使張衡有『天才之能』亦『無力分說』那個『地震之是非』 。因此公元一三四年有『高官免職』後,張衡的『官運』也就步上了『黯淡之途』。由於沒有人希望能夠再『測出地震』,這時那個候風地動儀已經成為了『不祥之器』!短短幾年後,到了公元一三九年張衡抑鬱而逝。東漢末年,公元一九零年,董卓一把大火燒毀了『洛陽城』,一切終歸於『灰飛煙滅』!!

由此觀之,持守『科學精神』的『理性』實屬不易,『科技文明』的『發達』,也很難度杜絕『無根之言』,也許應該說面對『大自然』的『神奇奧妙』,人類其實『所知甚少』。而且一些雖然說是人們『已知之事』,但由於是『抽象』的,在缺乏了『直接經驗』下,總是顯得有些『難明難了』的吧!舉個例子來說,我們都知道『地球自轉』產生了太陽的『東升西落』,也學過牛頓力學所講的『慣性系統』,可是我們並不感覺地球在自轉的啊!一八五一年二月法國物理學家『萊昂‧傅科』Jean Bernard Léon Foucault 首度次在『巴黎天文台』的子午儀室公開展示了一的『單擺』。幾星期之後,傅科他又在『巴黎先賢祠』的拱頂下,用一根長六十七公尺的鋼索,其下懸掛了一顆重二十八公斤的鉛錘,然後使之擺動。這個單擺的『擺動平面』它每小時順時針方向旋轉 11° 度,經三十點七小時後環繞一圈。這就是大名鼎鼎的『傅科擺』 Foucault pendulum ,它的旋轉角速度 \omega 與『緯度\varphi 成正比,可以表示為 \omega=360\sin\varphi\ ^\circ/\mathrm{day}

,此處,『北緯』角度為『』,表示『順時針方向旋轉』。據聞一八五五年,這個單擺被移到了國立巴黎工藝技術學院之國立工藝博物館。然後在二零一零年四月六日,國立工藝博物館內懸掛鉛錘的鋼索不知何故斷裂,使得單擺和博物館的大理石地板都受到無法修補的損壞。或許自傅科擺第一次以簡單的實驗證明『地球自轉』以來,這個擺已經善盡了『告知大眾』的『義務』的吧!!

─── 引自《水的生命!!下

 

 

 

 

 

 

 

 

 

 

勇闖新世界︰ W!o《卡夫卡村》變形祭︰感知自然‧尖端‧八

雖然還想多花些時間參觀湖心小築,深入的了解這東西北『水』之三相館,或及『模擬館』和『學習營』之建制。不過就在 Mrphs 的告知與催促下不得不趕路前往那《卡夫卡村》變形祭開始前之盛大的遊行的耶??此刻抉擇有如《物理哲學·下中…》所言︰

禮記‧禮運篇

故聖人耐【能】以天下為一家,以中國為一人者,非意【測】之也,必知其情,辟【開】於其義,明於其利,達於其患,然後能為之。

何謂人情喜、怒、哀、懼、愛、惡、欲,七者,弗學而能。何謂人義?父慈、子孝、兄良、弟弟、夫義、婦聽、長惠、幼順、君仁、臣忠,十者,謂之人義。講信脩睦,謂之人利爭奪相殺,謂之人患。故聖人之所以治人七情,脩十義,講信脩睦,尚辭讓,去爭奪,舍禮何以治之?飲食男女,人之大欲存焉。死亡貧苦,人之大惡存焉。故欲惡者,心之大端也。人藏其心,不可測度也,美惡皆在其心,不見其色也,欲一以窮之,舍禮何以哉?

故人者,其天地之德,陰陽之交,鬼神之會,五行之秀氣也。

天秉陽,垂日星;地秉陰,竅於山川。播五行於四時,和而後月生也。是以三五而盈,三五而闕。五行之動,迭相竭也。五行、四時、十二月,還也。五聲、六律、十二管,還相為也。五味、六和、十二食,還也。五色、六章、十二衣,還也。

故人者,天地之心也,五行之端也,食味、別聲、被色而生者也。故聖人作,則必以天地,以陰陽,以四時,以日星以為鬼神以為五行以為禮義以為人情以為四靈以為。以天地為本,故物可舉也。以陰陽為端 ,故情可睹也。以四時為柄,故事可勸也。以日星為紀,故事可列也。月以為量,故功有藝也。鬼神以為徒,故事有守也。五行以為質,故事可復也。禮義以為器,故事行有考也,人情以為田,故人以為奧也。四靈以為畜,故飲食有由也。何謂四靈?麟、鳳、龜、龍,謂之四靈。故龍以為畜,故魚鮪不淰。鳳以為畜,故鳥不獝。麟以為畜,故獸不狘。龜以為畜,故人情不失。

當白努利提出了一個理論來解釋『聖彼得堡悖論』時,就開啟了『效用』 Utility 的大門︰

邊際效用遞減原理】:一個人對於『財富』的擁有多多益善,也就是說『效用函數U(w) 的一階導數大於零 \frac{dU(w)}{dw} > 0;但隨著『財富』的增加,『滿足程度』的積累速度卻是不斷下降,正因為『效用函數』之二階導數小於零 \frac{d^2U(w)}{dw^2} < 0

最大效用原理】:當人處於『風險』和『不確定』的條件下,一個人『理性決策』的『準則』是為著獲得最大化『期望效用』值而不是最大之『期望金額』值。

Utility』依據牛津大字典的『定義』是︰

The state of being useful, profitable, or beneficial:
(In game theory or economics) a measure of that which is sought to be maximized in any situation involving a choice.

如此『效用』一詞,不論代表的是哪種『喜好度』 ── 有用 useful 、有利 profitable 、滿足 Satisfaction 、愉快 Pleasure 、幸福 Happiness ──,都會涉及主觀的感覺,那麼真可以定出『尺度』的嗎?『效用函數』真的『存在』嗎??

170px-Pakkanen
溫度計
量冷熱

魯班尺
魯班尺
度吉凶

一九四七年,匈牙利之美籍猶太人數學家 ,現代電腦創始人之一。約翰‧馮‧諾伊曼 Jhon Von Neumann 和德國-美國經濟學家奧斯卡‧摩根斯特恩 Oskar Morgenstern 提出只要『個體』的『喜好性』之『度量 』滿足『四條公設』,那麼『個體』之『效用函數』就『存在』,而且除了『零點』的『規定』,以及『等距長度』之『定義』之外,這個『效用函數』還可以說是『唯一』的。就像是『個體』隨身攜帶的『理性』之『溫度計』一樣,能在任何『選擇』下,告知最大『滿意度』與『期望值』。現今這稱之為『期望效用函數理論』 Expected Utility Theory。

由於每個人的『冷熱感受』不同,所以『溫度計』上的『刻度』並不是代表數學上的一般『數字』,通常這一種比較『尺度』只有『差距值』有相對『強弱』意義,『數值比值』並不代表什麼意義,就像說,攝氏二十度不是攝氏十度的兩倍熱。這一類『尺度 』在度量中叫做『等距量表』 Interval scale 。

溫度計』量測『溫度』的『高低』,『理性』之『溫度計』度量『選擇』的『優劣』。通常在『實驗經濟學』裡最廣泛採取的是『彩票選擇實驗』 lottery- choice experiments,也就是講,請你在『眾多彩票』中選擇一個你『喜好』 的『彩票』。

這樣就可以將一個有多種『機率p_i,能產生互斥『結果A_i 的『彩票L 表示成︰

L = \sum \limits_{i=1}^{N} p_i A_i ,  \  \sum \limits_{i=1}^{N} p_i  =1,  \ i=1 \cdots N

如此『期望效用函數理論』之『四條公設』可以表示為︰

完整性公設】Completeness

L\prec MM\prec L,或 L \sim M

任意的兩張『彩票』都可以比較『喜好度』 ,它的結果只能是上述三種關係之一,『偏好 ML\prec M,『偏好 LM\prec L,『無差異L \sim M

遞移性公設】 Transitivity

如果 L \preceq M,而且 M \preceq N,那麼 L \preceq N

連續性公設】 Continuity

如果 L \preceq M\preceq N , 那麼存在一個『機率p\in[0,1] ,使得 pL + (1-p)N = M

獨立性公設】 Independence

如果 L\prec M, 那麼對任意的『彩票N 與『機率p\in(0,1],滿足 pL+(1-p)N \prec pM+(1-p)N

對於任何一個滿足上述公設的『理性經紀人』 rational agent ,必然可以『建構』一個『效用函數u,使得 A_i \rightarrow u(A_i),而且對任意兩張『彩票』,如果 L\prec M \Longleftrightarrow \  E(u(L)) < E(u(M))。此處 E(u(L)) 代表對 L彩票』的『效用期望值』,簡記作 Eu(L),符合

Eu(p_1 A_1 + \ldots + p_n A_n) = p_1 u(A_1) + \cdots + p_n u(A_n)

它在『微觀經濟學』、『博弈論』與『決策論』中,今天稱之為『預期效用假說』 Expected utility hypothesis,指在有『風險』的情況下,任何『個體』所應該作出的『理性選擇』就是追求『效用期望值』的『最大化』。假使人生中的『抉擇』真實能夠如是的『簡化』,也許想得到『快樂』與『幸福』的辦法,就清楚明白的多了。然而有人認為這個『假說』不合邏輯。一九五二年,法國總體經濟學家莫里斯‧菲力‧夏爾‧阿萊斯 Maurice Félix Charles Allais ── 一九八八年,諾貝爾經濟學獎的得主 ── 作了一個著名的實驗,看看實際上人到底是怎麼『做選擇』的,這個『阿萊斯』發明的『彩票選擇實驗』就是大名鼎鼎的『阿萊斯悖論』 Allais paradox 。

───

 

到底『機會』跟『風險』能不能有個『計算』的哩!!