Lecture 10. Numerical Solution in Matlab

Size: px
Start display at page:

Download "Lecture 10. Numerical Solution in Matlab"

Transcription

1 6. Lecture Numerical Solution in Matlab

2 Spr 6 6. Numerical Solutions Most of the problems of interest so far have been complicated by the need to solve a two point boundary value problem. That plus the dynamics are nonlinear Numerous solution techniques exist, including shooting methods and collocation Will discuss the details on these later, but for now, let us look at how to solve these use existing codes Exists a Matlab code called BVP4C that is part of the standard package. Solves problems of a standard form : ẏ = f (y, t, p) a t b where y are the variables of interest, and p are extra variables in the problem that can also be optimized Where the system is subject to the boundary conditions: g(y(a), y(b)) = The solution is an approximation S(t) that is a continuous function that is a cubic polynomial on sub intervals [t n, t n+ ] of a mesh a = t < t <... < t n < t n = b This approximation satisfies the boundary conditions, so that: g(s(a), S(b)) = And it satisfies the differential equations (collocates) at both ends and the mid point of each subinterval: Ṡ(t n ) = f (S(t n ), t n ) Ṡ((t n + t n+ )/) = f (S((t n + t n+ )/), (t n + t n+ )/) Ṡ(t n+ ) = f (S(t n+ ), t n+ )

3 Spr 6 6. Now constrain continuity in the solution at the mesh points converts problem to a series of nonlinear algebraic equations in the unknowns Becomes a root finding problem that can be solved iteratively (Simpson s method). Inputs to BVP4C are funcitons that evaluate the differential equation ẏ = f (y, t) and the residual of the boundary condition (e.g. y (a) =, y (a) = y (b), and y (b) = ): function res = bvpbc(ya, yb) res = [ ya() ya() yb() yb()]; Redo example on page 4 5 using numerical techniques Finite time LQR problem with t f =.4 Dynamic Gains LQR x. LQR x Num x Num x.8.6 States (sec) Figure : Results suggest a good comparison with the dynamic LQR result

4 Spr 6 6. TPBVP for LQR function m = TPBVPlqr(p,p,p) global A B x Rxx Ruu Ptf t_f=;x=[ ] ; Rxx=p;Ruu=p;Ptf=p; solinit = bvpinit(linspace(,t_f),@tpbvplqrinit); sol = bvp4c(@tpbvplqrode,@tpbvplqrbc,solinit); time = sol.x; state = sol.y([ ],:); adjoint = sol.y([ 4],:); control = inv(ruu)*b *sol.y([ 4],:); m(,:) = time; m([ ],:) = state; m([4 5],:) = adjoint; m(6,:) = control; % function dydt=tpbvplqrode(t,y) global A B x Rxx Ruu Ptf dydt=[ A B/Ruu*B ; Rxx A ]*y; % function res=tpbvplqrbc(ya,yb) global A B x Rxx Ruu Ptf res=[ya() x();ya() x();yb(:4) Ptf*yb(:)]; % function v=tpbvplqrinit(t) global A B x b alp v=[x;;]; return % redo LQR example on page 4 5 using numerical approaches % global A B Ptf=[ ; 4];Rxx=[ ; ];Ruu=; A=[ ; ];B=[ ] ; tf=;dt=.;time=[:dt:tf]; m=tpbvplqr(rxx,ruu,ptf); % integrate the P backwards P=zeros(,,length(time));K=zeros(,,length(time)); Pcurr=Ptf; for kk=:length(time) P(:,:,length(time) kk)=pcurr; K(:,:,length(time) kk)=inv(ruu)*b *Pcurr; Pdot= Pcurr*A A *Pcurr Rxx+Pcurr*B*inv(Ruu)*B *Pcurr; Pcurr=Pcurr dt*pdot; end x=zeros(,,length(time)); xcurr=[ ] ; for kk=:length(time) x(:,:,kk)=xcurr; xdot=(a B*K(:,:,kk))*x(:,:,kk); xcurr=xcurr+xdot*dt; end figure();clf plot(time,squeeze(x(,,:)),time,squeeze(x(,,:)),, LineWidth,), xlabel( (sec) );ylabel( States );title( Dynamic Gains ) hold on;plot(m(,:),m([],:), s,m(,:),m([],:), o );hold off legend( LQR x_, LQR x_, Num x_, Num x_ ) print depsc reg_.eps;jpdf( reg_ )

5 Spr 6 Conversion 6. 4 BVP4C sounds good, but this standard form doesn t match many of the problems that we care about In particular, free end time problems are excluded, because the time period is defined to be fixed t [a, b] Can convert our problems of interest into this standard form though using some pretty handy tricks. U. Ascher and R. D. Russell, Reformulation of Boundary Value Problems into Standard Form, SIAM Review, Vol., No., Apr., 98. Key step is to re scale time so that τ = t/t f, then τ [, ]. Implications of this scaling are that the derivatives must be changed since dτ = dt/t f d d dτ = t f dt Final step is to introduce a dummy state r that corresponds to t f with the trivial dynamics ṙ =. Now replace all instances of t f in the necessary/boundary conditions for state r. The optimizer will then just pick an appropriate constant for r = t f

6 Spr Recall that our basic set of necessary conditions are, for t [t, t f ] ẋ = a(x, u, t) ṗ = H T x H u = And we considered various boundary conditions x(t ) = x, and: If t f is free: h t + g + p T a = h t + H(t f ) = If x i (t f ) is fixed, then x i (t f ) = x if h If x i (t f ) is free, then p i (t f ) = (t f ) x i Then and ẋ = a(x, u, t) x = t f a(x, u, τ ) ṗ = H T x p = t f H T x

