Linearize a non-linear system at an appropriately chosen point to derive an LTI system with A, B,C, D matrices

Similar documents
EE Homework 3 Due Date: 03 / 30 / Spring 2015

2007 Problem Topic Comment 1 Kinematics Position-time equation Kinematics 7 2 Kinematics Velocity-time graph Dynamics 6 3 Kinematics Average velocity

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

MCE 366 System Dynamics, Spring Problem Set 2. Solutions to Set 2

Control Systems I. Lecture 2: Modeling and Linearization. Suggested Readings: Åström & Murray Ch Jacopo Tani

Control Systems I. Lecture 2: Modeling. Suggested Readings: Åström & Murray Ch. 2-3, Guzzella Ch Emilio Frazzoli

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

Rotation review packet. Name:

3 Space curvilinear motion, motion in non-inertial frames

Rigid bodies - general theory

General Physics (PHY 2130)

Robotics. Dynamics. Marc Toussaint U Stuttgart

Robotics. Dynamics. University of Stuttgart Winter 2018/19

Physics 351, Spring 2017, Homework #12. Due at start of class, Friday, April 14, 2017

Rotational Kinetic Energy

Lecture 13 REVIEW. Physics 106 Spring What should we know? What should we know? Newton s Laws

Quantitative Skills in AP Physics 1

Linearization problem. The simplest example

Review: control, feedback, etc. Today s topic: state-space models of systems; linearization

AP PHYSICS 1 Learning Objectives Arranged Topically

MSMS Basilio Bona DAUIN PoliTo

Lab #4 - Gyroscopic Motion of a Rigid Body

9 Kinetics of 3D rigid bodies - rotating frames

The basic principle to be used in mechanical systems to derive a mathematical model is Newton s law,

Imaginary. Axis. Real. Axis

Physics 351, Spring 2015, Homework #6. Due at start of class, Friday, February 27, 2015

FIRST YEAR MATHS FOR PHYSICS STUDENTS NORMAL MODES AND WAVES. Hilary Term Prof. G.G.Ross. Question Sheet 1: Normal Modes

In the presence of viscous damping, a more generalized form of the Lagrange s equation of motion can be written as

ME 230: Kinematics and Dynamics Spring 2014 Section AD. Final Exam Review: Rigid Body Dynamics Practice Problem

Name: Fall 2014 CLOSED BOOK

Final Examination Thursday May Please initial the statement below to show that you have read it

Lecture Module 5: Introduction to Attitude Stabilization and Control

Figure 5.28 (a) Spring-restrained cylinder, (b) Kinematic variables, (c) Free-body diagram

PHY321 Homework Set 2

FINAL EXAM CLOSED BOOK

Introduction to Control (034040) lecture no. 2

Lecture 14. Rotational dynamics Torque. Give me a lever long enough and a fulcrum on which to place it, and I shall move the world.

Contents. Dynamics and control of mechanical systems. Focus on

In this section of notes, we look at the calculation of forces and torques for a manipulator in two settings:

Physics for Scientists and Engineers 4th Edition, 2017

Classical Mechanics Comprehensive Exam Solution

Exam 3 Practice Solutions

Examination paper for TMA4195 Mathematical Modeling

DO NOT TURN PAGE TO START UNTIL TOLD TO DO SO.

THE INDIAN COMMUNITY SCHOOL,KUWAIT PHYSICS SECTION-A

STUDY GUIDE 4: Equilibrium, Angular Kinematics, and Dynamics

CEE 271: Applied Mechanics II, Dynamics Lecture 25: Ch.17, Sec.4-5

Oscillations. Oscillations and Simple Harmonic Motion

Homework 1. Due Tuesday, January 29.

Phys 270 Final Exam. Figure 1: Question 1

Practice Exam #3 A N B. 1.2 N C N D N E. 0 N

1. [30] Y&F a) Assuming a small angle displacement θ max < 0.1 rad, the period is very nearly

