How can I get the voltage and the current of an input signal in a Simulink script ?

11 vues (au cours des 30 derniers jours)
Pierre Ambiaux
Pierre Ambiaux le 16 Avr 2018
Commenté : Tao Jiang le 6 Août 2019
Hi Community,
I am tring to find a function or a command line to get voltage and current values of an input signal in a Simulink script.
For my example, I am tring to create a three-phase electrical complex block with various equations inside. Therefore, I do not know how to acquire voltage and current values from my inputs in my script.
Do you know how to do it ?
Thank you in advance.
  1 commentaire
Nicolas Schmit
Nicolas Schmit le 17 Avr 2018
Are you using Simulink or Simscape? In Simulink, you can connect the signal to a to workspace block to save the signal in MATLAB's workspace. If you are working with Simscape, use voltage and current sensor blocks to read the voltage and current respectively.

Connectez-vous pour commenter.

Réponses (1)

Pierre Ambiaux
Pierre Ambiaux le 17 Avr 2018
I am using Simscape.
I know I can use sensor blocks, therefore, my aim was to develop script with parts of current and voltage sensors.
I will use existing blocks and create a subsystem so.
Thank you for your reply.
  3 commentaires
Pierre Ambiaux
Pierre Ambiaux le 17 Avr 2018
I am actually tring this solution.
I think I found how to do it directly in a script without using a blocks' assembly but I want to be sure about it.
Thank you for your reply
Tao Jiang
Tao Jiang le 6 Août 2019
Excuse me, so have you solve this problem by script. I also meet this problem.

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by