DIFFICULTY LOCATING SIMSCAPE BLOCK

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:
  1. How do I describe the electric socket at home in simscape. Which block or combination of blocks describes it.
  2. 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?
  3. 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.

回答(2 个)

Walter Roberson
Walter Roberson 2023-8-28
编辑:Walter Roberson 2023-8-28
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
Nathan Hardenberg
Nathan Hardenberg 2023-8-28
编辑:Nathan Hardenberg 2023-8-31
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 个评论

Splendid!
Thank youf for No.1 & 2.
I will keep looking for one. Is there a documentation I can read through.
Thanks for this again.
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
woahhhh!!!
Let me show you my own model!
Please, I am open to draw from your wealth of knowledge, all reference to you will be duly attached.
One more thing, I like how you share your file. Will like to lean it
what do we think? Mine is in Kelvin.
Let me explain it a bit.
After 3000W is generated, I used 14.2 ohms instead of 19.2ohms for a voltage of 240 volts, because the power output is Instantaneous. I believe if it is RMS, 19.2ohms will be just fine.
Okay, after 3000 watts hits the thermal resistor, it converts it to thermal energy of high temperature. This is then conducted( that's why we have the 'Conductive heat Transfer' block) through a metal plate, unto a Mass. The 'Thermal Mass block' shows this. This mass begins to steadily heat up (now, I do not know if it is logrithmically or linearly, but lets assume steady thermal conditions). Of course, this heating occurs while some heat is lost by conduction and convection. That's why we have the other two blocks. I also included a 'thermal reference block'. Initially, I had a temperature source block, but I think the thermal reference is a more preferred block at that node. (I will try replacing it with a temperature source block shortly after this post) Do you undertand, does it make any sense? Please tell me where you think anything should not be.
I just tried opening the scope graph and it really may not make any sense to you, let me explain the results.
  • The simulation runs for 3 mins, the aim is to take the mass up about 80degrees (20C to 100C) in 3 mins. When you look at the display (please not that all temperatures are displayed in Kelvin (K)) you see that the body exceeds by a margin 373.15K in 180 sec.
I like hows yours increasing logrithmically even though it increases rapidly and flattens out quite quickly (I understand it has to do with the values inputed), but is beacuse of the inductor? and why is your power negative? Is it because of the values again.
I am really grateful for all the help so far!
Come to think of it, our simulation is a bit limited because we ignore pressure changes. Again, we can assume constant pressure.
I googled and it said Yes to changing linearly, as long as the heat source is constant.
I also ran the simulation with the temperature source block, and I think that the thermal reference block is wayyy better at that point. The outcome as I try to summarize is this:
  • For the temperature block, the temperature change is accounted for quite alright, but it doesn't change with reference to Kelvin... so the end of the simulation shows 89.48 instead of 39x.xx because it lacks a thermal reference!
I am waiting your comments, but I think that I am happy so far!!
I have gotten a lot of insights from this simulation already, I think I want to finally add a regulator... I think a thermostat. This way, the model stops running at a particular temperature!
  • 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.
Thanks @Nathan Hardenberg, I am grateful for your help so far.
Thanks for the input on power. I also think the resistors are in parallel.
Thanks for the last point too. They ought to be in parallel.
Lastly, I actually did not ask for your file. I said, "I like how you share your file", I mean, I am sharing screenshots and pdf's. Yours is tidier, and I wanted to learn how.
Forgive all misunderstandings too.
Again, thanks.
Praise.
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
Alright. Thanks once more.

请先登录,再进行评论。

类别

产品

版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by