DIFFICULTY LOCATING SIMSCAPE BLOCK
Show older comments
I have barely been using SImscape and Simulink for about 24 hrs (I do not mean for one day, here, I am quantifying my total experience), and I am trying out a self-undertaken/self paced project to master the skill, I am trying to model and improve appliances. I am also studying mechanical engineering and I need help wih the following:
- How do I describe the electric socket at home in simscape. Which block or combination of blocks describes it.
- I have done some reading and found out that the voltage at home is supplied form a voltage source and is an AC current, how do I make it produce a certain specified amount of power. Say I want to prodice 3000W, and the voltage supplied is 240V, then I am simply introducing 12.5A as current, how do I introduce this, please?
- Lastly, how do I make a heating element/plate block. I have checked and it doesn't exist (my matlab version is 2022a)... If a single simspace block does not exist, which electric block is mutlidomain such that I can finally link electricity and thermal. If there is no such multidomain block, then do I have to model it on simulink.
I will be most glad if I am replied, will honestly be grateful. I hope I did not tresspass the Do's boundary, if I did it was very unintentional... pointing it out will also be most welcome. Cheers.
Answers (2)
Walter Roberson
on 28 Aug 2023
Edited: Walter Roberson
on 28 Aug 2023
1 vote
Are you using pure Simulink, or are you using Simscape Power Systems?
https://www.mathworks.com/help/sps/powersys/ref/acvoltagesource.html has a number of different control parameters.
https://www.mathworks.com/help/simscape/ref/acvoltagesource.html has less control. It is more like a "pure voltage" without current.
I think you might be looking for Conductive Heat Transfer ? https://www.mathworks.com/help/simscape/thermal-elements.html
1 Comment
Praise Nwachukwu
on 28 Aug 2023
Nathan Hardenberg
on 28 Aug 2023
Edited: Nathan Hardenberg
on 31 Aug 2023
1 vote
As a help to find the blocks easier, you can launch the standalone library browser (if you didn't do that already). For that click on the small library browser logo (see image). I think it is easier to find desired blocks in a library.

(1) See Answer by @Walter Roberson. I want to add that you can also use the normal "Voltage Source". In the options you can add DC and AC. But I would recommend explicitly using an "AC Voltage Source". Also note that you set amplitude values in Simulink. The voltages normally mentioned are RMS (Root Mean Square) values and are dependent on country (list of voltages in countries).
(2) You can't really set your power supply (voltage source) to a specified amount of power. You set the voltage and depending on the resistance current flows (very basic explanation). There are "Current Sources", but they change the voltage, to get a desired current.
If you want to model 3000W choose a resistance/resistor according to 
(3) I can't help much here. But there are multidomain blocks. The best for a heater would probably be the "Thermal Resistor". But this just changes the resistance according to the given temperature. I̶t̶ ̶d̶o̶e̶s̶ ̶n̶o̶t̶ ̶p̶r̶o̶d̶u̶c̶e̶ ̶h̶e̶a̶t̶ (EDIT: It does produce heat). What you maybe can do is using a "Current Sensor", then doing your own calculations and give your results to a "Controlled Temperature Source". This gives you a feedback-loop. Maybe there is a better way, but I'm not really familiar with the temperature blocks
11 Comments
Praise Nwachukwu
on 28 Aug 2023
Praise Nwachukwu
on 28 Aug 2023
Nathan Hardenberg
on 29 Aug 2023
Edited: Nathan Hardenberg
on 29 Aug 2023
I don't know one big documentation. There is one for each block, and I reccomend checking each out. Note that you can also change the "Category" on the left hand side, to get more thermal blocks.
If you still have trouble figuring out the blocks, I would recommend checking out the examples given in the according documentations. For example
Your model looks quite good and would most likely be enough for a first try. But since you also want to do thermal stuff, you can try adding to it. Note that the model can only be realistic in the end if you also choose realistic values. I would also try to model smaller temperature models, to try out some stuff. If you know how the blocks work you can add them to the big one. This makes debugging easier.
Here are some thoughts on what to add:
One thing would be to add an inductor to the loop. Most heating elements have an inductance.
For thermals I tried to model something you probably want. The "Controlled Heat Flow Rate Source" lets you define the heat that is coming from your heating element by power (Watt). The "Conductive Heat Transfer" moves the heat to the room again. Probably more like a heated seat, but a good approximation. Depending on use-case yu can get much more fancy.

This results in a temperature diffenence over time. 76°C hotter is quite hot (all depending on choosen values) 😄
If you want a room to get hot this is not quite the way to do it. For this I would check the example I linked above
Praise Nwachukwu
on 30 Aug 2023
Praise Nwachukwu
on 30 Aug 2023
Edited: Praise Nwachukwu
on 30 Aug 2023
Praise Nwachukwu
on 30 Aug 2023
Edited: Praise Nwachukwu
on 30 Aug 2023
Praise Nwachukwu
on 30 Aug 2023
Nathan Hardenberg
on 31 Aug 2023
- I will unfortunately not share my file, since this was just a quick and dirty model
- Also I learned that the "Thermal Resistor" does produce heat, which makes my model not really realistic
- I don't really get your mention of "After 3000W is generated". Due to the AC-power the power fluctuates, between 0 and somewhere over 3000W. Only the mean is 3000W. To check this Log the power signal, or connect a scope, instead of a display
- The reason why my power is "negative" is numerical precision. It is nearly zero
- "Thermal reference", or "Temperature source" should do the same. You can even see the thermal reference in the icon of the source. The source is probably just more convenient. Note that the reference is always at abolute zero. That would mean you cool your resistance with absolute zero (Again: I don't know the blocks that well)
- You have two resistors in your model now in parallel. I would recommend only using one (as long as you only have one heater)
- The logarothmic temperature does not come from the inductor. This is the way I would suspect any such system to work. When the steady state gets reached depends on your heat capacity/thermal mass. A linear increase can mean, that the system is just at the beginning.
- You have conductive and convective heat transfer in series. Does this make sense for your model? I would guess that it is either conductive or convective. Or both in parallel (But this is again dependent on your configuration)
Sorry to say, that this thread is now over from my part. What I can do now is just the same things you would do, and I would need a lot more knowlege about the usecase. But if you come up to any bigger roadblocks feel free to ask a new question, and maybe someone can help you.
Praise Nwachukwu
on 31 Aug 2023
Nathan Hardenberg
on 31 Aug 2023
No worries, glad I could help :)
The model and graph I posted are also just screenshots (just cropped in to only see the simulink components). On Windows you can do this wih the shortcut Win + Shift + S and then save it as a file. If you then use the Image icon to insert it in the forum (like you did in your second comment) you can scale it down to fit into frame. This is done with the blue border around the image/screenshot
Praise Nwachukwu
on 4 Sep 2023
Categories
Find more on Choose and Parameterize Blocks in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!