L. DRITSAS 2008/2009 0 Τα ηλεκτρικά κυκλώματα ως συστήματα...2 1 Παράδειγμα Ηλεκτρ. Συστήματος πρώτης τάξης: κύκλωμα «RC» με Εξοδο στον πυκνωτή (=Low Pass Filter - LPF)...4... Καταστατικές Εξισώσεις «RC»...4... ΑΜΔ: Απόκριση Μηδενικής Διέγερσης (Zero Input response)...5... ΑΜΚ: Απόκριση Μηδενικής Κατάστασης (Zero State response)...5 ΓΡΑΜΜΙΚΟΤΗΤΑ ΣΥΝΟΛΙΚΗ ΛΥΣΗ = ΑΜΔ + ΑΜΚ...6... ΤΟ ΙΔΙΟ ΑΠΟΤΕΛΕΣΜΑ ΜΕΣΩ LAPLACE...6 «RC» με Εξοδο στον πυκνωτή: Συνοψη...7 2 Παράδειγμα Ηλεκτρ. Συστήματος πρώτης τάξης: κύκλωμα «RC» με Εξοδο στον αντιστάτη (=High Pass Filter - HPF)...8 3 Παράδειγμα Ηλεκτρ. Συστήματος δεύτερης τάξης: κύκλωμα «RLC»...9...συνάρτηση μεταφοράς (transfer function)...9...καταστατικές εξισώσεις (state space analysis)...9...πόλοι / Ιδιοτιμές: (ΠΑΡΑΔΕΙΓΜΑ «RLC»)...11...eig(A)...11...Ευστάθεια / Αστάθεια...12...Γενίκευση...13 4 Επίλυση Καταστατικών Εξισώσεων: Γενίκευση για οποιοδήποτε «Γραμμικό Χρονικά Αμετάβλητο» σύστημα (LTI)...13...στο πεδίο του χρόνου (Πίνακας Μετάβασης -Transition Matrix)...14...στο πεδίο της συχνότητας...14 ΓΡΑΜΜΙΚΟΤΗΤΑ ΣΥΝΟΛΙΚΗ ΛΥΣΗ = ΑΜΔ + ΑΜΚ...15 4a Παράδειγμα Επίλυσης Καταστατικών Εξισώσεων: «RLC» step response...16 4b Παράδειγμα Επίλυσης Καταστατικών Εξισώσεων: «RLC» sinusoidal resp...18 5a Laplace Tables...19 5b Laplace Properties...21 6 Προσομοίωση σε Η/Υ...22 6a Προσομοίωση RC σε Η/Υ (tf, step, bode)...22 6b Προσομοίωση Συστημάτων σε Η/Υ (tf, zpk, ss, step, pole, eig, bode)23 Οι περισσότερες απο τις διαφάνειες είναι πνευματικό προιόν του Καθηγητή Ιωάννη Λυγερού τον οποίο και ευχαριστώ για την άδεια που μου έδωσε να τις χρησιμοποιήσω Λ. Δρίτσας LYGEROS_Dritsas_ElectricalSys DRITSAS-2008/09 Page 1 of 25
0 Τα ηλεκτρικά κυκλώματα ως συστήματα LYGEROS_Dritsas_ElectricalSys DRITSAS-2008/09 Page 2 of 25
LYGEROS_Dritsas_ElectricalSys DRITSAS-2008/09 Page 3 of 25
1 Παράδειγμα Ηλεκτρ. Συστήματος πρώτης τάξης: κύκλωμα «RC» με Εξοδο στον πυκνωτή (=Low Pass Filter - LPF)... Καταστατικές Εξισώσεις «RC» LYGEROS_Dritsas_ElectricalSys DRITSAS-2008/09 Page 4 of 25
... ΑΜΔ: Απόκριση Μηδενικής Διέγερσης (Zero Input response)... ΑΜΚ: Απόκριση Μηδενικής Κατάστασης (Zero State response) LYGEROS_Dritsas_ElectricalSys DRITSAS-2008/09 Page 5 of 25
ΓΡΑΜΜΙΚΟΤΗΤΑ ΣΥΝΟΛΙΚΗ ΛΥΣΗ = ΑΜΔ + ΑΜΚ... ΤΟ ΙΔΙΟ ΑΠΟΤΕΛΕΣΜΑ ΜΕΣΩ LAPLACE LYGEROS_Dritsas_ElectricalSys DRITSAS-2008/09 Page 6 of 25
«RC» με Εξοδο στον πυκνωτή: Συνοψη LYGEROS_Dritsas_ElectricalSys DRITSAS-2008/09 Page 7 of 25
2 Παράδειγμα Ηλεκτρ. Συστήματος πρώτης τάξης: κύκλωμα «RC» με Εξοδο στον αντιστάτη (=High Pass Filter - HPF) LYGEROS_Dritsas_ElectricalSys DRITSAS-2008/09 Page 8 of 25
3 Παράδειγμα Ηλεκτρ. Συστήματος δεύτερης τάξης: κύκλωμα «RLC»...συνάρτηση μεταφοράς (transfer function)...καταστατικές εξισώσεις (state space analysis) LYGEROS_Dritsas_ElectricalSys DRITSAS-2008/09 Page 9 of 25
LYGEROS_Dritsas_ElectricalSys DRITSAS-2008/09 Page 10 of 25
...Πόλοι / Ιδιοτιμές: (ΠΑΡΑΔΕΙΓΜΑ «RLC»)...eig(A) LYGEROS_Dritsas_ElectricalSys DRITSAS-2008/09 Page 11 of 25
...Ευστάθεια / Αστάθεια LYGEROS_Dritsas_ElectricalSys DRITSAS-2008/09 Page 12 of 25
...Γενίκευση 4 Επίλυση Καταστατικών Εξισώσεων: Γενίκευση για οποιοδήποτε «Γραμμικό Χρονικά Αμετάβλητο» σύστημα (LTI) LYGEROS_Dritsas_ElectricalSys DRITSAS-2008/09 Page 13 of 25
...στο πεδίο του χρόνου (Πίνακας Μετάβασης - Transition Matrix)...στο πεδίο της συχνότητας LYGEROS_Dritsas_ElectricalSys DRITSAS-2008/09 Page 14 of 25
ΓΡΑΜΜΙΚΟΤΗΤΑ ΣΥΝΟΛΙΚΗ ΛΥΣΗ = ΑΜΔ + ΑΜΚ LYGEROS_Dritsas_ElectricalSys DRITSAS-2008/09 Page 15 of 25
4a Παράδειγμα Επίλυσης Καταστατικών Εξισώσεων: «RLC» step response LYGEROS_Dritsas_ElectricalSys DRITSAS-2008/09 Page 16 of 25
LYGEROS_Dritsas_ElectricalSys DRITSAS-2008/09 Page 17 of 25
4b Παράδειγμα Επίλυσης Καταστατικών Εξισώσεων: «RLC» sinusoidal resp. LYGEROS_Dritsas_ElectricalSys DRITSAS-2008/09 Page 18 of 25
5a Laplace Tables LYGEROS_Dritsas_ElectricalSys DRITSAS-2008/09 Page 19 of 25
LYGEROS_Dritsas_ElectricalSys DRITSAS-2008/09 Page 20 of 25
5b Laplace Properties LYGEROS_Dritsas_ElectricalSys DRITSAS-2008/09 Page 21 of 25
6 Προσομοίωση σε Η/Υ 6a Προσομοίωση RC σε Η/Υ (tf, step, bode) LYGEROS_Dritsas_ElectricalSys DRITSAS-2008/09 Page 22 of 25
6b Προσομοίωση Συστημάτων σε Η/Υ (tf, zpk, ss, step, pole, eig, bode) disp('l-dritsas: Creating Continuous-Time Models 17Oct08 20:00') clear all; close all; clc % Creating Continuous-Time LTI Models % using the tf, zpk, ss, and frd commands. % * Transfer function (TF) models % * Zero-pole-gain (ZPK) models % * State-space (SS) models % % These functions take model data as input and create objects that embody % this data in a single MATLAB variable. % Transfer functions are specified by their numerator and denominator % polynomials A(s) and B(s). In MATLAB, a polynomial is represented by % the vector of its coefficients, for example, the polynomial fprintf('\n'); disp('====================================================') disp(' *** 1a Transfer function (TF) models *** '); disp(' Transfer functions (TF) are frequency-domain representations of LTI systems ') disp('=====================================================') fprintf('\n'); disp('create a TF object representing the transfer function s/(s^2 + 2 s + 10)') %--------------------------------------------------------------------- disp('to create a TF object representing a transfer function...') disp('specify the numerator and denominator polynomials ') disp('and use tf to construct the TF object') disp('in MATLAB, a polynomial is represented by ') disp('the vector of its coefficients, for example, the polynomial') disp('s^{2} + 2 s + 10 is specified as [1 2 10] ') num = [ 1 0 ]; % Numerator: s den = [ 1 2 10 ]; % Denominator: s^2 + 2 s + 10 Htf = tf(num,den) fprintf('\n'); disp('=======================================================') disp(' *** 1b Transfer function (TF) models using Laplace variable s *** '); disp('=======================================================') % Alternatively, you can specify this model as a rational expression of the %Laplace variable s : s = tf('s'); % Create Laplace variable Hs = s / (s^2 + 2*s + 10) LYGEROS_Dritsas_ElectricalSys DRITSAS-2008/09 Page 23 of 25
fprintf('\n'); disp('======================================================') disp(' *** 2 Zero-Pole-Gain Models (ZPK) models *** '); disp('======================================================') % Zero-pole-gain (ZPK) models are the factored form of transfer functions: % $$ H(s) = k \frac{( s - z_{1} ) \ldots ( s - z_{n} )}{( s - p_{1} ) \ldots % ( s - p_{m} )} $$ % % Such models expose the roots z of the numerator (the zeros) and the % roots p of the denominator (the poles). The scalar coefficient k is % called the gain. % fprintf('\n'); disp('create a ZPK model of H(s) = s/ (s^2 + 2s + 10) by speifying its ') disp('zeros (z = 0), Poles (p = [ -1+3i -1-3i ), Gain (k =1) ') %------------------------------------------ z = 0; % Zeros p = [ -1.0000 + 3.0000i -1.0000-3.0000i ]; % Poles k = 1; % Gain Hzpk = zpk(z,p,k) %----------------- Verify ------------------------ disp('verify that Htf(s) = Hs(s)= s/(s^2 + 2 s + 10) and plot "step" '); fprintf('\n');disp('htf ='); Htf fprintf('\n');disp('hs =');Hs disp('hzpk=');hzpk %----------------- step resp figure(11) subplot(2,1,1); step(htf) ; ylabel('htf(s)') %title('h1') subplot(2,1,2); step(hs) ; ylabel('hs(s)') %title('h2') %---------- compute the poles disp('compute the poles using "pole" ') pole(htf) %---------- Stability % You can ask whether this system is stable using: disp('check whether this system is stable using "isstable" ') isstable(htf) % % As for TF models, you can also specify this model as a rational expression of s : % s = zpk('s'); % H = -2*s / (s - 2) / (s^2-2*s + 2) fprintf('\n'); disp('=======================================================') LYGEROS_Dritsas_ElectricalSys DRITSAS-2008/09 Page 24 of 25
disp(' *** 3 State-Space Models (ss) *** '); disp(' State-space (SS) models are time-domain representations of LTI systems ') disp(' dx/dt} = A x(t) + B u(t), y(t) = Cx(t) + Du(t ') disp(' x(t) is the state vector, u(t) is input vector, and y(t) is the output') disp('specify the state-space matrices A, B, C, D and use "ss" to construct the SS object ') disp('=======================================================') % To create this model, A = [ 0 1 ; -5-2 ]; B = [ 0 ; 3 ]; C = [ 1 0 ]; D = 0; Hss = ss(a,b,c,d) %---------- compute the poles disp('compute the poles using "pole" ') pole(hss) %---------- compute the eigenvalues of A disp('compute the eigenvalues of A using "eig" ') eig(a) %----------------- step resp figure(12) step(hss) ; ylabel('hss') LYGEROS_Dritsas_ElectricalSys DRITSAS-2008/09 Page 25 of 25