Tuesday, May 12, 2009

BER vs confidence level

1. General telegraph equation
From telegraph equation

P'(\epsilon)=\frac{\epsilon}{n},when ~ n->\infty , P'(\epsilon)->P(\epsilon)

Wednesday, November 12, 2008

Transmission line equations

1. General telegraph equation
From telegraph equation

\begin{align*}
- & \frac{\partial \bf{v}(z,\omega) }{\partial z}=[\bf{R}(\omega )+j\omega \bf{L}(\omega)]\bf{i}(z,\omega )=\bf{Z}(\omega) \bf{i}(z,\omega) \\
- & \frac{\partial \bf{i}(z,\omega) }{\partial z}=[\bf{G}(\omega )+j\omega \bf{C}(\omega)]\bf{v}(z,\omega )= \bf{Y}(\omega ) \bf{v} (z, \omega )\\
\end{align*}

we have the following wave equation

\begin{align*}
- \frac{\partial ^2 \bf{v}(z)}{\partial z} = [Z][Y]\bf{v}(z) \\
- \frac{\partial ^2 \bf{i}(z)}{\partial z} = [Y][Z]\bf{i}(z)
\end{align*}

The modal solution to the wave equation will be of the form

\begin{align*}
\bf{v}(z) & = \bf{V}^{\pm}e ^{\mp \gamma _0 z} \\
\bf{i}(z) & = \bf{I}^{\pm}e ^{\mp \gamma _1 z }\\
\end{align*}

Substitute above equation into wave equation, we have

\begin{align*}
( \gamma _0 ^2 \bf{U} & -[Z][Y]) \bf{V} ^{\pm} =0 \\
( \gamma _1 ^2 \bf{U} & -[Y][Z]) \bf{I} ^{\pm} =0 ....(4)\\
\end{align*}

For non-trivial solution, the determinant of

