Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

EL2620 Nonlinear Control Exercises and Homework, Exercises of Dynamics

Determine (analytically) the type of each equilibrium in each case. Interpret your results and comment on their implications when the model is applied in a real ...

Typology: Exercises

2021/2022

Uploaded on 08/05/2022

nguyen_99
nguyen_99 🇻🇳

4.2

(80)

1K documents

1 / 133

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
EL2620 Nonlinear Control
Exercises and Homework
Henning Schmidt, Karl Henrik Johansson, Krister Jacobsson, Bo Wahlberg,
Per Hägg, Elling W. Jacobsen
September 2012
Automatic Control
KTH, Stockholm, Sweden
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download EL2620 Nonlinear Control Exercises and Homework and more Exercises Dynamics in PDF only on Docsity!

EL2620 Nonlinear Control

Exercises and Homework

Henning Schmidt, Karl Henrik Johansson, Krister Jacobsson, Bo Wahlberg,

Per Hägg, Elling W. Jacobsen

September 2012

Automatic Control

KTH, Stockholm, Sweden

  • Preface
  • 1 Homeworks
    • 1.1 Report Requirements
      • 1.1.1 Writing your report using Microsoft Word ©R
      • 1.1.2 Writing your report using LATEX
      • 1.1.3 Work in groups of two
      • 1.1.4 Grading
      • 1.1.5 References
    • 1.2 Homework
    • 1.3 Homework
    • 1.4 Homework
  • 2 Exercises
    • 2.1 Nonlinear Models and Simulation
    • 2.2 Computer exercise: Simulation
    • 2.3 Linearization and Phase-Plane Analysis
    • 2.4 Lyapunov Stability
    • 2.5 Input-Output Stability
    • 2.6 Describing Function Analysis
    • 2.7 Anti-windup
    • 2.8 Friction, Backlash and Quantization
    • 2.9 High-gain and Sliding mode
    • 2.10 Computer Exercises: Sliding Mode, IMC and Gain scheduling
    • 2.11 Gain scheduling and Lyapunov based methods
    • 2.12 Feedback linearization
    • 2.13 Optimal Control
    • 2.14 Fuzzy control
  • 3 Solutions
    • 3.1 Solutions to Nonlinear Models and Simulation
    • 3.2 Solutions to Computer exercise: Simulation
    • 3.3 Solutions to Linearization and Phase-Plane Analysis
    • 3.4 Solutions to Lyapunov Stability
    • 3.5 Solutions to Input-Output Stability
    • 3.6 Solutions to Describing Function Analysis
    • 3.7 Solutions to Anti-windup
    • 3.8 Solutions to Friction, Backlash and Quantization
    • 3.9 Solutions to High-gain and Sliding mode
    • 3.10 Solutions to Computer Exercises: Sliding Mode, IMC and Gain scheduling
  • 3.11 Solutions to Gain scheduling and Lyapunov based methods
  • 3.12 Solutions to Feedback linearization
  • 3.13 Solutions to Optimal Control
  • 3.14 Solutions to Fuzzy control

Preface

Many people have contributed to this material in nonlinear control. Originally, it was developed by Bo Bern- hardsson, Karl Henrik Johansson, and Mikael Johansson. Later contributions have been added by Henning Schmidt, Krister Jacobsson, Bo Wahlberg, Elling Jacobsen, Torbjörn Nordling, Per Hägg and Farhad Farokhi. Exercises have also shamelessly been borrowed (stolen) from other sources, mainly from Karl Johan Åström’s compendium in Nonlinear Control and Khalil’s book Nonlinear Systems.

Per Hägg and Elling W. Jacobsen, September 2012

Chapter 1

Homeworks

1.1 Report Requirements

