Skip to content

Add optimal control problems - quadcopter #373

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

m427kirb
Copy link

@m427kirb m427kirb commented Feb 5, 2025

Created Issue #372

Motivation : Expands library of optimal control problems. Demonstrates usage of features such as parameter functions, multiple states and control inputs, trajectory tracking.

Example : The quadcopter is an unmanned aerial vehicle with 4 propellors and in this case study, we seek to determine an optimal control policy for the 4 control inputs that must be adjusted over a specified time period to enable the quadcopter to closely follow given set points/trajectory while minimizing the difference between the set point and actual position and propellor input.

Copy link
Collaborator

@pulsipher pulsipher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work thus far, this just needs some further refinements. Please refer to the existing examples as points of reference for the formatting and style.

@@ -0,0 +1,140 @@
# # Quadcopter Trajectory and Set Point Tracking
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of "set point", please use "setpoint" through out.

Comment on lines +3 to +7
# The quadcopter is an unmanned aerial vehicle with 4 propellors and in this case study,
# we seek to determine an optimal control policy for the
# 4 control inputs that must be adjusted over a specified time period to enable the
# quadcopter to closely follow given set points/trajectory while minimizing the difference between
# the set point and actual position and propellor input
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would clean up the grammar here a bit and be more succinct. This is a flight path tracking problem for a quadcopter UAV.

Comment on lines +9 to +12
# ## Background

# Modelling the quadcopter trajectory is an infinite dimensional optimization problem.
# The variables are dependent on time.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove this.


# Modelling the quadcopter trajectory is an infinite dimensional optimization problem.
# The variables are dependent on time.
# Using a sinusoidal setpoint trajectory and 5 minute time horizon, the problem formulation is as follows:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this to the formulation section

# ```

# ## Model Definition

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In all the sections below please reduce the number of spaces used. We shouldn't each line be orphaned by itself. Please refer to the other examples as a reference.

Comment on lines +137 to +138


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add some discussion of the results at the end. Also, you need to had maintenance tests.

plot(p1, p2, p3, p4, layout = l)
plot!(size=(800,600))

savefig("Control Input (U).png")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's display the plot instead of saving it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants