alexberndt / quadrotor-pendulum

A model predictive control (MPC) design and implementation for a quadrotor balancing an inverted pendulum. Includes a stability analysis and an estimate of the region-of-recursive-stability.
37 stars 5 forks source link

What method do you use for mathematical modeling? #1

Closed MrPlay123 closed 5 years ago

alexberndt commented 5 years ago

Hi MrPlay123

The modelling implemented in this work is based on Euler-Lagrange mathematical modelling. You can find more details on the derivations here: https://ieeexplore.ieee.org/document/5980244

MrPlay123 commented 5 years ago

Why is there no rate of pitch and roll angle in the simulation image?

alexberndt commented 5 years ago

I am not exactly sure what you mean? The simulation definitely has varying pitch and roll angle (since this is considered in the dynamics of the quadrotor).

Which "simulation image" are you referring to?

MrPlay123 commented 5 years ago

untitled3 We only have roll angle γ but no rate of quadrotor body in this picture.

alexberndt commented 5 years ago

Oh I see. I decided only to plot the roll angle, not the rate in this case. But the roll angle state is still accessible in the code and can be plotted as well if desired.

MrPlay123 commented 5 years ago

Can you help me plot it?

alexberndt commented 5 years ago

If you are running "reference_LQR.m" , you can see the function "functions/plot_2D_plots" is used to plot this plot you mentioned above (see line #100 of referene_LQR.m). In this function "plot_2D_plots", you can then access the plot for the pitch angle:

    subplot 515;
    stairs(time, states_trajectory(:,5), 'k-');  grid();
    ylabel('$\beta$ [rad]','interpreter','latex');

State 5 is the roll, and 6 is the pitch rate in the states_trajectory variable. So just plot states_trajectory(:,6) instead.

Similarly, state 12 is the roll rate, and 11 is the roll angle in states_trajectory.

This is exactly the same for "reference_MPC.m"

MrPlay123 commented 5 years ago

thank you