Vous êtes sur la page 1sur 11

YAPSC Tuning Tool

PID Tuning Guide for YAPSC servo boards

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&

YAPSC Tuning Tool Tuning Guide

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

YAPSC Tuning Tool Tuning Guide

1 YTT description
YTT is ordered in three tabs: Connection, Para eter and !T "onitor#

1.1 Connection tab


$n this tab, %ou can choose the serial &ort %ou 'ant to use to connect to the YAPSC board( along 'ith the odel o) the board# Currentl% %ou can choose bet'een *1 and 1+* ,ersions#

Illustration #&#: Connection Tab


-nce the connection is established, %ou can use the t'o other tabs# 'ote for the (S) Prog*ey users: In the latest model+ the Prog*ey allows you to remotely reset the board& The board will be held in reset if you have not clic,ed on the -Connect. button& /nce connection established+ the blue 01D of the Prog*ey will turn dar, !reset mode disabled%& It can be really hel ful during the first setu + while it2s better to clic, the -Connect. button before lugging or un lugging the (S) Prog*ey onto a running YAPSC board: if held in reset mode+ YAPSC will act as if com letely un owered&

1.2 Parameters tab


This tab dis&la%s all the &ara eters o) the board# You 'ill ha,e a short descri&tion o) each &ara eter i) %ou ho,er it 'ith %our ouse#

YAPSC Tuning Tool Tuning Guide

Page ./11

Illustration #&3: Parameters Tab


All &ara eters are either Eg: Green: &ara eter dis&la%ed is sa,ed into the board orange: &ara eter dis&la%ed is di))erent )ro the one sa,ed into the board#

Illustration #&4: 5odified arameters turn orange


P has been odi)ied but is not sa,ed in the board( 'hile the dis&la%ed $ and / ,alues are the one sa,ed in the board#

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

1.3 RT Monitor tab


This tab gi,es %ou access to Continuous sa &ling tool: dis&la%s the boards0 )ollo'ing error and out&ut on the YAPSC Tuning Tool Tuning Guide

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#

Ste& i &ulse res&onse bo3: this 'ill be our

Illustration #&8: 7T 5onitor Tab

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

These are the 2e% to a 'ell6tuned ser,o otor#

YAPSC Tuning Tool Tuning Guide

Page :/11

3&# Common terms


Error or Following Error: the di))erence o) &osition 8in encoder counts9 bet'een the actual otor0s sha)t &osition and the co and Output : the co and 8,oltage9 a&&lied on the 1++; o) the &o'er su&&l% ,oltage# Comman : desired &osition )or the board ,ia ST<P//$!9 otor# $t0s range is )ro 61++; to

otor0s sha)t 8co

and b% the co &uter to YAPSC and

!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

Illustration 3&#: (nstable loo s

)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

or use negati,e P, $, / coe))icients

>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

YAPSC Tuning Tool Tuning Guide

Illustration 3&3: Stable loo s


Co' the loo& is stable: the not it di,erges# otor 'ill )ollo' 8a&&ro3i atel%9 the co and# $t does not oscillate

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:

Illustration 3&4: 'o;overshoot and overshoot


The error is negati,e at the beginning as actual &osition 'as belo' the co and, but error goes o,er + 8loo2 at &oint .++9 'hich eans the otor &osition 'ent o,er the co and@ The second cur,e 8&ts 162++9 sho's no o,ershoot : error 2ee&s the sa e sign 8negati,e9# "# 6hy is overshoot a bad thing< $# Imagine you as, your C'C;milling machine to cut a #$mm long slot in some material& )ecause of overshoot+ the slot may be #$&=mm long instead of #$mm& /oo s> The mill went too far>

. P$/ tuning: a&&lication


4&# ?ardware setu
1# Get0s start )ro the beginning: YAPSC Tuning Tool Tuning Guide Page D/11

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@

4&3 PID Tuning


o not forget that the ./tep Impulse 0esponse. test ma#es the motor mo$e) In case of linear a1is 2e1ample: 3%Y and 4 on a mill5 turn the motor manually to reach the middle of the a1is under testing before starting the test and setup the .!ault Error.- 6e sure to choose a command step small enough to a$oid the carriage to crash on the ends of the slides>irst ste& )or P$/ tuning is to set 8roughl%9 the P &ara eter so 'e0ll set I and &ara eters to +#

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%#

Illustration 4&# : tuning method

Page M/11

YAPSC Tuning Tool Tuning Guide

>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

$ncrease 8decrease increase i) not stable9

* 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

Problem description: as soon as the the boards goes in P"a3error >aultP#

!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

YAPSC Tuning Tool Tuning Guide

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

).2 From steps to mm *in+


>or a l lead scre' dri,en b% m:n reduction, ste&s ste& o,e is eRui,alent to:

m l rev n
/turn 8: lead9 ballscre' dri,en b% our otor through a 1:. reduction: a

<3a &le )or a : :+ ste&s o,e is

1 5 steps 5 50 = =0,042 mm 3 PPR 4 3 500 4


The encoder PP7 is :++#

).3 ,nits per !tep


$t re&resents o) ho' uch the achine o,es )or each ste&#

UpS =

ml n PPR 4

This is commonly used by your fab soft !5AC4:15C etc%&

Page 1+/11

YAPSC Tuning Tool Tuning Guide

ocument 0e$isions
0e$ 1 ate 11/22/+N escription >irst ,ersion o) this anual

YAPSC Tuning Tool Tuning Guide

Page 11/11

Vous aimerez peut-être aussi