hw09_prob

.pdf

School

Harvard University *

*We aren’t endorsed by this school

Course

16B

Subject

Mechanical Engineering

Date

Oct 30, 2023

Type

pdf

Pages

6

Uploaded by CorporalKnowledge12458

EECS 16B Designing Information Systems and Devices II UC Berkeley Fall 2023 Homework 9 This homework is due on Saturday, October 28, 2023, at 11:59PM. Self-grades and HW Resubmissions are due on the following Saturday, November 4th, 2023, at 11:59PM. 1. Open-Loop and Closed-Loop Control In last week’s lab-related System ID problem, we built SIXT33N’s motor control circuitry and devel- oped a linear model for the velocity of each wheel. We are one step away from our goal: to have SIXT33N drive in a straight line! We will see how to use the model we developed in the System ID problem to control SIXT33N’s trajectory to be a straight line. More specifically, in this problem, we will explore how to use open-loop and closed-loop control to drive the trajectory of your car in a straight line. Part 1: Open-Loop Control An open-loop controller is one in which the input is predetermined using your system model and the goal, and not adjusted at all during operation. To design an open-loop controller for your car, you would set the PWM duty-cycle value of the left and right wheels (inputs u L [ i ] and u R [ i ] ) such that the predicted velocity of both wheels is your target wheel velocity ( v t ). You can calculate these inputs from the target velocity v t and the θ L , θ R , β L , β R values you learned from data. In the System ID problem and lab, we have modeled the velocity of the left and right wheels as v L [ i ] = d L [ i + 1 ] d L [ i ] = θ L u L [ i ] β L ; (1) v R [ i ] = d R [ i + 1 ] d R [ i ] = θ R u R [ i ] β R (2) where d L , R [ i ] represent the distance traveled by each wheel. (a) Find the open-loop control that would give us v L [ i ] = v R [ i ] = v t . That is, solve the model (Equations ( 1 ) and ( 2 )) for the inputs u L [ i ] and u R [ i ] that make the velocities v L [ i ] = v R [ i ] = v t . 1
EECS 16B Homework 9 2023-10-21 17:17:12-07:00 In practice, the θ L , θ R , β L , β R parameters are learned from noisy data, and so can be wrong. This means that we will calculate the velocities for the two wheels incorrectly. When the velocities of the two wheels disagree, the car will go in a circle instead of a straight line. Thus, to make the car go in a straight line, we need the distances traveled by both wheels to be the same at each timestep. This prompts us to simplify our model. Instead of having two state variables v L and v R , we can just have a state variable determining how far we are from the desired behavior of going in a line – a state which we will want to drive to 0. This prompts us to define our state variable δ to be the difference in the distance traveled by the left wheel and the right wheel at a given timestep: δ [ i ] : = d L [ i ] d R [ i ] (3) We want to find a scalar discrete-time model for δ [ i ] of the form δ [ i + 1 ] = λ OL δ [ i ] + f ( u L [ i ] , u R [ i ]) . (4) Here λ OL is a scalar and f ( u L [ i ] , u R [ i ]) is the control input to the system (as a function of u L [ i ] and u R [ i ] ). (b) Suppose we apply the open-loop control inputs u L [ i ] , u R [ i ] to the original system. Using Equa- tions ( 1 ) and ( 2 ), write δ [ i + 1 ] in terms of δ [ i ] , in the form of Equation ( 4 ). What is the eigen- value λ OL of the model in Equation ( 4 )? Would the model in Equation ( 4 ) be stable with open-loop control if it also had a disturbance term? (HINT: For open-loop control, we set the velocities to v L [ i ] = v R [ i ] = v t . What happens when we substitute that into Equations ( 1 ) and ( 2 ) and then apply the definition of δ [ i ] and δ [ i + 1 ] ?) Part 2: Closed-Loop Control Now, in order to make the car drive straight, we must implement closed-loop control – that is, control inputs that depend on the current state and are calculated dynamically – and use feedback in real time. (c) If we want the car to drive straight starting from some timestep i start > 0 , i.e., v L [ i ] = v R [ i ] for i i start , what condition does this impose on δ [ i ] for i i start ? (d) How is the condition you found in the previous part different from the condition: δ [ i ] = 0, i i start ? (5) Assume that i start > 0, and that d L [ 0 ] = 0, d R [ 0 ] = 0. This is a subtlety that is worth noting and often requires one to adjust things in real systems. (e) From here, assume that we have reset the distance travelled counters at the beginning of this maneuver so that δ [ 0 ] = 0. We will now implement a feedback controller by selecting two dimensionless positive coefficients, f L and f R , such that the closed loop system is stable with eigenvalue λ CL . To implement closed-loop feedback control, we want to adjust v L [ i ] and v R [ i ] at each timestep by an amount that’s proportional to δ [ i ] . Not only do we want our wheel velocities to be some target velocity v t , we also wish to drive δ [ i ] towards zero. This is in order to have the car drive straight along the initial direction it was pointed in when it started moving. If δ [ i ] is positive, the left wheel has traveled more distance than the right wheel, so relatively speaking, we can slow down the left wheel and speed up the right wheel to cancel this difference (i.e., drive it to zero) in the next few timesteps. The action of such a control is captured by the following © UCB EECS 16B, Fall 2023. All Rights Reserved. This may not be publicly shared without explicit permission. 2
EECS 16B Homework 9 2023-10-21 17:17:12-07:00 velocities. v L [ i ] = v t f L δ [ i ] ; (6) v R [ i ] = v t + f R δ [ i ] . (7) Give expressions for u L [ i ] and u R [ i ] as a function of v t , δ [ i ] , f L , f R , and our system parameters θ L . θ R , β L , β R , to achieve the velocities above. (f) Using the control inputs u L [ i ] and u R [ i ] found in part (e), write the closed-loop system equation for δ [ i + 1 ] as a function of δ [ i ] . What is the closed-loop eigenvalue λ CL for this system in terms of λ OL , f L , and f R ? (g) What is the condition on f L and f R for the closed-loop system in the previous part to be stable in the presence of disturbance? Stability in this case means that δ is bounded and will not go arbitrarily high. In fact, if our calculated β and θ are perfectly accurate, then δ [ i ] 0, so the car will (eventually) drive straight! One question remains – what if our calculated β and θ are not perfectly accurate? The answer turns out to be that there is some small steady-state discrepancy that your δ will converge to. You will see how to quantify this in next week’s homework. © UCB EECS 16B, Fall 2023. All Rights Reserved. This may not be publicly shared without explicit permission. 3
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help

