Designing Information Devices and Systems II Spring 2018 J. Roychowdhury and M. Maharbiz Homework 7

Similar documents
Designing Information Devices and Systems II Fall 2018 Elad Alon and Miki Lustig Homework 9

Designing Information Devices and Systems II Fall 2018 Elad Alon and Miki Lustig Homework 8

Designing Information Devices and Systems II Fall 2018 Elad Alon and Miki Lustig Homework 7

Designing Information Devices and Systems II Spring 2018 J. Roychowdhury and M. Maharbiz Discussion 6B

Designing Information Devices and Systems II Spring 2017 Murat Arcak and Michel Maharbiz Homework 9

Designing Information Devices and Systems II Spring 2018 J. Roychowdhury and M. Maharbiz Homework 5

Designing Information Devices and Systems II Spring 2018 J. Roychowdhury and M. Maharbiz Discussion 8A

Lab 6a: Pole Placement for the Inverted Pendulum

EE 16B Midterm 2, March 21, Name: SID #: Discussion Section and TA: Lab Section and TA: Name of left neighbor: Name of right neighbor:

Designing Information Devices and Systems II Spring 2017 Murat Arcak and Michel Maharbiz Homework 10

Vectors and Coordinate Systems

Analog Signals and Systems and their properties

Topic 1: 2D Motion PHYSICS 231

Introduction to Controls

Designing Information Devices and Systems II Fall 2017 Miki Lustig and Michel Maharbiz Homework 1. This homework is due September 5, 2017, at 11:59AM.

1 (30 pts) Dominant Pole

Designing Information Devices and Systems I Fall 2016 Babak Ayazifar, Vladimir Stojanovic Final Exam

ACM/CMS 107 Linear Analysis & Applications Fall 2016 Assignment 4: Linear ODEs and Control Theory Due: 5th December 2016

MEAM 510 Fall 2012 Bruce D. Kothmann

Designing Information Devices and Systems I Fall 2018 Lecture Notes Note Introduction: Op-amps in Negative Feedback

Circular motion. Aug. 22, 2017

Designing Information Devices and Systems II Fall 2016 Murat Arcak and Michel Maharbiz Homework 0. This homework is due August 29th, 2016, at Noon.

Where we ve been, where we are, and where we are going next.

Automatic Control II Computer exercise 3. LQG Design

Assignments VIII and IX, PHYS 301 (Classical Mechanics) Spring 2014 Due 3/21/14 at start of class

Problem 1: (3 points) Recall that the dot product of two vectors in R 3 is

AP Physics C 2015 Summer Assignment

Chapter 0 of Calculus ++, Differential calculus with several variables

Designing Information Devices and Systems I Spring 2015 Note 3

Calculus/Physics Schedule, Second Semester. Wednesday Calculus

Problem Set 5 Solutions 1

Nonlinear Oscillators: Free Response

STUDY GUIDE 4: Equilibrium, Angular Kinematics, and Dynamics

Linear Algebra (MATH ) Spring 2011 Final Exam Practice Problem Solutions

Physics 200 Lecture 4. Integration. Lecture 4. Physics 200 Laboratory

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Digital Logic

Digital Control: Part 2. ENGI 7825: Control Systems II Andrew Vardy

Designing Information Devices and Systems II Fall 2016 Murat Arcak and Michel Maharbiz Homework 11. This homework is due November 14, 2016, at Noon.

UNIVERSITY OF ALABAMA Department of Physics and Astronomy. PH / LeClair Fall Circuits Exercises

Lab 5a: Pole Placement for the Inverted Pendulum

Designing Information Devices and Systems II Spring 2016 Anant Sahai and Michel Maharbiz Midterm 1

The dynamics of a Mobile Inverted Pendulum (MIP)

MEAM 510 Fall 2011 Bruce D. Kothmann

Today. Why idealized? Idealized physical models of robotic vehicles. Noise. Idealized physical models of robotic vehicles

Gravity Pre-Lab 1. Why do you need an inclined plane to measure the effects due to gravity?

Computer Problems for Methods of Solving Ordinary Differential Equations

Designing Information Devices and Systems I Fall 2018 Homework 5

Designing Information Devices and Systems II Spring 2016 Anant Sahai and Michel Maharbiz Homework 5. This homework is due February 29, 2016, at Noon.

THE REACTION WHEEL PENDULUM

Sin, Cos and All That

Massachusetts Institute of Technology. Department of Electrical Engineering and Computer Science : MULTIVARIABLE CONTROL SYSTEMS by A.