Final Exam April 30, 2013

Controllability Analysis of A Two Degree of Freedom Nonlinear Attitude Control System

Rotational motion problems

Rotation. PHYS 101 Previous Exam Problems CHAPTER

AP Physics C: Rotation II. (Torque and Rotational Dynamics, Rolling Motion) Problems

Dynamics of Ocean Structures Prof. Dr. Srinivasan Chandrasekaran Department of Ocean Engineering Indian Institute of Technology, Madras

Imaginary. Axis. Real. Axis

Chapter 8. Rotational Equilibrium and Rotational Dynamics

EXPERIMENT 7: ANGULAR KINEMATICS AND TORQUE (V_3)

PLANAR KINETIC EQUATIONS OF MOTION: TRANSLATION

Engineering Mechanics Prof. U. S. Dixit Department of Mechanical Engineering Indian Institute of Technology, Guwahati Introduction to vibration

Exercise 5 - Hydraulic Turbines and Electromagnetic Systems

cos(θ)sin(θ) Alternative Exercise Correct Correct θ = 0 skiladæmi 10 Part A Part B Part C Due: 11:59pm on Wednesday, November 11, 2015

EQUIVALENT SINGLE-DEGREE-OF-FREEDOM SYSTEM AND FREE VIBRATION

Mechatronics. MANE 4490 Fall 2002 Assignment # 1

Physics 351, Spring 2015, Homework #5. Due at start of class, Friday, February 20, 2015 Course info is at positron.hep.upenn.

DYNAMICS ME HOMEWORK PROBLEM SETS

Homework 1. Due Thursday, January 21

Physics 351, Spring 2017, Homework #3. Due at start of class, Friday, February 3, 2017

CEE 271: Applied Mechanics II, Dynamics Lecture 27: Ch.18, Sec.1 5

PLANAR KINETIC EQUATIONS OF MOTION: TRANSLATION (Sections ) Today s Objectives: Students will be able to: a) Apply the three equations of

Übersetzungshilfe / Translation aid (English) To be returned at the end of the exam!

PHYSICS 220. Lecture 15. Textbook Sections Lecture 15 Purdue University, Physics 220 1

Chapter 8 Rotational Equilibrium and Rotational Dynamics Force vs. Torque Forces cause accelerations Torques cause angular accelerations Force and

CEE 271: Applied Mechanics II, Dynamics Lecture 9: Ch.13, Sec.4-5

Torque. Introduction. Torque. PHY torque - J. Hedberg

COMPLETE ALL ROUGH WORKINGS IN THE ANSWER BOOK AND CROSS THROUGH ANY WORK WHICH IS NOT TO BE ASSESSED.

Chapter 8: Momentum, Impulse, & Collisions. Newton s second law in terms of momentum:

Chapter 6: Momentum Analysis

ET3-7: Modelling I(V) Introduction and Objectives. Electrical, Mechanical and Thermal Systems

Theory & Practice of Rotor Dynamics Prof. Rajiv Tiwari Department of Mechanical Engineering Indian Institute of Technology Guwahati

Keble College - Hilary 2014 CP3&4: Mathematical methods I&II Tutorial 5 - Waves and normal modes II

Chapter 14 Periodic Motion

Stabilization of Motion of the Segway 1

Lecture PowerPoints. Chapter 11. Physics for Scientists and Engineers, with Modern Physics, 4 th edition Giancoli

Real-Time Implementation of a LQR-Based Controller for the Stabilization of a Double Inverted Pendulum

Problem Set Number 2, j/2.036j MIT (Fall 2014)

Analytical Mechanics - Extra Problems

Introduction to Controls

28. Pendulum phase portrait Draw the phase portrait for the pendulum (supported by an inextensible rod)

Northwestern Connecticut Community College Course Syllabus

Textbook Reference: Wilson, Buffa, Lou: Chapter 8 Glencoe Physics: Chapter 8

