2016/12/24

Arithmetic/Geometric Sequence, Series, and Progression 等差/等比的數列/級數

等差數列/算數數列 arithmetic sequence/arithmetic progression 1,3,5,7...
等差級數/算數級數 arithmetic series 1+3+5+7+...
等差級數和:

n(a1 + an)/2

1+3+5+7+9 = 5×(1+9)/2 = 25

等比數列/幾合數列 geometric sequence/geometric progression 1,2,4,8...
等比級數/幾合級數 geometric series 1+2+4+8+...

等比級數和:

a(1-rn)/(1-r) = a(rn-1)/(r-1)

1+2+4+8+16 = 1×(1-25)/(1-2) = 1×(25-1)/(2-1) = 1×(32-1)/(2-1) = 31

公差 common difference
公比 common ratio

參考資料

https://en.wikipedia.org/wiki/Arithmetic_progression
https://en.wikipedia.org/wiki/Geometric_progression
國家教育研究院雙語詞彙、學術名詞暨辭書資訊網

2016/11/26

Matlab: My First Time with Simulink 第一次接觸Simulink

一直不太了解Simulink是什麼
今天第一次玩玩
過程如下:

Below are instructions of a simple Simulink example for beginners. (Just like a "Hello World" in learning a new programming language.)

1. Enter the following command in Matlab:

>> simulink

After a while, the Simulink Library Browser is opened automatically.

2. Select File -> New ->Model and an "untitled" window is opened.

3. Search for "Sine Wave" and "Scope" in Simulink Library Browser and drag them into the "untitled" window. (Don't select Sine or Sine Wave Function.)

4. Connect "Sine Wave" to "Scope".

5. Double click "Scope" to open the waveform.

6. Double click "Sine Wave" to adjust the amplitude and frequency.

7. Press the ▻ button to start simulation.

Result:


Related Information:

Matlab: Draw a Sine curve with sind()

2016/11/22

Negative and Reciprocal Inequalities 負數及倒數的不等式運算規則

要理解負數及倒數的不等式運算規則
其實很簡單:

Negative Number 負數:

if a < b, then -a > -b

e.g. 3 < 5 ==> -3 > -5

Reciprocal/Multiplicative Inverse 倒數:

if a < b, then 1/a > 1/b

e.g. 3 < 5 ==> 1/3 > 1/5

Reference 參考資料:

Properties of Inequalities

2016/11/14

Voltage Divider/Potential Divider 分壓器

voltage divider/potential divider 分壓器

How to get the voltage output of a voltage divider?

Answer:

Vin ---- Z1 ----- Vout ----- Z2 ---- GND

i = Vin  / (Z1 + Z2) = Vout / Z2

=> Vout = [Z/ (Z1 + Z2)]Vin

where Z can be resistor/capacitor/inductor.

Reference:

Voltage Divider (Wikipedia)

Inverting Amplifier 反相放大器

inverting amplifier 反相放大器

Vin ---- Rin ----- Vmid ----- Rf ---- Vout

Vmid ----- -ve of op-amp

GND ----- +ve of op-amp


What's Vout?

Answer:

Vmid  = 0 for an ideal op-amp.

i = Vin / Rin = - Vout / Rf

=> Vout = - (Rf / Rin)Vin


What's the voltage gain?

Answer:

Gain = Vout / Vin = - (Rf / Rin)

2016/11/08

convolution and DSP

convolution 摺積/捲積/疊積/旋積
convolution theorem 捲積定理

input: x[n]
system: h[n]
output: y[n]


convolution in time domain = multiplication in frequency domain

Time Domain:

y(n) = h(n) * x(n) = Σ h(k)x(n-k) where k ∈ Z (Z: integers 整數 ... -3, -2, -1, 0, 1, 2, 3, ...)

Frequency Domain:

Y(k) = H(k)X(k)

相關資料

Convolution (Wikipedia) / 摺積 (維基百科)
Video: Introduction to the convolution (Khan Academy 可汗學院)
Meaning of R, Q, Z, and N characters in math 數學中R, Q, Z, N的意義

Meaning of R, Q, Z, and N characters in math 數學中R, Q, Z, N的意義

R - real numbers 實數 -∞ ~ ∞, no imaginary part i 不含虛部 i

Q - rational numbers 有理數 may be represented as a ratio of p/q, where q ≠ 0.

Z - integers 整數 ... -3, -2, -1, 0, 1, 2, 3, ...

N - natural numbers 自然數 1, 2, 3, 4, ...

R 包含了 Q
Q 包含了 Z
Z 包含了 N

Figure of R, Q, Z, and N relationship

Example:

point sampling

x[n] = x(nT), n ∈ Z
n 屬於整數

參考資料

https://en.wikipedia.org/wiki/Rational_number#/media/File:Number-systems.svg