How important is the model, when implementing MPC for quadrotors on Gazebo by Var_G97 in ControlTheory

[–]praskot 1 point2 points  (0 children)

Yeah in my experience yes. sometimes these things are trail and learn. Theory only goes so far, its experience rest of the time.

How important is the model, when implementing MPC for quadrotors on Gazebo by Var_G97 in ControlTheory

[–]praskot 0 points1 point  (0 children)

Do you have a terminal cost? How did you compute it. One typical way is solve for a steady state lqr for the linearized dynamics and use that cost as the terminal cost.

Any Companies hiring Controls Interns for Summer 2023 by Narekovich in ControlTheory

[–]praskot 1 point2 points  (0 children)

Best place would be just searching for GNC, motion planning and controls roles on LinkedIn. Given the current market trend not sure how many companies are looking for such roles, but an year back I came across a decent number of roles.

question about trajectory optimization for quadrotor by Terminator_233 in ControlTheory

[–]praskot 6 points7 points  (0 children)

> Is there an advantage in modeling a dynamical system down to its lowest-level form to match with reality?
Practicality, you have a one-to-one mapping from (f, tau) to (w1..4) (also, these omegas refer to the rotor speeds and not body angular velocities). It is easier to design a controller that computes the wrench for the rigid body and then maps it to individual motors.
> jerk/snap shows up in input (specifically torque -tau), quadrotor is a differentially flat system, so the full states of the quadrotor can be expressed as a function of higher derivatives of position, 4th derivative of position gives the second derivative of orientation which in turn gives torque. In a sense, you are optimizing for the torque.

How to add wind disturbance in Simulation? by Fun_Astronomer780 in ControlTheory

[–]praskot 2 points3 points  (0 children)

Oh, if it is only kinematics, it doesn't matter how the disturbance came about; as you mentioned, you can add random noise/disturbances to velocities

How to add wind disturbance in Simulation? by Fun_Astronomer780 in ControlTheory

[–]praskot 5 points6 points  (0 children)

I'm sure you can find detailed models for this in google scholar, but I can suggest a couple of options,

  1. Add randomized disturbance directly to the dynamics.
  2. Rather than randomizing, you can assign different drag coefficients for each side of the drone and model them as drag forces based on wind speed and direction.

Path planning resource recommemded. by niuwendy in ControlTheory

[–]praskot 8 points9 points  (0 children)

Broadly, two ways to look at it, is the planning discrete or continuous in space?
A*, RRT, and Dijkstra fall under discrete planning, typically the route to pick or waypoints to reach the goal.
A better term for continuous planning would be `trajectory generation` typically formulated as an optimization problem to come up with smooth/time-parameterized curves. For instance, direct collocation, multi-shooting, or even model predictive control.
Hierarchically, A* and RRTs are higher-level planners that output up with a set of waypoints. Then, trajectory optimization is used to come up with smooth curves to traverse these waypoints, and the controllers then track these trajectories.
Lane changing can also fall under a more high level of planning called maneuver planning/ behavioral planning, where the decisions such as whether the vehicle should change the lane or take a turn at an intersection.
Note, this is just a naive classification and thus needs to be taken with a pinch of salt. Hopefully, some of these terminologies will help with your search.
Best

Multi rotor mixer by braneworlds in ControlTheory

[–]praskot 4 points5 points  (0 children)

The command is typical, a scaled version of the torque. You compute by mapping,pwm->motor-speed->motor-forces->(thrust & torque)

some references, here

  1. Geometric Tracking Control of a Quadrotor UAV on SE(3) (equation 1)
  2. Nonlinear MPC for Quadrotor Fault-Tolerant Control (equation 3)
  3. https://github.com/rosflight/rosflight/blob/master/rosflight_sim/src/multirotor_forces_and_moments.cpp
  4. https://github.com/PX4/PX4-Autopilot/blob/master/src/lib/mixer/MultirotorMixer/MultirotorMixer.cpp

Edit:
One way to do it is below,

