Verilerin Çözümlemesi

İleri Besleme Analizi

Not

Hesaplanmış geri bildirim kazancının ne olduğuna dair bilgi için bkz. The Permanent-Magnet DC Motor Feedforward Equation. Hesaplanmış geri bildirim kazancının kodlamadaki kullanımına dair bilgi için bkz. feedforward control.

Feedforward Bölümündeki açılır liste okuna tıklayınız.

Not

Birim değiştirmek istiyorsanız, Override Units tuşuna basmanız ve açılır penceredeki gerekli bilgileri doldurmanız gerekecektir.

İleri besleme için veri çözümlemesi

Bilgileri doldurduktan sonra hesaplanmış düzenek sistemi parametreleri görüntülenecektir.

Çözümleme katsayı sonuçları

Geri Bildirim Çözümlemesi

Önemli

Bu kazanımlar gerçekte “bilgiye dayalı tahminlerdir”, mükemmel olduklarının garantisi verilemez ve daha fazla ayarlama için bir “başlangıç noktası - starting point” olarak görülmelidirler.

Geri bildirim sabitlerini görüntülemek için Feedback bölümündeki açılır liste okuna tıklayınız

Geri bildirim çözümlemesi bölmesi

Bu görünüm düzeneğinizde (LQR aracılığıyla) PD - Orantısal Türevsel ve P - Orantısal denetleyiciler için en uygun geri bildirim kazançlarının hesaplanması için kullanılabilmektedir.

Denetleyici Parametrelerini Girin

Not

“Spark Max” ön ayarı, kullanıcının denetleyiciyi SPARK MAX API’nin konum/hız ölçekleme katsayısı özelliği ile çözümleme birimlerinde çalışacak şekilde yapılandırdığını varsaymaktadır.

Hesaplanan ileri besleme kazançları boyutlandırılmış miktarlardır. Ne yazık ki, FRC ® denetleyicilerindeki PID - Orantısal İntegral Türevsel kazançlarda kullanılan ölçü birimlerine pek dikkat edilmemektedir ve bu nedenle PID denetleyici uygulamalarına dair çeşitli tipik seçenekler, ölçüm birimlerinde (genellikle kullanıcıya açıkça belirtilmeyen bir şekilde) farklılık göstermektedir.

PID denetleyicinizde doğru ayarları belirlemek için aşağıdaki seçenekleri kullanınız.

Denetleyici ayarlarının resmi
  • Gain Settings Preset-Kazanç Ayarları Ön Ayarı Bu açılır menü boş kalan alanları yaygın birkaç FRC denetleyici kurulumundan birine uygun ayarlarla kendiliğinden, veri ile, dolduracaktır. Kodlayıcı sonrası dişli düzeni, PPR ve takipçi motorun olup olmadığı gibi bazı ayarların (çözümleyicinin, kullanıcı girdisi olmadan bu ayarları tanıyamaması sebebiyle) elle belirlenmesi gerektiği ve diğer ayarların kullanıcının kurulumuna göre varsayılan ayarlardan farklı olabileceği göz önünde bulundurulmalıdır.

  • Controller Period, Bu ayar denetleme döngüsünün saniye cinsinden yürütülme süresidir. Varsayılan RIO döngüsünün hızı 0.02 saniyelik bir aralığa karşılık gelen 50 Hz’dir. Çoğu “akıllı denetleyiciler”in üzerindeki tümleşik denetleyiciler 1 Khz’de, veya 0.001 saniyelik bir aralıkla, çalışmaktadır.

  • Max Controller Output Bu ayar, denetleyici çıktısının PID hesaplamasına ilişkim en yüksek değeridir. Çoğu denetleyici çıktı değerlerini en büyük değer 1 olacak şekilde hesaplar, fakat Talon denetleyicilerinin en yüksek değeri 1023’dür.

  • Time-Normalized Controller Bu ayar, D kazancının ölçeklendirilmesini etkileyen PID hesaplamasının yürütülme aralığına göre normalize edilip edilmediğini belirlemektedir.

  • Controller Type This specifies whether the controller is an onboard RIO loop, or is running on a smart motor controller such as a Talon or a SPARK MAX.

  • Post-Encoder Gearing This specifies the gearing between the encoder and the mechanism itself. This is necessary for control loops that do not allow user-specified unit scaling in their PID computations (e.g. those running on Talons). This will be disabled if not relevant.

  • Encoder EPR This specifies the edges-per-revolution (not cycles per revolution) of the encoder used, which is needed in the same cases as Post-Encoder Gearing.

  • Has Follower Whether there is a motor controller following the controller running the control loop, if the control loop is being run on a peripheral device. This changes the effective loop period.

  • Follower Update Period The rate at which the follower (if present) is updated. By default, this is 100Hz (every 0.01s) for the Talon SRX, Talon FX, and the SPARK MAX, but can be changed.

Not

If you select a smart motor controller as the preset (e.g. TalonSRX, SPARK MAX, etc.) the Convert Gains checkbox will be automatically checked. This means the tool will convert your gains so that they can be used through the smart motor controller’s PID methods. Therefore, if you would like to use WPILib’s PID Loops, you must uncheck that box.

Measurement Delays

Not

If you are using default smart motor controller settings or WPILib PID Control without additional filtering, SysId handles this for you.

Many “smart motor controllers” (such as the Talon SRX, Venom, Talon FX, and SPARK MAX) apply substantial low-pass filtering to their encoder velocity measurements, which can introduce a significant amount of phase lag. This can cause the calculated gains for velocity loops to be unstable. This can be accounted for with the Measurement Delay box.

However, the measurement delays have already been calculated for the default settings of the previously mentioned motor controllers so for most users this is handled by selecting the right preset in Gain Settings Preset.

The following only applies if the user decides to implement their own custom filtering settings (e.g. adding a moving average filter to a WPILib PID loop or changing smart motorcontroller measurement period and/or measurement window size) as the measurement delay must be recalculated. Here is the general formula that can be used for filters with moving windows (e.g. median filter + moving average filter):

\[d = \frac{T(n - 1)}{2}\]

Where T is the period at which measurements are sampled (RIO default is 20 ms) and n is the size of the moving window used.

Specify Optimality Criteria

Finally, the user must specify what will be considered an “optimal” controller. This takes the form of desired tolerances for the system error and control effort - note that it is not guaranteed that the system will obey these tolerances at all times.

Entering optimality criteria for the feedback controller

As a rule, smaller values for the Max Acceptable Error and larger values for the Max Acceptable Control Effort will result in larger gains - this will result in larger control efforts, which can grant better setpoint-tracking but may cause more violent behavior and greater wear on components.

The Max Acceptable Control Effort should never exceed 12V, as that corresponds to full battery voltage, and ideally should be somewhat lower than this.

Select Loop Type

It is typical to control mechanisms with both position and velocity PIDs, depending on application. Either can be selected using the drop-down Loop Type menu.

Specifying loop type