Skip to content

How to pass a function f(t) as position control for the motor? #51

@DiegoBArruda

Description

@DiegoBArruda

Hello everyone!

I use the library to control a servo motor (jmc ihsv57) for a space telecommunications groundstation project.

I have an orbit propagator that gives me the angular position (azimuth and elevation, understood as rotation in the plane and elevation in relation to the horizon/plane) of the satellite in relation to the space station at each time, the delta t between each position data is defined by me.

In short, I have a list that, given time t, has the angular position that each motor should be in.

The connection between the motor and the station has a large reduction ratio, since the motor is relatively fast (3000RPM) and we need, at most, something around 0.1rpm, however the necessary torque is much highe. This angular position of groundstation and motor was mapped through the configuration.

Currently, I send a certain angular position, say 10º, and I have to wait for it to get there to send the next position. However, I would like to keep sending the position that I have in the table as a function of time and the servo will "update" this position.
What is the problem with the current approach? It accelerates, reaches v max, slow down and reaches the position, then receives new data, accelerates again etc. If I could keep sending a new position before it reaches the last one, it will not slow down (unless my delta t is long).

How can I do this? Keep sending new position and the lib or servo update target position before reach the previous position.

If anyone wants to test this, generate a sinusoidal signal that represents its position in time, make the servo follow exactly this sine in its "position".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions