private void InitPid(ulong millis)
        {
            double kp     = 0.0d;
            double ki     = 0.0d;
            double kd     = 0.0d;
            double limits = 300.0d;     // PID output limits, a single cycle correction max

            kp = 0.055d;
            //ki = 0.000001d;
            kd = 0.005d;

            pidA = new PIDControllerA(0, 0, 0, kp, ki, kd, PidDirection.DIRECT, millis);

            pidA.SetSampleTime(pidSampleTimeMs);

            pidA.SetOutputLimits(-limits, limits, 70);

            pidA.Initialize();
        }
예제 #2
0
 private void InitPid()
 {
     pidA = new PIDControllerA(0, 0, 0, 0, 0, 0, PidDirection.DIRECT, (ulong)samplingIntervalMilliSeconds); // PIDControllerA.GetMillis());
     //pidA.SetOutputLimits(850.0d, 2200.0d);
     pidA.SetSampleTime((int)samplingIntervalMilliSeconds);
 }