Professor Fearing EE C128 / ME C134 Problem Set 10 Solution Fall 2010 Jansen Sheng and Wenjie Chen, UC Berkeley

Similar documents
Professor Fearing EE C128 / ME C134 Problem Set 7 Solution Fall 2010 Jansen Sheng and Wenjie Chen, UC Berkeley

1 Steady State Error (30 pts)

1 (30 pts) Dominant Pole

EECS C128/ ME C134 Final Thu. May 14, pm. Closed book. One page, 2 sides of formula sheets. No calculators.

D(s) G(s) A control system design definition

EECS C128/ ME C134 Final Wed. Dec. 15, am. Closed book. Two pages of formula sheets. No calculators.

Professor Fearing EE C128 / ME C134 Problem Set 4 Solution Fall 2010 Jansen Sheng and Wenjie Chen, UC Berkeley. control input. error Controller D(s)

Controls Problems for Qualifying Exam - Spring 2014

5. Observer-based Controller Design

MAE 143B - Homework 8 Solutions

EECS C128/ ME C134 Final Wed. Dec. 14, am. Closed book. One page, 2 sides of formula sheets. No calculators.

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

MAE 143B - Homework 7

Professor Fearing EE C128 / ME C134 Problem Set 2 Solution Fall 2010 Jansen Sheng and Wenjie Chen, UC Berkeley

Course Outline. Higher Order Poles: Example. Higher Order Poles. Amme 3500 : System Dynamics & Control. State Space Design. 1 G(s) = s(s + 2)(s +10)

Topic # Feedback Control Systems

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Science : Dynamic Systems Spring 2011

Root Locus. Motivation Sketching Root Locus Examples. School of Mechanical Engineering Purdue University. ME375 Root Locus - 1

EE221A Linear System Theory Final Exam

H 2 Optimal State Feedback Control Synthesis. Raktim Bhattacharya Aerospace Engineering, Texas A&M University

ME 132, Fall 2017, UC Berkeley, A. Packard 317. G 1 (s) = 3 s + 6, G 2(s) = s + 2

= 0 otherwise. Eu(n) = 0 and Eu(n)u(m) = δ n m

x(n + 1) = Ax(n) and y(n) = Cx(n) + 2v(n) and C = x(0) = ξ 1 ξ 2 Ex(0)x(0) = I

ME 132, Fall 2017, UC Berkeley, A. Packard 334 # 6 # 7 # 13 # 15 # 14

EEE 184: Introduction to feedback systems

EE C128 / ME C134 Midterm Fall 2014

CONTROL DESIGN FOR SET POINT TRACKING

Control System Design

State Regulator. Advanced Control. design of controllers using pole placement and LQ design rules

to have roots with negative real parts, the necessary and sufficient conditions are that:

Control Systems Design

CONTROL SYSTEMS LABORATORY ECE311 LAB 1: The Magnetic Ball Suspension System: Modelling and Simulation Using Matlab

5HC99 Embedded Vision Control. Feedback Control Systems. dr. Dip Goswami Flux Department of Electrical Engineering

Iterative methods to compute center and center-stable manifolds with application to the optimal output regulation problem

EE C128 / ME C134 Final Exam Fall 2014

Time Response Analysis (Part II)

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

DO NOT DO HOMEWORK UNTIL IT IS ASSIGNED. THE ASSIGNMENTS MAY CHANGE UNTIL ANNOUNCED.

Robust Multivariable Control

APPLICATIONS FOR ROBOTICS

ECEEN 5448 Fall 2011 Homework #4 Solutions

ECE 388 Automatic Control

Power System Control

Multivariable Control. Lecture 03. Description of Linear Time Invariant Systems. John T. Wen. September 7, 2006

Topic # Feedback Control. State-Space Systems Closed-loop control using estimators and regulators. Dynamics output feedback

ECE382/ME482 Spring 2005 Homework 1 Solution February 10,

EE363 homework 2 solutions

Topic # Feedback Control Systems

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

Systems Analysis and Control

Optimal Control. Quadratic Functions. Single variable quadratic function: Multi-variable quadratic function:

Systems Analysis and Control

Introduction to Modern Control MT 2016

Transfer function and linearization

EE C128 / ME C134 Fall 2014 HW 6.2 Solutions. HW 6.2 Solutions

Principles of Optimal Control Spring 2008

Modeling and Analysis of Dynamic Systems

