I separated the code for this project in three main files.
- The primary code is contained in "Project_1.mlx". The code in this file covers:
- From section (2)
- The dynamical system model, including the transfer function in all required forms except ARMAX, and the bode plot
- The disturbance model in all required forms except ARMAX, and the bode plot
- The response characteristics of the dynamical system and the disturbance
- The root locus for both the dynamical system and disturbance model
- From sections (3)-(4)
- The controller design, including the transfer function in all required forms except ARMAX
- The controller design, including the transfer function in all required forms except ARMAX
- From section (5):
- The design of the new controller
- From section (2)
- The file "Project_1_final_part.mlx" contains the code used in part (6) (stability under parameter uncertainty).
- The file "P1_simulation_script.mlx" contains the code used to run the Simulink diagrams that generated the system response plots in sections (3), (4), and (5).
How to run the code:
- Running "Project_1.mlx" should automatically generate most of the graphs and figures used in my report; some responses may be suppressed to save memory or space, but those are generally items (e.g. a written list of pole locations or a written transfer function) that are directly copied in the report.
- Running the appropriate section of "P1_simulation_script.mlx" will run the corresponding Simulink diagram used to generate the system responses shown in sections (3)-(5). All graphs should be set to display those used in the report as-is.
- Running "Project_1_final_part.mlx" will automatically generate most of the graphs used in Section (6). Note that I did manually change k1 for part of my analysis in section (6), but the rest of the section should run automatically without changes.