DISCRETE-TIME SYSTEMS AND DIGITAL CONTROLLERS

Similar documents
Exam in Automatic Control II Reglerteknik II 5hp (1RT495)

EXAMPLES EXAMPLE - Temperature in building

Exam in Systems Engineering/Process Control

AN EXTENSION OF GENERALIZED BILINEAR TRANSFORMATION FOR DIGITAL REDESIGN. Received October 2010; revised March 2011

Distributed Real-Time Control Systems

9 Controller Discretization

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

Lecture: Sampling. Automatic Control 2. Sampling. Prof. Alberto Bemporad. University of Trento. Academic year

Control Systems I. Lecture 6: Poles and Zeros. Readings: Emilio Frazzoli. Institute for Dynamic Systems and Control D-MAVT ETH Zürich

Norm invariant discretization for sampled-data fault detection

Lecture 4 Continuous time linear quadratic regulator

Ordinary Differential Equations I

SAMPLE SOLUTION TO EXAM in MAS501 Control Systems 2 Autumn 2015

DESIGN OF CMOS ANALOG INTEGRATED CIRCUITS

Exam in Systems Engineering/Process Control

Optimal Polynomial Control for Discrete-Time Systems

Notice the minus sign on the adder: it indicates that the lower input is subtracted rather than added.

Lecture Discrete dynamic systems

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

Chapter 4 Optimal Control Problems in Infinite Dimensional Function Space

Sampling of Linear Systems

Ordinary Differential Equations I

ELEG 305: Digital Signal Processing