Your homework reports should be handed-in as a single PDF file containing all the typed answers, figures, tables, and etc. You can prepare this document using both Microsoft Word ©R^ or LATEX. However, there is a set of requirements that your homework should satisfy in order to get considered and subsequently, approved. In what follows, the homework requirements are specified. In your report, you should first describe the problem in your own words and break it down into subproblems, unless the problem was already broken down into subproblems in the description of the homework. In each subproblem you should define a set of questions or tasks which gradually lead you to a solution of the overall problem. The problem should be described in detail, so that the reader can understand it without reading the description of the homework. Then, solve the subproblems in succession and give the solution to the overall problem at the end, followed by a sentence or two about what you learned from solving the problem. You should lead the reader through a detailed solution where you motivate every step, state every theorem, and verify that the assumptions are fulfilled. The presentation should be detailed yet clear and concise. You should provide a reference (including the page number) for every theorem and result that you are using [2]. Any engineering student with a bachelor’s degree should be able to understand and reproduce the results based on your report alone. You may not copy-and-paste any text, theorem, or figure except the figures used in the description of the homework. Only include figures and tables if they fosters the understanding of the solution. Each figure and table should include a caption, and all the figures and tables should be associated with a reference in the text and placed at the end of your report. Each equation should only be written once and referred to by reference later when needed. Equations that you do not refer to later may be left unlabeled. You are not allowed to have any appendix nor attach any Matlab or other code. You report (excluding the figures and tables) should not be shorter than two pages and longer than four pages. The reports should contain the names of the students (who have collaborated as a group to solve the problems and write the report) and their email addresses. The solutions may not be copy-pasted from other sources such as textbooks, internet webpages, or other groups report. You should properly cite all the theorems, texts, or results that you use when creating the report. Plagiarism (i.e., the act of copying someone else ideas, text, or results in any form while presenting it as your own work, particularly without permission^1 ) will be reported to the KTH Disciplinary Board. Finally, note that deadlines listed on the course page are hard. We will not accept any delays in handing in reports or reviews.

1.1.1 Writing your report using Microsoft Word ©R

You should write your report as a double column document. In Microsoft Word ©R^ 2010 release (which I would only refer during this description), you can change the number of columns under the page layout tab. You

(^1) http://en.wiktionary.org/wiki/plagiarism

Homework 1 in EL2620 Nonlinear Control

First name1 Last name person number email

First name2 Last name person number email September 22, 2009

Problem

Describe the problem in your own words and break it down into subproblems, unless the problem was already broken down into subproblems in the de- scription of the homework. In each subproblem you should define a set of questions or tasks which grad- ually lead you to a solution of the overall problem. The problem should be described in detail, so that the reader can understand it without reading the description of the homework. For an example, see Problem 1.

Problem 1 – Behavior of a non-

linear system

Study the behavior of the system dx dt =^ y^ (1a) dy dt =^ −^2 x^ −^2 y^ −^4 x

(^2) (1b)

with regard to its initial value and assess if the sys- tem is globally asymptotically stable. We have chosen a solution strategy based on the Figure 1.1: The homework report title page.

should use A4 paper size to write your report (which is the default choice). The top, right, left, and bottom margins should not be less than 2.5 cm (which is again the default choice). Similarly, you can change the margin specifications under the page layout tab. We strongly suggest “Times New Roman” as the document font. However, in case you are missing it in your font library, we suggest you use another standard font; e.g., Arial or Courier New. Following this recommendation, you guarantee that we can open your document without any problem and read the contents. The preferred font size for the text is 11 pt. However, you can certainly use larger (or smaller) font sizes for the headings (or footnotes). Finally, make sure that the first page of the report contains the names of the students (who have collaborated as a group to solve the problems and write the report) and their email addresses. We strongly suggest you follow the template in Figure 1.1 for creating the first page of your report. A template can also be found at the course homepage.

1.1.2 Writing your report using LATEX

LATEX is a document preparation system. Two major advantage of LATEX over commonly used WYSIWYG (what you see is what you get) word processors like Microsoft Word, http://office.microsoft.com/word/, is that it allows you to enter mathematical equations very fast as code and that the layout is separated from the text. It is commonly used in Engineering disciplines, in particular for writing technical reports and scientific articles, so we hope that you will enjoy using LATEX. You should use LATEX to prepare your homework reports. Moreover, you should follow the report template, which can be downloaded from the course page (both as a PDF and as a ZIP file containing all source files for compiling the PDF). We recommend those of you that are not familiar with LATEX to see [1] for an introduction. Typically the fastest way to find help on LATEX is to search on Google, for example latex figure position. Most TEX related software and material can be found in the TEXUsers Group, http://www.tug.org/. Many differ- ent TEX distributions exists, but we recommend Windows users to install MikTeX http://miktex.org/, Unix users to install TeX Live http://www.tug.org/texlive/ and Mac users to install MacTeX http://www.tug.org/mactex/. When preparing a document using LATEX then you write your text in a tex file, i.e. a normal text file, which you then compile using pdflatex or latex. The former will directly produce a PDF, while the later produces a DVI, which you then convert to PostScript using dvips, which then is converted to a PDF using ps2pdf. Most people prefer to use a text editor that supports highlighting of LATEX commands and press a button compilation, like Emacs http://www.gnu.org/software/emacs/ (Unix, Windows, Mac), WinEdt http://www.winedt.com/ (Windows), TextPad http://www.textpad.com/

