Dear you can use direct functions in matlab for Linear or Dynamic Systems like :
InputDelay, OutputDelay — Time delays at system inputs or outputs
ioDelay, InternalDelay — Time delays that are internal to the system
In discrete-time models, these properties are constrained to integer values that represent delays expressed as integer multiples of the sample time. To approximate discrete-time models with delays that are a fractional multiple of the sample time, use thiran.
The following examples illustrate the creation of models with different types of time delays.
First Order Plus Dead Time Model
Input and Output Delay in State-Space Model
Transport Delay in MIMO Transfer Function
Discrete-Time Transfer Function with Time Delay
First Order Plus Dead Time Model
This example shows how to create a first order plus dead time model using the InputDelay or OutputDelay properties of tf.
To create the following first-order transfer function with a 2.1 s time delay:
G(s)=e−2.1s1s+10,
enter:
G = tf(1,[1 10],'InputDelay',2.1)
where InputDelay specifies the delay at the input of the transfer function.
Tip: You can use InputDelay with zpk the same way as with tf:
G = zpk([],-10,1,'InputDelay',2.1)
For SISO transfer functions, a delay at the input is equivalent to a delay at the output. Therefore, the following command creates the same transfer function:
G = tf(1,[1 10],'OutputDelay',2.1)
Use dot notation to examine or change the value of a time delay. For example, change the time delay to 3.2 as follows:
G.OutputDelay = 3.2;
To see the current value, enter:
G.OutputDelay
ans =
3.2000
Tip: An alternative way to create a model with a time delay is to specify the transfer function with the delay as an expression in s:
Create a transfer function model for the variable s.
s = tf('s');
Specify G(s) as an expression in s.
G = exp(-2.1*s)/(s+10);
Input and Output Delay in State-Space Model
This example shows how to create state-space models with delays at the inputs and outputs, using the InputDelay or OutputDelay properties of ss.
Create a state-space model describing the following one-input, two-output system:
dx(t)dt=−2x(t)+3u(t−1.5)y(t)=[x(t−0.7)−x(t)].
This system has an input delay of 1.5. The first output has an output delay of 0.7, and the second output is not delayed.
Note: In contrast to SISO transfer functions, input delays are not equivalent to output delays for state-space models. Shifting a delay from input to output in a state-space model requires introducing a time shift in the model states. For example, in the model of this example, defining T = t – 1.5 and X(T) = x(T + 1.5) results in the following equivalent system:
dX(T)dT=−2X(T)+3u(T)y(T)=[X(T−2.2)−X(T−1.5)].
All of the time delays are on the outputs, but the new state variable X is time-shifted relative to the original state variable x. Therefore, if your states have physical meaning, or if you have known state initial conditions, consider carefully before shifting time delays between inputs and outputs.
To create this system:
Define the state-space matrices.
A = -2;
B = 3;
C = [1;-1];
D = 0;
Create the model.
G = ss(A,B,C,D,'InputDelay',1.5,'OutputDelay',[0.7;0])
G is a ss model.
Tip: Use delayss to create state-space models with more general combinations of input, output, and state delays, of the form:
Time delays in MIMO systems can be specific to each I/O pair, as in this example. You cannot use InputDelay and OutputDelay to model I/O-specific transport delays. Instead, use ioDelay to specify the transport delay across each I/O pair.
To create this MIMO transfer function:
Create a transfer function model for the variable s.
s = tf('s');
Use the variable s to specify the transfer functions of H without the time delays.
H = [2/s (s+1)/(s+10); 10 (s-1)/(s+5)];
Specify the ioDelay property of H as an array of values corresponding to the transport delay for each I/O pair.
H.IODelay = [0.1 0.3; 0 0.2];
H is a two-input, two-output tf model. Each I/O pair in H has the time delay specified by the corresponding entry in tau.
These are systems of nonlinear fractional differential equations, Generally, spline collocation methods and predictor-corrector methods work well for solving these type of systems. For a numerical solution of these systems with non-singular fractional kernel see
Numerical solution of some fractional dynamical systems in medicine involving non-singular kernel with vector order, Results in Nonlinear Analysis 2 (2019) No. 4, 160–168
Solve fractional differential systems using several methods in numerical analysis DTM, HPSTM, SDM, VIM, VHPM, etc.This is considered a specific model studying something
There are several methods have been developed but in my opinion only following numerical method proposed by K.Diethelm et al is convenient regarding Matlab
[1]. K. Diethelm, A.D. Freed, The Frac PECE subroutine for the numerical solution of differential equations of fractional order, in: S. Heinzel, T. Plesser (Eds.), Forschung und Wissenschaftliches Rechnen 1998, Gessellschaft fur Wissenschaftliche Datenverarbeitung, Gottingen, 1999, pp. 57-71.
[2] K. Diethelm, N.J. Ford, A.D. Freed, Detailed error analysis for a fractional Adams method, Numer. Algorithms 36 (1) (2004) 31-52.
[3] K. Diethelm, Efficient solution of multi-term fractional differential equations using P(EC)mE methods, Computing 71 (2003), pp. 305-319.
[4] R. Garrappa, On linear stability of predictor-corrector algorithms for fractional differential equations, Internat. J. Comput. Math. 87 (10) (2010) 2281-2290.