introduction to digital control
play

Introduction to Digital Control Angelo Cenedese Dipartimento di - PowerPoint PPT Presentation

Introduction to Digital Control Angelo Cenedese Dipartimento di Tecnica e Gestione dei Sistemi Industriali Universit di Padova angelo.cenedese@unipd.it A.Y. 2008-2009 Introduction Direct Digital Control (DDC) Feedback control system where


  1. Introduction to Digital Control Angelo Cenedese Dipartimento di Tecnica e Gestione dei Sistemi Industriali Università di Padova angelo.cenedese@unipd.it A.Y. 2008-2009

  2. Introduction Direct Digital Control (DDC) Feedback control system where the controller action is attained numerically by a y y y programmable digital device disturbances output reference Control output Actuator Process Algorithm g I/O Transducer input Microprocessor ( μ p) The overall system is an hybrid system or a sampled data system: digital part (discrete The overall system is an hybrid system or a sampled data system: digital part (discrete time: controller)+ analogic part (continuous time: process, actuator, tranducer) A.Cenedese Introduction to Digital Control 1

  3. Direct Digital Control disturbances output reference Control output Actuator Process Algorithm g I/O Transducer input Microprocessor ( μ p) A.Cenedese Introduction to Digital Control 2

  4. Control Algorithm Feedback Clock Reference Elaboration Output to p signal i l W it Wait interrupt reading (control algorithm) actuator acquisition Microprocessor ( μ p) � The interrupt is provided by a Real Time Clock RTC. � The interrupt is provided by a Real Time Clock RTC. � The reference is already available in digital format or is computed in real time or is an analogical signal acquired by the transducer � Control at discrete times regularly spaced every T (sampling time) given by the RTC � The control algo output signal is piecewise constant � The controller acts in the “digit domain” (works with numbers) while input signals � Th t ll t i th “di it d i ” ( k ith b ) hil i t i l to the plant (actuator commands) and output signals from the transducer (measurements) are usually analog signals . � There is therefore need for a suitable interface between the digital and the analog � h h f d f bl b h d l d h l parts of the system. A.Cenedese Introduction to Digital Control 3

  5. Direct Digital Control disturbances output reference Control output Actuator Process Algorithm g I/O Transducer input Microprocessor ( μ p) A.Cenedese Introduction to Digital Control 4

  6. Input interface (to the controller) – 1 V FS ADC - A/D Analog to Digital Converter: It provides the sampling of the analog ADC signal from the transducer and the V conversion into a sequence of bits bit Uniform quantization Uniform quantization Nonuniform quantization Nonuniform quantization A.Cenedese Introduction to Digital Control 5

  7. Input interface (to the controller) – 2 Uniform quantization: � Given: � Gi Number of bits n ( � number of levels) Full scale value FS ( � maximum value managed by the device) Analog signal V FS q = Quantization step (quantum) q : n 2 � Quantization ( nonlinear operation ): ⎛ ⎞ ⎛ ⎞ 1 1 → → = = < < < < + + ⎜ ⎜ ⎟ ⎟ ⎜ ⎜ ⎟ ⎟ V V Q[V] Q[V] nq nq if if n n - q q V V n n q q 2 2 ⎝ ⎠ ⎝ ⎠ � ADC Mathematical model: � ADC Mathematical model: V n bits Q T A.Cenedese Introduction to Digital Control 6

  8. Output interface (from the controller) DAC - D/A Digital to Analog Converter: It converts a binary digit into the analog signal It converts a binary digit into the analog signal V FS V FS commanding the actuator (voltage or current, proportional in value to the input signal value). DAC V bit bit The converter also interpolates the signal: ZOH - Zero Order Hold o holder output t input Note: the output interface problem is of immediate solution when the actuator is a digital actuator , that is a system that “accepts number as its own inputs” (e.g. step motor: the input is the number of rotation steps to advance – and not the rotation angle…) A.Cenedese Introduction to Digital Control 7

  9. Direct Digital Control scheme DDC scheme is therefore: Rif. Actuator ControlAlgo H 0 Process - Transducer T Q Note: reference is a digital signal (already acquired/in memory) DDC raises two main issues related to sampling and quantization: 1. Error correction happens only at discrete times ( � sampling) 2. Nonlinearities are present in the system ( � quantization) A.Cenedese Introduction to Digital Control 8

  10. Example: Control System Design Control Actuator Rif. Algo Process - 1.4 Transducer CONT DISC DISC 1.2 1 0.8 ut outpu 0.6 0.4 0.2 Control Actuator Rif. H 0 0 Algo Process 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 - time Transducer Transducer T Q A.Cenedese Introduction to Digital Control 9

  11. Sampling effects – 1 The discrete time signal obtained by sampling a continuous time signal shows a spectrum that is periodic with sample period related to the sampling frequency: Ω =2 π /T Example: = ω u(t) U sen( t) 0 0 - ω 0 ω 0 - Ω /2 Ω /2 πω ⎛ ⎞ 2 -( Ω - ω 0 ) Ω - ω 0 2 Ω - ω 0 Ω + ω 0 = -( Ω + ω 0 ) -(2 Ω - ω 0 ) ⎜ ⎟ u(T) U sen 0 Ω Ω ⎝ ⎝ ⎠ ⎠ 0 0 - Ω Ω - ω 0 ω ω ω 0 -2 Ω 2 Ω Ω Ω 2 Ω 2 Ω Ω ω > In this case ( Nyquist frequency )… 0 2 2 Ω − ω < ω There appears “new” components at low frequency 0 0 � Aliasing o Frequency Folding A.Cenedese Introduction to Digital Control 10

  12. Sampling effects – 2 � If the feedback signal contains spectral components at a frequency higher than the Nyquist frequency , these are replicated at lower frequency within the passband of the yq f q y p f q y p f closed system and are seen by the controller as disturbances to be compensated. � To avoid the phenomenon, the Nyquist frequency should be significantly higher � To avoid the phenomenon, the Nyquist frequency should be significantly higher then the closed system passband. A.Cenedese Introduction to Digital Control 11

  13. Sampling effects – 3 � In addition, a random high-frequency noise is often superimposed to the feedback g f q y f p p f signal: electronic noise from the transducer electronics or from the link controller/transducer + electromagnetic disturbances. � Anti-aliasing filter : L(s) ( ) Y(s) R(z) D(z) G(s) H 0 - U(s) N(s) Anti-aliasing filter filter A.Cenedese Introduction to Digital Control 12

  14. Quantization – 1 � In a DDC system quantization’s are present other than that introduced by the ADC: the digital CPU resorts to finite length digital words (8-16-32-64 bits) and to a g f g g ( ) suitable mathematics (fixed point vs floating point). 1. Coefficient quantization: The (linear) control algo implies sums and multiplications that are “chosen” Th (li ) l l i li d l i li i h “ h ” when the control law is designed (controller synthesis). Coefficients are discretized into finite length word starting from their continuous value counterpart. 2. Multiplication quantization: Multiplication between two n-bit numbers is a 2n-bit number that has to be M l l b b b 2 b b h h b represented according to the chosen n-bit format. Truncation or rounding are used to obtain this result. 3. Output quantization: Often the output of the control algorithm has a number of bits higher than the Often the output of the control algorithm has a number of bits higher than the system representation, requiring the so called “output quantization” A.Cenedese Introduction to Digital Control 13

  15. Quantization – 2 � To synthesize a controller, we firstly neglect quantizations that are conversely taken into account through numerical simulations or experimental validations. g p G(s) C(z) H 0 - - G(s) is the process transfer function (linear analog process) G(s) is the process transfer function (linear analog process) C(z) is the controller algorithm (discrete and usually linear) � The two sampling devices are synchronized, therefore the following scheme can be � Th t li d i h i d th f th f ll i h b adopted: sampled error scheme C(z) H 0 G(s) - A.Cenedese Introduction to Digital Control 14

  16. Discrete Linear Time Invariant (DLTI) systems � Discrete system: Input and output signals are discrete time signals Digital Controllore H 0 Process P R O C E S S O controller Digitale T � DLTI system: � DLTI t sistema discreto discreto DLTI DLTI u(k) y(k) It can be described by a N-order linear difference equation : N M ∑ ∑ = − + − y ( k ) a y ( k i ) b u ( k j ) i j = = i 1 j 0 “initial conditions” � N output values + M input values + current u(k) A.Cenedese Introduction to Digital Control 15

  17. Impulse Response � Discrete impulse δ (k) � impulse response h(k) δ (k) δ (k) Sistema Sistema h(k) h(k) DLTI discreto 0 1 k � Any signal u(k) can be written as a sum of many discrete impulses � Any signal u(k) can be written as a sum of many discrete impulses ∞ ∑ = δ − u ( k ) u ( i ) ( k i ) i − ∞ � As for the output: ∞ ∞ system causality system causality k k ∑ ∑ = − = − y ( k ) u ( i ) h ( k i ) y ( k ) u ( i ) h ( k i ) i i − ∞ − ∞ k k input causality ∑ ∑ = − = − y ( k ) u ( i ) h ( k i ) h ( j ) u ( k j ) i j 0 0 0 0 A.Cenedese Introduction to Digital Control 16

Recommend


More recommend