I want to calculate Y(Z)[Z-Domain] for the given system with matlab. See picture of the block diagram
I have tried to solve it with matlab. I have written the following matlab code.
clear all
clc
s = tf('s');
% model Gp(s)
Gp = 2/s;
H = s;
% close-loop transfer function in continuous domain
Tc = feedback(Gp,H);
% model Y(s)
Y = Tc*(2/s);
%% continuous to discrete transformation
T = 1; % sampling time 1 sec
Y_z = c2d(Y,T,'zoh')
As solution I get:
\begin{equation} \begin{gathered} 0.6667 \mathrm{z}+0.6667 \\ ----------- \\ \mathrm{z}^{\wedge} 2-2 \mathrm{z}+1 \end{gathered} \end{equation}
Can anybody have a look to my calculation, because I am not sure if I have done this right with matlab.