ẋ n = f n (x 1,...,x n,u 1,...,u m ) (5) y 1 = g 1 (x 1,...,x n,u 1,...,u m ) (6) y p = g p (x 1,...,x n,u 1,...,u m ) (7)

Control Systems. Laplace domain analysis

Digital Control Systems

Note. Design via State Space

Overview of Bode Plots Transfer function review Piece-wise linear approximations First-order terms Second-order terms (complex poles & zeros)

EE 380. Linear Control Systems. Lecture 10

Department of Electrical and Computer Engineering ECED4601 Digital Control System Lab3 Digital State Space Model

Pole Placement (Bass Gura)

Controllability, Observability, Full State Feedback, Observer Based Control

GATE EE Topic wise Questions SIGNALS & SYSTEMS

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

SAMPLE SOLUTION TO EXAM in MAS501 Control Systems 2 Autumn 2015

School of Mechanical Engineering Purdue University. DC Motor Position Control The block diagram for position control of the servo table is given by:

6 OUTPUT FEEDBACK DESIGN

Homework 1 Solutions

Outline. Classical Control. Lecture 5

ECEN 605 LINEAR SYSTEMS. Lecture 20 Characteristics of Feedback Control Systems II Feedback and Stability 1/27

Control Systems. Frequency domain analysis. L. Lanari

1 Continuous-time Systems

Automatique. A. Hably 1. Commande d un robot mobile. Automatique. A.Hably. Digital implementation

ESC794: Special Topics: Model Predictive Control

Observability. It was the property in Lyapunov stability which allowed us to resolve that

9 Controller Discretization

Module 09 From s-domain to time-domain From ODEs, TFs to State-Space Modern Control

State Space Control D R. T A R E K A. T U T U N J I

Control Systems I. Lecture 4: Diagonalization, Modal Analysis, Intro to Feedback. Readings: Emilio Frazzoli

Control Systems. Time response

Homework Assignment 3

These videos and handouts are supplemental documents of paper X. Li, Z. Huang. An Inverted Classroom Approach to Educate MATLAB in Chemical Process

VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur

ME 234, Lyapunov and Riccati Problems. 1. This problem is to recall some facts and formulae you already know. e Aτ BB e A τ dτ

9. Introduction and Chapter Objectives

Principles of Optimal Control Spring 2008

16.31 Homework 2 Solution

Introduction to Feedback Control

4F3 - Predictive Control

CDS Solutions to Final Exam

Due Wednesday, February 6th EE/MFS 599 HW #5

Homework Solution # 3

Discrete Systems. Step response and pole locations. Mark Cannon. Hilary Term Lecture

Linear System Theory. Wonhee Kim Lecture 1. March 7, 2018

Lecture 4 Continuous time linear quadratic regulator

Time Response of Systems

Transcription:

Professor Fearing EE C28 / ME C34 Problem Set Solution Fall 2 Jansen Sheng and Wenjie Chen, UC Berkeley. (5 pts) Final Value Given the following continuous time (CT) system ẋ = Ax+Bu = 5 9 7 x+ u(t), y = [ ] x, e = r y Find lim t e(t) for input r(t) a unit step and control law u(t) = r(t) y(t). Solution: With the control law u = r y = r Cx, the closed loop system becomes ẋ = Ax+Bu = (A BC)x+Br = 5 9 7 x+ r = Āx+ Br, y = [ ] x = Cx 2 TheclosedlooppolesofthesystemaretheeigenvaluesofĀ,whichare.96±.262i, 8.68. Thus, the closed loop system is stable. For r(t) as a unit step, the steady state error is lim e(t) = (+ CĀ B)r(t) =.5 () t 2. (35 pts) Reduced Order Observer Given the following model of the inverted pendulum [ ] [ ] [ Aaa A ẋ = Ax+Bu = x+ u(t) = ab 4 A ba A bb ] [ b x+ B b ] u(t), y = [ ] x The reduced order observer is given by ẑ c = (A bb TA ab )ẑ b +(B b Tb )u+(a ba TA aa )y, ẑ b = ẑ c +Ty Hand calculate state feedback gains F (i.e., u = F[x ẑ b ] T ) and observer gain T such that the controller has closed loop poles at ± j and the observer has its pole at λ obs = 6. Plot the states and estimated state for closed-loop system with initial condition x = [.rad.rad/sec] T in MATLAB. Solution: The reduced order observer ẑ c = (A bb TA ab )ẑ b +(B b Tb )u+(a ba TA aa )y, ẑ b = ẑ c +Ty can be written as ẑ b = (A bb TA ab )ẑ b +(B b Tb )u+(a ba TA aa )y +Tẏ (2) Since y = [ ] x = x, and ẋ 2 = A ba x +A bb x 2 +B b u, thus ẋ 2 = A ba x +A bb x 2 +B b u Tẏ +Tẏ = A ba x +A bb x 2 +B b u T(A aa x +A ab x 2 +b u)+tẏ = (A bb TA ab )x 2 +(B b Tb )u+(a ba TA aa )y +Tẏ (3)

