One of the methods for developing control system for distributed parameter systems is to convert the system of PDEs in to a DAE; consisting of independent ODEs related to one another by algebraic equations or constraints.
A DAE has two elements: differential equations and algebraic equality constraints. An ODE only has differential equations. Most of MATLAB uses ODE solvers. These model the rates of change of state variables using differential equations, but they do not handle algebraic constraints well: if you've used the Simulink add-on, you've almost certainly encountered the problem of an 'algebraic loop'. With simple systems, it's often possible to eliminate algebraic equality constraints mathematically, but if you have a complex system, then it can be hard.
There are two things you can do to get round this: either artificially break the algebraic loop by adding a low-pass filter, or you can use the Simulink add-on 'Simscape', which is designed to solve DAEs directly. You can find more about Simscape on the MathWorks web site - I've attached the link below.
A DAE has two elements: differential equations and algebraic equality constraints. An ODE only has differential equations. Most of MATLAB uses ODE solvers. These model the rates of change of state variables using differential equations, but they do not handle algebraic constraints well: if you've used the Simulink add-on, you've almost certainly encountered the problem of an 'algebraic loop'. With simple systems, it's often possible to eliminate algebraic equality constraints mathematically, but if you have a complex system, then it can be hard.
There are two things you can do to get round this: either artificially break the algebraic loop by adding a low-pass filter, or you can use the Simulink add-on 'Simscape', which is designed to solve DAEs directly. You can find more about Simscape on the MathWorks web site - I've attached the link below.
Thanks@ Daniel for the concern shown, I will have to dig deep in the problem to get the solution. I have worked with almost all the variable and fixed step, stiff and non stiff ODE solvers but have not solved DAEs. My real task is to remodel a distributed system represented by a partial differential equation with DAEs, and then ultimately designing a sliding mode controller for the system
%where @Exa3NLmodel is the nonlinear function for example (different file)
function [xdot]=Exa3NLmodel(t,x)
xdot=[x(1)*(x(2)^2-1);
-x(2)+(3+x(2))*x(1)^2];
Note that the solver works only if the DAE system is index 1. Otherwise, you must transform the system of index n to index 1 if possible. By considering the same procedure you can solve systems with n variables.
I have re-formulated my problem by avoiding the solution of DAEs, however, as suggested by most of the researchers MATLAB ode solvers are good enough to address these problems