Having MATLAB run through the theoretical model with varying values of K p gave us a ballpark value for a desired system response. We chose K p, K d, and K i values largely by inspection. To ensure that our controller is stable, we plot the Nyquist diagram of the PID controller (without saturation), assuming the transfer function of the satellite is indeed that obtained in lab 4. We modeled the PID controller with saturation in Simulink to compare to the experimental results, also using the lab 4 transfer function. Since the controller is for a real satellite, we do not want there to be any error. We did not attempt to design a phase-lead or phase-lag controller, since they necessarily would not be faster than a PID controller, and would not ensure zero steady state error. As a result, the experimental PID controller design methodology was used. The satellite transfer function obtained in the previous laboratory exercise was not used in this design, since the ‘best’ transfer function obtained was known to have serious errors in its modeling of the system. The settling time criterion was within 95% of the final value. A rough settling time estimate for an approximately 90 degree step was about 1 second. A few iterations of this method resulted in a seemingly optimal controller that was able to step the angle of the satellite with little overshoot quickly. Then we increased the derivative controller slowly to decrease the overshoot. This was done by increasing the proportional gain as well as the gain of the pure integrator. We designed our controller to saturate the Kepco amplifier to obtain the quickest response. This is not an exact transfer function, but seemed to model the satellite as best possible. The transfer function for the satellite model used was obtained in Lab 4. This is similar to real life control technique employed by NASA. A theoretical MATLAB and Simulink model was used to choose the constant parameters to obtain the quickest settling time without excessive overshoot.Īn extension was explored to look at dynamic PID controlling dependent on the satellite behavior during operation to find a faster response.
#Transfer function matlab simulink plus
A Proportional plus Integrator plus Derivative (PID) controller was chosen for its transient and zero steady-state qualities.
#Transfer function matlab simulink code
pid_extend.m - MATLAB code for dynamic PID controllerĪ design for a controller was created and implemented to step the angle of the satellite position as quickly as possible.