Αθανάσιος Σκόδρας 2610 99 61 67 / 2610 9 97 2 97 skodras@upatras.gr http://www.ece.upatras.gr/gr/personnel/faculty.html?id=672 Ώρες Γραφείου: Τετάρτη Πέµπτη Παρασκευή 11:00-12:00 Γραφείο: 1 ος όροφος Τομέας Συστημάτων & Αυτομάτου Ελέγχου Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 1
Στόχοι Μαθήµατος Το µάθηµα αυτό πραγµατεύεται την ανάλυση και σχεδίαση συστηµάτων ψηφιακού ελέγχου. Αφού επαναλάβουµε τις βασικές έννοιες των διακριτών σηµάτων και συστηµάτων, τη δειγµατοληψία και τον µετασχηµατισµό z, θα προχωρήσουµε στην ανάλυση και σχεδίαση διακριτού χρόνου συστηµάτων ελέγχου ανοικτού και κλειστού βρόχου, στη µελέτη της ευστάθειάς τους και στα θέµατα που σχετίζονται µε την υλοποίησή τους µε µικροελεγκτές. Σχετικά µε το Μάθηµα Διαλέξεις - 13 εβδοµάδες (3 ώρες/εβδ Θεωρία & Ασκήσεις) Αξιολόγηση γραπτές εξετάσεις Ιουνίου & προαιρετική εργασία (project) Σηµειώσεις - Διαφάνειες eclass - https://eclass.upatras.gr/courses/ee862/ Βιβλία - https://service.eudoxus.gr/public/departments/courses/1333/2013 Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 2
Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 3
Πρόσθετη Βιβλιογραφία Digital Control System Analysis and Design, Charles L. Phillips, H. Troy Nagle "Digital Control Engineering: Analysis and Design", M. Sami Fadali, Antonio Visioli Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 4
ΓΙΑΤΙ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ? 1. ΑΚΡΙΒΕΙΑ ΥΠΟΛΟΓΙΣΜΩΝ (ACCURACY) 2. ΑΚΡΙΒΕΙΑ ΑΝΑΠΑΡΑΣΤΑΣΗΣ ΕΙΣΟΔΟΥ-ΕΞΟΔΟΥ 3. ΕΥΕΛΙΞΙΑ (FLEXIBILITY) 4. ΤΑΧΥΤΗΤΑ (SPEED) 5. ΚΟΣΤΟΣ Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 5
Why Digital Control? Because: Digital computers are inexpensive Advantages: Greater flexibility (adaptive filters easily implemented) Self-test can be built-in Perfect reproducibility Guaranteed accuracy High noise immunity and power supply rejection No drift Superior performance Time-sharing possibility Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 6
ΒΑΣΙΚΗ ΔΟΜΗ ΣΥΣΤΗΜΑΤΟΣ ΨΗΦΙΑΚΟΥ ΕΛΕΓΧΟΥ Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 7
ΠΑΡΑΔΕΙΓΜΑ ΣΥΣΤΗΜΑΤΟΣ ΨΗΦΙΑΚΟΥ ΕΛΕΓΧΟΥ Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 8
ΠΑΡΑΔΕΙΓΜΑ ΣΥΣΤΗΜΑΤΟΣ ΨΗΦΙΑΚΟΥ ΕΛΕΓΧΟΥ Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 9
ΠΑΡΑΔΕΙΓΜΑ ΣΥΣΤΗΜΑΤΟΣ ΨΗΦΙΑΚΟΥ ΕΛΕΓΧΟΥ Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 10
Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 11
Types of signals Analog: Continuous Time & Continuous Amplitude Sampled: Discrete Time & Continuous Amplitude Digital: Discrete Time & Discrete Amplitude Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 12
SEQUENCES where n is an integer and T is the interval between time samples i.e. sampling period. Note: It is common practice to write simply x(n) instead of x(nt). Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 13
BASIC SEQUENCES 4Unit sample or Unit impulse sequence 4Unit step sequence Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 14
4Constant sequence 4Linear sequence Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 15
Exponential 0<a<1 a>1 1<a<0 a<-1 Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 16
r<1 r>1 r=1 Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 17
SHIFTED SEQUENCES 4Shifted sample sequence: i.e. where the argument of ( ) is zero. Examples: Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 18
4Shifted Unit Step sequence: i.e. where the argument of u( ) is zero or positive. Examples: Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 19
4Pulse: 4Unit sample (impulse): i.e. (n) is referred to as the first-order difference of u(n). Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 20
Any sequence can be described as as weighted sum of shifted unit samples: ( ) = x( m) x n m = δ( n m) Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 21
Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 22
Periodic sequences: Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 23
Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 24
Άσκηση Να εκφράσετε τον παλµό διακριτού χρόνου p(n) ως συνδυασµό βηµατικών ακολουθιών Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 25
Λύση 1 Η ακολουθία p(n) µπορεί να εκφραστεί ως διαφορά δύο βηµατικών ακολουθιών, από τις οποίες η µία είναι ολισθηµένη ως προς την άλλη κατά 4 µονάδες (δείγµατα). Έχουµε, δηλαδή, p(n) = u(n) u(n 4) Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 26
Λύση 2 p(n) = δ(n) + δ(n 1) + δ(n 2) + δ(n 3) δ(n) = u(n) u(n 1) δ(n 1) = u(n 1) u(n 2) δ(n 2) = u(n 2) u(n 3) δ(n 3) = u(n 3) u(n 4) Προσθέτοντας κατά µέλη καταλήγουµε και πάλι στο ίδιο αποτέλεσµα p(n) = u(n) u(n 4). Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 27
Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 28
SYSTEMS Definition: A discrete-time system is a device or algorithm that operates on an input sequence to produce an output sequence according to some rule or computational procedure. Example systems: - savings account system - radar system - algorithm performing numerical analysis - filter to eliminate unwanted signals System properties: - Linearity - Time-Invariance (Shift-Invariance) - Stability - Causality Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 29
Continuous & Discrete Systems Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 30
4Linearity Arbitrary input seq. x 1 (n) and x 2 (n) cause the system to have outputs y 1 (n) and y 2 (n). If an input given by x 3 (n)=a 1 x 1 (n)+a 2 x 2 (n) where a 1,a 2 are complex constants, yields an output y 3 (n), which is equal to y 3 (n)=a 1 y 1 (n)+a 2 y 2 (n) then the system is said to be linear (superposition property). Note: A linear system can change the amplitude and phase of a sinusoidal input, but cannot change its frequency or functional form. Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 31
produces 4Time-Invariance: x 1 (n) y 1 (n) Assume a shifted version of x 1 (n): x 2 (n)=x 1 (n-n 0 ). If the output y 2 (n) caused by x 2 (n) is a delayed replica of y 1 (n), i.e. y 2 (n)=y 1 (n-n 0 ) and for arbitrary x 1 (n) and n 0, then the system is said to be time-invariant or shiftinvariant. This property indicates whether of not the system itself is changing with time or the system parameters are changing with time. Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 32
4Stability: If the input to a system is bounded (the input magnitude does not grow without bound), and if the system is stable, then the output must also be bounded. (BIBO - Bounded Input Bounded Output) 4Causality: A casual system is a nonpredictive system in the sense that the output does not precede the input. or A causal system is one for which the output at any sample N 1 depends only upon the input for or In a causal system, it is the input signal that causes the output signal to occur. Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 33
LTI system response Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 34
Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 35
Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 36
Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 37
convolution or Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 38
Convolution Example Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 39
Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 40
Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 41
Convolution Example Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 42
Convolution Example Convolution can be calculated as an ordinary multiplication BUT WITHOUT carrying digits from one column to the next Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 43
Convolution Properties Αντιμεταθετική Προσεταιριστική Επιμεριστική Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 44
Stability: An LTI system is stable if its impulse response is absolutely summable: Proof: Taking the absolute value of both sides we obtain: If the input is bounded, there exists a finite number Mx such that By substituting this upper bound for x(n) we get: Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 45
The output will be bounded if the impulse response of the system satisfies the condition This condition is not only sufficient but it is also necessary to ensure the stability of the system. Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 1 ΔΙΑΦΑΝΕΙΑ 46