You are on page 1of 8
Bandwidth, Sample rate, and Latency -Michael Ali, x4278 1.0 Introduction "Bandwidth", "samy J” ™ e de iple rate", and "latency" are common terms used to describe control system parameters. We use them often in robotics to specify i Ke ch ee sath fy characteristics that we feel a system . ;, sometimes these terms are used incorrectly. This a : . ly. This paper tempts to address the issue of defining these terms and how they should be applied during a study ‘of robot control systems. There are some major limitations to applying the analyses in this paper to robot control systems. Robots are multivariable, non-linear dynamic systems. Most of the terms in this paper really apply to linear single-input, single-output systems. For example: what is the bandwidth’ of a multivariable system? Clearly there are several depending on the variable of interest, The non-linearity of the robot dynamics also makes defining a single bandwidth’ difficult since the response depends on the configuration of the robot. Keeping the above caveats in mind, the rest of this paper deals with defining the terms bandwidth, sample rate, and latency, and the relationships between them. +2. Bandwidth [Reference: Principles of Feedback Control Systems] 2.1 Definition ‘One of the most often used (and abused) terms in control system analysis is bandwidth. There are actually several definitions of "bandwidth" only one of which is appropriate for our use. The bandwidth of a system is «g, where (Figure 1): «9g = the location on phase response plot where the phase lag is -1 radian (or-57°) In the time domain (gis approximately the inverse’ of the delay time (Tg) the time it takes for the ‘output to reach half the magnitude of the commanded value (figure 2). Time delay is a key parameter wth control systems. Time delay defines dynamic error, which is what we are tying {© minimize. Therefore the definition of bandwidth that corresponds to time delay is the most appropriate fr these systems. As shown in ection 4+ this definition also allows a straightforward relationship between latency and bandwidth. 2.2 Other definitions of system bandwidth 2.2.1 Closed loop magnitude response Bandwidth is sometimes defined as the "3 4B down" point on a magnitude vs. frequency diagram of the closed loop response (Figure 3). This is the frequency at which the magnitude of the output is 3 dB lower than the magnitude of the input. ‘This bandwidth is referred to the Sch TAR cn iain aaa Phase (ed Angular teauency wg seal) Response \ Rise tie Ty \ Time Figure &@B2. Typical transient response of feedback-contrl system, which defines rise time Ty and delay time T, Fisuce 3 ‘ Reprinted urthont permission From “Principles of FB Cental Systems” “half-power" frequency, @},ysbecause 3 dB down is equivaligent to the signal decreasing to 0.707 of the zero frequency magnitude. This frequency is propotional to the inverse of the rise time of the system (T,) -- the time it takes for the output to go from 10% to 90% of the desired output (figure 2). This bandwidth is important to communications engineers because it reflects the fidelity of the ‘output signal tothe input signal. T, and @}, generally have no relationship to Ty and a, 2.2.2 Open loop magnitude response Bandwidth is sometimes defined as the "3 db down" point on a magnitude vs. frequency diagram of the open loop response. This is the frequency at which the magnitude of the output is 3, 4B lower than the magnitude of the input. For most linear systems, it can be shown that this bandwidth is equivalent to @ above. However, for systems with latencies (which are the kind we work with), this relation does not hold. This is because the exponential term that represents the delay has a magnitude of unity so it does not affect the magnitude response, but it definitely affects the phase response. 3.0 Sample rate 3.1 Definition ‘Sample rate is the rate at which the inputs are sampled and the outputs computed. 3.2 Sample rate and bandwidth ‘The sample rate limits the bandwidth of the system to 1/2 of the sample rate (Nyquist criterion). This is usually an upper limit since other considerations such as plant dynamics typically limit the bandwidth of the system. 4.0 Latency There are many ways that latency can develop in a system. The classical control example is controlling the temperature of the water in a tank via adding hot water. In this example, the valve that controls the amount of hot water added is separated from the tank by a pipe. This pipe adds a delay between the control signal (the addition of hot water) and the response (the temperature of the tank). Classical control theory shows that these systems are difficult to control. In robotics applications latency typically arises due to the use of multiple computers. First we examine the usual model of a digital control system (figure 4). One computer ‘controls everything. There are no latencies other that those of the plant in this setup. Now we shift to the situation we normally find in robotics. We now have multiple computers separating the application of the input from the detection of the output (figure 5). One good example of this is the teleop system proposed for DTF-1, and the setup we have in the lab. For the following discussion please refer to figure 6. We assume that the main control loop is being run in computer #1. ‘Computer #2 has the 1/0 capability. The computers communicate via some mechanism with a transmission time of Ty;. ‘These computers are run one of two ways-- asynchronously or ‘computer comman ang filter D/A Plant putqut Figure 4. A textbook digital control loop command output computer] computer computer = a me Plant computer] #4 Figure 5. A multicomputer digital control loop command output computer] 2) computer 2 Figure 6. A dual computer control loop = synchronously. When asynchronous, the time it takes for the output of the first computer to be acted on by the second is random. ‘The worst case time is the transmission time (Ty,) plus 2x the sample time (T.,p) of the second computer. Similarly, the time it takes for the second computer to send the sensor data back to the first computer is Ty, + 2T,. One proposed solution to this, problem is to organize the computers so that they operate synchronously. Computer #1 sends its data to computer #2. Computer #2 has been waiting for the data and immediately transforms it and sends it to the plant. It then reads the sensor(s). This data is passed back to computer #1 ‘Computer #1 immediately reads the data and computes the next output, and the cycle continues. The latency has now been reduced to Ty, in both the forward and feeback loops (assuming negligible A/D conversion time in computer #2). One variation on this is a situation where computer #1 and computer #2 communicate by trading buffers-- when computer #1 sends its, command data, computer #2 sends it previously sampled sensor data. In this case, the forward latency is Ty, and the feedback latency is Ty, + Tso. 4.1 Latency and "around-the-loop-time" ‘Around the loop time is the time from the computation and transmission of the control output to the reception of the sensor signal reflecting the output. For an analog control system the "around-the-loop" time is zero (or the speed of the electronics). For a one computer digital control system, "around-the-loop" time is the sample time. Given this definition, the around-the-loop-time of the system is equal to the sample time plus the sum of the latencies. 4.2 Latency and sample rate ‘Sample rate and latency are independent, and must be specified separately. 4.3 Latency and bandwidth Latency in the forward part of the control loop clearly adds a time delay between the command and the output. This latency sets an upper bound on the bandwidth of the system, using the definition of bandwidth in section 2.1. This direct relationship between bandwidth and latency is the main advantage of using definition 2.1. ‘The effect of latency in the feedback loop is more complicated since the data is a funtion of the plant and environment. In addition, the control law transforms the feedback data in order to produce an output. The latency in the feedback loop doesn't have as much a direct effect on the delay time as much as it effects the stability and overshoot of the system. 5.0 Summary ‘The bandwidth of the system is the frequency at which the phase response drops 1 radian behind a sinusoidal input. In the time domain, this corresponds approximately to the inverse of the time delay of the system. The bandwidth is a function of the controller, the plant dynamics, the sample rate, and the latency of the entire system. ‘The sample rate sets an upper bound on the bandwidth of the system as does latency in the forward control loop. Latency in the feedback loop effects stability and overshoot. 7.0 Further Research One of the implications of [Brooks, 1990] is that is possible to partition the design and specifications of the teleoperator system into two parts -- a relatively low bandwidth forward position loop and a high bandwidth force feedback loop. As discussed above, the appropriate definiton of bandwidth for the position loop is @,. For the feedback loop, however, the fidelity of the returned signal is important. In this case the bandwidth defined as hp (section 2.2.1) might be ‘more appropriate, Latency must still be minimized in the feedback path, so latency should also be specified. ‘These are topics for further research. 8.0 References Author, Unknown, "Principles of Feedback Control Systems: Vol I” Brooks, Thurston, "Telerobot Response Requirements", STX Report # STX/ROB/90-03 Appendix A. Sample Analyses Example 1: FTS analysis In the report entitled "Telerobot Response Requirements”, Thurston Brooks makes the argument that a typical teleoperated system requires a master to slave bandwidth of 5 Hz. I will assume this bandwidth is «, as defined in section 2.1, and proceed to find the necessary bandwidth for the slave robot (in this case, DTF-1). In order to do this I will assume that the latency in the system due to Martin's hardware configuration is 5 ms. The latency arises from the time required to send the command from the Kraft to the SDP, and from the SDP to the DUMPS processors in the arm. ‘We first compute the phase lag due to the latency: Statency = “28 (5 Hz) (Sms) = 05m =-0,157 radians In order to achieve a bandwidth of 5 Hz, the phase lag at 5 Hz must be less than or equal to -1 radian, This means that the slave arm may have up to -1 - (-.157) = -0.85 radians of lag at 5 Hz. Assuming that the arm exhibits a critically-damped second order response we see from figure A.1 that the required bandwidth for the slave would be (.55/.45)*5Hz=6 Hz. Figure A.1 also shows that @ is .55 of the natural frequency @,. The natural frequency is a function of the motor constants, gear ratios, and inertias. ‘Therefore knowledge of @, can guide selection of these parameters. Note that in this example the sample rate enters the calculations implicitly during the use of figure A.1. If the sample rate is greater than 15-20 times the system natural frequency, the digital control system can be analyzed as if it were a continuous system. Figure A.1 are the curves for a continous system. If the sample rate is not high enough, a curve for the desired sample rate would have to be generated and the analysis done using it. Since the zero order hold typically used with digital control systems essentially adds phase lag, we would expect the bandwidth to drop with decreasing sample rate. Example 2, The proposed setup for the Engineering Testbed (ETB) In this case we are given the robot (the RRC arm). We want to find what the expected master-slave bandwidth will be. The latency from the Kraft to the Multibus II bucket is about 10 ms. The latency from the MBII to the D/A converters on the MBI is about 2.5 ms (assuming we use RRC’s 386 board in the MBI with their software). The total forward loop latency is 12.5 ms. The RRC arms can move a 50 Ib load 8 feet in about 1 second. This should be the slowest speed. The delay time Tg. slave is therefore 0.5 seconds. Adding the latency to this we get the master-slave system delay time: Tq. system =-5125 ms. The bandwidth = 1/Tq.system = 1.95 Hz. Eq, (8-24) contains sd without factoring: Cy)" as vues of w the low- 2 4B. For very high 0 dB/decade. The \ibited in the vicinity fore there may be a straight-line asymp- ral values of { <1is aced directly on the Fig. 8-4, 's with £ At zero ele is 90°, and at or various values of curves, or enough Fig. 8-4. When the es of the log mag- xcept that they are 1k value. The mag- "ours are important ed in Sec. 9.3, are (827) 6-28) ratio herefore the curve for ¢<0.707. The the damping ratio tion is used when ics. These charac- FREQUENCY RESPONSE 265, ° 0 e { | Res ee 49° (--85 rad) ¥ -57° (-l rad) oie ican i | | z Ree 8 he 1 4 € dE TINK } - 120" =} — . + tes z . 40" 20 HIT | aa 15 ; See | 160 i ara aap fas 8 Al es Figure $e Log magnitude and phase diagram for {1+ [Zee + (olan) jum-phase factors»However, the she ta err ive, the quadratic factor of phase teritelts angle varies me

You might also like