Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Controlled System ELE3105/70520 Examiner: Dr Paul Wen Faculty of Engineering and Surveying The University of Southern Queensland Toowoomba, Qld.

Similar presentations


Presentation on theme: "Computer Controlled System ELE3105/70520 Examiner: Dr Paul Wen Faculty of Engineering and Surveying The University of Southern Queensland Toowoomba, Qld."— Presentation transcript:

1 Computer Controlled System ELE3105/70520 Examiner: Dr Paul Wen Faculty of Engineering and Surveying The University of Southern Queensland Toowoomba, Qld 4350 Contact Information: Email: PengWen@usq.edu.auPengWen@usq.edu.au Phone: (07)46312586 Office: Z408

2 Study Materials Study Book: Computer controlled systems Textbook:“Discrete time control system”, Katsuhiko Ogata, 2 nd ed. Prentice-Hall, Inc., 1995. Support Materials: Matlab ( 5.3/later + Control toolbox) References 1.Astrom K. J. & Wittenmark B., “Computer controlled systems theory and design”, 3 rd edition, Prentice Hall, New York, 1996. 2.Nagle H. & Philips C., “Digital control system analysis & design”, Prentice Hall. 3.Norman S. Nise, “Control system engineering” Third edition, John Wiley & Sons, Inc., New York, 2000.

3 Timetable Note: Consulting in non-consulting time 1)Quick questions (5 minutes): Any time 2)Others: By Appointments LectureTutorialConsulting Mon.9 -10 am Z313 10 – 11 am Z313/office Wed.8 -10 am Z313 4 –5 pm Z313/office Fri.10 -12 am Z313

4 Assessment Students’ attention is drawn to the student related policies and the unit specification 2002, which outline the University’s Assessment Policy and the requirements. For unit 70520, Computer controlled systems, you must obtain 50% from each of three assessments and 50% all over.

5 Assessment WeightDuePenaltyReturnPass Ass. 120% 28 March 10%3 weeks50% Ass. 220% 31 May 10%3 weeks50% Exam.60%50% Result100%50%*

6 Questions?

7 Subject Overview Computer engineering I & II Linear systems & control Numerical computing Computer Controlled Systems Signal processingRobotics & machine vision

8 1.1 Introduction Control system definition & Control system application. Control System Input; Stimulus Desired response Output; Response Actual response

9 1.1 Introduction Advantages of control systems 1.Power amplification 2.Remote control 3.Convenience 4.Compensation for disturbance

10 1.1 Introduction Control system G c (s) G P (s) R(s) E(s) M(s)Y(s) Controller Plant

11 1.1 Introduction Computer controlled system G c (z) ZOH G P (s) R(z) E(z) M(z) G HP (z) Computer system Y(z) Plant A/D D/A

12 1.2 Digital control loop: Components G HP (z) is the transfer function of control object + ZOH, where z indicates the discrete time domain G C (z) is a controller implemented in computer languages. A/D is the Analog-to-Digital converter (Voltage  Binary number). D/A is the Digital-to-Analog converter (Binary number  Voltage). The little switch indicate a sampling operation.

13 1.2 Digital control loop: Signals Discrete time domain R(z) is the desired output E(z) is the error signal M(z) is the controller output/control action C(z) is the actual output Continuous time domain In continuous time domain, R(z), E(z), M(z) and C(z) are corresponding to r(t), e(t) m(t) and c(t).

14 1.2 Digital control loop: Sequence of events 1.Get desired output r(t) at this instant in time 2.Measure actual output c(t) 3.Calculate error e(t)=r(t)-c(t) 4.Derive control signal m(t) based on proper control algorithm 5.Output this control signal m(t) to controlled object 6.Save previous history of error and output for later use 7.Repeat step 1 to 6 (go to 1)

15 1.2 Digital control loop: Forms of signals Computer cannot sample while calculating, so there is a sample frequency 1/T for data acquisition through a A/D, where T is sampling interval. The data of a signal are recorded and represented as a sequence of number in memory. Based on these numbers, a control signal is derived and then conveyed to controlled object through a D/A

16 1.2 Digital control loop: Forms of signals In between sample instants, the input is supposed as constant and the output is held as a constant by a device termed as zero- order-hold (ZOH). The reconstruction of a signal will be a ‘stair-step, and a low-pass filter is employed to smooth out the rough edges

