フィルターのクリア

PID Controller- not for simulation

3 ビュー (過去 30 日間)
Tal Zinger
Tal Zinger 2013 年 2 月 25 日
I want to build an application in Matlab for controlling temperature, by using NI TC-01 thermocouple and a peltier cooling plate, connected through an RS-232 controlled power supply.
To stabilize the temperature I'd like to use the PID tools in Matlab 2012b, but they all seem to be used only for simulation purposes.
Is there a way to use pid objects in Matlab scripts for working (non-simulation) purposes? (e.g. connecting the pid object to periodically-updated workspace variables)
Thanks!
  2 件のコメント
Arkadiy Turevskiy
Arkadiy Turevskiy 2013 年 2 月 25 日
Can you clarify a bit more? Do I understand correctly that you want to use something like Data Acquisition Toolbox and Instrument Control Toolbox to get the temperature into MATLAB, apply PID controller, and output voltage?
If this is what you are trying to do, then pid objects do not really support this workflow. The way to do this would be through Simulink PID Controller block.
Arkadiy
Tal Zinger
Tal Zinger 2013 年 3 月 3 日
I went through a few tutorials and still couldn't figure it out - How, using Simulink, do I:
1) Read/write current data from/to the environment (to which I constantly read the temperature, and from which I set desired voltage through timers at the moment)
2) Alternatively - can I define the thermocouple as an input, and a COM port as an output directly from Simulink?
3) How do I cause Simulink to run constantly, to allow the PID block to work?

サインインしてコメントする。

回答 (2 件)

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 2 月 25 日
What is your goal in using a numeric pid, which can be done by matlab for real application, insteat of an analogic pid controller?
  1 件のコメント
Tal Zinger
Tal Zinger 2013 年 2 月 25 日
I want to keep the plate at a given temperature - increasing voltage in the power supply causes the plate to cool, while ambient temperature warms it up.
The plate should be kept steady at a desired temperature, while this desired temperature can be altered as the program runs.
I actually have no preference regarding the type of pid controller.. Didn't notice that more than one existed..

サインインしてコメントする。


Arkadiy Turevskiy
Arkadiy Turevskiy 2013 年 3 月 18 日
編集済み: Arkadiy Turevskiy 2013 年 3 月 18 日
Based on your clarification, it seems you want to do real-time control of the actual process. A typical workflow for that: model the process in Simulink, design and test PID controller in simulation. Once testing through desktop simulation is done, you can deploy the controller in real time using one of many different techniques.
- Most general way is to generate C code using Embedded Coder and download the code to the embedded processor.
-If you want to use x86-based processor as a target, you can use xPC Target.
- If you want to control from the same machine that runs MATLAB and Simulink, you might be able to do it with Real-Time Windows Target. Based on your questions, I think this is the option that you are looking for. More details here.
HTH.
Arkadiy

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by