Esempio n. 1
0
 def gen_control_targets(self, psc_target):
     u_vec = gc.calc_control(self, psc_target)
     u_vec_reduced = u_vec[0:self.N_ACTIVE_TIME]
     mvc_list, phase_list = gc.betas_to_mvc_phase(self,
                                                  self.psc_betas,
                                                  u_vec_reduced)
     return self.gen_target_list(mvc_list,
                                 phase_list)
Esempio n. 2
0
 def update_control_targets(self, u_vec):
     self.u_vec = self.u_vec + u_vec
     u_vec_reduced = np.ravel(self.u_vec)
     u_vec_reduced = u_vec_reduced[0:self.N_ACTIVE_TIME]
     self.next_mvc_list, self.next_phase_list = gc.betas_to_mvc_phase(self,
                                                                      self.psc_betas,
                                                                      u_vec_reduced)
     self.next_target_loc_list = self.gen_target_list(self.next_mvc_list,
                                                      self.next_phase_list)
     self.set_targets(self.next_target_loc_list)