Controls Problems for Qualifying Exam - Spring 2014

Announcements September 19

Physics 8 Monday, October 12, 2015

Multi-Robotic Systems

Rotational motion of a rigid body spinning around a rotational axis ˆn;

In the real world, objects don t just move back and forth in 1-D! Projectile

Designing Information Devices and Systems I Spring 2017 Babak Ayazifar, Vladimir Stojanovic Homework 6

ECEN 420 LINEAR CONTROL SYSTEMS. Lecture 6 Mathematical Representation of Physical Systems II 1/67

Rotational Motion. Figure 1: Torsional harmonic oscillator. The locations of the rotor and fiber are indicated.

Control Systems I. Lecture 6: Poles and Zeros. Readings: Emilio Frazzoli. Institute for Dynamic Systems and Control D-MAVT ETH Zürich

3 Vectors and Two- Dimensional Motion

Physics 351, Spring 2017, Homework #2. Due at start of class, Friday, January 27, 2017

State Feedback and State Estimators Linear System Theory and Design, Chapter 8.

Coordinate Curves for Trajectories

EE16B, Spring 2018 UC Berkeley EECS. Maharbiz and Roychowdhury. Lecture 5B: Open QA Session

Control of Manufacturing Processes

Designing Information Devices and Systems I Summer 2017 D. Aranki, F. Maksimovic, V. Swamy Homework 5

ELEC4631 s Lecture 2: Dynamic Control Systems 7 March Overview of dynamic control systems

Eigenspaces. (c) Find the algebraic multiplicity and the geometric multiplicity for the eigenvaules of A.

Physics 351 Monday, February 26, 2018

Linearization problem. The simplest example

Intelligent Systems and Control Prof. Laxmidhar Behera Indian Institute of Technology, Kanpur

Modeling and Solving Constraints. Erin Catto Blizzard Entertainment

Electric Current & DC Circuits

ME 132, Fall 2015, Quiz # 2

MITOCW free_body_diagrams

Often, in this class, we will analyze a closed-loop feedback control system, and end up with an equation of the form

EDUCATION DAY WORKBOOK

Designing Information Devices and Systems I Babak Ayazifar, Vladimir Stojanovic. This homework is due October 25, 2016, at 1PM.

Chapter 9 Observers, Model-based Controllers 9. Introduction In here we deal with the general case where only a subset of the states, or linear combin

Lab 3: Quanser Hardware and Proportional Control

Course Notes Math 275 Boise State University. Shari Ultman

Sin, Cos and All That

Chapter 7 Control. Part Classical Control. Mobile Robotics - Prof Alonzo Kelly, CMU RI

1. Find the solution of the following uncontrolled linear system. 2 α 1 1

Physics 8 Wednesday, October 11, 2017

Simple Harmonic Motion ===============================================

Control Systems Design

Exam 3 November 19, 2012 Instructor: Timothy Martin

2. Two Dimensional Kinematics

ME 132, Dynamic Systems and Feedback. Class Notes. Spring Instructor: Prof. A Packard

Laboratory Exercise 1 DC servo

2. Relative and Circular Motion

Chapter 7 Control. Part State Space Control. Mobile Robotics - Prof Alonzo Kelly, CMU RI

Chapter 1 Problem 28: Agenda. Quantities in Motion. Displacement Isn t Distance. Velocity. Speed 1/23/14

ECEEN 5448 Fall 2011 Homework #4 Solutions

Designing Information Devices and Systems I Fall 2017 Homework 3

Designing Information Devices and Systems I Spring 2016 Elad Alon, Babak Ayazifar Midterm 2. Exam location: 145 Dwinelle, last SID# 2

(Refer Slide Time: 00:01:30 min)

Transcription:

EECS 6B Designing Information Devices and Systems II Spring 28 J. Roychowdhury and M. Maharbiz Homework 7 This homework is due on Thursday, March 22, 28, at :59AM (NOON). Self-grades are due on Monday, March 26, 28, at :59AM (NOON). Pre-Lab. Closed-Loop Control of SIXT33N Last time, we discovered that open-loop control was not enough to ensure that our car goes straight in the event of model mismatch. In this problem, we will introduce closed-loop control which will hopefully make SIXT33N finally go straight. Previously, we introduced δt = d L t d R t as the difference in positions between the two wheels. If both wheels of the car are going at the same velocity, then this difference δ should remain constant, since no wheel will advance by more ticks than the other. In our closed loop control scheme, we will consider a control scheme which will apply a simple proportional control k L and k R against δt in order to try to prevent δt from growing without bound. We want to achieve the following equations: v L t = d L t + d L t = u L t β L v R t = d R t + d R t = u R t β R v L t = d L t + d L t = v k L δt v R t = d R t + d R t = v + k R δt We can put the equations in the following form to figure out how we should change our control inputs. v L t = d L t + d L t = ( v + β L v R t = d R t + d R t = ( v + β R ) δt k L + k R δt β L ) β R These are our new closed-loop control inputs the new closed-loop proportional control is the k L /k R term. u L t = v + β L u R t = v + β R δt k L δt + k R EECS 6B, Spring 28, Homework 7

