Tuning Guide
Tuning Guide
Abstract:
n this document you will see how to setu your YAPSC !"# or #$" versions% Servomotor Controller using YTT& This documents covers ra id descri tion of YTT and PID tuning method using the ste res onse tool of YTT&
Page 1/11
Table Of Content
1 YTT description.............................................................4 1.1 Connection tab.......................................................4 1.2 Parameters tab.......................................................4 1.3 RT Monitor tab.......................................................5 2 PID tunin ! t"eor#..........................................................$ 2.1 Common terms...........................................................% 2.2 &tabi'it#..............................................................% 2.3 ()ers"oot..............................................................* 3 PID tunin ! app'ication.....................................................* 3.1 +ard,are setup.........................................................* 3.2 PID Tunin .............................................................3.2.1 P tunin ..........................................................1. 3.2.2 I tunin ..........................................................1. 3.2.3 D tunin ..........................................................1. 3.2.4 &um up............................................................1. 4 Troub'es"ootin ............................................................1. 4.1 In)erted po'arit#.....................................................1. 5 /0tra in1ormation..........................................................11 5.1 2rom steps to re).....................................................11 5.2 2rom steps to mm 3in4.................................................11 5.3 5nits per &tep........................................................11
Page 2/11
1 YTT description
YTT is ordered in three tabs: Connection, Para eter and !T "onitor#
Page ./11
You have to save the arameters in the board !by clic,ing -6rite in board 11P7/5.% for the board to use the new value of the arameter&
You must start by reading the board parameters before writing them
Page 1/11
gra&h# Chec2 the Auto atic bo3 and choose an u&date &eriod to use# Status bo3: actual board0s &ara ters board enabled )ollo'ing, integral and deri,ate error co and 4 encoder )eedbac2
out&ut le,el 561++( 1++7 ost use)ul tool )or P$/ tuning#
2 PI
tuning: theory
!rom "i#ipedia 5lin27: If the PID controller arameters !the gains of the ro ortional+ integral and derivative terms% are chosen incorrectly+ the controlled rocess in ut can be unstable+ i&e& its out ut diverges+ with or without oscillation+ and is limited only by saturation or mechanical brea,age& Tuning a control loo is the ad9ustment of its control arameters !gain: ro ortional band+ integral gain:reset+ derivative gain:rate% to the o timum values for the desired control res onse& 8$ ad,ise that %ou read the 'hole article 'hich is ,er% 'ell about P$/ and closed loo&s in general#9 To su u&, 'e 'ant the s%ste be stable be )ast ha,e no o,ershoot to ade i) %ou 'ant to 2no' ore
Page :/11
!tep input : 'hen the co and suddenl% rises o) a gi,en ,alue 8eg: the co suddenl% changes )ro + to =1++9
3&3 Stability
>irst o) all, %ou 'ant %our otor to go 'here %ou 'ant hi to go# ?ere are, side b% side, t'o things %ou 'ant to a,oid: di,ergence and oscillation
)ro &oints 162++, 'e ha,e a nice e3a &le o) di,ergence: the otor &olarit% is 'rong, so instead o) bringing the otor bac2 to the desired &osition, the control loo& does the e3act o&&osite@ To )i3 that, %ou can Turn o)) the board, s'a& the otor0s ends
>ro &oints 2+161++ 'e can see a nice oscillation o) the otor: P and/or $ and/or / are set too high# Set $ and / to + and decrease P until the loo& stabiliAes:
To a$oid the motor from running at full speed until it crashed your machine% don&t forget to set up the '!ault Error( parameter) Typical $alues are in the *++,2+++ counts-
Page B/11
3&4 /vershoot
!e e ber $ll# DE Fell 'e had a stable loo& that )ollo's ore or less the co $t does also sho' so ething 'e 'ant to a,oid: o$ershoot# and#
-,ershoot is 'hen the otor0s sha)t goes over the co and# ?ere is, on the right o,ershot res&onse cur,e and on the le)t a res&onse cur,e 'ith no o,ershoot:
Fire all the &o'er su&&lies, ST<P, /$! and <CAHG< in&uts# A)ter %ou ha,e chec2ed the 'iring %ou can a&&l% &o'er# The <!! led should lit during a&&ro3 I second at &o'er6u&# 2# $) %ou ha,e not installed YTT %et, it is ti e to do it# $) %ou ha,e ne,er installed >T/$ JSH dri,ers be)ore, chec2 the last o&tion to install the dri,ers# .# Co', &lug the Jsb cable to the JSH ProgKe%# $t should be recogniAed i ediatel%# 1# Start YTT# $n the Connection tab, chec2 that JSH Serial Port 8C-"39 is a,ailable, and choose it# $) %ou ha,e ulti&le o) the , the &rogKe% should be the latest o) the list# :# Clic2 the Connect button, and &a% attention to the ProgKe%0s blue G</: it should be dar2# $) not, %ou choose the 'rong &ort nu ber or the dri,er is not &ro&erl% installed# You can tr% to restart %our co &uter, it a% hel& the )irst ti e %ou connect the ProgKe%# B# Co', %ou can &lug the ProgKe% on the 2L:&ins header o) the YAPSC board# D# Go to Para eter tab and clic2 !ead &ara eters button# $) all the &ara eters turn )ro gra% to green, %ou ha,e a 'or2ing connection bet'een %our co &uter and YAPSC, congratulation@ M# -ther'ise, tr% to disconnect and connect again 8Connection tab9# $) it still does not 'or2, ,eri)% %our cabling 'ith attention# N# Co' %ou ha,e a 'or2ing connection, %ou can o,e on the ne3t ste&: testing@
The general ethod )or loo& tuning is to change one &ara eter at a ti e, run the test, anal%Ae the res&onse and start again until %ou cannot reduce the settling ti e an% ore 'ithout loosing stabilit%#
Page M/11
>irst, choose a co and ste& a &litude# So ething in the :+ 1++ range can gi,e acce&table resolution# You can go higher, but an i &ortant thing is to 2ee& 8a &litudeLP9 O 8"a3 -ut&ut/29# -ther'ise the out&ut is li2el% to saturate 'hich 'ill co &letel% change the test results# To calculate the e@uivalent move to the s ecified ste + refer to section = 1Atra information&
7-2-1 P tuning
Aug ent &rogressi,el% the P &ara eter until %ou get get no or little o,ershoot# A nice cur,e 'ould be bet'een the Pno o,ershootP and Po,ershootP e3a &le o) $llustration 2#.: Co6 o,ershoot and o,ershoot# At this &oint, it is not a &roble the o,ershoot# i) there is little o,ershoot# The &ara eter reduces e))icientl%
7-2-2 I tuning
"ost o) ti e, P gain tuning alone cannot a2e the otor reach e3actl% the goal( there is a static error# >or e3a &le, %ou as2 )or a :+ ste&s o,e and the otor sto&s a)ter 1B ste&s: the static error is 1# Aug ent I &ara eter until the static error reaches +, but 'hile 2ee&ing loo& stabilit%
7-2-7
tuning
The / &ara eter should be used to erase e,entual o,ershoot but don0t set it too high as it 'ill reduce the res&onse ti e#
7-2-* /um up
To Impro$e-----/tability ---Precision 8ction on P decrease 8ction on I increase decrease 8ction on decrease increase 6 ---0esponse time increase
* Troubleshooting
?ere are the co on &roble s %ou a% )ace#
%.1 &n'erte
polarit(
otor o,es a bit it runs into the sa e direction and
!i1: The )i3 is si &le# You can s'a& A and H encoder in&uts O0 use negati,e P$/ &ara eters 8e3a &le: PQ6+#2.( $Q6+#+D( /Q6+#+1B9
Page N/11
9 E1tra information
).1 From steps to re'
To calculate the eRui,alent in re,olutions to ste s ste& o,e use this )or ula:
rev =
steps PPR 4
PP7 is the Pulse Per !e,olution o) the encoder# Can be called the nu ber o) lines o) the encoder# 8e3: P:++ lines encoderP has PP!Q:++9
m l rev n
/turn 8: lead9 ballscre' dri,en b% our otor through a 1:. reduction: a
UpS =
ml n PPR 4
Page 1+/11
ocument 0e$isions
0e$ 1 ate 11/22/+N escription >irst ,ersion o) this anual
Page 11/11