基于LabVIEW的PID参数自适应模糊控制器设计

合集下载

基于模糊控制理论的自适应PID算法

基于模糊控制理论的自适应PID算法

基于模糊控制理论的自适应PID算法近年来,随着科技的发展,自适应控制技术被越来越广泛地应用于各种控制系统中。

其中,基于模糊控制理论的自适应PID算法是一种很常见的控制方法,具有很强的实际应用价值。

一、什么是自适应PID算法PID控制器是一种广泛应用于工业生产中的控制器,其可以通过对被控对象的反馈信号进行加权处理,从而实现对被控对象的控制。

但是,在实际应用中,由于被控对象的动态特性和环境条件的变化,经常会出现PID控制器参数难以确定和调节的情况,这就需要使用自适应控制技术来解决这种问题。

自适应PID算法是一种自动调整PID控制器参数的方法,其主要原理是根据被控对象的实际工作状态和控制效果来调节PID控制器的参数值,从而实现对被控对象的控制。

在PID控制器中,P 代表比例项、I代表积分项、D代表微分项,而在自适应PID算法中,P、I、D三项参数值是根据被控对象的实际工作状态和控制效果来自适应调整的。

二、模糊控制理论在自适应PID算法中的应用模糊控制理论是一种基于模糊数学的控制方法,其主要特点是可以处理不确定、模糊的信息,具有很强的适应性和鲁棒性。

在自适应PID算法中,模糊控制理论主要用于调节PID控制器中的比例项、积分项和微分项的权重。

具体来说,在模糊控制理论中,有三个基本元素:模糊集合、模糊逻辑运算和模糊推理机。

在自适应PID算法中,这三个元素分别对应着被控对象的状态、PID控制器参数的权重和PID控制器参数的调节规则。

在调节PID控制器中的比例项、积分项和微分项的权重时,主要采用了模糊控制理论中的模糊控制策略。

具体来说,首先将被控对象的状态划分为若干个模糊集合,并为每个模糊集合定义一个隶属度。

然后,根据这些隶属度和一定的模糊逻辑运算规则,得到PID控制器中各项参数的权重值。

最后,再根据这些权重值和一定的模糊推理机规则,得到PID控制器中比例项、积分项和微分项的具体参数值。

三、自适应PID算法的应用范围自适应PID算法广泛应用于各种控制系统中,主要包括以下几个方面:1、工业自控领域:在各种流程控制、物料输送、物流控制等方面均有广泛应用,如化工、机械、电力、冶金等行业。

教学与LabVIEW的PID和模糊控制器

教学与LabVIEW的PID和模糊控制器

