def plot(self):
    plt.figure()
    plt.plot(self.time, self.setpoint)
    plt.plot(self.time, self.actual_velocity)
    plt.xlabel('Time (s)')
    plt.ylabel('Velocity (m/s)')
    plt.title('PID Result')
    plt.figure()
    plt.plot(self.time, self.error, 'r--', label='error', alpha=0.75, linewidth=0.5)
    plt.plot(self.time, np.zeros(len(self.time)), 'k--', linewidth=0.5)
    plt.title('Controller Error')
    plt.show()
def plot(self):
    plt.figure()
    plt.plot(self.time, self.setpoint)
    plt.plot(self.time, self.actual_velocity)
    plt.xlabel('Time (s)')
    plt.ylabel('Velocity (m/s)')
    plt.title('PID Result')
    plt.figure()
    plt.plot(self.time, self.error, 'r--', label='error', alpha=0.75, linewidth=0.5)
    plt.plot(self.time, np.zeros(len(self.time)), 'k--', linewidth=0.5)
    plt.title('Controller Error')
    plt.show()