For the Jupyter Notebook file used to develop the content of this section, click here: Jupyter Notebook
In order to define the matrix [K1 K2 K3 K4] for a Full-State Feedback controller, locations of the four poles were chosen in order to provide a stable control loop with an expected settling time and percent overshoot. For this particular assignment, a settling time of 2 seconds with a maximum of 20% overshoot was deemed appropriate. From that, the damping ratio was calculated to be 0.45 with a natural frequency of 4.4 rad/s. With these parameters, two of the poles could be determined. After selecting those complex conjugate poles, the other two were chosen such that they were further to the left on the pole-zero plot as to interfere less with the anticipated settling time and percent overshoot. The poles ended up as:
A characteristic polynomial was created from this information. The coefficients of the characteristic polynomial were renamed as a0 thru a3 to signify the terms in front of the s^0 thru s^3 terms, respectively.
Next, the A and B matrices calculated in Linearization EOMs and Simulating Closed-Loop Control were solved in a Full-State Feedback form of A-B*K to create an overall matrix, A_CL for "closed-loop." K was in therms of K1, K2, K3, and K4, which are unknown controller gains that need to be solved for in order to determine the four controller gains needed for closed-loop control. A_CL was converted into a characteristic polynomial after taking the determinant of s*I-A_CL. The coefficients of the characteristic polynomial were renamed as a0 thru a3 to signify the terms in front of the s^0 thru s^3 terms, similar to before. Lastly, the a0 thru a3 terms solved with the expected characteristic polynomial were plugged into a set of equations to calculate K1, K2, K3, and K4, which should now hopefully simulate the sustem with a settling time near 2 seconds and have an overshoot of 20%.
As can be seen in Figure 7, the response of the ball is much quicker than in Linearization EOMs and Simulating Closed-Loop Control. It has a settling time of nearly 2 seconds with under 20% overshoot. The discrepancy between perfectly 2 seconds and 20% has to do with the fact that there are two more poles that are arbitrarily chosen and affect those parameters.
To ensure that the calculations of K were valid, the poles and zeros of the A_CL matrix were determined. This is done as a sanity check to make sure that the final poles line up with the chosen poles mentioned in Deriving Pole Locations. Through the use of the eig() command and simplifying tools within Jupyter, the final poles are as follows:
Now that the model has been validated, the settling time and overshoot can be modified in the future to gain a new K matrix (if desired), or at the least, the current K matrix will act as a starting place to test on the physical balancing platform setup.
Continue to the next section here: Resistive Touch Panel: Locating the Ball