Teaching PID and Fuzzy Controllers with LabVIEW*J.P.KELLEROensingen Institute of Technology,Switzerland.E-mail:juerg.keller@isoe.chThis paper presents an educational concept for teaching PID and fuzzy controllers with LabVIEW.The simulation trainers for PID and fuzzy controller design are described.In addition,personal experiences with the trainer are summarised.Finally,programming considerations and cost estimates are presented.INTRODUCTIONUSING ATTRACTIVE simulations,students can efficiently acquire a lot of experience in controller tuning.Suitable tasks are in designing fuzzy controllers or tuning PID controllers in various control structures.Different types of plants,measurement noise or nonlinearities such as actua-tor saturation form a large field of simulation problems.Simulation is an inexpensive and fast way to practice many problems unimaginable in laboratory experiments.Simulation does not replace laboratory experiments.Analysis of plant structure and dynamics is better done with a real plant,but with the simulation experience and the already familiar control panel,students need only about 14of the time to complete an experiment.This also shows that simulation experience is transferable to real-life problems.This contribution presents simulation trainers for PID and fuzzy-controller design.The PID-trainer is described and possible problems are formulated.The trainer for fuzzy controller design is documen-ted,personal experience with the simulation trainer is summarised,and programming considerations and estimation of costs are given.EDUCATIONAL CONCEPTSimulation isn't a priori an efficient tool in education.Incorporating simulation into a demon-stration is most likely a waste of time.The risk is that students only remember a fancy simulation,but the information,if even realised,is forgotten very quickly.This changes completely if students have to work with simulation,e.g.solve a chal-lenging problem.The role of simulation is then twofold.First,it may contain an unwritten part of the problem formulation.For controller design,analysis of plant dynamics is an important step.This can be carried out by simulating the plant.Second,simulation is the student's tool to verify their solution.Without any risk of hazardous situations,students can explore the whole range of controllers.The consequences are that simulation is not very suitable as an education tool for fundamentals and basic problems,but is best used in the training phase.In contrast to laboratory experiments,simulation is a cheap and fast way to experience a diverse field of control problems.The dimensions of our field are:.Plant parameters:defining sets of plant parameters,several typical controller design problems can be formulated..Noise:disturbance rejection is one of the funda-mental control tasks.Simulating the plant with different noise levels,controller performance can easily be investigated.Furthermore,includ-ing noise into simulation is a very important issue in bringing simulation closer to reality.In a simulation,sensor signals are generally at least 10digits too accurate in comparison to real world signals.This leads to controller designs with unrealistic amplification of high frequencies using controllers with a large derivative part.As a consequence it is possible,for instance,to achieve similar,although unrealistic closed loop per-formance with a single PID controller as with a cascaded control structure.This is due to the fact that plant disturbances can easily be monitored at the 16-digit plant output signal..Selection of control structure:in a laboratory experiment,the control structure is usually predetermined by installed equipment.More degrees of freedom can be incorporated into a simulation.Since almost all possibly measurable variables are available in simulation,it is very easy to realise a simulation,where the task of selecting the measured variables is left to the student.The educational risk of simulation exercises is that a solution is found by trail and error method.Either the exercises have to be so difficult that *Accepted 9September 1999.202Int.J.Engng Ed.Vol.16,No.3,pp.202±211,20000949-149X/91$3.00+0.00Printed in Great Britain.#2000TEMPUS Publications.they can't be solved by trial and error,or a mean for quality assurance has to be used.The following tools can be recommended:a working sheet in which the student has to document and justify the design steps and an assessment sheet which focuses the student's work on the principal goals of the simulation exercise.Finally,simulation can be replaced with a laboratory experiment.Due to the simulation experience and being familiar with the HMI (human-machine-interface),the rate of success in the laboratory work is almost 100%and completed in 14of the time without simulation training.But having several simulation exercises done,the students are very demanding,so they have to be convinced of the additional value of a laboratory experiment.The laboratory exercises have to be adapted to the changed conditions.For example,more emphasis can be put onto the problem of controller realisation on a PC.LabVIEW Gsim Control and Simulation toolkit is not a well known simulation tool,but there are several reasons for using LabVIEW for simulation as well.If you have to make a simulation tool for somebody who is not interested in simulation techniques or modelling,who does not want to spend $10,000on a simulation tool or spend one week learning how to use the simulation environ-ment,then you are well advised with LabVIEW.The only limits of an HMI may be the screen size of a notebook.A LabVIEW VI is easy to run and if each control and indicator has its description,online-help is available.The VI Info may be used for general explanations of the simulation prob-lem.With the application builder,an exe-file can be created and distributed to the students.Since no additional software has to be installed,the simula-tion-exe can be copied to any location.There are no installation problems.A LabVIEW programmer familiar with systemtheory can create LabVIEW simulations by study-ing some of the examples,i.e.the Gsim Tool is easy to use.SIMULATOR FOR PID CONTROLLER TUNINGSince there is large variety of PID controllers,the implemented control law has to be documen-ted.Afterwards the simulation tasks are described.They cover the following topics:.Test of a PID controller..Tuning of a single PID controller for different plant models..Design of a feedforward controller..Tuning cascaded controllers.The PID controllerA parallel configuration of the proportional,integral and derivative part is used.The derivative part is calculated with respect to a filtered error signal.The PID controller C in Fig.1basically implements the following control law:u t K Âe t 1a T nÂe t dt T V Âdef t a dt 1de f t dt 1NT Ve t Àef t 2with K controller gain,T n reset time,T v raise time,N time constant of derivative filter with respect to T v ,(although:derivative gain limit).The variables are defined in Fig.1.The controller output is limited to the range [À100,100].As anti-windup strategy,the control-ler implements the strategy proposed by Astro Èm.For a complete study on anti-windup strategies,Fig.1.Feedbackcontrol.Fig.2.Anti-windup with tracking time T t .Teaching PID and Fuzzy Controllers with LabVIEW 203see [1].The amount the control signal exceeds the actuator limits modifies the integral part.Figure 2shows a block diagram of the controller with anti-windup.With negative feedback and weighted with a constant called tracking time the difference between the limited and the unlimited controller output is added to the integrator input.For a constant controller error e t ,the ratio between the rise time and the tracking time determines the limits of the integrator.This anti-windup strategy is insensitive to short time changes in the control error i.e.the integral part is not reset to an arbitrary value as with some other anti-windup methods.Since anti-windup problems are not the main topics of this simulation trainer,the tracking time is fixed as Tn a 3.This gives a reasonable controller behaviour and the students do not have to be concerned with this value.If the controller is operated in manual mode,the controller output can be set manually.This is useful to produce step responses of the plant.A bumpless switch to the auto-mode is possible.PID testBetter than believing is testing the functionality of the implemented PID controller.Three signals are available to change the controller setpoint automatically.The process value can be changed manually to produce any desired error signal e t .This VI can be used as introduction to the con-troller trainer.The well known textbook step and ramp responses can easily be reproduced by simu-lation.The students get familiar with the controller panel and have confidence that the control law is calculated reliably.This becomes important when a reason for problems with controller tuning has to be found.PID trainerTuning a PID controller is one of the most frequent controller design problems.It is therefore a compelling chapter in basic control education.Based on tuning rules,such as the well known tables of Ziegler/Nichols or Chien/Hrones and Reswick or more sophisticated schemes,a good initial guess for the controller parameters can be determined.Real-life control problems usually force an engineer to optimise the controller para-meters.In my opinion there is a lack of docu-mented methods for controller optimisation.By means of simulation,a student can acquire a lot of experience in optimising existing controllers.A set of 6plants is available.Random noise can be added at the plant output.The plant transfer functions are documented in Table 2(Appendix).A brief qualitative description of the plants is the following:.Plant 0and 1:typical plants for step response controller tuning of stable plants..Plant 2:typical plant for step response controller tuning of an unstable plant..Plant 3:first-order plant,a method other than Ziegler/Nichols is required..Plant 4:third-order plant,unstable control system for tuning rules with small phase margin.Can be used to determine critical gain and frequency according to Ziegler/Nichols..Plant 5:second-order with damping factor 0.6..Noise:a random signal is added at the plant output.Two nonzero noise levels can be selected.Step response controller tuning can be done with all the plants.In order to simulate a step response the PID controller is set to manualoperationFig.3.PID-control panel.J.P.Keller204mode.The`manual control'slider or the digital control can be used to change the controller output.The simulated response is plotted on a ing the chart measurement tools of LabVIEW the step response parameters can be identified.Different control objectives lead to a wide palette of tuning problems.Minimising rise time,settling time or rise time with no overshoot are typical examples.Always let the students check disturbance attenuation.To avoid trial and error tuning,a worksheet as in the following example is recommended:1.Analysis:draw a sketch of the step response andindicate important step response measures. 2.Select a controller and explain the selection.Determine the controller parameters for minimal rise time.3.Draw a sketch of the closed-loop response.Explain how to change controller parameters to improve performance.4.Give an estimate of the variance of the plantoutput when the noise level is set to large.It is preferable to let the students draw the sketch manually than to produce prints of the simulation window.The control panel of the PID Trainer is shown in Fig. 3.All controls and indicators have a description and the VI Info is used for a general explanation of the exercise.Start the main panel and select the exercise`PID Trainer'.You may select the real-time option to get a time feeling during simulation as well. Pressing the start button on the main panel,the PID Trainer becomes visible.The PID Trainer is started with the start button and stopped with the stop button.If a simulation is stopped,all internal variable shift registers are reset to their initial value.All controller parameter changes will also have effect during simulation.For a change of the model number to become effective,the simulation has to be stopped and restarted.In order to analyse the controller behaviour,you can press the`Analyse PID'button.The PID panel is opened and two charts are available for con-troller analysis.The upper chart shows the usual controller signals.In the second chart,the indivi-dual contributions of the P,I and D parts of the controller are shown.This chart gives a lot of insight into how a PID controller works.For instance you might use this tool to demonstrate the problem of steady-state control errors for controllers without integral action.This can be done with the following procedure.Put the controller in manual mode and set the control output to20or any other value.The process variable will reach some final e this value as setpoint.For a given proportional gain, it is easy to calculate the steady-state control error of a P controller necessary to achieve the controller output of20.This can be verified with simulation. Now,using a PI controller,you restart the simula-tion and verify that the integral part will`learn'the value20of the controller output.You need to restart the simulation,because as you can see in the analysis chart,the integral part is set equal to the manual controller output for a bumpless switch to auto-mode.Feedforward controllersDuring the exercises with the PID Trainer,it becomes obvious that a controller design with no step response overshoot will have a reduced dis-turbance attenuation.In order to circumvent this problem,a feedforward controller is advisable. The feedback controller can be optimised with respect to disturbance attenuation and a low pass feedforward controller is used to achieve the acquired step response.Typically setpoint ramp or first-order filters are available on classical controllers.The parameterisation of such con-trollers can be practised with simulation.In a first step the feedback controller is optimised with respect to disturbance attenuation.In the second step,the parameters of the feedforward controller are chosen to minimise rise time,but to avoid overshoot.The simulation model is model 0of the PID Trainer exercise.The control panel is similar to all PID control panels.In addition,two types of feedforward controllers can be chosen:first-order filter(PT1) and setpoint ramp.With the control labelled`time constant'both controllers are parameterised.For the first-order filter,the value is the time constant; for the ramp function it is the rise time for one setpoint unit.Cascaded controlPID controllers are often applied in multi-loop structures.A frequently used candidate is the cascaded control structure.Tuning cascaded controllers can be easily explained in theory,but when faced with a real-life cascaded controller the procedure is not always obvious.This might be due to the fact that the controller interface is more complex,mainly in compact controllers with a small display.It is also possible that the controller implementation or the plant do not allow the tuning of the controllers sequentially.Figure4shows a diagram of a cascaded control loop.One motivation to use cascaded control is to attenuate noise,labelled d1,within the first subsys-tem P1.This is possible and controller tuning is easy,if the dominant time constant of the first subsystem P1in Fig.4is much smaller than the time constant of the second subsystem P2.If the dominant time constants are similar,the con-trollers interact strongly and controller tuning is not simple.Advantages of cascaded control struc-tures become questionable.If the dominant time constant of P1is large compared to the time constant of P2,cascaded control is useless. These well known properties of cascaded control can also be explored with the simulator.Three different plant models are available:Teaching PID and Fuzzy Controllers with LabVIEW205fast-slow:P 1(z ) 0.4/(z À0.8);P 2(z) 0.05/(z À0.99)2(sample time:0.1seconds)equal:P 1(z ) 0.02/(z À0.99);P 2(z) 0.05/(z À0.99)2slow-fast:P 1(z ) 0.002/(z À0.999);P 2(z ) 0.05/(z À0.99)2Disturbance:d 1is a small sine function added to a random signal and d 2is a purely random signal.The amplitude of d 2is only about 10%of the amplitude of d 1in order to make the attenuation of d 1evident at the plant output.Unless there is a disturbance d 2,good control can also be achieved by a single PID controller.Since a cascaded control structure consists of two controllers,it is not easy to design a clearly arranged control panel.It is reasonable that both controllers have the same controls and indicators as the single loop controller.Moreover,time charts showing the controller behaviour are mandatory.As a consequence the control panel is slightly overloaded.Figure 5shows the relations of the controls and indicators to the signals in the control structure diagram.Tuning the cascade starts with identification of the inner loop plant P 1.Select the `Slave only'operation mode,set the slave controller to manual operation mode and simulate a step response of plant P 1.The `manual control'slider or the digital control can be used to change the controller output.The simulated response y 1 t is plotted in a ing the chart measurement tools of LabVIEW the step response parameters can be identified.Select controller type (P,PI,PD or PID)and determine the controller parameters.Put the slave controller in `auto'mode and check the performance of the inner loop (slave control-ler).In the `slave-only'mode,the setpoint of the slave controller can be entered at the `setpoint slave'control.Which plant is controlled by the master control-ler?The students must be able to answer this question to be able to determine the controller parameters.The master controller's plant is the inner control loop in series with the second part of the physical plant.Therefore,the plantoutputFig.4.Cascaded control structure.Fig.5.Signals on the panel of the cascaded controller.J.P.Keller206response y2 t to a setpoint change at the inner control loop must be produced.This can be done in the same configuration as before,where perfor-mance of the slave controller was checked.The signal of interest is now y2 t and its step response parameters can be measured in the master con-troller's chart.Configure the master controller, change the operation mode to`cascade'and test the controller performance.This tuning procedure can be done for all plant configurations,i.e.for fast-slow,equal and slow-fast.The students might experience difficulties with the equal and slow-fast plant configurations and hopefully will remember suitable plant struc-tures for cascaded control.It is clear that con-troller performance can not be compared with respect to the different plants.But for each plant, it is interesting to compare the cascaded control structure with a single-loop PID controller. This can be done by setting the operation mode to`single PID'.The differences become evident when noise is added to the simulation.FUZZY CONTROLLER DESIGNThe fuzzy controllerThe fuzzy simulator is based on the fuzzy controller of the LabVIEW Fuzzy Logic Toolkit for G.A fuzzy membership function editor allows the user to quantitatively define linguistic terms for input variables.A rule-base editor is used to define rules for the controller output based on the linguis-tic terms defined.The Fuzzy Logic Toolkit for G is used to implement rule-based feedback controllers.A fuzzy controller VI is used in the application VI to process input data based on the fuzzy controller designed.The toolkit is well suited for control applications on nonlinear or complex systems that are difficult to model mathematically but may be controlled by human operators.House temperature controlMany students have some experience with house temperature control.There is no need to explain why and how to heat a house.With house temperature simulation,two problems can be practised.The first is to select physically sensible controller inputs from the set of directly measured or derived variables.The following variables can be chosen:.indoor temperature,its time derivative and integral;.outdoor temperature and its time derivative; .control error,its time derivative and integral; .indoor minus outdoor temperature and its time derivative.It is clear that not all the available variables are meaningful,only a few are well suited as fuzzy controller inputs.The second problem is how to systematically compensate disturbances.The outdoor temperature changes with time.The heating power necessary to compensate the heat loss can be determined experimentally.Ideally the heat loss is repre-sented as a function of the indoor to outdoor temperature difference.This knowledge can be incorporated into the fuzzy controller design. With suitable membership functions and rules the input/output characteristics of the fuzzy controller can be tuned to compensate the heat loss.The simulation model of the house is the following:P el k TÀT o cd Tdt3(d T idtTÀT i 4with:P el heating power range:0F F F10Y000W; k heat loss coefficient 400W/8;c heat capacity,330,000J/8;T o outdoor temperature; T i measured indoor temperature;( sensor time constant,3min.The temperature setpoint is reduced during the night.Setpoint during the day is208C,at night time158C.The outdoor temperature is a sine function.The simulation creates the setpoint and the outdoor temperature automatically. Controller performance:the simulation VI determines a measure for controller perfor-mance.It is a weighted sum of the squared control error and a measure for the control effort integrated over the simulation time range of3days.The control effort is measured with the variance of the8last control values. This aims to punish fast changing,though unrealistic control signals.The worksheet of the simulation is as follows,in analysis:.Disturbance compensation:a)What is the major disturbance of the system?b)Find a function (equation or graph)and its arguments to deter-mine the amount of heating power required to compensate the disturbance..Chose sensible fuzzy controller inputs and justify each selection with sound physical arguments.The controller function,as far as is possible,must be independent of the temperature setpoint.In design and optimisation:.Design a fuzzy controller for the temperature control problem.The fuzzy controller must implement the disturbance compensation func-tion of1b.Verify it with the I/O characteristic tool..Minimise the performance measure!The assessment sheet in Table1is given to the students with the exercise.It should meet the following goals:minimise trial and error approaches and avoid frustration after having spent several hours on the exercise.Teaching PID and Fuzzy Controllers with LabVIEW207Race trackThe race track simulation is suitable for a fuzzy controller design competition.Students are highly motivated to take part in such a competition.The simulation time is given and the car with the best fuzzy controllers will run the longest distance..Sensors:the car speed is available.Furthermore the racing car is equipped with three sensors,one looking to the right,one straight ahead and the other to the left.All three measure the distance to the edge of the track.When the car exits the track,the sensor value will most likely beÀ1.To adapt the sensors to the control strategy,the angle9between the sensor directions can be configured..Controls:the controls of the racing car is the car acceleration and the steering angle.The car is equipped with anti-sliding control,i.e.the maxi-mum steering angle is a function of the car speed.The range of the steering angle isÆ80 degrees.The car acceleration is limited toÆ20 acceleration units.The car speed is modelled as a first-order system.Two fuzzy controllers are to be designed,the first for steering control,the second for speed control. As in the preceding simulator,a large set of input variables are available.These are:.distances:d1,d2,d3,d3Àd1.distance derivatives:d d2/d t,d(d3Àd1)/d t.car speedIn Fig.5,the control panel is shown.In an x/y plot the race track and the moving car are plotted. Steering angle,acceleration and car speed are shown in the time plot on the left for analysis purposes.The example plot in Figure6clearly shows the limiting of the steering angle.The maximal steering angle only increases when the car speed is reduced as can be seen in the middle of analysis plot.This forces the speed controller to reduce car speed to be able to turn on curves. Often,the simulation is too fast to allow analysis of the controller behaviour.For this purpose,a time zoom control is available.Its value is the waiting time between two simulation steps.EXPERIENCE WITH THE SIMULATIONTRAINERThe PID trainer has been a part of basic control education for2years.The students'feedback is good,but they complained about the time they have spent on simulation.The laboratory experi-ments showed that it was time well spent,because almost all of the students were able to solve the laboratory control problem with good results. Without simulation training,the students needed more than8hours to complete the experiment. Familiarity with the control panel and having the expertise of controller tuning,most students finished the experiment in less than two hours. As an engineer,they will tackle a control problem without any hesitation.The PID trainer is also well accepted and used by colleges at the same and at other engineering schools.Due to the online help,there is no need for large documentation.New versions can be produced easily.The content of the control theory course was changed this year and the course now starts with fuzzy control as the first topic.A training tool that does not need any knowledge of system theory was necessary.It was obvious that a LabVIEW fuzzy simulator meets these requirements.After an intro-duction to fuzzy control and to the LabVIEW Fuzzy Controller Design tool,the students designed a fuzzy controller for the tank example of the fuzzy toolkit.The race track competition was launched and one week later,the results were presented.It was astonishing that after24lessons of control theory,including an introduction to fuzzy control,the students presented good solu-tions for this control problem.An experienced control engineer has to spend at least two hours to produce a competitive solution.With classical PID control it is hardly imaginable to solve this multivariable,nonlinear control problem with only 24lessons of control theory.In the laboratory,all the students were able to design a fuzzy controller for a laboratory experiment.The VIs were avail-able and the students only had to design a fuzzy controller.Since a lot of time was spent on simulation,the exam should test the same skills.In the exam the students had to design a fuzzy controller for the house temperature control problem.The feed-back on an exam with simulation was not always good,because the students claimed that the resultTable1.Assessment of the fuzzy simulation exercise Topic CriteriaDisturbance compensation I/O characteristics:sensiblefunction for disturbancecompensation(meets functionin1b)Choice of input variables physically sound justificationcontroller independent ofsetpoint valuedistinctness of arguments Linguistic variables rangesnaming of termssensible number of termsmembership function sensible rules appropriatecontrollerperformanceFig.6.Measuring directions of the car sensors. J.P.Keller208。

