MECHENG 313 : Design of Real-Time Software

Engineering

2024 Semester One (1243) (15 POINTS)

Course Prescription

Introduces the principles of software design in a real-time environment. Main topics include computer/microcontroller architecture, programming in a real-time environment, software design and data acquisition systems.

Course Overview

Content synopsis:

This paper concerns computer programming and real-time systems. Since you’ve taken MECHENG270, you already know what computer programming is. What’s a real-time system? In simple terms, real-time systems involve computer programs that have to meet deadlines, often for the purposes of control. For example, an aircraft’s autopilot is dependent upon systems that sense, compute, and actuate “on the fly”, that is, they have to meet deadlines.

Real-time software is sometimes implemented on embedded devices (e.g., a microcontroller in your electric toothbrush), and other times implemented on larger computers (e.g., a laptop or desktop machine used to control large plant at a steelworks). In this paper you will program both; you will learn to write software in C and C++ for implementation on a microcontroller, and you will learn to write real-time C++ for implementation on a laptop/desktop.

In Part 1 (Weeks 1 to 7) of this paper, we will discuss real-time systems implemented on microcontrollers. Some of the topics covered include the following:

    An overview of real-time systems
    Binary representation and arithmetic
    Introduction to microcontroller programming
    Methods of input and output
    Microcontroller peripherals: timers & counters
    Microcontroller peripherals: analog-to-digital conversion
    Finite state machines for design and analysis of event-driven, cyclical programs
    Serial communications between microcontrollers

In Part 2 (Weeks 8 to 12) of this paper, we will discuss real-time systems implemented on large computers such as desktop machines. Some of the topics covered include the following:

    Further concepts in object-oriented programming
    Multi-threading
    Graphical user interfaces (GUIs)
    Real-time operating systems
    Scheduling
    Threading

As a result of taking this paper, we aim to improve your C-family programming skills; to give you hands-on experience programming microcontrollers, and to develop your understanding of the range of microcontroller applications; to develop your understanding of object-oriented approaches to software design; to develop you understanding of real-time systems as they’re often encountered, by Mechatronics engineers, in industry and in research.

Course Requirements

Prerequisite: MECHENG 270

Capabilities Developed in this Course

Capability 3: Knowledge and Practice
Capability 4: Critical Thinking
Capability 5: Solution Seeking
Capability 6: Communication
Capability 7: Collaboration

Learning Outcomes

By the end of this course, students will be able to:
  1. Communicate the principal concepts of real-time systems (Capability 6.1 and 7.1)
  2. Design and implement solutions to real-time mechanical/mechatronics problems using the C or C++ programming language (Capability 3.1, 3.2, 4.1, 4.2, 5.1 and 7.1)
  3. Analyse mechanical/mechatronics problems for which a real-time solution has been implemented in the C or C++ programming language (Capability 3.1, 3.2, 4.1 and 4.2)

Assessments

Assessment Type Percentage Classification
Assignments 40% Group Coursework
Final Exam 50% Individual Examination
Tests 10% Individual Coursework
Assessment Type Learning Outcome Addressed
1 2 3
Assignments
Final Exam
Tests

Workload Expectations

This course is a standard 15-point course and students are expected to spend 10 hours per week involved in each 15-point course that they are enrolled in.

For this course, you can expect 3 hours of lectures, a 1 hour tutorial, 3 hours of reading and thinking about the content and 3 hours of work on assignments and/or test preparation (per week, that is).

Delivery Mode

Campus Experience

Delivery:

3 x 1 hr lectures per week

1 x 1 hr tutorial per week

8 x 2 hr laboratories

Attendance is expected at scheduled activities including labs/tutorials to complete components of the course.

Lectures will be available as recordings. Other learning activities including tutorials and guest lectures may be available as recordings.

The activities for the course are scheduled as a standard weekly timetable.

Learning Resources

Course materials are made available in a learning and collaboration tool called Canvas which also includes reading lists and lecture recordings (where available).

Please remember that the recording of any class on a personal device requires the permission of the instructor.

