Digital Control CSE 421.

Slides:



Advertisements
Similar presentations
Analog to Digital Conversion (ADC)
Advertisements

What is Arduino?  Arduino is a ATMEL 168 micro-controller kit designed specially for small projects  User friendly IDE(Integrated Development Environment)
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.
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
Data Acquisition Risanuri Hidayat.
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.
Lecture 9: D/A and A/D Converters
Unit 4 Sensors and Actuators
Interfacing with the Analog World Wen-Hung Liao, Ph.D.
Quantization Prof. Siripong Potisuk.
EET260: A/D and D/A converters
Design of a Control Workstation for Controller Algorithm Testing Aaron Mahaffey Dave Tastsides Dr. Dempsey.
PH4705/ET4305: A/D: Analogue to Digital Conversion
Digital to Analog Converters
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.
ADC & DAC Signal Conversions.
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
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
Topic 1 modelling of sensors systems ETEC Calibration methods We have a RTD sensing the temperature. The integer of the sensor inside the PLC is.
Feedback Control system
Control Theory Control System Objectives  Establish a final condition  Provide safe operation  Eliminate the human element  Assure economical operation.
Control systems KON-C2004 Mechatronics Basics Tapio Lantela, Nov 5th, 2015.
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 Control CSE 421.
Embedded Systems Design 1 Lecture Set C Interfacing the MCS-51 to: –D/A Converter –A/D Converter.
Analogue to Digital Conversion © D Hoult analogue signal © D Hoult 2011.
Closed Loop Temperature Control Circuit with LCD Display Mike Wooldridge ECE 4330 Embedded Systems.
ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ (22Δ802) Β΄ ΕΞΑΜΗΝΟ Καθηγητής Πέτρος Π. Γρουμπός  Ώρες Γραφείου: Τετάρτη Πέμπτη Παρασκευή 11:00- 12:00 Γραφείο: 1.
Lecture Notes / PPT UNIT III
Components of Mechatronic Systems AUE 425 Week 2 Kerem ALTUN October 3, 2016.
Case Study #1 Microcontroller System. What is a microcontroller? A microcontroller can be considered a self-contained system with a processor, memory.
MECH 373 Instrumentation and Measurements
Microprocessors Data Converters Analog to Digital Converters (ADC)
INTRODUCTION TO ROBOTICS Part 5: Programming
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.
Microprocessor and Microcontroller Fundamentals
Automatic Control Theory
Feedback Controllers Chapter 8
Chapter 4 Dynamical Behavior of Processes Homework 6 Construct an s-Function model of the interacting tank-in-series system and compare its simulation.
IPC (GROUP-5) SR. NO NAME EN. NO 1 SAVAN PADARIYA
SCADA for Remote Industrial Plant
EI205 Lecture 13 Dianguang Ma Fall 2008.
Digital Control Systems
Introduction to data converters
Introduction to data converters
Digital Acquisition of Analog Signals – A Practical Guide
Analogue to Digital Conversion
Lesson 1: Overview of Sequential Control and Data Acquisition
لجنة الهندسة الكهربائية
UNIT-8 INVERTERS 11/27/2018.
Features of PID Controllers
Digital Control Systems Waseem Gulsher
Digital Control Systems Waseem Gulsher
Conversation between Analogue and Digital System
Analog-to-digital converter
Feedback Controllers Chapter 8
Chapter 7 Converters.
IntroductionLecture 1: Basic Ideas & Terminology
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 Keep the output as close as possible to some desired value by a suitable adjustment of the input. However, due to 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 Isolate the output from unwanted disturbance inputs or minimize their effect (Disturbance Rejection). 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! The output can track the reference input closely (Command Tracking).

Continuous-time 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-time control system, the output is fed back, the error is calculated, the controller generates a control signal, and so on. This occurs at every time instant.

Digital control system Computers and microcontrollers are widely used in control systems. To control a physical system or process (which is analog) using a digital controller, digital-to-analog converter (DAC) and analog-to-digital converter (ADC) are required.

Analog-to-digital (A/D) converter Samples analog signal (typically voltage), and then converts them into integer numbers suitable for processing by digital computer. A/Ds typically have unipolar ranges of 0–5 V, 0–10 V, or bipolar ranges of ± 5 V, or ± 10 V. 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 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 a 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 and accordingly change their control signal continuously would be superior to those that base their control on sampled values of the output. 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 and to implement complex controller methods such as adaptive control. Analog control is difficult to modify once implemented in hardware and 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.