17 1.3 ADC and DAC time f(t) Time kT f(kT) Sampling  time f(t) Time kT f(kT) A/D 

18 1.3 ADC and DAC D/A is used as a ZOH. Time kT f(kT) D/A  Time kT f(kT)

19 1.3 ADC and DAC ADC Have a discrete number of quantization levels Number of levels L=2 N, where N is the number of bits eg N=3 bits, L=2 3 =8 levels Output Input  ADC Input Output Analog Digital

20 1.3 ADC and DAC ADC BitsLevelSignalError 1255/2=2.5 2455/4=1.25 3855/8=0.625 41655/16=0.3125

21 1.3 ADC and DAC ADC More bits more accuracy. The commonly used ADC has 8-bits: L=2 8 =256 (coarse) 10-bits:L=2 10 =1024 (adequate) 12-bits:L=2 12 =4096 (works well) 16-bits:L=2 16 =65536 (almost overkill)

22 1.3 ADC and DAC ADC Distances between sequential levels are the same. eg 5v/2 8 =0.0195v The weight of each bit is different. The most significant bit is the most left bit and the least significant bit is the most right bit. Bit 0 Bit N-1 2020 2 N-1 

23 1.3 ADC and DAC ADC Example: For N=8, find the number range of the ADC in binary, decimal and hexadecimal numbers. If the input signal is from 0 to 5 voltage for the above number range, what will be the number for a 2 voltage signal in decimal and binary numbers? Solution: In binary: 00000000B  11111111B In decimal: 0  2 7 +2 6 +2 5 +2 4 +2 3 +2 2 +2 1 +2 0 = 255 In hexadecimal: 0  F=15; 00H  FFH

24 1.3 ADC and DAC ADC Decimal to binary Exercise: For N=10, repeat the above example

25 1.3 ADC and DAC DAC Example: For N=8 and the signal is from 0 to 5, find the output value for the number 145. Solution:5/255=x/145, x=5*145/255=2.8431=2.84 Output Input  DAC Input Output Digital Analog

26 1.3 ADC and DAC Multi-channel A/D converter   MUX AD Digital signal StatusControl … Analog signal

27 1.3 ADC and DAC Multi-channel D/A converter   DA MUX Analog signals Control … Digital signals

28 1.4 Errors  Input ADC  Output Errors

29 1.4 Errors The quantization error or resolution error is the difference between the analog input value and the equivalent digital value. On average it is one half of the LSB. Linearity error: the maximum deviation in step size from ideal step size, expressed as a percentage of full scale. Settling time: the time it takes for the output to reach within +/- half of the step size of the final output.

30 1.4 Errors Gain error Output Input  ADC Input Output Analog Digital

31 1.5 Sampling theorem time f(t) Time kT f(kT) Sampling  time f(t) Time kT f(kT) A/D 

32 1.5 Sampling theorem

33 If we need the sampled data to keep all the features of the original signal, what is the minimum sampling frequency? Or what conditions should we meet if we wish that the sampled data can represent the original data exactly? The answer to the above question forms the Sampling theorem/Shannon’s sampling theorem/Shannon’s theorem.

34 1.5 Sampling theorem A continuous-time signal f(t) with a finite bandwidth  0 (the highest frequency component in the signal, or the Nyquist frequency) can be uniquely described by the sampled signal f(kT){k=…,-1,0,1….}, when the sampling frequency  s is greater than 2  0. In other words, if a signal is sampled twice faster than its highest frequency component, the sampled date can represent all the features of this signal.

35 1.6 The proven of sampling theorem The proven is based on Fourier Transform 1.Fourier transform: A transformation from time domain to frequency domain f(t)  F(  ), where t is time and  is frequency. For a continuous time function f(t), we can uniquely find F(  ). If given F(  ), we can also unique determine f(t). It means that f(t) and F(  ) are equivalent.

36 1.6 The proven of sampling theorem Fourier Transform  F(  ) 00 -0-0 f(t)

37 1.6 The proven of sampling theorem 2. For a sampled signal f s (t), we have Fourier Transform  Fs()Fs() 00 -0-0 -s-s ss 2s2s -2  s

38 1.6 The proven of sampling theorem 3. The relationship between f(t) and f s (t), and F(  ) and F s (  ). Fourier Transform  F(  ) 00 -0-0  Fs()Fs() 00 -0-0 -s-s ss 2s2s -2  s

