How microchip-pic-avr-examples/mbd-dp-matlab-ak512mps-dpsk4-buck-cgen works
This repository is a model-based design for voltage-mode control of a dsPIC33A buck converter. Its main workflow derives 3P3Z compensator coefficients, verifies stability in Simulink models, then configures and builds a target model for deployment to the DPSK4 board. The deployed controller samples output feedback, computes duty cycle, and drives PWM; External Mode supports monitoring and tuning over XCP-on-UART. The graph reflects README-documented relationships only; no source excerpts were provided, so internal model wiring is not inferred.
Main entry points: derive_3p3z_pzc.m PZC derivation · derive_3p3z_grid.m Grid search · coefficients_grid.txt Grid coefficients · init.m Workspace setup
Components 15
Compensator design
- PZC derivation
design/comp/derive_3p3z_pzc.m - Grid search
design/comp/derive_3p3z_grid.m - PZC coefficients
design/comp/coefficients_pzc.txt - Grid coefficients
design/comp/coefficients_grid.txt
Stability verification
- PZC stability models
design/sim/stability/models/pzc - Grid stability models
design/sim/stability/models/grid - PWM timing model
design/sim/stability/models/grid/dpsk4_z_simscape_grid_250_pwm_time.slx
Code generation
- Workspace setup
design/cg/init.m - Target Simulink model
design/cg/DPSK4_Buck_VMC_all_cg.slx
Hardware operation
- DPSK4 board
- Buck controller
design/cg/DPSK4_Buck_VMC_all_cg.slx - External Mode
design/cg/DPSK4_Buck_VMC_all_cg.slx
Other components
- Engineer
- Simulink tooling
- Tuning user
Connections 14
- Engineer → PZC derivation: derives coefficients
README.md - Engineer → Grid search: searches design
README.md - PZC derivation → PZC coefficients: produces coefficients
README.md - Grid search → Grid coefficients: produces coefficients
README.md - PZC stability models → Simulink tooling: verifies stability
README.md - Grid stability models → Simulink tooling: verifies stability
README.md - PWM timing model → Simulink tooling: checks PWM effects
README.md - Grid coefficients → Workspace setup: selected for deployment
README.md - Workspace setup → Target Simulink model: sets parameters before build
README.md - Target Simulink model → Simulink tooling: builds and programs
README.md - Simulink tooling → DPSK4 board: deploys firmware
README.md - DPSK4 board → Buck controller: runs controller
README.md - Tuning user → External Mode: monitors and tunes
README.md - External Mode → DPSK4 board: connects via XCP-UART
README.md