Define the estimation error as e = ẑ b x 2, yielding ė = ẑ b ẋ 2 = (A bb TA ab )e (4) Thus, with control law u = F[x ẑ b ] T = [f f 2 ][x ẑ b ] T, the closed loop system becomes [ ] x ẋ = Ax+Bu = Ax BF ẑ b [ ] x = Ax BF x 2 +e [ ] = (A BF)x BF e = [ ] [ ] x A BF Bf 2 (5) e Combined with reduced order observer, the overall system becomes [ẋ ] [ ][ ] A BF Bf2 x = ė A bb TA ab e (6) This confirms with Separation Principle that, the closed loop system poles would be the eigenvalues of A BF, and the observer pole is given by the eigenvalue of A bb TA ab. For the closed loop poles at ±j, we have λ (A BF) = λ 4+f λ+f 2 = λ2 +f 2 λ 4+f = (λ++j)(λ+ j) = Thus, F = [f f 2 ] = [6 2]. The observer pole is A bb TA ab = T = λ obs = 6. Thus, T = 6 giving the observer as ẑ c = (A bb TA ab )ẑ b +(B b Tb )u+(a ba TA aa )y = 6ẑ b +u+4y (7) The closed loop system with the reduced order observer in MATLAB Simulink is shown in Fig.. The states and estimated state for this closed loop system with initial condition x = [.rad.rad/sec] T is shown in Fig.2. A = [ ; 4 ]; B = [ ] ; C = [ ]; D = ; x = [..] ; P = [ +i i ] ; F = place(a,b,p); P2 = 6; T = (A(2,2) P2)/A(,2); Ao = P2; Bu = B(2) T B(); By = A(2,) T A(,); sim( pspb2 ); figure (); plot (t,x(:,), b.,t,x(:,2), r.,t,zb, r, LineWidth,); grid on; legend( x, x2, Zb ); xlabel ( Time (sec ), FontSize, 2); ylabel ( States, FontSize, 2); title ( States and Estimated State for u= Fx, x = [..]ˆT ); 2

Clock [ ] Constant r t To Workspace 2 F* u F u C=eye(2) x = Ax+Bu y = Cx+Du State Space x x To Workspace y C* u C=[ ] [x Zb] Zb Ao To Workspace Ao=Abb TAab Bu Zc_dot /s Zc Zb Bu=Bb Tb Integrator By By=Aba TAaa Add T T Figure : Closed Loop System with Observer in MATLAB Simulink pspb2.mdl.6.5 States and Estimated State for u= Fx, x = [..] T x x2 Zb.4.3 States.2...2 2 3 4 5 Figure 2: State and Estimated State for Closed Loop System with x = [.rad.rad/sec] T 3. (5 pts) Discrete Time Control 3

Given the following continuous time (CT) system ẋ = Ax+Bu = [ 2 2 ] [ x+ ] u(t), y = [2 ] x the corresponding discrete time (DT) system is x[n+] = Gx[n]+Hu[n], y[n] = Cx[n] which can be found using the Matlab function c2d(sys,t, zoh ). Solution: a) With initial condition x = [ ], plot the ZIR using Matlab function initial() for the CT system and the DT system (with T =.4 sec). Since the continuous time system is stable (poles in the OLHP), our equivalent discrete time system is also stable (the map G = e AT has poles inside the unit circle). Using the zero order hold approximation, we end up with a discrete time system where x(nt) = x[n]. From Matlab, we have: Part a: Response to Initial Conditions for CT and DT systems 2 CT system DT system.5 Amplitude.5.5 2 3 4 5 6 7 8 9 Figure 3: ZIR from CT and DT systems A = [ ; 2 2]; B = [ ] ; C = [2 ]; D = ; x = [ ] ; T =.4; sys=ss(a,b,c,d); dsys = c2d(sys,t, zoh ); figure (); hold on; initial (sys, r, dsys, b.,x); grid on; legend( CT system, DT system ); title ( Part a: Response to Initial Conditions for CT and DT systems ); 4

