Constant value issue nrDLSCH system block in Simulink.

1 view (last 30 days)
Hi,
I create a system block with The nrDLSCH System object() without HARQ. But for layer part i always get constant value error and i cant handle it.
Can u please share your idea about how can i cope with this issue? Even I tired all options in the constant block properties, it is not working.
Merci

Accepted Answer

Harsh
Harsh on 17 May 2023
Hi Veli,
As per my understanding, you want to create a Simulink block for the “nrDLSCH” system object.
In the following points, I am sharing a method to achieve your goal:
  • To implement a Simulink block using MATLAB’s inbuilt system object, it is better using the inbuilt system object in your custom created class file. It provides with more flexibility to model the input and output ports.
  • As suggested in above point, I have created a prototype class file which defines four constant inputs as the class properties. It allows UI based editing in the input value by defining the inputs as block parameters (as shown in the figure below). Feel free to utilize or modify the attached “nrDLSCHcustom2.m” for your work.
  • Further, it is actually a better approach to define the constant valued input ports as block parameters because these values are not being changed during the simulation.
  • I have attached “nrDLSCH_block.slx” model which contains the Simulink block implementation of the “nrDLSCH” system object. It execute successfully without any error.
  • To execute the attached model file, follow the below steps:
  1. Ensure that both model file and class file are in same folder while the model execution.
  2. Before running the simulation, go to Modelling tab > Model Settings > Solver. Set "Type" under "Solver selection" as "Fixed-step".
  3. Run the simulation.
I hope this helps.

More Answers (0)

Categories

Find more on Programmatic Model Editing in Help Center and File Exchange

Products


Release

R2023a

Community Treasure Hunt

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

Start Hunting!