\begin{align*}
| \gamma _0 ^2 \bf{U} & -[Z][Y] | =0 \\
( \gamma _1 ^2 \bf{U} & -[Y][Z]| =0 ....(5)\\
\end{align*}

It can be shown r0=r1=r, due to symmetric of [Z],[Y] and ([Z][Y])T=[YT][ZT]=[Y][Z].
The solution to (4) will be called modes, while the eigenvalues will be called spectrum.
Assume(5) (4) has n distinct eigenvalues and eigenvectors, combine all eigenvectors to form matrix, it will be

\begin{align*}
[\bf{V}_1 e ^ {- \gamma _1 z}, \bf{V}_2 e ^ {- \gamma _1 z},...\bf{V}_N e ^ {- \gamma _N z} ] = \bf{M} _V diag(e ^ {- \gamma _1 z},e ^ {- \gamma _2 z},...,e ^ {- \gamma _N z})=\bf{M}_v \bf{D} ....(6)\\
\end{align*}

where Mv=[V1,V2,...VN] are eigenvectors of voltage wave, Mv is non-singular and span a N-dimensional space. Similarity, we have

\begin{align*}
[\bf{I}_1 e ^ {- \gamma _1 z}, \bf{I}_2 e ^ {- \gamma _1 z},...\bf{I}_N e ^ {- \gamma _N z} ] = \bf{M} _I diag(e ^ {- \gamma _1 z},e ^ {- \gamma _2 z},...,e ^ {- \gamma _N z})=\bf{M}_I \bf{D}
\end{align*}

Substitute (6) into (1), we have

\begin{align*}
\bf{M}_V =[Z]\bf{M}_I diag(\gamma_1 ^ {-1},\gamma_2 ^ {-1},...\gamma_N^ {-1})=\bf{Z}\bf{M}_I \bf{S}
\end{align*}

Similarity, we have

\begin{align*}
\bf{M}_I =[Y]\bf{M}_V diag(\gamma_1 ^ {-1},\gamma_2 ^ {-1},...\gamma_N^ {-1})=\bf{Y}\bf{M}_V \bf{S}
\end{align*}

Now, we have the N engenvectors spanning N-dimensional space, any voltage V(z) can be represented as linear combination of these eighenvectors.

\bf{V}(z)=\bf{V}_i(z)+\bf{V}_r(z)=\bf{M_v(DV_0^++D^{-1}V_0^-)}

where

\begin{align*}
\bf{V_0^+}= &(V_{01}^+,V_{02}^+,....,V_{0N}^+)\\
\bf{V_0^-}= & (V_{01}^-,V_{02}^-,....,V_{0N}^-)
\end{align*}

Same thing for I(z),where

\bf{I}(z)=\bf{I}_i(z)+\bf{I}_r(z)=\bf{M_I(DI_0^+-D^{-1}I_0^-)}

Note: minus (-1) sign is due to the directions of current Ir is opposite of Ii.
The characteristic matrix Zc is defined as

\begin{align*}
\bf{V_i}(z) & =\bf{Z}_C \bf{I}_i(z) \\
\bf{V_r}(z) & =-\bf{Z}_C \bf{I}_r(z) \\
w&here\\
\bf{Z}_C & =\bf{M}_V \bf{M}_I ^{-1}
\end{align*}

Thursday, October 30, 2008

S-parameter vs impedance matrix

1.Generalized scattering parameter

\begin{align*}
a_n &=\frac{V_n ^+}{\sqrt {Z_{0n}}}\\
b_n &=\frac{V_n ^-}{\sqrt {Z_{0n}}}\\
w&here~ a_n,b_n ~are~incident~wave~and~reflected~wave,respectively\\
V_n &=V_n^+ + V_n^- =(a_n + b_n) \times \sqrt{Z_{0n}}\\
I_n &=I_n^+ + I_n^- =(V_n^+ -V_n^-)/ Z_{0n}=(a_n-b_n)/\sqrt{Z_{0n}}\\
P_n & =\frac{1}{2}Re[V_nI_n^*]=\frac{1}{2}[a^2-b^2]\\
\bf{b} & =\bf{S}\bf{a}\\
w&here~ S_{ij}=\frac{b_i}{a_j}|a_k=0~ for~ k\ne j
\end{align*}

For Z0n=Z0, ie, all ports have same characteristic impedance, we have

\begin{bmatrix} V_1 ^- \\ V_2 ^-\\.\\.\\.\\V_n ^- \end{bmatrix}=
\begin{bmatrix}S_{11}&S_{12}&... &S_{1n}\\S_{21}&S_{22}&...&S_{2n}\\.\\.\\.\\S_{n1} &S_{n2}&...&S_{nn} \end{bmatrix}
\begin{bmatrix} V_1 ^+ \\ V_2 ^+\\.\\.\\.\\V_n ^+ \end{bmatrix} \\
where \\
S_{ij}=\frac{V_i^-}{V_j^+} |_{V_k^+ =0,~ for~ k \ne j} \\
V_k ^+=0~ --~ port~k~terminated~to~characteristic~impedance\\


For impedance matrix
[V]=[Z][I]
where

\begin{align*}
V_{ij} &=V_{ij}^+ + V_{ij}^- \\
I_{ij} &=I_{ij}^+ - I_{ij}^- \\
\end{align*}

The - sign is due to inverted direction of current \inline I^- . See below for the illustration of V+/V- and I+/I-.
I+
---->--------+-----------+
| | | |
V+ V- | port k |
| | | |
-----<-------+-----------+
I-

Monday, October 27, 2008

inductance calculation

1.two transmission lines ( one transmission line over ground plane)
============ t
h
============
<--- W ---->

Assume W>>h, h>>t, the partial inductance of the two-pair trace is

L_{trace_pair}\approx \frac{\mu_0 \mu_r h len}{W}

where u0= 4*pi nH/meter=32pH/mil (permeability of air), ur=relative permeability of the medium. len=transmission line length.
when len=W, L_trace=32pH*h (independent of the size of the square.)

Thursday, July 17, 2008

Frequency domain(time-harmonic) maxwell equations

Frequency domain maxwell equation (vs. regular time-domain maxwell equations)
That's most frequently used maxwell equations. Every time domain function a(t) can be obtained using inverse fourier transform, A(w)

\begin{align*}
\pmb{e} & (\pmb{r},t)=\frac{1}{2\pi }\int \pmb{E}(\pmb{r},\omega)e^{j \omega t}d\omega,
\pmb{h} (\pmb{r},t)=\frac{1}{2\pi }\int \pmb{H}(\pmb{r},\omega)e^{j \omega t}d\omega \\
F & or ~time ~ harmonic ~ components,\\
\mathcal{E} &(r,t)=\pmb{E}(r,\omega)e^{j\omega t},
\mathcal{H}(r,t)=\pmb{H}(r,\omega)e^{j\omega t}\\
\end{align*}

Substitute time harmonic E/H into maxwell equations, with d/dt=jw, we have frequency domain maxwell equations

\begin{align*}
\nabla & \times \pmb{E}= - j\omega \pmb{B} \\
\nabla & \times \pmb{H}= \pmb{J}+ j\omega \pmb{D}\\
\nabla & \cdot \pmb{D}= \rho\\
\nabla & \cdot \pmb{B}= 0
\end{align*}

Note: for the above equations, E=E(r,w). Often, we drop w for simplicity.
Once we know the solution of time harmonic E(r,w) and H(r,w) , we can obtain E(r,t) and H(r,t) in time domain by doing inverse fourier transform.

Signal phasor representation and time average
In real word, the signal are real. For a real value sinusodal signal,

\begin{align*}
\mathcal{A} & (t)=|A|cos(\omega t+\phi) ~ \Longleftrightarrow A(t)=Ae^{j\omega t}\\
o & r ~ \mathcal{A}(t)=Re \{A(t)\}\\
w&here ~ A=|A|e^{j\phi}~ is~ a ~complex ~phasor.
\end{align*}

Time average of two harmonic signals,

\begin{align*}
\mathcal{A} &(t)=Re [A(t)] = Re [Ae^{j\omega t} ]\\
\mathcal{B} &(t)=Re [B(t)] = Re [Be^{j\omega t} ]\\
<\mathcal{A} &(t) \mathcal{B}(t)>=<\frac{1}{2}(Ae^{j\omega t}+A^*e^{-j\omega t})*\frac{1}{2}(Be^{j\omega t}+B^*e^{-j\omega t})\\
= & \frac{1}{4}<(AB^*+BA^*)+ABe^{-j2\omega t}+A^*B^*e^{-j2\omega t}> \\
= & \frac{1}{2} ( < Re[AB^*] > + < Re[AB*e^{-j2\omega t} ] > ) \\
= & \frac{1}{2} Re[AB^*]
\end{align*}

energy conservation and charge conservation

1. Charge conservation
Do the divergence of ampere law(2nd maxwell equation). Since curl has no divergence(another one-gradient has no curl), we have

\begin{align*}
0 &=\nabla \cdot (\nabla \times \pmb{H})=\nabla \cdot (J+\frac{\partial \pmb{D}}{\partial t}) ~\Rightarrow \\
\nabla & \cdot J +\frac{\partial \rho}{\partial t}=0 \\
o &r, in~ integral~ form \\
I &=\int_V\nabla \cdot Jdv=\oint_SJda=\frac{\partial} {\partial t}\int_V \rho dv=\frac{\partial Q} {\partial t}
\end{align*}

Current flow out of the volume V equals to the charge depletion per unit time.
For conductors, J=sigmaE,

\begin{align*}
\nabla & \cdot J= \nabla \cdot \sigma E=\frac{\sigma \rho }{\epsilon} ~ \Rightarrow \\
\nabla & \cdot J+\frac{\partial \rho}{\partial t}=\frac{\sigma \rho }{\epsilon}+\frac{\partial \rho}{\partial t}=0 ~ \Rightarrow \\
\rho &(r,t) = \rho_0 e^{-\sigma t / \epsilon } \\
d &ue ~ to ~ \sigma >> \epsilon ~ in ~ conductor, \rho -> 0 ~ in~ a ~short~ time.
\end{align*}

e.g. Copper, sigma=5.7x10^7, epsilon=8.85x10^-12, epsilon/sigma=1.6x10^-19 sec.


2. Energy conservation.
* Energy per unit volume, \inline w=\frac{1}{2}\epsilon |E|^2+\frac{1}{2}\mu |H|^2
* Energy flux (Poynting vector): \inline \pmb{P}=\pmb{E} \times \pmb{H}

\begin{align*}
\nabla &\cdot (\pmb{E} \times \pmb{H})=\pmb{H}\cdot (\nabla \times \pmb{E})-\pmb{E}\cdot (\nabla \times \pmb{H})= \\
-\mu & \pmb{H}\cdot \frac{\partial \pmb{H}}{\partial t} -\mu \pmb{E}\cdot \frac{\partial \pmb{E}}{\partial t}-\pmb{E}\cdot \pmb{J} ~\Rightarrow\\
\nabla &\cdot \pmb{P}= -\frac{\partial w}{\partial t}- \pmb{E}\cdot \pmb{J}\\
N&ote: \epsilon \pmb{E} \cdot \frac{\partial \pmb{E} }{\partial t}=\frac{1}{2}\epsilon \frac{\partial |E|^2}{\partial t}, \mu \pmb{H} \cdot \frac{\partial \pmb{H} }{\partial t}=\frac{1}{2}\mu \frac{\partial |H|^2}{\partial t}
\end{align*}

the rate of energy flow out of volume equals to the depletion rate of stored energy in the volume and ohmic loss in the volume.

Wednesday, July 16, 2008

curvilinear coordinates

A point can be represented as (x,y,z).Consider 3 independent,smooth and unique invertible(and hopefully orthogonal) functions: u1=f1(x,y,z), u2=f2(x,y,z),u3=f3(x,y,z).The intersection of constant u1,u2,u3 defines a point in a space. The coordinate (u1,u2,u3) is called curvilinear coordinates.Base on inversion, we have x=f1'(u1,u2,u3),y=f2'(u1,u2,u3),z=f3'(u1,u2,u3)

\begin{align*}
\pmb{r} & (u_1,u_2,u_3) =x(u_1,u_2,u_3)\hat{x}+y(u_1,u_2,u_3)\hat{y}+z(u_1,u_2,u_3)\hat{z}\\
d &\pmb{r}=\frac{\partial \pmb{r}}{\partial u_1}du_1+\frac{\partial \pmb{r}}{\partial u_2}du_2+\frac{\partial \pmb{r}}{\partial u_3}du_3\\
=& \pmb{a}_1'du_1+\pmb{a}_2'du_2+\pmb{a}_3'du_3\\
i&f ~ \pmb{a}_1' \perp \pmb{a}_2' \perp \pmb{a}_3', this ~ is ~ orthogonal ~ curvilinear ~ coordinates ~ system\\
d \pmb{r} & = h_1\pmb{a}_1du_1+h_2\pmb{a}_2du_2+h_3\pmb{a}_3du_3\\
w&here ~ \pmb{a}_1,\pmb{a}_2,\pmb{a}_3 ~ are ~ unit ~ vectors
\end{align*}

Similarly,for small surface and volume

\begin{align*}
d\pmb{S}_i & = d\pmb{s}_j \times d\pmb{s}_k \\
wh&ere ~ d\pmb{s}_j=h_jdu_j\pmb{a}_j,d\pmb{s}_k=h_kdu_k\pmb{a}_k,\pmb{a}_j \times \pmb{a}_k=\pmb{a}_i\\
dV = & d\pmb{s}_i \cdot d\pmb{S}_i =(h_idu_i\pmb{a}_i)\cdot (h_jh_kdu_jdu_k\pmb{a}_i)\\
= &(h_1h_2h_3)du_1du_2du_3
\end{align*}

For Cartesian coordinate,

\begin{align*}
u_1 & =x,u_2=y,u_3=z \\
\pmb{a}_1 & =\hat{x},\pmb{a}_2=\hat{y},\pmb{a}_z=\hat{z}\\
d\pmb{r} & =d\pmb{s}=\hat{x}dx+\hat{y}dy+\hat{z}dz \\
h_1 & =h_2=h_3=1\\
d\pmb{S} & =\hat{x}dS_x+\hat{y}dS_y+\hat{z}dS_z=dydz\hat{x}+dxdz\hat{y}+dxdy\hat{z} \\
dV & =dxdydz
\end{align*}

For cylindrical coordinates,

\begin{align*}
u_1 & =\rho, u_2=\psi, u_3=z \\
\pmb{a}_1 & =\hat{u}_{\rho},\pmb{a}_2=\hat{u}_{\psi},\pmb{a}_3=\hat{u}_{z}\\
d\pmb{r} & =\hat{u}_{\rho}d\rho+\hat{u}_{\psi}\rho d\psi+\hat{u}_{\z}dz\\
h_1 &=1, h_2=\rho, h_3=1 \\
d\pmb{S} & =\rho d\psi dz\hat{u}_{\rho} +d\rho dz \hat{u}_{\psi}+\rho d\rho d\psi \hat{u}_{z}\\
dV & =\rho d\rho d\psi dz
\end{align*}

For spherical coordinates,

\begin{align*}
u_1 & =\rho, u_2=\psi, u_3=\theta \\
\pmb{a}_1 & =\hat{u}_{\rho},\pmb{a}_2=\hat{u}_{\psi},\pmb{a}_3=\hat{u}_{\theta}\\
d\pmb{r} & =\hat{u}_{\rho}d\rho+\hat{u}_{\psi}\rho sin\theta d\psi+\hat{u}_{\theta}\rho d\theta \\
h_1 & =1, h_2=\rho, h_3=\rho sin \theta \\
d\pmb{S} &=dS_r\hat{u}_r+dS_{psi}\hat{u}_\psi+dS_{\theta}\hat{u}_{\theta} \\
d\pmb{S} &=\rho^2sin\theta d\psi d \theta\hat{u}_r+\rho sin\theta d\rho d\theta \hat{u}_\psi+\rho d\rho d\psi \hat{u}_{\theta}\\
dV &=\rho^2sin\theta d\rho d\psi d\theta
\end{align*}

For gradient,

\begin{align*}
d\phi & (u_1,u_2,u_3)=\nabla \phi (u_1,u_2,u_3) \cdot d\pmb{s} \\
d\phi & =\frac{\partial \phi}{\partial u_1}du_1+\frac{\partial \phi}{\partial u_2}du_2+\frac{\partial \phi}{\partial u_3}du_3\\
d\pmb{s} & =h_1du_1\pmb{a}_1+h_2du_2\pmb{a}_2+h_3du_3\pmb{a}_3 ~~\Rightarrow \\
\nabla & \phi (u_1,u_2,u_3)=\frac{\partial \phi}{h_1\partial u_1}\pmb{a}_1+\frac{\partial \phi}{h_2\partial u_2}\pmb{a}_2+\frac{\partial \phi}{h_3\partial u_3}\pmb{a}_3
\end{align*}

For divergence,

\begin{align*}
\nabla \cdot \pmb{A}=\frac{1}{h_1h_2h_3}[\frac{\partial(A_1h_2h_3)}{\partial u_1}+\frac{\partial(A_2h_1h_3)}{\partial u_2}+\frac{\partial(A_3h_1h_2)}{\partial u_3}]
\end{align*}

For curl,

\begin{align*}
\nabla \times \pmb{A}=\frac{1}{h_1h_2h_3}
\begin{vmatrix}
h_1\pmb{a}_1 & h_2\pmb{a}_2 & h_3\pmb{a}_3 \\
\frac{\partial}{\partial u_1} & \frac{\partial }{\partial u_2} & \frac{\partial}{\partial u_3} \\
h_1A_1 & h_2A_2 & h_3A_3
\end{vmatrix}
\end{align*}


For laplacian,

\begin{align*}
\nabla ^2 \phi & =\nabla \cdot (\nabla \phi)
=\frac{1}{h_1h_2h_3}[\frac{\partial(A_1h_2h_3)}{\partial u_1}+\frac{\partial(A_2h_1h_3)}{\partial u_2}+\frac{\partial(A_3h_1h_2)}{\partial u_3}] \\
wh & ere ~ A_1=\frac{\partial \phi}{h_1\partial u_1},A_2=\frac{\partial \phi}{h_2\partial u_2},A_3=\frac{\partial \phi}{h_3\partial u_3} \Rightarrow \\
\nabla ^2 \phi & =\frac{1}{h_1h_2h_3}[\frac{\partial}{\partial u_1}(\frac{h_2h_3}{h_1}\frac{\partial \phi}{\partial u_1})+\frac{\partial}{\partial u_2}(\frac{h_1h_3}{h_2}\frac{\partial \phi}{\partial u_2})+\frac{\partial}{\partial u_3}(\frac{h_1h_2}{h_2}\frac{\partial \phi}{\partial u_3})

\end{align*}