""" ZOH discretization of time constant system Finn Haugen, finn@techteach.no 2025 06 29 """ #%% Imports import control #%% Creating the s-transfer function s = control.tf('s') K = 1 # Gain tc = 1 # [s] Time constant H_cont = K/(tc*s + 1) #%% ZOH discretization ts = 0.01 # Time step [s] H_disc = control.sample_system(H_cont, ts, method='zoh') print('H_disc(z) =', H_disc)