Skip to content

Add autogen for AMDC article in control with AMDC folder#151

Open
Daehoon-Sung wants to merge 25 commits intomainfrom
feature/add-autogen-control-with-AMDC-article
Open

Add autogen for AMDC article in control with AMDC folder#151
Daehoon-Sung wants to merge 25 commits intomainfrom
feature/add-autogen-control-with-AMDC-article

Conversation

@Daehoon-Sung
Copy link
Copy Markdown
Contributor

@Daehoon-Sung Daehoon-Sung commented Mar 19, 2026

This is to close issue #149.

Notes

Anything reviewers should be aware of when reviewing? Other related issues? Known problems? Future work?

Self-Review

In this section, please self-review (answer all questions) on a suitable review checklist prior to requesting review from others. Select a review checklist based on what content is being merged in; see the Review Checklists section.

Reviewer Instructions

Reviewers, please copy and paste a suitable review checklist into your review and answer all questions.

Appendix

This section should be the same for all PRs. Do not edit this section when creating a PR.

Review Checklists

Checklists maintained by the eLev lab for research repositories include:

Standard checklist

1. Are all files under 300 kB (if not, please carefully assess whether it is worth committing them)? **Yes or No**
2. Are all files named according to the appropriate [naming convention](https://github.com/Severson-Group/research-repo-template?tab=readme-ov-file#file-naming), i.e., dash-case, camelCase, snake case? **Yes or No**
3. Do all Markdown files follow the [CONTRIBUTING article template](https://github.com/Severson-Group/.github/blob/main/CONTRIBUTING.md#markdown-documentation-template)? **Yes or No**
4. Do all links work in the material that the PR is adding? **Yes or No**
5. Is the PR configured to close the correct issue(s)? **Yes or No**
6. Did the PR fully address the `Approach` section of the issue(s) it is closing? **Yes or No**

Please work on addressing any **No** items.

@Daehoon-Sung Daehoon-Sung requested a review from elsevers as a code owner March 19, 2026 18:58
@Daehoon-Sung Daehoon-Sung marked this pull request as draft March 19, 2026 18:58
Refine the introduction and workflow sections for clarity and conciseness. Improve the structure and language for better readability.
Updated the documentation to clarify the workflow and integration details for Simulink models with AMDC, including code generation and organization.
This update enhances the documentation by providing a detailed explanation of the Simulink Autogen workflow and its integration with the AMDC. It includes sections on the example model, system-level representation, generated code structure, and the role of the example as a reference implementation.
Revised the example model section to clarify the Simulink Autogen workflow and its integration with the AMDC. Updated descriptions for the Simulink model structure and generated code structure.
Clarified the Autogen capability description and added details about file path constraints.
Updated image syntax for autogen example block diagram.
Removed redundant lines in the conclusion section.
@Daehoon-Sung
Copy link
Copy Markdown
Contributor Author

Daehoon-Sung commented Mar 19, 2026

Since this is not a report but an article, I used the standard checklist.

  1. Are all files under 300 kB (if not, please carefully assess whether it is worth committing them)? Yes
  2. Are all files named according to the appropriate naming convention, i.e., dash-case, camelCase, snake case? Yes
  3. Do all Markdown files follow the CONTRIBUTING article template? Yes
  4. Do all links work in the material that the PR is adding? Yes
  5. Is the PR configured to close the correct issue(s)? Yes
  6. Did the PR fully address the Approach section of the issue(s) it is closing? Yes

Please work on addressing any No items.

@Daehoon-Sung
Copy link
Copy Markdown
Contributor Author

Daehoon-Sung commented Mar 19, 2026

Hello Dr @noguchi-takahiro. Could you review this article? I tried to implement the feedback thoroughly and make the article neat. Let me know if you have any feedback. Thank you!

From the issue here, or the comment from Professor here,

1. Control with AMDC Article

Item 1 should focus on explaining the theory and approach of what we are doing with Simulink + AMDC, and not be a set of steps for the user to follow. Take a close look at the structure of the Current Sensor Calibration article and the still-in-progress Encoder article. This document should contain items like the following:

I followed the structure of the Current Sensor Calibration article, and focused on explaining the theory and approach of what we are doing with Simulink + AMDC, and not a set of steps for the user to follow.


  1. brief explanation of why it is a good idea to use simulink for creating control code (i.e., explain that it facilitates simulation, graphical control development)

This item 1 is covered in: ## Background


  1. explanation of what exactly is generated from Simulink and how that is used in the AMDC. Explaining that this produces a function that the AMDC should call at a fixed time interval. Before calling the function, the AMDC should configure the inputs to it and after calling it (presumably from sampled sensor data), the AMDC should take the outputs and route them to the correct outputs (i.e. duty ratios).

This item 2 is covered in:

  • ## Control Approach with Simulink and AMDC
  • ## Generated Code and Execution Model

  1. Document how to configure the development environment (what toolboxes to install, where to place files within the repo, what the recommended workflow looks like).

This item 3 is covered in:

  • ## Development Environment and Workflow
    • ### Recommended Workflow
    • ### Repository Organization and Integration

  1. Provide important considerations and settings in Simulink for successful development of AMDC control code -- including items that Steve identifies for us here: Improve Autogen instructions AMDC-Examples#6

This item 4 is covered in:

  • ## Important Considerations for Simulink Models

  1. An example SLX file that is all ready to download and autogen code -- all settings configured.

This item 5 is covered in:

  • ## Example Model
    • ### Simulink Model
    • ### Generated Code Structure

@Daehoon-Sung Daehoon-Sung marked this pull request as ready for review March 19, 2026 22:14
Clarified the structure of generated code and execution model for Simulink Autogen. Removed redundant information and improved readability.
Updated the documentation to include the control algorithm function in the appropriate section.
@Daehoon-Sung
Copy link
Copy Markdown
Contributor Author

Hello Dr @noguchi-takahiro. This is a friendly reminder for this PR review. Thank you.

Copy link
Copy Markdown
Contributor

@noguchi-takahiro noguchi-takahiro left a comment

Choose a reason for hiding this comment

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

Thank you @Daehoon-Sung. Nice article. The content looks good, and I have several suggestions intended to reduce redundancy. Could you consider addressing these below?

Comment on lines +92 to +99
```
apps/
└── my_app/
├── src/
├── include/
└── autogen/
└── modelName_ert_rtw/
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should discuss this folder configuration, but a promising configuration is like this:

control/
|-- my_c_code/
|    |-- usr/
|        |-- my_app/
|            |-- autogen/
|                |-- modelName.c
|                |-- modelName.h
|                |-- ...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thank you @noguchi-takahiro. I revised it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Let's discuss this during our meeting @noguchi-takahiro.

Daehoon-Sung and others added 5 commits March 23, 2026 07:06
Co-authored-by: Takahiro <114006024+noguchi-takahiro@users.noreply.github.com>
Co-authored-by: Takahiro <114006024+noguchi-takahiro@users.noreply.github.com>
Co-authored-by: Takahiro <114006024+noguchi-takahiro@users.noreply.github.com>
Co-authored-by: Takahiro <114006024+noguchi-takahiro@users.noreply.github.com>
Co-authored-by: Takahiro <114006024+noguchi-takahiro@users.noreply.github.com>
Add section on development environment and workflow requirements.
Updated directory structure for autogenerated files in AMDC repository.
Removed integration notes and consolidated file constraints for clarity.
@Daehoon-Sung
Copy link
Copy Markdown
Contributor Author

Hello @noguchi-takahiro. I have changed the folder structure here, as you told me. Additionally, I have addressed all the feedback. Thank you.

Do you think we can ask review from Professor @elsevers, or do you want to discuss the folder structure together first?

@noguchi-takahiro
Copy link
Copy Markdown
Contributor

Thank you.

Do you think we can ask review from Professor @elsevers

This sounds good, while discussing the file configuration.

@Daehoon-Sung
Copy link
Copy Markdown
Contributor Author

Hello Professor @elsevers. Regarding this comment, we created an article that includes "Control with AMDC" article on Autogen.

Could you review this article, Professor?
Thank you.

@Daehoon-Sung
Copy link
Copy Markdown
Contributor Author

Hello Professor @elsevers. This is a friendly reminder. Could you review this article when you have time?
Thank you.

@Daehoon-Sung
Copy link
Copy Markdown
Contributor Author

Hello Professor @elsevers. This is a friendly reminder. Could you review this article when you have time?
Thank you.

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