Skip to content

Commit

Permalink
Fixed data generation error for the torques.
Browse files Browse the repository at this point in the history
  • Loading branch information
moorepants committed Jan 23, 2015
1 parent a19b252 commit c84a916
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/measured_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,10 @@ def _generate_simulation_outputs(self):
# The initial conditions of the states are always zero.
x = odeint(self.rhs, np.zeros(4), self.time, args=(self.rhs_args,))

# FIXME : This is incorrect! The torques are a function of the gain
# matrix and the error, which can be corrupted by the reference
# noise.
# Back out the torques used in the control.
# N x 4 = ((2 x 4) * (4 x N)).T
u = -np.dot(self.model.numerical_gains, x.T).T
u = np.dot(self.model.numerical_gains,
(self.ref_noise - x).T).T

self.actual['x'] = x
self.actual['u'] = u
Expand Down

0 comments on commit c84a916

Please sign in to comment.