None
You will design a controller for motor position using your complete toolkit of root locus analysis tools. You will develop a plant transfer function for the MOTOR-SHAFT-LOAD configuration to try achieve $\zeta = 0.1$ $\omega_n = 25 rad/s$ for the dominant eigenvalue pair. If you aren't sure why we are using such a LOW damping ratio, ask your instructor for clarification!
For this lab, you will be using the motor connected to the load inertia via a RIGID shaft by using the brass coupler INSTEAD of the spring.
Begin by developing a plant model for velocity for the motor-rigid shaft-load configuration in the code block below. Include in your OUTPUT a graph of your fit to data and display the plant transfer function.
As with lab 6, use the FSMMotor2 class to send commands to the motor. If you haven't already, follow the procedure in section 2.3 of Lab 4 to upload the new library and access the updated documentation.
% YOUR CODE HERE
error('No Answer Given!')
Although you previously developed a plant transfer function with angular velocity as the output, you can modify the velocity transfer function so that it outputs position simply by adding an integrator in series. The block diagram for PD control of your velocity transfer function modified with an integrator is shown below.
Notice that $H = 1$ in the diagram. This implies you will be able to directly measure the position of the motor shaft. The method to accomplish this is described below.
Using the angle deficiency method, design a PD controller for position that has the characterstics listed in the Challenge. You may assume that the summing gain, $K_{sum}$, that is often included in a root-locus based control design, is $1$. This way, if you implement a summing gain in your controller, you'll have the freedom to use it to "walk around" the root locus from your original design goal if needed.
The damping ratio is VERY low. If you cannot achieve a feasible design at $\zeta = 0.1$ you can increase the damping ratio. You should be able to achieve $\zeta < 0.15$
Perform the entire calculation in the code block below. Include in your output
% YOUR CODE HERE
error('No Answer Given!')
You will need to add the derivative of the error to your control law to implement PD control
$ u=k_{sum}(k_p e+k_d \frac{de}{dt})$
Like you did with the integrator, you will need to determine a numerical approximation of the derivative of error that gets updated each time through the void loop() function of your Arduino code. To achieve this you can use the same type of Euler approximation you have been using to calculate the angular velocity of the motor!
You will also need to update the code to reflect your closed loop system now that you are using angular position as an input and output.
Include in the cell below a copy of your completed Arduino code. Make sure to include the backticks with the c ( ```c ) so the text will be properly color coded
YOUR ANSWER HERE
In the MATLAB cell below, compare the data to the predicted response for the following quantities:
% YOUR CODE HERE
error('No Answer Given!')
In the cell below, summarize the comparison of simulation and data. Considering the behaviors you have seen with this electromechanical system and tried to model, describe any discrepencies and your best understanding of their source OR questions you have about them.
YOUR ANSWER HERE