Professional Documents
Culture Documents
毕业设计初稿
毕业设计初稿
Name: Ye An
Supervisor: Jiang Li
Professional
Title: Lecturer
Abstract
With the development of science and technology,temperature has become an important
index in people’s daily life,and the temperature control is able to improve production
efficiency.Since many temperature adjustment methods have no significant effect on
temperature control, it is particularly important to design a temperature control system with
high control precision and strong control ability.This design will implement a system with
STM32 micro-controller as the core, PID algorithm as the control algorithm, and
temperature control system through the heat sink and Keil5 software. By setting the target
temperature, the system makes the control algorithm control the cooling equipment, so as
to achieve the purpose of precise temperature control.
Keywords:
Content
1.Introduction………………………………………………
1.2Structure of Thesis………………………………………………
Acknowledgement…………………………………………………………………
References………………………………………………………………………
Appendix……………………………………………………………………………
1.Introduction
One common method for achieving precise temperature control is to use thermostats or
temperature controllers,which regulate the system’s temperature by adjusting heating or
cooling elements.However, these systems are often limited by their ability to respond
quickly to changes in temperature, leading to oscillations or overshoots in the desired
temperature setpoint.
In foreign countries,the research of constant temperature control system has started in the
1970s.They begin to detect temperature and use many kinds of methods to control
it.Nowadays they have taken the large technological results especially in the tuning of
adaptive parameters and the collection of temperature data in sensors.In these
aspects,countries such as Japan,the United States,Germany,Sweden are leading in
technology and have produced a batch of commercial temperature controllers and
instruments with excellent performance.[1]
The development of constant temperature control technology is still in the level of 1980s in
China.The produced controllers can only be used in the average temperature control
system and they are difficult to control the complicated,time-variant and time-delay
systems.Besides,it is a pity that the domestic technology can still not satisfy the
requirements when facing the situations of designing adaptive parameter-tuning
systems.Since our country still has no solutions to reach the level of producing large-scale
instrument,it is also significant to import the constant temperature instruments from foreign
countries.Therefore,there still needs time to develop technology and bridging the gap
between China and other developed countries.
A temperature control system is a heating and cooling system that maintains a consistent
temperature,usually in a specific area such as a home or business.This type of system
has these main advantages as follows[2]:
(1) High energy efficiency:In the temperature control process,this system maintain one
consistent temperature without wasting energy on heating or cooling beyond the desired
range.
(3) Excellent stability:This type of system has always been significant for some processes
such as manufacturing,where temperature variations can pose safety risks to workers or
the environment.It can also help to prevent accidents and ensure safe working conditions.
Temperature control systems have become essential in various industrial and commercial
applications,providing accurate and efficient regulation of temperature in various
processes.Here are some few examples of applications field of constant temperature
control system[3]:
(2) Food and Beverage Industry:Temperature control systems are used in food and
beverage industries to maintain the optimal temperature range for storage,processing and
transportation of perishable products like fruits,vegetables,meat,dairy and beverages.
The most common algorithm used in constant temperature control system is the
PID(Proportional-Integral-Derivative) algorithm.PID algorithm can not only solve the above
problems, but also in the unsupervised, for a long time temperature will be automatically
collected, automatic controlling of the semiconductor temperature controller achieves
heating or cooling function, the system temperature will always be maintained constantly.
The PID algorithm works by continuously measuring the current temperature and
comparing it to a desired setpoint temperature. The difference between the two, known as
the error signal, is used to determine the appropriate action to take to maintain the
setpoint temperature.To implement the PID algorithm, specific tuning parameters must be
chosen for each component to ensure stable and accurate control. These tuning
parameters are often adjusted through trial and error or by using specialized software
tools.
The first chapter introduces the background of constant temperature control system.The
oversea and domestic research status of system have firstly been studied.Then the
advantages and widespread application fields of temperature control system have also
been analyzed. Based on these backgrounds,the PID algorithm in temperature control
system has been led out.
The second chapter introduces the temperature control system design.In this chapter,the
overall design and different modules design will be introduced and analyzed. Next,the
summary of this chapter will be made
The third chapter introduces the PID constant temperature control algorithm design and
implementation.
The fourth chapter introduces the overall algorithm debugging and optimization.
2.Constant Temperature Control System Design
In chapter 2,the overall system design has been introduced and the different modules in
the whole system have been analyzed in detail.In this chapter,the PID algorithm will be
introduced into 4 aspects,including its basic principles,parameter tuning,program
implementation and control algorithm optimization.
From the formula of positional algorithm,it is able to see that the proportional part is only
related to current error e(k) and the integral part shows the sum of errors in the
system.Therefore,the advantages of positional PID algorithm lie in its clear controller
structure and obvious parameter tuning.However,there are two disadvantages to this PID
algorithm.The first one is that the deviation e(k) needs to continuously accumulated,which
increases the computational workload and burden on computers so that it will result in a
significant change in the position of an actuator.The second one is the occurrence of
integral saturation phenomenon,which means that when the control amount of the system
has reached its maximum value,the error will continue to accumulate under the action of
integration.For the phenomenon of integral saturation, an integral limiting algorithm is
usually adopted, which sets the limit value of the controller's output control quantity. When
the output of the PID controller exceeds the set range, the integral operation is stopped.
In conclusion,the incremental PID algorithm is the best algorithm for this design to control
the heat dissipation fan.In this design,the input is the error between desired temperature
and actual temperature and after the calculation of proportional,integral and derivative,its
final combination of three calculation results will become the output to achieve the final
goal.The incremental PID algorithm is shown as follows in Figure3.1.
It can also be called Ziegler-Nichols method,which uses the step response curve of
controlled object to obtain the model of controlled object.According to the characteristics
of large lag and large inertia of the expander and referring to the relevant data, the control
system of the expander can be approximately simplified. After linearization, the transfer
function can be expressed as follows:
Generally speaking, the overshoot of the PID controller due to Z-N setting is relatively
large. For this reason, C.C.Hang proposed the improved Z-N method, which improved the
overshoot of the system by weighting the given value and modifying the integral constant.
This method is considered to be the most successful improvement of the Z-N method.
A similar tuning method is the Cohen-Coon response curve method, which is the same as
the Ziegler-Nichols response curve method, except that the tuning formula is different, and
the tuning formula is shown in formula (4):
3.2.2 Attenuation Oscillation Method
The attenuation oscillation method adjusts the parameter value of the controller by
causing the system to generate attenuation oscillation. numerically. After reaching stability,
add step disturbance by changing the given value, observe the attenuation ratio of the
recorded curve of the controlled variable, and then change the ratio from large to small
until the attenuation ratio of 4:1 appears, and record the attenuation ratio at this time
Scale ∂s (called 4: 1 attenuation scale), get the attenuation period Ts from the curve. Then
according to the formula, find out the parameter setting value of the controller.If equal
amplitude oscillation is difficult to achieve, obtain a 4:1 oscillation curve under pure ratio
as the basis for parameter setting.
To achieve the attenuation oscillation method,there are several steps to tune the
parameter:
1) Put the integral time to the maximum and the differential time to zero to make the
control system operate and set the proportionality to a larger value.Purring P to reduce
proportionality means put control system into operation in a purely proportional
manner.Then keep reducing the ratio slowly, observe the output of the regulator and the
fluctuation of the control process until the attenuation process of 4:1 has been found.It is
called “finding attenuation 4:1”.
2) For some control objects, if the vibration is too strong with the attenuation ratio of 4:1,
the attenuation ratio of 10:1 can be used at this time. But it is very difficult to measure the
attenuation period at this time, the rise time Tr of the first peak can be measured, and the
operation steps are the same as above.
3) Calculate the value of each parameter according to the attenuation ratio s and
attenuation period Ts, Tr in Table2 .
Attenuation P δs
Ratio 4:1
PI 1.2δs 0.5Ti
PID 0.8δs 0.3Ti 0.1Td
Attenuation P δ's
Ratio 10:1
PI 1.2δ's 2Tr
4)Put the proportional degree on a value larger than the calculated value, then add the
integral time Ti, and then slowly add the differential time Td. When operating, you must
follow the "PID order to add parameters", that is, first P times I and last D, do not destroy
this order.
5)Reduce the ratio to the calculated value, and adjust the parameters appropriately by
observing the curve. That is, "watch and run fine-tuning" until you find the best value.
The response curve method is one of the common methods for tuning the parameters of a
PID controller.The basic principle of this method is to use the response of system to a step
input to determine the appropriate parameter values.
To use the response curve method, a step input is applied to the system, and the resulting
response curve is recorded. The response curve can then be used to estimate the
system’s transfer function, which can be approximated by a first-order plus time delay
(FOPTD) transfer function.
The parameters of the FOPTD model can then be used to estimate the appropriate PID
parameter values. Specifically, the time constant of the FOPTD model can be used to
estimate the value of the proportional gain (Kp), while the time delay can be used to
estimate the value of the derivative gain (Kd). The integral gain (Ki) can be estimated
based on the response of the system to a steady-state error.
Once the estimated parameter values are obtained, they can be used to set the initial PID
controller parameters. The controller’s performance can be evaluated, and the parameters
can be adjusted as needed to achieve the desired control performance.
Overall, the response curve method is a useful tool for tuning the PID controller
parameters and can provide good results with relatively low computational effort.
However, the method does rely on a relatively simple model of the system, and care must
be taken to ensure that the resulting parameter values are appropriate for the specific
application
The critical ratio method is a popular method of tuning the parameters of a PID controller.
The method is based on using the ratio of the system’s time constant to its dead time to
determine appropriate PID parameters.Experimental results show that the new procedure
performs better than both the contingent critical‐ratio and the conventional critical‐ratio
techniques.[14]
The first step in the critical ratio method is to obtain response data by applying a step
input to the system and measuring the response. This response data is then used to
estimate the system’s time constant and dead time.
The critical ratio is defined as the ratio of the system’s time constant to its dead time. A
higher critical ratio indicates that the system is more sluggish, while a lower critical ratio
suggests a faster system response. Based on the critical ratio, recommended PID
parameters can be calculated using empirical rules.
For systems with a low critical ratio (less than 0.1), the recommended parameters are:
For systems with a medium critical ratio (between 0.1 and 1.0), the recommended
parameters are:
For systems with a high critical ratio (greater than 1.0), the recommended parameters are:
Once the recommended PID parameters are calculated, they can be applied to the
system and tested for performance. Adjustments to the parameters can be made as
necessary to achieve the desired control performance.
Overall, the critical ratio method is a useful tool for determining appropriate PID
parameters based on the system’s dynamic characteristics. However, it does rely on a
simple model of the system and may not provide optimal performance in all cases, so care
must be taken when applying the method to specific systems.
With the continuous updating of simulation software,the selection of software has also
become a very important choice to simulate the best result.After several investigations to
simulation software,researchers have discovered that Multisim,Proteus and
Matlab/Simulink have become the most popular software in most respondents.
Proteus is an EDA tool software which supports circuit diagram design,PCB layout and
circuit simulation.Proteus supports the simulation and debugging of the single-chip
application system so that the software and hardware design can be quickly verified
before the PCB board being made,which not only saves costs but also shortens the
development cycle of the single-chip application.The disadvantage of Proteus is that it’s
insufficient for the data calculation of the circuit.
In this program,u_n means the array of u[n] and u_n1 means the array of u[n-1],then by
this logic e_n,e_n1 and e_n2 also mean the arrays of e[n],e[n-1] and e[n-2].By the basic
principle of PID algorithm,u[n] means the current temperature data with the time changing
while e[n] can be explained as the error between current temperature data and desired
temperature data.Kp,Ki and Kd mean the proportional,integral and derivative coefficients
while CT expresses the current time between arrays u_n and e_n.Ts shows the sampling
period and its value in the program is 1.There also exists one function 1200*atan(x)/31
which indicates the relationship between ambient temperature at current time and current
time.
Then after the circulation the final image of function has been successfully
made.According to the formula of discrete incremental PID algorithm,the value of alpha
can be obtained and it is able to influence the ambient temperature in the next
second.The temperature data in the next second is 1200*atan(x)/31+alpha then the u[n]
and e[n] array can be changed to continue the calculation and obtain the temperature
data.
In addition,add the PID constant temperature control algorithm on the basis of constant
power heating and try to adjust the coefficient of Kp because the oversized Kp will make
the temperature change rapidly.With these conditions,it is simple to desire the
temperature to be 60 Celsius to achieve the requirements.However,the curves become
very choppy and after adjusting the Kp coefficient to become 0.40,the amplitude of
oscillation starts to decrease and it becomes more stable as shown in Figure 3.4:
Figure3.4 The Function Image after adjusting Kp
After adjusting these three coefficients,the curve of temperature rising tends to become
stable and the time to reach the stable temperature seems to become shorter and
shorter.It has met all the requirements of using PID algorithm in constant temperature
control system.
In summary, optimizing a PID control algorithm involves selecting a control objective, fine-
tuning the PID parameters, and testing the results to improve the system’s performance.
This process is iterative, and the PID gains and control outputs are refined until a desired
system response is achieved.
4.Experiment Debugging and Result Analysis
This chapter is mainly discussing the final experiment debugging and result analysis.It has
outlined the experimental consequences and result analysis when the overall
configuration of the system becomes normal.This chapter also some solutions when
facing some problems in the design.
Figure4.1
Figure4.2
This chapter verifies the feasibility of the incremental PID algorithm as a control algorithm
in the heat dissipation control system through experimental debugging and result analysis.
By adjusting the three parameters of the PID algorithm, the temperature control of the PID
algorithm is more stable, and the speed of reaching a stable temperature is faster.
5.Conclusions and Prospects
Experimental results show that the PID control algorithm can effectively control the
system’s temperature and provide precise temperature control. The system can maintain
a stable temperature within an acceptable error range. The temperature equalization
control scheme based on the PID control algorithm improves the system’s temperature
efficiency and reduces energy consumption.
In the future, we can further improve the system’s performance and reduce energy
consumption by optimizing the PID control algorithm and using more advanced control
methods such as fuzzy logic, neural network, and adaptive control. We can also
incorporate wireless communication technology into the system design to enable remote
control and monitoring of the system’s temperature.
Furthermore, we can expand the system’s application to other domains, such as food and
chemical production, where precise and consistent temperature control is essential. The
system’s design can also be modified to allow for multi-zone temperature control.
In conclusion, the PID constant temperature control algorithm is an effective method for
temperature control in a discrete multi-domain constant temperature equalization control
system. The system has the potential for further development and application in various
fields, promoting energy conservation and environmental protection.
Reference
[2]
[3]
[4]
[5]
[6]Y X Li, H B Xu, G X Gu, Y J Guo, B Wang. "A review of stability control algorithms for
weapon platforms", Journal of Physics: Conference Series, 2023
[7]
[8]
[9]
[11]Ruijie He, Zhigang Wang and Wencheng Fu,Application Of PID Control Based On BP
Neural Network In The Expansion Machine Of Organic Rankine Cycle System,Tianjin
University of Technology,GRC Transactions, Vol. 42, 2018
[12]
[13]
[16]
[17]
[18]
[19]
[20]
Acknowledgement
Four years of university life represents a period of end, and it is a new beginning. I have a
lot of words to say to people around me. When I finished this paper, the first time was a
feeling of relief, and then there was a lot of thoughts.
The first thing I want to mention is my supervisor, Jiang Li. I would like to thank the tutor
for the advancement and guidance of my work in the overall study of the thesis, and a
careful review during the completion of the thesis. Although the contact with the instructor
is not long, the instructor's concern for the progress of our team's work, and the guidance
of each member's work content in the group, let us work hard to complete the individual
learning tasks. The mentor's enthusiasm and relaxation, and the relaxed learning style,
allowed me to develop the ability of independent study and hands-on practice, which
made me very productive. At the same time, the other teachers of the set up group also
put forward their opinions and suggestions during the process of completing the
inspection. Their supervision and supervision also remind me to remind myself to work
hard to complete my task.
In addition, I would also like to thank the teachers and students who have met in this
university for four years, especially my roommates and Zhang Xin teacher. You are giving
me the care and life care, giving me care and encouragement when I am in trouble,
sharing and communicating together when I am happy. In the process of completing the
thesis, learn to share the use of new software and delve into the theoretical knowledge. It
is you who let me study or live, full of optimistic attitude and caring gratitude.
I also want to thank my parents. You have always been full of tolerance and love for me,
giving support to all aspects of my study and life, giving me free space that no one else
has. I am grateful to my parents for urging and supporting me in the process of completing
the thesis. Drinking water as a source of thought, I should present this paper as a final
answer to the university and present it to you.
I am grateful to everyone around me, and I am grateful for the many things I have
experienced. I will keep it in mind. What I learned during this graduation project will be my
greatest asset. Finally, once again, I would like to express my heartfelt thanks to my
family, classmates and teachers during the completion of the thesis!
Appendix