PWM voltage for specific application

Can we connect "simulink to ps converter" block terminal to any pwm voltage block and which one?

 Respuesta aceptada

Ameer Hamza
Ameer Hamza el 9 de Abr. de 2020

1 voto

Yes, you should be able to interface PWM blocks from Simulink and simscape using PS-Simulink and Simulink-PS converters. I know these connections can get a bit confusing sometimes. A while ago, I wrote a brief explanation on this issue on an answer to another question: https://www.mathworks.com/matlabcentral/answers/509668-how-to-check-the-outputs-of-the-incremental-shaft-encoder-in-simulink#comment_809244
I am pasting the same explanation here.
These are few rules which will help you pick the correct blocks.
  1. Simscape signals are different then the normal simulink signals. We need to use converters (PS-Simulink and Simulink-PS blocks) to connect them.
  2. In simscape, there are several libraries. Blocks in each library have special conservative ports and physical signal port. For example, look at this block from simscape electrical . It has two voltage conservative port (marked with small dots), and one physical signal port marked with triangle. The voltage conservative port can only be connected to other blocks in same library (in this case simscape electrical, they cannot be connected with simscape mechanical or even simscape power electronics).
  3. Even for special conservative ports, only output and input can be connected. Input - Input or output - output will not connect.
  4. Since conservative ports are confined within their own library. Only physical signal ports can be connected with the converters mentioned in point 1.
  5. You can also use physical signal ports (marked with triangle) to connect blocks from different simscape libraries. For example, rotational motion sensor for simscape mechanical, and controlled voltage source from simscape electrical can be connected through this. Both these blocks have physical ports. These are use to transfer signals from one library to the other.
  6. You can look at the documentation of the block. Mostly it mentions the type of each port and how it can be connected.

11 comentarios

Pradeepta Sahu
Pradeepta Sahu el 10 de Abr. de 2020
I understand this. But I do face a problem while connecting few blocks of other simscape libraries with PS port of Simulink-PS block.
For an example, If I would like to connect Simulink-PS block with PWM Generator (DC-DC) block, it is not connecting. Can you check it and let me clarify about this to what can be done?
Also, one more doubt how I would connect with PWM generator to Switch. This is to send the PWM signal to the switch. For reference, I have attached the slx file.
Hope you got the clear picture about the problem statements.
Ameer Hamza
Ameer Hamza el 10 de Abr. de 2020
Pradeepta, the PWM Generator block in the attached file already accept the Simulink signal ports at the input, why do you want to connect it to Simulink-PS? You can connect the Simulink-PS block at its output if you want to connect it with other simscape blocks. Most of the blocks in the Simscape power electronics library already provide a direct interface with Simulink, and therefore, do not any extra blocks.
Pradeepta Sahu
Pradeepta Sahu el 10 de Abr. de 2020
Editada: Pradeepta Sahu el 10 de Abr. de 2020
Got it. But one more problem with PWM generator block to switch block. Can you check it?
Ameer Hamza
Ameer Hamza el 10 de Abr. de 2020
Are you referring to this switch block?
Pradeepta Sahu
Pradeepta Sahu el 10 de Abr. de 2020
Yes. The same switch block.
Ameer Hamza
Ameer Hamza el 10 de Abr. de 2020
It is connected like shown in the image. Is there still some issue?
Pradeepta Sahu
Pradeepta Sahu el 10 de Abr. de 2020
I tried with the above image. The arrows what you have mentioned couldn't connect. What is the issue? Is it with same version 2017a version or how could I get this?
Ameer Hamza
Ameer Hamza el 10 de Abr. de 2020
Can you point out which arrow? The black and white arrow connected after the port name P is Simulink to the PS converter block. In old MATLAB releases, it is shown as a square block. In later releases, it was converted to this arrow symbol. However, both works in a similar manner.
Pradeepta Sahu
Pradeepta Sahu el 11 de Abr. de 2020
Yes I got this. I was facing the problem because of old release. Thank you for your suppport.
Ameer Hamza
Ameer Hamza el 11 de Abr. de 2020
Glad to be of help.
Pradeepta Sahu
Pradeepta Sahu el 11 de Abr. de 2020
Thanks again.

Iniciar sesión para comentar.

Más respuestas (0)

Preguntada:

el 9 de Abr. de 2020

Comentada:

el 11 de Abr. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by