how to create pid controller in ue4

i need to create a pid controller in ue4 blueprint of my own how to do it.
because am unable to find integration and differentiation function in its math library.
or can you help me to add a integration expression to math library

Using the Simpsons’s rule you just need to create a function as simple as:



double simpson(double a, double b, int n, double (*f)(double))
{
    double c= (a+b) / 2.0;
    double h3= abs(b-a) / 6.0;
    double result= h3 * (f(a) + 4.0 * f(c) + f(b));
    return result;
}


Can u help me do it in blueprint

If you are unable to find the right math nodes you might need to install LE Extended Library which contains a lot of additional math nodes for blueprints. I don’t think it supports 4.19 yet only up to 4.18.x but I am sure it will be getting an update soon for the current engine version. I haven’t done much digging around in all this myself so you may not actually need it but from what I can tell it fills in a bunch of missing math stuff for blueprint use.