基于LabVIEW模糊自适应PID的实现

基于LabVIEW模糊自适应PID的实现

基于LabVIEW模糊自适应PID的实现作者:齐小坤彭宇宁陆超何心孟凡钰来源:《计算技术与自动化》2011年第04期文章编号:1003-6199(2011)04-0038-摘要:通过LabVIEW与MATLAB进行混合编程的方式,借助两软件各自的优势,设计出具有模糊自适应PID控制算法的虚拟仪器,并对不同的对象特性进行控制系统的仿真与三容水箱液位的实时测控。

实验结果表明,模糊自适应PID控制系统的控制效果良好,具有较强的鲁棒性。

关键词:LabVIEW与MATLAB的混合编程;模糊自适应PID;鲁棒性;虚拟仪器中图分类号: TP273.4 文献标识码:AFuzzy Adaptive PID Realization Based on LabVIEW(School of Electrical Engineering, Guangxi University, Nanning 530004, China)Abstract:With advantage of LabVIEW and MATLAB, the paper which gets LabVIEW and MATLAB mixed, designs a fuzzy adaptive PID control algorithm of virtual instrument. It not only simulates of control system for different object characteristics, but also measures and controls three let water level of the real-time. According to the results of experiment, the effect of fuzzy adaptive PID control system control having the strong robustness is superior.PID;robustness;virtual instrument1 引言自PID算法诞生以来,以其结构简单、稳定性好、工作可靠、调整方便而成为工业应用中的首选控制策略之一,其在模型确定、线性系统中具有良好的控制效果,但在非线性、强耦合、大滞后、模型不确定的情况下则显得力不从心。

