Relationship between FPGA Sample Frequency, FPGA Clock Frequency, Simulink Solver Rate and Oversampling Factor
5 ビュー (過去 30 日間)
古いコメントを表示
Hi, I have a generator controller model in Simulink, I'm hoping to have it deployed on Speedgoat (IO334-325k) and use it to run a real generator. I have five analog input channels and one TTL discrete output channel.
My first question is, am i correct in understanding that the FPGA sample frequency is how fast the FPGA internal signals are sampled? (for example, if i have a discrete transfer function in my model, is it seeing the 'FPGA sample frequency' as the sample rate? This is important because discrete transfer functions only work properly at the correct sample rate).
Second question, I read from here (Troubleshooting Real-Time Hardware Deployment Issues in Simscape Hardware-in-the-Loop Workflow - MATLAB & Simulink - MathWorks France) that FPGA sample frequency = FPGA clock frequency/(Oversampling factor x Number of solver iterations), also from here (hdl coder oversampling factor - Google Search) that Oversampling factor = FPGA clock frequency/ Simulink solver rate. Does it mean if the number of solver iterations is 1, then FPGA sample frequency equals the simulink solver rate? I also don't understand why the simulink solver rate is part of the equation provided that my model only has analog and discrete IOs from/to the outside world, or does it mean in my case, the Oversampling factor = FPGA clock frequency/ ADC rate?
I would really appreciate it if you could help me with the questions above, Thank you very much in advance.
Yeung
0 件のコメント
回答 (1 件)
Kiran Kintali
2024 年 6 月 21 日
編集済み: Kiran Kintali
2024 年 6 月 21 日
Simscape to HDL workflow
if you are referring to Simscape HDL workflow, attached is a doc that explains the relationship a bit. I will try to find relevant doc links as well.
This page describes the same Troubleshooting Real-Time Hardware Deployment Issues in Simscape Hardware-in-the-Loop Workflow - MATLAB & Simulink (mathworks.com) and
this page is for troubleshooting validation errors Troubleshoot Validation Errors in Simscape Hardware-in-the-Loop Workflow - MATLAB & Simulink (mathworks.com)
Simulink to HDL workflow
If your model is a pure controller running on speedgoat FPGA hardware, the following page has additional notes on this topic.
If you can share your model we can give specific guidance. Thanks.
参考
カテゴリ
Help Center および File Exchange で Hardware-in-the-Loop Simulation with Simulink Real-Time についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!