Browse Popular Homework Q&A

Q: It's been a great day of new, frictionless snow. Julie starts at the top of the 60° slope with a…
Q: An object (with a mass of 2.3 kg) is moving in uniform circular motion along a horizontal,…
Q: Evaluate the cross product A×B if A = 39, B = 59 and θ = 43°. Evaluate the cross product C×D if C =…
Q: Black smokers are found in the depths of the oceans. Thinking that the conditions in these smokers…
Q: 92 +1.50 μC and mass m2 = = A point charge q₁ = +6.20 µC is held fixed at the origin. A second point…
Q: Find a potential function f for the field F. F = (3y + 2z)i + (3x + 5z)j + (2x + 5y)k A general…
Q: Discuss vulnerability management and how it applies to both the Workstation and LAN Domains. Use a…
Q: An aromatic hydrocarbon has a strong absorption band at 825 cm 1. What structural pattern is…
Q: Give a ✪(·) evaluation for the runtime of the following code: i= n while(i >=1) { for j=1 to n x=x+1…
Q: A. A main group element with the valence electron configuration 3s23p1 is in periodic group It forms…
Q: loop 5. A transformer with 1500 turns in the primary and 300 turns in the secondary is used to…
Q: Computation. An object experiences a force which varies with position as F(x) = ax + 3x³ where a =…
Q: Java byte codes are platform independent   True False
Q: Question 2. (a) Give the definition of a tree. Definition. A tree is a graph that ... (b) Give a…
Q: When two lenses are used in combination, the first one forms an image that then serves as the object…
Q: Preliminary data analysis indicate that it is reasonable to use a  t -test to carry out the…
Q: The acronym, USP, referenced on the Data Analysis page refers to the United States Pharmacopeia.…
Q: Evaluate the following definite integrals: i. ∫0  -1  (xe^(-x2+2)) dx  ii.∫1   0  (x^4+7e^x− 3) dx
Q: Group Member X immediately feels scared around Member Y. When X is around Y, X is reminded of her…
Q: Graph the function ƒ(x) = x³ − 2x and its secant line through the points (-2,-4) and (2,4). - Use…
Q: 1. Declare the following macros (i.e. use #define NOT const) to use as global constants for the…
Q: The table below lists four uniform objects, each with radius R = 0.21 m. Object 2 is selected and…