# Constrained SINDy

I know many of the differential equations in a DAE already, and I’m trying to identify the others, using DataDrivenDiffEq. I’m not sure how to constrain the model so that it doesn’t search for all of the equations. Does anyone know how to do this?
Thanks

Use a singular mass matrix?

Thanks. Only some of the known equations are the algebraic constraints. Is there a way to just type in which equations I already know?

p.s. I’m using modelingtoolkit with structural_simplify, it seems the same as the mass matrix format…?

The universal differential equations paper shows how using a neural network intermediate allows for introducing known knowledge into the symbolic regression process:

That’s a very general approach to it. I think for just the simplest ODE case you can probably do it via mass matrices, yes, but at least the NN tricks will work in any case.

@Julius_Martensen do you have an example of direct constraints?

1 Like

This looks completely amazing, thank you for making this! There are so many possibilities with this…

Maybe I’m just not imagining well what can be done with mass matrices. But this is all new for me, so i’ll have a think. Anyway, I definitely want to learn this NN approach so i’ll start on that.

There is a paper on using direct constraints for the equations, I just haven’t got the time to implement this properly. Additionally, you might consider using Convex.jl or even JuMP for more complex equations.

If you know some of the equations before, I would just preprocess the data as much as possible ( so only create a problem for the unknown equations ). Also, a splitting for the constraints would make sense and try to infer those with an implicit sparse regression.

1 Like

Thanks, i’ll check these out and try to figure out a way…