Cover and grading guide for homework ____ in EL2620 Nonlinear Control

Fill in both name, personal number and email. Author 1: ------------------------------------------------------------------------------------------------------------------ Author 2: ------------------------------------------------------------------------------------------------------------------

Grading of report: (^) Teaching assistant fill this Pass Fail

Length of report (excluding this cover, figures and tables) (ʹ െ Ͷ)^ □ (൏ ʹǡ ൐ Ͷ)^ □

Report is typed Yes □ No □

Title and author names given Yes □ No □

Problem divided into well specified subproblems Yes □ Accept □ No □

Problem understandable without checking other sources Yes □ No □

Solutions exist (list missing solutions in the review statement) Yes □ >75% □ <75% □

Solutions are correct (clearly mark all errors using blue ink) Yes^ □ >75%^ □ <75% □

Solutions are detailed yet clear and concise Yes^ □ Accept^ □ No^ □

Solutions understandable without checking other sources Yes □ No □

Solutions can be reproduced based on report Yes □ No □

All theorems/assumptions stated and fulfilled/verified Yes □ Accept □ No □

Structure/language is consistent and easy to follow Yes □ Accept □ No □

Figures/tables are clear and easy to understand Yes □ Accept □ No □

Every figure/table is referred to in the text and has a caption Yes^ □ No^ □

Appendix, Matlab or other code included No □ Yes □

Text, theorems or solutions copy-pasted or plagiarism No □ Yes □

If any of the fail boxes is marked then you need to correct all errors and implement all improvements suggested by the reviewer or motivate why you have not implemented a suggestion. You should then mark all changes in a distinguishable color (e.g., red or green) and hand it in. Plagiarism will be reported to the KTH Disiplinary Board.

Final grade (teaching assistant fill this):

Attempt 1 Pass^ □ Fail^ □

Attempt 2 Pass^ □ Fail^ □

Figure 1.2: Cover and grading guide for the homeworks.

homework, we will provide a cover (see Figure 1.2) with a set of formal requirements. You need to get a pass on each of the formal requirements listed on the cover and grading guide in order to pass the homework. If any of the fail boxes is marked then you need to correct all errors and implement all improvements suggested by the reviewers or motivate why you have not implemented a suggestion. You should mark all the changes in your PDF file (with a color that is easy to distinguish from the rest of the text; e.g., red, green, etc) and then, hand in

within two weeks from the day the graded homeworks were available.

1.1.5 References

[1] Tobias Oetiker, Hubert Partl, Irene Hyna, and Elisabeth Schlegl. The Not So Short Introduction to LATEX 2ε. Oetiker, OETIKER+PARTNER AG, Aarweg 15, 4600 Olten, Switzerland, 2008. http://www.ctan.org/info/lshort/. [2] Hassan K Khalil. Nonlinear systems. Prentice Hall, Upper Saddle river, 3. edition, 2002. ISBN 0-13- 067389-7.

1.3 Homework 2

The influence of back-lash in a control system will be discussed in this homework. Consider the drive line in a crane, where torque is generated by an electric motor, transformed through a gearbox, and finally used to lift a load. A block diagram describing the control of the angular position of the lifting axis θout is shown below to the left. Here the first block represents the P-controller (K > 0 ), the second the dynamics in the motor (T > 0 ), and the third the back-lash between the gear teeth in the gearbox.

θref

e (^) θin θout 1 K s(1 + sT )

θin θout

2∆

θin

∆ ∆

θout

The back-lash is sketched in the middle above and its characteristic is shown to the right. This back-lash model gives a relation between the angles θin and θout. Another possibility is to model the back-lash as the relation between the corresponding angular velocities θ˙in and θ˙out. This model, denoted BL, is given as

θ^ ˙out =

θ˙in, in contact 0 , otherwise,

where “in contact” corresponds to that |θin − θout| = ∆ and θ˙in (θin − θout) > 0.

  1. [1p] Consider the back-lash model (1.2) described as a block:

θ^ ˙in θ˙out BL

Assume

θ^ ˙in(t) =

