Improving a Heart Rate Controller for a Cardiac Pacemaker. Connor Morrow

Similar documents
6.1 Sketch the z-domain root locus and find the critical gain for the following systems K., the closed-loop characteristic equation is K + z 0.

EE3CL4: Introduction to Linear Control Systems

EE C128 / ME C134 Fall 2014 HW 6.2 Solutions. HW 6.2 Solutions

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Mechanical Engineering 2.04A Systems and Controls Spring 2013

EEE 184 Project: Option 1

ME 475/591 Control Systems Final Exam Fall '99

(b) A unity feedback system is characterized by the transfer function. Design a suitable compensator to meet the following specifications:

VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur

Due Wednesday, February 6th EE/MFS 599 HW #5

Outline. Classical Control. Lecture 5

ECE-320: Linear Control Systems Homework 8. 1) For one of the rectilinear systems in lab, I found the following state variable representations:

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Mechanical Engineering Dynamics and Control II Fall K(s +1)(s +2) G(s) =.

Iterative Feedback Tuning

Control 2. Proportional and Integral control

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Mechanical Engineering Dynamics and Control II Fall 2007

Software Engineering 3DX3. Slides 8: Root Locus Techniques

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

Systems Analysis and Control

Root Locus Design Example #4

Chapter 2. Classical Control System Design. Dutch Institute of Systems and Control

Chapter 6 - Solved Problems

CHAPTER 10: STABILITY &TUNING

K c < K u K c = K u K c > K u step 4 Calculate and implement PID parameters using the the Ziegler-Nichols tuning tables: 30

Notes for ECE-320. Winter by R. Throne

R a) Compare open loop and closed loop control systems. b) Clearly bring out, from basics, Force-current and Force-Voltage analogies.

Control Systems. University Questions

Control Systems I Lecture 10: System Specifications

MAS107 Control Theory Exam Solutions 2008

Multivariable Control Laboratory experiment 2 The Quadruple Tank 1

Controller Design using Root Locus

Course roadmap. Step response for 2nd-order system. Step response for 2nd-order system

Controls Problems for Qualifying Exam - Spring 2014

Laboratory 11 Control Systems Laboratory ECE3557. State Feedback Controller for Position Control of a Flexible Joint

Root Locus Design Example #3

PID Control. Objectives

EE 380 EXAM II 3 November 2011 Last Name (Print): First Name (Print): ID number (Last 4 digits): Section: DO NOT TURN THIS PAGE UNTIL YOU ARE TOLD TO

ECSE 4962 Control Systems Design. A Brief Tutorial on Control Design

UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING. MSc SYSTEMS ENGINEERING AND ENGINEERING MANAGEMENT SEMESTER 2 EXAMINATION 2015/2016

Video 5.1 Vijay Kumar and Ani Hsieh

Discrete Systems. Step response and pole locations. Mark Cannon. Hilary Term Lecture

Lecture 5: Frequency domain analysis: Nyquist, Bode Diagrams, second order systems, system types

Transient response via gain adjustment. Consider a unity feedback system, where G(s) = 2. The closed loop transfer function is. s 2 + 2ζωs + ω 2 n

TUNING-RULES FOR FRACTIONAL PID CONTROLLERS

Homework 7 - Solutions

1 An Overview and Brief History of Feedback Control 1. 2 Dynamic Models 23. Contents. Preface. xiii

Bangladesh University of Engineering and Technology. EEE 402: Control System I Laboratory

If you need more room, use the backs of the pages and indicate that you have done so.

State Feedback Controller for Position Control of a Flexible Link

IMPROVED TECHNIQUE OF MULTI-STAGE COMPENSATION. K. M. Yanev A. Obok Opok

Pitch Rate CAS Design Project

Chapter 5 HW Solution

EE C128 / ME C134 Fall 2014 HW 9 Solutions. HW 9 Solutions. 10(s + 3) s(s + 2)(s + 5) G(s) =

Inverted Pendulum: State-Space Methods for Controller Design

Example on Root Locus Sketching and Control Design

ECEn 483 / ME 431 Case Studies. Randal W. Beard Brigham Young University

Dr Ian R. Manchester Dr Ian R. Manchester AMME 3500 : Review

