Digital Control CSE 421.

Slides:



Advertisements
Similar presentations
What is Arduino?  Arduino is a ATMEL 168 micro-controller kit designed specially for small projects  User friendly IDE(Integrated Development Environment)
Advertisements

Analog-to-Digital Converter (ADC) And
Sensors Interfacing.
Digital Control Systems INTRODUCTION. Introduction What is a control system? Objective: To make the system OUTPUT and the desired REFERENCE as close as.
3. Systems and Transfer function
Speech Compression. Introduction Use of multimedia in personal computers Requirement of more disk space Also telephone system requires compression Topics.
Digital to Analog and Analog to Digital Conversion
Announcements Assignment 8 posted –Due Friday Dec 2 nd. A bit longer than others. Project progress? Dates –Thursday 12/1 review lecture –Tuesday 12/6 project.
Analog to Digital Conversion. Introduction  An analog-to-digital converter (ADC, A/D, or A to D) is a device that converts continuous signals to discrete.
Data Acquisition Risanuri Hidayat.
Data Acquisition Concepts Data Translation, Inc. Basics of Data Acquisition.
5/4/2006BAE Analog to Digital (A/D) Conversion An overview of A/D techniques.
Shuvra Das University of Detroit Mercy
Analog to Digital Converters (ADC) 2 ©Paul Godin Created April 2008.
Khaled A. Al-Utaibi  Digital Vs Analog Signals  Converting an Analog Signal to a Digital One  Reading Analog Sensors with the.
4.2 Digital Transmission Pulse Modulation (Part 2.1)
Lecture 9: D/A and A/D Converters
Interfacing Analog and Digital Circuits
1 Analog-to-digital converter Prepared by: Selah al-Battah Mohammed Al-khabbaz Atiyah Alnakhli Ali Dumyati.
Unit 4 Sensors and Actuators
Interfacing with the Analog World Wen-Hung Liao, Ph.D.
Quantization Prof. Siripong Potisuk.
Introduction to Data Conversion
EET260: A/D and D/A converters
President UniversityErwin SitompulSMI 7/1 Dr.-Ing. Erwin Sitompul President University Lecture 7 System Modeling and Identification
Analog-to-Digital Converters Prepared by: Mohammed Al-Ghamdi, Mohammed Al-Alawi,
Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey.
PH4705/ET4305: A/D: Analogue to Digital Conversion
Engineering 1040: Mechanisms & Electric Circuits Fall 2011 Introduction to Embedded Systems.
T IMERS - 2. O UTPUT U NIT Each capture/compare block contains an output unit. The output unit is used to generate output signals such as PWM signals.
Computer Control: An Overview Wittenmark, Åström, Årzén Computer controlled Systems The sampling process Approximation of continuous time controllers Aliasing.
Random signals. Histogram of the random signal Continuous Time Sinusoidal signals.
System & Control Control theory is an interdisciplinary branch of engineering and mathematics, that deals with the behavior of dynamical systems. The desired.
Book Adaptive control -astrom and witten mark
Digital to Analogue Converter
Analog to Digital conversion. Introduction  The process of converting an analog signal into an equivalent digital signal is known as Analog to Digital.
Data Acquisition Systems
System/Plant/Process (Transfer function) Output Input The relationship between the input and output are mentioned in terms of transfer function, which.
Feedback Control system
Control Theory Control System Objectives  Establish a final condition  Provide safe operation  Eliminate the human element  Assure economical operation.
EEB5213 / EAB4233 Plant Process Control Systems Digital Implementation of PID Controller.
Lecture 25: Implementation Complicating factors Control design without a model Implementation of control algorithms ME 431, Lecture 25.
PREPARED BY V.SANDHIYA LECT/ ECE UNIT- 3 APPLICATIONS OF OP-AMP 1.
Lecture 11: Liquid Level Control System: A Case Study 1.
Digital to Analog Converter (DAC)
Embedded Systems Design 1 Lecture Set C Interfacing the MCS-51 to: –D/A Converter –A/D Converter.
Topics 1 Specific topics to be covered are: Discrete-time signals Z-transforms Sampling and reconstruction Aliasing and anti-aliasing filters Sampled-data.
Lecture 9: PID Controller.
Closed Loop Temperature Control Circuit with LCD Display Mike Wooldridge ECE 4330 Embedded Systems.
ECE 101 Exploring Electrical Engineering Chapter 7 Data Acquisition Herbert G. Mayer, PSU Status 11/30/2015 Derived with permission from PSU Prof. Phillip.
ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ (22Δ802) Β΄ ΕΞΑΜΗΝΟ Καθηγητής Πέτρος Π. Γρουμπός  Ώρες Γραφείου: Τετάρτη Πέμπτη Παρασκευή 11:00- 12:00 Γραφείο: 1.
Lecture Notes / PPT UNIT III
1 Summary Lecture: Part 1 Sensor Readout Electronics and Data Conversion Discovering Sensor Networks: Applications in Structural Health Monitoring.
Components of Mechatronic Systems AUE 425 Week 2 Kerem ALTUN October 3, 2016.
MECH 373 Instrumentation and Measurements
SIGNAL CONDITIONING Signal conditioning is stage of instrumentation system used for modifying the transduced signal into a usable format for the final.
Introduction to Discrete-Time Control Systems fall
Chapter 4 Dynamical Behavior of Processes Homework 6 Construct an s-Function model of the interacting tank-in-series system and compare its simulation.
Digital Control CSE 421.
Microprocessor and Microcontroller Fundamentals
Chapter 4 Dynamical Behavior of Processes Homework 6 Construct an s-Function model of the interacting tank-in-series system and compare its simulation.
EI205 Lecture 13 Dianguang Ma Fall 2008.
Digital Control Systems
Analogue to Digital Conversion
Lesson 1: Overview of Sequential Control and Data Acquisition
Digital Control Systems Waseem Gulsher
Digital Control Systems Waseem Gulsher
Conversation between Analogue and Digital System
Analog-to-digital converter
Chapter 7 Converters.
Presentation transcript:

