EGR 1101 Unit 4 Two-Dimensional Vectors in Engineering (Chapter 4 of Rattan/Klingbeil text) Scalars versus Vectors A scalar is a quantity that has magnitude only. Examples: Mass Temperature A vector is a quantity that has magnitude and direction, and that obeys the triangle law of addition. Examples: Velocity Force Component Form & Polar Form Vectors are commonly written in two different forms. In component form, a two-dimensional (2D) vector is expressed as the sum of an xcomponent and a y-component. In polar form, a 2-D vector is expressed as having a certain magnitude in a certain direction. Other Names for Component Form Component form is sometimes called rectangular form or Cartesian form. Component Form v Suppose a vector has x-component v x and y-component v y . Then we can write the vector in component form as v v x iˆ v y ˆj where iˆ is the unit vector in the positive-x direction and ˆj is the unit vector in the positive-y direction. Polar Form v Suppose a vector has magnitude v and angle . Then we can write the vector in polar form as v = v . Converting Between Component & Polar Forms Many problems involve converting from one form to the other. This is easy if you remember your basic trig. From polar form to component form: vx = v cos() vy = v sin() From component form to polar form: v = vx2 + vy2 = tan-1(vy / vx) This Week’s Examples 1. 2. 3. 4. 5. Force on a vacuum cleaner Impedance of inductor & resistor in series Position of a ship Forces in static equilibrium: Hanging weight Forces in static equilibrium: TV on a ramp A New Electrical Component: The Inductor Recall that a resistor has a resistance (R), which is measured in ohms (Ω). In diagrams, the symbol for a resistor is An inductor has an inductive reactance (XL), also measured in ohms. In diagrams, the symbol for an inductor is Impedance Resistance (R) and inductive reactance (XL) are special cases of a quantity called impedance (Z), also measured in ohms. Impedance (Z) Resistance (R) Reactance (X) Inductive Reactance (XL) Capacitive Reactance (XC) Review: Total Resistance of Resistors in Series Recall that if two resistors are connected in series (end-to-end), total resistance is the sum of the two resistances: Things aren’t quite this simple when a resistor and an inductor are connected in series… Total Impedance To find total impedance of a resistance and an inductive reactance in series, add them as vectors, not as scalars. When treated as vectors, resistance always has an angle of 0, and inductive reactance always has an angle of 90. Adding Vectors Many problems involve the addition of two or more vectors. Vectors can be added graphically or algebraically. Adding Vectors Graphically To add two vectors P1 and P2 graphically: Draw the two vectors with P2 ‘s tail placed at P1 ‘s tip. Then draw a third vector that extends from P1 ‘s tail to P2 ‘s tip. This third vector is the vector sum, which we call P1 P2 . Adding Vectors Algebraically To add P1 and P2 algebraically: Write the vectors in component form: P2 Px 2 iˆ Py 2 ˆj and P1 Px1iˆ Py 1 ˆj Add their x-components to get the xcomponent of the sum, and add their ycomponents to get the y-component of the sum: P P ( P P ) iˆ ( P P ) ˆj 1 2 x1 x2 y1 y2 Matrices, Vectors, and Scalars in MATLAB • • • • In MATLAB, all quantities are treated as arrays of numbers. A matrix has several rows and several columns. A vector has one row and several columns, or one column and several rows. A scalar has just one row and one column. Matrices in MATLAB • Example of a 2x3 matrix (one with two rows and three columns): 7 .6 1 .2 1 .5 4 .9 3 .3 2 .5 • To enter this in MATLAB, type: A = [7.6, 1.2, 1.5; 4.9, 3.3, 2.5] Vectors in MATLAB • A row vector is an array with just one row. • Example: v1=[7.6, 1.2, 1.5] • A column vector is an array with just one column. • Example: v2=[7.6; 1.2; 1.5] Scalars in MATLAB • A scalar is treated as an array with just one row and one column. • Example: s=23.5 • Could also write this as s=[23.5] Typical Use of Vectors in MATLAB • • Suppose we want to plot some temperature-versus-time data. Time (hour AM) Temperature (F) 5 59 6 58 7 60 8 63 9 70 10 78 Define vectors for time and temp, and then use plot command. Matrix Multiplication versus Elementby-Element Multiplication • • • In MATLAB, the * operator performs matrix multiplication. For A*B to be defined, the number of columns in A must equal the number of rows in B. The .* operator performs element-byelement multiplication. MATLAB Multiplication Example • Define two 1x3 vectors: v1 = [1, 2, 3] v2 = [4, 5, 6] • v1*v2 tries to perform matrix multiplication. An error results, since the number of columns in v1 is not equal to the number of rows in v2. • v1.*v2 performs element-by-element multiplication, giving [4, 10, 18]. Other Operations in MATLAB • Similar comments apply to division and exponentiation: • • • • • / performs matrix division ./ performs element-by-element division ^ performs matrix exponentiation .^ performs element-by-element expntn. Addition and subtraction are always performed element-by-element. So we don’t need special .+ and .– operators. Just use the + and – operators. Static Equilibrium The field called “statics” deals with objects in static equilibrium. For such objects, the external forces acting on the object add to zero: F 0 Therefore (for 2 dimensions): F F x 0 y 0 Common Types of Force The following types of forces often arise in statics problems: Weight Tension Frictional force Normal force Weight and Mass Near the earth’s surface, an object’s weight (W ) is a vector pointing straight down. Its magnitude (W) is equal to the object’s mass (m) times the acceleration due to gravity (g): W = mg In metric units, g 9.81 m/s2. Free-Body Diagram For statics problem, your first step should be to draw a free-body diagram. A free-body diagram shows the object of interest and clearly indicates all of the forces acting on that object.