Course materials are drawn from a range of sources, some of which are as follows:

    Butterfield, A., Ngondi, G. E., & Kerr, A. (Eds.). (2016). A dictionary of computer science. Oxford University Press.
    Kopetz, H. (2011). Real-time systems: design principles for distributed embedded applications. Springer Science & Business Media.
    Microchip Technology Inc., “ATmega48A/PA/88A/PA/168A/PA/328/P Data Sheet,” DS40002061A, November 2018.
    Patterson, D. A., & Hennessy, J. L. (2016). Computer Organization and Design: The Hardware Software Interface. Morgan Kaufmann.
    Sedra, A., Smith, K. C., Carusone, T. C., & Gaudet, V. (1998). Microelectronic Circuits 8th Edition. Oxford University Press, New York.
    Williams, R. (2005). Real-time systems development. Elsevier.
    Wilson, G. R. (2001). Embedded systems and computer architecture. Elsevier.

Health & Safety

Students are expected to adhere to the guidelines outlined in the Health and Safety section of the Engineering Undergraduate Handbook.

Student Feedback

At the end of every semester students will be invited to give feedback on the course and teaching through a tool called SET or Qualtrics. The lecturers and course co-ordinators will consider all feedback and respond with summaries and actions.

Your feedback helps teachers to improve the course and its delivery for future students.

Class Representatives in each class can take feedback to the department and faculty staff-student consultative committees.

We pay close attention to feedback provided by students.

This year's feedback indicates that no major changes to the syllabus, or its delivery, are necessary.

Academic Integrity

The University of Auckland will not tolerate cheating, or assisting others to cheat, and views cheating in coursework as a serious academic offence. The work that a student submits for grading must be the student's own work, reflecting their learning. Where work from other sources is used, it must be properly acknowledged and referenced. This requirement also applies to sources on the internet. A student's assessed work may be reviewed for potential plagiarism or other forms of academic misconduct, using computerised detection mechanisms.

Class Representatives

Class representatives are students tasked with representing student issues to departments, faculties, and the wider university. If you have a complaint about this course, please contact your class rep who will know how to raise it in the right channels. See your departmental noticeboard for contact details for your class reps.

Inclusive Learning

All students are asked to discuss any impairment related requirements privately, face to face and/or in written form with the course coordinator, lecturer or tutor.

Student Disability Services also provides support for students with a wide range of impairments, both visible and invisible, to succeed and excel at the University. For more information and contact details, please visit the Student Disability Services’ website http://disability.auckland.ac.nz

Special Circumstances

If your ability to complete assessed coursework is affected by illness or other personal circumstances outside of your control, contact a member of teaching staff as soon as possible before the assessment is due.

If your personal circumstances significantly affect your performance, or preparation, for an exam or eligible written test, refer to the University’s aegrotat or compassionate consideration page https://www.auckland.ac.nz/en/students/academic-information/exams-and-final-results/during-exams/aegrotat-and-compassionate-consideration.html.

This should be done as soon as possible and no later than seven days after the affected test or exam date.

Learning Continuity

In the event of an unexpected disruption, we undertake to maintain the continuity and standard of teaching and learning in all your courses throughout the year. If there are unexpected disruptions the University has contingency plans to ensure that access to your course continues and course assessment continues to meet the principles of the University’s assessment policy. Some adjustments may need to be made in emergencies. You will be kept fully informed by your course co-ordinator/director, and if disruption occurs you should refer to the university website for information about how to proceed.

Student Charter and Responsibilities

The Student Charter assumes and acknowledges that students are active participants in the learning process and that they have responsibilities to the institution and the international community of scholars. The University expects that students will act at all times in a way that demonstrates respect for the rights of other students and staff so that the learning environment is both safe and productive. For further information visit Student Charter https://www.auckland.ac.nz/en/students/forms-policies-and-guidelines/student-policies-and-guidelines/student-charter.html.

Disclaimer

Elements of this outline may be subject to change. The latest information about the course will be available for enrolled students in Canvas.

In this course students may be asked to submit coursework assessments digitally. The University reserves the right to conduct scheduled tests and examinations for this course online or through the use of computers or other electronic devices. Where tests or examinations are conducted online remote invigilation arrangements may be used. In exceptional circumstances changes to elements of this course may be necessary at short notice. Students enrolled in this course will be informed of any such changes and the reasons for them, as soon as possible, through Canvas.