39 1.6 The proven of sampling theorem 4. If we change the sampling frequency, what will happen with f s (t) and F s (  ).  Fs()Fs() 00 -0-0 -s-s ss 2s2s -2  s Fs()Fs() 00 -0-0 -s-s ss 2s2s

40 1.6 The proven of sampling theorem  Fs()Fs() 00 -0-0 -s-s ss 2s2s -2  s Fs()Fs() 00 -0-0 -s-s ss 2s2s Fs()Fs() 00 -0-0 -s-s ss 2s2s

41 1.6 The proven of sampling theorem 5. Conclusions If our sampling frequency  s is faster enough, that is  s >2  0, there will be gaps between the shifting F(  ) in F s (  ). We can always put a filter to figure out F(  ) from F s (  ). Otherwise if the repeating F(  ) figures overlap in F s (  ), we cannot put a filter to figure out F(  ) from F s (  ). The turning point from possible to impossible is  s =2  0, where  0 is the highest frequency component or Nyquist Frequency of the signal.

42 1.7 Aliasing 1. Aliasing problem

43 1.7 Aliasing Ambiguity: alias

44 1.7 Aliasing 2. Finding aliases The fundamental alias frequency is given by  =| (  0 +  n )mod(  s ) -  n | where mod() means the remainder of an division operation,  0 is signal bandwidth,  n Nyquist frequency, and  s sampling frequency Example: For f 0 =90Hz & f s =100, find alias. Solution:  =2  f, f n =f s /2=50Hz, f=| (f 0 + f n )mod(f s ) - f n |=|(90+50)mod(100)-50| =|40-50|=10Hz

45 1.7 Aliasing 3. Preventing aliases Make sure your sampling frequency is greater than twice of the highest frequency component of the signal Pre-filtering Set your sampling frequency to the maximum if possible

46 1.7 Aliasing Suppose that the Nyquist frequency of a signal is 100Hz. If we use an 8-bit ADC to sample this signal at the frequency of 200Hz, can the sample data represents this signal exactly? Why?

47 1.7 Aliasing Theoretically, as long as the sampling frequency is greater than or equal to twice the Nyquist frequency, aliases will not happen. However, because of the conversion/quantisation error, the practical sampling frequency is much higher than that (5 to 10 times of the Nyquist frequency). Fortunately, most of the time the speeds of ADC and computer are also much greater than signal’s Nyquist frequency.

48 Reading Study book Module 1: The digital control loop Textbook Chapter 1 : Introduction to discrete time control system Chapter 3: pages 90-92 & 96-98.

49 Exercise Exercise 1: The frequency spectrum of a continuous-time signal is shown below. 1)What is the minimum sampling frequency for this signal to be sampled without aliasing. 2)If the above process were to be sampled at 10 Krad/s, sketch the resulting spectrum from –20 Krad/s to 20 Krad/s. -8-448  Krad/s F(  )

50 Hints The relationship between f(t) and f s (t), and F(  ) and F s (  ). Fourier Transform  F(  ) 00 -0-0  Fs()Fs() 00 -0-0 0-s0-s -0-s-0-s  0 -2  s -  0 -2  s -0+s-0+s 0+s0+s -  0 +2  s  0 +2  s

51 Answers 48  Krad/s 122614181610 F(  )

52 Tutorial Solution: 1) From the spectrum, we can see that the bandwidth of the continuous signal is 8 Krad/s. The Sampling Theorem says that the sampling frequency must be at least twice the highest frequency component of the signal. Therefore, the minimum sampling frequency for this signal is 2*8=16 Krad/s. -8-448  Krad/s F(  )

53 Tutorial 2) Spectrum of the sampled signal is formed by shifting up and down the spectrum of the original signal along the frequency axis at i times of sampling frequency. As  s =10 Krad/s, for i =0, we have the figure in bold line. For i=1, we have the figure in bold-dot line. 48  Krad/s F(  ) 122614181610-4-8

54 Tutorial For I=-1,  2,… we have 48  Krad/s 122614181610 -18 F(  ) 48  Krad/s 122614181610-2-4-6-8-14


Download ppt "Computer Controlled System ELE3105/70520 Examiner: Dr Paul Wen Faculty of Engineering and Surveying The University of Southern Queensland Toowoomba, Qld."

Similar presentations


Ads by Google