Computer Science > Research Paper > Georgia Institute Of TechnologyCS 6440RocketPIDStudent.py (All)
# Optimize your PID parameters here: pressure_tau_p = 0.1 pressure_tau_d = 1.0 rocket_tau_p = 2.0 rocket_tau_i = 12 rocket_tau_d = 0.005 def pressure_pd_solution(delta_t, current_pressure, data)... : """Student solution to maintain LOX pressure to the turbopump at a level of 100. Args: delta_t (float): Time step length. current_pressure (float): Current pressure level of the turbopump. data (dict): Data passed through out run. Additional data can be added and existing values modified. 'ErrorP': Proportional error. Initialized to 0.0 'ErrorD': Derivative error. Initialized to 0.0 """ # TODO: remove naive solution # adjust_pressure = current_pressure # TODO: implement PD solution here while current_pressure < 80.0: adjust_pressure = 10.0 # print('current_pressure', current_pressure) # print('adjust_pressure', adjust_pressure) data['prev_crosstrack_error'] = current_pressure - 100 return adjust_pressure, data # print('current_pressure', current_pressure) # print('prev_cte', data['prev_crosstrack_error']) crosstrack_error = current_pressure - 100 # print('cte', crosstrack_error) diff_crosstrack_error = crosstrack_error - data['prev_crosstrack_error'] # print('diff_cte', diff_crosstrack_error) adjust_pressure = - pressure_tau_p * crosstrack_error - pressure_tau_d * diff_crosstrack_error data['prev_crosstrack_error'] = crosstrack_error [Show More]
Last updated: 1 year ago
Preview 1 out of 3 pages
Connected school, study & course
About the document
Uploaded On
Jul 09, 2021
Number of pages
3
Written in
This document has been written for:
Uploaded
Jul 09, 2021
Downloads
0
Views
47
In Browsegrades, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.
We're available through e-mail, Twitter, Facebook, and live chat.
FAQ
Questions? Leave a message!
Copyright © Browsegrades · High quality services·