MATLAB Answers

I am trying to run a control system simulation for a pacemaker, I am trying to run it with a desired 75bpm heart rate, this is my code, I can only get as high as about 1.4 on my y axis, how do I change my code to run it at a higher amplitude, thanks

7 views (last 30 days)
David Eze
David Eze on 31 Mar 2016
Edited: Walter Roberson on 31 Mar 2016
close all
clear all
clc
syms s
%tyreus-leuben method (better one)
%Gc(s)=8/s+8; Gh(s)= 169/s2+20.8s
%Kcr = 2.14;
%Pcr = 0.607;
num1 = 8;
den1 = sym2poly(s+8);
num2 = 169;
den2 = sym2poly(s^2+(20.8*s));
Gc = tf(num1,den1);
Gh = tf(num2,den2);
H = 1;
Kcr = 2.14;
Pcr = 0.607;
Kp = Kcr/2.2;
Ti = 2.2*Pcr;
Td = Pcr/6.3;
C=pid(Kp,Ti,Td);
T=feedback(C*Gc*Gh,H);
step(T);

Answers (0)

Categories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!