1 , t ∈ [0, 1] − 1 , t ∈ [1, 2] 0 , otherwise

is the input to BL (in open-loop). Sketch θin, θout, θ˙in, and θ˙out for θin(0) = 0 and θout(0) = −∆ in a diagram.

  1. [1p] Show that the gain of BL is equal to γ(BL) = 1. Show that BL is passive. Motivate why BL can be bounded by a sector [k 1 , k 2 ] = [0, 1].^5

(^5) You may argue that BL as defined here is not a memoryless nonlinearity, which is required for the application of the Circle Criterion in the lecture notes. It is, however, possible to circumvent this problem. If you want to know how, check Theorem (126) on page 361 in Vidyasagar (1993).

  1. [1p] Consider the back-lash model BL in a feedback loop:

din θ^ ˙in θ˙out

dout

BL

G(s)

Here din and dout represent disturbances. Assume that G(s) is an arbitrary transfer function (that is, not necessarily the one given by the crane control problem discussed previously).

a. Given γ(BL) derived in 2 , which constraints are imposed on G(s) by the Small Gain Theorem in order to have a BIBO stable closed-loop system (from (din, dout) to ( θ˙in, θ˙out))? b. Which constraints are imposed on G(s) by the Passivity Theorem in order to have a BIBO stable closed-loop system? c. Which constraints are imposed on G(s) by the Circle Criterion in order to have a BIBO stable closed- loop system?

  1. [1p] For the crane control system the transfer function in 3 is equal to

G(s) =

K

s(1 + sT )

Motivate why BIBO stability cannot be concluded from the Small Gain Theorem or the Passivity Theo- rem. Let T = 1 and determine for which K > 0 the Circle Criterion leads to BIBO stability.

  1. [1p] Simulate the crane control system in Simulink. Download the Simulink model hw2.mdl and the short macro macro.m from the course homepage to your current directory and start Matlab. Open the Simulink model by running

    hw and compare with the block diagrams in this homework. What disturbance is added in hw2? What ∆ is chosen? Simulate the system with the controller K = 0. 25 by running K=0.25; macro Does it seem like the closed-loop system is BIBO stable from din to ( θ˙in, θ˙out)? Why cannot the closed- loop system be BIBO stable from din to (θin, θout)? Try other controller gains (for instance, K = 0. 5 and 4 ). Compare with your conclusions in 4. Compare your results to the case when the back-lash is neglected.

Download the Matlab files from the course homepage to your current directory and introduce the state-space model into the Matlab workspace by running

jasdata

  1. [1p] Which are the dynamical modes of the JAS 39 Gripen state-space model, i.e., which are the eigenvalues of A? Is the model stable? Which eigenvalues correspond to the flight dynamics and which correspond to the rudder dynamics?

The aircraft is controlled by linear state feedback

u(t) = −Lx(t) + (Kf , Kf )T^ uf pilot(t),

where the matrix L is derived using linear quadratic control theory and the scalar Kf is chosen such that the steady-state gain is correct. The internal elevator and spoiler states are not used in the controllers, so L 16 = L 17 = L 26 = L 27 = 0.^6 The feedback stabilizes the angle of attack α and the pitch rate q. The pitch angle θ is not stabilized (and not used in the controller since L 13 = L 23 = 0), but the control of this mode is left for the pilot. The signal uf pilot is the filtered pilot command signal:

uf pilot =

Tf s + 1 upilot.

Write

planemodel

to see a Simulink model of the aircraft. Match the blocks in the model with the equations above.

  1. [1p] Choose a nominal design for the state feedback by typing

design

Look at the L-matrix. Which states are used in the feedback loop? Which are the eigenvalues of A−BL? Why is there an eigenvalue close to the origin? The pilot may be modeled as a PD-controller with a time delay of 0. 3 s. Argue why this is a reasonable model. Let upilot = Kp

1 + Tds 1 + Td/N s e−^0.^3 s(θref − θ),

where θref corresponds to the desired pitch angle. Set Kp = 0. 2 , Td = 0. 5 , and N = 10. Simulate the closed-loop system including the pilot. Check the magnitudes of the rudder angles (plot(t,x(:,[ 5]))). Why is it important that the rudder angles are not too large?

The PD-controller pilot model can be seen as a rational pilot. In an emergency situation, however, the pilot may panic and try to compensate the error θref − θ with maximal command signals.^7 This behavior may induce oscillations in the system. They are called pilot induced oscillations (PIO) and got considerable attention after the crash in Stockholm in 1993. Next we do a simplified analysis illustrating what happened.