自适应模糊PID控制器的设计与仿真

自适应模糊PID控制器的设计与仿真

自适应模糊PID控制器的设计与仿真自适应模糊PID控制器是一种结合了模糊控制和PID控制的自适应控制器,它能够在系统的不同工况下根据实际需求对PID参数进行自适应调整,从而使得系统具有更好的动态性能和稳定性。

本文将介绍自适应模糊PID控制器的设计思路和仿真过程。

1.设计思路1.1系统建模首先需要对待控制的系统进行建模,得到系统的数学模型。

这可以通过实验数据或者理论分析来完成。

一般情况下,系统的数学模型可以表示为:$G(s)=\frac{Y(s)}{U(s)}=\frac{K}{s(Ts+1)}$其中,K是系统的增益,T是系统的时间常数。

1.2设计模糊控制器接下来需要设计模糊控制器,包括模糊规则、模糊集和模糊运算等。

模糊控制器的输入是系统的误差和误差的变化率,输出是PID参数的调整量。

1.3设计PID控制器在模糊控制器的基础上,设计PID控制器。

PID控制器的输入是模糊控制器的输出,输出是控制信号。

1.4设计自适应机制引入自适应机制,根据系统的性能指标对PID参数进行自适应调整。

一般可以采用Lyapunov函数进行系统性能的分析和优化。

2.仿真过程在仿真中,可以使用常见的控制系统仿真软件,如MATLAB/Simulink 等。

具体的仿真过程如下:2.1设置仿真模型根据系统的数学模型,在仿真软件中设置仿真模型。

包括系统的输入、输出、误差计算、控制信号计算等。

2.2设置模糊控制器根据设计思路中的模糊控制器设计,设置模糊控制器的输入和输出,并设置模糊规则、模糊集和模糊运算等参数。

2.3设置PID控制器在模糊控制器的基础上,设置PID控制器的输入和输出,并设置PID参数的初始值。

2.4设置自适应机制设置自适应机制,根据系统的性能指标进行PID参数的自适应调整。

2.5运行仿真运行仿真,观察系统的响应特性和PID参数的变化情况。

根据仿真结果可以对设计进行调整和优化。

3.结果分析根据仿真结果,可以分析系统的稳定性、动态性能和鲁棒性等指标,并对设计进行调整和改进。

基于LabVIEW的直流伺服电机模糊PID控制系统

基于LabVIEW的直流伺服电机模糊PID控制系统

基于LabVlEW的直流伺服电机模糊PID控制系统LabVIEW-BasedFuzzyPIDControlSystemofDCServo-motor昊占涛-,z张桂香2(1湖南大学国家高效磨黼I程技术研究中心,长沙410082;2湖南大学机械与汽车工程学院,长沙410082)攘娶:论述了一种基予模糍PID算法的直流镯服电极控制系统,介缁了模糨PID算法及模糊控裁规鲻。

系统采用图形化的编程潜言LabVIEW,软件交互界面友好。

试验结果表明,采用该模糊PID控制器的系统能克服常规PID控制器的弊端,控制品质好,算法简单,具有实际应用价值。

关键词:直流伺服电视模糊控铡PIDLabVIEWAbstract:TheDCservo-motorcontrolsystembasedonfuzzyPIDalgorithmisintroduced。

ThefussyPIDalgorithmandtheregulationoffuzzycontrolarepresented.Thesystemhasafinesoftwareinterface,whichisrealizedbyLabVlEW。

TheresultsshowthatthefussyPIDcontrolsystemcanovercomethedrawbacksoftraditionalPIDcontroller,whichhasapracticalvalueofapplicationwithgoodcontrolperformanceandsimplealgorithm.Keywords:DCservo-motorfuzzycontrolPIDLabVIEW0引言直流伺服电视爨祷响应侠、低速平稳住好、潺速范围宽等特点,常用于实现精密谪速和位置控制的随动系统中,在工业、国防和民耀等领域内褥到广泛应瘸脚;所以,会理选择鸯漉饲服电机的控制方法。

X寸予充分发撂盔流箍鞭电梳的工作蔑麓鸯着积极的作用。

基于LabVIEW的模糊控制系统设计

基于LabVIEW的模糊控制系统设计

个预先设计好 的后缀为 . f s的模糊控制系统文件到 系统 中。
p o u t n id vd al . B tt e a p ia in o h s w o i e s r lt ey l s . B ne r t g t e me to oh L b EW r d c i n ii u l o y u p l t ft e e t o c mb n d wa ea i l e s h c o v y i tg ai h r f t a VI n i b
K e o ds: b EW ;uzy c nto he r vru lisr m e t yw r La VI f z o r lt o y; it a n tu n
1 L b E 实 现 模 糊 控 制 的 方 法 a VI W 1 1 在 L b I W 中 实 现 模 糊 控 制 有 多种 方 法 : . a VE ( ) 用 Lb I W 中 的 CN 节 点 可 以 编 辑 或 者 调 用 已 经 1利 a VE I
Z A G Y n — e gG O H n — ,I ig i H N ogs n , A o g iLU Qn -e h l j ( co l f c a ia E g er g S uh et ioo gUnvri , h n d 1 0 1 C ia Sh o o h ncl n i ei ,o tw s Jatn ies y C e g u60 3 , hn ) me n n t
摘要: 图形 编 程 语 言 L b I W 和 模 糊 控 制 系统 凭 借 其 各 自的 特 点 在 工业 生产 中得 到 广 泛 的 应 用 , 是 将 两 者 结 合 的 a VE 但
应 用比较 少。结合 L b IW 和模 糊控制 系统的优点 , aVE 分析 了 L b IW 中 实现模 糊控制 系统 的方法 , aV E 利用 PD adF zy I n uz

基于LabVIEW的模糊PID温度控制系统设计

基于LabVIEW的模糊PID温度控制系统设计

基于LabVIEW的模糊PID温度控制系统设计作者:胡荣颐简贞钊来源:《科学与财富》2018年第33期这次实训我们主要的工作是使用LabVIEW 建立一个温度控制系统。

实现系统温度的实时控制。

主要使用到的装置为一个温度控制模块,USB6008数据采集卡,PWM波输出模块和一个上位机。

主要的控制过程为通过USB6008数据采集卡采集温控箱的电压,将采集到的电压转换为温度后,分别通过传统PID控制和模糊PID控制这两种控制算法的计算,得出合适的直流控制电压,并通过直流电压与三角波相互比较的方法得出适合PWM波,实现温控箱温度的控制。

