Coder Social home page Coder Social logo

Comments (5)

pattacini avatar pattacini commented on August 19, 2024 2

Hi @mfussi66

I think you made some progress recently on this task.
You may write up a brief summary of the latest ideas and then we can close the issue.

from icub-firmware-models.

mfussi66 avatar mfussi66 commented on August 19, 2024 1

Today I gave a go at this activity by first moving around the components in the supervisor-rx.
I tried to identify subsystem that can be considered motor-specific, and for which we need different configuration parameters and targets.

The subsystems in question, highlighted in yellow, are:

  • Limits handler
  • PID handler
  • Control Mode handler
  • Setpoint handler

MATLAB_qS8rF9jR4F

Moreover, I think the "Overcurrent" FSM should be moved from the Supervisor-rx state handler, so that it can be used for each motor.

from icub-firmware-models.

mfussi66 avatar mfussi66 commented on August 19, 2024 1

Proceeding with the analysis and experimentation, I thought it could also be useful to move the FSM dedicated to raising faults outside the SupervisorRx State Handler.
This is because (I think) a fault such as overcurrent could occur for each motor independently from the other.
Therefore, I grouped the FSM with the other subsystem, calling it Fault Manager. This Fault Manager could also be used as a wrapper for the i2t protection logic.

image

Additionally, I imagine the configuration step should allow for two different sets of motor configs, limits, pids.
To this end, a data structure called e.g. Actuator containing:

  • limits
  • motor config
  • pid params

could be passed to each block that sets the related parameters. This container could then be used to propagate the parameters to other functions (e.g. FOC, Fault Manager).

Important note: the changes I'm making to the blocks are not proposed as official refactoring, but they are just sketches of ideas.

from icub-firmware-models.

mfussi66 avatar mfussi66 commented on August 19, 2024 1

While studying a possible extension of the dictionary (#54), I was able to encapsulate FOC and outer controller seamlessly in a single Motor Controller model. The latter also needs the Supervisor_RX motor specific layer, highlighted in yellow in the previous comment. It could be done in such a way:

immagine

The Motor-specific layer of the supervisor can have its output interface operate with no problem with the Motor controller.
However, on the input side, it is dependent on the State Handler and the CAN Message Handler. All the CAN parameters and message events are sent to the respective state machines. In its current state, the Motor-specific block does not have an unbearable amount of entry-points, but I think it would be nice to devise a way to simplify them. See the picture below to see what I mean.

immagine

In the end, all the motor-specific components could be referenced together in a single Simulink model, so that it will be possible to iterate over them or selected by switching (this is not possible within the System Composer), like so:

immagine

I think that in the refactor we could design an input interface for the motor-specific layer of the sup-rx, so that it becomes a common way to send high-level commands to a motor controller.
The CAN Msg handler can be specific to the AMC-BLDC, while a bespoke system could be built for the AMC-FOC.

from icub-firmware-models.

pattacini avatar pattacini commented on August 19, 2024

Super!

from icub-firmware-models.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.