Skip to content
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

What model of the system do people usually use? (input is Torque? if yes do they model the motor? #67

Open
Tracked by #66
pierfabre opened this issue Jan 27, 2024 · 3 comments

Comments

@pierfabre
Copy link
Collaborator

pierfabre commented Jan 27, 2024

  • This paper uses the torque as the control input of the system. They then uses an inner loop on their DC motor to control the torque using a PI : "an analog servo drive AZBDC12A8 from Advanced Motion Controls that includes an inner current-loop driven by a PI controller. This allows assuming that the current flowing through the DC motor terminals reaches the current imposed by the control signal and, in consequence, torque can be used as the control signal."
  • The other way of doing it is neglecting the inductive effect in the motor and use the voltage as control input just like in this example
    image
    This second method allows us to by-pass the need for a feedback on the current sensor. We will test the viability of the hypothesis made during the system identification work
  • Alternatively to the inner curretn loop, we could also take the motor dynamic into account directly in the NMPC
  • Another alternative would be to have the torque in input of our NMPC and then we calculate the state of the system at the next iteration if we apply this torque thanks to the model of the NMPC. From this state we take the motor position and speed and we control our motor over this target! In mathematical terms
    image
    image
    This solution might be easier and doesn't rely on an additional sensor
@pierfabre
Copy link
Collaborator Author

See the current output if we feed this voltage input

image

@pierfabre
Copy link
Collaborator Author

pierfabre commented Jan 28, 2024

Inner current loop

Only feedforward

image

Only Ki (no feedforward, no Kp)

image

Ki + feedforward

image

Ki + Kp + feedforward

image

image

@pierfabre
Copy link
Collaborator Author

pierfabre commented Feb 3, 2024

Control position and speed of the motor

with loaded pendulum

TODO : add video

Kp = 5.0
Kd = 0.02

image

Use scipy.lfilter

More efficient than np.convolve!
now we have 3430Hz frequency!

image

Kp = 2.0
Kd = 0.01
order = 2.0
fs = 3400.0
cutoff = 50.0

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

No branches or pull requests

1 participant