Intelligent Heart Rate Controller using Fractional Order Pid Controller Tuned by Genetic Algorithm for Pacemaker

DOI : 10.17577/IJERTV6IS050463

Download Full-Text PDF Cite this Publication

  • Open Access
  • Total Downloads : 306
  • Authors : Shweta Bajpai, Dr. Md. Sanawer Alam, Mohd. Asif Ali
  • Paper ID : IJERTV6IS050463
  • Volume & Issue : Volume 06, Issue 05 (May 2017)
  • DOI : http://dx.doi.org/10.17577/IJERTV6IS050463
  • Published (First Online): 22-05-2017
  • ISSN (Online) : 2278-0181
  • Publisher Name : IJERT
  • License: Creative Commons License This work is licensed under a Creative Commons Attribution 4.0 International License

Text Only Version

Intelligent Heart Rate Controller using Fractional Order Pid Controller Tuned by Genetic Algorithm for Pacemaker

Shweta Bajpai

PG student, Department of EIC Engineering

Azad Institute of Engineering & Technology Lucknow, India

Dr. Md. Sanawer Alam Assistant Professor, Department of EIC Engineering

Azad Institute of Engineering & Technology

Lucknow, India

Mohd. Asif Ali Assistant Professor,

Department of Electronics Engineering Azad Institute of Engineering & Technology Lucknow, India

Abstract Heart Disease are becoming the major reason for many deaths every year. Cardiac Pacemaker is small battery operated device formed by complex circuitry and biosensors that helps monitoring and improving heart rate of human being. Arrangement of pacemakers and controller with heart is in a unity feedback system. In this paper, work is about FOPID controller .i.e. an improved PID controller, which is used with Cardiac Pacemakers. The main objective of this paper is to improve the controller response by reducing its overshoot, rise time and settling time. FOPIDs performance is affected by five parameters, variation of them results in stable output. Previous work with FOPIDs has deduced some values of parameters which has lowered the overshoot, rise time and settling time till some extent. But now we will apply genetic algorithm to FOPID controller. Its iterations will further reduce these characteristics to improve pacemaker quality and make it more compatible with activities human being. Applying genetic algorithm to designed unity feedback system shows various results in which some are improved while other are of no use. Best outcomes have been chosen and presented in result. The only limitation observed was increment of settling time which could reduce using other optimization technique in future.

