Please take a minute to review and accept our Terms of Use.
Welcome to the PLECS User Forum, where you can ask questions and receive answers from other members of the community.

Many technical questions regarding PLECS are answered on the Technical Solutions page of our website. Tutorial videos, specific application examples, and pre-recorded webinars are available on our YouTube page. Please follow us on LinkedIn for the latest Plexim news.

Problem with using controlled current source

0 votes
I have a problem using a controlled current source. I would like to measure the temperature of a motor part using heat loss and power. I have seen that this way is good because at certain points it will limit the temperature rise and start dropping to zero. But I don't know how to initialize these values for the current source, because no matter typing this in the initial values or other ways I still get 0 as a result. Is there a way to port initialize a value that will adjust itself? How? Thank you in advance for your answer
asked Apr 5 by Linterd (16 points)

1 Answer

+1 vote
Best answer
The Inport component is typically used to define an input to a subsystem or to a PLECS Blockset model.  Since this is at your top-level schematic, and not within a subsystem, you should not use an Inport, but rather a Constant or mathematical function that defines how the current varies as a function of time.

It's also worth noting that you're using the PLECS electrical domain to simulate a thermal circuit.  Please be aware there is a thermal domain where you can construct thermal circuits using Thermal Resistors, Thermal Capacitors, and Controlled Heat Flow components.
answered Apr 5 by Bryan Lieblick (691 points)
selected Apr 5 by Linterd
so there is no way to do this without subsystem? i heard from someone that I can just somehow put values to controlled current source and this will work. in such a situation, can you give me a hint what I could put in the subsystem to make it work in this situation? Or how can I measure the temperature of the motor in plecs using only the thermal library? I would be very grateful, as I am struggling with this problem
Use the "Constant" component to set the value.  You can enter a number directly, or use the value you defined in the Model initialization commands.

Attached is an example, along with the same circuit built using components from the thermal domain.
Thank you, it helped me a lot.
if you could still give me a hint if I'm thinking right. For the motor scheme, instead of constant values, I wanted to give the currents generated in a squirrel cage induction motor to measure the temperature during motor reversal. In theory, I would like to obtain a rising temperature despite the reversal of the motor at a certain frequency. After some time this temperature should stabilize thanks to the reversal. Have I done it correctly? I was trying to figure something for 2 days and i don't have an idea. I think that the problem is with current abs sum, but i can't substitute it with anything. Could you give me a hint?
It is up to you to create a valid model.  It also isn't clear where you are stuck.

If you are attempting to create a "dynamic" phase reversal event on one machine (rather than having two machines) you can use three connected Controlled Voltage Sources.  Then you would use regular components from the PLECS library to define your voltage signal inputs (e.g. Sine Wave Generator or Clock with Trigonometric Functions).