Physics 1301, Exam 3 Review

Swing-Up Problem of an Inverted Pendulum Energy Space Approach

CHAPTER 1: PHYSICAL QUANTITIES AMD MEASUREMENT

Modeling and Experimentation: Compound Pendulum

8.012 Physics I: Classical Mechanics Fall 2008

PLANAR KINETIC EQUATIONS OF MOTION: TRANSLATION

Transcription:

Dr. J. Tani, Prof. Dr. E. Frazzoli 151-0591-00 Control Systems I (HS 2018) Exercise Set 2 Topic: Modeling, Linearization Discussion: 5. 10. 2018 Learning objectives: The student can mousavis@ethz.ch, 4th October 2018 Use the concept of state to model a system Model simple dynamical systems Linearize a non-linear system at an appropriately chosen point to derive an LTI system with A, B,C, D matrices Understand the notion of equilibrium points and can calculate them. The student is aware of the consequence of being in an equilibrium point Modeling Background: Dynamics Introduction Control systems I relies on some background knowledge in Dynamics to model mechanical systems. To enable you to solve the following exercise a short summary is provided. Dynamics are generally described in terms of accelerations following Newton s 2nd law. Here we distinguish between translational and rotational movements. The change in translational speed times the mass of the object being accelerated, is equal to the sum of the forces acting on the object as written in Eq. 1. Similarly, the change in rotational speed times the rotational inertia of the object being accelerated, is equal to the sum of the torques acting on the object as illustrated by Eq. 3. Translational dynamical equation: m ẍ(t) = i F i, (1) where x(t) denotes the position vector of the center of mass and is given by x(t) = x(t)e x + y(t)e y, (2) where e x, e y represent the base frame vectors with unit length of a two dimensional space. Rotational dynamical equation: J (A) θ(t) = i τ (A) i, (3) where J (A) is the so called moment of inertia with respect to an arbitrary point A. The above two equations should enable you to work with the following exercise problems.

Exercise 1 (Inverted Pendulum: Modeling, Linearization) Consider the mechanical system depicted in Figure 1. The objective of this control system is to keep the pendulum in the upright position. The system consists of a rigid bar of length L and mass m which is mounted with a fixed bearing at its lower end. A motor provides a torque τ(t). The moment of inertia of the bar with respect to point P is given by J (P ) = 1 3 ml2. Figure 1: Sketch of the inverted pendulum system with coordinate frame a) Derive the differential equations/equations of motion of the system using Newton s laws of motion. b) Classify the system into the following categories: linear/nonlinear, time-invariant/timevarying, static/dynamic, order/dimension of the system c) Define the states of the system and rewrite the differential equations in state-space form, i.e. ẋ = f(x, u). What is the control input u? d) Determine the equilibrium points of the system. e) We want to design a linear controller in order to achieve the control objective. Therefore we need a linearized model. Around which equilibrium point do we have to linearize the system? Linearize the system around this equilibrium point and provide the matrices A, B, C, D. Assume that you measure the angular velocity θ. Exercise 2 (Thermodynamic System: Temperature Control) Consider the tank (volume V) depicted in figure 2 which has an inlet (volumetric flow V in ) and an outlet (volumetric flow V out ). In order to synthesize a controller to regulate the temperature T R, we need to derive the governing differential equation. Consider the following assumptions: the fluid has a constant density ρ the fluid has a constant specific heat capacities c p, c v the flow throughout the system is stationary