使用LabVIEW 将采集到的温度以及输出的控制电压储存到数据库中,同时还能使用LabVIEW读取数据库中的数据。

实训依托的实验设备与软件硬件:温度控制模块、USB6008数据采集卡、PWM发生电路软件:LabVIEW 2013、微软Access 2010一、引言1.1本文的主要工作这次实训我们主要的工作是建立一个温度控制系统。

实现系统温度的实时控制。

主要使用到的装置为一个温度控制模块,USB6008数据采集卡,PWM波输出模块和一个上位机。

主要的控制过程为通过USB6008数据采集卡采集温控箱的电压,将采集到的电压转换为温度后,分别通过传统PID控制和模糊PID控制这两种控制算法的计算,得出合适的直流控制电压,并通过直流电压与三角波相互比较的方法得出适合PWM波,实现温控箱温度的控制。

使用LabVIEW 将采集到的温度以及输出的控制电压储存到数据库中,同时还能使用LabVIEW读取数据库中的数据。

1.2控制器发展现状1.2.1 PID控制器自 PID 算法诞生以来,以其结构简单、稳定性好、工作可靠、调整方便而成为工业应用中的首选控制策略之一,其在模型确定、线性系统中具有良好的控制效果,但在非线性、强耦合、大滞后、模型不确定的情况下则显得力不从心。

在工业技术快速发展的今天,许多的工业过程仍具有不同程度的非线性、参数时变、模糊不确定等特性。

LabVIEW中模糊控制器的设计及应用

LabVIEW中模糊控制器的设计及应用

LabVIEW 中模糊控制器的设计及应用裴 锋,杨万生(武汉大学动力与机械学院,湖北武汉430072) 摘要: 通过火电厂给水加氨模糊控制实例,详细介绍利用LabV IEW 提供的模糊逻辑工具箱(Fuzzy Logicfor G Toolkit )设计开发模糊控制器的方法。

关键词: LabV IEW ;模糊控制器;给水;虚拟仪器 中图分类号:TP3 文献标识码:B 文章编号:100023932(2004)(01)200412031 引 言众所周知,经典控制理论解决线性定常系统的控制问题是很有效的。

现代控制理论在军事科学、空间飞行等方面得到了成功的运用。

然而对于传统控制方式,用计算机实现控制,首先要设定控制目标值,根据被控制对象的特性变化和环境变化,通过负反馈原理不断进行调节以跟踪目标值。

要设计一个满足控制目标的控制器,必须有控制数学模型,对被控制对象的物理系统作数学抽象。

而实际应用中被控制对象能用传统数学模型描述其内在特性及其变化规律的不是很多,甚至原则上说根本就没有,只是有些简单系统可以忽略其次要因素而进行某种简化,这种抽象实际上是用精确的数学形式对真实的物理系统所作的近似描述。

人们对于绝大多数系统的认识都是相当粗略的,特别是对那些复杂的非线性系统,多因素的时变系统等。

模糊控制是以模糊论集、模糊语言变量和模糊逻辑推理为基础的一种控制方法,从行为上模仿人的模糊推理和决策过程的一种智能控制方法。

它先将操作人员或专家的经验制定成模糊控制规则,然后把来自传感器的信号模糊化,并用此模糊输入适配控制规则,完成模糊逻辑推理,最后将模糊输出量进行解模糊化,变为模拟量或数字量,加到执行器上。

模糊逻辑本身是一种系统的推理方法,其控制策略来源于专家语言信息,因而能够解决许多复杂而无法建立精确数学模型系统的控制问题。

2 LabVIEW 模糊逻辑工具箱简介LabVIEW 的模糊逻辑工具箱(Fuzzy Logic for G Toolkit )用于设计基于规则的模糊控制器,主要应用领域为工业过程控制及专家系统。

基于labview的模糊自适应pid控制在恒压供水系统中的应用

基于labview的模糊自适应pid控制在恒压供水系统中的应用

113 节能技术与应用示NO.04 2020 W能ENERGY CONSERVATION 基于LabV旧W的模糊自适应PID控制在恒压供水系统中的应用朱多林1韦彪2栗金晶2刘嘉祥2刘欢2(1.长安大学建筑工程学院,陕西西安710061 ; 2.长安大学住房和城乡建设部给水排水重点实验室,陕西西安710061 )摘要:介绍了一种利用L abV丨E W语言设计的基于虚拟仪器的模糊P ID控制系统在恒压供水中的应用利用L ab V IE W的模糊逻辑工具箱(Fuzzy Logic for G T o o lk it)设计模糊自适应P ID控制器,由于其较高的稳定性和自动 优化能力,既能提高系统供水的保障性,又达到了节能的效果。

同时该系统能够实现水压的在线监测和动态分析,并将数据自动保存成表格,可以通过对每天的水压教据分析处理,来不断地改进和优化系统,关键词:Lab V IE W ;模糊P ID控制;虚拟仪器;恒压供水中图分类号:T P273 文献标识码:B文章编号:1004-7948 (2020) 04-0113-03doi : 10.3969/j.issn.l()04-7948.2020.04.034The application of fuzzy adaptive PID control based on Lab V IEW in constant pressure water supplysystemZ H U D u o-l i n W E I B i a o L I Jin-jing et alAbstract :I n t r oduces the application o f a f u z z y P I D control s y s t e m b a s e d o n virtual i n s t r u m e n t d e s i g n e d b y u s i n g L a b V I E W l a n g u a g e in constant pressure w a t e r s u p p l y..B e c a u s e o f its hig h stability a n d a u t omatic optimization ability,i tc a n not o n l y i m p r o v e the s y s t e m w a t e r s u p p l y supportability b ut also a c h i e v e the e n e r g y s a v i n g.A t the s a m e t i m e,thes y s t e m c a n realize the o n-l i n e m o n i t o r i n g a n d d y n a m i c analysis o f w a t e r p r e s s u r e,a n d automatically s ave the data into tables,w h i c h c a n b e c h a n g e d continuously b y analyzing a n d processing the daily w a t e r pressure d ata.Key words :L a b V I E W ;f u z z y P I D ;virtual instrument ;constant pressure w a t e r supply引言由于计算机技术和变频技术的H臻成熟和完善,传 统的高位水箱和压力罐等供水设施逐渐被以变频调速为 核心恒压供水系统所取代。

基于LabVIEW模糊控制PID底盘测功机设计

基于LabVIEW模糊控制PID底盘测功机设计
( 庆 大 学 自动 化 学 院 重 重庆 4 04 ) 0 0 4

要 :底盘测 功机 是一种 不解 体检验摩托车性能的检测设备 , 过在室 内台架上进行模 拟道路 行驶工况 来检测 摩 通
托车 的动力性 、 工况排放指标和油耗等 。采用 P C控制变频 器来 改变 电力 测功机 励磁 电流的 大小 , L 来达 到改变模拟 加载 阻力 的要求 。基 于虚拟仪器 图形 化编程软件 L b E 平 台, aⅥ w 设计 测功机 测控 系统进行 实验数据 采集处 理并且 控制 道路 模拟阻力 加载 。利用 L b E 中 MA A aⅥ w TL B节 点 , 设计模糊控制 P D算法对 系统 的模拟摩擦力加载部分进 I
b s d o b i w a e n La v e
Du n Qi a g W uZh n d n HeGu s e g Z o gAn o g a c n h eg o g ohn h n yn
( o g ig u ie st uo to cde Ch n qn nv riyA tma in a a my, o g i 0 0 4 Ch n qng4 0 4 )
Ab ta t Ch s i y a me e , i d o e t g d vc s d O ts s e l t r y l p ro ma c , a e e t sr c : a ss d n mo t r a k n f t s i e ie u e t e t a s mb y mo o c ce e f r n e c n d t c n mo o c ce p r e e s s c sd a c p r o a c n x a s o n n e p r t g c n i o n rp c mp t ra d t r y l a a t r u h a y mi e f r n e a d e h u t i tu d ro e a i o d t n a d t i o u e n m n m p n i S n PL wa s d t o t o h r n d c r c a g u r n f t e d a mee , O t a O c a e smu a e o d O o , C s u e o c n r l t e ta s u e , h n e c r e t o h y mo t r S h t t h n i lt d l a n g