(a) Let s examine the feedback proportions k L and k R more closely. Should they be positive or negative? What do they mean? Think about how they interact with δt. If δt >, it means that d L t > d R t, so the left wheel is ahead of the right one. In order to correct for this, we should help the right wheel catch up, and we should do this by making k L > in order to apply less power on the left wheel and k R > in order to apply more power to the right wheel. Likewise, if δt <, it means that d L t < d R t, so the right wheel is ahead of the left one. In this case, k L > is still valid, since k L δt > and so the left wheel speeds up, and likewise k R > is still correct since k R δt < so the right wheel slows down. (b) Let s look a bit more closely at picking k L and k R. First, we need to figure out what happens to δt over time. Find δt + in terms of δt. δt + = d L t + d R t + = v k L δt + d L t (v + k R δt + d R t) = v k L δt + d L t v k R δt d R t = k L δt k R δt + (d L t d R t) = k L δt k R δt + δt = δt( k L k R ) (c) Given your work above, what is the eigenvalue of the system defined by δt? For discrete-time systems like our system, λ (,) is considered stable. Are λ,) and λ (, identical in function for our system? Which one is better? (Hint: Preventing oscillation is a desired benefit.) Based on your choice for the range of λ above, how should we set k L and k R in the end? The eigenvalue is λ = k L k R. As a discrete system, both are stable, but λ (, will cause the car to oscillate due to overly high gain. Therefore, we should choose λ,). As a result, k L k R,) = (k L + k R ) (, means that we should set the gains such that (k L + k R ),). (d) Let s re-introduce the model mismatch from last week in order to model environmental discrepancies, disturbances, etc. How does closed-loop control fare under model mismatch? Find δ ss = δt, assuming that δ = δ. What is δ ss? (To make this easier, you may leave your answer in terms of appropriately defined c and λ obtained from an equation in the form of δt + = δtλ + c.) Check your work by verifying that you reproduce the equation in part (c) if all model mismatch terms are zero. Is it better than the open-loop model mismatch case from last week? v L t = d L t + d L t = ( + )u L t (β L + β L ) v R t = d R t + d R t = ( + )u R t (β R + β R ) EECS 6B, Spring 28, Homework 7 2

u L t = v + β L δt k L u R t = v + β R + k R δt δt + = d L t + d R t + = ( + )u L t (β L + β L ) + d L t (( + )u R t (β R + β R ) + d R t) = u L t β L + u L t β L + d L t ( u R t β R + u R t β R + d R t) = v k L δt + u L t β L + d L t (v + k R δt + u R t β R + d R t) = v k L δt + u L t β L + d L t v k R δt u R t + β R d R t = v v + (d L t d R t) k L δt k R δt + u L t β L u R t + β R = δt( k L k R ) + u L t β L u R t + β R = δt( k L k R ) + ( v + β L k L δt ) ( v + β R δt + k R ) β L + β R = δt( k L k R ) + (v + β L ) δtk L (v + β R ) δtk R β L + β R θ ( ) R = δt k L k R k L k R + (v + β L ) (v + β R ) β L + β R ( ) ( ) ( ) θl = δt k L k R k L k R + (v θr + β L ) β L (v + β R ) β R Let us define c = k L k R k L ( ) ( ) θl (v θr + β L ) β L (v + β R ) β R, and our new eigenvalue λ = k R. In this case, δ = δ λ + c δ2 = λ(δ λ + c) + c δ3 = λ(δ λ 2 + cλ + c) + c δ4 = λ(δ λ 3 + cλ 2 + cλ + c) + c δ5 = δ λ 5 + c(λ 4 + λ 3 + λ 2 + λ + ) δn = δ λ n + c( + λ + λ 2 + λ 3 + λ 4 +... + λ n ) ( n k=λ k ) δn = δ λ n + c (rewriting in sum notation) ( ) λ δn = δ λ n n + c (sum of a geometric series) λ = δ λ 2 + cλ + c = δ λ 3 + cλ 2 + cλ + c = δ λ 4 + cλ 3 + cλ 2 + cλ + c If λ <, then λ =, so those terms drop out: EECS 6B, Spring 28, Homework 7 3