Digital Control CSE 421

Grading scheme References: 50 Semester work 100 Final 150 Total References: G. Starr, Introduction to Applied Digital Control, Course notes, 2006. M. Sami Fadali and A. Visioli, Digital Control Engineering Analysis and Design, 2nd Edition, Elsevier, 2012. D. Ibrahim, Microcontroller Based Applied Digital Control. Wiley, 2006. Course webpage: http://www.amelanany.faculty.zu.edu.eg/

Topics to be covered: Linear Discrete Systems Sampling and aliasing The z-transform Block diagrams Stability Controller design using transfer functions System identification Case study State-space description of continuous & discrete systems State-space design of digital control systems

Control systems The aim of CONTROL system is to keep a certain variable at a certain value. Two approaches for control: Open loop control. Closed-loop (feedback) control.

Open-loop control The goal is to keep the output as close as possible to some desired value by a suitable adjustment of the input. However, because of the unknowns in the system model and the effects of external disturbances open-loop control is not accurate. A better solution is to use feedback.

Closed-loop (Feedback) control A measurement of the output of the plant is used to modify its input. The controller receives the measurement of the plant output, then generates a suitable value of the plant input, hence closing the loop.

Advantages of closed-loop control Remove (isolate or reject) the output from unwanted disturbance inputs The model of the plant is not required to be exactly known. In other words feedback control reduces sensitivity of the output to variations in plant parameters. If the plant is unstable, then feedback control is necessary. Open-loop control can not be used in this case! Command Tracking: cause the output to track the reference input closely

Continuous control systems Generally, plant inputs and outputs are continuous signals both in time and in amplitude. For example, consider the plant to be controlled is a motor. The motor input (current or voltage) and output (speed) are defined and may change at every instant in time (continuous in time). These variable can take any value within certain range (continuous in amplitude). In continuous closed-loop control, at each time instant, the output is fed back, the error is calculated, the controller generates a control signal, and so on.

Digital control system Digital computers and microcontrollers are widely used in control systems. To control a physical system or process which is analog using a digital controller (e.g. a computer), some form of translation is required using a digital-to-analog converter (DAC) and an analog-to-digital converter (ADC).

