TORONTO METROPOLITAN UNIVERSITY

Course Outline (W2024)

ELE709: Real-Time Computer Control Systems

Instructor(s)Meranda Salem [Coordinator]
Office: ENG449
Phone: TBA
Email: meranda.salem@torontomu.ca
Office Hours: Thursdays 1 - 2pm
Calendar DescriptionThis course deals with practical techniques for the specification, design and implementation of real-time computer control systems. Topics include: overview of computer control strategies; introduction to real-time systems; hardware and software requirements; implementation of digital control algorithms; design of real-time computer control systems; design analysis; considerations for fault detection and fault tolerance. The lab work and project require solid background in C programming.
PrerequisitesELE 639 or MEC 830
Antirequisites

None

Corerequisites

None

Compulsory Text(s):
  1. ELE709 Course Slides,
  2. ELE709 Laboratory Manual,
Reference Text(s):
  1. Real-Time Concepts for Embedded Systems, Q. Li and C. Yao, CMP Books, 2003.
  2. Advanced Linux Programming, M. Mitchell, J. Oldham and A. Samuel, New Riders Publishing, 2001.
Learning Objectives (Indicators)  

At the end of this course, the successful student will be able to:

  1. Learn Concepts of Computer Control. Learn the different classes of industrial process control systems, such as sequence control, control loop, and supervisory control. understand the classification for real-time systems time constraints and the classification of computer programs. Learn the characteristics and requirements of real-time operating systems. Understand scheduling algorithms and their impact on real-time performance. Understand C-coding using Pthread coding technique. Understand Real time operating system (RTOS) building components. Understand and learn three different types of real-time control and their applications. Identify classes of industrial process control systems. Learn properties and requirements for real-time Control systems. Learn the Hardware and software Requirements for designing Real-Time control System application. Learn the difference between General Purpose Operating System (GPOS) verses Real-Time Operating Systems (RTOS) and how both are being used with building a real-time control system application. Learn Computer Languages for RT applications. Learn the concept for Concurrent Programming with Pthreads (POSIX thread) coding methodology. Learn Thread synchronization and communication. (1c)
  2. Develop mathematical models of physical systems for control purposes. Explore the differences between analog and digital control systems. Learn about the sampling process and its effects on system performance. Keep up with the latest trends and advancements in real-time control systems, such as the Internet of Things (IoT) and edge computing. Learn different c-coding control protocols to avoid real-time control system failure. Learn different real-time operating system techniques for different task scheduling techniques. Calculate P gain for proportional controller using ultimate gain sensitive method. Apply Anti-wind up technique to improve PID controller performance. Learn and implement Typical digital control system design. Learn the advantages and disadvantages of digital controllers. Learn transferring analog systems into discrete system using three different digital control technique (Forward Rectangular rule, Backward Rectangular rule, and trapezoidal rule). Learn the mathematical models for difference equation, numerical integration, discrete time integrator, Z-transform, discrete transfer function, stability analysis, steady state error, and the relationship between S domain and Z domain. Understand the design considerations for real-time software. Learn Cyclic Execution Approach and scheduling algorithms. (1d)
  3. Study Pthread (Proxix Thread) C-Programming coding technique in working with multiple tasks, threads, and processor to run concurrent programming. Understand how to apply Pthread codes and how they work. Understand when a thread needs to be joined, detached or terminated within C program. When a mutex is needed to be acquired by the thread and when it has to be released. When a condition variable is used for a specific program and when it is not needed. (4b)
  4. Study communication protocols and interfaces for connecting system components. Understand the importance of safety in real-time control systems and techniques for ensuring system reliability. Learn about the importance of timing and latency in real-time control systems. Understand techniques to minimize delays and ensure timely execution of control tasks. Understand how quad-core processors can handle pthread work load using multiple threads. C Programing Review. Learn how to implement time and clock codes with in C programming. Build C program using POSIX threads and Concurrent Programming. Learn how to build c-code for resource sharing and coordination between threads. Learn how to design task synchronization and communication. (5a)
  5. Laboratory and project performance through group work. Work with peers to design and implement real-time control systems using a team-based approach. Contribute effectively to group discussions, brainstorming sessions, and design meetings. Practice planning and managing team projects, including setting goals, establishing timelines, and allocating tasks. Work as a team to test and validate the real-time control system c-code, ensuring it meets specified requirements. Collaborate on troubleshooting and optimizing the system for optimal performance. Answering project related question presenting group members. (6b)

NOTE:Numbers in parentheses refer to the graduate attributes required by the Canadian Engineering Accreditation Board (CEAB).

Course Organization

3.0 hours of lecture per week for 13 weeks
1.0 hours of lab per week for 12 weeks
0.0 hours of tutorial per week for 12 weeks

Teaching AssistantsTAs are to provide help with Lab materials during lab time.
 Any concerns with Lab work or marks, please reach out to TAs first, and to Course professor after if concern is not addressed by TAs.
 Extra help for lab materials can be provided during office hours.
Course Evaluation
Theory
Midterm Exam 25 %
Final exam (theory questions) 40 %
Laboratory
Lab work + Project 25 %
Final exam (lab questions) 10 %
TOTAL:100 %

Note: In order for a student to pass a course, a minimum overall course mark of 50% must be obtained. In addition, for courses that have both "Theory and Laboratory" components, the student must pass the Laboratory and Theory portions separately by achieving a minimum of 50% in the combined Laboratory components and 50% in the combined Theory components. Please refer to the "Course Evaluation" section above for details on the Theory and Laboratory components (if applicable).


