Esempio n. 1
0
        /// <summary>
        /// ADRC implementation utilizing a PD controller in place of a tracking differentiator.
        /// </summary>
        /// <param name="amplificationCoefficient">R</param>
        /// <param name="dampingCoefficient">C</param>
        /// <param name="plantCoefficient">B</param>
        /// <param name="precisionModifier">H0</param>
        /// <param name="kp">P Gain</param>
        /// <param name="kd">D Gain</param>
        /// <param name="maxOutput">Constrained maximum output</param>
        public ADRC_PD(double amplificationCoefficient, double dampingCoefficient, double plantCoefficient, double precisionModifier, double kp, double kd, double maxOutput)
        {
            this.amplificationCoefficient = amplificationCoefficient;
            this.dampingCoefficient       = dampingCoefficient;
            this.plantCoefficient         = plantCoefficient;
            this.precisionModifier        = precisionModifier;
            this.maxOutput = maxOutput;

            pid = new PID(kp, 0, kd, maxOutput);
            ExtendedStateObserver = new ExtendedStateObserver(false);
            NonlinearCombiner     = new NonlinearCombiner(amplificationCoefficient, dampingCoefficient);

            dateTime = DateTime.Now;
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="amplificationCoefficient"></param>
        /// <param name="dampingCoefficient"></param>
        /// <param name="plantCoefficient"></param>
        /// <param name="precisionModifier"></param>
        /// <param name="maxOutput"></param>
        public ADRC_TD(double amplificationCoefficient, double dampingCoefficient, double plantCoefficient, double precisionModifier, double maxOutput)
        {
            this.amplificationCoefficient = amplificationCoefficient;
            this.dampingCoefficient       = dampingCoefficient;
            this.plantCoefficient         = plantCoefficient;
            this.precisionModifier        = precisionModifier;
            this.maxOutput = maxOutput;

            TrackingDifferentiator = new TrackingDifferentiator(amplificationCoefficient);
            ExtendedStateObserver  = new ExtendedStateObserver(false);
            NonlinearCombiner      = new NonlinearCombiner(amplificationCoefficient, dampingCoefficient);

            dateTime = DateTime.Now;
        }