Questions tagged [simulink-library]

Relating to block libraries of the Simulink visual programming language, which is a part of the MATLAB ecosystem, developed by MathWorks.

The Simulink visual programming language, developed by MathWorks as a part of their MATLAB suite of products, allows users to create visual model-based simulations of real-world system.

Simulink Libraries allow users to create custom, reusable block libraries, which turns user-create subsystems into reusable function blocks that can be updated in a single place, with those changes automatically propagating to all locations they are used in.

Libraries have a separate Simulink model file where a group of library blocks are stored and maintained as a group, which differentiates them from reference models and reference subsystems. Simulink also provides a Library Browser function that provides users a means of searching for and finding a particular library block among all available libraries.

24 questions
2
votes
0 answers

What is the best way to build a model of automated system with neural network in Simulink (Matlab)?

I'm tring to build a model contating neural network in Simulink. My idea is to compose a model which includes a controlled object (electrical drive), PID controller and NN block for fine-tuning of the PID controller. NN training is provided for to…
1
vote
0 answers

How fix: "All sample times must be discrete. No continuous or constant sample times are allowed" on Simulink with "Buffer" block

I'm developing a Simulink system in which I get float values at every 0.01 step time. I want to store those data into an array by using the block: "Buffer", if and only if the condition is true. I set the block: "Rate Transition" with 0.01 step…
Gi.17
  • 11
  • 1
  • 2
1
vote
0 answers

SIMULINK block accessing its parameters dynamically

I'm creating a SIMULINK Library and I have made the following component: And the function is: function [m_out, Pt_out, Tt_out] = fcn(m_in, Pt_in, Tt_in) coder.extrinsic('get_param') PR = get_param('TURBO/Compressor Stage','PR'); DT =…
GiaFil7
  • 141
  • 1
  • 3
  • 10
1
vote
1 answer

Simulink function block reusable and editable

I would like to create something as a subsystem (let's call it block B), that I could use and, when I edit it, it could update every block B in my model. I'd like to create something like a mask that I could reuse and edit.
Leandro Lima
  • 1,140
  • 3
  • 24
  • 42
0
votes
0 answers

Implement a Rate Limiter in Simulnk without using the in-built Rate Limiter block

Implement a Rate Limiter in Simulnk without using the in-built Rate Limiter block. Use the basic blocks(any block other than Rate Limiter) to design a rate Limiter. Rising Slew Rate is 3 and Falling Slew rate is -5. Design a Rate Limiter in Simulink…
0
votes
0 answers

Change the signal state only if the signal has been constant for a certain time frame

My Simulink model has a subsystem that outputs a signal that I want to use to activate another subsystem. I only want to activate the other subsystem if the output signal of the first subsystem has had the value 1 for at least 30 seconds. If the…
mab0189
  • 126
  • 12
0
votes
0 answers

Is there a simple way to use library blocks to update/edit workspace parameters in Simulink?

I have a few hundred functions in a model which all output a parameter, not all at the same time. Each time one of these functions completes its calculation, I want to pick up this parameter, and update a vector in the workspace which has to be…
user22102275
0
votes
1 answer

How to solve (Unable to resolve the name 'SIM_OUT.Data'.) in MATLAB?

I am working on simulink and I am using MATLAB 2022a & 2022b. I used in Simulink To_workspace block In order to save data in the workspace of MATLAB. As shown below I got this info when I clicked on out that is available in the workspace. As shown…
SH_IQ
  • 631
  • 5
  • 14
0
votes
1 answer

How to define a block name in my SimuLink model?

Here in the simulink model, I can't define the block name with the equation. What is it called? How can I find it in the library browser? I searched many blocks but couldn't find.
Ozkan lV
  • 3
  • 2
0
votes
0 answers

Is there a way to get the parameterised form of Transfer-Function/state-space representation of a RLC circuit in simulink?

I have a complex circuit at hand, and I want to find the state-space representation (or transfer function) of that MIMO circuit. I followed this article to generate the correct state-space representation for some specific value of resistors and…
0
votes
0 answers

Why is the voltage rising when I expect a voltage drop in my model?

Part of model matlab model pdf In the model, I have 4 blocks each existing with 3 homes and I am feeding homes with a 3-phase Voltage source, on the ways to homes there are resistors and inductors so I expect voltage drops on lines. 1. and 3.…
0
votes
0 answers

i want to create matlab code from simulink data scope (as a input for matlab function module)

how i can create a code to get a value at any time from scope data in simulink system to build algorithm for example if i have delta (angle) that change with time (curve); and i want this value at any specific time such as δn at present time, δn-1,…
0
votes
1 answer

Confusion regarding simulink?

I was looking at simulink library browser and i noticed something that i am unable to understand. I have attached a snapshot and encircled red and highlighted yellow certain items. As you can see in attached snap, the top and first blue and yellow…
LECS
  • 121
  • 12
0
votes
2 answers

When creating a Simulink library, how to flag a subsystem as a block and not a sublibrary?

I am developing a Simulink library that includes several custom subsystem blocks. When I open the library in the Simulink Library Browser, then each subsystem is displayed as a sublibrary. As a concrete example, see the screenshot below. The Hybrid…
Paul Wintz
  • 2,542
  • 1
  • 19
  • 33
0
votes
1 answer

How to send double values over TCP/IP in Simulink Support Package for Raspberry Pi

Is it possible to send double values using the TCP/IP client block in the Simulink Support Package for Raspberry Pi? I have been stuck for a while trying to get this to work: but using printf("%f %f %f", *((double *)tcp_buffer)), *((double…
Tommy Wolfheart
  • 440
  • 4
  • 16
1
2