
<p> 1</p><p>Lecture 24 Introduction to Discrete Time Systems and Their Analog Counterparts</p><p>Motivation Continuous-time (i.e. analog) systems are fundamental to understanding feedback control. However, rarely are analog controllers implemented to control analog plants. A discrete-time (i.e. digital) controller is a computer algorithm. Unlike an analog controller, a digital controller requires an analog-to-digital converter (A/D) to convert voltages into numbers, and a digital-to-analog converter (D/A) to convert numbers into voltages. However, the disadvantages of this additional hardware are offset by the advantages offered by the ease with which more advanced controllers can be implemented. </p><p>The Mathematics of Going from Continuous to Discrete Time</p><p>A continuous time function (N ,N ) with t [0,) that is sampled every T seconds results is a discrete time function f (kT) , where k {0,1,⋯,}. The parameter T is called the sampling interval, or the sampling period. Its units (unless otherwise stated) are [seconds/sample]. The parameter s 2 /T is, therefore, the sampling frequency, with units [rad/sec]. </p><p>at a(kT ) Example 1 Consider f (t) e . Then f (kT) e . Define ea T . Then we can write f (kT) k f (k) , where the defined equality at right is often used for notational convenience. As simple as this may seem, there are a number of differences between f (t) and f (k) .</p><p>Difference #1: By sampling, we no longer have any information about f (t) at times other than the sample times. It could be doing all manner of crazy things! </p><p>Difference #2: The frequency structure of f (t) extends over all frequencies (,) , whereas the frequency structure </p><p> of f (k) is defined only over ( , ) , where is called the Nyquist frequency. To see why this is N N N s / 2 /T</p><p> so, recall that F(s) f (t)est dt is the Laplace transform of f (t) . A natural approximation of this integral for f (k) is 0 s(kT ) s i sT ( i )T T iT F(s) f (kT )e T . For any , we have e e e e . Let s' i' where ' ms for any k 0</p><p> s'T ( i')T T i(s ) sT s'T integer m. Then e e e e e . In words, e is a periodic function of , with period s . Hence, f (k) is uniquely defined over the fundamental period (N ,N ) .</p><p> at One might expect that in the region (N ,N ) , F(i) F(i) . Sadly, this is almost never the case. For f (t) e , we a have F(s) ; consequently, s a a F(i) . (1a) a i</p><p> k k 1 k T sT F(s) T z T ( z ) We will now drive the expression for F(i) . To this end, define z e . Then 1 k 0 k 0 1 z This power series expression requires that | z 1 |1. We will assume, for now, that this inequality holds. Then, for s i , z eiT . Hence, 2</p><p> T T F(i) iT . (1b) 1e [1 cos(T)] i sin(T)</p><p>Clearly, (1a) and (1b) are not equal. To see more clearly how they differ, we will look at the differences in their magnitude and phase. The magnitude of (1a) is: a M () | F(i) | . (2a) a2 2</p><p> T T Similarly, M () | F(i) | . (2b) [1 cos(T)]2 [ sin(T)]2 (1)2 2 cos(T)</p><p>The phase of (1a) is: () tan 1( / a) . (3a)</p><p> Similarly, (i) tan 1{ sin(T ) /[1 cos(T)]}. (3b)</p><p>To illustrate these differences graphically, let a 1, and let s 10 . We will compute and overlay (2) and (3) over the frequency range [0.01,100] .</p><p>M and Mhat 5</p><p>0</p><p>-5</p><p>-10</p><p>-15</p><p>B -20 d</p><p>-25</p><p>-30 -35 ( , ) -40 N N -45 10-2 10-1 100 101 102 Frequency (r/s) Figure 1 Comparison of magnitudes (LEFT) and phases (RIGHT) related to F(i) and F(i) for a 1, and let s 10 . 3</p><p>Matlab Code %PROGRAM NAME: lec24.m %Example 1 a=1; ws=10; T=2*pi/ws; aa=exp(-a*T); w=logspace(-2,2,500); F=a*(a+1i*w).^-1; MdB=20*log10(abs(F)); TH=angle(F)*(180/pi); Fhat=T*(1-aa*cos(w*T) +1i*aa*sin(w*T)).^-1; MhatdB=20*log10(abs(Fhat)); THhat=angle(Fhat)*(180/pi); figure(1) semilogx(w,MdB) hold on semilogx(w,MhatdB,'r') title('M and Mhat') xlabel('Frequency (r/s)') ylabel('dB') grid figure(2) semilogx(w,TH) hold on semilogx(w,THhat,'r') title('TH and THhat') grid xlabel('Frequency (r/s)') ylabel('Degrees')</p>
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages3 Page
-
File Size-