Hey Ytai, 

I am trying to implement the lqr algorithm recently. Thank you very much 
for the sample code. It helps a lot.
I have a question about the sensors you use, according to the code, you 
mainly used gyro sensor for getting error_, errorDeriv_, and errorInt_, 
which are enough for the three state variable for pid control.
But what you use accelerometer for?? why getting another error_ and 
orientationX_?
And actually are the two sensors working at the same time?? how this two 
sensors working in the same time domain??
Thank you.

Best,
Jiexin

On Tuesday, February 11, 2014 1:38:34 AM UTC+9, Ytai wrote:
>
> It's a first order IIR filter (lowpass):
> y[n] = 0.999*y[n-1] + 0.001*x[n]
>
>
> On Sun, Feb 9, 2014 at 8:56 PM, Al B <[email protected] <javascript:>>wrote:
>
>> That makes more sense now.
>>
>> What about that 0.999 factor?  Why do you need that?
>>
>>
>> errorInt_ = (float) ((error_ * dt * 1e-9) + 0.999 * errorInt_);
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "ioio-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected]<javascript:>
>> .
>> Visit this group at http://groups.google.com/group/ioio-users.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to