PID controlled reflow oven Simulink

조회 수: 28 (최근 30일)
Kdog44
Kdog44 2015년 3월 24일
댓글: Abin Babu 2022년 11월 19일
Hello everyone! This is my first post on this forum.
Background: I made a small solder re-flow oven for a control systems academic project, by hacking a small toaster oven. My overall project consists of heating elements that are driven by a solid state relay (SSR). The DC side of the SSR is being controlled by a micro-controller through a PWM output. I found the step response for the SSR driving the oven. It is first order. I want to use SIMULINK to help me design a PID controller, I would also like to simulate the whole system. I am using a K type thermo-couple for sensing the temperature of the oven.
What I have Done: I am not new to MATLAB, but I am new to SIMULINK. I have spent some time familiarizing myself with how SIMULINK works. I have made a few simple models and simulated them.
Questions: Should I make my own custom PWM 'subsystem', or is there already a block I could use? How could I use Code Composer to produce the PID algorithm? How to I link the PID block (continuous-time) to the PWM block so I will have the right duty cycle?
Thanks so much, any help will be appreciated.

답변 (1개)

Sebastian Castro
Sebastian Castro 2015년 3월 24일
Hi Kdog,
After typing the answers below, I realize that my suggestions for doing all this involve quite a few separate products. My apologies in advance :(
1. SimPowerSystems has built-in PWM subsystems, but they are all made of Simulink blocks under the hood. If you have this toolbox, you can use these blocks; otherwise, I've attached a screenshot which shows how this block is implemented.
NOTE: The "Sawtooth Generator" block is not a built-in block. You can make your own sawtooth wave using a Repeating Sequence block and making it go from 0 to 1 in a time T = 1/Fs (1/sampling frequency).
2. Since PWM is highly nonlinear, you cannot directly use the PID Tuner. As of MATLAB R2014a, there's a cool new addition to the PID Tuner which uses functionality from the System Identification Toolbox. This lets you get around the "ripples" of the PWM by estimating a linear model from your system.
This webinar explains it with a similar example. I have tried this approach with a convection + PWM model before, and it works.
3. Embedded Coder comes with support for TI CCS. This depends on the version of CCS you're using, but here's the general landing page. You can use the box to the right of the page to access the documentation, which should have more details.
- Sebastian

카테고리

Help CenterFile Exchange에서 General Applications에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by