Example H3.1

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

Determine the pz-map of a third order system given by differential equation

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

PZ map of the system

The system is defined by the following differential equation:
Transforming to the s-domain goes as follows:
Calculate and show the poles of to check the calculations above:
% clear all variables from Workspace and close all figures
clear variables;
close all;
 
% Define 's' variable
s=tf('s');
 
% Define the transfer function of the system
H=(4*s+24)/(s^3+8*s^2+25*s);
Using the function zpk will give you the locations of the zeros, poles and gain
zpk(H)
ans = 4 (s+6) ----------------- s (s^2 + 8s + 25) Continuous-time zero/pole/gain model.
Notice that the gain is given by the single number in the numerator. For this example it is 4. Using the function pzmap will show you the locations of the zeros, poles graphically
figure(101);
pzmap(H);

Generate MATLAB figure(s) for usage in the book

Init create Enhanced Figures

Close all the earlier enhanced figures with a certain tag
EnhancedFig = findobj(0, 'Tag', 'EnhancedImage');
close(EnhancedFig);

Enhance the figures

figure1=figure(1001);
% Give it a tag
set(gcf, 'Tag','EnhancedImage');
% create the pzmap plot again but now with a figure handle
h=pzplot(H);
grid on;
% get the handle to the plot options
p=getoptions(h);
% Adjust Title
p.Title.String='PN beeld van \itH(s)';
p.XLim=[-7 1];
p.YLim=[-4 4];
% write the options to the figure
setoptions(h,p);