b) For output feedback control u = k(r y), sketch the root locus for the equivalent transfer function for the continuous time (CT) system. If u = k(r y), then our new system has dynamics: ẋ = Ax+Bu = Ax+Bk(r y) = Ax+Bk(r Cx) = (A BkC)x+Bkr (8) [ ] [ ] ẋ = x+ r(t), y = [2 ] x 2k 2 k 2 k (9) To determine the closed loop transfer function, notice that we almost have control canonical form except for a scaling factor of k in front of r(t). We can accommodate this easily by scaling the standard control canonical form transfer function by k: Y(s) R(s) = k s+2 s 2 +(k+2)s+2k +2 () This also results in a characteristic equation of: s 2 +(k+2)s+2k +2 = () Rearranging terms, we can put this into a form that is more useful for root locus: s 2 +2s+2+(s+2)k = (2) s+2 +k s 2 +2s+2 = (3) Now we can use Eq. 3 to plot the root locus of our system in MATLAB, which gives:.5 Part b: Root locus for CT system Imaginary Axis.5.5.5 7 6 5 4 3 2 Real Axis Figure 4: Root locus for continuous time system with output feedback 5

cttf=tf ([ 2],[ 2 2]); figure (2); rlocus ( cttf ); title ( Part b: Root locus for CT system ); c) Determine the closed loop pole locations for the CT system for k = 5 and plot the closed-loop step response using Matlab. For k = 5, we have closed loop pole locations given by the solutions of Eq. : Which gives poles at -4 and -3. s 2 +(k +2)s+2k +2 = s 2 +7s+2 = (s+4)(s+3) = (4).9 Part c: Step response for CT system.8.7.6 Amplitude.5.4.3.2. 2 3 4 5 6 7 8 9 Figure 5: Step response for closed loop CT system k=5; t=; A2 = A k B C; B2 = B k; sys2 = ss (A2,B2,C,D); figure (3); step(sys2, t ); title ( Part c: Step response for CT system ); d) The closed loop DT system has state equation x[n+] = (G khc)x[n]+khr[n], y[n] = Cx[n] (which can be found using the Matlab feedback function). Using Matlab, determine the closed loop pole locations for the DT system for k = 5 and sampling period T =.4 sec and plot the step response. From MATLAB, the closed loop pole locations are at.3723 and -.54. Wecan seefromthe responsethat thesystemisunstable. Notethat thisisnotthesameastakingthezohapproximation 6

of the CT system in part c), which would result in a stable system (G = G khc which is not equal to e (A kbc)t) ). Instead, we are closing the feedback loop in the discrete time system and from the root locus we can see that for large k we would get poles outside of the unit circle. 5 Part d: Step response for DT system with T=.4 4 3 Amplitude 2 2 3 2 3 4 5 6 7 8 9 Figure 6: Step response for closed loop DT system k = 5; t = ; T =.4; dsys = c2d(sys,t, zoh ); dsys2 = feedback(k dsys,); pole(dsys2) figure (4); step(dsys2, t ); title ( Part d: Step response for DT system ); e) Use Matlab (iteratively if necessary) to find a sampling period T which gives a closed-loop step response that is reasonably close to the CT closed-loop step response. Determine closed-loop pole locations, and plot the DT step response. We want the discrete time system to match so we lowered the time step to T =.. From MATLAB, the closed loop pole locations are at.7658 and.5365. k = 5; t = ; T =.; dsys = c2d(sys,t, zoh ); dsys2 = feedback(k dsys,); pole(dsys2) figure (5); step(dsys2, t ); title ( Part e: Step response for DT system with T=. ); f) Briefly explain why the CT and DT ZIR responses from a) above are reasonably close, but theclosed loop responsesfromc) andd)(with T =.4 sec) donot agree at all. (Hint, consider e AT.) The responses from a) are reasonably close because c2d(sys,t, zoh ) gives a discrete time system that matches the continuous time input system (in this case, the zoh approximation). 7

Part e: Step response for DT system with T=..9.8.7 Amplitude.6.5.4.3.2. 2 3 4 5 6 7 8 9 Figure 7: Step response for closed loop DT system with T =. However, under the output feedback in parts c) and d), the T value affects the G = e AT term in the discrete approximation. The output feedback G = G khc has poles that depend on both T and k. For large enough values of T, the poles of the discrete system grow outside of the unit circle and can potentially result in an unstable system. 8