import numpy as np import control # %% Creating the s-transfer function: num_cont = np.array([3]) den_cont = np.array([2, 1]) H_cont = control.tf(num_cont, den_cont) # %% Discretizing: Ts = 0.1 H_disc = control.sample_system(H_cont, Ts, method='zoh') # %% Displaying the z-transfer function: print('H_disc(z) =', H_disc)