SM lab 10
SM lab 10
Title
To perform and understand the working of a closed loop feedback system using a PID
controller for smart manufacturing processes.
Apparatus
Personal Computer, PID controller, 3D printer, 3D printing software (Repetier-Host),
Stopwatch
Theory
Control System
The basic idea behind a PID controller is to read a sensor, and then compute the desired actuator
output by calculating proportional, integral, and derivative responses and summing those three
components to compute the output. Before we start to define the parameters of a PID controller,
we shall see what a closed-loop system is and some of the terminologies associated with it.
Definition of Terminologies
The control design process begins by defining the performance requirements. Control system
performance is often measured by applying a step function as the set point command variable,
and then measuring the response of the process variable. Commonly, the response is quantified
by measuring defined waveform characteristics. Rise Time is the amount of time the system
takes to go from 10% to 90% of the steady-state, or final, value. Percent Overshoot is the
amount that the process variable overshoots the final value, expressed as a percentage of the
final value. Settling time is the time required for the process variable to settle to within a
certain percentage (commonly 5%) of the final value. Steady-state error is the final difference
between the process variable and set point. These performance measure of a control system
has been shown in figure 2. Note that the exact definition of these quantities will vary in
industry and academia.
PID stands for Proportional, Integral, and Derivative. It is a sophisticated type of controller
which is not limited to on-off control. It controls the process very precisely by controlling rise
time, percent overshoot, settling time and steady state error. These performance measures help
to achieve a fast response to change along with accuracy. Having these parameters calibrated
will ensure you have more consistent process control which can help improve your process. It
uses a variable power approach which allows for fine adjustments and smarter, more accurate
output.
Figure 6: Connection
3. Press temperature curve tab. You should be able to see the real time temperature
screen. It will be showing the real time temperature of both hotend/extruder and bed.
The hit and trial method of PID tuning has been provided below in figure 10. The experiment
will be conducted in two stages
A) First we will tune the controller using Hit and trial method and will analyze the effect
of different parameters (P, I and D) on responses.
B) We will use the auto tune command to tune the controller automatically.
Observe Responses
Rise time/ overshoot/ Steady
state error
No
Desired
Response/
Performance
Measure
Yes
Save in EEPROM
A) Hit and trial method and observing the effect of different parameters (P, I and
D) on responses.
1. Find the current value of PID controller by typing G-code M301 and pressing send.
Make sure that you have selected Manual control tab before sending G-code else G-
code sending window will not appear.
Manual Control tab
2. The currents value of the PID setting will be shown in the information window
(figure 12)
3. If this command does not return the values, an alternative way is to find the values
directly from the EEPROM. On config tab, select firmware (EEPROM
Configuration). The firmware setting window will appear as shown in right figure.
You can check the value of P, I and D from it. Note these values and press ok. These
are the current setting of the PID.
Figure 13: How to find the current value of PID controller from EEPROM
Follow the same procedure as of previous step 3 to access the P, I and D values in firmware
(EEPROM configuration.) Change only one of the value of P, I or D and observe the effect.
For example, change P value to 5. Please ensure that none of these values should be kept zero.
Once changed, press ok.
Figure 13: How to find the current value of PID controller from EEPROM
5. Now its time to observe the effect of this changed value by switching on the heater.
Press Manual control tab and enter extruder temperature to 150, then press extruder
icon to switch on the heater.
Observe the response. Draw the response by noting particular P, I or D value and drawing the
figure on your notebook after the steady state response has been achieved.
From your drawn figure on your lab note book, find the performance measures including rise
time, percent overshoot (or simply overshoot and steady state error)
8. Repeat the process from step 1-7 for five different values each of P, I and D. Make sure
you vary one parameter four times while keeping all other constant. Plot each response
using hand sketch and calculate each of this on the sketch plot upto reasonable
approximation.
M303 E0 S205 C10 ; This will run autotune for extruder 1 (Extruder 1 is E0) at 205°C for a
total of 10 iterations.
2. Wait for some time for the system to automatically tune the process. After
completing the final iteration your machine will send the values it determines is the
best for your machine. You will want to write these down so that you can enter them
into your printer in the next step. Here is a screenshot of example values of autotune
results. Please note these are different from the values you will come up with.
4. Observe the response and compare performance measures obtained from the one
obtained from any of the manual tuning value of performance measure.
LAB REPORT
TITLE:
APPARATUS
PROCEDURE
OBSERVATIONS AND CALCULATIONS
1. Use all steps you studied in the LAB SESSION of this tab to write the procedure and
to complete the experiment.
2. Observe the value of P, I, and D each at four different temperature values by varying
one parameter at a time and keeping all others constant. Sketch these twelve plots. Find
the performance measure obtained at each of this plot.
3. Make a table of performance measures at these values.
4. Auto-tune the system and save the value. Run the heater and observe the performance
measures.
5. Compare any of the auto-tune values with the manual tuning value.
6. Analyze the effect of P, I, and D on each of the performance measures.
7. Provide the conclusion of your experiment.
DISCUSSION
CONCLISION
COMMEMTS