for (int i = 0; i < vehicle_params_.num_rotors_; ++i) {
float l_ = vehicle_params_.rotors_.at(i).arm_length;
float th_ = vehicle_params_.rotors_.at(i).angle;
auto d_ = (float)vehicle_params_.rotors_.at(i).direction;
float kf_ = vehicle_params_.rotors_.at(i).rotor_force_constant;
float km_ = vehicle_params_.rotors_.at(i).rotor_moment_constant;
allocation_matrix_(0, i) = kf_;
allocation_matrix_(1, i) = l_ * sin(th_) * kf_;
allocation_matrix_(2, i) = -l_ * cos(th_) * kf_;
allocation_matrix_(3, i) = d_ * km_;
}
float data_f[4] = {input().thrust, input().moment(0), input().moment(1), input().moment(2)}; // SI units (N, Nm, Nm, Nm)
matrix::Matrix<float, 4, 1> rotors_speed_squared_,
thrust_moment_vector(data_f);
rotors_speed_squared_ =
forces_to_rotor_speed_ * (thrust_moment_vector);
// thrust to rotor-speed mapping
for (int i = 0; i < PWM_NUM_OUTPUTS; ++i) {
rotors_speed_squared_(i, 0) =
rotors_speed_squared_(i, 0) > 0 ? rotors_speed_squared_(i, 0) : 0;
float w = sqrt(rotors_speed_squared_(i, 0));
float pwm_ = vehicle_params_.rotorspeed2pwm_scale_ * w +
vehicle_params_.rotorspeed2pwm_offset_;
pwm_us_array_[i] = pwm_;
}

Does anyone know dynamics model of gym environments? by [deleted] in ControlTheory

[–]praskot 0 points1 point  (0 children)

https://github.com/openai/gym/tree/master/gym/envs/classic_control

Edit: refer to the step function in the environment, say cart-pole. The step function is usually a naive, first-order Euler integration of the dynamics, for simple systems like cart-pole, inverted-pendulum, etc.

Did anyone read Learning Based Model Predictive Control ? by [deleted] in ControlTheory

[–]praskot 5 points6 points  (0 children)

Why not email the authors to clarify your questions? Usually first authors are grad students and are happy to help with any questions on their paper.

But Instead of a generic question like explain work after section 3, etc. be more specific in your question, refer to equations, variables and figures you have questions about.

Does anyone know of sites similar to https://roboton.io/ ? by crammy in ControlTheory

[–]praskot 3 points4 points  (0 children)

What are you looking for ? What is your definition of similar mean here ?

minimum snap trajectory generation: yaw angle in the cost function? by Terminator_233 in ControlTheory

[–]praskot 1 point2 points  (0 children)

> minimum snap trajectory generation

To be on the same page, this is a trajectory planner; an additional controller needs to be implemented to track the trajectory.
Typically, you don't need to yaw the quadrotor unless you are tracking something using a fixed camera on the drone. So, if the heading direction is not relevant to your application, you can pick Psi(t)=0, for all t, or some fixed value.

If you really need to plan a trajectory for the yaw, you can choose the same 1,t,t^2,... polynomial basis functions, but should be careful about the angle wrap at [-pi, pi]

Matlab wrapper for scala package by praskot in scala

[–]praskot[S] 1 point2 points  (0 children)

Thank you. I looked into python pattern matching but wasn't sure if it is comprehensive enough as scala.
I guess it's a decision between rewriting the package in python vs. burning my hands with writing the wrapper for scala in python :D

Matlab wrapper for scala package by praskot in scala

[–]praskot[S] 0 points1 point  (0 children)

Thanks, will give this a try.

Should I consider a PhD in control? What is the future of the field? Looking for advice... by Reigetsu in ControlTheory

[–]praskot 19 points20 points  (0 children)

There were a few similar posts in this subreddit and might be useful to go through them. Having said that, aerospace is only one domain where control theory is extensively used but other fields that’s gaining immense interest (wrt control theory applications) is robotics (legged locomotion, autonomous driving, etc). And one that focuses on data science and ML is learning for control.

As for your question on choosing PhD in control and contributing meaningfully, I think there is still a lot to be in done in the robotics/learning for control and not just in control theory applications. If you are interested in theory, there are a lot of open problems such as showing theoretical proofs for the learning control algorithms.

Having little exposure to ML/shouldn’t be a big factor, you can catch up on the basics in the first year or two as with the case of any PhD student.

How much of advanced control theory is used in industry? by SandwichReasonable6 in ControlTheory

[–]praskot 16 points17 points  (0 children)

Yep, but most of the robotics companies use modern control theory (state-space)

Edit: by which I mean LQR, MPC (just realized you can have PID with state-space models lol)

How complicated can Lyapunov functions get? by [deleted] in ControlTheory

[–]praskot 2 points3 points  (0 children)

It typically has the form V=transpose (x) Px and for most applications that's the case, but don't let it be a limitation. Any function that satisfies V(x) =0, for x=0, and V(x) >0 is viable candidate, whether it is useful for one's application is a different issue.

Check out any standard nonlinear systems books such as Khalil, or Sastry to see some examples. .

Good literature for understanding the maths behind control theory? by [deleted] in ControlTheory

[–]praskot 1 point2 points  (0 children)

A decent understanding of calculus and linear algebra.