1. Adım: Robot Drive’ınızın Netilendirilmesi
Not
Sistem tespit aracının kullanımına dair ayrıntılı talimatlar için bkz. özel belgeleri
Not
Drive tespit süreci robotun sürülebileceği geniş bir alan gerektirmektedir. Robotun tespit rutininde sürülebileceği en azından 10’, yaklaşık üç metrelik (tercihen 20’, yaklaşık 6 metrelik) bir alanda olduğunuzdan emin olunuz.
Not
Bu rehber için tespit verileri, bu işlevselliği 2019 North Carolina State University P2P Çalıştayının bir parçası olarak sunmak için, Takım 5190 tarafından sağlanmıştır.
Bir robot ile tam olarak bir yolu takip etmeden önce robotun kontrol girdilerine verdiği tepkilerin isabetli bir modelini olması önemlidir. Böyle bir modelin tanımlanması “sistem tespiti”dir. WPILib’in Sistem Tespiti aracı böyle bir modeli isabetli bir şekilde tanımlayabilmektedir.
Verilerin Toplanması
Öncelikle drive tespiti verilerimizin toplanmasıyla başlamaktayız.
Verilerin Analiz Edilmesi
Tespit rutini çalıştırılıp veri dosyası kaydedildikten sonra sıra dosyanın görüntü pencersinde açılmasına gelmiştir.
Tanıların Kontrolü
sistem tespiti rehberi doğrultusunda öncelikle verilerimizin makul olduğundan emin olmak için diagnostics - tanıları görüntülemekteyiz:

Verilerimiz makul derecede çizgisel olduğu ve ayar ölçülerimiz kabul edilebilir parametreler içinde olduğundan diğer adıma geçebiliriz.
İleri Bildirim Kazançlarının Kaydedilmesi
Not
Feedforward gains do not, in general, transfer across robots. Do not use the gains from this tutorial for your own robot.
We now record the feedforward gains calculated by the tool:

Since our wheel diameter was specified in meters, our feedforward gains are in the following units:
kS: VoltkV: Volt * Saniye / MetrekA: Volt * Saniye^2 / Metre
If you have specified your units correctly, your feedforward gains will likely be within an order of magnitude of the ones reported here (a possible exception exists for kA, which may be vanishingly small if your robot is light). If they are not, it is possible you specified one of your drive parameters incorrectly when generating your robot project. A good test for this is to calculate the “theoretical” value of kV, which is 12 volts divided by the theoretical free speed of your drivetrain (which is, in turn, the free speed of the motor times the wheel circumference divided by the gear reduction). This value should agree very closely with the kV measured by the tool - if it does not, you have likely made an error somewhere.
Calculate Feedback Gains
Not
Feedback gains do not, in general, transfer across robots. Do not use the gains from this tutorial for your own robot.
Artık yolu takip etmek için kullanacağımız PID kontrolünün geribildirim kazançlarını hesaplayabiliriz. WPILib’in RAMSETE kontrolörünü takiben yörünge hız kapalı döngü kontrolü kullanmaktadır, bu sebepten ötürü öncelikle tespit aracında Velocity modunu seçmekteyiz:

Since we will be using the WPILib PIDController for our velocity loop, we furthermore select the WPILib (2020-) option from the drop-down “presets” menu. This is very important, as the feedback gains will not be in the correct units if we do not select the correct preset:

Finally, we calculate and record the feedback gains for our control loop. Since it is a velocity controller, only a P gain is required:

HEr şeyi doğru yaptığımızı varsayarsak, orantılı kazancımız Volt * Saniye / Metre biriminde olacaktır. Bu sebeple hesapladığımız kazanç, her bir saniye başı metre hız hatası için, kontrolörün ek 3.38 voltluk bir çıktı vereceği anlamına gelmektedir