KeywordsFOPID controller, Genetic Algorithm, Cardic pacemakers,

  1. INTRODUCTION

    Recent surveys have shown that heart disease is becoming very common these days. Heart attack is killing almost one person every 33 seconds in India. The reason may be cardiac arrest or arrhythmias. An Arrhythmias is the problem with the rate of rhythm of the heartbeat. During an arrhythmia, the heart can beat either very fast or too slow i.e. in irregular pattern or rhythm. A heartbeat which is too fast is called tachycardia. A heartbeat that is too slow is called as bradycardia. At present, there is magnificent development in medicine field in terms of medicine, vaccinations and devices. Modern pacemakers were introduced when first battery operated implantable

    pacemaker were developed by Dr. Rune Elmquist and used by the patient in 19581959, W. Greatbatch an engineer and W.M. Chardack as doctor (cardiologist) came up with new pacemaker which was slightly larger but had a battery backup of about seven years. Well when experimentally tested on patient it worked only for 18 months. Dual chambers pacemakers came into existence in 1970s. Later, in 1980s and 1990s vast developments took place in all dimensions. Sensors were involved in pacemakers which monitored breathing rate, blood pressure, body motion etc. Microprocessors were used in later 90s into pacemaker which were programmed. These processor based pacemakers were faster and consumed more power. Chin-Jen Cheng et.al (2008) In [5] presented novel dual voltage pacing system for implantable pacemakers. The paper basically aimed at reducing supply ripples and lowering process variation imposed on the divided resistor by a fully on chip low-dropout (LDO) regulator. Shuenn- Yuh Lee et.al (2010) in [6] presented new technology for implantable pacemakers. Paper proposed a wireless telemetry using the near field coupling technique with round wire coils for a pacemaker. Jyoti Yadav et.al (2011) presents [1] overall control system composed of cardiovascular system energized by an intelligent pacemaker system as operated in a closed loop manner with unity negative gain in the feedback path. A controller based on PID is designed with the help of Zeigler-Nichols, Tyreus-Luyben and Relay tunings methods. Also, heart rate controller is designed using fuzzy controller to improve response parameters. Achu Govind K.R. et. al (2012) presents [7] an adaptive PID controller based on delta rule and Adaptive correction factor for cardiac pacemakers. The adaptive PID controller is implemented using an Adaptive Loop incorporating MIT rule with the Delta rule. All parameters of PID are modified by an adaptive correction factor. Paul Bogdan et. al (2012) presents [3] a

    constrained finite horizon optimal control approach to R- R interval regulation in implantable pacemakers. The aim of the paper was to introduce a fractal approach to pacemaker design based on the constrained finite horizon optimal control problem. Wei Vivien et al. (2013) present

    [4] an advanced intelligent control for pacemaker systems using fuzzy proportional integral derivate (FPID) controller. Based on dual sensors, combination of fuzzy logic and conventional PID controller approaches is adopted for the controller design. Shivaram P. Arunachalam et. al (2016) presents [2] a robust fractional order PID (FOPID) controller designed on the base of Ziegler Nicholos tuning method. The stable FOPID controller outfaced PID controllers with different tuning methods also it outperformed FLC in terms of rise time and percent overshoot. These FOPID based pacemakers are rate adaptive in nature.

    A. Heart's Electrical System

    Our heart has its own electrical systems that regulates the rate and rhythm of our heartbeat. With every heartbeat, electrical signals generate and causes the heart to contracts and pump blood which travels throughout the body. Heart is divided in to four chambers, two upper chambers and

    Fig.1. Pacemaker placed in body

    C. Heart Rate Controller

    Cardiovascular system is a closed loop system with filter and controllers and with negative unity feedback. Fig.2. shown below shows block arrangement of model of heart rate regulating system which contains a controller, a pacemaker and heart[1]. All are depicted using transfer function which will be explained later in this work.

    two lower chambers. Firstly, upper two chambers of heart

    R(s)

    +/-

    G (s) G

    (s)

    Y(s)

    called atria contract. These pump the blood into the lower chamber of hearts called ventricles. The ventricles then contract and pump the blood to the rest of the body. This combination of contraction of the atria and ventricles is known as heartbeat. An average heartbeat of normal adults is 75 beats/ min, for young active person who is much active in sports or other physical activities have heart beat around 85 beats/ min and for an old age person heart beat is around 65 beats/min. Pacemakers are used to overcome arrhythmias situation as they use slow energy electrical pulses to overcome this problem.

    1. Cardiac Pacemakers

      A cardiac pacemaker is a medical device used to stimulate the heart muscles in case of any problem in natural conduction system of heart to regulate the rhythm of heart [1]. Broadly pacemaker has two functional units: first is sensing circuit by which it senses the patients heartbeat and second is output circuit through which it sends out electrical signals to heart muscles. This electrical signal is used to control the heartbeat of the patient. If patient heartbeat becomes too slow (bradycardia), the pacemaker senses the abnormal signal and start sending a regular excitation signals to heart muscles which forces the heart to contract at a rate fast enough to maintain the patints heart rhythm normal[7]. we can say pacemakers can:

      • speed up slow heartbeat.

      • Helps to control an abnormal heart rate.

      • Coordinate working between the upper chambers and lower chambers of the heart.

      • Make sure the ventricles contract normally if the atria are quivering instead of beating with a normal rhythm.

        GP(s) C H

        Fig.2. Block diagram of heart rate controller

        Here, GP(S) = Transfer function of pacemaker GC(s) = Transfer function of controller GH(s) = Transfer function of Heart

        R(s) = Actual heart rate Y(s) = Desired heart rate

        Transfer function pf pacemaker and heart is fixed as described in [1], only transfer function of controller keeps on changing on the basis of type of controller used example PID or FOPID.

        In this work, we taken FOPID controller along with pacemaker and heart transfer function. Considering the case of an old age person whose average heart beat is 65 beats per min, we have tried to optimize the results obtained in [2] by applying genetic algorithm.

  2. FOPID CONTROLLER

    Fractional order control is the generalization of traditional controllers or control schemes to non- integer orders [2]. Fractional order PID controller is an improved PID controller. These controllers are less sensitive to changing

    parameters of control system or controller. A fractional order controller can achieve the property of iso- damping. Fig 3.2 shows the block diagram of fractional order PID controller.

    Transfer function of Fractional order PID controller is given by:

    C(s)=KP+KIs-+KDs

    Where, KP = Proportional gain KI = Integral gain

    KD = Derivative gain

    and = positive real numbers

    From equation, we can see that if both and are equal to 1 then transfer function of FOPID is equal to that of PID as shown in eq. 3.1. Varying and we can get controllers like,

      • If = 1 and = 1, then it is classical PID controller.

      • If = 0 and = 1, then it is classical PD controller.

      • If = 1 and = 0, then it is classical PI controller.

      • If = 0 and = 0, then it is classical P controller.

    Fig.3. Closed loop PID controller

      1. Tuning of FOPID

    To tune any FOPID controller except tuning KP, KI and KD we also can vary and to obtain better performance of controller.

    1. Ziegler- Nichols Type Tuning Rules

      This tuning is found most optimized for maximum solutions, but they only depend on initial estimates of the parameter provided. These tuning rules are valid only for S-shaped step response.[9]

      Fig.4. S-shaped step response

      1. First set of Tuning rules

        A first set of rules is given in table 3.1 and table 3.2. These are to be read as:

        P= 0.0048 + 0.2664L + 0.4982T+ 0.0232L2 0.0720T2 –

        0.0348TL and so on. They may be used if 0.1T50, L2 Table.1. Parameters for the first set of tuning rules when

        0.1T5

        KP

        KI

        KD

        1

        -0.0048

        0.3254

        0.0662

        1.5766

        0.8736

        L

        0.2664

        0.2478

        -0.2528

        -0.2098

        0.2746

        T

        0.4982

        0.1429

        0.1081

        -0.1313

        0.1489

        L2

        0.0232

        -0.133

        0.0702

        0.0713

        -1.557

        T2

        -0.072

        0.0258

        0.0328

        0.0016

        -0.025

        LT

        -0.0348

        -0.0171

        0.2202

        0.0114

        0.0323

        KP

        KI

        KD

        1

        2.1187

        -0.5201

        1.1421

        1.0645

        1.2902

        L

        -3.5207

        2.6643

        -1.3707

        -0.3268

        -0.5371

        T

        -0.15827

        0.3453

        0.0357

        -0.0229

        -0.0381

        L2

        1.5827

        -1.0944

        0.5552

        0.2018

        0.2208

        T2

        0.0025

        0.0002

        -0.0002

        0.0003

        0.0007

        LT

        0.1824

        -0.1054

        0.263

        0.0028

        -0.0014

        Table.2. Parameters for the first set of tuning rules when 5T50

        Fig.4. FOPID controller regions based on the tuning parameters

        Hence to tune any FOPID controller except tuning KP, KI and KD we also can vary and to obtain better performance of controller.

      2. Second set of tuning rules

        A second set of rules is given in table 3.5. These may be applied for 0.1T50 and L0.5

        Table.3. Parameters for the second set of tuning rules when 0.1T50 and L0.5

        KP

        KI

        KD

        1

        -1.0574

        0.6014

        0.8739

        1.1851

        0.2778

        L

        24.542

        0.4025

        -15.084

        -0.3464

        2.1522

        T

        0.3544

        0.7921

        -0.0771

        -0.0492

        0.0675

        L2

        -46.732

        -0.4508

        28.0388

        1.7317

        2.4387

        T2

        -0.0021

        0.0018

        0

        0.0006

        – 0.0013

        LT

        -0.3106

        -1.2050

        1.6711

        0.0380

        0.0021

    2. Stability of Fractional order PID Controller

      A system is stable if all pole of its characteristics polynomial has negative real parts. In other words, system is stable if all its poles lie on the left half of the s-plane. This is valid for the integer order LTI systems. For fractional order, stability only depends on location of poles but it also depends upon the fractional order that becomes more complex. The characteristic equation of a general linear fractional differential equation has the form[11]

      = 0

      =0

      Where, is a rational, the characteristics equation can be

      written as;

  3. GENETIC ALGORITHM

    Genetic Algorithm (GA) is a search-based optimization technique based on the principles of Genetics and Natural Selection. Genetic Algorithms are subset of a larger branch named as Evolutionary computation. It was developed by John Holland and his students at the university of Michigan. It is frequently used to solve optimization problems, in research, and in machine learning. In genetic algorithm, we have population of solution for the given problem. These solutions then undergo various steps like, selection, mutation etc. (same as natural genetic phenomenon) producing many more offspring. Each individual (solution) is assigned with fitness value, and the one with better fitness are kept at higher priority and is provided with mate to produce more fitter individuals while the one with lower fitness are given lower preference. Process continues till we do not get fittest value of fittest individual.

    1) Steps of Geneic Algorithm

      1. Initialization

        We first decide the coding structure. Coding is termed as chromosomes in genetic algorithm literature, and is considered as string of symbols. These components of chromosomes are then labelled as genes.

      2. Selection

        =0

        / = 0

        Selection is component which takes the algorithm towards

        the solution. This is one by preferring individuals with

        where m is a integer, = 1/m and > 0

        Fig.5(a)

        Fig.5(b)

        Fig.5(c)

        Fig.5. Various regions of stability

        better fitness over low- fitted ones. This operation may be deterministic or it may be random.

      3. Crossover

        Crossover is an important concept in genetic algorithm. It is a random operator in genetic algorithm and its work is to create new chromosomes from parent chromosome. This is done by combining few information which extracted by both the parents.

      4. Mutation

        Mutation is another important step of genetic algorithm. It is random deformation of genetic content by means of any environmental influence. It operates individually by probabilistically perturbing each and every bit string. Mutation is used in genetic algorithm by generating random number between zero and one. After this making change in few elements of the string with certain probability belonging to (0,1).

      5. Encoding and Decoding

        Obtained variables are mapped onto fixed length binary digit string, which is constructed over the binary alphabet

        {0,1}, and is concatenated head to tail to form one long string referred as a chromosome. Thus, every string contains all values of design variables can be obtained by decoding.

      6. Fitness Function

    Fitness in genetic algorithm refer to the performance on basis of which strings are ranked and this ranking further decides allocation of reproductive opportunities. Thus, as discussed earlier, individual with higher fitness will have higher probability of selection as parent.

  4. METHODOLOGY

    169

    The proposed methodology here is that, we cascade FOPID controller, heart and cardiac pacemaker with a unity feedback system[2] as shown in fig.6. below.

    1. As per the set population size we will receive many outcomes of peak overshoot and percent overshoot to whom we will arrange in ascending order.

    2. We name this as percent overshoot as cost.

    3. Up next, sort out 50% individuals with the least cost in terms of percent overshoot.

      2 + 20.8

      +/-

      FOPID 8

      + 8

    4. Next important step is of crossover. We crossover randomly the parameters of 50% of top individuals which have minimum cost or percent overshoot.

    5. This crossover produces new population of individuals which come together to make new population say pop2.

    6. Size of pop2 will be equal to pop1

    Fig.6. Block diagram of FOPID based heartrate controller

    We have related heart and pacemaker with transfer function [1]

    Transfer function of heart = 8

    +8

    2

    Transfer function of pacemaker = 169

    +20.8

    Fractional Order PID controller is a variant of PID

    controller where integral and derivative are raised to fractional powers as PID.

    Transfer function of Fractional order PID controller is given by:

    C(s) = KP +KIs- + KDs

    Where, KP = Proportional gain KI = Integral gain

    KD = Derivative gain

    and = positive real numbers

    As per the literature studied in [2] on keeping the value KP, KD, KI, and we get the Fractional-order transfer function:

    283.92s1.92+1581.8s0.97+365.04

    ———————————————————–

    s3.97+28.8s2.97+166.4s1.97+283.92s1.92+1581.8s0.97+365.04

    by using the fixed values of we get values of peak overshoot, rise time and settling time. These values can be more optimized by using genetic algorithm.

    Steps to tune FOPID using genetic Algorithm.

    1. The algorithm starts by creating population of individuals. Individuals are KP, KD, KI, and

    2. Next, we set a range that is maximum and minimum

      value of all above defined parameters.

    3. All these individuals will come together to make population say, pop1

    4. Next step is to decide population size, Mutation rate, Survival percentage.

    5. These steps decide number of loops to be conducted.

    6. Since my work is focusing on reducing peak overshoot so, calculation of peak overshoot and percent overshoot is done for every individual.

    1. Now we perform mutation at random individuals by updating their parameters.

    2. Again, find the cost of new population same as previous

    3. Update all those old individuals by new if the cost of new is less than the older one.

    4. To get optimized result we need to repeat the steps i.e. from step 7 to step 15

    5. Repetition will be stopped only after stopping criteria is reached.

  5. RESULT

    Results here are obtained by applying genetic algorithm were the various value of KP, KD, KI, and . On applying these value in the transfer equation of FOPID and taking its transfer response we get desired output. The desired output is lower over shoot, rise time and settling time value as compared to the base paper [2].

    Obtained value after applying genetic algorithm: KP=1.3799

    KD= 0.2704

    KI= 0.4582

    = 0.9304 and, =0.9871

    Use of these values in transfer function step response was obtained. The response revealed the following results:

    Rise Time: 0.0908

    Settling Time: 0.6432

    Overshoot: 0.9122

    Rise time and overshoot are reduced as compared to the base paper while settling time has increased

      1. Representation of the responses with figures

    step response at HR= 65

    70

    60

    50

    Amplitude

    40

    30

    20

    10

    0

    0 1 2 3 4 5 6 7 8 9 10

    Time [s]

    Fig.7. Step response at heart rate= 65bpm

    Fig shown above shows the response of FOPID for heart rate(HR) to be 65 bpm. Since rise time is less hence controller will respond to arrhythmia quickly and try to reach threshold as soon as possible, while lower value of overshoot will also help the pacemaker to provide stable pulses as soon as possible.

    step response

    1.4

    1.2

    1

    Amplitude

    0.8

    0.6

    0.4

    0.2

    0

    0 1 2 3 4 5 6 7 8 9 10

    Time [s]

    Fig.8. Step Response for Heart Rate Controller

    This fig shown above shows the step response of the FOPID used with cardiac pacemaker. Red line shows unity that is stability. Step response helps in calculating rise time, settling time and overshoot. With help of step response, I have drawn comparison between original and proposed technique.

    Table.4. Comparison between original technique and proposed technique

    Controller

    Rise Time (tr)

    Settling

    time(ts)

    %Oversoot

    ZN tuned

    FOPID

    0.1367

    0.2761

    2.05

    GA tuned

    FOPID

    0.0908

    0.6432

    0.9112

    Inference

    drawn

    Decreased

    Increased

    Decreased

    This comparison done above shows that overshoot and rise time is reduced whereas settling time is increased.

  6. CONCLUSION

