Add cascaded speed ADRC + MPC current demo (new path) - #42
Open
saeed95-lab wants to merge 7 commits into
Open
Conversation
New Control.SpeedAdrcMpcCurrent and speed_adrc_mpc_current_demo leave Control.AdrcMpcc / hybrid_adrc_mpcc_demo unchanged. CascadeMode 1 runs LADRC on rpm into Mode-3 deadbeat current; mode 0 stays FOC-like Iq in A. Co-authored-by: Cursor <cursoragent@cursor.com>
SpeedAdrcMpc lacked the required position key, which made the graph JSON invalid for the loader. Co-authored-by: Cursor <cursoragent@cursor.com>
The extra Control.Slew on Spd_Ref cost ~16 B of DTCM. Rpm slewing now lives in the controller's .dma_buffers state instead. Co-authored-by: Cursor <cursoragent@cursor.com>
HybridADRCMPC-9 showed cascade on but ~0 rpm: SpdVar shared IqVar's position so the speed setpoint was not usable, and CascadeMode was a hidden node parameter. Wire Cascade_Mode from a visible Values.Var and separate SpdVar/log positions. Co-authored-by: Cursor <cursoragent@cursor.com>
This demo is always cascaded (SpdVar in rpm). Mode switching via an extra Values.Var blew DTCM; use hybrid_adrc_mpcc_demo for Iq-in-amps. Co-authored-by: Cursor <cursoragent@cursor.com>
Previous commit left CascadeVar wired in the example JSON; remove it and hard-code cascade so DTCM is free again. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Control.SpeedAdrcMpcCurrent: outer LADRC speed (rpm) →Iq*, inner Mode-3 deadbeat/MPC current → SVPWMspeed_adrc_mpc_current_demo.json+ bring-up docControl.AdrcMpccorhybrid_adrc_mpcc_demo.jsonHow to test
feature/gen6-speed-adrc-mpc-currentAssets/Examples/speed_adrc_mpc_current_demo.jsonCascadeMode=1;SpdVar=400(rpm); enablesam_rpm,sam_iq_cmd_a, phase currents,hz_tim_isrCascadeMode=0, rampIqVarin ampsTest plan
Made with Cursor