Example H3.3

MATLAB code for example 3.3 from the book "Regeltechniek voor het HBO"

Determine the stepresponse in the time domain from a pz-map

Copyright (c) 2021, Studieboeken Specialist Permission is granted to copy, modify and redistribute this file, provided that this header message is retained.
Table of Contents

The given situation

The relation between an input x(t) and the output y(t) of a process is given by the following differential equation:
This could be the differential equation belonging to the thermal process of chapter 2.5.5, eqn 2.34 for example. The inputsignal is an step with an amplitude of 5:

Finding the stepresponse y(t)

a) Symbolic through Inverse laplace transform

First create the proces in the s-domain from the differential equation:
This leads to:
% clear all variables from Workspace and close all figures
clear variables;
close all;
% Define 's' variable
s=tf('s'); % Make s of type tf
 
H=10/(2*s+8);
X=5/s;
Y=X*H;
zpk(Y)
ans = 25 ------- s (s+4) Continuous-time zero/pole/gain model.
figure(101);
pzmap(Y);
grid on;
title('pz map of Y(s)');
ylim([-1 1]);
xlim([-5 1]);
% Replace s of type tf with s of type sym
syms s; % Make s of type syms
% Create symbolic time functions
syms t x(t) y(t);
% Create symbolic laplace functions
syms X(s) Y(s) H(s);
 
 
% Create symbolic transferfunction
H(s)=10/(2*s+8);
 
% x input is step of 5
x(t)=5*heaviside(t);
figure(102);
fplot(x(t));
grid on;
title('inputsignal x(t)');
xlabel('t [sec]');
ylabel('x(t)');
ylim([-1 6]);
xlim([-1 4]);
% Transform to laplace
X(s)=laplace(x,t,s)
X(s) = 
Y(s)=X(s)*H(s);
y(t)=ilaplace(Y)
y(t) = 
figure(103);
fplot(y(t));
grid on;
title('stepresponse y(t)');
xlabel('t [sec]');
ylabel('y(t)');
ylim([0 7]);
xlim([0 4]);

b) Stepresponse using the pz-map

The same result could also be obtained using the pz-map of the signal Y(s):
where and
belongs to the pole in zero and the multiplication of all the distances from that pole to the other poles equals 4. As there are no zeros the denumerator equals 1.
% Create symbolic time functions
syms t x(t) y(t);
% State the values of the pz-map
p1=0;
p2=-4;
Kpn=25;
% calculate the Aj coefficients
A1=1/(p1-p2);
A2=1/(p2-p1);
% define the stepresponse signal
y(t)=Kpn*(A1*exp(p1*t)+A2*exp(p2*t))
y(t) = 
 
% Plot it
figure(105);
fplot(y(t));
grid on;
title('stepresponse y(t)');
xlabel('t [sec]');
ylabel('y(t)');
ylim([0 7]);
xlim([0 4]);
The equation for y(t) clearly shows that the pole in -4 from the system determines the decaying transition part of the changing input. The pole in zero determined by the step input signal causes the remaining value on the output caused by the input signal.