how to model an electric heating element

14 views (last 30 days)
jamie8286
jamie8286 on 29 Jan 2020
Commented: jamie8286 on 16 Mar 2020
Hi all.
I am trying to model an electric heating element for a university project I'm completing in matlab.
The heating element is 15W, 24V DC and has the following properties, R=23.1, L=32mH, C=30pF. I have derived the transfer function from these values as 1.04e+12 /(s^2+721.87s+1.04e+12) from the standard TF equation. I have simulated this in matlab and it shows an underdamped response as zeta = 3.53e-4. (is less then 1)
I have also wired the physical heating element up to my PLC and have recorded the actual open loop output response (bump test) via feedback from a thermocouple set at maximum 70 degree Celsius, please see attached image. Note the PID block was added to experiment with the output settings.
The ultimate aim of the project is to measure the performance of the physical system against the matlab simulation. However I can't seem to get the simulated response to look anything like actual system response.
I have looked on some of the help content within and have seen some reference to heat transfer calculations or similar but I'm unsure how I would implement that within my model.
Really liking the tool though! Any advice/ assistance would be much appreciated.
Thanks Jamie
  2 Comments
jamie8286
jamie8286 on 16 Mar 2020
Hi there
It is the "system transfer function" (G(s)) and was derived from the inductance, capacitance & resistance (LCR) circuit values measured directly from the the heating element. So it is the open loop TF as shown.
To manually test the system I have now obtained controller values for Kp, Ki, Kd derived from the open loop bump test using the curved method. These have been added to the parrallel form PID formula to get an overall transfer function including the pid controller values. Please see images below. (Values for K are Kp=57.6, Ki=96, Kd=24. Bump test also shown below)
I am however still having issues with the difference in simulation between matab and simulink. The images below show modelling directly from matlab. If I input the values K (PID) values into a PID controller in simulink I am still getting much different results. The system shows as still extremely oscillatory using the obtained K values and can be settled down using much higher values for K.
Thanks Jamie
System without controller
System with controller
Bump test

Sign in to comment.

Answers (1)

jamie8286
jamie8286 on 7 Feb 2020
To follow on from this question I have been doing some experimenting with the above transfer function.
When I model it directly in Matlab using the command I get the system response as shown. This matches up with my calculations for settling time, rise time and peak time.
Screenshot 2020-02-06 at 21.50.22.png
However, when I model the same transfer function in Simulink, I get a highly oscillatory response using the "simple" basic plotting program downloaded from the Matlab website. The simulation can be seen below.
Simple_slx.png
I am wondering it there a fundamental difference when simulating with matlab directly or simulink? The matlab simulation matches with my calculations however, I could see that simulink could also be showing the correct information because my system is highly oscillatory. Zeta= 3.58e-4 and the overshoot is around 99.8%.
  2 Comments
Alex
Alex on 16 Mar 2020
The reason your MATLAB and Simulink model shows disappearances is that they use different equations solvers.
Although Simulink may be more advanced in this regard and its equations solvers need to sometimes be modified based on some results that you may get.
Simulink for example sets the default solver to a variable step auto solver, that dose not do a good job showcasing oscillations on plots, to over come this change the equation solver settings.
-Go to the gear icon in the toolbar
-Solver
-Solver selection - type fixed
-Fixed step size – 0.001 (can try some other small sizes)
-Solver – any one would work really as long as its not the autosolver
Hope this helps
Alex
jamie8286
jamie8286 on 16 Mar 2020
Thank you for your reply Alex.
I have had a quick go at adjusting the solver settings but no luck as yet. I will experiment more in the week and see if I can resolve the issue.
Thanks Jamie

Sign in to comment.

Categories

Find more on Simulink 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!