Using fixed FPGA capacity for a variable number of Simulink signal channels

21 vues (au cours des 30 derniers jours)
Ruairidh
Ruairidh le 12 Déc 2024 à 10:40
Commenté : Ruairidh le 17 Déc 2024 à 10:08
In Simulink, I am modelling a MIMO system. One section involves a large set of impulse responses : P inputs, Q outputs, and all possible (P -> Q pair) impulse responses are known. Normally, I could simply implement P x Q FIR blocks, combine their outputs appropriately and everything would be fine.
However, there are two complications :
  1. I need to run the model, then modify P and/or Q, then run the model again. Multiple times, changing P and/or Q each time. And the process of successively running multiple experiments needs to be automated.
  2. The model will ultimately run on an outboard FPGA-based device (Speedgoat / dSpace / etc) with limited processing capacity. It is therefore important to avoid unnecessary calculations. Otherwise I could simply implement the maximum number of channels, and fill some of them with zeros if they are not being used during a particular experiment.
I do not know how to deal with both of these problems at once, and have not managed to find any clues online.
A similar problem occurs elsewhere in the same model, with vector-array addition blocks in which the numbers of inputs and outputs need to be variable.
Thank you for any advice !

Réponses (2)

Sahas
Sahas le 16 Déc 2024 à 7:45
As per my understanding, you want to model a MIMO system in Simulink with dynamically changing inputs P and Q automate the process of conducting multiple simulations. Ultimately, this model will run on an FPGA-device with limited processing capacity.
The steps and MathWorks documentation links provided below will help you get started with the task at hand:
  • I would suggest to parameterize P and Q and define them as variables to allow dynamic adjustments in successive experiments.
  • Use "MATLAB Function blocks" for changing the values of P and Q in between experiments as required. Alternatively, use PreLoadFcn or InitFcn model callbacks for the same.
  • For automating the experiments, develop a MATLAB script for automatically setting model parameters, running simulations and handling outputs. Use MATLAB's sim and set_param functions to control Simulink model from MATLAB editor.
  • For optimizing the code, use conditional execution subsystems such as "Enabled Subsystems", "Switch Blocks" to route signals and minimize unnecessary calculations.
  • To deploy the model on an FPGA device, use HDL Coder Workflow Advisor.
Hope this is beneficial!
  1 commentaire
Ruairidh
Ruairidh le 16 Déc 2024 à 10:18
Good morning @Sahas, and thank you kindly for the reading list. I will explore, test, and report back...
Thanks !

Connectez-vous pour commenter.


Kiran Kintali
Kiran Kintali le 16 Déc 2024 à 13:52
Have you considered tunable parameter usage in HDL Coder?
Please do not hesitate to reach to tech support for the limited processing capablity question.
  1 commentaire
Ruairidh
Ruairidh le 17 Déc 2024 à 10:08
Thank you kindly @Kiran Kintali. I was unaware of this and will look into it.
Go well !

Connectez-vous pour commenter.

Catégories

En savoir plus sur FPGA, ASIC, and SoC Development dans Help Center et File Exchange

Produits


Version

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by