| AustinSchuh |
27-06-2016 22:56 |
Re: FRC971 Spartan Robotics 2016 Release Video
Quote:
Originally Posted by ranlevinstein
(Post 1593043)
I modeled it as you said and I got that:
acceleration = a * velocity + b * (voltage error) + b * u, where a and b are constants.
I am a bit confused about why this is true because the voltage error is in volts and u is volts/seconds so you are adding numbers with different units.
|
Nice catch. Maybe I wasn't clear, but U changed units from volts/sec to volts, and the integrator on the output of the plant disappeared.
Quote:
Originally Posted by ranlevinstein
(Post 1593043)
I am still having some problems with understanding it, if the system is behaving just like it should then the integral of the voltage error will be zero and then there is just a PI controller. In my mind it makes a lot more sense to have:
u = constant * position error + constant * velocity error + constant * integral of voltage error
Maybe there is a problem with velocity error part here but I still don't understand how there won't be an integral windup when you have integral of position error in your controller.
What am I missing?
|
I *think* you are off by an integrator again.
u = Kp * x + Kv * v + voltage_error
So, if torque_error = 0 (the model is behaving as expected), then you don't add anything. Ask again if I read too fast.
Quote:
Originally Posted by ranlevinstein
(Post 1593043)
Also I saw you are using moment of inertia of what being spun in your model, What units is it and how can I find it?
|
kg * m^2
Quote:
Originally Posted by ranlevinstein
(Post 1593043)
I was wondering about how the delta-u controller works when the u command get's higher than 12 volts, because then you can't control the rate of change of the voltage anymore.
Thank you so much! Your answers helped my team and me a lot!:)
|
You have the same problem with a normal controller. The nonlinear assumption breaks down there too. We just cap the accumulator to +- 12.
To solve that all correctly, you'll want to use a Model Predictive Controller. They are able to actually take into account saturation correctly. Unfortunately, they aren't easy to work with. We haven't deployed one yet to our robot. (Go read up on them a bit. They are super cool :) That was either one of, or my favorite class at college.)
It's been another busy week. Sorry for taking so long. I started a reply a week ago and couldn't find time to finish it.
|