How to choose value of Ts for converting continuous state space (SS) matrix to discrete SS matrix?
Hi,
I converted Transfer function to state space matrix but I am curious how to choose best Ts?
I am not sure what is the function of this Ts related to plant?
I just used random values of Ts to check the affect of conversion, I found that changing Ts can chane the Discrete SS A,B matrices while it has no affect on C matrix.
I will use c2d distrete state space matrix in MPC controller for designing a controller to deploy on real plant. Please help me in understanding Ts and how to choose the best Ts value based on some facts?
My code is
%Transfer Function By System identification
num = [-1.324 6.6e05 -6.914e09 5.128e13 -1.054e19]
den = [1 1.99e04 1.371e09 1.145e13 4.037e17]
%Conversion to SS
plant = tf([num],[den], ‘OutputDelay’,0.001)
% Simplify the model to remove insignificant poles and zeros
SSpzt = ss(plant) %This gives continuous time linear state space model of TFpzt
Ac = SSpzt.A;
Bc = SSpzt.B;
Cc = SSpzt.C;
Dc = SSpzt.D;
Ts = 0.0001 %Sampling time actual = 3.1309e-05
Td = 0.009; %time Delay baed on frequency data
%Contineous Model to discrete Statespace Matrices
SSpzt_dis = c2dm(Ac,Bc,Cc,Dc,Ts)
[Ad,Bd,Cd,Dd] = c2dm(Ac, Bc, Cc, Dc, Ts)
sysdis = ss(Ad,Bd,Cd,Dd,Ts)
sysdis.D = 0Hi,
I converted Transfer function to state space matrix but I am curious how to choose best Ts?
I am not sure what is the function of this Ts related to plant?
I just used random values of Ts to check the affect of conversion, I found that changing Ts can chane the Discrete SS A,B matrices while it has no affect on C matrix.
I will use c2d distrete state space matrix in MPC controller for designing a controller to deploy on real plant. Please help me in understanding Ts and how to choose the best Ts value based on some facts?
My code is
%Transfer Function By System identification
num = [-1.324 6.6e05 -6.914e09 5.128e13 -1.054e19]
den = [1 1.99e04 1.371e09 1.145e13 4.037e17]
%Conversion to SS
plant = tf([num],[den], ‘OutputDelay’,0.001)
% Simplify the model to remove insignificant poles and zeros
SSpzt = ss(plant) %This gives continuous time linear state space model of TFpzt
Ac = SSpzt.A;
Bc = SSpzt.B;
Cc = SSpzt.C;
Dc = SSpzt.D;
Ts = 0.0001 %Sampling time actual = 3.1309e-05
Td = 0.009; %time Delay baed on frequency data
%Contineous Model to discrete Statespace Matrices
SSpzt_dis = c2dm(Ac,Bc,Cc,Dc,Ts)
[Ad,Bd,Cd,Dd] = c2dm(Ac, Bc, Cc, Dc, Ts)
sysdis = ss(Ad,Bd,Cd,Dd,Ts)
sysdis.D = 0 Hi,
I converted Transfer function to state space matrix but I am curious how to choose best Ts?
I am not sure what is the function of this Ts related to plant?
I just used random values of Ts to check the affect of conversion, I found that changing Ts can chane the Discrete SS A,B matrices while it has no affect on C matrix.
I will use c2d distrete state space matrix in MPC controller for designing a controller to deploy on real plant. Please help me in understanding Ts and how to choose the best Ts value based on some facts?
My code is
%Transfer Function By System identification
num = [-1.324 6.6e05 -6.914e09 5.128e13 -1.054e19]
den = [1 1.99e04 1.371e09 1.145e13 4.037e17]
%Conversion to SS
plant = tf([num],[den], ‘OutputDelay’,0.001)
% Simplify the model to remove insignificant poles and zeros
SSpzt = ss(plant) %This gives continuous time linear state space model of TFpzt
Ac = SSpzt.A;
Bc = SSpzt.B;
Cc = SSpzt.C;
Dc = SSpzt.D;
Ts = 0.0001 %Sampling time actual = 3.1309e-05
Td = 0.009; %time Delay baed on frequency data
%Contineous Model to discrete Statespace Matrices
SSpzt_dis = c2dm(Ac,Bc,Cc,Dc,Ts)
[Ad,Bd,Cd,Dd] = c2dm(Ac, Bc, Cc, Dc, Ts)
sysdis = ss(Ad,Bd,Cd,Dd,Ts)
sysdis.D = 0 state space modeling, model predictive controller, system identification MATLAB Answers — New Questions