Bluestacks is a very fun android emulator that operates on regular machines and os's. It is currently supported on both mac and windows and is aimed to enable developers to make more universal applications. This allows development to exist on the pc end as well as on android devices, and other Asus devices!

http://bluestacks.com/bstks_mac.html

## Tuesday, July 31, 2012

## Monday, July 30, 2012

### Computer Science-CMake

Cmake is a cross platform build process that is both os and compiler independent. The releases can be found here.

http://cmake.org/cmake/resources/software.html

As of release 2.8.2 and above, up until at least release 2.8.8 there is an error when you try to update your version of cmake. The installer does not remove the system links if they previously exist and so fails to complete the installation to the command line. In order to fix this issue you have to remove the system links manually by doing

cd /usr/bin/

and then

sudo rm

http://cmake.org/cmake/resources/software.html

As of release 2.8.2 and above, up until at least release 2.8.8 there is an error when you try to update your version of cmake. The installer does not remove the system links if they previously exist and so fails to complete the installation to the command line. In order to fix this issue you have to remove the system links manually by doing

cd /usr/bin/

and then

sudo rm

**ccmake****sudo rm cmake**

sudo rm cmake-gui

sudo rm cmakexbuild

sudo rm cpack

sudo rm ctestsudo rm cmake-gui

sudo rm cmakexbuild

sudo rm cpack

sudo rm ctest

Once this is done you will be able to reinstall cmake successfully to update your version. In a future version they will most likely automate this issue.

## Wednesday, July 25, 2012

### Computer Science-Android Development Environment

**Android Development Environment**

**This is meant to be a quick summary, in setting up an android development environment. There is more thorough documentation provided at http://developer.android.com/tools/index.html. However it can be a bit confusing to read through. This is meant to help as a quick reference. Now first to get started we must install the necessary development kits and tools, these include the Eclipse JDT, and the Android NDK and SDK. You can find Eclipse at:**

http://www.eclipse.org/downloads/

Select Eclipse classic 4.2 for your system whether it be Windows, Linux, or Mac.

Then go to:

http://developer.android.com/sdk/index.html

Where you can find the android sdk, and here for the ndk

http://developer.android.com/tools/sdk/ndk/index.html

Eclipse is the java environment where you can develop your android application, and the ndk and sdk are development kits for c++ and java respectively. Place the ndk and sdk in a development directory of your choosing. Choose a simple file path as you will need to link to these later on.

Now we have to set up eclipse itself for android development. Open eclipse and select a workspace folder.

http://www.eclipse.org/downloads/

Select Eclipse classic 4.2 for your system whether it be Windows, Linux, or Mac.

Then go to:

http://developer.android.com/sdk/index.html

Where you can find the android sdk, and here for the ndk

http://developer.android.com/tools/sdk/ndk/index.html

Eclipse is the java environment where you can develop your android application, and the ndk and sdk are development kits for c++ and java respectively. Place the ndk and sdk in a development directory of your choosing. Choose a simple file path as you will need to link to these later on.

Now we have to set up eclipse itself for android development. Open eclipse and select a workspace folder.

**Installing the ADT Plugin**

**Follow the instructions located here in order to set up the ADT Plugin**

http://developer.android.com/sdk/installing/installing-adt.html

I’ve summarized the instructions here for convenience:

http://developer.android.com/sdk/installing/installing-adt.html

I’ve summarized the instructions here for convenience:

- In eclipse, select Help > Install New Software
- Click Add in the top right corner
- An add repository window should appear, enter "ADT Plugin" for the name and this as the URL for Location: https://dl-ssl.google.com/android/eclipse/
- click ok, if there is an error try http instead of https
- select the available software and click next, and download the tools that you require for the given api levels.
- restart eclipse when finished with instillation

This is to tell eclipse where to find the development kits

- Select Window > Preferences or Eclipse > Preferences if on Mac OS X
- Select Android
- Find the SDK Location in the top of this main panel and browse to the SDK directory
- Apply, then ok

- Select Window -> Preferences -> Android -> NDK or Select Eclipse -> Preferences -> Android -> NDK if on Mac OS X
- Then locate the NDK directory through browse

**Emulation Wrapper**

**Now browse to the top level folder of your the android sdk.**

cd /android-sdk/tools/

Once here we need to make some changes to the emulator, current as of July 2012 there is an error caused by an audio memory leak in running the android emulator through eclipse. Thus we have to create a wrapper so that eclipse can run the emulator with a reduced risk of crash.

mv emulator emulator.real

vi emulator

Input the following into the text file

#!/bin/sh

exec /Users/lukchristo/eclipse/android-sdk/tools/emulator.real -noaudio -avd AndroidTest

Additional commands can be found here

http://developer.android.com/tools/help/emulator.html

cd /android-sdk/tools/

Once here we need to make some changes to the emulator, current as of July 2012 there is an error caused by an audio memory leak in running the android emulator through eclipse. Thus we have to create a wrapper so that eclipse can run the emulator with a reduced risk of crash.

mv emulator emulator.real

vi emulator

Input the following into the text file

#!/bin/sh

exec /Users/lukchristo/eclipse/android-sdk/tools/emulator.real -noaudio -avd AndroidTest

Additional commands can be found here

http://developer.android.com/tools/help/emulator.html

**AVD Command Line Creation****Now to create a Android virtual device we follow the directions here:**

http://developer.android.com/tools/devices/managing-avds-cmdline.html

./android-sdk-macosx/tools/android list targets

./android-sdk-macosx/tools/android create avd -n MyTestAVD -t 1

Do you wish to create a custom hardware profile [no] no

The AVD devices will be placed in /User/<username>/.android/avd/MyTestAVDhttp://developer.android.com/tools/devices/managing-avds-cmdline.html

./android-sdk-macosx/tools/android list targets

./android-sdk-macosx/tools/android create avd -n MyTestAVD -t 1

Do you wish to create a custom hardware profile [no] no

The AVD devices will be placed in /User/<username>/.android/avd/MyTestAVD