ECE 301 Fall 2010 Division 2 Homework 10 Solutions. { 1, if 2n t < 2n + 1, for any integer n, x(t) = 0, if 2n 1 t < 2n, for any integer n.

Lecture 8 - IIR Filters (II)

Rational Implementation of Distributed Delay Using Extended Bilinear Transformations

ELEC2400 Signals & Systems

Methods for analysis and control of. Lecture 6: Introduction to digital control

10.4 Controller synthesis using discrete-time model Example: comparison of various controllers

EE263: Introduction to Linear Dynamical Systems Review Session 6

24 Butterworth Filters

Linear dynamical systems with inputs & outputs

Near Optimal LQR Performance for Uncertain First Order Systems

arxiv: v1 [math.oc] 5 Jul 2017

On the Stability of Linear Systems

V. IIR Digital Filters

Computer Control: An Overview

Time Response of Systems

Lecture 6: Deterministic Self-Tuning Regulators

CONTINUOUS TIME D=0 ZOH D 0 D=0 FOH D 0

Raktim Bhattacharya. . AERO 422: Active Controls for Aerospace Vehicles. Dynamic Response

LTI Systems (Continuous & Discrete) - Basics

Discrete-time linear systems

Control System Design

An Iir-Filter Example: A Butterworth Filter

/ / MET Day 000 NC1^ INRTL MNVR I E E PRE SLEEP K PRE SLEEP R E

UNIT - III PART A. 2. Mention any two techniques for digitizing the transfer function of an analog filter?

Problem Set 3: Solution Due on Mon. 7 th Oct. in class. Fall 2013

Ordinary Differential Equations II

SOLVING DIFFERENTIAL EQUATIONS. Amir Asif. Department of Computer Science and Engineering York University, Toronto, ON M3J1P3

Chapter 13 Digital Control

Optimal Discretization of Analog Filters via Sampled-Data H Control Theory

Control Systems I. Lecture 5: Transfer Functions. Readings: Emilio Frazzoli. Institute for Dynamic Systems and Control D-MAVT ETH Zürich

Using fractional delay to control the magnitudes and phases of integrators and differentiators

Discrete-time first-order systems

SUCCESSIVE POLE SHIFTING USING SAMPLED-DATA LQ REGULATORS. Sigeru Omatu

Discrete-time Controllers

Data-driven methods in application to flood defence systems monitoring and analysis Pyayt, A.

Intermediate Process Control CHE576 Lecture Notes # 2

2.161 Signal Processing: Continuous and Discrete Fall 2008

Lecture 8 - IIR Filters (II)

Lecture 9 Infinite Impulse Response Filters

ECEEN 5448 Fall 2011 Homework #4 Solutions

Differential and Difference LTI systems

GATE EE Topic wise Questions SIGNALS & SYSTEMS

Lecture 7 - IIR Filters

ECEN 420 LINEAR CONTROL SYSTEMS. Lecture 2 Laplace Transform I 1/52

Digital Control & Digital Filters. Lectures 13 & 14

Control Systems Lab - SC4070 Control techniques

Optimized Compact-support Interpolation Kernels

Section 6.5 Impulse Functions

Infinite-dimensional methods for path-dependent equations

Models for Sampled Data Systems

STABILITY ANALYSIS. Asystemmaybe stable, neutrallyormarginallystable, or unstable. This can be illustrated using cones: Stable Neutral Unstable

ELEC-E8101 Digital and Optimal Control (5 cr), autumn 2015

12/20/2017. Lectures on Signals & systems Engineering. Designed and Presented by Dr. Ayman Elshenawy Elsefy

Section 6.4 DEs with Discontinuous Forcing Functions

Control Systems Design

Chapter 8. Feedback Controllers. Figure 8.1 Schematic diagram for a stirred-tank blending system.

Exercise 5: Digital Control

Lecture A1 : Systems and system models

EE 380. Linear Control Systems. Lecture 10

Lecture 8: Discrete-Time Signals and Systems Dr.-Ing. Sudchai Boonto

Operator based robust right coprime factorization and control of nonlinear systems

Basic Procedures for Common Problems

Single-Input-Single-Output Systems

Ordinary Differential Equations II

Math 461 Homework 8. Paul Hacking. November 27, 2018

Ordinary Differential Equations I

Digital Control & Digital Filters. Lectures 21 & 22

Math 461 Homework 8 Paul Hacking November 27, 2018

Rank Tests for the Observability of Discrete-Time Jump Linear Systems with Inputs

EL1820 Modeling of Dynamical Systems

Smooth Path Generation Based on Bézier Curves for Autonomous Vehicles

Linear Algebra Review (Course Notes for Math 308H - Spring 2016)

1 Continuous-time Systems

Review: Continuous Fourier Transform

EECE Adaptive Control

Discrete-time signals and systems

Computing inverse Laplace Transforms.

Transcription:

DISCRETE-TIME SYSTEMS AND DIGITAL CONTROLLERS

In practice controllers are nowadays almost exclusively implemented digitally. This means that the controller operates in discrete time, although the controlled systems usually operate in continuous time. Therefore, the digital controller has to be connected to the system by interfaces which: transform the continuous-time system output y(t) to a discrete sequence {y k } which the digital controller can process, and transform the digital control sequence {u k } to a continuoustime control signal u(t) sent to the system. 2

A typical digital control system is shown in the figure. r k e k u k u H (t) G d D/A + H u(t) G p y(t) A/D y k Here: G p is the system to be controlled. G d is the digital controller. The block A/D transforms the continuous-time (analog) system output y(t) to a discrete-time (digital) sequence y k, k = 0, 1, 2,.... The block D/A transforms the (digital) control sequence u k, k = 0, 1, 2,... to a continuous-time (analog) control signal u H (t). H is a filter to smooth out discontinuities due from the digital-to -analog transformation. 3

The system output y(t) has first to be sampled at discrete time instants kh in an A/D (analog-to-digital) transformer to generate a discrete sequence, y k = y(kh), k = 0, 1, 2,... Here h is the sampling time. Sampling of a continuous-time signal implies loss of information, since several analog signals can give rise to the same discrete-time signal Example: Sampling of three different sinusoidal signal give the same discrete sequence ( o ). 4

Therefore, an analog low-pass prefilter is used to filter out high frequency components before sampling: y(t) y f (t) F A/D y k The digital controller G d then takes the sequence e k = r k y k, k = 0, 1, 2,... as its input to generate a discretetime control sequence u k, k = 0, 1, 2,.... The discrete-time control sequence u k is then transformed to a continuous-time control signal u H (t) using a D/A (digital-to-analog) transformer. Typically the D/A transformer generates a piecewise constant control signal given by u H (t) = u k, kh t < kh + h Finally, the discontinuities in u H (t) are smoothed out by a continuous-time filter H. See figure: 5

u k u H (t) D/A H u(t) H t 6

Digital controllers The continuous-time standard P-, I-, PI- and PID-controllers can be generalized in a straightforward way to obtain their discrete-time counterparts: Discrete-time (digital) P-controller: Digital I-controller: Digital PID-controller: u k = K p e k + K i u k = K p e k u k = K i k n=1 k e n n=1 e n + K d [e k e k 1 ] The digital PID-controller is usually implemented using the so-called velocity form, u k = u k 1 +K p [e k e k 1 ]+K i e k +K d [e k 2e k 1 + e k 2 ] which is obtained by subtracting u k 1 from u k. An advantage of the velocity form is that there is no need to keep track of the sum. 7

Discrete-time systems In order to study systems under digital control we should describe how the sampled, discrete-time, system output y k depends on the discrete-time input u k. The discrete-time counterpart of continuous-time systems described by differential equations are systems described by difference equations. A first-order discrete-time system is described by the difference equation y k+1 + ay k = bu k Similarly, a second-order discrete-time system is described by the difference equation y k+2 + a 1 y k+1 + a 2 y k = b 1 u k+1 + b 2 u k Remark: Observe that the systems above are discrete-time systems, but not digital, as the signals real numbers. A digital system has the additional property that the signals and parameters are represented digitally. 8

Discrete-time transfer functions The theory for continuous-time dynamical systems has a counterpart for discrete-time systems. In particular, instead of the differential operator, we can for discrete-time systems define the forward shift operator q such that qy k = y k+1 Then the first-order system takes the form y k+1 + ay k = bu k qy k + ay k = bu k or y k = b q + a u k Here G[q] = b q + a is the discrete-time transfer function. 9

Similarly, the second-order system y k+2 + a 1 y k+1 + a 2 y k = b 1 u k+1 + b 2 u k can be written as q 2 y k + a 1 qy k + a 2 y k = b 1 qu k + b 2 u k or where y k = G[q]u k b 1 q + b 2 G[q] = q 2 + a 1 q + a 2 10

Response of discrete-time systems In analogy with continuous-time systems, the response of a discrete-time systems is obtained by solving the difference equation. Example - First-order system As a simple example, we can determine the output of the first-order system y k+1 + ay k = bu k By applying the system equation recursively to compute y 1, y 2,..., y k we obtain y k = ( a) k y 0 + k 1 ( a) k n 1 bu n n=0 In particular, the step response for the input u k = u step with initial condition y 0 = 0 is y k = k 1 n=0 ( a) k n 1 b u step = ( 1 a + ( a) 2 + ( a) 3 + + ( a) k 1) b u step = 1 + ( a)k 1 + a b u step The response of second-order and higher-order discretetime systems can be determined in a way similar to the continuous-time case. 11

Stability The above example shows that the output of the firstorder system remains bounded for bounded inputs if and only if a < 1. Equivalently, the pole q p = a of the transfer function G[q] = b q + a should be less than 1 in magnitude. This feature generalizes to higher-order discrete-time systems, and we have: A discrete-time system is stable if and only if all the poles q p,i of its transfer function G[p] (i.e., the zeros of its denominator) satisfy q p,i < 1. Observe that for second and higher order systems, the poles may be complex numbers, and q p,i is then the absolute value of this complex number. 12

Backward shift operator An alternative to the forward shift operator q is to use the backward shift operator q 1, such that Then the first-order system or, equivalently, takes the form q 1 y k = y k 1 y k+1 + ay k = bu k y k + ay k 1 = bu k 1 y k + aq 1 y k = bq 1 u k 1 or y k = bq 1 1 + aq 1u k = G[q]u k where the discrete transfer function G[q] is given by G[q] = bq 1 1 + aq 1 Expressing G[q] in terms of q (instead of q 1 ), we have G[q] = b q + a which is the same expression as before. 13

Construction of discrete-time models for continuous-time systems When dealing with digital controller, an important question is to construct a discrete-time model which relates the inputs, u(t) and d(t), to the sampled outputs y k = y(kh) of a system described by a differential equation. Example consider the first-order system dy(t) dt + ay(t) = bu(t) + cd(t) A simple way to construct an approximate discrete-time model is to introduce the finite-difference approximation dy(t) dt 1 [y(t + h) y(t)] h Using this approximation at time t = kh would give the discrete-time approximation 1 [y(kh + h) y(kh)] + ay(kh) = bu(kh) + cd(kh) h or y(kh + h) + (ha 1)y(kh) = hbu(kh) + hcd(kh) 14

Second derivative: similarly, a finite-difference approximation of a second derivative is given by dy 2 (t) dt 2 1 h y(t + h) y(t) h y(t) y(t h) h = 1 [y(t + h) 2y(t) + y(t h)] h2 Problems with finite-difference approximations of the derivatives: the resulting discrete-time model is often not very accurate. the discrete-time model may be unstable even though the original system is stable, or vice versa. For example, in the above first-order example, the continuoustime system is stable if a > 0, but the discrete-time model will be unstable if the sampling time is too long, so that ha 1 > 1 (or h > 2/a) holds. 15

Tustin s method (bilinear transform) A more accurate way to discretize a continuous-time system is to use the trapezoidal rule. Again, we illustrate the method on the first-order system dy(t) dt + ay(t) = bu(t) (omitting d(t) for simplicity). Given y(kh) at time t = kh, we obtain y(kh + h) by integration: y(kh + h) = y(kh) + kh+h kh [ ay(τ) + bu(τ)] dτ Here we can approximate the integral using the trapezoidal rule: t 2 t 1 f(τ)dτ t 2 t 1 2 [f(t 2 ) + f(t 1 )] 16

This gives: I = kh+h kh h 2 [ ay(τ) + bu(τ)] dτ [ ay(kh) + b(kh) ay(kh + h) + b(kh + h)] Introducing the approximation into the expression for y(kh): y(kh + h) = y(kh) + h [ ay(kh) + bu(kh) 2 ay(kh + h) + bu(kh + h)] Solving for y(kh + h): y(kh+h) = 1 ah/2 1 + ah/2 or where bh/2 y(kh)+ [u(kh + h) + u(kh)] 1 + ah/2 y k+1 + a d y k = b d u k+1 + b d u k a d = 1 ah/2 1 + ah/2, b d = bh/2 1 + ah/2 17

There is an interesting and important relation between the transfer function of the continuous-time system and the discrete-time transfer function of the discretized system obtain by the trapezoidal approximation. Recalling the transfer function of a discrete-time system, the discrete-time system can be expressed as y(kh) = G[q] u(kh) where the transfer function is given by G[q] = b dq + b d q + a d bh/2 = 1 + ah/2 q + 1 q 1 ah/2 1+ah/2 This can be simplified to: G[q] = b 2 q 1 h q+1 + a Recalling that the original continuous-time system has the transfer function G(p) = b p + a we see that G[q] and G(p) are related by according to: G[q] = G(p) p= 2 h q 1 q+1 18

This property can be generalized, so that approximating the solution of a linear differential equation by the trapezoidal rule is equivalent to substituting the differential operator p in the continuous-time transfer function by p = 2 q 1 h q + 1 to obtain the corresponding discrete-time transfer function. This transformation is known as the Tustin transform or the bilinear transform. An important and valuable property of the transformation is that it preserves stability properties. We have: The discrete-time system G[q] = G(p) p= 2 h q 1 q+1 is stable if and only if the continuous-time system G(p) is stable 19