c2d transformation from s domain to z domain

104 views (last 30 days)
AKSHAY
AKSHAY on 19 Feb 2024
Edited: Aquatris on 19 Feb 2024
I have a s- domain equation and want to convert it to z domain.....but i will be using variables in my TF instead of values for those variables...how to convert this? I am asking this since c2d requires numeric values rather than unknown variables.

Answers (1)

Aquatris
Aquatris on 19 Feb 2024
Edited: Aquatris on 19 Feb 2024
For forward Euler method, plug in s = (z-1)/T where T is your sampling time
For backward Euler method, plug in s = (1-z^(-1))/T where T is your sampling time
You can use symbolic toolbox or hand calculate the resulting transfer functions.
There is a nice lecture slide from MIT on this topic here.
Simple example;
s = tf('s'); % create s domain variable
sysC = 100/(s^2 + 2*0.1*10*s + 100); % continous time system
T = 1e-3; % define sampling rate
z = tf('z',T); % create z domain variable
z_forward = (z-1)/T; % forward euler method
sysD_forward = 100/(z_forward^2 + 2*0.1*10*z_forward + 100); % forward euler method discretization
z_backward = (1-z^(-1))/T; % backward euler method
sysD_backward= 100/(z_backward^2 + 2*0.1*10*z_backward + 100);% backward euler method discretization
bode(sysC,sysD_forward,sysD_backward)

Categories

Find more on Interpolation in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!