|
|
|
|
Delay Compensation for the Furuta Pendulum The prior application of a Smith Predictor for delay compensation proved the value of canceling time delays within the control loop. Unfortunately, a Smith Predictor cannot be used in the control of an unstable plant such as the inverted pendulum. This is because the Smith Predictor relies on the open-loop input/output behavior of its predictive element to have a reasonably close match to that of the plant. For an unstable plant it is clear that the control sequence used in balancing the plant will not necessarily balance the predicted plant, and thus prediction can diverge from reality. This would result in very poor feedback and could potentially cause instability. Seeking another method for state prediction within the loop, we looked to adaptive control. In particular, the Recursive Least Squares (RLS) algorithm has been shown to give optimal predictors over a range of problems. We have applied this technique for the estimation of the plant's state-space matrices. Using the discrete-time estimates we obtain, we can then use current feedback to predict the feedback one step ahead. Clearly this type of prediction introduces an open-loop element into our control loop, and thus stability in contingent on the accuracy of our predictions. It has been found in application to our system that while convergence of the estimated parameters is not perfect, the resulting predictions still outperform the use of the true feedback by a substantial margin.
Increased Sampling Rate on Feedback A second strategy for improving the performance of our control loop is the use of an increased sampling rate in the feedback loop. Sampling rate limitations on the control loop are the result of limitations in the communication rates, but it has been found that these communication rates are not sensitive to the amount of data being transmitted. Due to a minimum packet size requirement of the communication protocol, any amount of data below the critical level (256 bytes) will be sent in the form of a packet that is of the critical size. As a result, increases in the amount of data transmitted in our control loop should have no negative effects (up to a point). This feature can be exploited to allow for faster sampling of feedback. While the control loop is limited to 250Hz, sampling could be performed at 1000Hz with 4 feedback samples contained in each packet of feedback from the sensor to the controller. The utility of having 4 samples instead of 1 is twofold. First, faster sampling means that by using the intermediate samples in calculation of derivatives (by backward differencing) we can achieve a reduction in the phase lag of the derivative states. In experience with our particular system, phase lag in the derivative states is seen to be one of the worst contributors to lack of stability. A second benefit of using more samples is the added ability to filter errors from the feedback. There are a number of ways to do this type of filtering, depending on the type of effects that are to be removed. One application would be the reduction of high-frequency measurement noise, which could be approached through low-pass filtering of the feedback. A second potential application is the compensation for quantization effects in feedback measurements. In our particular system, these quantization effects are quite noticeable in the encoder measurements for the pendulum angle. The effect of these quantizations in the calculated derivative states are even more apparent. We have applied the strategy of increased sampling rate to our current plant with the joint goal of filtering out quantization effects and reducing phase lag in the feedback states. We have found that this can be accomplished nicely by performing a linear fit to the sampled positions. The endpoint of this linear fit is taken as the position measurement with the slope as the velocity state. For the test case of 100Hz control with 500Hz sampling, the above strategy has been found to give significant reduction in quantization effects and a general improvement in the continuity of calculated states. These improvements are further propagated through the prediction scheme for delay compensation, resulting in better estimation of future states. |