Pulse from matlab code to Simulink

2 次查看(过去 30 天)
I have written a code in matlab
In that if a particular condition gets satisfied then a pulse should be generated that should turn Off switch which is present in Simulink.
This is the switch i have used- Three Phase Breaker
How can i achieve that
Thanks in advance

回答(1 个)

Ayush Modi
Ayush Modi 2024-3-5
Hi,
I understand you want to integrate MATLAB code with a "Simulink" model for controlling a Three-Phase Breaker based on a specific condition. You can use the "Simulink" model's ability to receive external signals for controlling blocks such as switches or breakers. You can use a "From Workspace" block or a "MATLAB Function" block to generate the control signal based on your MATLAB code's logic. Here's a step-by-step guide on how you can achieve this:
Using From Workspace Block
  1. In your "Simulink" model, drag and drop a "From Workspace" block (you can find it under the Sources library).
  2. Double-click the "From Workspace" block to open its parameters.
  3. Set the Data parameter to the name of the variable containing your time series data
  4. Connect the output of the "From Workspace" block to the control input of your Three-Phase Breaker.
  5. Ensure that the Three-Phase Breaker block is configured to accept external control signals for switching. You might need to set the block parameters to enable external control if it's not already configured that way.
Using MATLAB Function block
  1. Drag and drop a "MATLAB Function" block into your "Simulink" model.
  2. Double-click the block to open the editor, and implement your condition checking and signal generation logic inside the block.
  3. Connect the output of the "MATLAB Function" block to the control input of the Three-Phase Breaker.
  1 个评论
A Lumbini
A Lumbini 2024-3-5
@Ayush Modi But in my code i have simulated the .slx file first inorder to log the fault current data in time series format
Then i applied algorithm to current data and from the results i need to give a condition to generate trigger pulse to open breaker in the same simulink model
So it is giving error

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Sources 的更多信息

产品


版本

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by