基于LabVIEW与MATLAB的模糊参数自整定PID控制

基于LabVIEW与MATLAB的模糊参数自整定PID控制
6l,
它们分别通过各自的最化冈,转换到模糊控制器 的幂术沦域,量化刚了∞计算公式为:
}增钾垣
哇搏鲥秽曙
翻3 Fuz目・P盼仿真控制系统
0 01
女:—旦一k一旦!骂 2
(∥一口】x
(4)
(3)定义备语占变量的语占值 将所有变量取值为r正大”,“正,”,“正小”, “零”,“负小”.“负中”,“负大”}= {PB,PM,Ps,zO,Ns,NM,N埘。 “)定义其语苦值的隶幅度甬教 FIs编辑器中提供有lI利,隶属度函数供使用者 选择使用。隶属度函数町采用吊制-型、梯形和二角 形,理论}。吊制t型最为理想,但是计算复杂:实践 证明:用二角形和梯彤函数系统性能并没有1分明 碡的差别。为了简化计算,现在垃常用的是二角形, J【次是梯形隶属函数。 (5)定义变量的规则 模糊化枷则育三神输入形式,-Ⅱ在
f娩巧reaSoning
system is
up锄d
applied,which has
good control efI'ect狮d robuSt
perfb册加ce.
LabVIEW
and MATLAB FlS
Key words:Fuzzy Parameter Editor Simul ink
selfadjuSting
PlD
mixed programming of

引言
传统的PID控制器结构简单,稳定性好,可靠
可实现对PID参数在线自适应调整,使系统既具有 模糊控制的灵活、适应性强的优点,又具有PID控 制精度高的特点。模糊控制器是当前控制领域的研 发热点之一,其研发的方法不尽相同。本文阐述了 利用LabVIEW与MATLAB混合编程技术将 MATLAB中的模糊逻辑工具箱(FIS Tbolbox)与 LabVIEW虚拟仪器开发软件集成,研制出模糊参数 自整定PID虚拟控制器,并实现了对非线性系统的 实时测控。

基于LabVIEW的PID参数自整定控制器设计

基于LabVIEW的PID参数自整定控制器设计

且基于此算法的控制器已被广泛应用于商品化温度控 制器中 ,如 Modicon TSX Compact 984 2 258 型 PLC 和西门 子公司生产的 PLC S7 2 200 自整定控制器等
[3 - 4 ]

迄今为止 ,继电反馈 P I D 参数自整定算法及其改 进形式的研究主要基于 M atlab 平台 , 但 Matlab 很难对 实际系统进行实时控制 。然而虚拟仪器拥有强大的数 据采集 、 处理功能 , 能够方便地与实际被控对象相连 接 ,并具有良好的人机界面 。这些优势使其成为控制 领域研究人员和工程师较多使用的辅助工具
,
1 系统设计总体结构
本文设计的系统总体框架如图 1 所示 。系统首先 是建立被控过程的数学模型 , 可以建立通用模型模块 , 也可选择典型模型 ; 在模型建立后 ,程序将自动对其进 行时域及频域性能分析 ; 之后是 P I D 控制器离线仿真 及在线实时控制设计 , 观察系统的控制效果 。各部分 功能由 LabV IEW 的 TAB 控件联系在一起 。
图 1 系统总体结构
Fig . 1 Overall structure of the system
2 被控过程模型建立与分析
国家自然科学基金资助项目 (编号 : 60704045) 。 修改稿收到日期 : 2009 - 01 - 19。 第一作者刘撷捷 ,男 , 1986 年生 ,现为中山大学信息科学与技术学院 在读硕士研究生 ; 主要从事 P I D 控制 、 自动化仪器仪表等方面的研究 。
tab控件被控过程数节模犁建立被控过程模型分析pid控制器设计与仿真pid参数自整定控制嚣离线仿真pid参数自整定控制嚣实时控制图i系统总体结构figioverallstructureofthesystem2被控过程模型建立与分析用户可以通过多项式的形式或者零极点增益形式建立通用被控过程模型

基于LabVIEW的模糊PID控制系统_何春华

基于LabVIEW的模糊PID控制系统_何春华
2010年第 7期
仪表技术
# 57#
基于 LabV IEW 的模糊 PID 控制系统
何春华, 蔡志岗 ( 中山大学 光电材料与技术国家重点实验室, 广东 广州 510275)
摘要: 为了实现直流电机 快速可靠的定速控 制, 针对 模糊 和 P ID 算法 的优缺 点, 设计 了基于 LabV IEW 平台 实现 的二维 模糊 P ID 控制器, 硬件方面应用 ATmega16单片机和 ST135光电门来精确测量转速和驱动电机转动。实验结果表明, 基于 L abV IEW 灵活 的在线编程与控制, 使模糊与 P ID 算法切换结合应用, 系统得到很好的控制精度, 并有较强的鲁棒性。
D uk = uk - uk- 1
=K p
ek -
ek - 1 +
T Ti
ek
+
Td
ek
-
2ek- 1 + T
ek- 2
= A ek + B ek - 1 + C ek- 2
其中: A = K p
1+ T + Td Ti T
= K p + K i + K d;
B=
- K p ( 1+
2T d ) = T
作者简介: 何春华 ( 1988) ), 男, 本科在读, 主要从事虚拟仪器、自动控制及微电子方面的研究; 蔡志岗 ( 1962) ), 男, 博士, 教授。
# 58#
仪 表 技术
2010年第 7期
机和 ST 135光电门来精确测量转速和驱动电机转动。 ATm ega16单片机的主要功能有:
1) 用定时计数器 TC1捕捉中断, 测量电机转速。 2) 与 LabV IEW 通信收发测量和控制数据。 3) 用定时计数器 TC1产生并改变 10位 PWM 波 的占空比来控制直流电机的定速转动。 带缝隙的电机转轮通过 ST 135光电传感器可以产 生高低电平供给单片机捕捉中断测速; L 298N 可以放 大单片机的控制信号以驱动电机转动。

基于LabVIEW的模糊PID温度控制器

基于LabVIEW的模糊PID温度控制器

u s i n g a mo d i i f e d P I D c o n t r o l a l g o r i t h m,T h e c o n t ol r e f f e c t i s b e t t e r t h a n t h a t o f L a b VI E W s o t f w a r e l i b r a r y VI ,
Abs t r a c t : I n o r d e r t o o v e r c o me t h e t r a d i t i o na l r e s i s t a nc e f u r na c e o p e r a t i o n c o mp l e x a n d l o w a c c u r a c y o f t e mp e r a t u r e c o n t r o l p r o b l e ms,f o r me d a t e mp e r a t ur e c o n t r o l s y s t e m b a s e d o n L a b VI EW , e a s y t o s e t t h e t e mp e r a t u r e c o n t r o l c u r v e,t h e t e mp e r a t u r e c o n t r o l pr e c i s i o n i s h i g h,a l s o h a s t h e f u nc t i o ns s u c h a s s a v i n g d a t a . Te mpe r a t u r e c o n t r o l b y
基于 L a b V I E W 的模 糊 P I D 温 度 控 制 器

一种基于Labwindows和Matlab的模糊自适应PID控制器设计

一种基于Labwindows和Matlab的模糊自适应PID控制器设计

图 1 模 糊 自适 应 P I D 控 制 器 结 构
2 . 3 P I D参 数整 定原 则
根据 系 统 在 受控 过 程 中对 应 不 同的 E和 E C , 将
I D参 数 的整定 原则 归纳如 下 : 糊集合论、模糊语言变量 以及模糊逻辑推理为基础 , P
① 当I E 1 较大时,说明误差的绝对值较大, 应
2 . 2模 糊 自适应 P I D控制 器系 统结 构
常规 数字 P I D控 制 算法 的 形式 为 : ( s ) = K ( s ) +
学 模型 , 难 以处 理 复杂 的非 线性 控制 系 统 。模 糊控 制 K + s E ) 。 式 中 E( s ) , U ) 分别 为 P I D控 制器 S 是 基于 规 则 的一 种 智能控 制 方式 , 它 不 依赖 于 被控 对 的输入 和 输 出 , 。 、 、 K 分 别 为 比例 、积 分 和 微 分 系 象 的精 确数 学模 型 , 是在 总 结操 作经 验 基础 上 实现 自 数 。常规 P I D控制 只 适用 于线 性控 制 系统 , 且需 要建 动 控制 的一种手 段 , 结构 简 单 , 鲁棒 性较 好 , 因而得 到 立 被控 对象 精确 的数 学模型 。
的 闭环数 字控制 系统 。 模 糊控制 把人 的经 验转 化为控 取较大值, 以提高响应的快速性; 而为防止l E c l 瞬时

