PID Temperature Control in MATLAB

Поделиться
HTML-код
  • Опубликовано: 3 дек 2024

Комментарии • 77

  • @TOBIOO
    @TOBIOO 3 года назад +3

    Hi sir, every time i try to run the simulation i get the error "Error in 'arduino_lab1/Temperature Control Lab/Arduino/Arduino' while evaluating expression." if you could help on this it would be much appriciated sir.

  • @MarkMiruni
    @MarkMiruni 2 месяца назад +2

    Hello? I am currently working on my final year project on sea water desalination using a parabolic trough collector as a preheater and electrical energy via an electric heating element to achieve boiling point.
    I am looking for advice on how to create a temperature control system for my electric boiler( with heating element)

    • @apm
      @apm  2 месяца назад

      The temperature control lab could be a good practice for implementing temperature control: apmonitor.com/pdc/index.php/Main/ArduinoTemperatureControl

  • @snotboogie2246
    @snotboogie2246 2 года назад +1

    I want to use a set point of 92degreeC in non-linear model but it seems like temp cannot exceed 70dC threshhold. What do I change in the code to remove this limitation.

    • @apm
      @apm  2 года назад

      It is not recommended to remove the safety features. The safety features are that the PWM is set to 200 out of 255. Also, the power supply is 5V that prevents the heater from getting too hot. We've used a 9V power supply for the heaters but then the temperature gets too high. The plastic components start to degrade at about 150 degC.

  • @yashasbharadwaj5336
    @yashasbharadwaj5336 3 года назад +1

    so basically this is half done? we have to assemble the hardware part on our own and connect it to Matlab ?

    • @apm
      @apm  3 года назад

      The TCLab is available for purchase from Amazon or you can build it: apmonitor.com/heat.htm

  • @csmanien
    @csmanien Год назад +1

    How to control the rate of heating?

    • @apm
      @apm  Год назад

      To explicitly control the rate of heating, use MPC: apmonitor.com/do/index.php/Main/AdvancedTemperatureControl

  • @astronaut205
    @astronaut205 2 года назад +1

    Hi thank you for this tutorial - are the Simulink/MATLAB files still existing? because I can only find the python files

    • @apm
      @apm  2 года назад

      Yes, the zipped archive has Matlab and Simulink files. See the Download button on apmonitor.com/pdc/index.php/Main/ArduinoTemperatureControl

    • @astronaut205
      @astronaut205 2 года назад +1

      @@apm the TCLab zip file? It is only containing .py files unfortunately. Thank you for you answer 🙂

    • @apm
      @apm  2 года назад +1

      @@astronaut205 Thanks for catching that. The Simulink and MATLAB files are restored.

  • @ellismcmillan1830
    @ellismcmillan1830 4 года назад +1

    i need a pid controller to control a water valve to control the temp inside of a water tank by increasing or decreasing the water flow using a temperature probe of input. a stepping motor to increase or decrease the water flow . this tank is not connected to a hot water tank it is a separate tank that needs a water vale to increase or decrease temp.

    • @apm
      @apm  4 года назад

      That sounds like a great application. There is additional information on process control (such as level or temperature) here: apmonitor.com/pdc

  • @HAN_Dynamic
    @HAN_Dynamic 2 года назад +2

    real time ?

    • @apm
      @apm  2 года назад +1

      Yes, it operates in real-time with the physical hardware. See apmonitor.com/pdc/index.php/Main/ArduinoTemperatureControl for additional details.

  • @michaelfendi3402
    @michaelfendi3402 4 года назад +2

    Hi
    Can I know why did u set the proportional = 10
    And the integral= 10/50 ?

    • @apm
      @apm  4 года назад

      They are IMC tuning correlations when dead time is zero. You use Kc=1/Kp and KI=Kc/tauP. More information is here: apmonitor.com/pdc/index.php/Main/ProportionalIntegralControl

  • @emmanuelbanda9825
    @emmanuelbanda9825 3 года назад +1

    How can I read data from the Arduino,

    • @apm
      @apm  3 года назад

      Here is an example with source code: apmonitor.com/pdc/index.php/Main/ArduinoSetup

  • @giannisd.8824
    @giannisd.8824 4 года назад +1

    Is it possible to PID control the trajectory of a differential drive mobile robot operating with an Arduino Microcontroller using Matlab simulink? The mobile robot is comprised of motors connected to pwm pins and there's a camera calculating the error between the desired and the real trajectory .

    • @apm
      @apm  4 года назад +1

      As long as you give the trajectory as a setpoint path then it should be able to do that.

  • @emmanuelbanda9825
    @emmanuelbanda9825 3 года назад +1

    is it possible to read data from max6675 module in matlab

    • @apm
      @apm  3 года назад

      I couldn't find anything for Matlab but this may work in Python: github.com/tdack/MAX6675

  • @Marcus-xj6zq
    @Marcus-xj6zq 3 года назад +1

    Can gain scheduling apply to this? If so, please teach me.

    • @apm
      @apm  3 года назад

      Yes, check out apmonitor.com/heat.htm for case studies. This TCLab doesn't need grain scheduling but you could practice the methods with it.

  • @mattt2743
    @mattt2743 3 года назад +1

    can someone help me :-(
    An air-conditioner that you designed previously, has not been performing well for quite some time.
    The following problems are observed:
    i. When you set the temperature on the remote to 24°C, the temperature in the room is
    observed to be ranging between 24±5°C.
    ii. It takes an extremely long time for the room to cool down and the desired temperature can
    never be maintained for long.
    a. The adjustments required to fix the control system and the reasons?
    b. Name the new controller (P, PI, PD or PID)?

    • @apm
      @apm  3 года назад +1

      It sounds like the cooling capacity of the air conditioner has decreased. AC units are typically not PID control because the AC is either on or off. It cannot go to 60% of max load. You probably need to clean the condenser or evaporator or check the pressure of the coolant on the suction (low pressure) side.

  • @fauziprt
    @fauziprt 4 года назад +1

    can i get the simulink file? any clues? the website can't even work

    • @apm
      @apm  4 года назад +1

      Yes, the files are now available from apmonitor.com/heat.htm from the Download button.

  • @redxoscar4336
    @redxoscar4336 3 года назад +1

    can someone help me please, what does the blue line in the temperature observer means?

    • @apm
      @apm  3 года назад +1

      Blue line is the heater level 0 to 💯%

  • @mnmn5696
    @mnmn5696 2 года назад +1

    Please, how do I get the system response?ride time...

    • @apm
      @apm  2 года назад

      More information about rise time is given here: apmonitor.com/pdc/index.php/Main/SecondOrderGraphical

    • @mnmn5696
      @mnmn5696 2 года назад +1

      @@apm l meant to extract them from Matlab in case the wave is square

  • @habibizzz3152
    @habibizzz3152 3 года назад +1

    how to do it if i want to apply FOPDT ?

    • @apm
      @apm  3 года назад +1

      Please see the course here: apmonitor.com/pdc

  • @ccb2461
    @ccb2461 4 года назад +1

    can you do this with a PI controller instead of a PID?

    • @apm
      @apm  4 года назад

      Yes, a PI controller also works. apmonitor.com/pdc/index.php/Main/TCLabPIControl

  • @ahmadfathanhalim2636
    @ahmadfathanhalim2636 5 лет назад +2

    Thanks ! Can we use fuzzy-pid controller on plan like this ?

    • @apm
      @apm  5 лет назад +1

      Yes, I think it would also be another type of control for this device.

    • @ahmadfathanhalim2636
      @ahmadfathanhalim2636 5 лет назад +1

      @@apm okay. Cause its my final project 😁. But i dont now how to connect my plan to simulik 😁

    • @apm
      @apm  5 лет назад

      @@ahmadfathanhalim2636 I hope your project goes well. There is also a Simulink interface here: apmonitor.com/heat.htm that you can use as a template for your project.

    • @ahmadfathanhalim2636
      @ahmadfathanhalim2636 5 лет назад

      @@apm is it external simulink mode ?

    • @apm
      @apm  5 лет назад

      @@ahmadfathanhalim2636 the TCLab uses the Arduino support package and connects with a serial USB connection.

  • @leew9267
    @leew9267 3 года назад +1

    I like from China,thank you.

  • @tiendo5328
    @tiendo5328 5 лет назад +1

    Can you control using MPC controller?

    • @apm
      @apm  5 лет назад

      Yes! Advanced Control Labs F-H use MPC with the TCLab: apmonitor.com/do/index.php/Main/AdvancedTemperatureControl

  • @ashishsoni4199
    @ashishsoni4199 3 года назад

    Heating furnace sir? How to make it on simulink?

    • @ashishsoni4199
      @ashishsoni4199 3 года назад

      Please sir help me tomorrow is submission of Project

    • @apm
      @apm  3 года назад

      @@ashishsoni4199 here is a related project that uses an energy balance APMonitor.com/heat.htm

  • @lionconvoy8622
    @lionconvoy8622 7 лет назад

    really nice! where can I get this pcb in order to replicate the experiments? do you buy this pcb?

    • @apm
      @apm  7 лет назад

      +cosmic lion x, you can either build it with a breadboard or you can buy it from apmonitor.com/heat.htm (see button at the bottom). Let me know if you'd like a detailed parts list to build it yourself. I put in a bulk order of PCBs if you'd like me to send one or many of these kits. The kits come with everything that is needed to the lab in Python or Matlab.

    • @lionconvoy8622
      @lionconvoy8622 7 лет назад

      could you send me the detailed parts for build it on my breaboard?. I will probably order a pcb too

    • @apm
      @apm  7 лет назад

      +cosmic lion x, here is the parts list and wiring diagram for a single heater and temperature sensor (SISO): apmonitor.com/che436/uploads/Main/Hands_on_Process_Control_CACHE.pdf The PCB version supports SISO or MIMO.

  • @Noneblue39
    @Noneblue39 6 лет назад

    i got an error for opening it . ( error line 145) . how to open it? it was apparently done a newer version

    • @apm
      @apm  6 лет назад

      You need to get the Arduino Support package for Matlab before running this script. Also, do you have the temperature control lab kit? More info is available at apmonitor.com/heat.htm

    • @apm
      @apm  6 лет назад

      I included earlier Simulink versions in the Github directory and in the zipped archive. Look for the other slx or mdl files. The MATLAB scripts should work for all versions.

  • @jellybean5106
    @jellybean5106 6 лет назад

    How to do this without Arduino? Is it possible with just Matlab?

    • @apm
      @apm  6 лет назад +4

      You could build a simulator instead of collecting data. You can also purchase a kit from: apmonitor.com/pdc/index.php/Main/PurchaseLabKit

  • @hannahanaa8024
    @hannahanaa8024 6 лет назад

    can you give me the details about the box of temperature control lab

    • @apm
      @apm  6 лет назад

      The lab kit includes:
      Arduino Uno or Leonardo
      Temperature control PCB shield
      USB barrel jack power cable for heaters
      5V USB power supply (US plug)
      USB cable for serial connection to MacOS, Windows, or Linux computer
      Small cardboard box
      There is additional information and a purchase button at apmonitor.com/pdc/index.php/Main/ArduinoTemperatureControl

  • @faboxbkn
    @faboxbkn 6 лет назад +2

    thank you!

  • @cheikhfall7300
    @cheikhfall7300 6 лет назад +1

    thank you

  • @muhammadbahiij2560
    @muhammadbahiij2560 6 лет назад

    where's is your aruino's coding dude? i really need you help :(

    • @apm
      @apm  6 лет назад +1

      Here is the source code for the Arduino interface: github.com/APMonitor/arduino/blob/master/0_Test_Device/Python/tclab/tclab.ino
      The PID calculations are performed with Python, not on the Arduino. The Arduino is only to retrieve the temperatures or write the heater or LED values. The Python code is available from: github.com/APMonitor/arduino

  • @Neuler-wh2ww
    @Neuler-wh2ww 4 года назад +1

    Graciasss

  • @ivanryanichev1580
    @ivanryanichev1580 5 лет назад

    stucks in half of compilation, 2016a version

    • @apm
      @apm  5 лет назад +1

      Your install didn't finish? I'd recommend that you contact Mathworks' support if there is a problem with the installation.

    • @ivanryanichev1580
      @ivanryanichev1580 5 лет назад +2

      @@apm No, i did everything as you on the video, just press RUN and compialtion of model never finish. I have a non oficial version of matlab, may be thats the issue

    • @apm
      @apm  5 лет назад

      Yes, I think they check your license credentials as part of the installation. The Python version is also a possibility if you have the TCLab hardware: apmonitor.com/heat.htm

    • @ivanryanichev1580
      @ivanryanichev1580 5 лет назад

      APMonitor.com unfortunately, thank you

  • @luismesquita8202
    @luismesquita8202 3 года назад

    Video on PID control:
    ruclips.net/video/71o4lFRBZnk/видео.html

  • @letraogiaithuongthuonghieu898
    @letraogiaithuongthuonghieu898 5 лет назад +1

    i think this video

  • @ninitiprom9122
    @ninitiprom9122 6 лет назад +1

    thank you