I am very new to this forum, so excuse me if i do not write the equations properly. And I'm pretty new to DSP too, so this might be very basics for most of you, but it's pretty complicated to me.
I need to discretize a PT1 filter:
\$T\frac{dy(t)}{dt} + y(t) = u(t)\$
I need to discrtize this using ZOH, FOH and Tustins bilinear transformation. I need to apply this filter to my signal, using a for loop( yes i have Fc, Wn). I know this can be easily done in Matlab. but i wanna understand how it's done by hand.I could not understand anything from google.
Any leads would help me.
Edit1 @JonRB: Matlab Script:
% define a continuous-time first order low-pass filter in state-space
% notation. differential equation of the filter:
% T * y'(t) + y(t) = u(t)
% -> State-space notation:
% x'(t) = -1/T * x + 1/T * u
% -3dB cutoff frequency: 100 Hz => omega_c = 2 * pi * 100 rad/s
% => T = 1 / omega_c
f_c = 10;
T = 1 / 2 / pi / f_c;
filt_cont = ss(-1/T, 1/T, 1, 0);
enter code here
% sampling period
Ts=
% discretization of the filter
filt_discr_zoh = c2d(filt_cont, Ts, 'zoh');
filt_discr_foh = c2d(filt_cont, Ts, 'foh');
filt_discr_tustin = c2d(filt_cont, Ts, 'tustin');