Week 15 of 15 MEGR 3171  ·  Module 5: Advanced Embedded & System Integration

Digital Control & System Integration

Discretize PID controllers using the Tustin (bilinear) method, implement interrupt-driven digital control loops on the Arduino, apply finite state machines, and integrate a complete mechatronic measurement and control system.

Module 5  Advanced Embedded & System Integration Alciatore Ch. 10–11 (digital control)
Semester Progress
Week 15 / 15

Week 15 at a Glance

Week 15 is the capstone of the course. You will convert the continuous-time PID controllers from Week 14 to discrete-time algorithms using the Tustin bilinear transformation, implement them as interrupt-driven control loops on your Arduino, and apply finite state machine design to manage mode transitions in a real embedded control application. The course concludes with a final system integration exercise.

Tustin bilinear transformationDiscrete-time PIDInterrupt-driven control loopsFinite state machinesI2C, SPI, UART protocolsComplete system integration
Why it matters in practice. Every PID controller running in a real microcontroller is a discrete-time algorithm. The gap between the continuous-time design from Week 14 and the working digital implementation is exactly what this week closes. This is the last major skill gap between classroom and practice.

What You Will Be Able to Do

Course objectives (CO) define program-level skills. Module objectives (MO) define specific weekly targets that build toward them.

Course Objectives (CO)

CO9: Implement a digital control loop on an embedded microcontroller.
CO10: Design, build, calibrate, document, and present an integrated measurement and control system.

Module Objectives (MO) — Week 15

Apply the Tustin (bilinear) method to convert a continuous-time PID transfer function to a discrete-time difference equation.
CO9
Implement a discrete-time PID controller as an interrupt service routine on the Arduino with proper timing and overflow handling.
CO9
Design a finite state machine for an embedded control application with clearly defined states, transitions, and actions.
CO9
Integrate sensor reading, signal conditioning, control algorithm, and actuator output into a complete real-time control loop.
CO10
Review these objectives before you start each assignment. They map directly to what is assessed on the quiz, homework, and exams.

How to Work Through This Week

Follow this sequence. Each step prepares you for the next. Do not attempt graded work before completing the instructional material it depends on.

1
Read Alciatore Ch. 10-11 (digital control sections)
Focus on the Tustin derivation and the velocity form of the discrete PID. Work through the difference equation derivation from scratch before lecture.
2
Attend Lecture — final two lectures of the semester
Lecture 1 covers Tustin discretization, the velocity PID form, and interrupt-driven implementation. Lecture 2 covers FSMs, advanced protocols, and the complete system integration framework. Both lectures include problem sessions.
3
Final Lab: Complete Control System on Arduino
Implement a closed-loop digital PID controller for a physical plant on your Arduino. Demonstrate step response performance, anti-windup behavior, and FSM-based mode switching.
4
Submit Module 6 Homework and prepare for Final Exam
Module 6 Homework is due at the end of this week. Final exam review begins now — the Final Exam covers all 15 weeks.

Required Readings, Videos, and Resources

Complete all required items before moving to graded activities. The Aligns to column maps each resource to the module objectives it directly supports.

ResourceWhat You Will GainAligns toEst. Time
Read
Alciatore Ch. 10-11 — Digital Control Implementation (assigned sections)
Tustin bilinear transformation, velocity form discrete PID, interrupt service routine design, anti-windup in discrete time, FSM notation, and communication protocol selection. MO1-MO4 75 min
Lab
Final Lab: Closed-Loop Digital PID on Arduino
Complete mechatronic system: sensor reading, Tustin-discretized PID, actuator output, FSM mode control. Step response must meet specified performance criteria. MO1-MO4 ~3 hr lab
Explore
Study Guide: Final Exam Comprehensive Review
Complete review of all five modules with key equations, concept summaries, and comprehensive practice problems. All COs 3-4 hr review

Assignments and Due Dates

All graded work is submitted through Canvas. Complete the listed prerequisites before attempting each assignment.

AssignmentPrerequisitesWhat Is AssessedAligns toPoints
Module 6 Homework: PID and Digital Control
End of Week 15
Complete all Week 14-15 readings and labs. The digital PID problems require the Tustin derivation from this week's Lecture 1. Continuous-to-discrete PID conversion, difference equation implementation, anti-windup specification, FSM design, and complete system integration analysis. MO1-MO4 50 pts
Final Exam
Finals Week
Review all five modules using the Final Exam Study Guide. Work every practice problem. Comprehensive coverage of all course objectives CO1-CO10. Emphasis on PID design, digital implementation, and complete signal chain analysis. CO1-CO10 200 pts
📌
Academic integrity. Your final lab must demonstrate a working closed-loop controller on your own Arduino hardware. The step response data you submit must be from your own real-time implementation — simulation output is not acceptable as a substitute.