(^6) In reality there are no measurements of the rudder angles δe and δs. They are estimated using a Kalman filter. (^7) Imagine yourself in a balancing act. When you are in control, you can keep the balance using very small motions, but as soon as you are a little out of control, your movements tends to be very large. This is typical for systems with slow unstable dynamics, which cannot react fast enough to the control commands signals.

  1. [1p] In order to analyze the PIO mode, we will replace the PD-controller pilot by a relay model. The pilot then gives maximal joystick commands based on the sign of θ. Such a “relay pilot” can be found in the Simulink pilot model library; run

pilotlib

Plot the Nyquist curve of the linear system from upilot to θ. This can be done by deleting the feedback path from θ, connecting an input and an output at appropriate places (inputs and outputs are found in the simulink libraries), saving the system to a new file and using the linmod and nyquist commands. Change pilot in the plane model by deleting the PD-controller pilot and inserting the “relay pilot”. The describing function for a relay is N (A) =

4 D

πA What is D for the “relay pilot”? Use describing function analysis to predict amplitude and frequency of a possible limit cycle. Simulate the system. How good is the prediction?

As you saw, the amplitude of the PIO is moderate. This is because the flight condition is high speed and high altitude, and thus not extreme. Let us anyway discuss ways to reduce PIO.

  1. [1p] Use design2 to change L and Kf to a faster design. Is the PIO amplitude decreased? Make the pilot filter faster by reducing the filter time constant to Tf = 0. 03 (design3). Is the PIO amplitude decreased? Discuss the results using the describing function method and thus plot the Nyquist curves from upilot to θ. Are there any drawbacks with the design that gives smallest PIO amplitude?
  2. [1p] Suggest a control strategy for reducing PIO in JAS 39 Gripen, with minimal influence on the pilots ability to manually control the plane. Analyze the performance of your strategy and compare it to the previous two designs. It should outperform the previous ones.

Extra [0p] There are no rate limitations on the rudders in the discussed aircraft model. Rate limitations were, however, part of the problems with the JAS 39 Gripen control system. Introduce rate limitations as in the article [2], and investigate what happens to the limit cycle. Try to understand the idea of the (patented) nonlinear filter.

References

[1] Axelsson, L., Reglerstudier av back-up regulator för JAS 39 Gripen, MSc Thesis, CTH/SAAB Flygdivision,

[2] Rundquist, L., K. Ståhl-Gunnarsson, and J. Enhagen, “Rate Limiters with Phase Compensation in JAS 39 Gripen,” European Control Conference, 1997.

Chapter 2

Exercises

2.1 Nonlinear Models and Simulation

EXERCISE 1.

The nonlinear dynamic equation for a pendulum is given by

ml θ¨ = −mg sin θ − kl θ,˙

where l is the length of the pendulum, m is the mass of the bob, and θ is the angle subtended by the rod and the vertical axis through the pivot point, see Figure 1.1.

θ

Figure 2.1: The pendulum in Exercise 1.

(a) Choose appropriate state variables and write down the state equations.

(b) Find all equilibria of the system.

(c) Linearize the system around the equilibrium points, and determine whether the system equilibria are stable or not.

EXERCISE 1.

We consider a bar rotating, with friction due to viscosity, around a point where a torque is applied. The non linear dynamic equation of the system is given by:

ml^2 θ¨ = −mgl sin(θ) − kl^2 θ˙ + C

where θ is the angle between the bar and the vertical axis, C is the torque (C > 0 ), k is a viscous friction constant, l is the length of the bar and m is the mass of the bar.

(a) Choose appropriate state variables and write down the state equations.

(b) Find all equilibria of the system, assuming that (^) mlgC < 1.

(c) Linearize the system around the equilibrium points and determine the eigenvalues for each equilibrium.

EXERCISE 1.

r

u

ψ(t, y)

y C(sI − A)−^1 B

Figure 2.2: The feedback system in Exercise 1.

Figure 2.2 shows a feedback connection of a linear time-invariant system and a nonlinear time-varying element. The variables r, u and y are vectors of the same dimension, and ψ(t, y) is a vector-valued function.

(a) Find a state-space model with r as input and y as output.

(b) Rewrite the pendulum model from Exercise 1.1 into the feedback connection form described above.