( ) λ δn = t = δ λ + c λ δn = t = c λ δ ss = c λ For your entertainment only: δ ss is fully-expanded form (not required) is ( ) ( ) θl (v θr + β L ) β L (v + β R ) β R k L + k R + k L + k R The answer is correct because plugging in zero into all the model mismatch terms into c causes c =, so δ ss = if there is no model mismatch. Compared to the open-loop result of δ ss = ±, the closed loop δ ss = c is a much-desired improvement. λ What does this mean for the car? It means that the car will turn initially for a bit but eventually converge to a fixed heading and keep going straight from there. Problems 2. Design for Controllability and Observability I We are given a system with tunable parameter γ. x(t) = 3 3 x(t) + u(t) γ 4 x(t) + u(t) y(t) = (a) How should we tune γ to make the system controllable but not observable? The controllability matrix is and the observability matrix is C = B 3 AB = γ C O = =. CA γ 3 Thus, to make the system controllable but not observable, we should choose γ = 2. (b) How should we tune γ to make the system observable but not controllable? To make the system observable but not controllable, we should choose γ =. EECS 6B, Spring 28, Homework 7 4

3. Design for Controllability and Observability II We are given a new system x(t) = x(t). 2 along with only one sensor and one actuator to control and observe the system. (a) Which state should we control with the actuator to make the system controllable? We should control the state x. This makes the control matrix B =, so C =. (b) Which state should we measure with the sensor to make the system observable? We should measure the state x 2. This makes the measurement matrix C =, so O =. 2 4. Observability Consider the following continuous time system. x(t) = A x(t) + B u(t) y(t) = C x(t) We want to construct an estimate z of the system state x. To do so, we construct a pretend system with the same A,B,C models, the same input and the output of the last system along with an L system matrix. We do this to try and exploit the difference between the output of our pretend state and the actual output, with L being the knob that we can control. z(t) = A z(t) + B u(t) + L(C z(t) y(t)) (2) Define e(t) = z(t) x(t). This is the error term as a function of time. (a) Using the two systems defined above, construct a system of the form, Subtracting () from (2), we get the desired answer: d e (t) = (A + LC) e(t) (3) dt z(t) x(t) = A z(t) + B u(t) + L(C z(t) y(t)) A x(t) B u(t) e(t) = A( z(t) x(t)) + L(C z(t) C x(t)) e(t) = A e(t) + LC( z(t) x(t)) e(t) = (A + LC) e(t) () EECS 6B, Spring 28, Homework 7 5

(b) We want What does that imply about (3)? lim e(t) = t This means that we want (3) to be stable: all of the eigenvalues of A+LC should have a real component less than zero. (c) Does the initial value of the guess z() matter in the long term? Not really, since the e(t) tends to. This means that no matter how bad our initial guess, we will eventually have a good estimate. 5. Rank Decomposition In this problem, we will decompose a few images into linear combinations of rank matrices. (a) Consider a standard 8 8 chessboard shown in Figure. Assume that black colors represent and that white colors represent. Figure : 8 8 chessboard. Decompose this image into rank images. Draw out each of these rank images and express the original chessboard as a linear combination of the individual rank images. The chessboard is already a rank image, so we do not need to decompose it further. (b) Assume that the chessboard is given by the following 8 8 matrix C : C = Express C as a linear combination of outer products. EECS 6B, Spring 28, Homework 7 6

Using the result from the previous part, C = (c) For the same chessboard shown in Figure, now assume that black colors represent and that white colors represent. Decompose this image into rank images. Draw out each of these rank images and express the original chessboard as a linear combination of the individual rank images. The chessboard is now a rank 2 image, so we need to decompose it. Image : Image 2: The chessboard equals the sum of image and image 2. EECS 6B, Spring 28, Homework 7 7

(d) Assume that the chessboard is given by the following 8 8 matrix C 2 : C 2 = Express C as a linear combination of outer products. Using the result from the previous part, C 2 = + (e) Now consider the Swiss flag shown in Figure 2. Assume that red colors represent and that white colors represent. Figure 2: Swiss flag. Decompose this image into rank images. Draw out each of these rank images and express the Swiss flag as a linear combination of the individual rank images. The Swiss flag is a rank 2 image, so we need to find two rank images. Solution : Image : EECS 6B, Spring 28, Homework 7 8