Analog-to-digital (A/D) converter A/D converter samples analog signal, typically a voltage, and then converts these samples into an integer number suitable for processing by digital computer. A/D converters typically have unipolar ranges of 0–5 V, 0–10 V, or bipolar ranges of ± 5 V, or ± 10 V. The A/D conversion causes quantization error q given by the resolution of the converter in bits. Common resolutions are 8 bits (256 levels), and 12 bits (4096 levels). A 12-bit A/D converter of range ±10 volts would have a conversion quantum of q = 20/4096 = 4.88 mV. The A/D converter is usually approximated as a sampler (a switch).

Digital-to-analog (D/A) converter D/A converts the digital (integer) number calculated by the computer into a voltage so as to drive the output of the plant as desired. The voltage ranges and converter resolutions are the same as for the A/D converter. A D/A converter functions as a zero-order hold (ZOH), holding its output at a constant value until it receives the next discrete input. Many microcontrollers incorporate built-in A/D and D/A converter circuits. These microcontrollers can be connected directly to analog signals.

Sampling The computer periodically samples the error signal every time interval T called the sampling period. This is represented by the clock in the block diagram of the digital control system (slide 9). The sampling frequency in Hz is 1/T. When a continuous signal e(t) is sampled, it becomes a discrete signal denoted by e(kT), e(k) or ek. Discrete signals are only mathematically defined at the sample instants t = kT, where k = 0,1,2,…. Digital control systems can sometimes be called discrete-time or sampled-data systems.

Continuous, discrete, and ZOH (output of D/A) signals

Digital vs. Analog Control Digital control systems are so widely used that it is rare to see a completely continuous control system (Starr, 2006). Intuitively, one would think that controllers that continuously monitor the output of a system would be superior to those that base their control on sampled values of the output. It would seem that control variables (controller outputs) that change continuously would achieve better control than those that change periodically. This is in fact true! Had all other factors been identical for digital and analog control, analog control would be superior to digital control. What, then, is the reason behind the change from analog to digital that has occurred over the past few decades?

Digital vs. analog control The processing speed of computer hardware makes it possible to sample signals at very high speeds (i.e. very small sampling periods). Therefore, digital controllers achieve performance that is essentially the same as that based on continuous monitoring of the controlled variable. Digital controller is implemented in software and so is easy to modify. Analog control is difficult to modify once implemented in hardware. Complex controller structures such as adaptive control are easily realizable using digital control. This is different from analog control where the structure of the controller is restricted to simple forms such as PID controllers. Digital control is economical even for small, low-cost applications.

Computer Control Algorithm The control algorithm in a computer is implemented as a program which runs continuously in a loop executed at the start of every sampling instant: Repeat Forever When it is time for next sampling instant: Read the desired value, R, from A/D converter Read the actual plant output, Y, from the A/D converter Calculate the error signal, E = R − Y Calculate the controller output, U Send the controller output to D/A converter Wait for the next sampling instant End

Computer Control Algorithm The algorithm, once starts, runs continuously and can only be stopped manually by an operator or if some abnormal event or condition occurs. Note that the loop is run exactly at the sampling instants. Two approaches to achieve this is timer interrupt and ballast coding.

Timer Interrupts A popular way to perform accurate sampling with constant sampling period is to use timer interrupts available on most microcontrollers. The controller algorithm is written inside the timer interrupt service routine (ISR), and the timer is programmed to generate interrupts at regular intervals, equal to the sampling time. At the end of the ISR algorithm, control returns to the main program, which either waits for the occurrence of the next interrupt or performs other tasks (e.g. displaying data on an LCD). The use of interrupts has the advantage that the computer can do other tasks between the sampling instants.

Timer Interrupts Main program: Wait for a timer interrupt (or perform some other tasks) End Interrupt service routine (ISR): Read the desired value, R Read the actual plant output, Y Calculate the error signal, E = R − Y Calculate the controller output, U Send the controller output to D/A converter Return from interrupt

Ballast Coding This method is so simple. It involves finding the execution time of each instruction inside the loop and then adding dummy code to make the loop execution time equal to the required sampling interval. Do Forever: Read the desired value, R Read the actual plant output, Y Calculate the error signal, E = R − Y Calculate the controller output, U Send the controller output to D/A converter Add dummy code . . . End The disadvantage is that if the code inside the loop is changed, or if the CPU clock rate of the microcontroller is changed, then it will be necessary to readjust the execution timing of the loop.