Model Example Simulink Model

The Project

The Model Based Pacemaker project is an initiative to develop an implementation of the Boston Scientific System Specification in MATLAB Simulink. In addition to the implementation, educational material is developed to assist students in developing their own implementation in both SFWRENG 3K04 and SFWRENG 3MD3 at McMaster University. I have been an active contributor to the project and was a teaching assistant for both courses from 2016 to 2022.

Code Generation

Simulink hardware code generation is used to generate C code from the models and compile the code into a binary compatible with the hardware which is an ARM Cortex M4 based microcontroller from NXP FRDM-K64F.

A video including demonstration is available in the Demo section.

Contributions

I have contributed to the development of various aspects of the project including both the implementation of a functioning Model Based Pacemaker as well as educational material to guide students towards a working implementation.

Simulink models that closely follows the requirements specified by Boston Scientific’s Pacemaker System Specification. Additional models with UART functionality were developed to provide templates for developing their own Device Controller Monitor (DCM) a Graphical User Interface (GUI) used for monitoring and updating the Pacemaker’s parameters in real-time without the need of reprogramming.

Automated Hardware Testing & Verification

An integrated development kit was built to allow students to remotely test their hardware outputs and inputs without the need of oscilloscopes or function generators. I have developed firmware (based on ARM Mbed) and python scripts to automate the process of testing the circuitry and development boards before packaging and handing them to the students.

The testing procedure starts with a python script that flashes different versions of the firmware to the development boards (using pyOCD and pylink) and communicates with the boards over UART to verify working hardware inputs and outputs by using a set of function tests. The automated testing source code is available on Github.

Publication

A benchmark proposal was submitted to Applied Verification for Continuous and Hybrid Systems 2022 and was accepted for presentation at the conference in Sep 2022. The models used for the benchmark proposal are available on Github.

Demo

The following video contains an overview of the development hardware as well as demonstration of a functional Simulink Model: