PMSM is programed in FPGA using HDL coder.
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Cau Tran
am 10 Jun. 2022
Kommentiert: Cau Tran
am 1 Aug. 2022
Hi everyone,
I am intend to use HDL coder to build PMSM control application. I already saw Matlab's example ( Deploy Motor Control Algorithms to FPGA - Hardware Prototyping) for development this application. But, I have some confuse for this example 's architecturer. I have a question for that one:
- I don't see any periods for current loop and speed loop. In MCU platform, I usually use 10 kHz for control current loop and 1 kHz for speed loop. But in your example, I don't see anything to synch among subsystems ( speed loop, current loop, pwm, adc)
0 Kommentare
Akzeptierte Antwort
Kiran Kintali
am 15 Jun. 2022
In the motor control demo project the current control algorithm and speed control runs on FPGA and processor respectively and they are modelled using model reference blocks (also known as model blocks).
The current control algorithm is configured to run at 25kHz (40e-6) and speed control algorithm is configured with 1kHz (1e-3), the sampling time for these referenced models is handled using sample time of inport from variable in data dictionary.
In the MODELING tab “ModelExplorer/External Data/focZynqData/Design Data/sampleTime” you can all the sample times configurations in the model
Additionally you can refer to
“'focZynqHdl/FOC_Velocity_Encoder/FOC_Current_Control/FOC_Current_Control/Phase_Current” inport sample time setting in “Execution’ tab.
ADC and PWM modules are available as IP cores in support packages/reference design of the demo, they are designed to be synchronized, and the interfaces to these modules are available in HDL Workflow advisor
Weitere Antworten (1)
Kiran Kintali
am 10 Jun. 2022
I think you are referring to this example. https://www.mathworks.com/videos/deploy-motor-control-algorithms-to-fpga-hardware-prototyping-1628756280693.html
Please note that Simulink handles the synchronization for you among the various modules in the model.
I would recommend Simulink onramp and https://www.mathworks.com/matlabcentral/fileexchange/58941-hdl-coder-evaluation-reference-guide for further guidance on this topic.
Please share sample models you have in mind and challenges if any w.r.to HDL code generation or deployment onto FPGA/HIL platform.
Siehe auch
Kategorien
Mehr zu Simscape Hardware-in-the-Loop Workflow finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!