1 4 4 ・ 福建电脑 l 2 0 l 4 年 第1 期
r i n

,、 e
好 的鲁 棒性和 动 、 静态性 及具 有 良好 的 自适应 性 。
2模 糊 自适应 P I D控 制 系统 的设 计
I J _ l

基于LabVIEW的PID参数自适应模糊控制器设计

基于LabVIEW的PID参数自适应模糊控制器设计

基于LabVIEW的PID参数自适应模糊控制器设计宋智罡;郁其祥;王益明;陆殿健【期刊名称】《机械设计与制造》【年(卷),期】2003(000)004【摘要】PID算法是一个广泛应用于工业控制的算法,但它对非线性和不确定性系统适应性不够理想.PID参数自适应模糊控制器将模糊逻辑推理引入PID参数的在线自调整,是目前一种较为先进的控制器.考虑到LabVIEW是一种基于G语言的高效的专为科学家和工程师设计的虚拟仪器开发工具,这里将Fuzzy Logic Toolkit和PID Controller Toolkit两个工具箱与LabVIEW相结合,实现了上述算法.正是因为LabVIEW能快速构建实现交互控制系统的图形用户界面,并且它与测量、自动化硬件紧密的结合完善了数据采集、信号分析和信息显示的解决方案,这种基于LabVIEW的PID参数自适应模糊控制器在工业控制领域必将有广阔的前景.【总页数】3页(P11-13)【作者】宋智罡;郁其祥;王益明;陆殿健【作者单位】上海交通大学,上海,200030;上海交通大学,上海,200030;上海交通大学,上海,200030;上海交通大学,上海,200030【正文语种】中文【中图分类】TP2973.+4【相关文献】1.基于参数自适应Fuzzy-PID换热站温度控制系统的设计 [J], 贠卫国;孙阳阳2.基于参数自适应模糊PID中央空调控制系统的设计 [J], 张红岭;洪斌;桂垣;张静静;郑运昌3.基于参数自适应模糊PID中央空调控制系统的设计 [J], 张红岭;洪斌;桂垣;张静静;郑运昌;4.基于RBF神经网络的参数自适应PID变桨控制器的设计 [J], 张真源;刘国荣;杨小亮;刘科正;邓争5.基于LabVIEW设计的模糊控制器在恒压供水中的应用 [J], 王健;李郝林因版权原因,仅展示原文概要,查看原文内容请购买。

基于Matlab模糊自适应PID控制器设计

基于Matlab模糊自适应PID控制器设计

基于Matlab模糊自适应PID控制器设计摘要:本文介绍了用模糊推理的原则进行PID参数的整定方法,并利用MATLAB仿真相结合的方法,实现了模糊自适应PID控制器与常规PID控制器的仿真与比较。

关键词:模糊控制PID 自适应0引言PID控制广泛应用于工业控制过程。

但是大多数工业过程存在着非线性、参数时变性和模型不确定性,常规PID控制就显得无能。

模糊自适应控制是一类应用模糊集合理论的控制方法,特别适用于一些大滞后、时变、非线性的复杂系统。

1模糊自适应PID控制器设计1.1模糊自适应PID控制器的结构模糊自适应PID控制器在PID控制器的基础上根据系统偏差e和偏差变化率ec,利用模糊规则进行模糊推理,使控制对象具有良好性能,从而控制的目的。

结构如下图图1自适应模糊PID1.2模糊自适应PID控制算法的设计(1)精确量得模糊化该控制器采用2输入3输出的形式,输入语言变量e和ec的论域均为: {e、ec}={-3,-2,-1,0,1,2,3},其模糊集为{NB,NM,NS, ZO, PS, PM, PB},子集中元素分别为负大、负中、负小、零、正小、正中和正大。

输出语言变量ΔKp、ΔKi、ΔKd 的论域为:ΔKp、ΔKi、ΔKd={-3, -2, -1,0, 1, 2, 3},其模糊集为{NB,NM,NS, ZO, PS,PM, PB}。

(2)建立模糊控制规则依据自整定原则及工程设计人员的技术知识和实际操作经验,可列出相应的参数调节规则,建立参数Kp、Ki、Kd模糊控制规则表,如表1所示(3)Simulink 下的模糊推理与模糊控制器的建立可以利用模糊逻辑工具箱在MATLAB命令窗口输入fuzzy命令按回车键,出来FIS Editor窗口,下来在编辑菜单下添加输入输出模块及进行规则添加,打开文件夹建立一个fis型文件,保存为fuzzy.fis。

2 系统仿真(1)仿真控制对象将该模糊模糊自适应PID控制器用于某压力控制系统中,仿真所选择数学模型是三阶系统它的近似模型为(2)基于MATLAB系统仿真根据上面的分析和被控对象的传递函数,在SIMULINK窗口建立一个Mdl 模型,保存Untitled145.mdl如下图图2模糊参数自适应PID控制系统仿真模型运行时首先点击模糊控制器弹出对话框令参数等于a,在命令窗口可以通过通过a=readfis(‘fuzzy’)按回车进行读取。

基于Labview的模糊PID温度控制系统

基于Labview的模糊PID温度控制系统

下位机接 收的 PID参数控 制输 出PWM 波 ,从 而控 制加热装 置的功率 。采用模糊 PID控 制 ,改善 系统 的响应度 并且 大大的
提 高 系统 的 精 度 。 用 Labview设 计 的 上 住 机 界 面 可 以 方 便 的 输 入 控 制 变量 , 实时 显 示 环 境 温度 值 ,使 得 本 系统 控 制 灵 活 、
基 于 Labview的模糊 PID温度控制 系统
聂 乐乐 ,李丽娟 ,王劲松 ,徐 波 ,秦 国爱
(长春理工大学 光 电工程学 院 ,长春 130022)
摘 要 :本 文设计 了温度控 制 系统 ,采 用Labview语言设 计的上 位机 PID控 制 ,模糊 PID的参数 通过 串 口传输给 下 产 和 生 活 中应 用 广 泛 ,在 控 制 中经 常 会 遇 到 时 变 性 强 、滞 后 大 、线 性 度 差 的 受控 对 象 …。传 统 的温度 控 制需 要 掌握 受控 对 象 的 数学模型 ,很难确定 PID的三个参数 。本 系统采用 模 糊 PID控制 ,由于模 糊 PID不 需 要 控制 对 象 的 数 学模 型 而 是 通 过 实 时 测 量 的温 度 值 与 设 置 温度 的 差值作为控制量 的大小 ,使不 同的控制对象都能得 到最佳 的PID调整。采用 PID控制克服 了传统温度 控制 的缺点 ,又具有 了精度高 ,实 时l生强 、可靠性好 的特 点 。上 位机 用 Labview软件设 计 的控制 和 显示 程 序使 得 系统 控制 灵 活 、方 便观 察 。
原 理 简单 、应 用 广 泛 。
关 键 词 :模 糊 PID;温 度 控 制 ;PW M ;Labview
中 图分 类 号 :TP273
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

