ECE210a_lecture10_small

ECE210a_lecture10_small - Rotations Rotations (in 2...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 6
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 8
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 10
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Rotations Rotations (in 2 dimensions) Consider rotating the vector u to get the vector v Hull = llvll = a This can be expressed as: v= [:2] a(cos 0 cos ¢ — sin 0 sin qb) a(sin0 cos 925 + cos 0 sin qb) a(cos 0 cos <15 — sin 0 sin (1)) a(si110 cos ([5 + cos 0 sin d9) cos0 —sin0 acosqfi sin9 cos0 a sin 45 _ cos 0 — sin 0 U1 _ sin 0 cos 0 uz W P Roy Smith, ECE 210a, 10: 1 Rotations Rotations (in 2 dimensions) P = [cose —s1n6] sin 6 cos 0 Note that PT is a rotation in the opposite direction so PT 2 P’1 Therefore PT P = I and so P is unitary Roy Smith, ECE 210a, 10:2 Rotations Rotations (in 3 dimensions) Rotation about a coordinate axis (2) Projection onto the x,y plane: V 1 0 0 PM = 0 1 0 y 0 0 0 i) nyv gives the 2-D version of P from before, cos6 —sin6 P _ [sin6 cos6] Now the 2 component in unchanged and we get, cos 6 — sin 6 0 P2 (6) = sin 6 cos 6 0 0 0 1 Roy Smith, ECE 210a, 10:3 Rotations Rotations (in 3 dimensions) The complete set of coordinate rotations in 3-D are: 1 0 0 Pg, (6) = 0 cos 6 — Sin 6 Rotation about the x axis 0 sin 6 cos 6 cos 6 0 sin 6 P7, (6) = 0 1 0 Rotation about the y axis — sin 6 0 cos 6 cos 6 — sin 6 0 PZ (6) = sin 6 COS 0 0 Rotation about the z axis 0 0 1 Roy Smith, ECE 210a, 10:4 Rotations Rotations (in 3 dimensions) We can describe any rotation in 3-D by a rotation about each of the axes: P = Py(0)PZ(¢) Rotations are not commutative. In general, they can be described by Euler angles: (¢, 9,1/1) To specify a rotation we must specify the axes, the order, and whether the axis also moves. Roy Smith, ECE 210a, 10:5 Rotations Rotations Z /' Euler angle rotations: \ P = PzW) PM) Pz(¢>) y The second and third rotations X are about the new x and z axes. There are 12 possible conventions for these angles: 6 of the z-x-z type 6 of the x-y-z type Properties of rotation matrices (in 3-dimensions) eig(P) = {Laijfl}, trace(P) 2 14—20050, det(P) = 1. Reference: wikipedia: Euler angles Roy Smith, ECE 210a, 10: 6 Rotations Rotations We can also consider the case where the rotation axes remain fixed. There is an equivalent fixed axis set of rotations. If (and only if) the z and z’ axes start aligned, these rotations are: P : P2(¢’)Px(0,)Pz(¢l) with, W — (b, 0’ = 0, ¢' = 1&- Roy Smith, ECE 210a, 10: 7 Rotations Rotations Euler’s theorem: A113-D rotations can be described by a single rotation about a given vector, u. Three parameters are required to uniquely specify a rotation (u can be normalized). Roy Smith, ECE 210a, 10:8 Rotations Rotations: Aerospace conventions roll This is useful in aerospace applications for describing the effects of body-axis rotations. "Euler angles:” successive rotations to move the vehicle carried local vertical to the body (or wind) frame. P = P’s/(0) PZ(¢) qb Azimuth angle 0 Elevation angle 1/} Bank angle The body and wind frames are related by the rotations: Py (a) (angle-of—attack) and P2 (—fl) (sideslip). Reference: Etkin, “Dynamics antmosphBris Flight,” Wiley, 1972 Roy Smith, ECE 210a, 10:9 Rotations Plane Rotations I 0 c s <— z'th row Define P as: Pij = I —s c <— jth row 0 I with c2 + 82 = l (for example: cos 0, sin 0) Then for a given x, 331 371 0:12, + sac]- :L' 2 PM :1) = 2:71 —sa:,,- + cxj $n Roy Smith, ECE 210a, 10:10 Rotations Plane Rotations 11:1 0127-, + sac]- Pij $ = —s:ri + 0an $7L . 302‘ 957' If xi aé 0 and acj aé 0, then the ch01ce, c = — 3 = —7 gives, as? + as? + $1 + P. t I = _ Note that we can use this to selectively put zeros m 1 into a vector. 0 11.77, Roy Smith, ECE 210a, 10:11 Rotations Plane Rotations Applying this once gives, P12 :3 : Applying it to the next component gives, P13P12 x llivll 0 And after n-l rotations, PM . . . P13P12 a: = Roy Smith, ECE 210a, 10:12 Plane Rotations Notethat, T IIijII=Hm1 x§+x§ 0 95,] andso, ||Pij|| =1 and,infact,P,-jisunitary 13512:]- = I, P77 = Pfl 1.] U We can use plane rotations to orthogonalize a matrix and get a QR decomposition. llwll 0 P1n---P13P12-T Rotations Roy Smith, ECE 210a, 10:13 Rotations Givens Rotations Recall the first step of the Householder reflection method: For the Givens case use H1 2 PM . . . P13P12. The next step in the Householder procedure used, 1 0 HP [0 ml For the Givens case use7 H2 2 [PgnP2n_1 . . . P23] _v_/ n — 2 plane rotations Roy Smith, ECE 210a, 10:14 Rotations QR decompositions Consider the computation effort (in terms of the number of multiplications) Given, AERW" A = QR Gaussian elimination (scaled, partial pivoting): n3/ 3 Gram-Schmidt (classical & modified): n3 Householder: 2713 / 3 Givens: 4713 / 3 Givens is very useful if A is sparse. Roy Smith, ECE 210a, 10:15 Rotations QR decompositions Q1 R1 = Q2 R2 Is the QR decomposition unique? A Define U = ngl ( =Q'2TQ2R2RI1) = Rng1 Note that R2 R1— 1 is also upper-triangular and has positive elements on the diagonal. Consider the first column of U U11 0 U>k1 : . But = 1 2} U11 2 2:1. As R2 Rfl also has positive diagonal elements, um = 1 Roy Smith, ECE 210a, 10:16 QR decomposition QR decompositions Now consider the second column, U12 U22 U*2 = 0 But UEUQ = 0 (orthogonal) => U12 = 0- 0 Again U22 = :|:1 and the positivity of the diagonal of R2R1—1 implies that 1422 = 1. Repeat this argument for the other columns, U=I andso U=Q2TQ1=L This implies that Q; = Qfl = Q? SO Q1 : Q2 and R1 = = : R2_ Roy Smith, ECE 210a, 10:17 Rotations Computational stability Forward stability: Do small errors in the problem imply a Close answer? Very small perturbation matrix: F << F Consider a series of unitary operations, P = Pk . . . P1 “(Pk - - - P1)(A + E)||p = IIPA + PEllp llerrorllp = llPEllp = llEllp << llAllp = llAllp Backward stability: Does the answer correspond to a “Close” problem? For the QR decomposition A = Q R Q+E = Q, R+F = 1%. This is a QR decomposition for some Q R = fl Is A a: A ? Roy Smith, ECE 210a, 10:18 Rotations Computational stability Backward stability: Is A w A ? A = QR = (Q+E)(R+F) QR + QF + ER + EF EF is negligible Now bound each of the error terms: “QFHF = “FIIF “AHF = IIQRIIF = “RHF “ERHF S llEllpllRllp = llEllpllAllp This gives, llA-fillp S “FHF + HEIIFHAIIF + “EHFHFIIF SoAzA Roy Smith, ECE 210a, 10:19 ...
View Full Document

Page1 / 10

ECE210a_lecture10_small - Rotations Rotations (in 2...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online