Image 2: The Swiss flag equals the sum of image and image 2. Solution 2: Image : Image 2: The Swiss flag equals the difference between image and image 2. EECS 6B, Spring 28, Homework 7 9

(f) Assume that the Swiss flag is given by the following 5 5 matrix S: S = Express S as a linear combination of outer products. We can use the result from the previous part. Solution : S = + Solution 2: S = 6. Balance Justin is working on a small jumping robot named Salto. Salto can bounce around on the ground, but Justin would like Salto to balance on its toe and stand still. In this problem, we ll work on systems that could help Salto balance on its toe using its reaction wheel tail. EECS 6B, Spring 28, Homework 7

Figure 3: Picture of Salto and the x-z physics model. You can watch a video of Salto here: http://www. youtube.com/watch?v=2djmarhrnu Standing on the ground, Salto s dynamics in the x-z plane (called the sagittal plane in biology) look like an inverted pendulum with a flywheel on the end: (I + (m + m 2 )l 2 ) θ = K t u + (m + m 2 )lgsin(θ ) I 2 θ 2 = K t u where θ is the angle of the robot s body relative to the ground ( is straight up), θ is its angular velocity, θ 2 is the angular velocity of the reaction wheel tail, and u is the current input to the tail motor. m,m 2,I,I 2,l,K t are positive constants representing system parameters (masses and angular momentums of the body and tail, leg length, and motor torque constant respectively) and g = 9.8 m s 2 is the acceleration due to gravity. Numerically substituting Salto s physical parameters, the differential equations become approximately:. θ =.25u +.sin(θ ) 5( 5 ) θ 2 =.25u For this problem, we ll look at a reduced suite of sensors on Salto. Our only output will be the tail encoder that measures the angular velocity of the tail relative to the body: y = θ 2 θ (a) Using the state vector. Write the linearized equations as d dt θ θ θ 2, input u, and output y linearize the system about the point x = A x + Bu and y = C x. Write out the matrices with the physical numerical values, not symbolically. Note: Since the tail is like a wheel, we care only about its angular velocity θ 2 and not its angle θ 2. EECS 6B, Spring 28, Homework 7

Numerically, the dynamics are: θ θ θ = θ + 25 u θ 2 θ 2 5 θ y = θ θ 2 For those interested, the symbolic dynamics are: θ (m θ = +m 2 )lgsin(θ) θ I +(m +m 2 )l θ 2 θ + 2 θ 2 θ y = θ θ 2 K t I +(m +m 2 )l 2 K t I 2 u (b) Is the system fully controllable? Is the system fully observable? C = B AB A 2 B 25 = 25 25 5 which is full rank, so the system is fully controllable. C O = CA = CA 2 which is rank 3, so the system is fully observable. (c) Design an observer of the form d dt ˆx = A ˆx + Bu + L(C ˆx y) and solve for the gains in L that make the observer dynamics converge with all eigenvalues λ = λ 2 = λ 3 =. The observer dynamics are dictated by e = (A + LC) e where e is the error between the estimated state ˆx and the true state x. The characteristic polynomial is: det(a + LC) = l l det l 2 l 2 = l 3 l 3 λ 3 + ( l 3 + l 2 )λ 2 + (l )λ + l 3 = EECS 6B, Spring 28, Homework 7 2

The desired characteristic polynomial is: (λ + ) 3 = λ 3 + 3λ 2 + 3λ + = which we can achieve by matching the coefficients of matching powers: l 3 + l 2 = 3 l = 3 l 3 = These equations are solved by the gains: l = 4, l 2 = 4, and l 3 =. Written as a matrix, 4 L = 4 (d) Let s implement a controller for our system using an analog electrical circuit! You can use the following circuit components in Figure 2: Figure 4: Circuit components and block diagram symbols. EECS 6B, Spring 28, Homework 7 3

Using state feedback, Justin has selected the control gains K = 2 5. for his input u = K x. Draw a block diagram in the box in Figure 5 that implements this controller. Afterwards, design the circuit that implements the controller. Use relatively reasonable component values. Optional: What are the eigenvalues of the closed loop dynamics for the given K? Figure 5: Fill in the box to implement the state feedback controller. Figure 6: Here is a possible circuit. Other resistor values will work as long as the gains are the same. Optional: The eigenvalues are λ = 6.6 and λ =.697 ±.87 j. EECS 6B, Spring 28, Homework 7 4

Contributors: Edward Wang. John Maidens. Siddharth Iyer. Titan Yuan. Justin Yim. EECS 6B, Spring 28, Homework 7 5