Monday, September 9, 2013

Physics - Pulley Sample Problem

What is the acceleration of the following configuration?

Like with our atwood's machine example we solve this by looking at each mass individually. The forces acting on M are friction due to the table, opposing the tension T of the rope. The forces acting on m is the weight of m and the tension T of the rope. Now for atwood's situation we started with

m1 g - T = m1 a
T - m2 g =  m2 a

and arrived at

a = g(m1 - m2 )/(m1 + m2 )

For this situation, we can see that m1 can be substituted with M as we define positive acceleration as M going left and m going up, and negative acceleration as M to the right and m going down matching the convention of gravity's downward acceleration. The only difference is that instead of m1 g being the force opposing T we have μMg which is the friction force due to the table. Making this substitution we arrive at


a = g(μM - m )/(M + m )

Physics - Atwood's Machine

Atwood's Machine is a simple experiment that verifies the mechanical laws of motion under constant acceleration. As shown below two masses are attached to the ends of one pulley.


If the weight of m1 and m2 are equal then there is no acceleration. However if they are unequal their acceleration would be as follows. We can define the forces acting on m1 as T the tension force of the rope and W1 the force due to the weight of the block. The forces acting on m2 are T the tension force and W2 the weight of the second block. As you can see the tension force has the same magnitude on each block and all that is left is to solve for our acceleration.

m1 g - T = m1 a
T - m2 g =  m2 a

We then combine this system of equations by adding them together to get

m1 g - m2 g = m1 a + m2 a

This is the same as distributing g and a over m1 and m2 so our acceleration is

a = g(m1 - m2 )/(m1 + m2 )

Physics - Intro to Pulleys

This will be an overview of pulleys and the assumptions that we make of them in mechanics. Usually when doing these problems we can
  • Ignore friction forces of the rope on the pulley itself
  • Ignore the mass of the pulley or rope
Although these assumptions aren't necessarily true we can assume so if the weights are much larger in comparison to the weight of the pulley, or if there are multiple weights in the same system, that the difference between them is very large.

What is the simplest way that we can see the advantages of using a pulley? In the following picture


We can see a pulley attached to a ceiling moving a weight. The force the hand must exert is divided in two because the Tension force on the rope is evenly divided between rope being pulled by the hand and the portion attached to the ceiling reducing the effort of the person pulling the object up.

Saturday, July 20, 2013

Flip Flops and Memory

Flip/Flops

This is a simple flip/flop which acts as a latch. It operates through the use of feedback. Basically there are 4 scenarios. If you don't have a signal through either set or reset then whatever state the flip flop was in, it will stay in. If you input something into the reset but not the set the not Q will change. You can envision this as just a separate signal though through only the bottom wire. If you input into set but not reset, then the Q output will change, or the proper signal setting your "memory" bit to one. Which is why it can be called set. Then the Final is if you input a signal through both set and reset which clears all information, putting both states to 0.

S R Q Q̅
0 0 No change
0 1 0 1
1 0 1 0
1 1 0 0




This flip/flop is equivalent to one bit of memory as it is capable of holding a state.

Binary, 2's complement, Hexadecimal-

So since we are capable of storing a bit of memory, we can string them together to form larger sections of memory. We often refer to bytes of memory, which is 8 bits, which represents 256 different states.

27 26 25 24 23 22 21 20
0 1 0 0 1 1 0 1 would then = 77

You can then partition the byte into two halves and write the number in hexadecimal 
the high is
0 1 0 0 = 4
the low is
1 1 0 1 = d
Hexadecimal goes as 0 1 2 3 4 5 6 7 8 9 A B C D E F

2's complement is a way of making the operations of addition multiplication and subtraction identical. If we had these 8 bits be positive only we would count through 256 possible numbers from 0-255. Using two's complement we go from 0 -> 127 and then go back down from -128 to -1.

Boolean Operations

Boolean operations are used to develop logical circuits. This will be a brief overview of these functions. We will establish a truth table, where 1 represents an on signal, 0 represents an off signal. Q is just the result of applying our function using the Boolean operation specified

Q = A.B

AND Gate
The AND gate is an important function, we can think of this as multiplication as if we multiple the two signal together here we arrive at the following truth table for an AND gate.

A B Q
0 0 0
0 1 0
1 0 0
1 1 1




Q = Q̅ = A.B

Function NAND
This is the NAND gate or the not AND gate. This simply reverses all the outputs of our AND gate.

A B Q
0 0 1
0 1 1
1 0 1
0 0 0



Q = A + B

Function OR
The OR gate is similar to addition. However, its a version of addition that does not know how to carry over, as we can see by the last part of the truth table, but otherwise functions similarly.