Part IB Paper 6: Information Engineering LINEAR SYSTEMS AND CONTROL. Glenn Vinnicombe HANDOUT 5. An Introduction to Feedback Control Systems

Lecture 5 Classical Control Overview III. Dr. Radhakant Padhi Asst. Professor Dept. of Aerospace Engineering Indian Institute of Science - Bangalore

Design of an Intelligent Control Scheme for Synchronizing Two Coupled Van Der Pol Oscillators

BASIC PROPERTIES OF FEEDBACK

CYBER EXPLORATION LABORATORY EXPERIMENTS

Design of a Lead Compensator

CHAPTER 6 CLOSED LOOP STUDIES

Dr Ian R. Manchester Dr Ian R. Manchester AMME 3500 : Root Locus

Open Loop Tuning Rules

CHAPTER 1 Basic Concepts of Control System. CHAPTER 6 Hydraulic Control System

In-Process Control in Thermal Rapid Prototyping

7.4 STEP BY STEP PROCEDURE TO DRAW THE ROOT LOCUS DIAGRAM

7.2 Controller tuning from specified characteristic polynomial

Chapter 12. Feedback Control Characteristics of Feedback Systems

Control Systems Design

Outline. Classical Control. Lecture 1

EE C128 / ME C134 Fall 2014 HW 8 - Solutions. HW 8 - Solutions

CHAPTER 7 : BODE PLOTS AND GAIN ADJUSTMENTS COMPENSATION

Introduction to System Identification and Adaptive Control

Dynamic Response. Assoc. Prof. Enver Tatlicioglu. Department of Electrical & Electronics Engineering Izmir Institute of Technology.

SECTION 5: ROOT LOCUS ANALYSIS

RamchandraBhosale, Bindu R (Electrical Department, Fr.CRIT,Navi Mumbai,India)

Understanding Exponents Eric Rasmusen September 18, 2018

Homework Assignment 3

Lab 3: Model based Position Control of a Cart

Feedback Control of Linear SISO systems. Process Dynamics and Control

Systems Analysis and Control

Tuning PI controllers in non-linear uncertain closed-loop systems with interval analysis

Engraving Machine Example

Part II. Advanced PID Design Methods

Feedback Control part 2

The requirements of a plant may be expressed in terms of (a) settling time (b) damping ratio (c) peak overshoot --- in time domain

Power System Operations and Control Prof. S.N. Singh Department of Electrical Engineering Indian Institute of Technology, Kanpur. Module 3 Lecture 8