T in, V in T R, V, c p, ρ T out, V out Figure 2: Temperature Control of a tank there is no heat loss the system is perfectly mixed the fluid is an ideal gas kinetic and potential energies can be neglected a) Formalize the above assumptions into mathematical expressions. b) Derive the differential equation governing T R using the energetic balance. Exercise 3 (Homework: Programming Exercise: Simulation) Consider the nonlinear system ẋ 1 (t) = x 2 (t) (4) ẋ 2 (t) = x 3 1(t) x 2 (t) + u(t) (5) a) Implement a time integration of the nonlinear system using Python. Simulate the system with zero input u(t) = 0 and nonzero initial condition x(0) = [ 1 1] T. Save the results as x_initial_resp. Simulate the system with zero initial condition and control input u(t) = 0.1 cos(2t). Save the results as x_forced_resp. [ T Simulate the system with x(0) = 1 1] and u(t) = 0.1 cos(2t). Save the results as x_mix. Does x_mix = x_initial_resp + x_forced_resp hold? Explain the result. b) Linearize the system around the equilibrium point using symbolic variables. State the matrices A and B. Conduct the same investigations as for the nonlinear system and compare the results.

Figure 3: Balancing cube. Figure 4: wheel. Inverted pendulum with a reaction Exercise 4 (Homework: Cubli: Modeling, Linearization) In this exercise, we will take a look at a simplified model of a Cubli (see https://www.youtube. com/watch?v=n_6p-1j551y). To keep things simple, we will assume that, unlike the real cubli in Figure 3, our cube rotates only in one dimension. To keep the cube in the desired upright position, we use a reaction wheel (those are normally used for satellite attitude control, check out https://en.wikipedia.org/wiki/reaction_wheel if you are interested) which is also visible in Figure 3. The simplified Cubli can be modeled as an inverted pendulum with a reaction wheel mounted at the tip of the pendulum. A sketch of such a model is shown in Figure 4. Angle θ is the angle of the tip of the pendulum and angle ϕ is the position of the reaction wheel w.r.t. to the tip of the pendulum. We define the counterclockwise direction to be the positive direction of rotation. Input to the system is the torque that you can apply to the reaction wheel T w. Parameters of the system are m (total mass of the system), l (distance from the supporting point on the ground to the center of gravity when angle θ = 0), J w (moment of inertia of the reaction wheel), J (moment of inertia of the whole system w.r.t to the supporting point on the ground). a) Derive the differential equations which describe the dynamics of the system. (Hint: Only the torque T w acts on the reaction wheel.) b) Find all equilibrium points. c) Rewrite your differential equations as first-order differential equations by introducing states x i. Linearize the system around the equilibrium point (θ = 0, ϕ = 0), i.e. find system matrices A, B, C and D. Assume that you can observe the output θ. d) Is the equilibrium point from the previous task stable? Can you justify your claims? Exercise 5 (Homework: Finance: Inventory Control) We are keeping an item stocked in a warehouse. If there is too little, we will run out of it soon (not preferred). If there is too much, there will be more cost of storage and misuse of capital (not preferred). Every morning there is the possibility to order new stock which is assumed to be immediately delivered. Depending on the demand of the product there are w items leaving the warehouse every evening, where w is a random variable with a given probability density function. The cost to order a new item is given by c; the revenue from a sold item is given by p > c. The cost of having too much stock or negative stock is given by some function r(x). The objective

is to find a control law such that the profit is maximized, however, we will only focus on the modelling part in the following. a) Define the state and the control input of your system. Are there any disturbances acting on the system? Are the any state/input constraints? What is the interpretation of x < 0? b) Derive the differential/difference equation governing the system. Classify your system into: linear/nonlinear, time invariant/time varying, static/dynamic, discrete time/continuous time, deterministic/stochastic. The above problem is a typical problem in the field of Optimal Control and can be solved using Dynamic Programming. Problem adapted from: Bertsekas, Dimitri P., et al. Dynamic programming and optimal control. Vol. 1. No. 3. Belmont, MA: Athena scientific, 2005, p. 3. and D Andrea, Raffaello, Dynamic Programming and Optimal Control, Lecture Notes: Lecture 1. Exercise 6 (Python: Simulation of a simple system) In this exercise, you will model some systems in Python in order to understand how to run and visualize a simulation. The system is represented by the following differential equation: ÿ(t) + y(t) 2 ẏ(t) + sin(y(t)) = u(t) How does your system respond when you put a step function as a system s input? Visualize the output y(t). How would you set the initial conditions to y(0) = 2, ẏ(0) = 0 and a delayed step input of 5 s? Run the simulation for 30 seconds and plot the results. Exercise 7 (Python: Simulation of a Spring-Mass 3D pendulum) In this exercise, you will model a relatively complex system in order to get more acquainted with the way solving differential equations in Python works and learn how to visualize a animated simulation. We will model the elastic pendulum shown in Figure 5. Its equations of motion (in 3 dimension) are given by: ẍ = ω2 (r l 0 ) x r ÿ = ω2 (r l 0 ) y r z = ω2 (r l 0 ) z g r where ω = k m and r = x 2 + y 2 + z 2. For system s parameters you can use: m = 0.1 kg, k = 10 N/m, l 0 = 1 m and g = 9.81m/s 2.