7 Spr 6 Example: 6. 6 Revisit example on page 6 4 (results/code have been updated) Linear system with performance/time weighting and free end time Necessary conditions are: with state conditions ẋ = Ax + Bu ṗ = A T p [ ] = bu + p x () = x () = x (t f ) = x (t f ) =.5bu (t f ) + αt f = Define the state of interest z = [x T p T r] T and note that with BC: dz dz = t f dτ dt [ ] A B /b = z 5 A T z z = f (z) which is nonlinear z () = z () = z () = z () =.5 z4 () + αz 5 () = b

8 Spr Code given on following pages Note it is not particularly complicated Solution time/iteration count is a strong function of the initial solution not a particularly good choice for p is used here Analytic solution gave t f = (8b/α) /5 Numerical result give close agreement in prediction of the final time 8 7 Comparison with b=. Analytic Numerical 6 5 t f 4 α Figure : Comparison of the predicted completion times for the maneuver

9 Spr u(t) u Analytic (t) U Numerical 4 x Analytic Figure : Control Inputs 8 Analytic Numerical Analytic Numerical X(t) 6 4 dx(t)/dt x 8 x 7 Error Error Figure 4: State response

10 Spr TPBVP function m = TPBVP(p,p) global A B x b alp 4 A=[ ; ]; 5 B=[ ] ; 6 x=[ ] ; 7 b=p; 8 alp=p; 9 solinit = bvpinit(linspace(,),@tpbvpinit); sol = bvp4c(@tpbvpode,@tpbvpbc,solinit); 4 time = sol.y(5)*sol.x; 5 state = sol.y([ ],:); 6 adjoint = sol.y([ 4],:); 7 control = (/b)*sol.y(4,:); 8 m(,:) = time; 9 m([ ],:) = state; m([4 5],:) = adjoint; m(6,:) = control; % 4 function dydt=tpbvpode(t,y) 5 global A B x b alp 6 7 dydt=y(5)*[ A B*[ ]/b zeros(,); zeros(,) A zeros(,);zeros(,5)]*y; 8 9 % function res=tpbvpbc(ya,yb) global A B x b alp res=[ya() x();ya() x();yb();yb();.5*yb(4)^/b+ alp*yb(5)]; 4 5 % 6 function v=tpbvpinit(t) 7 global A B x b alp 8 v=[x;;;]; 9 4 return 4

11 Spr 6 6. TPBVP Main %main program % b=.; %alp=[.5. ]; alp=logspace(,,); t=[]; for alpha=alp m=tpbvp(b,alpha); t=[t;m(,end)]; end figure();clf semilogx(alp,(8*b./alp).^.,, Linewidth,) hold on;semilogx(alp,t, rs );hold off xlabel( \alpha, FontSize,);ylabel( t_f, FontSize,) legend( Analytic, Numerical ) title( Comparison with b=. ) print depsc f TPBVP.eps;jpdf( TPBVP ) % code from opt.m on the analytic solution b=.;alpha=.; m=tpbvp(b,alpha); tf=(8*b/alpha)^.; c=*b/tf^; c=6*b/tf^; u=( c+c*m(,:))/b; A=[ ; ];B=[ ] ;C=eye();D=zeros(,);G=ss(A,B,C,D);X=[ ] ; [y,t]=lsim(g,u,m(,:),x); figure();clf subplot() plot(m(,:),u, g, LineWidth,); xlabel(, FontSize,);ylabel( u(t), FontSize,) hold on;plot(m(,:),m(6,:), );hold off subplot() plot(m(,:),abs(u m(6,:)), ) xlabel(, FontSize,) ylabel( u_{analytic}(t) U_{Numerical}, FontSize,) legend( Analytic, Numerical ) print depsc f TPBVP.eps;jpdf( TPBVP ) figure();clf subplot() plot(m(,:),y(:,),, LineWidth,); xlabel(, FontSize,);ylabel( X(t), FontSize,) hold on;plot(m(,:),m([],:), k );hold off legend( Analytic, Numerical ) subplot() plot(m(,:),y(:,),, LineWidth,); xlabel(, FontSize,);ylabel( dx(t)/dt, FontSize,) hold on;plot(m(,:),m([],:), k );hold off legend( Analytic, Numerical ) subplot() plot(m(,:),abs(y(:,) m(,:) ), ) xlabel(, FontSize,);ylabel( Error, FontSize,) subplot(4) plot(m(,:),abs(y(:,) m(,:) ), ) xlabel(, FontSize,);ylabel( Error, FontSize,) print depsc f TPBVP.eps;jpdf( TPBVP )

Principles of Optimal Control Spring 2008

Principles of Optimal Control Spring 2008 MIT OpenCourseWare http://ocw.mit.edu 16.33 Principles of Optimal Control Spring 008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. 16.33 Lecture 7 Numerical

More information

Principles of Optimal Control Spring 2008

Principles of Optimal Control Spring 2008 MIT OpenCourseWare http://ocw.mit.edu 16.323 Principles of Optimal Control Spring 2008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. 16.323 Lecture

More information

Principles of Optimal Control Spring 2008

Principles of Optimal Control Spring 2008 MIT OpenCourseWare http://ocw.mit.edu 16.323 Principles of Optimal Control Spring 2008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. 16.323 Lecture

More information

Solving optimal control problems with MATLAB Indirect methods

Solving optimal control problems with MATLAB Indirect methods Solving optimal control problems with MATLAB Indirect methods Xuezhong Wang 1 Introduction The theory of optimal control has been well developed for over forty years. With the advances of computer technique,

More information

Topic # Feedback Control

Topic # Feedback Control Topic #7 16.31 Feedback Control State-Space Systems What are state-space models? Why should we use them? How are they related to the transfer functions used in classical control design and how do we develop