A B Q
0 0 0
0 1 1
1 0 1
1 1 1




Q = Q̅ = A + B

Function NOR
Again like the NAND gate, the NOR gate simply reverses the signal of the OR gate.

A B Q
0 0 1
0 1 0
1 0 0
1 1 0




Electronics - Fluid Analogy Resistance

A good way to visualize electricity is to relate it to the movement of fluids. They have a lot of similarities as we will discuss below.

Resistance

ΔV = -IR

This is simply stating that the change in voltage is the current multiplied by the resistance. The way we can think about this is that the voltage loss is due to the current passing through a volume more difficulty, otherwise known as resistance. We can show the resistance with the equation

R=ρl/a

Where rho is the resistivity due to impediments in the material, multiplied against the length, divided by the area.

Pressure

ΔP = IR

This is the change in pressure due to an increase in resistance. We can visualize this increase in pressure by thinking about water flow through a pipe. Let us think about a large pipe transitioning to a smaller one. The change in pressure from the area before the small pipe to after the small pipe can be approximated by thinking about the smaller pipe as a resistive element, similar to resistance in a current. However instead of impediments as a function of the material, it is just the smaller size of the pipe. Therefore the resistance in this case would be proportional to (1/A) where A is the area of the smaller pipe.

Saturday, April 27, 2013

Cloud Computing

These are notes form Cloud Computing and Architecture an O'Reilly book written by George Reese.

  • The Cloud
    • the cloud is more than just a term for the internet
    • specifically it is a combination of software and infrastructure 
      • accessible via a web browser
      • zero capital expenditure to get started
      • pay for uses not initialization
  • Software
    • Software as a Service (SaaS) term that refers to software in the cloud
      • Available via a web browser
      • On-Demand Availability
      • Payment based on Usage
      • Minimal IT demands
    • web based deployment model
      • does not care about host site
      • does not care about operating system or language used to write program
      • Example: Gmail
        • provides same service as Apple Mail or Outlook but without the client
    • Multitenancy
      • server based software that supports the deployment of multiple clients in a single software instance
      • used as advertisement but virtualization technologies renders benefits moot
  • Hardware
    • Hardware is requested, i.e. a server but not physically owned by user
      • increase in security due to obscurity, 
    • Difficulties of proprietary servers
      • Capacity planning
      • Upfront costs of SAN(storage area networks) or individual servers
      • Hardware destruction
      • Disaster and recovery i.e. entire servers go down
      • Real Estate and Electricity Usage
    • Difficulties subsumed into main distributor of cloud resources rather than individual companies creating proprietary networks
    • Hardware Virtualization
      • Servers can be partitioned into sections with its own memory, CPU, and disk footprints
      • Has a significant performance penalty however is a non-issue because
        • cloud vendors servers far superior in performance to capabilities of small business servers
  • Cloud Storage
    • replaces physical storage systems
    • Operationally different from physical due to degraded performance but enhanced structure
    • Impractical for runtime storage for an application such as for transaction applications
  • Cloud Application Architectures
    • Grid Computing
      • breaks up processing into small chunks that can be processed in isolation
      • i.e. SETI@home
      • collected volumes of data processed and checked against other users, alternate example BOINC
      • functional steps in grid computing
        • both worker and manager watch message queue
        • worker waits for new data set, pulls data set publish results
        • manager reads results
      • limited to financial, scientific, and large scale data problems
    • Transactional Computing
      • one or more pieces of incoming data processed together and establish relationships with data already in the system
      • components form a cluster
      • Nodes in a transactional system must be long lived rather than short lived in grid computing
      • Mean time between failures (MTBF) number of physical nodes governs this so cloud has higher failure rate than proprietary servers, but this can be mitigated
  • The Value of Cloud Computing
    • IT infrastructure traditional vs cloud
    • file server vs google docs, MS outlook vs gmail, server racks and firewall vs Amazon EC2
    • Cloud reduces software licensing hassle, charged for use, software upgrades, hardware failure, # of technology assets, manage depreciation of it assets, capacity management
  • IT infrastructures without special constraints are extremely expensive to start up compared to cloud services
  • The Economics
    • Capital Costs
      • depreciation of servers and computers
    • Cost Comparison
      • cloud has no capital costs but has monthly service fees, setup costs, and staff costs
      • However many large companies already have infrastructure in place, not necessarily cost effective for them to transition to cloud services
  • Cloud Infrastructure Models
    • Platform as a Service Vendor
      • complete operational and deployment options
      • Google App Engine
      • Vendor Lock-in i.e. Python requirement for Google Apps
    • Infrastructure as a Service
      • Amazon Web Services