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

Add control message expiration time #37

Open
taesungh opened this issue May 27, 2024 · 2 comments · May be fixed by #41
Open

Add control message expiration time #37

taesungh opened this issue May 27, 2024 · 2 comments · May be fixed by #41
Assignees

Comments

@taesungh
Copy link
Member

Following from #24/#36, the inverter will output a single period of the PDM waveform for each control message. To have a consistent flow of power, this would require the pod's FSM to be synchronized with the AC frequency, but this is not known by the pod. To avoid overfilling a buffer of messages, we can set an expiration time on the control message and assume the same parameters (velocity and throttle) for subsequent periods until the previous message has expired at which point the inverter must wait for another message.

  • Explore options to make the serial read non-blocking (async or threads)
  • Record the time when a control message is received
  • Refactor the read_control_message function to provide the previous known command if it has not expired
  • Important: if a new control message is being sent, it should be used immediately
@taesungh
Copy link
Member Author

Update: the Pico is running bare metal (no OS), so the arm-none-eabi compiler doesn't support threads. Sam instead suggested we look into the Pico's multicore capabilities.

@taesungh
Copy link
Member Author

Functionality to sustain parameters and adjust on the fly added in #39, looking into expiration time next.

@samderanova samderanova linked a pull request May 31, 2024 that will close this issue
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 a pull request may close this issue.

2 participants