**~/.android/avd/**

**ADB Install and Commands****In the case where you want to install a package onto the emulator, first open the emulator. You can do this from either command line or from eclipse. From the command line run**

/filepath/android-sdk-macosx/tools/emulator

in order to open the avd

Then once the emulator is open go to

/filepath/android-sdk-macosx/platform-tools/

then run the command

./adb install /filepathtopackage/package.apk

./adb push can be used to push a file from your directory to the device being simulated

./adb push foo.txt /sdcard/foo.txt

./adb pull can be used in the opposite manner to push, retrieving a file from the device being simulated

/filepath/android-sdk-macosx/tools/emulator

in order to open the avd

Then once the emulator is open go to

/filepath/android-sdk-macosx/platform-tools/

then run the command

./adb install /filepathtopackage/package.apk

./adb push can be used to push a file from your directory to the device being simulated

./adb push foo.txt /sdcard/foo.txt

./adb pull can be used in the opposite manner to push, retrieving a file from the device being simulated

### Electrical Engineering-Intro to Digital

What are the basic goals for Digital systems? One of the key properties of digital systems is its data storage accuracy and resistance to corruption. A basic example where we can apply this idea is the storage of information in Magnetic tapes. So if we assume some magnetic reader/writer using some inductance principle to store information on some tape, we can see that there must be some noise by necessity due to random thermal effects in the data. Thus we have some signal to noise ratio.

In an analog sense, if we want to get a better S/N ratio, we would make the magnetic tape wider. We can take

With our increase in width, we can increase our Signal in analog by

However our noise will increase by a factor of

However our Noise will remain as 1 due to the inaccuracy of the least bit.

In an analog sense, if we want to get a better S/N ratio, we would make the magnetic tape wider. We can take

W = Β x W

_{0}With our increase in width, we can increase our Signal in analog by

S = Β x S

_{0}However our noise will increase by a factor of

N = Β

^{1/2}x N_{0}
S/N = Β

so if we want a S/N of 10^{1/2}^{}^{3}, we would need a Β of 10

^{6}over some initial length.

In a digital sense, since we are storing information in on and off bits of information, our signal increases as

S = 2

^{Β}^{}

N = 1

S/N = 2

so here we only need a Β = 10, which is a huge decrease in the width necessary for the same increase in accuracy.^{Β}/ 1### Math-Intro to Vectors and Calculus

Introduction to vectors-

A vector is simply an object that has a magnitude and a length in euclidean geometry space.

The components of the vector are defined by y = r sin (θ), and x = r sin (θ) the where theta is the angle between the axis and the vector, and r is defined as the magnitude/length of the vector. If they started out written as components in x and y, you would just see them as (x , y), sometimes the parentheses are substituted with another notation to denote vectors, or x and y will be underlined with a squiggle.

In order to add or subtract two vectors from one another, separate both vectors into their components. Take for example, a vector of length two 30 degrees above the axis, and a vector of length 2

^{1/2 }45 degrees above the axis. First break the two into components thus the first vector becomes (2 (3)^{1/2 }, 1) and the second vector becomes (1 , 1). Thus the combined result is (2 (3)^{1/2 }+ 1, 2) approximately (4.4, 2).
There are multiple ways to multiply vectors together. The first of which is the most simple, which is to multiply by a scalar. A scalar is a quantity that does not have a direction, and so does not change under coordinate transformations. In this case, you multiply the magnitude of the vector by the scalar, so the r component gets multiplied. For example if you have a vector (1, 1) and you multiply the vector by 2, the magnitude of the vector defined by the pythagorean theorem, (1

^{2 }+ 1^{2 })^{1/2 }= (2)^{1/2 }would become 2 (2)^{1/2 }, and the components would be (2, 2).
The next way to multiply vectors is called the dot product. A . B which is defined by Σ

_{i }A_{i }B_{i }. This is a scalar multiplication which removes the direction from the vectors and turns it into a scalar. For example, the vector in three space, (1, 2, 3) . (4, 5, 6) would become 1(4) + 2 (5) + 3 (6) = 22. This is equivalent to the magnitude of A multiplied by the magnitude of B multiplied with the cosine of the angle between them.
Another way to multiply vectors together is called the cross product. A x B is equal to magnitude of A multiplied by the magnitude of B sin (θ) in the direction n where n is the normal vector to both A and B. Normal is another term for perpendicular. A more detailed description of the cross product will be given after the introduction to matrices.

Introduction to basic integrals and derivatives-

In order to remember the basic positional equations just use integrals and derivatives to transform from one to another. First we start with some constant acceleration a.

a = a

Then we can integrate this equation with respect to time. Since a is a constant, we can think of this as a x

v = at + v

The reason why there is a v

This process gets repeated for position.

x = 1/2 a t

a = a

Then we can integrate this equation with respect to time. Since a is a constant, we can think of this as a x

^{0 }. We then raise 0 to 1 and divide by 1. This gives us the velocity equation.v = at + v

_{0 }The reason why there is a v

_{0 }in this equation is because of the vagueness left by taking a derivative. The derivative of a constant is 0 so a^{0 }= a^{0 }+ 0, which turns into the constant v_{0}.This process gets repeated for position.

x = 1/2 a t

^{2 }+ v_{0 }t + x_{0}
You can also start form the position equation and take derivatives in order to get the other equations of motion. Starting with

x = 1/2 a t

We then take the derivative, multiplying by the exponent then subtracting one from the exponent. giving us

v = at + v

and so on.

x = 1/2 a t

^{2 }+ v_{0 }t + x_{0 }We then take the derivative, multiplying by the exponent then subtracting one from the exponent. giving us

v = at + v

_{0 }and so on.

### Math-Intro to Linear Algebra

Introduction to matrices-

Matrices- A matrix is a rectangular array with some elements.

A common use for matrices is to represent the coefficients of systems of equations. The standard ways to solve system of equations involve using a substitution method or an elimination method by adding and subtracting equations from one another. For example:

x

_{1 }- 2 x_{2 }+ x_{3 }= 0
2 x

_{2 }- 8 x_{3 }= 8
-4 x

_{1 }+ 5 x_{2 }+ 9 x_{3 }= -9
In a substitution method you would normally do something along the lines of using equation 2 to set 2 x

_{2 }= 8 + 8 x_{3 }to get x_{2 }= 4 + 4 x_{3 }and substitute into the other equations.
In an elimination method you can add two equations together in order to get rid of terms. For example adding equation one and two will give you x

_{1 }- 7 x_{3 }= 8, and continue doing that to solve equations.
This can be summed up in a more simple fashion by using matrices, which contain the coefficients of the system of equations.

[ 1 -2 1 0 ]

| 0 2 -8 8 |

[ -4 5 9 -9 ]

Then use row operations in order to create a diagonalized matrix. There are a few basic row operations that can be used in diagonalizing a matrix such as this.

[ 1 -2 1 0 ]

| 0 2 -8 8 |

[ -4 5 9 -9 ]

Then use row operations in order to create a diagonalized matrix. There are a few basic row operations that can be used in diagonalizing a matrix such as this.

Scaling-Multiply all the entries in a row by a nonzero constant

Interchange-Interchange two rows

Replacement-Replace one row by the sum of itself and a multiple of another row.

Diagonalization means to reduce the matrix to the identity matrix, which contains only ones on the diagonal. The 4th column in the previous matrix represents solutions so the matrix can be rewritten as:

[ 1 -2 1 | 0 ]

| 0 2 -8 | 8 |

[ -4 5 9 | -9 ]

where | represents the separation between the matrices. The matrix in reduced form can also be called an echelon matrix or in reduced echelon form when the diagonals are 0, and only the solutions remain. Should a row solve to 0 0 0 0, this means that the variable this row is supposed to solve for is free and can take any value.

[ 1 -2 1 | 0 ]

| 0 2 -8 | 8 |

[ -4 5 9 | -9 ]

where | represents the separation between the matrices. The matrix in reduced form can also be called an echelon matrix or in reduced echelon form when the diagonals are 0, and only the solutions remain. Should a row solve to 0 0 0 0, this means that the variable this row is supposed to solve for is free and can take any value.

So to solve this we can perform operations such as

[ 1 -2 1 0 ]

| 0 2 -8 8 |

[ -4 5 9 -9 ]

| 0 2 -8 8 |

[ -4 5 9 -9 ]

[ 1 0 -7 8 ]

| 0 2 -8 8 |

[-4 5 9 -9 ]

| 0 2 -8 8 |

[-4 5 9 -9 ]

[ 1 0 -7 8 ]

| 0 2 -8 8 |

[ 0 5 -21 23 ]

| 0 2 -8 8 |

[ 0 5 -21 23 ]

[ 1 0 -7 8 ]

| 0 2 -8 8 |

[ 0 5 -21 23 ]

| 0 2 -8 8 |

[ 0 5 -21 23 ]

[ 1 0 -7 8 ]

| 0 2 -8 8 |

[ 0 0 1 3 ]

| 0 2 -8 8 |

[ 0 0 1 3 ]

[ 1 0 0 29 ]

| 0 2 -8 8 |

[ 0 0 1 3 ]

| 0 2 -8 8 |

[ 0 0 1 3 ]

[ 1 0 0 29]

| 0 2 0 32|

[ 0 0 1 3 ]

| 0 2 0 32|

[ 0 0 1 3 ]

[ 1 0 0 29]

| 0 1 0 16|

[ 0 0 1 3 ]

| 0 1 0 16|

[ 0 0 1 3 ]

This result means that x

_{1 }= 29, x_{2 }= 16, and x_{3 }= 3.
Cross-product definition-

In matrix form the cross product of two 3 element vectors is defined as:

(a b c) x (x y z)

[ i j k ]

| a b c |

[ x y z ]

| a b c |

[ x y z ]

(bz - cy)i -(az - cx)j + (ay - bx)k

Where i j k are the unit vectors that define the axis in which both vectors are defined.Least Squares and Data fitting

In order to find the least square solution, or a regression fit of a set of data, we calculate

A

^{T }A

__x__= A

^{T}

__b__

However, if the ker(A) = {

__0__} we can also get a unique least squares solution of

x = (A

^{T}A)

^{-1 }A

^{T}b

Example:

A = [1 1]

|1 2|

[1 3]

b = [0]

|0|

[6]

So we can compute A

^{T }as

[1 1 1 ]

[1 2 3]

so A

^{T}A is

[ 3 6 ]

[ 6 14]

Then we take the inverse

[2.3 -1]

[-1 .5]

Next we solve for A

^{T}b

[ 6 ]

[18]

multiple the above two together to get

x = [ -4]

[ 3 ]

Inner products

An inner product is a linear space that assigns a real scalar to any pair of elements in that linear space with the following properties:

i. <f, g> = <g, f>

ii. <f+h, g> = <f, g> + <h, g>

iii. <cf, g> = c <f, g>

iv. <f, f> > 0 for all nonzero f in V

### Math-Intro to Complex Analysis

Complex numbers are defined as points in the complex plane which consist of a real axis and an imaginary axis. By convention we denote a complex number as the point z = (x , y) where x is the real component and y is the imaginary component. z can also be written as z = x + iy.

Imaginary numbers - Imaginary numbers are just numbers who have a negative square. They are often written as a number multiplied with i, in a similar form to defining the coefficient of a unit vector. i is defined as i = (-1)

When i is raised to some exponent it repeats a pattern of 4 different results.

i

i

i

i

And then i to the 4

^{1/2 }When i is raised to some exponent it repeats a pattern of 4 different results.

i

^{0 }= 1i

^{1 }= ii

^{2 }= -1i

^{3 }= -iAnd then i to the 4

^{th }will go back to one and the pattern repeats.'
Algebraic Rules-

Complex numbers follow many of the same basic properties real numbers have. They have the same commutation, association, and distribution properties that real numbers have for both addition and multiplication. i.e.

z

z

(z

(z

z

Complex numbers follow many of the same basic properties real numbers have. They have the same commutation, association, and distribution properties that real numbers have for both addition and multiplication. i.e.

z

_{1 }+ z_{2 }= z_{2 }+ z_{1 }z

_{1 }z_{2 }= z_{2 }z_{1 }(z

_{1 }+ z_{2 }) + z_{3 }= z_{1 }+ (z_{2 }+ z_{3 })(z

_{1 }z_{2 }) z_{3 }= z_{1 }(z_{2 }z_{3 })z

_{1 }(z_{2 }+ z_{3 }) = z_{1 }z_{2 }+ z_{1 }z_{3}
Vectors-

Complex numbers can also be treated as vectors, represented by the segment between the origin and the point. Thus add and subtract complex numbers in the same way, separately adding and subtracting the components. i.e.

1 + 2i + 3 + 4i = 4 + 5i

Complex numbers can also be treated as vectors, represented by the segment between the origin and the point. Thus add and subtract complex numbers in the same way, separately adding and subtracting the components. i.e.

1 + 2i + 3 + 4i = 4 + 5i

Again just as in vector operations, you can perform addition and subtracting using the tail to head methods, where you move the tail end of one vector without distorting it to the head end of the other vector and draw the resultant vector from the origin to the final point. However, it is more common and efficient to just use the components of the vector to calculate the resultant.

Modulus-

We can also define the modulus, or length of a vector in the complex plane, and once again it is done in a similar way to real vectors. The modulus of a complex number is the square of its components square rooted, denoted by |z|. i.e.

|z| = (x

We can also define the modulus, or length of a vector in the complex plane, and once again it is done in a similar way to real vectors. The modulus of a complex number is the square of its components square rooted, denoted by |z|. i.e.

|z| = (x

^{2 }+ y^{2 })^{1/2}
The modulus can also be defined as the zz̅ = |z|

z̅ is the complex conjugate of z. The complex conjugate is defined as if z = x + iy, z̅ = x - iy. This means the complex conjugate is the reflection of the vector defined by z over the real axis.

^{2}.z̅ is the complex conjugate of z. The complex conjugate is defined as if z = x + iy, z̅ = x - iy. This means the complex conjugate is the reflection of the vector defined by z over the real axis.

Exponential form-

Complex numbers can also be defined in exponential form. R and θ are used to define polar coordinates and this can be done in complex form as well.

z = r (cos (θ) + i sin (θ))

then we use the definition of Euler's formula which states:

e

which gives us z = r e

Where r is the modulus or length of the vector that defines the complex number.

Complex numbers can also be defined in exponential form. R and θ are used to define polar coordinates and this can be done in complex form as well.

z = r (cos (θ) + i sin (θ))

then we use the definition of Euler's formula which states:

e

^{i θ}= cos (θ) + i sin (θ)which gives us z = r e

^{i θ }Where r is the modulus or length of the vector that defines the complex number.

Defining complex numbers in exponential form gives grants us access to a lot of properties due to the simplicity of exponents.

Multiplying complex numbers-

z

z

Thus when you multiply two complex numbers together, the resultant vector is rotated through an angle that is the sum of the two component angles, and the length is the multiplied modulus of both component vectors.

z

_{1}z_{2}= r_{1}r_{2}e^{i θ 1 }e^{i θ 2 }z

_{1}z_{2}= r_{1}r_{2}e^{i (θ 1 + θ 2)}Thus when you multiply two complex numbers together, the resultant vector is rotated through an angle that is the sum of the two component angles, and the length is the multiplied modulus of both component vectors.

Dividing complex numbers-

z

z

When you divide two complex numbers, the resultant vector is rotated through an angle that is the difference of the two component angles, and the length is the divided modulus of the component vectors.

z

_{1}/ z_{2}= (r_{1}/ r_{2}) e^{i θ 1 }/e^{i θ 2 }z

_{1}z_{2}= (r_{1}/ r_{2}) e^{i (θ 1 - θ 2)}When you divide two complex numbers, the resultant vector is rotated through an angle that is the difference of the two component angles, and the length is the divided modulus of the component vectors.

Raising to an exponent-

z

Raising a complex to the exponent is equivalent to raising the modulus of the vector to that power, and rotating through the angle theta of the component vector a number of times equal to the power you are raising to.

z

^{n }= r^{n }e^{i n θ }Raising a complex to the exponent is equivalent to raising the modulus of the vector to that power, and rotating through the angle theta of the component vector a number of times equal to the power you are raising to.

de Moivre's Formula-

This is the formula or theorem that connects complex numbers to trigonometry.

(cos(θ) + i sin(θ))

This allows us to derive trigonometric identities such as the double and half angle formulas.

Example:

(cos(θ) + i sin(θ))

cos

Then in order to get the identities, equate the imaginary parts on both sides together and the real parts on both sides to one another.

cos (2θ) = cos

i sin (2θ) = 2 i sin(θ) cos(θ)

The i's cancel in the second equation so you are left with

cos (2θ) = cos

sin (2θ) = 2 sin(θ) cos(θ)

This is the formula or theorem that connects complex numbers to trigonometry.

(cos(θ) + i sin(θ))

^{n}= cos (n θ) + i sin (n θ)This allows us to derive trigonometric identities such as the double and half angle formulas.

Example:

(cos(θ) + i sin(θ))

^{2}= cos (2θ) + i sin (2θ)cos

^{2 }(θ) - sin^{2 }(θ) + 2 i sin(θ) cos(θ) = cos (2θ) + i sin (2θ)Then in order to get the identities, equate the imaginary parts on both sides together and the real parts on both sides to one another.

cos (2θ) = cos

^{2 }(θ) - sin^{2 }(θ)i sin (2θ) = 2 i sin(θ) cos(θ)

The i's cancel in the second equation so you are left with

cos (2θ) = cos

^{2 }(θ) - sin^{2 }(θ)sin (2θ) = 2 sin(θ) cos(θ)

Phasors-

Phasors are time dependent complex vectors. They can be fully written as

A e

Where A is the length of the vector, e

This can also be written as the just A e

Phasors are time dependent complex vectors. They can be fully written as

A e

^{iθ}e^{iωt}Where A is the length of the vector, e

^{iθ}gives the initial orientation of the vector and e^{iωt}drives the motion of the vector around in a circle in the complex plane.This can also be written as the just A e

^{iωt}. In principle the A can also be a complex number but that is absorbed into the A e^{iθ}term, we are assuming for now that the A is just a real number.
We can then separate out the real portion of this, and in doing so we get a sinusoid. This is the projection of the phasor onto the real axis.

A e

Re {A e

A e

^{iωt}= A cos(ωt) + A i sin (ωt)Re {A e

^{iωt}} = A cos(ωt)
Fourier Analysis-

F(ω) = ∫ dt V(t)e

V(t) = 1/2π ∫ dω F(ω) e

These two are called Fourier transforms. The idea in the first case is to take a function of time and go to a function of frequency. The second reverses the operation and goes from a function of frequency to a function of time.

You can think of this as a form of projection, similar to the case where if we take the projection of a phasor onto the real axis we get a sinusoidal function. If you have some function in the time domain, you can approximate it with a Fourier series. A Fourier series is a series of oscillating functions with some coefficients, that when summed together form some function.

The Fourier transform when applied to a function in the time domain, gives you a function that tells you the contribution of the base waveform you are using at that frequency. This is like projecting the waveform from in the time domain into its components in the frequency domain.

F(ω) = ∫ dt V(t)e

^{-iωt}V(t) = 1/2π ∫ dω F(ω) e

^{iωt}These two are called Fourier transforms. The idea in the first case is to take a function of time and go to a function of frequency. The second reverses the operation and goes from a function of frequency to a function of time.

You can think of this as a form of projection, similar to the case where if we take the projection of a phasor onto the real axis we get a sinusoidal function. If you have some function in the time domain, you can approximate it with a Fourier series. A Fourier series is a series of oscillating functions with some coefficients, that when summed together form some function.

The Fourier transform when applied to a function in the time domain, gives you a function that tells you the contribution of the base waveform you are using at that frequency. This is like projecting the waveform from in the time domain into its components in the frequency domain.

### Electrical Engineering-Intro to Analog

The following is a review of some electrostatics necessary for understanding analog electronics.

Force exerted on a point charge moving in a B and E field, magnetic and electric field.

Electric field generated by a point charge.

Change in electric potential associated with charge and capacitance.

Properties of one electron

Force exerted on a point charge moving in a B and E field, magnetic and electric field.

F = q(E + v x B)

Electric field generated by a point charge.

E = (1 / 4 π ε

_{0}) Q / r 2
Δ V = ∫ E . dl = k Q / r = Q / C

Work done by an electric field.

Work = ∫ q E . dl = q Δ V

Power done by an electric field

Power = d Work / dt = dq Δ V / dt

Power = I Δ V

Power = I

^{2}R = V^{2}/ R (in situations where ohm's law applies)
Ohm's Law

V = I R (ohm's law)

e = 1.6 x 10

^{-19}Coulomb
1eV = 1.6 x 10

^{-19}Joule
= 11,600

^{o}K
Properties of Temperature

1/40 eV ≈ 300

^{o}K = 4140 Yocto-Joules
13.8 Yocto-Joule = 1

^{o}K
Constants

ε

_{0}= 8.85 x 10^{-12}Coulomb / Volt m = 8.85 pF / m
k = 1 / 4 π ε

_{0}= 9 x 10^{-9}Volt m / Coulomb
μ0 = 4 π x 10

^{7}T m / A
c = 0.3 x 10

^{9}m / s
When E is energy in electron volts

Ε = h fλ = 1240 nm (Ε / 1eV)

^{-1}
f = .24 x 10

^{15}(Ε / 1eV)
Masses

m

_{e}= .511 MeV / c^{2}
m

_{p}= .938 MeV / c^{2}
N

_{a}= 6.02 x 10^{23}### Physics-Intro to Quantum Mechanics

Constants:

Masses of particles: electron, proton, neutron, in units of MeV/c

m

m

m

^{2 }m

_{e }= 0.511 MeV/c^{2 }m

_{p }= 938.26 MeV/c^{2 }m

_{n }= 939.55 MeV/c^{2}
Approximations for the value of hc

h c = 12,400 eV A

ħ c = 1,973 eV A

h c = 12,400 eV A

ħ c = 1,973 eV A

Approximation of k boltzmann

k

k

_{b }= 1/11,600 eV/K
Approximation of Coulomb constant and two electrons worth of charge.

k e

k e

^{2 }=14.4 eV A
E

_{0 }= (k e^{2 }) / (2 a_{0 }) = (m k^{2 }e^{4 }) / (2 ħ^{2 }) = 13.6 eV
R = 1.097 x 10

^{7 }m^{-1}
Relativity:

E = (m

^{2 }c^{4 }+ p^{2 }c^{2 })^{1/2}
Planck's Law:

u (λ) = n (λ) E (λ)

n (λ) = 8 π / λ

E (λ) = h c / [ λ (e

n (λ) = 8 π / λ

^{4 }E (λ) = h c / [ λ (e

^{h c / λ k b T }-1)]
Energy in an oscillator:

E

P (E) ∝ e

_{f }= n h fP (E) ∝ e

^{-E / k B T}
Stefan's law:

R = σ T

σ = 5.67 x 10

R = c U / 4

U = ∫ u (λ) dλ

^{4 }σ = 5.67 x 10

^{-8 }W / m^{2 }K^{4 }R = c U / 4

U = ∫ u (λ) dλ

Wein's Displacement law:

λ

_{m }T = h c / 4.96 k_{B}
Photons:

Energy, momenta and frequency of photons

E = p c

E = h f

p = h / λ

f = c / λ

E = p c

E = h f

p = h / λ

f = c / λ

Photoelectric effect:

e V

_{0 }= m v^{2 }/ 2 = h f - φ
Compton Scattering:

λ ' - λ = h (1 - cos (θ) / (m

_{e }c)
Rutherford Scattering:

b = (k q

ΔN ∝ 1 / sin

_{α }Q cot (θ / 2)) / m_{α }v^{2 }ΔN ∝ 1 / sin

^{4 }(θ / 2)
Electrostatics:

F = k q

U = q

V = k q / r

_{1 }q_{2 }/ r^{2 }U = q

_{0 }VV = k q / r

Hydrogen spectra:

1 / λ = R (1 / m

^{2 }- 1 / n^{2 })
Bohr atom:

E

E

h f = E

r

r

a

L = m v r = n ħ

_{n }= k e^{2 }Z / 2 r_{n }= - Z^{2 }E_{0 }/ n^{2 }E

_{0 }= k e^{2 }/ 2 a_{0 }= m k^{2 }e^{4 }/ 2 ħ^{2 }= 13.6 eVh f = E

_{i }- E_{f }r

_{n }= r_{0 }n^{2 }r

_{0 }= a_{0 }/ Za

_{0 }= ħ / m k e^{2 }= 0.529 AL = m v r = n ħ

X - ray spectra:

f

K : b =1, L : b = 7.4

^{1/2 }= A_{n }(Z - b)K : b =1, L : b = 7.4

de Broglie:

wavelength, frequency, momentum, and energy of particles

λ = h / p

f = E / h

ω = 2 π f

k = 2 π / λ

E = ħ ω

p = ħ k

E = p

λ = h / p

f = E / h

ω = 2 π f

k = 2 π / λ

E = ħ ω

p = ħ k

E = p

^{2 }/ 2 m
Group and phase velocity:

v

v

_{g }= dω / dkv

_{p }= ω / k
Heisenberg Uncertainty principles:

Δx Δp ≈ ħ

Δt ΔE ≈ ħ

Δt ΔE ≈ ħ

Wave Function:

Ψ(x , t) = |Ψ(x , t)| e

P(x , t) = |Ψ(x , t)|

^{i θ (x , t)}P(x , t) = |Ψ(x , t)|

^{2 }dx
Schrodinger Equation:

-ħ

Ψ (x , t) = ψ(x) e

-ħ

∫ dx Ψ * Ψ = 1

Ψ

E

x

p

< A > = ∫ δ x Ψ * A

A

^{2 }δ^{2 }Ψ / 2 m δx^{2 }+ V(x) Ψ(x , t) = i ħ δ Ψ / δ t;Ψ (x , t) = ψ(x) e

^{-i E t / ħ }-ħ

^{2 }δ^{2 }Ψ / 2 m δx^{2 }+ V(x)&psi(x) = Eψ(x)∫ dx Ψ * Ψ = 1

Ψ

_{n }(x) = (2/L)^{1/2}sin(n π x / L)E

_{n }(x) = π^{2 }x

_{op }= xp

_{op }= ħ δ / i δ x< A > = ∫ δ x Ψ * A

_{op }ΨA

_{op }Ψ = a Ψ
uncertainty:

Δ A = ( <A

^{2 }> - <A>^{2 })^{1/2}
Harmonic Oscillator:

Ψ

E

E = p

_{n }(x) = C_{n}H_{n}(x) e^{-m ω x 2 / 2 ħ }E

_{n }= (n + 1/2) ħ ωE = p

^{2}/ 2 m + m ω^{2 }x^{2 }/ 2 = m ω^{2 }A^{2 }/ 2 , Δ n = +- 1
Step potential:

R = (k

T = 1 - R

k = (2 m (E - V) / ħ)

_{1 }- k_{2 })^{ 2 }/ (k_{1 }+ k_{2 })^{ 2 }T = 1 - R

k = (2 m (E - V) / ħ)

^{1/2}
Tunneling

Ψ (x) ≈ e

T ≈ e

T ≈ e

α(x) = [(2 m [V(x) - E]) / ħ

^{-αx }T ≈ e

^{-2αx }T ≈ e

^{-2 ∫ αx dx}α(x) = [(2 m [V(x) - E]) / ħ

^{2 }]^{1/2}
3-D square well

Ψ(x, y, z) = Ψ

E = π

_{1 }(x) Ψ_{2 }(y) Ψ_{3 }(z)E = π

^{2}
Spherically symmetric potential

Ψ

Y

_{n,l,m }(r, θ, φ) = R_{n l }(r) Y_{l m }(θ, φ)Y

_{l m }(θ, φ) = f_{l m }(θ) e^{i m φ}### Physics-Intro to Optics, Relativity

Snell's Law

n

c

λ

I

Where n is the refraction index of the material

_{1}Sin [θ_{1 }] = n_{2}Sin [θ_{2 }]c

_{n }= c / nλ

_{n }= λ / nI

_{θ }= I_{0 }E^{2 }_{θ }/ E^{2 }_{0 }Where n is the refraction index of the material

Lens Equation:

1 / d

m = - d

Where d

_{i }+ 1 / d_{o }= 1 / fm = - d

_{i }/ d_{o }Where d

_{i }is the distance to the image and d_{o }is the distance to the object. m represents the magnification of the object in comparison to the objects actual size.
Lens maker Equation:

1 / f = (n - 1) (1 / R

r = f / 2

f is the focal length, and r is the radius of curvature. The focal length is the distance at which the parallel rays of light travelling through the lens will converge to a point. The radius of curvature represents the radius of the sphere that the lens could make if it was continued to a sphere.

_{1 }+ 1 / R_{2 })r = f / 2

f is the focal length, and r is the radius of curvature. The focal length is the distance at which the parallel rays of light travelling through the lens will converge to a point. The radius of curvature represents the radius of the sphere that the lens could make if it was continued to a sphere.

Interference and Diffraction-

Double Slit interference:

I

d Sin[θ] = m λ / Maxima

d Sin[θ] = (m +1/2) λ / Minima

_{θ }= I_{0 }[Cos(δ / 2)]^{2 }d Sin[θ] = m λ / Maxima

d Sin[θ] = (m +1/2) λ / Minima

Single Slit diffraction:

I

D Sin[θ] = (m +1/2) λ / Maxima

Note - θ = 0 is the central and highest peak

D Sin[θ] = m λ / Minima

_{θ }= I_{0 }[Sin(Β/2) / (Β / 2)]^{2 }D Sin[θ] = (m +1/2) λ / Maxima

Note - θ = 0 is the central and highest peak

D Sin[θ] = m λ / Minima

Single and double slit effects:

I

_{θ }= I_{0 }[Sin(Β/2) / (Β / 2)]^{2 }[Cos(δ / 2)]^{2}
Diffraction grating:

Sin (θ) = m λ / d

R = λ / (Δ λ) = N m

R is the resolving power of the lens

R is the resolving power of the lens

Circular hole diffraction

θ = 1.22 λ / D

Polaroids

I = I

_{0 }(Cos[θ])^{2}
Relativity

Minkowski space-This is the setting in which relativistic calculations are done. Points in Minkowski space are represented by a 4-vector which defines position in x, y, z and time, and is represented by the Minkowski metric, which is defined as:

[-1 0 0 0]

| 0 1 0 0|

| 0 0 1 0|

[ 0 0 0 1]

| 0 1 0 0|

| 0 0 1 0|

[ 0 0 0 1]

Invariance of the interval:

(Δs)

(Δs')

The invariance of the interval is also known as the line element of the minkowski metric.

^{2 }= (Δx)^{2 }- (c Δt)^{2 }(Δs')

^{2 }= (Δs)^{2 }The invariance of the interval is also known as the line element of the minkowski metric.

Lorentz Transformations-

ct = γ ( v x' / c + c t ' )

x = γ ( x' + v t ' )

y = y'

z = z'

x = γ ( x' + v t ' )

y = y'

z = z'

This is assuming your working in a frame where there is movement in only one direction, however due to the isotropy of space, you can almost always make this assumption.

γ = 1 / [1 - (v / c)

This is known as the lorentz factor, which is used in the lorentz transformation.

^{2 }]^{1/2 }This is known as the lorentz factor, which is used in the lorentz transformation.

Velocity addition formulas-

u

u

u

_{parallel }= (u_{parallel }' + v) / (1 + (u_{x }' v / c^{2 }))u

_{perpendicular }= (u_{perpendicular }') / [γ (1 + (u_{perpendicular }' v / c^{2 }))]
Contraction

L' = L / γ

Where L' is the length of the moving object as observed by the stationary frame.

Δt' = γ Δt

Where t ' is the length of time experienced by an observer in the stationary frame.

Where L' is the length of the moving object as observed by the stationary frame.

Δt' = γ Δt

Where t ' is the length of time experienced by an observer in the stationary frame.

Stationary frames are described by no acceleration.

Non constant velocity

τ = ∫ [1 - ( v

^{2 }(t) / c^{2 })]^{1/2 }dt
Momentum and Energy

p = γ m v

E = γ m c

E

KE = E - m

E = γ m c

^{2 }= [m^{2 }c^{4 }+ |p|^{2 }c^{2 }]E

^{2 }= m^{2 }c^{4 }+ p^{2 }c^{2 }KE = E - m

^{2 }c^{2 }= (γ - 1) m c^{2}### Phyiscs-Intro Heat, Waves, Fluids

Useful math functions/approximations:

cos( A ) + cos( B ) = 2 cos [ ( A + B ) / 2 ] cos [ ( A - B ) / 2 ]

sin( A ) + sin( B ) = 2 sin [ ( A + B ) / 2 ] cos [ ( A - B ) / 2 ]

1/L - 1 / ( L + ΔL ) ≈ ΔL / L

for x << 1

(1 + x)

ln (1 + x) ≈ x

due to taylor expansion

sin( A ) + sin( B ) = 2 sin [ ( A + B ) / 2 ] cos [ ( A - B ) / 2 ]

1/L - 1 / ( L + ΔL ) ≈ ΔL / L

^{2 }for x << 1

(1 + x)

^{1/2 }≈ 1 + x/2ln (1 + x) ≈ x

due to taylor expansion

Constants:

ρ = 1 x 10

g = 9.8 m/s

p

^{3 }kg/m^{3 }g = 9.8 m/s

^{2 }p

_{0 }= 1 x 10^{5}
Speed of sound:

v

v

1 atmosphere = 1 x 10

R = N

k

N

1 atomic mass unit = 1.7 x 10

1 cal = 4.2 J

_{air }= 340 m/sv

_{water }= 1440 m/s1 atmosphere = 1 x 10

^{5 }= 76 cm HgR = N

_{A }= 8.3 J/(mol K)k

_{B }= 1.4 x 10^{-23 }N

_{A }= 6.0 x 10^{23 }1 atomic mass unit = 1.7 x 10

^{-27 }kg1 cal = 4.2 J

Water

C = 4.2 kJ/kg-K

L

L

L

_{F }= 330 kJ/kgL

_{V }= 2.2 x 10^{3 }kJ/kg
Pressure:

ρAv = const

P + ρ v

P + ρ v

^{2 }/ 2 + ρgy = const
Simple Harmonic Oscillator:

d

z = z

^{2 }z / d t^{2 }+ cz = 0z = z

_{0 }cos(ωt + φ), and ω = c^{1/2}
For a spring:

E = m v

^{2 }/ 2 + k x^{2 }/ 2
For damped spring:

d

y = y

α = b / 2 m

ω ' ≈ ω

^{2 }y / dt^{2 }+ b dy / m dt + k y / m = 0y = y

_{0 }e^{-α t }cos ( ω ' t )α = b / 2 m

ω ' ≈ ω

_{0 }= ( k / m )^{1/2}
Forced oscillator

F = F

y = [(F

_{0 e i ω t}y = [(F

_{0 }/ m) e^{i ω t }] / [ - ω^{2 }+ ω^{2 }_{0 }+ 2 i α ω ]
Waves on a string

v = (T / μ)

ε ' = (1/2) μ ω

P = (1 / 2) μ ω

ε ' = (1/2) μ ω

^{2 }D_{m }^{2 }P = (1 / 2) μ ω

^{2 }D_{m }^{2 }v_{p}
For sound waves

v

Δ p = - B (dD / dx)

I = (1 / 2) ρ ω

_{s }= (B / ρ)^{1/2 }Δ p = - B (dD / dx)

I = (1 / 2) ρ ω

^{2 D m 2 v s}
Decibels

Β = 10 log

I

_{10 }(I / I_{0})I

_{0 }= 1 x 10^{-12 }W/m^{2}
Wave refraction, Snell's law

sin(θ

sin( θ

_{1 }) / v_{1 }= sin( θ_{2 }) / v_{2 }sin( θ

_{1 }) / sin( θ_{2 }) = v_{1 }/ v_{2 }= n_{1 }/ n_{2}
Beats in waves f

_{1 }- f_{2}
D

f = f

B = - V (dp / dV)

_{m }cos(ω_{1 }t) + D_{m }cos(ω_{2 }t) = 2 D_{m }cos[(ω_{1 }t + ω_{2 }t) / 2] cos[(ω_{1 }t - ω_{2 }t) / 2]f = f

_{0 }(v_{s }+/- v_{d }) / (v_{s }+/- v_{s0 })B = - V (dp / dV)

_{T}
Thermodynamics

α = (1 / L) (dL / dT)

Β = (1 / V) (dV / dT)

P V = n R T

(m v

l

dQ = dE + dW

_{p }Β = (1 / V) (dV / dT)

_{p }P V = n R T

(m v

^{2 }_{avg }) / 2 = (3 k_{B }T) / 2l

_{mfp }= 1 / [2^{1/2 }4 π r^{2 }(N / V)]dQ = dE + dW

c

atoms, diatomic, polyatomic

_{v }= (3 / 2) R , (5 / 2) R , 3 Ratoms, diatomic, polyatomic

c

P V

_{p }= c_{v }+ R for ideal gasP V

^{γ }= const. γ = c_{p }/ c_{v}
W = [p

dQ / dt = e σ A T

σ = 5.7 x 10

dQ / dt = -k A dT / dx

ΔS ≥ 0

dQ = T dS

ΔS = ∫ dQ / T

S = k

P

e = W / Q

COP = Q

_{1 }V_{1 }/ (γ -1)] [1 - (V_{1 }/ V_{2 })^{γ - 1 }]dQ / dt = e σ A T

^{4 }σ = 5.7 x 10

^{-8 }W/m^{2 }K^{4 }dQ / dt = -k A dT / dx

ΔS ≥ 0

dQ = T dS

ΔS = ∫ dQ / T

S = k

_{B }ln (W)P

_{b - > a }= exp(-ΔS_{ab }/ k_{B })e = W / Q

_{H }≤ 1 - T_{L }/ T_{H }COP = Q

_{L }/ W ≤ T_{L }/ (T_{L }- T_{H })### Physics-Intro to Electrostatics

k = 1/(4 π ε

_{0 }) = 8.99 x 10^{9 }N m^{2 }/ C^{2 }
k is the proportionality constant in Coulomb's law, and is sometimes known as Coulomb's constant.

ε

ε

_{0 }= 8.85 x 10^{-12 }C^{2 }/ Nm^{2 }ε

_{0 }is a constant known as the permittivity of free space, which is the absolute value of the dielectric permittivity of a vacuum.
F

Coulomb force law, inverse square law between objects 1 and 2 with a given charge a s a function of distance squared. Can be both attractive and repulsive in nature.

_{ 12 }= (k Q_{1 }Q_{2 })/ r^{2 }_{12}Coulomb force law, inverse square law between objects 1 and 2 with a given charge a s a function of distance squared. Can be both attractive and repulsive in nature.

E = Q r / (4 π ε

Electric field due to a point charge, written with ε

_{0 }r^{2 })Electric field due to a point charge, written with ε

_{0 }as opposed to using constant k.
Dipole field

E = [3 ( p . r ) r - p] / (4 π ε

_{0 }r^{3 }) - [p δ^{3 }(r)] / (3 ε_{0 })
In one direction along or perpendicular to dipole axis

E = p / (2 π ε

_{0 }x^{3 })
Energy and Torque on a dipole in an external E-field

U = - p . E , τ = p x E

Electric field of infinite line of charge:

E = λ / (2 π ε

Where λ is defined as the charge per unit length.

E = λ / (2 π ε

_{0 }r)Where λ is defined as the charge per unit length.

Electric field of infinite charged plane:

E = σ / (2 ε

Where σ is defined as the charge per unit area.

E = σ / (2 ε

_{0 })Where σ is defined as the charge per unit area.

Electric field of ring along axis:

E = Q x / [ 2 π ε

E = Q x / [ 2 π ε

_{0 }r (x^{2 }+ a^{2 })^{3/2 }]
Electric field of disk along axis

E = σ / 2 ε

E = σ / 2 ε

_{0 }[ 1 - z / (z^{2 }+ R^{2 })^{1/2 }]
Electric flux:

Φ = E . A ;

dΦ = E . dA ; Φ = ∫ E . dA

Φ = E . A ;

dΦ = E . dA ; Φ = ∫ E . dA

Gauss's Law:

§ E . dA = Q

_{enc }/ ε_{0}
Potential energy

U

V

E

U

_{ab }= U_{b }- U_{a }= -W_{ab }= - ∫ F . dl ;V

_{ab }= V_{b }- V_{a }= - ∫ E . dl ; V = k Q / r ; V = k ∫ dq / r ; E_{l }= - dV / dlE

_{x }= - dV / dxU

_{12 }= k Q_{1 }Q_{2 }/ r_{12}
Capacitors

Q = C V

Parallel plate

Q = ε

U = Q

C = K C

ε = K ε

C = C

1/C = 1/C2 + 1/C3

_{0 }A / dU = Q

^{2 }/ 2 CC = K C

_{0 }ε = K ε

_{0 }C = C

_{1 }+ C_{2 }1/C = 1/C2 + 1/C3

Ohm's law

I = V/R = Δ Q / Δ t

Resistivity

ρ = ρ

_{0 }[ 1 + α (T - T_{0 })]
Power

P = VI = V

The basic relation P = VI was transformed to the other two states by using Ohm's law.

^{2 }/ R = I^{2 }RThe basic relation P = VI was transformed to the other two states by using Ohm's law.

Alternating Current

V = V

P = V

P

_{0 }sin ω tP = V

^{2 }_{0 }sin^{2 }(ω t) / RP

_{avg }= V^{2 }_{0 }/ (2 R)
Current density

j = I/A = n e v

e = -1.6 x 10

_{drift }= E / ρe = -1.6 x 10

^{-19 }C
Subscribe to:
Posts (Atom)