ExaminationsMidterm exam in Week 9 during your lecture time.
 Final exam during exam period.
Other Evaluation InformationLab materials will be tested during your Lab project work and Lab test.
 One week will be given for each lab submission.
 Lab time is to work during your lab materials with TAs assistant.
Teaching MethodsAll lectures are delivered in-person, no online lectures or recordings will be available.
 Lectures slides cover all theory materials that will be tested in term test and final exam.
 Review sessions as well as practice questions similar to what will come in term test and final exam will be provided.
 No lab work will be tested in term test or final exam, only in lab test.
 Professor office hours for assisting with lecture materials and lab materials and any concerns.
Other InformationMidterm exam covers materials from Week 1 till Week 6.
 Final Exam covers materials from week 7 till week 12.
 Lab test covers Lab 1 to Lab 5 work.

Course Content

Week

Hours

Chapters /
Section

Topic, description

1

1

Lecture Notes

Concepts of Computer Control
 Introduction classes of industrial process control systems sequence
 control loop control supervisory control.
 Jan 12


1

2

Chapter 1 and Lecture Notes

Introduction to Real-Time Systems
 Classification of real-time systems time constraints classification of computer programs.
 Jan 12


2 - 3

5

Chapter 4 and Lecture Notes

Hardware and Software Requirements
 General-purpose computer specialized processors external interfaces
 A/D and D/A conversion data transfer techniques data communications techniques. Real-time operating systems computer languages for real-time applications.
 Jan 19 & Jan 26


3 - 5

6

Chapters 5 - 8 & 15

Concurrent Programming
 Process and threads process/thread life cycle multi-threaded programming with POSIX threads (Pthreads) thread synchronization and communication: semaphores mutexes and condition variables.
 Jan 26 Feb 2 & Feb 9


5 - 6

8

Lecture Notes

Digital Controllers: Design and Implementation
 Review of discrete-time signal sampling difference equation discrete transfer function z-transform PID controller design and digital implementation saturation and integrator wind-up discretization of continuous-time controllers control loop synchronization choice of sampling period effects of latency and timing jitters on control performance quantization effects.
 Feb 9 & Feb 16
 


7

0

Reading week

Reading Week, no Lecture on Feb 23


8 - 9

6

Chapter 16

Scheduling of Real-Time Control Tasks
 Basic concepts cyclic executives basic rate monotonic scheduling earliest deadline first scheduling basic response-time analysis task blocking transitive blocking priority inversion priority inheritance priority ceiling and immediate priority ceiling protocols extended rate monotonic scheduling response-time analysis with blocking starvation deadlock.
 Term test on March 8 for the first 1 hour & a half, Lecture materials will resume after term test.
 Mar 1st & Mar 8


10

2

Lecture Notes

Real-Time Application Interface Programming
 Real-time task creation periodic and aperiodic tasks interrupt service routine scheduling policies.
 March 15


10 - 12

5

Lecture Notes

Design of Real-Time Computer Control Systems
 Software life cycle planning analysis and specifications different approaches to real-time software design tasking design.
 Mar 15, Mar 22 & March 29
 


13

2

Lecture Notes

Introduction to Reliability and Fault Tolerance in Computer Control Systems
 Reliability types of faults failure modes fault prevention: avoidance and removal fault tolerance: hardware and software redundancy.
 Review session
 April 5
 


Laboratory(L)/Tutorials(T)/Activity(A) Schedule

Week

L/T/A

Description

2

Lab 1

C - Review
 Jan 15 - Jan 19

3

Lab 2

Time and Clocks
 Jan 22 - Jan 26

4-5

Lab 3

POSIX Threads and Concurrent Programming
 Jan 29 - Feb 2
 Feb 5 - Feb 9

6

Lab 4

Resource Sharing and Coordination
 Feb 12 - Feb 16

7

No Lab

Reading week
 Feb 19 - Feb 23

8 - 9

Lab 5

Task Synchronization and Communication
 Feb 26 - Mar 1
 Mar 4 - Mar 8
 

9 - 13

Project

Real-Time Digital PID Controller Design and Implementation
 Mar 4 - Mar 8
 Mar 11 - Mar 15
 Mar 18 - Mar 22
 Mar 25 - Mar 29
 Apr 1 - Apr 5

University Policies & Important Information

Students are reminded that they are required to adhere to all relevant university policies found in their online course shell in D2L and/or on the Senate website

Refer to the Departmental FAQ page for furhter information on common questions.

Important Resources Available at Toronto Metropolitan University

Accessibility

Academic Accommodation Support

Academic Accommodation Support (AAS) is the university's disability services office. AAS works directly with incoming and returning students looking for help with their academic accommodations. AAS works with any student who requires academic accommodation regardless of program or course load.

Academic Accommodations (for students with disabilities) and Academic Consideration (for students faced with extenuating circumstances that can include short-term health issues) are governed by two different university policies. Learn more about Academic Accommodations versus Academic Consideration and how to access each.

Wellbeing Support

At Toronto Metropolitan University, we recognize that things can come up throughout the term that may interfere with a student’s ability to succeed in their coursework. These circumstances are outside of one’s control and can have a serious impact on physical and mental well-being. Seeking help can be a challenge, especially in those times of crisis.

If you are experiencing a mental health crisis, please call 911 and go to the nearest hospital emergency room. You can also access these outside resources at anytime:

If non-crisis support is needed, you can access these campus resources:

We encourage all Toronto Metropolitan University community members to access available resources to ensure support is reachable. You can find more resources available through the Toronto Metropolitan University Mental Health and Wellbeing website.