Pacemakers incorporated with the FOPID controllers give better response and are more adaptive I nature as compared to the cardiac pacemakers working with PID controllers. Previous work discussed in [2] has shown tuning of FOPID controller using ZN tuning method. In this paper, FOPID controller is tuned using genetic algorithm. Final result, that is overshoot, rise time have reduced from previous work. This is shows that FOPID tuned by genetic algorithm. Only limitation observed was that settling time was increased. FOPID tuning procedure can be further optimized by using particle swarm optimization.

ACKNOWLEDGMENT

This work was supported by Dr. Md. Sanawer Alam, Head of Department Electronics Instrumentation and Control Engineering.

Also, I am grateful to Mohd. Asif Ali, faculty Electronics department of Electronics Engineering for his continuous support Special thanks to all faculty members of Electronics Instrumentation and Control Engineering Department for their co-operation.

REFERENCES

  1. Jyoti Yadav, Asha Rani, Girisha Garg(2011), Intelligent Heart Rate Controller for Cardiac Pacemaker, International Journal of Computer Applications, Volume 36 No.7, ISSN 0975 8887.

  2. Shivaram P. Arunachalam, Suraj Kapa, Siva K. Mulpuru, Paul A. Friedman, and Elena G. Tolkacheva(2016), Intelligent Fractional-Order PID (FOPID) Heart Rate Controller for Cardiac Pacemaker, IEEE 978-1-5090-1166- 7/16

  3. Paul Bogdan, Siddharth Jain, Kartikeya Goyal, and Radu Marculescu (2012), Implantable Pacemakers Control and Optimization via Fractional Calculus Approaches: A Cyber-

    Physical Systems Perspective, IEEE 978-0-7695-4695-7/12

  4. Wei Vivien SHI(2013), Advanced Intelligent Control of Cardiac Pacemaker Systems Using a Fuzzy PID Controller, International Journal of Intelligent Control and Systems, Vol. 18.

  5. Chih-Jen Cheng, Chung-JuiWu, and Shuenn-Yuh Lee(2008), Programmable Pacing Channel With a Fully On-chip LDO Regulator for Cardiac Pacemaker, IEEE 978-1-4244-2605- 8/08

  6. Shuenn-Yuh Lee, Yu-Cheng Lee(2010), A Near Field Telemetry Device With Close-Loop Endocardial Stimulation for a Pacemaker, IEEE, 978-1-4244-6694-8/10

  7. Achu Govind K.R., Aravind Shekar R, Vinod B R(2014), A Novel design of an Adaptive PID Controller for Cardiac Pacemaker, International Journal of Science and Research., ISSN 2319-7064.

  8. Tushar Verma, Akhilesh Kr. Mishra (2014), Comparative study of PID and FOPID Controller Response for Automatic Voltage Regulation, IOSR Journal of Engineering(IOSRJEN), Vol. 04, Issue 09 (September 2014)

    ISSN(p): 2278-8719

  9. Duarte Valerio, Jose Sa da Costa, Tuning Rules For Fractional PID Controllers, Technical Univ. of Lisbon- Instituto Superior Tecnico.

  10. Pritesh Shah, Sudhir Agashe(2016), Review of Fractional PID Controller, ELSEVIER, Mechatronics

  11. Dr.Mohamed Jasim Mohamad, Dr. AmjadKhashan(2014), Compaison Between PID and FOPID controllers based on Particle Swarm Optimization The Second Engineering Conference of Control, Computers and Mechatronics Engineering

Leave a Reply