
Introduction Main Approaches Sampling Time Discretization and MATLAB Chapter 8: Discretization of Continuous-time Systems August 20, 2015 Chapter 8: Discretization of Continuous-time Systems Introduction Main Approaches Sampling Time Discretization and MATLAB Outline 1 Introduction 2 Main Approaches Numerical Integration Impulse Invariant Method Zero-pole Equivalent Hold Equivalent 3 Sampling Time 4 Discretization and MATLAB Commands Exercises Chapter 8: Discretization of Continuous-time Systems Introduction Main Approaches Sampling Time Discretization and MATLAB Discretization Use of discretization Many systems in the real world are continuous-time systems: chemical reactions, rocket trajectories, power plants, ice cap melting... Computers, however, are mainly digital. If we want to simulate the continuous system with a digital device, we need a method to convert the continuous model into a discrete one. This conversion is called "discretization". Discretization also comes in handy when a continuous filter with useful properties has been designed and a discrete filter with the same properties is required. In addition, discretization is also used in control. For instance, in order to design a digital controller it is necessary to have a discrete model of the plant, which is typically given in the form of differential equations. Chapter 8: Discretization of Continuous-time Systems Introduction Main Approaches Sampling Time Discretization and MATLAB Discretization Problem statement While converting, some information of the continuous model may be lost due to the different nature of the systems. It is important that the loss of information is minimized. Each discretization method has its own qualities and they will all lead to different discrete representations of the same continuous system. Discretization methods discussed in this chapter Numerical Integration Impulse Invariant Method Zero-pole Equivalent Hold Equivalents Chapter 8: Discretization of Continuous-time Systems Introduction Numerical Integration Main Approaches Impulse Invariant Method Sampling Time Zero-pole Equivalent Discretization and MATLAB Hold Equivalent Outline 1 Introduction 2 Main Approaches Numerical Integration Impulse Invariant Method Zero-pole Equivalent Hold Equivalent 3 Sampling Time 4 Discretization and MATLAB Commands Exercises Chapter 8: Discretization of Continuous-time Systems Introduction Numerical Integration Main Approaches Impulse Invariant Method Sampling Time Zero-pole Equivalent Discretization and MATLAB Hold Equivalent Outline 1 Introduction 2 Main Approaches Numerical Integration Impulse Invariant Method Zero-pole Equivalent Hold Equivalent 3 Sampling Time 4 Discretization and MATLAB Commands Exercises Chapter 8: Discretization of Continuous-time Systems Introduction Numerical Integration Main Approaches Impulse Invariant Method Sampling Time Zero-pole Equivalent Discretization and MATLAB Hold Equivalent Numerical Integration General approach For a given continuous-time integrator H(s) = U(s) = 1 u_ (t) = e(t) u(t) = R t e(τ)dτ E(s) s , , 0 its output at t = kTs can be written as follows: R (k−1)Ts R kTs u(kTs ) = 0 e(τ)dτ + (k−1)T e(τ)dτ ( s area of e(τ) u(kTs ) = u((k 1)Ts ) + (8.1) − over (k 1)Ts τ < kTs − ≤ where Ts is the sampling time. Chapter 8: Discretization of Continuous-time Systems ✬ ✩ Digitization of state space models 1. discretization by applying numerical integration rules : acontinuous-timeintegrator x˙(t)=e(t) ⇔ sX(s)=E(s) can be approximated using the forward rectangular ruleIntroduction or Euler’sNumerical Integration method Main Approaches Impulse Invariant Method Sampling Time Zero-pole Equivalent • Discretization and MATLAB Hold Equivalent Forward rectangular rule (=Forward Euler) xk+1 xk − = ek with xk = x(kTs) Ts e(t) General approach The area is approximated by the ⇔rectangle looking forward from z 1 (k 1) toward k with an − X(z)=amplitude− E equal(z to) the value of the function at (k 1). Ts − k-1 k k+1 t the backward rectangular rule • Chapter 8: Discretization of Continuous-time Systems xk+1 xk − = ek+1 e(t) Ts z 1 ⇔ − X(z)=E(z) zTs k-1 k k+1 t ✫ ✪ ESAT–SCD–SISTA CACSD pag. 51 Introduction Numerical Integration Main Approaches Impulse Invariant Method Sampling Time Zero-pole Equivalent Discretization and MATLAB Hold Equivalent Forward rectangular rule Mathematical approach From equation (8.1) we have that u(kTs ) = u (k 1)Ts + Ts e (k 1)Ts − − By taking the -transform we obtain the discrete equivalent of H(s), Z −1 −1 U(z) = z U(z) + Ts z E(z) −1 −1 z−1 , (1 z )U(z) = Ts z E(z) U(z) = E(z) − , Ts This means that we need to apply the following substitution in order to discretize a given continuous-time transfer function: s z−1 (8.2) Ts Chapter 8: Discretization of Continuous-time Systems ✬ ✩ Digitization of state space models 1. discretization by applying numerical integration rules : acontinuous-timeintegrator x˙(t)=e(t) ⇔ sX(s)=E(s) can be approximated using the forward rectangular rule or Euler’s method • xk+1 xk − = ek with xk = x(kTs) Ts e(t) z 1 ⇔ − X(z)=E(z) Ts k-1 k k+1 Introduction Numerical Integration t Main Approaches Impulse Invariant Method Sampling Time Zero-pole Equivalent the backward rectangularDiscretization rule and MATLAB Hold Equivalent • Backward rectangular rule (=Backward Euler) xk+1 xk − = ek+1 e(t) Ts General approach The area is approximated by the rectangle looking backward from k toward (k 1) with an ⇔ − z 1 amplitude equal to the value of − X(z)=the functionE at(zk. ) zTs k-1 k k+1 t ✫ Chapter 8: Discretization of Continuous-time Systems ✪ ESAT–SCD–SISTA CACSD pag. 51 Introduction Numerical Integration Main Approaches Impulse Invariant Method Sampling Time Zero-pole Equivalent Discretization and MATLAB Hold Equivalent Backward rectangular rule Mathematical approach From equation (8.1) we have that u(kTs ) = u (k 1)Ts + Ts e kTs − By taking the -transform we obtain the discrete equivalent of H(s), Z −1 U(z) = z U(z) + Ts E(z) −1 z−1 , (1 z )U(z) = Ts E(z) U(z) = E(z) − , zTs This means that we need to apply the following substitution in order to discretize a given continuous-time transfer function: s z−1 (8.3) zTs Chapter 8: Discretization of Continuous-time Systems Introduction Numerical Integration ✬ Main Approaches Impulse Invariant Method ✩ Sampling Time Zero-pole Equivalent the trapezoid rule or bilinearDiscretization and MATLAB transformationHold Equivalent • Bilinear rule (= trapezoidal or Tustin rule) xk+1 xk Generale approachk+1 + ek This method makes use of the e(t) − area= of the trapezoid formed by Ts the average of the2 selected rectangles used in the forward and backward rectangular ⇔rule.Thus the amplitude equal to 2 z 1 the value of the function at (k 1) and the amplitude equal − X(toz− the)= value ofE the( functionz) at Ts z +1 (k) are connected by a line as k-1 k k+1 t shown in the illustration. Chapter 8: Discretization of Continuous-time Systems Change a continuous model G(s)intoadiscretemodel Gd(z)byreplacingallintegratorswiththeirdiscreteequiv- alents : =projectionofthelefthalf-plane Euler backward rect. bilinear transf. z 1 z 1 2 z 1 s − s − s − Ts zTs Ts z+1 → Im → → Im Im Re Re Re Except for the forward rectangular rule stable continuous poles (grey zone) are guaranteed to be placed in stable discrete areas, i.e. within the unit circle. The bilinear transformation maps stable poles stable → poles and unstable poles unstable poles. → ✫ ✪ ESAT–SCD–SISTA CACSD pag. 52 Introduction Numerical Integration Main Approaches Impulse Invariant Method Sampling Time Zero-pole Equivalent Discretization and MATLAB Hold Equivalent Bilinear transformation Mathematical approach From equation (8.1) we have that e(kTs )+e (k−1)Ts u(kTs ) = u (k 1)Ts + Ts − 2 By taking the -transform we obtain the discrete equivalent of H(s), Z U(z) = z−1U(z) + Ts E(z) + z−1E(z) 2 , (1 z−1)U(z) = Ts (1 + z−1)E(z) 2 z−1 U(z) = E(z) − 2 , Ts z+1 This means that we need to apply the following substitution in order to discretize a given continuous-time transfer function: s 2 z−1 (8.4) Ts z+1 Chapter 8: Discretization of Continuous-time Systems Introduction Numerical Integration Main Approaches Impulse Invariant Method Sampling Time Zero-pole Equivalent Discretization and MATLAB Hold Equivalent Bilinear rule Example Given: s+1 H(s) = 0:1s+1 We now apply substitution (8.4): (2+T )(T −2)z−1 H(z) = (0:2+T )+(T −0:2)z−1 Using T=0.25s, this results in: 5(z−0:7778) H(z) = z+0:1111 Chapter 8: Discretization of Continuous-time Systems Introduction Numerical Integration Main Approaches Impulse Invariant Method Sampling Time Zero-pole Equivalent Discretization and MATLAB Hold Equivalent Discretization of state-space models General approach applied on Forward Euler Given the following continuous-time model in state-space form: x_ = Ax + Bu sX = AX + BU y = Cx + Du Y = CX + DU If we use the Forward Euler method, we have that s is replaced by z−1 , so we can find the discrete-time equivalent as follows: Ts z 1 − X = AX + BU Ts Y = CX + DU Chapter 8: Discretization of Continuous-time Systems Introduction Numerical Integration Main Approaches Impulse Invariant Method Sampling Time Zero-pole Equivalent Discretization and MATLAB Hold Equivalent Discretization of state-space models General approach applied on Forward Euler Which leads to the following zX = (I ATs )X + BTs U − x(k + 1) = (I ATs )x(k) + (BTs )u(k) − x(k + 1) = Ad x(k) + Bd u(k) The output equation Y = CX + DU remains. Chapter 8: Discretization of Continuous-time Systems ✬ ✩ The following continuous-time model is given : x˙ = Ax + Bu sX = AX + BU y = Cx + Du ⇔ Y = CX + DU z 1 following Euler’s method s is replaced by − ,so Ts z 1 − X = AX + BU Ts Introduction Numerical Integration Main Approaches Impulse Invariant Method or Sampling Time Zero-pole Equivalent Discretization and MATLAB Hold Equivalent zX =(I + AT )X + BT U Discretization of state-space modelss s the output equation Y = CX + DU remains.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages64 Page
-
File Size-