More information

Topic # Feedback Control Systems

Topic # Feedback Control Systems Topic #14 16.31 Feedback Control Systems State-Space Systems Full-state Feedback Control How do we change the poles of the state-space system? Or, even if we can change the pole locations. Where do we

More information

MAE143A Signals & Systems - Homework 5, Winter 2013 due by the end of class Tuesday February 12, 2013.

MAE143A Signals & Systems - Homework 5, Winter 2013 due by the end of class Tuesday February 12, 2013. MAE43A Signals & Systems - Homework 5, Winter 23 due by the end of class Tuesday February 2, 23. If left under my door, then straight to the recycling bin with it. This week s homework will be a refresher

More information

Topic # Feedback Control Systems

Topic # Feedback Control Systems Topic #17 16.31 Feedback Control Systems Deterministic LQR Optimal control and the Riccati equation Weight Selection Fall 2007 16.31 17 1 Linear Quadratic Regulator (LQR) Have seen the solutions to the

More information

EE363 homework 2 solutions

EE363 homework 2 solutions EE363 Prof. S. Boyd EE363 homework 2 solutions. Derivative of matrix inverse. Suppose that X : R R n n, and that X(t is invertible. Show that ( d d dt X(t = X(t dt X(t X(t. Hint: differentiate X(tX(t =

More information

Topic # Feedback Control Systems

Topic # Feedback Control Systems Topic #16 16.31 Feedback Control Systems State-Space Systems Closed-loop control using estimators and regulators. Dynamics output feedback Back to reality Fall 2007 16.31 16 1 Combined Estimators and Regulators

More information

Solution to Homework Assignment 1

Solution to Homework Assignment 1 ECE602 Fall 2008 Homework Solution September 2, 2008 Solution to Homework Assignment. Consider the two-input two-output system described by D (p)y (t)+d 2 (p)y 2 (t) N (p)u (t)+n 2 (p)u 2 (t) D 2 (p)y

More information

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

Professor Fearing EE C128 / ME C134 Problem Set 7 Solution Fall 2010 Jansen Sheng and Wenjie Chen, UC Berkeley Professor Fearing EE C8 / ME C34 Problem Set 7 Solution Fall Jansen Sheng and Wenjie Chen, UC Berkeley. 35 pts Lag compensation. For open loop plant Gs ss+5s+8 a Find compensator gain Ds k such that the

More information

Chapter 12 Ramsey Cass Koopmans model

Chapter 12 Ramsey Cass Koopmans model Chapter 12 Ramsey Cass Koopmans model O. Afonso, P. B. Vasconcelos Computational Economics: a concise introduction O. Afonso, P. B. Vasconcelos Computational Economics 1 / 33 Overview 1 Introduction 2

More information

Lecture 21: Numerical Solution of Differential Equations

Lecture 21: Numerical Solution of Differential Equations cs41: introduction to numerical analysis 11/30/10 Lecture 1: Numerical Solution of Differential Equations Instructor: Professor Amos Ron Scribes: Yunpeng Li, Mark Cowlishaw, Nathanael Fillmore 1 Introduction

More information

Mechanics of Structures (CE130N) Lab 3

Mechanics of Structures (CE130N) Lab 3 UNIVERSITY OF CALIFORNIA AT BERKELEY CE 130N, Spring 2009 Department of Civil and Environmental Engineering Prof. S. Govindjee and Dr. T. Koyama Structural Engineering, Mechanics and Materials Lab 3 1

More information

Problem 1 Cost of an Infinite Horizon LQR

Problem 1 Cost of an Infinite Horizon LQR THE UNIVERSITY OF TEXAS AT SAN ANTONIO EE 5243 INTRODUCTION TO CYBER-PHYSICAL SYSTEMS H O M E W O R K # 5 Ahmad F. Taha October 12, 215 Homework Instructions: 1. Type your solutions in the LATEX homework

More information

Solutions. Chapter 5. Problem 5.1. Solution. Consider the driven, two-well Duffing s oscillator. which can be written in state variable form as

Solutions. Chapter 5. Problem 5.1. Solution. Consider the driven, two-well Duffing s oscillator. which can be written in state variable form as Chapter 5 Solutions Problem 5.1 Consider the driven, two-well Duffing s oscillator which can be written in state variable form as ẍ + ɛγẋ x + x 3 = ɛf cos(ωt) ẋ = v v = x x 3 + ɛ( γv + F cos(ωt)). In the

More information

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

H 2 Optimal State Feedback Control Synthesis. Raktim Bhattacharya Aerospace Engineering, Texas A&M University H 2 Optimal State Feedback Control Synthesis Raktim Bhattacharya Aerospace Engineering, Texas A&M University Motivation Motivation w(t) u(t) G K y(t) z(t) w(t) are exogenous signals reference, process

More information

Core Concepts Review. Orthogonality of Complex Sinusoids Consider two (possibly non-harmonic) complex sinusoids

Core Concepts Review. Orthogonality of Complex Sinusoids Consider two (possibly non-harmonic) complex sinusoids Overview of Continuous-Time Fourier Transform Topics Definition Compare & contrast with Laplace transform Conditions for existence Relationship to LTI systems Examples Ideal lowpass filters Relationship

More information

ECEEN 5448 Fall 2011 Homework #4 Solutions

ECEEN 5448 Fall 2011 Homework #4 Solutions ECEEN 5448 Fall 2 Homework #4 Solutions Professor David G. Meyer Novemeber 29, 2. The state-space realization is A = [ [ ; b = ; c = [ which describes, of course, a free mass (in normalized units) with

More information

Topic # /31 Feedback Control Systems

Topic # /31 Feedback Control Systems Topic #7 16.30/31 Feedback Control Systems State-Space Systems What are the basic properties of a state-space model, and how do we analyze these? Time Domain Interpretations System Modes Fall 2010 16.30/31

More information

Static and Dynamic Optimization (42111)

Static and Dynamic Optimization (42111) Static and Dynamic Optimization (42111) Niels Kjølstad Poulsen Build. 303b, room 016 Section for Dynamical Systems Dept. of Applied Mathematics and Computer Science The Technical University of Denmark

More information

Classical Numerical Methods to Solve Optimal Control Problems

Classical Numerical Methods to Solve Optimal Control Problems Lecture 26 Classical Numerical Methods to Solve Optimal Control Problems Dr. Radhakant Padhi Asst. Professor Dept. of Aerospace Engineering Indian Institute of Science - Bangalore Necessary Conditions

More information

Definition of Dynamic System

Definition of Dynamic System Capitolo 0. INTRODUCTION 1.1 Definition of Dynamic System There are various types of dynamic systems: continuous-time, discrete-time, linear, non-linear, lumped systems, distributed systems, finite states,

More information

MAE 143B - Homework 7

MAE 143B - Homework 7 MAE 143B - Homework 7 6.7 Multiplying the first ODE by m u and subtracting the product of the second ODE with m s, we get m s m u (ẍ s ẍ i ) + m u b s (ẋ s ẋ u ) + m u k s (x s x u ) + m s b s (ẋ s ẋ u

More information

EN Applied Optimal Control Lecture 8: Dynamic Programming October 10, 2018

EN Applied Optimal Control Lecture 8: Dynamic Programming October 10, 2018 EN530.603 Applied Optimal Control Lecture 8: Dynamic Programming October 0, 08 Lecturer: Marin Kobilarov Dynamic Programming (DP) is conerned with the computation of an optimal policy, i.e. an optimal

More information

Numerical algorithms for one and two target optimal controls

Numerical algorithms for one and two target optimal controls Numerical algorithms for one and two target optimal controls Sung-Sik Kwon Department of Mathematics and Computer Science, North Carolina Central University 80 Fayetteville St. Durham, NC 27707 Email:

More information

1 Steady State Error (30 pts)

1 Steady State Error (30 pts) Professor Fearing EECS C28/ME C34 Problem Set Fall 2 Steady State Error (3 pts) Given the following continuous time (CT) system ] ẋ = A x + B u = x + 2 7 ] u(t), y = ] x () a) Given error e(t) = r(t) y(t)

More information

Collocation approximation of the monodromy operator of periodic, linear DDEs

Collocation approximation of the monodromy operator of periodic, linear DDEs p. Collocation approximation of the monodromy operator of periodic, linear DDEs Ed Bueler 1, Victoria Averina 2, and Eric Butcher 3 13 July, 2004 SIAM Annual Meeting 2004, Portland 1=Dept. of Math. Sci.,

More information

Homework Assignment 3

Homework Assignment 3 ECE382/ME482 Fall 2008 Homework 3 Solution October 20, 2008 1 Homework Assignment 3 Assigned September 30, 2008. Due in lecture October 7, 2008. Note that you must include all of your work to obtain full

More information

A Gauss Lobatto quadrature method for solving optimal control problems

A Gauss Lobatto quadrature method for solving optimal control problems ANZIAM J. 47 (EMAC2005) pp.c101 C115, 2006 C101 A Gauss Lobatto quadrature method for solving optimal control problems P. Williams (Received 29 August 2005; revised 13 July 2006) Abstract This paper proposes

More information

Assignment 4 Solutions Continuous-Time Fourier Transform

Assignment 4 Solutions Continuous-Time Fourier Transform Assignment 4 Solutions Continuous-Time Fourier Transform ECE 3 Signals and Systems II Version 1.01 Spring 006 1. Properties of complex numbers. Let c 1 α 1 + jβ 1 and c α + jβ be two complex numbers. a.

More information

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

Professor Fearing EE C128 / ME C134 Problem Set 10 Solution Fall 2010 Jansen Sheng and Wenjie Chen, UC Berkeley 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

More information

Control Systems Design

Control Systems Design ELEC4410 Control Systems Design Lecture 18: State Feedback Tracking and State Estimation Julio H. Braslavsky julio@ee.newcastle.edu.au School of Electrical Engineering and Computer Science Lecture 18:

More information

Principles of Optimal Control Spring 2008

Principles of Optimal Control Spring 2008 MIT OpenCourseWare http://ocw.mit.edu 16.323 Principles of Optimal Control Spring 2008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. 16.323 Lecture

More information

Homework Solution # 3

Homework Solution # 3 ECSE 644 Optimal Control Feb, 4 Due: Feb 17, 4 (Tuesday) Homework Solution # 3 1 (5%) Consider the discrete nonlinear control system in Homework # For the optimal control and trajectory that you have found

More information

Experiment 1: Linear Regression

Experiment 1: Linear Regression Experiment 1: Linear Regression August 27, 2018 1 Description This first exercise will give you practice with linear regression. These exercises have been extensively tested with Matlab, but they should

More information

Optimal Control. Lecture 18. Hamilton-Jacobi-Bellman Equation, Cont. John T. Wen. March 29, Ref: Bryson & Ho Chapter 4.

Optimal Control. Lecture 18. Hamilton-Jacobi-Bellman Equation, Cont. John T. Wen. March 29, Ref: Bryson & Ho Chapter 4. Optimal Control Lecture 18 Hamilton-Jacobi-Bellman Equation, Cont. John T. Wen Ref: Bryson & Ho Chapter 4. March 29, 2004 Outline Hamilton-Jacobi-Bellman (HJB) Equation Iterative solution of HJB Equation

More information

arxiv: v2 [math.na] 21 May 2018

arxiv: v2 [math.na] 21 May 2018 SHORT-MT: Optimal Solution of Linear Ordinary Differential Equations by Conjugate Gradient Method arxiv:1805.01085v2 [math.na] 21 May 2018 Wenqiang Yang 1, Wenyuan Wu 1, and Robert M. Corless 2 1 Chongqing

More information

Principles of Optimal Control Spring 2008

Principles of Optimal Control Spring 2008 MIT OpenCourseWare http://ocw.mit.edu 16.33 Principles of Optimal Control Spring 008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. 16.33 Lecture Nonlinear

More information

1.2 Derivation. d p f = d p f(x(p)) = x fd p x (= f x x p ). (1) Second, g x x p + g p = 0. d p f = f x g 1. The expression f x gx

1.2 Derivation. d p f = d p f(x(p)) = x fd p x (= f x x p ). (1) Second, g x x p + g p = 0. d p f = f x g 1. The expression f x gx PDE-constrained optimization and the adjoint method Andrew M. Bradley November 16, 21 PDE-constrained optimization and the adjoint method for solving these and related problems appear in a wide range of

More information

Lecture 4 Continuous time linear quadratic regulator

Lecture 4 Continuous time linear quadratic regulator EE363 Winter 2008-09 Lecture 4 Continuous time linear quadratic regulator continuous-time LQR problem dynamic programming solution Hamiltonian system and two point boundary value problem infinite horizon

More information

1. Type your solutions. This homework is mainly a programming assignment.

1. Type your solutions. This homework is mainly a programming assignment. THE UNIVERSITY OF TEXAS AT SAN ANTONIO EE 5243 INTRODUCTION TO CYBER-PHYSICAL SYSTEMS H O M E W O R K S # 6 + 7 Ahmad F. Taha October 22, 2015 READ Homework Instructions: 1. Type your solutions. This homework

More information

Problem Set 9 Solutions

Problem Set 9 Solutions Problem Set 9 Solutions EE23: Digital Signal Processing. From Figure below, we see that the DTFT of the windowed sequence approaches the actual DTFT as the window size increases. Gibb s phenomenon is absent

More information

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

to have roots with negative real parts, the necessary and sufficient conditions are that: THE UNIVERSITY OF TEXAS AT SAN ANTONIO EE 543 LINEAR SYSTEMS AND CONTROL H O M E W O R K # 7 Sebastian A. Nugroho November 6, 7 Due date of the homework is: Sunday, November 6th @ :59pm.. The following

More information

Scientific Computing with Case Studies SIAM Press, Lecture Notes for Unit V Solution of

Scientific Computing with Case Studies SIAM Press, Lecture Notes for Unit V Solution of Scientific Computing with Case Studies SIAM Press, 2009 http://www.cs.umd.edu/users/oleary/sccswebpage Lecture Notes for Unit V Solution of Differential Equations Part 1 Dianne P. O Leary c 2008 1 The

More information

2D Plotting with Matlab

2D Plotting with Matlab GEEN 1300 Introduction to Engineering Computing Class Meeting #22 Monday, Nov. 9 th Engineering Computing and Problem Solving with Matlab 2-D plotting with Matlab Script files User-defined functions Matlab

More information

6 OUTPUT FEEDBACK DESIGN

6 OUTPUT FEEDBACK DESIGN 6 OUTPUT FEEDBACK DESIGN When the whole sate vector is not available for feedback, i.e, we can measure only y = Cx. 6.1 Review of observer design Recall from the first class in linear systems that a simple

More information

Lecture 17: variance in a band = log(s xx (f)) df (2) If we want to plot something that is more directly representative of variance, we can try this:

Lecture 17: variance in a band = log(s xx (f)) df (2) If we want to plot something that is more directly representative of variance, we can try this: UCSD SIOC 221A: (Gille) 1 Lecture 17: Recap We ve now spent some time looking closely at coherence and how to assign uncertainties to coherence. Can we think about coherence in a different way? There are

More information

Solving ODEs and PDEs in MATLAB. Sören Boettcher

Solving ODEs and PDEs in MATLAB. Sören Boettcher 16.02.2009 Introduction Quick introduction to syntax ODE in the form of Initial Value Problems (IVP) what equations can handle how to code into how to choose the right solver how to get the solver to do

More information

1 Introduction & Objective

1 Introduction & Objective Signal Processing First Lab 13: Numerical Evaluation of Fourier Series Pre-Lab and Warm-Up: You should read at least the Pre-Lab and Warm-up sections of this lab assignment and go over all exercises in

More information

Solutions. Chapter 1. Problem 1.1. Solution. Simulate free response of damped harmonic oscillator

Solutions. Chapter 1. Problem 1.1. Solution. Simulate free response of damped harmonic oscillator Chapter Solutions Problem. Simulate free response of damped harmonic oscillator ẍ + ζẋ + x = for different values of damping ration ζ and initial conditions. Plot the response x(t) and ẋ(t) versus t and

More information

OPTIMAL CONTROL. Sadegh Bolouki. Lecture slides for ECE 515. University of Illinois, Urbana-Champaign. Fall S. Bolouki (UIUC) 1 / 28

OPTIMAL CONTROL. Sadegh Bolouki. Lecture slides for ECE 515. University of Illinois, Urbana-Champaign. Fall S. Bolouki (UIUC) 1 / 28 OPTIMAL CONTROL Sadegh Bolouki Lecture slides for ECE 515 University of Illinois, Urbana-Champaign Fall 2016 S. Bolouki (UIUC) 1 / 28 (Example from Optimal Control Theory, Kirk) Objective: To get from

More information

Principles of Optimal Control Spring 2008

Principles of Optimal Control Spring 2008 MIT OpenCourseWare http://ocw.it.edu 16.323 Principles of Optial Control Spring 2008 For inforation about citing these aterials or our Ters of Use, visit: http://ocw.it.edu/ters. 16.323 Lecture 10 Singular

More information

Introduction to Modern Control MT 2016

Introduction to Modern Control MT 2016 CDT Autonomous and Intelligent Machines & Systems Introduction to Modern Control MT 2016 Alessandro Abate Lecture 2 First-order ordinary differential equations (ODE) Solution of a linear ODE Hints to nonlinear

More information

MODERN CONTROL DESIGN

MODERN CONTROL DESIGN CHAPTER 8 MODERN CONTROL DESIGN The classical design techniques of Chapters 6 and 7 are based on the root-locus and frequency response that utilize only the plant output for feedback with a dynamic controller

More information

Graded Project #1. Part 1. Explicit Runge Kutta methods. Goals Differential Equations FMN130 Gustaf Söderlind and Carmen Arévalo

Graded Project #1. Part 1. Explicit Runge Kutta methods. Goals Differential Equations FMN130 Gustaf Söderlind and Carmen Arévalo 2008-11-07 Graded Project #1 Differential Equations FMN130 Gustaf Söderlind and Carmen Arévalo This homework is due to be handed in on Wednesday 12 November 2008 before 13:00 in the post box of the numerical

More information

Transfer function and linearization

Transfer function and linearization Transfer function and linearization Daniele Carnevale Dipartimento di Ing. Civile ed Ing. Informatica (DICII), University of Rome Tor Vergata Corso di Controlli Automatici, A.A. 24-25 Testo del corso:

More information

The Linear Shooting Method -(8.4)

The Linear Shooting Method -(8.4) The Linear Shooting Method -(8.4) Consider the boundary value problems (BVPs) for the second order differential equation of the form (*) y fx,y,y, a x b, ya and yb. Under what conditions a boundary value

More information

Control Systems Design, SC4026. SC4026 Fall 2009, dr. A. Abate, DCSC, TU Delft

Control Systems Design, SC4026. SC4026 Fall 2009, dr. A. Abate, DCSC, TU Delft Control Systems Design, SC4026 SC4026 Fall 2009, dr. A. Abate, DCSC, TU Delft Lecture 4 Controllability (a.k.a. Reachability) vs Observability Algebraic Tests (Kalman rank condition & Hautus test) A few

More information

EE364b Homework 4. L(y,ν) = (1/2) y x ν(1 T y 1), minimize (1/2) y x 2 2 subject to y 0, 1 T y = 1,

EE364b Homework 4. L(y,ν) = (1/2) y x ν(1 T y 1), minimize (1/2) y x 2 2 subject to y 0, 1 T y = 1, EE364b Prof. S. Boyd EE364b Homework 4 1. Projection onto the probability simplex. In this problem you will work out a simple method for finding the Euclidean projection y of x R n onto the probability

More information

Using an adaptive FEM to determine the optimal control of a vehicle during a collision avoidance manoeuvre

Using an adaptive FEM to determine the optimal control of a vehicle during a collision avoidance manoeuvre PREPRINT 2007:42 Using an adaptive FEM to determine the optimal control of a vehicle during a collision avoidance manoeuvre KARIN KRAFT STIG LARSSON MATHIAS LIDBERG Department of Mathematical Sciences

More information

EE C128 / ME C134 Final Exam Fall 2014

EE C128 / ME C134 Final Exam Fall 2014 EE C128 / ME C134 Final Exam Fall 2014 December 19, 2014 Your PRINTED FULL NAME Your STUDENT ID NUMBER Number of additional sheets 1. No computers, no tablets, no connected device (phone etc.) 2. Pocket

More information

Control Systems Design, SC4026. SC4026 Fall 2010, dr. A. Abate, DCSC, TU Delft

Control Systems Design, SC4026. SC4026 Fall 2010, dr. A. Abate, DCSC, TU Delft Control Systems Design, SC4026 SC4026 Fall 2010, dr. A. Abate, DCSC, TU Delft Lecture 4 Controllability (a.k.a. Reachability) and Observability Algebraic Tests (Kalman rank condition & Hautus test) A few

More information

Lecture 4: Numerical solution of ordinary differential equations

Lecture 4: Numerical solution of ordinary differential equations Lecture 4: Numerical solution of ordinary differential equations Department of Mathematics, ETH Zürich General explicit one-step method: Consistency; Stability; Convergence. High-order methods: Taylor

More information

Projection Methods. Michal Kejak CERGE CERGE-EI ( ) 1 / 29

Projection Methods. Michal Kejak CERGE CERGE-EI ( ) 1 / 29 Projection Methods Michal Kejak CERGE CERGE-EI ( ) 1 / 29 Introduction numerical methods for dynamic economies nite-di erence methods initial value problems (Euler method) two-point boundary value problems

More information

AM 205: lecture 14. Last time: Boundary value problems Today: Numerical solution of PDEs

AM 205: lecture 14. Last time: Boundary value problems Today: Numerical solution of PDEs AM 205: lecture 14 Last time: Boundary value problems Today: Numerical solution of PDEs ODE BVPs A more general approach is to formulate a coupled system of equations for the BVP based on a finite difference

More information

Linearization problem. The simplest example

Linearization problem. The simplest example Linear Systems Lecture 3 1 problem Consider a non-linear time-invariant system of the form ( ẋ(t f x(t u(t y(t g ( x(t u(t (1 such that x R n u R m y R p and Slide 1 A: f(xu f(xu g(xu and g(xu exist and

More information

Module 07 Controllability and Controller Design of Dynamical LTI Systems

Module 07 Controllability and Controller Design of Dynamical LTI Systems Module 07 Controllability and Controller Design of Dynamical LTI Systems Ahmad F. Taha EE 5143: Linear Systems and Control Email: ahmad.taha@utsa.edu Webpage: http://engineering.utsa.edu/ataha October

More information

Linear dynamical systems with inputs & outputs

Linear dynamical systems with inputs & outputs EE263 Autumn 215 S. Boyd and S. Lall Linear dynamical systems with inputs & outputs inputs & outputs: interpretations transfer function impulse and step responses examples 1 Inputs & outputs recall continuous-time

More information

Overview of Discrete-Time Fourier Transform Topics Handy Equations Handy Limits Orthogonality Defined orthogonal

Overview of Discrete-Time Fourier Transform Topics Handy Equations Handy Limits Orthogonality Defined orthogonal Overview of Discrete-Time Fourier Transform Topics Handy equations and its Definition Low- and high- discrete-time frequencies Convergence issues DTFT of complex and real sinusoids Relationship to LTI

More information

MA 580; Numerical Analysis I

MA 580; Numerical Analysis I MA 580; Numerical Analysis I C. T. Kelley NC State University tim kelley@ncsu.edu Version of October 23, 2016 NCSU, Fall 2016 c C. T. Kelley, I. C. F. Ipsen, 2016 MA 580, Fall 2016 1 / 43 Contents 1 Introduction

More information

The Direct Transcription Method For Optimal Control. Part 2: Optimal Control

The Direct Transcription Method For Optimal Control. Part 2: Optimal Control The Direct Transcription Method For Optimal Control Part 2: Optimal Control John T Betts Partner, Applied Mathematical Analysis, LLC 1 Fundamental Principle of Transcription Methods Transcription Method

More information

21 Linear State-Space Representations

21 Linear State-Space Representations ME 132, Spring 25, UC Berkeley, A Packard 187 21 Linear State-Space Representations First, let s describe the most general type of dynamic system that we will consider/encounter in this class Systems may

More information

12. Prediction Error Methods (PEM)

12. Prediction Error Methods (PEM) 12. Prediction Error Methods (PEM) EE531 (Semester II, 2010) description optimal prediction Kalman filter statistical results computational aspects 12-1 Description idea: determine the model parameter

More information

Linear-Quadratic-Gaussian (LQG) Controllers and Kalman Filters

Linear-Quadratic-Gaussian (LQG) Controllers and Kalman Filters Linear-Quadratic-Gaussian (LQG) Controllers and Kalman Filters Emo Todorov Applied Mathematics and Computer Science & Engineering University of Washington Winter 204 Emo Todorov (UW) AMATH/CSE 579, Winter

More information

Topic # Feedback Control

Topic # Feedback Control Topic #5 6.3 Feedback Control State-Space Systems Full-state Feedback Control How do we change the poles of the state-space system? Or,evenifwecanchangethepolelocations. Where do we put the poles? Linear

More information

13 Numerical Solution of ODE s

13 Numerical Solution of ODE s 13 NUMERICAL SOLUTION OF ODE S 28 13 Numerical Solution of ODE s In simulating dynamical systems, we frequently solve ordinary differential equations. These are of the form dx = f(t, x), dt where the function

More information

Topic # /31 Feedback Control Systems

Topic # /31 Feedback Control Systems Topic #16 16.30/31 Feedback Control Systems Add reference inputs for the DOFB case Reading: FPE 7.8, 7.9 Fall 2010 16.30/31 16 2 Reference Input - II On page 15-6, compensator implemented with reference

More information

Lecture Notes for PHY 405 Classical Mechanics

Lecture Notes for PHY 405 Classical Mechanics Lecture Notes for PHY 405 Classical Mechanics From Thorton & Marion s Classical Mechanics Prepared by Dr. Joseph M. Hahn Saint Mary s University Department of Astronomy & Physics September 1, 2005 Chapter

More information

Solutions - Homework #2

Solutions - Homework #2 Solutions - Homework #2 1. Problem 1: Biological Recovery (a) A scatterplot of the biological recovery percentages versus time is given to the right. In viewing this plot, there is negative, slightly nonlinear

More information

EE364b Homework 7. t=1

EE364b Homework 7. t=1 EE364b Prof. S. Boyd EE364b Homework 7 1. MPC for output tracking. We consider the linear dynamical system x(t + 1) = Ax(t) + Bu(t), y(t) = Cx(t), t = 0,...,T 1, with state x(t) R n, input u(t) R m, and

More information

Computational Methods in Optimal Control Lecture 8. hp-collocation

Computational Methods in Optimal Control Lecture 8. hp-collocation Computational Methods in Optimal Control Lecture 8. hp-collocation William W. Hager July 26, 2018 10,000 Yen Prize Problem (google this) Let p be a polynomial of degree at most N and let 1 < τ 1 < τ 2

More information

Nonlinear Control Lecture # 14 Input-Output Stability. Nonlinear Control

Nonlinear Control Lecture # 14 Input-Output Stability. Nonlinear Control Nonlinear Control Lecture # 14 Input-Output Stability L Stability Input-Output Models: y = Hu u(t) is a piecewise continuous function of t and belongs to a linear space of signals The space of bounded

More information

Calculus of Variations Summer Term 2016

Calculus of Variations Summer Term 2016 Calculus of Variations Summer Term 2016 Lecture 14 Universität des Saarlandes 28. Juni 2016 c Daria Apushkinskaya (UdS) Calculus of variations lecture 14 28. Juni 2016 1 / 31 Purpose of Lesson Purpose

More information

Matlab Instruction Primer; Chem 691, Spring 2016

Matlab Instruction Primer; Chem 691, Spring 2016 1 Matlab Instruction Primer; Chem 691, Spring 2016 This version dated February 10, 2017 CONTENTS I. Help: To obtain information about any instruction in Matlab 1 II. Scripting 1 III. Loops, determine an

More information

Session 1 : Fundamental concepts

Session 1 : Fundamental concepts BRUFACE Vibrations and Acoustics MA1 Academic year 17-18 Cédric Dumoulin (cedumoul@ulb.ac.be) Arnaud Deraemaeker (aderaema@ulb.ac.be) Exercise 1 Session 1 : Fundamental concepts Consider the following

More information

Optimization-Based Control

Optimization-Based Control Optimization-Based Control Richard M. Murray Control and Dynamical Systems California Institute of Technology DRAFT v1.7b, 23 February 2008 c California Institute of Technology All rights reserved. This

More information

Converse Lyapunov theorem and Input-to-State Stability

Converse Lyapunov theorem and Input-to-State Stability Converse Lyapunov theorem and Input-to-State Stability April 6, 2014 1 Converse Lyapunov theorem In the previous lecture, we have discussed few examples of nonlinear control systems and stability concepts

More information

MATH4406 (Control Theory) Unit 6: The Linear Quadratic Regulator (LQR) and Model Predictive Control (MPC) Prepared by Yoni Nazarathy, Artem

MATH4406 (Control Theory) Unit 6: The Linear Quadratic Regulator (LQR) and Model Predictive Control (MPC) Prepared by Yoni Nazarathy, Artem MATH4406 (Control Theory) Unit 6: The Linear Quadratic Regulator (LQR) and Model Predictive Control (MPC) Prepared by Yoni Nazarathy, Artem Pulemotov, September 12, 2012 Unit Outline Goal 1: Outline linear

More information

A. Time-Optimal Lunar Ascent

A. Time-Optimal Lunar Ascent Appendices A. Time-Optimal Lunar Ascent 215 A. Time-Optimal Lunar Ascent Contributor: George Pollock This appendix includes a brief introduction to MATLAB s two-point boundary-value solver and its application

More information

Observability. Dynamic Systems. Lecture 2 Observability. Observability, continuous time: Observability, discrete time: = h (2) (x, u, u)

Observability. Dynamic Systems. Lecture 2 Observability. Observability, continuous time: Observability, discrete time: = h (2) (x, u, u) Observability Dynamic Systems Lecture 2 Observability Continuous time model: Discrete time model: ẋ(t) = f (x(t), u(t)), y(t) = h(x(t), u(t)) x(t + 1) = f (x(t), u(t)), y(t) = h(x(t)) Reglerteknik, ISY,

More information

Solutions for examination in TSRT78 Digital Signal Processing,

Solutions for examination in TSRT78 Digital Signal Processing, Solutions for examination in TSRT78 Digital Signal Processing, 2014-04-14 1. s(t) is generated by s(t) = 1 w(t), 1 + 0.3q 1 Var(w(t)) = σ 2 w = 2. It is measured as y(t) = s(t) + n(t) where n(t) is white

More information

Principles of Optimal Control Spring 2008

Principles of Optimal Control Spring 2008 MIT OpenCourseWare http://ocw.mit.edu 6.323 Principles of Optimal Control Spring 2008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. 6.323 Lecture 2

More information

ECE382/ME482 Spring 2005 Homework 1 Solution February 10,

ECE382/ME482 Spring 2005 Homework 1 Solution February 10, ECE382/ME482 Spring 25 Homework 1 Solution February 1, 25 1 Solution to HW1 P2.33 For the system shown in Figure P2.33 on p. 119 of the text, find T(s) = Y 2 (s)/r 1 (s). Determine a relationship that

More information

Solving Integral Equations by Petrov-Galerkin Method and Using Hermite-type 3 1 Elements

Solving Integral Equations by Petrov-Galerkin Method and Using Hermite-type 3 1 Elements 5 1 July 24, Antalya, Turkey Dynamical Systems and Applications, Proceedings, pp. 436 442 Solving Integral Equations by Petrov-Galerkin Method and Using Hermite-type 3 1 Elements M. Karami Department of

More information

Non-homogeneous equations (Sect. 3.6).

Non-homogeneous equations (Sect. 3.6). Non-homogeneous equations (Sect. 3.6). We study: y + p(t) y + q(t) y = f (t). Method of variation of parameters. Using the method in an example. The proof of the variation of parameter method. Using the

More information

Lecture 3: Hamilton-Jacobi-Bellman Equations. Distributional Macroeconomics. Benjamin Moll. Part II of ECON Harvard University, Spring

Lecture 3: Hamilton-Jacobi-Bellman Equations. Distributional Macroeconomics. Benjamin Moll. Part II of ECON Harvard University, Spring Lecture 3: Hamilton-Jacobi-Bellman Equations Distributional Macroeconomics Part II of ECON 2149 Benjamin Moll Harvard University, Spring 2018 1 Outline 1. Hamilton-Jacobi-Bellman equations in deterministic

More information

STATE VARIABLE (SV) SYSTEMS

STATE VARIABLE (SV) SYSTEMS Copyright F.L. Lewis 999 All rights reserved Updated:Tuesday, August 05, 008 STATE VARIABLE (SV) SYSTEMS A natural description for dynamical systems is the nonlinear state-space or state variable (SV)

More information

Lab 13: Ordinary Differential Equations

Lab 13: Ordinary Differential Equations EGR 53L - Fall 2009 Lab 13: Ordinary Differential Equations 13.1 Introduction This lab is aimed at introducing techniques for solving initial-value problems involving ordinary differential equations using

More information