Figure 5: Schematic representation of the elastic pendulum system. Set the initial condition to x(0) = y(0) = 0 m, z(0) = 1 m and ẋ(0) = 0.1 m/s, ẏ(0) = ż(0) = 0 m/s and simulate the system. Aminate the simulation using the packages mpl_toolkits.mplot3d for 3D plotting and matplotlib.animation which provides animation utilities. You can find a 3d simulation tutorial at https://matplotlib.org/examples/animation/simple_3danim.html Try to plot also a persistent trajectory of the pendulum tip. Use different values of k. What do you expect as k grows very large? We show what the simulation looks like for a small k in figure 6a and a large k in figure 6b. We want to compare the exact solution to the solution obtained linearizing the system in one of the two equilibrium positions. Simulate the system after linearizing the dynamics at the bottom equilibrium position (x = 0, y = 0, z = l 0 mg/k, ẋ = 0, ẏ = 0, ż = 0). Is the approximation sufficiently good? Try different values for the spring stiffness and initial conditions. What do you observe?

(a) 3D pendulum with k = 10N/m. (b) 3D pendulum with k = 500N/m. Figure 6: Simulation examples: the orange line represents the trajectory followed by the pendulum tip prior to the capture of the image. Exercise 8 (Extra: Ball on a beam: Modeling, Linearization: (difficult)) In this exercise, we consider a simplified model of a Ball on a Plate/Beam system (see: https:// www.youtube.com/watch?v=j4omvlc_odw) as depicted in figure 7. The objective of this control system is to stabilize a ball at a certain location on the beam. The system consists of a rigid

beam which is mounted on a fixed bearing in its center of mass. The ball is modelled as a point mass m which slides without friction on the beam. A motor provides a torque τ(t). The beam has the moment of inertia J (C) with respect to its center of mass. Note that the coordinate frame is attached to the beam and is therefore time dependent. This has to be considered when taking the derivative with respect to time of the position x(t) = x(t)e r (t) + y(t)e θ (t). Figure 7: Ball on a plate Figure 8: Sketch of the system with coordinate frames a) Derive the differential equations/equations of motion of the system using Newton s laws of motion. Hint: The time derivatives of the coordinate frame base vectors are given by ė r = θe θ and ė θ = θe r. b) Classify the system into the following categories: linear/nonlinear, time-invariant/timevarying, static/dynamic, order/dimension of the system c) Define the states of the system and rewrite the differential equations in state-space form, i.e. ẋ = f(x, u). What is the control input u? Consider the following values of the system parameters: m = 1kg, g = 10m/s 2. Assume that the moment of inertia of the beam can be neglected, i.e. J (C) = 0 kg m 2. d) Linearize the system around a steady state setpoint such that x = x ss, θ ss = 0. Compute the steady state control input u ss and provide the matrices A, B, C, D of the linearized state space model. Assume that you measure the position x. Is J (C) 0 a good assumption?