Biomedical Engineering Reference
In-Depth Information
Solution
The input,
i
(
t
), and output,
v
(
t
), are related by the convolution integral (Eq. (11.32)):
1
1
A e B=t
v ð t Þ¼ h ð t Þ * i ð t Þ¼
h ð
B
Þ i ð t
B
Þ d
B
¼
u ð
B
Þ u ð t
B
Þ d
B
1
1
where we use a dummy integration variable, B, to distinguish it from the cell time constant, t. The
unit step functions inside the integral take values of one or zero—in which case they do not con-
tribute to the integral.
u ðBÞ¼
1ifB >
0 and
u ð t BÞ¼
1if
t B >
0. Combining these two inequal-
ities, we have that
u ð t u ðBÞ¼
1 whenever 0
< B < t
, and we can therefore change the limits of
integration and replace the unit step function with 1:
ð t
0 A e B=t
e t =t
v ð t Þ¼
d
B
¼ A
t
1
:
:
MATLAB Solution
%Theoretical Result
dt
¼
0.0001; %Sampling Resolution
¼
Fs
1/dt; %Sampling Rate
time
¼
0:dt:5; %5-second time-axis
¼
Tau
0.1; %Cell Membrane Time Constant
¼
A
10;
y
A*Tau*(1-exp(-time/Tau)); %Closed Form Output Equantion
plot(time,y,'color',[.75 .75 .75],'linewidth',3) %Plotting
Theoretical Output
hold on
¼
%Simulated Output
h
¼
A*exp(-time/Tau); %Impulse Response
¼
x
[zeros(1,Fs) ones(1,Fs*4)]; %Step Input
¼
¼
y
conv(h,x)*dt; %Step Response, obtained by convolving: y
h*x
%Plotting Simulated Results
time
¼
(0:length(x)-1)*dt-1;
plot(time,x,'k-.') %Plotting Input
hold on
time
¼
(0:length(y)-1)*dt-1;
plot(time,y,'k') %Plotting Output
axis([-1 1 0 1.2])
xlabel('time (sec)','fontsize',14)
ylabel('Amplitude','fontsize',14)
set(gca,'XTick',[-1 -0.5 0 0.5 1 ])
set(gca,'YTick',[0:.2:1.2])
Search WWH ::




Custom Search