Quanser NI-ELVIS Trainer (QNET) Series: QNET Experiment #02: DC Motor Position Control. DC Motor Control Trainer (DCMCT) Student Manual

] [ 200. ] 3 [ 10 4 s. [ ] s + 10 [ P = s [ 10 8 ] 3. s s (s 1)(s 2) series compensator ] 2. s command pre-filter [ 0.

ECE 388 Automatic Control

1 x(k +1)=(Φ LH) x(k) = T 1 x 2 (k) x1 (0) 1 T x 2(0) T x 1 (0) x 2 (0) x(1) = x(2) = x(3) =

Automatic Control (TSRT15): Lecture 4

Chap 8. State Feedback and State Estimators

Lab # 4 Time Response Analysis

Unit 8: Part 2: PD, PID, and Feedback Compensation

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

PD, PI, PID Compensation. M. Sami Fadali Professor of Electrical Engineering University of Nevada

Professional Portfolio Selection Techniques: From Markowitz to Innovative Engineering

Transcription:

Improving a Heart Rate Controller for a Cardiac Pacemaker Connor Morrow 03/13/2018

1 In the paper Intelligent Heart Rate Controller for a Cardiac Pacemaker, J. Yadav, A. Rani, and G. Garg detail different control methods for coming up with a controller to improve on the response of a pacemaker. Using a previously established transfer function for the heart and pacemaker mechanics, they design a controller through three different methods: Ziegler-Nechols tuning, Tyreus-Luyben tuning, and fuzzy logic. This example will look into how they developed their controllers while also putting forth a few state space controllers that will improve upon their methods. 1 Pacemaker System To start, let s look at the system that the controller will be integrated into. S. C. Biswas et al came up with a transfer function to model the cardiovascular system in the paper Mathematical Model of Cardiovascular System by Transfer Function Method. The transfer functions that model the heart and the pacemaker are: 169 G H = s 2 + 20.8s G P = 8 s + 8 The block diagram that includes those transfer functions as well as the controller looks like: 2 Their Controllers Before building our own state space controller, lets first look at how they built their controllers. This will be a quick overview on the methods that they used, as well as looking at the results that they came up with. 2.1 Ziegler-Nichols and Tyreus-Luyben Tuning Ziegler-Nichols and Tyresus-Luyben tuning are ways of forming a PID controller by looking at the critical gain and period of the open loop system. One way to find critical gain would be to use the root locus of the open loop system to find the K value that lies at s = 0 on the real axis. Once that is found, we look at the system after being excited and find the period between the peaks of its continual oscilation.

2 From the root locus, we see that the gain associated with marginal stability is: K cr = 3.5446155 Now looking at the response we can find the period of the oscillations. P cr = 0.49 sec

3 The controller formula for a PID controller is as follows: G c (s) = K p + K i s + K ds It can also be written in a form using time constants as opposed to gains. G c (s) = K p (1 + 1 T i s + T ds) Both the Ziegler-Nichols and Tyreus-Luyben tuning methods use the critical gain and the period to come up with the time constants. The formulas for the time constants are listed in the following table. This gives us the controllers Table 1: Tuning Method Gains Method K p T i T d Ziegler-Nichols PID 0.6K cr 0.5P cr 0.125P cr Tyreus-Luyben PID K cr /2.2 2.2P cr P cr /6.3 G ZN = 0.032s2 + 0.52s + 2.127 0.25s G T L = 0.14s2 + 1.7s + 1.6 1.1s We can now see what the step response of the closed loop system would look like when implementing these controllers. We will be looking at trying to achieve a heart rate beats per minute of 65, 75, and 85.

4 These responses are not identical to the ones generated in the paper, as the paper did not explicitly declare their gains. However, they do list what rise time, settling time, and percent maximum overshoot they were able to achieve, which is what we will be designing our controller to do better than. Table 2: Ziegler-Nichols Results Heart Rate Settling Time Rise Time PMO 65 0.0714 1.02 23.5% 75 0.0714 1.02 23.5% 85 0.0711 1.02 24.1% Table 3: Tyreus-Luyben Results Heart Rate Settling Time Rise Time PMO 65 0.0860 0.410 11.7% 75 0.0856 0.410 11.4% 85 0.0853 0.410 10.9% 2.2 Fuzzy Logic Controller Fuzzy logic controllers are built on the fuzzy logic mathematical system. This refers to the ability of logic control that can interpret more than true and false. It is also able to handle partially true. Creating a fuzzy logic controller involves a process of fuzzification of the data, processing that data through a fuzzy logic engine, and finally defuzzifying that information. The paper briefly goes over this process, but doesn t explicitly say how it was performed. Once again, however, they detail the response characteristics of this method, which we will compare our controller to. Heart Rate Settling Time Rise Time PMO 65 0.344 0.757 2.09% 75 0.292 0.748 2.51% 85 0.272 0.763 3.59% 3 State Space Controller Now that we have had an opportunity to look at how they designed their controller, let s begin building a state space controller. In order to do so, we will first create the state space equations. 3.1 State Space Equations Our state variables will come from open loop transfer function of G H and G P. ( G = G = G = G H G P 169 s 2 + 20.8s ) ( 8 s + 8 1352 s 3 + 20.8s 2 + 166.4 )

5 Looking at G as the transfer function between the input, R, and the output, Y, we get: We can now set up our state variables Y R = 1352 s 3 + 20.8s 2 + 166.4... Y + 20.8Ÿ + 166.4Ẏ = 1352R... Y = 166.4Ẏ 20.8Ÿ + 1352R x 1 = Y x 2 = Ẏ = x 1 x 3 = Ÿ = x 2 This gives us the state matrix equation x 1 0 1 0 x 1 0 x 2 = 0 0 1 x 2 + 0 R x 3 0 166.4 20.8 x 3 1352 Y = [ 1 0 0 ] x 1 x 2 This gives us our state space matrices that we will enter into Matlab 0 1 0 0 A = 0 0 1, B = 0, C = [ 1 0 0 ], D = 0 0 166.4 20.8 1352 Before going too much further, we should also realize that state space controllers generally include a steady state error. In order to rectify that, we will include an integrator loop outside of the main control loop. This will produce new state space matrices that look like the following: [A i ] = [ ] [A] {0}, [B [C] 0 i ] = x 3 { } [B], [C 0 i ] = [[C] 0] We will also need the closed loop A and B matrices. They will include the controller matrix, K, that we will derive in the next sections, with K i being the controller gain added because of the integrator loop. [A icl ] = [ ] [A] [B][K] [B]Ki, [B [C] 0 icl ] = { } {0} 1 Those matrices can all be entered into Matlab to handle the calculations. The closed loop matrices should be included in the Matlab code after the controller K is made. With that out of the way, we can begin the actual design process of the controller.

6 3.2 Designing a Controller to Outperform the Tuning Methods The controller will be designed in order to model a second order system. That means we can find a ζ and ω n that will meet our design criteria to come up with the controller. This controller will be designed to outperform the the previously discussed tuning methods. The stated PMO and rise time for the Ziegler-Nichols controller was about 23% and 0.071 sec respectively, whereas the Tyreus-Luyben method achieved a PMO of 10.9% and a rise time of 0.086 sec. To out perform both controllers, we will design one that will achieve a PMO below 10% and have a rise time below 0.07 sec. From our graphs detailing the relationship between PMO and ζ, for a PMO below 10% we are going to want ζ = 0.6. From there we can calculate ω n from the following equations. ζ = 0.6 t r = 0.8 + 2.5ζ ω n ω n = 32.9 We can find the roots for the second order system created with these parameters to be used to determine our controller matrix s 2 + 2ζω n s + ω 2 n = 0 s = 19.7 ± 26.3i Since the the actual system is third order, we will add another arbitrary root for our matrix. This root must be at least five times greater than the second order roots, in order to not have an impact on the system. We will choose -100. Also, as established earlier, we will need a root to compensate for the integrator, which we will choose to be -101. The K matrix is determined by using the place command in Matlab, placing the four roots in A i and B i. One thing to remember is that we will need the gain for the integrator to be the negative of the one that Matlab generates. This gives us the controller matrix: K = [455 14.0 0.162 8065] Creating the closed loop A and B matrices through the method discussed in the previous section, and using the ss command in Matlab to generate the state space closed loop equation, we can view the step response of the system. We will only looking at 65bpm to make sure we have achieved our goal.

7 This step response yields a PMO of 8.27% and a rise time of 0.064 sec, which means we ve achieved our goal. 3.3 Designing a Controller to Outperform the Fuzzy Logic Controller Designing our second controller will be nearly identical to the previous method, just with different PMO and rise time goals. For this one, we want to beat a PMO of 2.1% and a rise time of 0.27 sec, which was achieved by the fuzzy logic controller. We will use a PMO of 2% and a rise time of 0.25 sec, which yields the following The step response to that system looks like ζ = 0.9 ω n = 12.2 K = [186 10.7 0.149 1110]

8 This response has no overshoot and has a rise time of 0.239 sec, which is once again successful. 3.4 Designing the Optimal Controller For fun, let s now design a controller to beat the tuning methods and the fuzzy logic method at once. We will be trying to achieve a PMO less than 2.1% and a rise time of 0.071 sec. ζ = 0.8 ω n = 40 K = [716 18.0 0.181 11900]

9 Once again, state space controllers make it easy to achieve the characteristics that we are looking for. The PMO for this system is 1.18% and the rise time is 0.07 sec. 4 Matlab Code Working with state space matrices can be very tedious, however Matlab makes things a lot easier. The following is the Matlab code, which shows how the tuned controllers were recreated and how the state space controllers were made.

13 References [1] S. C. Biswas, A. Das, P. Guha Mathematical Model of Cardiovascular System by Transfer Function Method Calcutta Medical Journal, 4, 2006 [2] J. Yadav, A. Rani, G. Garg Intelligent Heart Rate Controller for Cardiac Pacemaker International Journal of Computer Applications, 7, 2011