图 F 隶属函数图
调节 "#$ 三个参数的推理机制形式为: 7E .* ,;I ./0 <P?; ’! 其中: — 偏差的模糊子集 1 .* —— — 偏差变化率的模糊子集 1 ./* —— — 输出的 "#$ 参数, ’! —— ! 分别代表 $、 2、 3。 总结工程人员的技术常识和实际操作经验,在模糊逻辑控 制器设计子程序中建立针对 ’(、’* 、’+ 三个参数分别的模糊控 制规则表。控制表的设计过程见图 H 。 整个模糊推理过程采用的是常用的 M,Q R M7; 法,去模糊 化的方法是重心法 % 8?;<?= 5E B=,G7<4 或 8?;<?= 5E ,=?, ( 。 为了直观 地观察设计的三个参数对偏差和偏差变化率的变化规律是否 达到所需,在程序中还利用 H$ N2=E,8? B=,’P 控件设计了参数
%78(1&-#7 464&(3< =%>>6 807&10..(1 ?01 "-1-3(&(14 -$-"&-&#07 0? FG4 807&10..(1 #4 - 301( -$;-78($ 807&10..(1 #7
&-&#07 40.%&#079 &2#4 ?%>>6 807&10..(1 ?01 "-1-3(&(14 -$-"&-&#07 0? FG4 807&10..(1 :-4($ 07 3*JKGL0 42054 &2(
@T @ FG4 参数的模糊控制器设计
在 3*JKGL0 中, FG4 控制器的算法为: E (& ) ( ’! % " ( ) *# () * (U& ) * U U&
& $ A
% 45 %
《机械设计与制造 》 *26D FXXH
O5D !
M,8P7;?=4
$?A76;
Y
M,;2E,8<2=?
式中:! " #$ % $& 为设定值与控制过程返回量之间的偏差,’( 为比例增益,)* 为积分时间常数,)+ 为微分时间常数,, % - ( 为 控制器输出量。 普通 "#$ 控制算法一般需要通过硬件传感器采集到所需 的过程变量, 输入到程序中, 并根据需要人工设置预定值和 ’(、 最终计算出的控制量再通过 $ ) * 转换输出到 )*、)+ 三个常数, 相应的控制硬件,以达到控制的目的。在 "#$ 参数自整定模糊 控制中,则将人工输入的 "#$ 三个参数改为由模糊控制器自动 的在线校正。 而 +,-.#/0 的 12334 +5678 工具箱提供了一个完整 的模糊控制器设计系统: % 9 ( 模糊逻辑控制器设计子程序 % 12334 +5678 :5;<=5>>?= $?@ 提供一个友好的图形用户界面 % BC# ( , 可以直观地设计和 A76; ( : 修改模糊控制器的隶属函数、规则库、推理规则和去模糊方法 以备在应 等等。 设计的结果要保存在一个以 D E8 结尾的文件中, 用程序中调用。 (F ) 作为程序的一 模糊控制器子程序 % 12334 :5;<=5>>?=D G7 ( : 个功能模块 % 函数 ( , 用于在应用程序中实现模糊控制算法。每 个控制器有四个输入和一个输出,如果输入的变量较多,可以 采用将多个控制器并联的办法。 (H ) 将 D E8 文 调入控制器子程序 % +5,I 12334 :5;<=5>>?=D G7 ( : 件调入应用程序的功能模块,可以将指定文件的 "#$ 参数加载 到应用程序的模糊控制器中。 (/8 ) (J2<’2<) (/) 、 偏差变化率 和输出参数 的模糊状 将偏差 ("L) 、 正中 % "M ( 、 态论域分成 K 个子模糊集: 正大 正小 % "N ( 、 零 %J(、 负小 % ON ( 、 负中 % OM ( 、 负大 % OL ( , 各模糊集的隶属度函数 参照图 F 所示进行设置。
关键词: 虚拟仪器; 模糊控制; FG4; 3*JKGL0 【;61)/0.)】FG4 -./01#&23 #4 5#$(.6 %4($ #7 #7$%4&1#-. 807&10.9 :%& #& 2-4 $#4-$;-7&-/(4 #7 707.#7(-1 -7$ #7$%4&1#-. 807&10. -& "1(4(7&9 :(8-%4( #& (3".06 ?%>>6 .0/#8 1(?(1(78( &0 -$@%4& FG4 "-1-3(&(14 07 .#7(< *2#4 &2(4#4 803:#7(4 3*JKGL09 - 2#/2.6 "10$%8&#;( -7$ (-46 + &0 + %4( /1-"2#8 "10/1-33#7/ .-7/%-/( ?01 48#A (7&#4&4 -7$ (7/#7((149 5#&2 =%>>6 B0/#8 *00.C#& -7$ FG4 &00.C#&9 -7$ 1(-.#>( 4%82 -7 -./01#&23< D(8-%4( 3*JKGL0 8-7 E%#8C.6 81(-&( /1-"2#8 %4(1 #7&(1?-8( &2-& /#;( 60% #7&(1-8&#;( 807&10. -7$ #&4 &#/2& #7&(/1-&#07 5#&2 3(-4%1(3(7& -7$ -%&03-&#07 2-1$5-1( ?-8#.#&#(4 $(;(.0"3(7& 0? $-&- -8E%#4#&#079 -7-.64#4 -7$ "1(4(7A "103#4#7/ ?%&%1( #7 #7$%4&1#-. 807&10. ?#.($< <"- =%/21> 83/)+0$ 3(1)/+’"()? @+,,- .%()/%$? 45!? 706859: 文献标识码:1
@ 系统设计
@T E 算法概述
如图 E 所示, FG4 参数自适应模糊控制器是在常规 FG4 调 节器的基础上,应用模糊集合理论建立参数 !"、!# 、!$ 同整个 闭环过程的反馈信号之间模糊逻辑关系,并且根据不同的反馈 信号在线自调整参数 !" 、 ! #、 !$ 的一种模糊控制器。
图 E FG4 参数自适应模糊控制器的系统框图
图 ! "#$ 参数 % &’ (表的各类旋钮、 开关、 刻度盘、 +/$ 以 及阀门、 管道、 泵等控件, 用于控制和显示系统状态, 如图 V 所 示;后者是对应前面板的 B 语言程序,雷同于各种可视化编成 “功能 开发软件 % 如 .7A2,> L,A78、 它主要由 $?>’P7 等 ( 的源程序, “数据线 ”组成, “功能节点 ”完成各种函数计算及 节点 ”和 其中 “数据线 ”引导程序内部数据的流向。 程序结构功能,
《机械设计与制造 》 5[(J D@@A 文章编号: ?@@? % AYY> . D@@A C @F % @@?A % @D
\1J F
U=64$’-/:
H-9$(’
]
U=’[^=63[/-
) *+ )
双曲线及抛物线规的设计
贺四清 李 峰 . 空军工程大学工程学院, 西安 >?@@AB C !" #$ % &$’() *+ ,-’( . "’($’--/$’( 0122-(-) 34- 5$/ ,1/6- "’($’--/$’( 7’$8-/9$3:) ;$ < =’ >?@@AB,04$’= C 999999999999: 999999999999999999999999999999999999999999999: 【摘要】 介绍了一种双曲线及抛物线的绘制工具, 它的工作原理是模拟圆锥面与平面相交所产生的截 999999999999: 交线的形成过程, 从而实现了双曲线及抛物线的绘制; 并就实现双曲线及抛物线轨迹建立了数学模型。 关键词: 圆锥; 截交线; 双曲线; 抛物线 【 !.$2-042】 ,- .""./.01’ $2’#3-2$ 04 $/.5 67"2/849. .-$ "./.849. #’ #-0/4$1:2$ #- 06#’ "."2/; 87 ’#<1= 9.0#-3 062 #-02/’2:0#-3 "/4:2’’ >4/<#-3 .- #-02/’2:0#-3 9#-2 87 . :4#- .-$ . "9.-2? @2-:2; #0 A ’ "4’’#892 04 $/.5 67"2/849. .-$ "./.849.; .-$ 062 <.062<.0#:.9 <4$29’ 04 >4/< 062 67"2/849. .-$ 062 "./.849. 94:1’ ./2 2’= 0.89#’62$? B2.-56#92; #0 .9’4 2C"9.#-’ 645 04 1’2 062 $/.5#-3 .""./.01’? 5#+ 1(-"$6 7(%’8 9’2#-$#42%’& /%’#8 :+,#-.(/08 ;0-0.(/0 文献标识码: 5
相关文档
最新文档