INTELLIGENT MAGNETIC FIELD CONTROLLER BASED ON SUITABLE MICROCONTROLLER PLATFORM

Size: px
Start display at page:

Download "INTELLIGENT MAGNETIC FIELD CONTROLLER BASED ON SUITABLE MICROCONTROLLER PLATFORM"

Transcription

1 INTELLIGENT MAGNETIC FIELD CONTROLLER BASED ON SUITABLE MICROCONTROLLER PLATFORM A dissertation submitted to the University of Manchester for the degree of Master of Science in the Faculty of Science and Engineering 2016 Clement Adedeji Department of Computer Science

2 Contents LIST OF FIGURES... 3 ABSTRACT... 5 DECLARATION... 6 INTELLECTUAL PROPERTY STATEMENT... 6 ACKNOWLEDGEMENTS INTRODUCTION Aims and Objectives Deliverables Structure of Report BACKGROUND Control Theory Open and Closed Loop Control Systems Transfer functions Controlling Dynamic Systems- Process Controllers Tuning of Controller Parameters Microcontroller and Hardware Microcontroller Boards Project Microcontroller Requirements Microcontroller Boards Comparison Complete Microcontroller Setup METHODOLOGY, HARDWARE AND SOFTWARE COMPONENTS Input- User defined value and Gauss meter interaction Controller and Power supply Power Supply Communication PID Design and Tuning Output of Electromagnet Frameworks used for Software Development Software Development on Visual Studio Software Development on the Arduino Overall Software Analysis IMPLEMENTATION Implementation in Standard C on Visual Studio Communication with Gauss meter Communication with Kepco- GPIB instrument control Transfer function and Tuning parameters

3 4.3 Fully integrated system and PID Implementation using standard C Arduino Implementation TESTING AND RESULTS Software Testing and Evaluation Instruments Communication Response Gauss meter communication Kepco Power supply communication Kepco and Gauss meter combined communication PID Results using Manual Tuning CONCLUSION AND FUTURE WORK Future Work REFERENCES Word Count: 18,477 words 2

4 LIST OF FIGURES Intelligent Magnetic Field Controller Based on Suitable Microcontroller Platform Figure 1.1-Control System Interaction Figure 2.1: Open loop control adapted from [25] Figure 2.2: Closed loop control adapted from [25] Figure 2.3: Negative feedback system adapted from [6] Figure 2.4: Derivative control taken from [6] Figure 2.5: PD control taken from [6] Figure 2.6: Integral controller output taken from [6] Figure 2.7: PI control output taken from [6] Figure 2.8: PID block diagram taken from [26] Figure 2.9:Step input Figure 2.10-: PD controller response to step input Figure 2.11-: P controller response to step input Figure 2.12-: PID controller response to step input Figure 2.13-: PI controller response to step input Figure 2.14: Zeigler-Nichols open loop method replotted from [6] Figure 2.15: Some of the boards in the Arduino range (a) Uno (b) Mega- taken from [20] Figure 2.16: Raspberry PI 3 model B taken from [24] Figure 2.17:Sparkfun USB host shield for Arduino Figure 2.18: LCD keypad shield Figure 2.19: Microcontroller full setup using Arduino and components Figure 3.1: Major project parts Figure 3.2:Lakeshore 425 Gauss meter- front and rear view with connected probe Figure 3.3:Kepco power supply front view and rear view showing GPIB USB connection Figure 3.4: Power supply communication process Figure 3.5: Block diagram representation of whole system Figure 3.6: System's step response showing parameters derivation taken from [27] Figure 3.7-Step response of Example system taken from [19]. (a) Is the systems output and (b) is the process input Figure 3.8:Tuning equations using Zeigler Nichols open loop method Figure 3.9: MATLAB code to simulate Tuning adapted from [20] Figure 3.10: Auto tuning of sample transfer function Figure 3.11: Electromagnet with its power cables Figure 3.12: Hall sensor probe setup to get the field measurement Figure 3.13: Microsoft Visual studio community 2015 Development environment Figure 3.14:Arduino Development Environment Figure 3.15:Software Flow of System Figure 4.1: Needed header files for Gauss meter communication Figure 4.2: Variable initialisation and port opening adapted from [28] Figure 4.3: Gauss meter settings Figure 4.4: Writing to COM port Figure 4.5: Monitoring data from Gauss meter & reading it with error checking- adapted from [28] 55 Figure 4.6: Headers for Kepco setup Figure 4.7: Initialisation, opening device I/O and error checking adapted from [29] Figure 4.8: Writing voltage value to Kepco and requesting the value back adapted from [29] Figure 4.9: The Complete System setup Figure 4.10: Combining software parts in PID loop Figure 4.11: PID loop implementation code snippet

5 Figure 4.12: Writing PID value to power supply and getting time taken Figure 4.13: Arduino USB host shield Figure D-link USB hub Figure 4.15-Microcontroller setup Figure 4.16-Detecting devices connected to USB hub taken from [30] Figure 4.17: LCD keypad shield for user interaction Figure 4.18: Getting set point from keypad shield Figure 4.19: PID loop on the Arduino Figure 5.1: Identification query to Gauss meter and response received Figure 5.2: Gauss meter reading and value received by program Figure 5.3: Kepco Identification received from device Figure 5.4: Kepco voltage set remotely and printed by program Figure 5.5: Value of 15V set to Kepco producing a field of 0.038T as shown on Gauss meter Figure 5.6: Received values of the Kepco and Gauss meter Figure 5.7: Data from the program run without PID Figure 5.8: System's response without PID with set point at 0.015T Figure 5.9: Program output with PID Figure 5.10: PID System's response with better response and little steady state error for a set point of 0.015T Figure 5.11: Comparing system's response with and without the PID action for a set point of 0.015T

6 ABSTRACT The use of intelligent controllers is widespread and used for various purposes ranging from straightforward applications like temperature control to more complex applications such as cruise control in cars or aeroplanes. Primarily, intelligent controllers ensure the stability of the system they are concerned with and give corrective action so as to keep the system output as close as possible to the set point/reference input despite any disturbances. The design of an intelligent controller has to take into account many factors. These factors include the hardware on which the controller would be implemented, the type of controller that is needed, the mathematical model of the controller and the tuning techniques. This project implements one such type of intelligent controller which specifically controls the field of an electromagnet by adjusting the current supplied to the coils of the electromagnet. The work reported in this dissertation covers the different stages of implementation from the needed background knowledge in control theory to the considerations for the microcontroller and then communication with the power supply and magnetic field (Hall) sensor. The controller implemented is a PID controller so the tuning technique used is also covered. The implementation of the system was first done on the computer and then work was done to move it onto the microcontroller which was the Arduino. Assembly of the system hardware was straightforward as they are standalone components but there was a lot of work involved in establishing communication between the magnetic field sensor, power supply and the computer especially because the hardware laboratory equipment that was used needed some significant low-level programming effort. The system was tested for performance and efficiency at different levels and demonstrated the needed functionality. 5

7 DECLARATION This dissertation is my original work unless referenced clearly to the contrary, and no portion of the work referred to in the dissertation has been submitted in support of an application for another degree or qualification of this or any other university or other institute of learning. INTELLECTUAL PROPERTY STATEMENT I. The author of this dissertation (including any appendices and/or schedules to this dissertation) owns certain copyright or related rights in it (the Copyright ) and s/he has given The University of Manchester certain rights to use such Copyright, including for administrative purposes. II. III. IV. Copies of this dissertation, either in full or in extracts and whether in hard or electronic copy, may be made only in accordance with the Copyright, Designs and Patents Act 1988 (as amended) and regulations issued under it or, where appropriate, in accordance with licensing agreements which the University has entered into. This page must form part of any such copies made. The ownership of certain Copyright, patents, designs, trademarks and other intellectual property (the Intellectual Property ) and any reproductions of copyright works in the dissertation, for example graphs and tables ( Reproductions ), which may be described in this dissertation, may not be owned by the author and may be owned by third parties. Such Intellectual Property and Reproductions cannot and must not be made available for use without the prior written permission of the owner(s) of the relevant Intellectual Property and/or Reproductions. Further information on the conditions under which disclosure, publication and commercialisation of this dissertation, the Copyright and any Intellectual Property and/or Reproductions described in it may take place is available in the University IP Policy (see in any relevant Dissertation restriction declarations deposited in the University Library, and The University Library s regulations. 6

8 ACKNOWLEDGEMENTS Intelligent Magnetic Field Controller Based on Suitable Microcontroller Platform I thank God Almighty for seeing me through and granting me the opportunity and needed abilities. Much gratitude to my supervisor Prof. Thomas Thompson. You have been very instrumental to the realisation of this project. Your support, constructive criticism and guidance are so wonderful, and not to mention the speed at which you give feedback. I cannot thank you enough. Also to Craig Barton, I extend my gratitude and really appreciate your help with technical difficulties and your constant follow-up to ensure I was making progress. I cannot forget your assistance. To my wonderful parents Mr and Mrs Adedeji, I appreciate your continued love, support, understanding and prayers; can fully say it is what has kept and brought me this far. My amazing brothers and sister Rotimi, Yemisi and Tobi, your help, encouragements and prayers are greatly appreciated, means a lot and was a real pillar of support. Love you all to bits. Finally, to all my friends and particularly Jemima and Sunesh. You were extremely helpful and available during the project implementation, kept spurring me on and helping me and indeed made the whole experience memorable, I appreciate you all. Even if I cannot mention all your names but I have all of you in mind. God bless. 7

9 1. INTRODUCTION Intelligent Magnetic Field Controller Based on Suitable Microcontroller Platform The first recorded occurrence of magnetism was made by the Chinese in 2637 BC [1]. Emperor Hoang-Ti was reputed to have a chariot figurehead that pointed south regardless of the chariot s direction. This was what developed into the compass. The magnet was produced from an ore called Magnesian stone which gave birth to the name magnet [1]. Magnets are ubiquitous and are key to the functioning of many devices and industrial processes. Some of their applications are listed below to mention a few: Magnetic resonance imaging in healthcare. Maglev trains for transportation- they operate on magnetism and have no wheels as the train floats on the track due to repulsion and thus removes friction. Many rotating systems work on the magnetism principle- normally one magnetic field trying to align with another cause the rotation. High-powered magnets are used in ports to move containers. Data storage- in hard disk drives (HDDs), the magnetic material called the platter holds data. There are two types of magnets named permanent and temporary magnets. The difference between these two types of magnets is in the duration of how long they retain their magnetism. Permanent magnets retain their magnetism after the magnetic field applied to the material has been removed but temporary magnets do not retain their magnetism. Temporary magnets are easy to control as they can be easily switched on and off and this is what applies to electromagnets. A phenomenon discovered by Oersted in Copenhagen in 1820 revealed that when current passes through a conducting material it gives a magnetic field and the field can be made stronger by winding the conductor into a coil [1]. This phenomenon is what is referred to as electromagnetism. Electromagnets are used in a vast range of applications like motors in electrics fans, blenders etc. The more current supplied to the motor coils, the more the induced magnetism which can then control the speed of the rotation. Such applications of electromagnets clearly show that there is a pressing need to control the fields of these electromagnets in order for them to operate as desired and this can be done manually or automatically. 8

10 In the world of today, automatic control is desired and more efficient in the sense that it can make changes as and when needed and this is called automation. Automatic control is when a system is intelligent enough to perform operations in the sequence required and control the outputs to the desired values. The need and demand for controls in many systems of today without human intervention is ever increasing. This has led to the incorporation of automation and control engineering in many systems such as production lines, temperature controllers etc. This is done in order to meet the demand for automation due to its numerous benefits that include manpower saving, accuracy, energy efficiency etc. Control systems have been used for over 2000 years with water clocks being one of the earliest examples [2]. Generally, the control mechanisms role in a system is to automate some process or to regulate a condition at a desired state or value as requested by the user. The efficiency of a control system is measured by the following characteristics: Stability- When the system has no oscillations Zero steady-state error- When the system finally settles, there should be no error meaning there is no difference between the reference input and output. Quick response time- Time taken to get to the reference value should be minimal i.e. little dead time. 1.1 Aims and Objectives The main aim of this project is to implement an intelligent magnetic field controller that possesses the characteristics of an efficient control system with the use of a microcontroller. It is focused on building a standalone control system that interacts with a computer through the microcontroller to control the magnetic field of an electromagnet. This is done by regulating the current from a power supply in response to the magnetic field measured by a Gauss meter. It will allow for a user to enter a desired magnetic field and then the control system responds by providing the needed current to generate the field and then notifies the computer once the desired field has been achieved. This type of standalone control system is effective and also a very suitable alternative to expensive off the shelf controllers which can then be customised to the specific application. Also, since it is standalone, it can be incorporated into different systems, adapt and reimplement the same control action like in a temperature control for example. 9

11 Objectives Explore microcontrollers and determine a suitable one for this application. Find out about different controller types. Assemble the hardware components- the microcontroller, power supply and, magnetic field sensor that is linked to hall measurement. Mathematically model the control process. Software Implementation of control action- program where the microcontroller is the centre of communication and interacts with the rest of the hardware as shown in figure 1.1. Figure 1.1-Control System Interaction 10

12 1.2 Deliverables The main deliverable will be a working standalone intelligent controller on the microcontroller. However, there are a couple of other deliverables that build up in order to meet the main deliverable: Selection of a suitable microcontroller. Communication between the microcontroller and power supply. Communication between microcontroller and Gauss meter (hall sensor). Effective control action to meet the application needs. Standalone functionality. 1.3 Structure of Report This report covers a lot of details that were involved in working on this project and is structured thus: Section 2- This section covers the background information that is fundamental to understand the project context. The areas discussed in this section are control theory which includes the open and closed loop systems, transfer functions, type of controllers and tuning. Also, the details of how a microcontroller was selected are covered here as various options were considered. Section 3- This section describes the methodology used, the hardware and software components. This includes a detailed explanation of the major project areas, the transfer functions and tuning techniques. Also covered is the breakdown of the software development with the power supply, sensor and analysis of the complexities faced. Details about the electromagnet are also covered here. Section 4- This section covers the implementation of the processes introduced in section 3 including the two-stage implementation, the system identification, the tuning and the control action. Section 5- This section details the testing of the system at various levels and the system as a whole. The results obtained are also presented here. Section 6- This section discusses the future works and improvements that can be made given additional time and then concludes the entire project. 11

13 2. BACKGROUND Intelligent Magnetic Field Controller Based on Suitable Microcontroller Platform From the project aim which is to implement the controller, it is pertinent to have a thorough understanding of the principles of control in order to implement the control action. Also, since the microcontroller is the final platform on which the control action is implemented, it was very necessary that thorough consideration was given to the various microcontroller options. Hence, this section is split into two areas to cover the areas mentioned above. The first section contains detailed information about control theory. It also details the types of controllers which are the Proportional (P), Proportional Integral (PI), Proportional-Derivative (PD) and Proportional Integral Derivative (PID) controllers. Following which PID tuning is then discussed. The second section of this chapter describes the research undertaken into the available microcontrollers which include the major considerations and how the final choice was made. The other hardware parts used to complete the setup are also described. 2.1 Control Theory A system can be defined as an environment that enforces a relationship between a set of variables [3, 4]. It is the arrangement of parts to work together within a boundary so as to give some output that can be obtained for a particular input [5]. Systems are split into two categories; they can either be static or dynamic. A system is said to be static when the output depends solely on the input at the present time. On the other hand, systems that change with time are called dynamic [3, 4]. In other words, their output depends not only on present input but also on other inputs which could be delayed or advanced signals. Dynamic systems are best analysed using mathematical equations so as to see how the output of the system responds to its input/initial condition. As this project is a dynamic system, it needs to be considered in terms of control theory. This (control theory) is a branch of engineering and mathematics that is concerned with the behaviour and response of dynamic systems to inputs and also how feedback can contribute to the system s output. Control theory aims to bring stability to a system since it is often disturbed by random elements. 12

14 The aims of control theory can be broken down into the following areas: 1. Control of a variable to meet a required value- Typical example of this is to maintain the temperature of a room at a set value by setting the thermostat of an air conditioner/heater [6]. 2. Control of event sequence- This is typified in washing machines where the selections set a sequence of events to occur [6]. An example is if whites are being washed and then a washing cycle appropriate to whites is followed, which could include soaking, then heat the water, adding soap etc. 3. Control occurrence of an event or not- Following the washing machine example, the safety door lock feature of the washer prevents the operation from commencing if the door is not safely locked [6]. In control theory, systems form either an open loop system or a closed loop system. In open loop systems, the output has no impact on the control action because the controller does not get any feedback from the output. However, in closed loop systems, the output is measured and the controller gets this feedback from the output at the input for comparison. Feedback refers to the means through which a signal that relates to the desired condition being obtained is returned to modify the input signal [5]. In a negative feedback system, this output value is subtracted from the input reference value and produces what is called the error signal. The error signal is then passed to the controller which works towards ensuring this error signal is reduced or eliminated. The absence of feedback in open loop systems makes them less efficient for accurate control applications. Hence to control a system precisely, negative feedback is required [5]. Systems that have one input and output are referred to as a SISO (Single Input Single Output) while systems that contain multiple inputs and outputs are referred to as MIMO (Multiple Input Multiple Outputs) 13

15 2.1.1 Open and Closed Loop Control Systems Block diagrams are used in control theory to represent a system s structure. Figure 2.1 shows a generalised representation of an open loop controller and Figure 2.2 shows that of a closed loop controller. Figure 2.1: Open loop control adapted from [25] Figure 2.2: Closed loop control adapted from [25] To put these types of systems into context, consider the heating of a room done in two ways. In open loop control systems, the heating element is switched on till the required temperature is reached. Thus the room temperature is only controlled by the initial decision of turning on the heater and no further changes are made. So if the room temperature drops for some reason such as the opening of a window, no adjustments will be made since no information is fed back to the heating element. In a closed loop control system, there would be a measurement of the room temperature using a sensor to monitor the actual temperature which will be compared with the desired temperature. Hence if there is a disparity, the heating element can be switched on or off so as to regulate the temperature at the desired value Transfer functions As mentioned in the introduction to control theory, mathematical equations are used to show the relationship between the system output and input. In dynamic systems, to show the input and output relationship as a time function, the mathematical equations are usually 14

16 differential equations. However, to reduce the complexity of the relationship, the differential equations are written in a different form by making use of Laplace transform. This is very important for gaining an understanding of the system s input and output relationship as it gets more complex when the system has more than one element due to the combination of each element s differential equations. The ratio of the output to the input is called the gain but when the differential functions are transformed with Laplace, it takes the functions to the S-domain and the ratio is now termed the transfer function [6]. summarised as follows: The rules for transforming into the S-domain are 1. Firstly, for identification, a variable that is a function of time is indicated by putting a t in brackets in front of the variable. An Example is a voltage as a time function- V(t). When transformed to the S-domain, the change is indicated by replacing the t with s so voltage becomes V(s). [6] 2. A constant remains unchanged. Consider 4V, as a time function it is 4V(t) and in S- domain 4V(s). 3. The first derivative of a function (dv/dt) becomes sv(s), second derivative (d 2 v/dt 2 ) becomes s 2 V(s) and nth derivative (d n v/dt n ) becomes s n V(s). 4. Integral of vdt is given as 1 V(s) s Consequent of the above, G = output(y) input(x) Y(s) Transfer function(s) = X(s) (2.1) Consider Figure 2.2 that is a negative feedback system since the output is subtracted from the input; the transfer function is gotten by first redrawing the block diagram as shown in Figure 2.3. Figure 2.3: Negative feedback system adapted from [6] 15

17 Starting with G(S) = Y(s) X(s) H(s)Y(s) then rearranging to get output/input gives the transfer function as shown in equation 2.2 Transfer function = Y(s) X(s) = G(s) 1+G(s)H(s) (2.2) G(s) This is the output transfer function of the controller H(s) This is the transfer function in the feedback path Deriving transfer functions can be complex as stated earlier especially for systems with multiple elements and higher order differential equations. This is because the method used in this approach is to model the elements of the system mathematically based on their characteristics and then take the Laplace transforms before being able to obtain the transfer function. However, another approach can be followed to get the transfer function that involves less mathematical analysis. This approach involves checking the input-output description of a system against a table of all possible responses [7]. It provides a particular input such as step input for example and depending on the type of output obtained, the transfer function can be gotten Controlling Dynamic Systems- Process Controllers In dynamic systems, the error signal is passed to the controller in order to modify the systems output. Dynamic systems use closed loop control as they are intelligent enough to react to a change. This reaction is only possible when the system is monitoring the output which is the case when the output is fed back to the input. Open loop systems do not have such functionality and so from this point forward, the control system being referred to is the closed loop system. Process controllers are the components of the control system that take the error signal (the difference between desired value and actual/feedback value) as input and give an output signal to modify the output of the system [5]. There are different process controllers with diverse benefits for specific applications. The most basic process controller is an on-off device (essentially a switch) that turns on a correcting device when an error signal is detected and turns off this device once the error has been corrected [6]. This type of controller is clearly inefficient and has limitations, as it will have major time lags and oscillations. Other process controllers that are more efficient 16

18 exist in which the PID controller stands out. It is a combination of proportional, integral and differential action. Before discussing in detail the action of the PID controller, it is pertinent to understand the action of the standalone controllers Proportional Control This type of control makes the controller output proportional to the size of the error signal. Mathematically, this can be expressed as given in equation 2.3 Controller output = KP Controller input (2.3) Where KP is a constant value that is called the gain. There is a steady state error in all proportional controllers [5]. So, proportional controllers are used when an acceptable steady and transient state response can be gotten by just setting the gain to be large enough to reduce the steady state error without the need for dynamic compensation [8]. However, as the gain gets larger, there is more chance of system oscillation as oscillations occur as a result of time lags in a system. So a larger gain implies more control action for an error which could cause an overshoot and oscillation. An example of when proportional control is used is in an amplifier as it gives an output that is proportional to the input s size Derivative and Proportional Derivative Control The derivative control is such that the change in the output of the controller is proportional to the rate of change of the error signal with time. Mathematically, this is expressed as given in equation 2.4 Output of D controller = KD de(t) (rate of change of error) (2.4) dt Where KD is the constant known as derivative time [6]. Figure 2.4 shows the constant response gotten at the output for a constant rate of change of error. Thus, from this relationship, it can be inferred that when the error signal changes the output at the control will be large thus making this control suitable to give a Figure 2.4: Derivative control taken from [6] better transient response. However, derivative controllers are usually combined with other 17

19 modes of controllers as they have poor steady state response on a standalone basis. This problem with derivative control is why it is combined with proportional control. The output of this controller is then the sum of the output of the proportional and derivative of the error signal. This is mathematically expressed as Output of PD controller = (KP error) + (KD rate of change of error); (2.5) where KP and KD are the proportional and derivative constant respectively. Rearranging equation 2.5 gives equation 2.6: Output of PD controller = KP (error + (TD rate of change of error)) (2.6) Where, TD = K D K P (2.7) TD is referred to as the derivative action time [6]. Figure 2.5 shows the output of the proportional derivative control. The initial spike in the control output is due to the derivative action and then the following gradual change is because of the proportional action. As a result, this controller has fast transient response compared to just proportional control but steady state Figure 2.5: PD control taken from [6] error will still be required in order to handle constant input change Integral and Proportional Integral control The integral control is of the form whereby the output of the controller is proportional to the integral of the error signal. Integral control is also referred to as reset controller as it can return a controlled variable to its set point after a disturbance [9]. Mathematically this is expressed as Output of Integral controller = KI integral control (2.8) Where KI is the constant of integration. 18

20 Figure 2.6 shows the output of the Integral controller. The area under the graph at time t is the value of the integral at t. So the output of the controller is directly proportional to the area under the error graph between 0 and t. Hence, as t increases, the area increases which leads to an increase in the controller output [6]. Therefore, integral control can be restated by saying; the rate of controller Figure 2.6: Integral controller output taken from [6] output change is directly proportional to the error. Like the Derivative controller, the integral controller is not used alone as it can make the system unstable due to slow error response [9]. Because of this, it is combined with the proportional controller. The output of this controller is the sum of the output of the proportional and integral of the error signal. Output of PI controller = (KP error) + (KI integral of error with time) (2.9) Where KP and KI are proportional and integral control constants respectively. Rearranging equation 2.9 gives equation 2.10: Output of PI controller = KP (error + 1 T I error integral) (2.10) Where, TI = K P K I (2.11) TI is referred to as the integral action time [6]. Figure 2.7 shows the output of the PI controller. The main advantage of the PI controller is shown here as it can eliminate steady state error due to the integral action of the controller that gives an output even when the error is zero. This is because the controller output is the sum of the area all the way to zero and as Figure 2.7: PI control output taken from [6] such when the error is zero, the output of the controller at this time is due to the sum of the previous errors. 19

21 PID Control PID controllers are the most widely used type of process controllers. As mentioned earlier, PID is a combination of proportional, integral and differential control actions which makes it be referred to as the three-mode controller. From the discussions on each of the controller types, it is observed that each type of controller has its own limitation so therefore the PID aims at combining the advantages of each of the controllers and thereby eliminating their limitations. PID is a controller that has no steady state error, increases system stability and gives a better transient response. As PID is a combination of three actions, the output of the PID is a sum of its three modes and is mathematically expressed as: Output of PID controller = (KP error) + (KI integral of error with time) + (KD rate of change of error) (2.12) Where KP, KI and KD are the constants of proportionality, integration and differentiation respectively. Rearranging equation 2.11 gives equation 2.12 Output of PID controller = K P (error + 1 T I error integral + (T D rate of change of error)) (2.13) Where TD and TI remain as defined above in equations 2.7 and Figure 2.8 depicts a PID controller structure. Figure 2.8: PID block diagram taken from [26] 20

22 When designing a controller, the values of KP, KI and KD need to be selected and also the appropriate control modes to be used must be identified that is, if to use proportional control, proportional plus derivative, proportional plus integral or proportional plus integral plus derivative control. The proportional controller is responsible for handling the current error values and this is just as described in the proportional control where the error is multiplied by the proportional gain. The integral controller handles past error values by noting the output and applying a stronger action as the error builds in time. This is done by multiplying the integral control constant KI with the integration of the error. The differential controller predicts the error as it handles the rate of change of error and is done by multiplying the derivative time KD with the differentiation of the error. All these are shown in the standard form of the PID output in equation 2.12 above and Figure 2.8. These parameters are important as they determine the system s response to a change in the set value, how quickly it responds to this change, settling time and occurrence of steady state error or not. A typical test signal- the step input is applied to the different controllers and the output is shown in Figure 2.9. A step input is a sudden change to a set value. Figure 2.9:Step input 21

23 Figure 2.10: P controller response to step input Figure 2.11: PD controller response to step input Figure 2.12: PI controller response to step input Figure 2.13: PID controller response to step input From Figure 2.10 it is seen that with the proportional controller, there are lots of oscillations, high overshoots and long settling time. The system can be said to be under damped at this state. Figure 2.11 shows the response of the PD controller with a better transient response and hence fewer oscillations, reduced peak overshoot and faster settling time. Here the system can be said to have less under-damping. The PI controller in Figure 2.12 has no steady state error, little overshoot and better settling time. The system is said to be critically damped here. 22

24 The PID controller as shown in Figure 2.13 gives the best response as it has no oscillations, no overshoot, no steady state error and good settling time. This is due to the derivative action that makes it have a better transient response and integral action thus it eliminating steady-state error. The system is over damped Tuning of Controller Parameters The term tuning refers to the processes used in selecting the best control settings and modes, which involves whether to use Proportional control, PI control, PD control or PID control in order to get the desired performance [6]. This is important because it determines the reaction of the system to a disturbance, its speed of response to changes, the time it takes to settle down when a change occurs and also the occurrence of a steady state error or not. Various techniques can be used for tuning such as Tyreus-Luyben method, Automatic tuning (Autotune) using software packages like MATLAB, Cohen-coon method, manual tuning, etc. [10]. Nevertheless, two techniques that are widely used are the process reaction method and ultimate cycle method which are both by Zeigler-Nichols. These two methods are explored in detail as they can be used in many systems and have a lot of detail for their implementation. Other tuning methods like the Auto tuning and Manual tuning which are more straightforward are later considered in the PID design in sections and [6] Process reaction method This method is also called the open loop Zeigler-Nichols because the measurements made are taken during an open loop control system test (no feedback) so as not to allow any control action. This method is based on the system s step response as the test signal is a step signal and the method used here is the same as that used to obtain the transfer function with a step response as described in section The output response of the controlled variable expressed as a percentage of the full range to the step input is what is monitored and then plotted as the variable against time [5]. The graph obtained as shown in Figure 2.14 is referred to as the process reaction curve. The parameters of the PID are gotten from the systems response by reading the dead time or lag L and the value of T which effectively deals with the rate of slope as shown in Figure The Control parameters are then gotten according to Table 1 criteria as specified by Ziegler and Nichols 23

25 where K is the output change. More details on K, T and L are given in section The basis of this criteria is to obtain the closed loop response for the system as it shows a quarter amplitude decay which basically is the system s amplitude response decaying with time such that the amplitude decreases by a quarter on each oscillation. Figure 2.10: Zeigler-Nichols open loop method replotted from [6] Type of KP TI TD Controller P 1 K x T L PI 0.9 K PID 1.2 K x T L x T L 0 3.3L 0 2L 0.5L Table 1: Open loop Zeigler-Nichols PID tuning table taken from [11] Ultimate cycle tuning method This method, which is also the closed loop Zeigler-Nichols tuning method, first turns off the integral and differential mode leaving only the proportional mode. The proportional constant KP is initially set at a low value and then slowly increased until oscillations begin to occur in the controlled variable. The value of KP when sustained oscillations occur is noted 24

26 (call KU) and the corresponding oscillation time TU is measured. Consequently, using Table 2, the control parameters can be calculated. This tuning method is suited for high order systems with transfer functions of cubic and higher degrees [5]. Type of Controller KP TI TD P KU/2 PI KU/2.2 TU/1.2 PID KU/1.7 TU/2 TU/8 Table 2:Closed loop Zeigler-Nichols PID tuning table taken from [6] This subsection of the background chapter has given a detailed background of control theory that includes the transfer functions and the different controllers used in dynamic systems. The methods of tuning the PID have also been discussed. In the next subsection of the background chapter, the microcontroller and hardware are discussed. 2.2 Microcontroller and Hardware Recall that the entire system structure is shown in Figure 1.1 and emphasizes the microcontroller as the centre of the hardware connections/interaction. The rest of the hardware are independent components that fit together easily through the available USB connections and are listed below: Computer-Dell OptiPlex Power supply Kepco BOP 20-20m: Bipolar power supply with 400W, ±20V DC range, a maximum current of ±10A and USB interface. Gauss meter - Lakeshore 425: Has a field range of 350mG to 350kG with LCD display and USB interface. Small Display screen (see Complete Microcontroller Setup later) - shows the process for user interaction. 25

27 As the microcontroller is a very important hardware component at the end level, very careful consideration had to be taken into account when deciding on which is most appropriate for use Microcontroller Boards Microcontrollers can be defined as special purpose computers that handle a specific function. A microcontroller is built on an integrated circuit that has its own memory, input/output interface, and processor. Generally, microcontrollers are embedded in systems to control a process by taking the input from the device they are to control and then sending signals to the other components associated with this device in the system [12]. A very useful property of microcontrollers is that they are standalone components that can be incorporated in various systems once they are programmed with the necessary functionality. Applications of microcontrollers are numerous including use in televisions, microwave ovens, engine controls in automobiles and much more. Microcontrollers are widely used and as such, there are a number of microcontroller boards available in the market such as the Texas Instruments Launchpad, Intel Galileo development board and BeagleBone black development board to mention a few. However, for this project, having preliminary looked at the various microcontrollers, the Raspberry pi and Arduino were of most significant interest because of their robust features which are discussed further Arduino Microcontroller The Arduino is efficient for receiving data from sensors and interpreting them to give the desired action. There is, however, a range of Arduino microcontroller boards such as the Leonardo, Mega, and Uno to mention a few. Figure 2.15 shows two of the boards in the Arduino range. Figure 2.11: Some of the boards in the Arduino range (a) Uno (b) Mega- taken from [20] 26

28 Arduino boards are programmed using the Arduino programming language that is based on the concept of Wiring (an open source electronic prototyping platform) which is effectively C language and the Arduino Development environment which is based on Processing [13]. It is cross-platform and runs on Windows, Macintosh, and Linux. Arduino has 3 memory banks which are the Flash memory where programs developed on the Arduino are stored, SRAM (Static Random Access Memory) and EEPROM (Electrically Erasable Programmable Read Only Memory). The flash and EEPROM retain information after power is turned off and are non-a volatile unlike the SRAM [14] Raspberry Pi The raspberry pi is a small credit card sized computer that has all the functionality of an actual computer. There are about four (4) models out and the raspberry pi 3 model B is the latest release which is shown in Figure Figure 2.12: Raspberry PI 3 model B taken from [24] Raspberry pi runs on Linux environment and promotes python as its major programming language. It comes with a slot for micro SD memory card and there is the RAM which is volatile memory. 27

29 2.2.2 Project Microcontroller Requirements Looking at the properties of both the Arduino and Raspberry pi, they both have desirable features; therefore, to make a choice, the needed requirements of the hardware for this project had to be identified. These are: Three USB ports for easy interface with other system components A familiar and understandable programming language with useful libraries. Components that can easily interface with the microcontroller like a mini screen Quick Boot time. The power ratings. Ease of conversion from analogue to digital Microcontroller Boards Comparison Consequent to the above features, the Arduino and Raspberry pi were compared as shown in Table 3 to get the final selection. The ticks represent where one feature is preferable to the other and the crosses represent the less desirable features. 28

30 ARDUINO RASPBERRY PI Programmable microcontroller Full operating system Only does what it has been Handles numerous functions like HDMI, programmed to do and designed for Ethernet and can be used as a computer reading data from sensors, computing so could be slower the data and output it to attached LCD screens hence quicker Quick boot up time. Takes about 8-10 Takes longer to boot as it is effectively a seconds on the average computer. Raspberry pi 3 boots in about 21 seconds Programmed in C Promotes python as the main programming language but supports other languages Arduino Uno- uses ATmega328P which Raspberry pi 3 uses 64-bit quad-core is an 8-bit microcontroller ARMv8 CPU. More computing power Better for hardware projects and More software based projects than applications hardware Many useful libraries for hardware and Libraries better suited to software electronics like motors, LCD etc. implementations A Large number of I/O pins for Also has a large number of pins for I/O. connections and analog inputs with 40 GPIO pins PWM outputs. Arduino Uno has 14 digital I/O pins Different shields available for added All ports built in and not much can be functionality e.g. USB shields, internet added. Has 4 USB ports, shields etc. Table 3: Arduino and Raspberry pi comparison After considering the factors needed for the project and comparing it with the features provided by these two boards, the Arduino was chosen as it met the requirements better. More specifically, the Arduino Uno as shown in Figure 2.15a. 29

31 2.2.4 Complete Microcontroller Setup To give the additional USB ports needed, it was initially decided that two of the USB shield shown in Figure 2.17 would be used. These USB shields are manufactured by Sparkfun. In addition, a screen that interfaces easily with the Arduino was selected. This is the Arduino LCD keypad shield shown in Figure 2.18 Figure 2.13:Sparkfun USB host shield for Arduino Figure 2.14: LCD keypad shield Due to the easy interface of the Arduino, these components are connected by mounting on the Arduino through the pins. Figure 2.19 shows the full setup of the microcontroller. Figure 2.15: Microcontroller full setup using Arduino and components 30

32 The Arduino board can be powered either by the USB connection to the computer or by a dedicated power supply. A dedicated power supply is used here in order to eliminate any possibility of distortion to the running of the process by power interferences. The USB and LCD screen shields take their power from the Arduino board once they are connected/mounted as shown in Figure The details of the hardware have been discussed in detail especially the microcontroller. This was necessary, as it is the major component to successfully implement the PID action. With proper project breakdown that includes the appropriate decision on the needed hardware and details on control theory, the methodology which is the next step is discussed next in section 3. 31

33 3. METHODOLOGY, HARDWARE AND SOFTWARE COMPONENTS The overall system design is depicted in Figure 1.1. In order to get a fully functional system, many design decisions for both hardware and software had to be made along with a wellplanned methodology. This chapter details the methodology and also introduces the hardware components. Section 2.2 in the background chapter has already detailed one of the very important design decisions which was the microcontroller platform on which the PID controller would be implemented. This was a very important decision; however, the design and method for the rest of the system are also critical to the success of the system. There are three major parts of the control system: 1. Input- get the user desired field and actual field reading from the Gauss meter. 2. Controller- implement PID control action based on the error signal between desired and actual field so as to set the power supply accordingly. 3. Output- electromagnet to give the desired field and maintain the field till a new field requested. Input- user defined field and field value from Gauss meter Controllerpower supply control Output- field of electromagnet Figure 3.1: Major project parts 32

34 3.1 Input- User defined value and Gauss meter interaction It has already been established that the input is the user defined/desired field as well as the Gauss meter input. The user input is straightforward to obtain as this is entered in the computer or selected from the display. The Gauss meter communication is the major task in getting the input. The Lakeshore 425(the Gauss meter used, as introduced in Microcontroller and Hardware ) has a USB interface for communication which provides a common USB A-type to B-type connectors and thus serial communication is used [15]. This involves using the COM port and sending message strings. The Lakeshore comes with an instrument communication utility which is a GUI (Graphical User Interface) that allows for queries to be sent and messages to be received from the instrument. However, this has limited use as it cannot be incorporated directly into the C code written for the Arduino. Thus a C-language communication process is needed as below: Connect Lakeshore using USB interface Install the device driver Get the COM port from the device manager Write and Read from COM port using available functions to send and receive message strings Close COM port Before any development for communication with the Lakeshore, certain important settings and factors need to be satisfied and taken into account in order for communication to be established. Firstly, there are specific configuration parameters that must be strictly followed and these are detailed in Table 4. 33

35 Configuration Parameter Table 4: Communication port configuration for Lakeshore 425 Gauss meter taken from [15] The baud rate is the speed at which information is transmitted between the devices and the parity is for error checking. Secondly, the character format has been changed for the Lakeshore compared to the standard ASCII format. The smallest piece of data that is transmitted by the Lakeshore is a character and two additional bits have been added to the normal eight bits thus making each character 10 bits long. As seen from Table 4, a start and stop bit are the additional bits which are added to be able to allow consecutive characters to be synchronised [15]. Seven (7) bits are for data and one bit is used for parity check which all together gives the 10bits. When sending and receiving data, each message string that is transmitted needs to be terminated with a carriage return and line feed. The full lists of queries that can be sent and the type of response received back as messages are all detailed in [15]. However, the major queries of interest are the *IDN? and RDGFIELD? which are for device identification and field readings respectively. The Identification query is used as a basic test to ensure messages are correctly received from the Lakeshore and the field reading query is clearly the most important query as that gives the field reading of the electromagnet. There is a probe that senses the magnetic field which is connected to the Lakeshore and thus gives the needed reading. The setup of the Lakeshore together with the connected probe and USB serial connection are shown below in Figure 3.2. Setting Baud rate 57,600 Data bits 7 Start bits 1 Stop bits 1 Parity Flow control Handshaking Odd None None 34

36 Figure 3.2:Lakeshore 425 Gauss meter- front and rear view with connected probe When the input(s) has been gotten successfully, the next thing is the power supply communication and design of the PID. 3.2 Controller and Power supply Having received the input, there is very likely going to be a difference between the user defined field and the actual field (the error signal) which is the basis of the control. For this control to occur, the power supply needs to be adjusted and this can only be done when communication with the power supply has been established. Therefore, this is the first thing considered here which is then followed by the PID design Power Supply Communication The Kepco Bipolar power supply uses a GPIB-USB connection and this interface is what is used for communication. Figure 3.3 shows the Kepco power supply used and the GPIB to USB interface. Figure 3.3:Kepco power supply front view and rear view showing GPIB USB connection 35

37 GPIB is the short form for General Purpose Interface Bus. GPIB was first developed in the 1960s by Hewlett-Packard and they called it the HP-IB which they made for the purpose of controlling their programmable instruments [16]. The need for high-speed interface communication between devices and controllers made the GPIB popular when digital controllers and programmable equipment became available. The IEEE standard built on this and created a protocol from which many manufacturers share a common communication protocol called the IEEE This standard was later enhanced as IEEE that defines common code set and interface capabilities [16]. The IEEE specification added the SCPI- Standard Commands for Programmable Instruments in 1990 [16] which are the commands that are specific for instruments. This ensures the system compatibility with instruments and makes a uniform command set for every instrument that is compliant with SCPI. The Kepco is SCPI compliant and thus the command set of the SCPI is used in the device programming to establish communication. The commands of the SCPI are defined in headers such as the gpib and ni488 header files and the appropriate header will need to be included in the C program developed in order to access the functionality. The way the Kepco is able to be programmed to send and receive control message strings is through a digital interface card which is the BIT 4886 card that is inbuilt into the power supply. This provides the necessary platform for commands in forms of SCPI strings within the required programming language (C) to be sent to the power supply, perform the needed action and control the Kepco remotely. The details of the interface card for communicating with the host computer are given in [17]. Therefore, the process for communication to the power supply from the computer/microcontroller is given in Figure 3.4. Computer USB-GPIB connection BIT 4886 interface card Kepco power supply Figure 3.4: Power supply communication process 36

38 The process for sending and receiving data from the Kepco from a developed program are: Connect power supply using the GPIB-USB cable to selected port. Install the necessary drivers- the GPIB used here is from National Instruments thus the GPIB driver and Measurement & Automation Explorer(MAX) needs to be installed. This is needed as it finds the connected instruments, gives the needed handles to access them in order for them to be programmed and allows for interactive control to test for communication. The Virtual Instrument Software Architecture(VISA) is also the standard for programming and troubleshooting GPIB system interfaces. It gives the necessary interface for programming between the hardware and other development environments such as C, LABVIEW and LabWindows/CVI. The VISA also comes with software libraries and interactive utilities. Add the header files (the visa header file is used), to access GPIB and SCPI functionality like the ni488.2 header file and perform device I/O. Use the device I/O routines (such as viwrite, viread) to hide GPIB complexities. Set the device address to listen and send. Like with the Lakeshore, there are control messages from the controller to the power supply and response from the power supply. The messages sent also have to be terminated using the line feed/new line. Set the operating parameter- this controls the output and initially is set to zero. The voltage and current limits are not remotely controllable [17]. The GPIB interface provides high communication rate, therefore the BAUD rate is The steps above summarise the process for the communication with the Kepco. Again, there is a list of commands that can be sent to the Kepco which is detailed in the Kepco documentation for this power supply [17]. Test command for identification *IDN? is used to ensure communication is functional. Using the VOLT and CURR commands sets both the voltage and current values respectively and should be done in a single command. When using the VOLT and CURR commands for setting, it is important to note that the interface card controls the Kepco through two channels which are the main channel and the limit channel [17] where the main channel is set by the mode of operation. The operating 37

39 mode is set by flipping the switch as highlighted in Figure 3.3 to either the current or voltage mode as desired. If the operating mode is in voltage, then sending VOLT and CURR sets the main channel and limit value respectively. For example, if VOLT 10; CURR 5 is the message sent when in voltage mode, then the voltage value is set to 10V and the current limit is set to 5A. The opposite is the case if the operating mode is current. Having established communication with the power supply, the full setup for the controller is ready as both instruments (Gauss meter and power supply) are able to send and receive messages, so the PID action is now needed PID Design and Tuning Once the error signal (which is the difference between the set point and current state) is detected, the PID would be triggered so the PID should give a fast and precise response as needed. The first point of call in the design of the PID is to model the system using block diagrams. This clearly identifies the input and outputs and further allows for the closed loop transfer function to be derived. This is given in Figure 3.5 which is a model of the system using the hardware components and shows the closed loop system. Figure 3.5: Block diagram representation of whole system Figure 3.5 clearly visualises the control system process. From section 2.1.2, the general form of a transfer function is derived and given in equation 2.2. Transfer functions are made up of a numerator and denominator in the s-domain. The loop of this system starts with the input which is the difference between the desired and actual field and is passed to the PID 38

40 controller. The output of the controller is then the input value that is given to the power supply so as to set the current and voltage to provide the desired field. The new current sets the electromagnet to give the new field reading. This new field reading is now measured again by the Gauss meter and subtracted from the set point at the input and this is continuous so as to regulate the field value. The tuning of the controller can be achieved in different ways. Three ways are discussed here Tuning by getting Transfer function using Step Response and applying 63.2% method The transfer function of the process can be obtained by using an empirical method such that a certain signal such as a step or random signal is applied to the input and then at the output, the characteristics are gotten [18]. The obtained characteristics are then used to form the transfer function and get the tuning parameters as given by Zeigler-Nichols open and closed loop methods in section and table 1 and 2. The transfer function of the process is obtained with the step signal through an open loop experiment [18]. This experiment with the step signal begins with the system being at rest and then the open loop experiment is carried out. The input signal is suddenly increased (stepped) to a higher value than its current one and the output gotten is measured along with other details like the timing. When this data has been obtained, the values can be plotted and from the graph, the process characteristics are gotten and used in equation 3.1 [18] to give the process transfer function. G(s) = K Ts + 1 e Ls (3.1) Where K, T and L are the static gain, time constant and dead time/delay time respectively. Looking at these values more descriptively, K is the measure of how much change will occur in a process due to the input. T is the speed of response of the process after the input has been changed. L gives information about the time taken for the process to begin to respond when a change to the input has been made. 39

41 On getting these values, the transfer function can be gotten from the plot using different techniques such as the 2-point method, 63.2% with tangent method, and others [18]. Of these methods, the 63.2% with tangent method is used here. This method is very widely used with the step response to form a transfer function [18]. The output of the step response is related to the final steady-state value using equation 3.2 [18] and the value of 63.2% is also derived from this equation. y(t) KΔu = 1 e t/t (3.2) Where KΔu is the final steady state value and T is the time constant. This equation gives the 63.2% after a time constant when t = T and thus the response is 1 - e 1 which evaluates to [18]. This is shown graphically in Figure 3.6. Figure 3.6: System's step response showing parameters derivation taken from [27] K can be obtained by dividing the final steady state gain by the change in the input to the process (from its previous value to what is stepped to). From the graph, the value of K would be K/change in input. L is gotten by drawing a tangent to the curve from where it starts changing direction (inflection point) as shown in Figure 3.6. The value of L from the Figure 3.6 is A. The point where this tangent intersects with the x-axis has to be noted as this is the time it takes for a significant change to occur at the output [18]. 40

42 The value of T is the time taken to reach 63.2% of K after the delay in time. Thus from Figure 3.6, the value of T would be A subtracted from B that is (B A). When these values have been obtained, they are substituted into equation 3.1 to give the transfer function. An example that used this method is as demonstrated by Bequette in his temperature controller application in [19] and is shown here. The plot of the system s step response and step input is given in Figure 3.7. Figure 3.7-Step response of Example system taken from [19]. (a) Is the systems output and (b) is the process input The graph in Figure 3.7a is marked up with different colours that represent different parameters spoken about. The green line marks the point where the system began to respond to the change. The black horizontal line represents the 63.2% point and the corresponding time shown by the black vertical line. K is marked using the red line. So using the principles established above for obtaining the transfer function, K, T and L are gotten by: K = Final steady state Initial steady state change in the input = = -4 41

43 In order to get T, the time at which 63.2% of the output was reached after the delay is gotten. This is done by *(25-23) = As the start value of K is 25, this means the 63.2% value is 25 + (-1.3) = Therefore, T is the value at 23.7 which is 4.5minutes. L is the delay in the time it takes for the process to respond. So by inspecting part a and b of the figure, the input was applied after one minute and it took another minute for the process to respond. Therefore, L is one minute. With the values of K, T and L, they can be put in equation 3.1 to give the transfer function which is: G(s) = 4 2.5s + 1 e s The tuning of the system can be done also. With the Zeigler-Nichols open loop method, the values of K, T and L would be put in the PID equations from table 1 where the other parameters are all described in Figure 3.8. Figure 3.8:Tuning equations using Zeigler Nichols open loop method This open loop Zeigler-Nichols works for a wide range of systems and is not limited to higher order systems like the Zeigler-Nichols closed loop method [6]. Using the open-loop tuning along with system identification makes this method applicable to many types of control systems. Getting the parameters using the open-loop method are not as direct as the closed loop where the gains are estimated as in manual tuning. This open loop method implementation is similar to the step response described Manual Tuning of PID The tuning parameters can be found by manual tuning. This is a basically a methodological trial and error process. Usually, the integral and derivative values will initially be set to 0 leaving only proportional action and then the response is plotted. From the plot, it can be 42

44 estimated how much integral and derivative action needs to be added because the integral and derivative action affect the steady state and transient response respectively as detailed in sections and This is could be a complex process, especially for higher order systems Automatic Tuning of PID Software tools like MATLAB provide a lot of functionality and have many highly optimised libraries for many processes of which PID control design is one of them. This allows for the system response to be plotted in a GUI and then the properties can be adjusted. The process of the auto-tuning in MATLAB needs the transfer function to be known and entered. On getting the transfer function, the command pidtool is used to generate the response with the tuning parameters. As this is a GUI, the response can be seen and as the values are adjusted to give the desired response, MATLAB calculates and shows the associated gains of P, I and D that is producing the displayed response. An example program for a system and its transfer function as illustrated by a lecture at the University of Michigan [20] is shown in Figure 3.9. Figure 3.9: MATLAB code to simulate Tuning adapted from [20] 43

45 On running this program, the response obtained is shown in Figure Figure 3.10: Auto tuning of sample transfer function The response time and transient behaviour as highlighted can be altered till a satisfactory plot is obtained. When the transfer function has been obtained, then it can be put into MATLAB for the auto-tuning to be done. For example, if the output shown in the figure is satisfactory, then the values of Kp, Ki and Kd are easily noted from the bottom right of the figure as highlighted on the plot. 3.3 Output of Electromagnet The result of the PID action sends the needed current to be supplied to the electromagnet which produces the desired field. 44

46 The electromagnet used which is given in Figure 3.11 is powered from the Kepco as expected. It has its power cables connected to the coils and these wires are then connected to the power and ground terminals on the power supply. This is how different field values are gotten by changing the power supply values. Figure 3.11: Electromagnet with its power cables Figure 3.12: Hall sensor probe setup to get the field measurement The probe from the Gauss meter measures the field and gives the output to the user and is setup as shown in Figure Recall that it is a closed loop system; therefore the field of the electromagnet will feedback to the input for comparison to continually monitor and regulate the field at this value till the input is changed again. This is how the standalone capability is also achieved as well because, when connected to any system needing a field, it can provide this control on its own and then alert the rest of the system once it has set the correct field. 45

47 The input, controller and output are all software controlled, therefore it is pertinent to carefully consider the development procedure for the software to give the needed functionality and this is covered in section Frameworks used for Software Development Sections 3.1, 3.2, and 3.3 give comprehensive details on the methodology and hardware for the input, controller, and the output respectively. Implementing all these (getting the input, controller and output) involves using COM ports for the Gauss meter due to its USB connection and GPIB for the power supply. This takes major programming effort as development is done at a low level. Working at such low level would have made direct implementation on the Arduino microcontroller an even more complicated task. This is because the Arduino does not have many of the robust features of a full computer. Also, since add-ons are connected to the Arduino to give the additional USB ports, this makes an indirect communication so therefore, the communication between the Arduino and the equipment will be in two stages: Firstly, there will have to be communication between the Arduino and the additional USB ports. This will initialise the different USB ports and identify the ones on which the power supply and gauss meter are connected to. After successfully implementing the first part, the second part is then to begin communication with both equipment through the USB ports. This clearly will have some technicalities as the commands sent from the Arduino have to ensure they are going to the correct port on the USB hub and using the appropriate commands (serial or GPIB commands) for the device they are talking to. Also, issues like the Baud rate for the different equipment communication need to be taken into consideration. Due to all these foreseen technicalities, it was decided that it was best to use a systematic approach and break down the development into a less complicated process. Therefore, the implementation of the software started on a Windows based computer. This was done so as to reduce the complexity of getting a fully functioning system by taking advantage of the available functionalities of the computer which include COM ports, serial interfaces, robust software development IDEs and compilers. 46

48 Consequently, the development on the computer was done using Microsoft visual studio which uses the Microsoft C compiler. C was used because the Arduino is programmed using C and would therefore, make for easy transition to the Arduino on completion of development in visual studio as it will only require the use of Arduino syntax to reimplement the working functionality. Therefore, section introduces the software development platform of visual studio and section introduces that of the Arduino after which the breakdown of the overall software control is covered. The software implementation of the control action is just as crucial and important as the hardware. Being that this implementation is finally intended to go on the microcontroller was one of the major reasons a lot of research and time was spent to find a suitable microcontroller. This was so that a familiar language with many useful libraries and straightforward interface could be used Software Development on Visual Studio Visual studio supports a range of languages and console applications. As earlier stated, C was the language used to develop the software. Visual studio 2015 was used for the development and the IDE is shown in Figure Figure 3.13: Microsoft Visual studio community 2015 Development environment 47

49 To write C programs using visual studio, two things have to be done: First, when creating a project, the option of precompiled headers has to be unchecked. Then secondly, once the project has been created, in the settings of the project, navigate to C/C++ then all options. In this directory, under compile as, the project has to be set to be compiled as C code and then development can continue. Many helpful libraries are available to be imported on Visual studio and this gives access to many windows functionalities for creating console applications to support COM port and USB Software Development on the Arduino Following on from section 2.2.4, the Arduino microcontroller is used and it comes with its own integrated development environment (IDE) which is shown in Figure Full details about the Arduino which includes its accessories, kits and shields are all available on the Arduino website given in [20]. Figure 3.14:Arduino Development Environment 48

50 The Arduino is programmed in C, supports C++ libraries and header files extension and this is what the IDE permits for software development in the text area. Programs written through the Arduino IDE for the board are called sketches and have a file extension-. ino. The initial step taken towards the implementation was to become familiar with the Arduino software development process. To upload sketches to the board, the following procedure is followed: Connect Arduino to the computer through USB. Open the Arduino IDE and select the applicable Arduino board, which is the Uno in this case. Get the correct COM port. Upload the sketch to the board. The Arduino like many other software development platforms usually requires additional libraries for most applications. Due to this, the Arduino IDE allows the import of additional libraries. This is provided by the Import Library menu and when used, it will add #include statements for as many packages that are imported. Another useful feature of the Arduino IDE is the serial monitor. This displays the serial data that is being received by the Arduino board. It requires that the baud rate is set to match the rate in the setup in Serial.begin. This is useful because the data being received by the board can be seen, helps to debug, finds out if the Arduino is actually receiving data and the type of data that is received so that the needed action can be performed. The Arduino sketches are stored in flash memory which is non-volatile as stated earlier and as such stores the last uploaded sketch. This is how the Arduino is able to continue to perform the same action of the last upload even after switching it off and back on until another sketch is uploaded to it. 49

51 3.4.3 Overall Software Analysis In order to meet the aim of this project, the implementation of the PID control action is necessary. A breakdown of the project into the different stages for implementation from the software level is done using the flow chart in Figure 3.15 to give the overview of the system software control. Figure 3.15:Software Flow of System Get Reference value The controller is a standalone system, therefore, the only time it has interaction with the user is when the desired value is to be entered from the computer or through the LCD keypad shield. When it has completed the control action, it alerts the computer/user that the process is complete. There is a set range of desired values that can be entered and this is because of the limitations of the hardware in the sense that the power supply cannot generate a field that is out of its supply range. As a result of this, the user interface will alert the user to the range 50

52 of values that can be supplied. When the value is entered, it will be stored for comparison with the current field value. Measure current field value On getting the desired value, the next thing will be to start communication between the Computer/Arduino and the port on which the Gauss meter is connected. Through the serial connection, the Gauss meter sends the value of the current field due to the initial state of the power supply. At this point, a loop will be started as it will be a continuous monitoring process to ensure stability and the loop will only be broken when the user stops it or requests a new field strength. Pass to PID On getting the measured value, it will be compared to the reference/desired value that was earlier gotten. The error signal is gotten from this comparison and this activates the PID controller so as to eliminate this error and also constantly regulate the output as the error changes. On activation, the PID action will start and continue till the error is reduced and will also need to work out the value that needs to be supplied to the Kepco power supply to get the desired field. The tolerable error range used in this project is ±0.002T. Adjust Power supply On completion of the PID action, the power supply will then be adjusted to the appropriate current for the reference field. Using the GPIB connection, the controller will send a control message to the Kepco to supply the required current. When this is done, the new value is compared again to the reference value and ensures the right accuracy level has been met before confirming the control action is complete. When there is a further disturbance, the system will again be activated in order to maintain the output at the reference input. This section has covered the detailed methodology for the implementation of the controller and hardware interaction. The next section then shows the applications of these steps to implement the controller. 51

53 4. IMPLEMENTATION Intelligent Magnetic Field Controller Based on Suitable Microcontroller Platform Having made all the important design decisions and with a well-planned methodology, the step by step implementation built on the processes described in chapter 3 in order to create a fully working system. This chapter gives the full details of how the implementation was done at various levels and then combined to give a fully working system. From chapter 3, it was decided that the implementation would be better started on a Windows computer rather than directly on the Arduino. Therefore, the first subsection of this chapter covers the instrument communication implemented on the Windows computer using Visual studio. The next subsection then shows how the transfer function was derived and also gives details on the values of the tuning parameters. With the instrument communication and tuning parameters gotten, the next thing was to combine these parts and implement the PID action which is done in the third subsection. The fourth subsection then details the process for moving the PID controller onto the Arduino board. 4.1 Implementation in Standard C on Visual Studio The implementation in C for communication with the instruments required a very significant low-level programming effort and took a lot of time to develop the code to give the needed functionality. Therefore, it was very helpful that the development did not start on the Arduino as it would have been far more complex since it requires its own microcontroller commands. The programs for communication with the Gauss meter and power supply were developed separately and later integrated together Communication with Gauss meter Communication from the computer to the gauss meter is done through the COM port. When the Gauss meter was connected to the computer, it was on COM port eight (8) as gotten from the Device manager. 52

54 Having located the COM port, the next thing was to open this COM port and send and receive messages through it. This is a console application as communication is text based. Setup When developing the program, Windows operating system has internal functions for console applications which are useful and are in the windows header file. In addition to the windows header file, other header files were also added to the program which includes the string, time and stdlib. Figure 4.1: Needed header files for Gauss meter communication Since queries are sent back and forth using strings, there was the need to add the string header file. The time header is used for setting timeouts. Initialisation The communication port was then opened for communication and stored in an appropriate variable type. This was done with appropriate error checking. Figure 4.2: Variable initialisation and port opening adapted from [28] 53

55 Handle is the variable type that holds the returned value when the port is opened. The function CreateFile opens the communication port for the device I/O and the returned value is stored in the HANDLE. However, notice that the function used is slightly different which is the CreateFileA. This function has the same functionality as the CreateFile but the A is the ANSI compatible version. If this function is not used in Visual studio, there will be errors and compilation problems. The comport is set to COM8 and also set to be able to be written to and read from as seen in Figure 4.2. Figure 4.3 shows how the settings for the Gauss meter as described in section 3.1 are implemented in the program. The Lakeshore has four units of measurements which are: Tesla(T), Gauss(G), Oersted(Oe) and Ampere per meter(a/m). Throughout the implementation, the unit used is Tesla(T) so all and field readings referred to are in this unit. Figure 4.3: Gauss meter settings Writing to the Serial Port In order to get the field reading, the appropriate query RDGFIELD? needs to be written to the COM port. This is done using the windows function called the WriteFile which writes to the port and again error checking is handled. Figure 4.4: Writing to COM port Reading from the Serial Port When the setting query has been received by the Gauss meter, it sends back a response message with the field value which needs to be read and stored. When reading from the 54

56 COM port, data could just be listened for continuously or an event is setup to listen and Windows notifies the program when a character is received. The latter option was used and an event that listened for characters received was used to wait for data before ReadFile is used to receive the data. This shown in Figure 4.5. Figure 4.5: Monitoring data from Gauss meter & reading it with error checking- adapted from [28] The above procedure achieved effective communication between the Gauss meter and the computer Communication with Kepco- GPIB instrument control Kepco power supply communication uses GPIB which is high-speed communication protocol. The GPIB used as earlier stated is from National instruments. Like the Gauss meter, there is also an interactive GUI utility to ensure communication but this cannot be directly incorporated into the C code. LABVIEW (Laboratory Virtual Instrument Engineering Workbench) has been widely used for the programming of Kepco as it is a National instruments software GUI and it interfaces well with a wide range of instruments. However, for this system, the C code had to be developed and this was done as described. There are different headers and functions that could have been used to communicate the Kepco like the gpib and the ni488.2 headers but the visa.h was used because the libraries needed for it were available compared to the others. On importing the visa.h library into the project, the program will not compile as the header only holds the declaration of the functions of which some are declared as externs. To be more specific, there would be a linker error because the definitions of the external symbols 55

57 would not be found as they are in an external file. To be able to get past this error, the visa.lib file also had to be added to the project. Also, functions like the strcpy and strset are depreciated in this version of visual studio. This means that these functions have newer versions and the compiler tries to force the use of this newer version by causing compile errors even if the old versions are still valid. To solve the errors that are caused which are due to CRT_SECURE_NO_WARNINGS, it(_crt_secure_no_warnings) has to be added to the Preprocessor definitions. The directory for this is in Visual studio is: Project- Preprocessor- Preprocessor Definitions. The BIT 4886 card recognises the keyword(s) for programming the Kepco as a parser and these keywords have their own format. Though each keyword has a complete form, the short form in capital letters is what is needed to send the instructions as used earlier in section For example, VOLTage and CURRent have VOLT and CURR in capital because they are the keywords that need to be sent to the BIT card. Setup The header files used are shown. Again the string header file is needed because the queries are sent in message forms. Figure 4.6: Headers for Kepco setup Initialisation Similar to the Gauss meter but with different command structure, the variables have to be defined and then a communication handle is opened. Firstly, a default resource manager is opened after which the handle is opened. The variable holding the returned value of the handle is of type ViStatus. The device address of the GPIB instrument has to be set when opening the handle. The address of the Kepco is 6 by default [17] and this was used. The code fragment for this variable initialisation and handle opening is shown in Figure

58 Before controlling the Kepco remotely, it is necessary to remember that the limits cannot be set remotely. Therefore, if limits need to be used, they would have been set with the physical instrument controls on the device. Also, it is very necessary to ensure that the current supplied to the electromagnet is manually set to zero before entering remote mode so as to prevent disruption to data and damage to the equipment. Figure 4.7: Initialisation, opening device I/O and error checking adapted from [29] Writing to and reading from the Kepco Having successfully added the lib file, and initialised the port, writing and reading from the port is now possible using the keywords. Unlike the COM port communication, there is no need for waiting for an event as the GPIB handles such situations adequately. The functions ViWrite and ViRead are used for writing and reading respectively to the GPIB interface. The string copy function (strcpy) sets the string into the variable which is then passed to the write function. The voltage and current setting are specified explicitly as queries and set the Kepco precisely. 57

59 Figure 4.8: Writing voltage value to Kepco and requesting the value back adapted from [29] After successfully developing this code which took a lot of development time, the Kepco was remotely controlled using this program. The next section shows the implementation of the transfer function and tuning of the PID parameters. 4.2 Transfer function and Tuning parameters Following on from the methodology section, manual tuning was used to obtain the gains of PID controller. This was done because the other methods required the transfer function to first be derived before any further steps can be taken to get the gains. Getting the transfer function will involve system identification techniques and one of them was discussed with the step response and 63.2% tangent method. There are other such system identification methods which could also involve the mathematical derivation of the system. This will involve getting a current and magnetic field relationship such as H = N I (4.1) L 58

60 Where H is the magnetic field strength N is the number of turns of the coil of the electromagnet L is the length of the conductor I is the current supplied This equation will then be represented as a continuous function of time. The Laplace transform will then be taken in order to put it in the S-domain and represent as the ratio of the output to the input to give the transfer function as detailed in section Within the timeframe available for this project, implementing this and testing it to ensure its functionality was not feasible and this applies to the other methods as well. Consequently, the manual tuning started off with a set value for K P and the response was recorded and plotted. Based on this response, values for integral and derivative action were added till a satisfactory response was gotten. Once this was gotten, then the output of the PID could be calculated using equation Fully integrated system and PID Implementation using standard C With all the separate parts fully implemented including the tuning parameters, these project portions had to be integrated together to implement the final working system. The full setup of the hardware system is shown in Figure 4.9. Figure 4.9: The Complete System setup 59

61 Integrating the software of the different parts had to be done carefully to produce a fully working system. The process through which this was done was broken down and analysed through the flow chart as described in Figure Figure 4.10: Combining software parts in PID loop From Figure 4.10, there were several variables needed to hold the set point, field and tuning parameters and these were created. Now this PID loop had to be implemented to run continuously as is clear from the flow chart. This was done using a while loop to keep the process running. Inside the while loop, the PID action was implemented and the code snippet is shown in Figure While the set point remains the same, the controller continues to regulate this field value. 60

62 Figure 4.11: PID loop implementation code snippet With the set point at a certain field value, the actual field will have to be read in order to be able to calculate the error. The communication with the Gauss meter implemented in section has been put in a function called ReadGaussmeter. The character array that is holding the data read from the gauss meter has to be converted to a floating point number before being returned. On receiving the gauss meter reading which is the actual field, the error can be calculated. There are two additional error variables added which are the total error and previous error. These errors take care of the integral and differential actions of the PID respectively. This is because the total error is needed for the integral action as it is corrective from the present point all the way to the start. The derivative variable needs the previous error in order to try and make a prediction of what type of errors could occur based on past error rate. Once these are done, the various values for P, I and D are calculated by multiplying the errors with the tuning parameters. The value of the PID according to equation 2.12 is the sum of the three control actions. 61

63 Figure 4.12: Writing PID value to power supply and getting time taken This value of the PID is then passed to the power supply so as to produce the needed current to give the desired field. Also a clock is used to time the process to record the time taken for the system to produce the new field. The implementation of the PID calculation and timing are shown in Figure Arduino Implementation With implementation completed on the windows based computer, the control action implementation on the Arduino microcontroller could now be done more straightforwardly. Section already covered the setup of the Arduino microcontroller with the additional shields used. Major time was spent on getting the Sparkfun USB shields to work with the Arduino Uno. This took a lot of time because there were hidden issues both technically and from the manufacturers of the USB shield. The first step was to start communication with the Arduino using only one USB shield and then later both. However, there was no connection detected between the USB shield and the Arduino and it was not software related. After much testing, research and problem solving, it was realised that there was an issue from the manufacturers. The problem was that the digital pin 7 on the shield that should have been connected to the RESET pin had not been connected [21]. Though Sparkfun claimed to have rectified this issue, there was no 62

64 connection until a solution was done. Therefore, to rectify this problem, a jumper wire was connected between these two pins which are pin 7 and the reset pin. Once this was done, the code uploaded properly and was able to detect devices connected to the USB hub. Despite this working, it meant that some major rewiring would need to be done to allow for another shield to be connected on top of the first one and then the keypad shield. This was not feasible and also using two USB shields did not work out well. Therefore, at this point, the USB shield was changed to another USB shield made by Arduino which is shown in Figure 4.13 Figure 4.13: Arduino USB host shield In order to be able to use the keypad shield and correct the non-working of two shields mounted on each other, the implementation was changed to use the Arduino USB host shield with a USB hub. The USB hub is shown in Figure 4.14 and the full setup of the microcontroller is now as shown in Figure With the full setup, the USB hub is connected to the USB host shield. 63

65 Figure D-link USB hub Figure 4.15-Microcontroller setup The software developed for this setup was in two stages. First, the Arduino had to be able to initialise the USB hub through the host shield so that connected devices can be detected. When this was done, it was then to implement the PID action on the Arduino. Arduino and USB hub interaction Building on the USB 2.0 Host library, this software prints an identifier for each device that is connected to the hub. This is the basic test to ensure that the devices are detected. Figure 4.16-Detecting devices connected to USB hub taken from [30] The usbhub header file has to be added to the folder directory. From Figure 4.16, the more devices that are added, the more Hub instances would need to be created. Here only two 64

66 instances are created because only two devices would be connected to it. On successful initialisation of the devices on the hub, the next thing is to incorporate the code developed on the Windows computer on the Arduino. PID control on Arduino The implementation on the Arduino will require importing the headers used to start communication for both devices individually. The headers used and imported are therefore the visa, windows and string header file. Using the LCD display screen gives a more user-friendly interaction thus, it was included in the implementation. The LCD keypad shield used, has four buttons which allow four selections to be made. Consequently, the field values produced at 5V, 10V,15V and 20V which are 0.010T, 0.024T, 0.037T and 0.050T respectively were the options displayed on the screen and is shown in Figure Figure 4.17: LCD keypad shield for user interaction Establishing communication with the equipment used the same protocols as on the Windows computer so the important issue here was ensuring the USB hub was linked properly to the equipment. Once this was done, the set point values were set based on the keypad shield selection. This was done as shown in Figure

67 Figure 4.18: Getting set point from keypad shield This method of getting the set point was one of the major changes for the Arduino implementation compared to the windows computer. After getting the set point, the gauss meter reading needed to be obtained from the hub port it is connected to. On getting this reading, the error could be calculated and passed to the instance of PID class that was created. This PID instance computes the PID value and returns the needed output and since the tuning has been done already, the values for K p, K I, K D are already known and are reused. This output value is then sent to the Hub port connected to the Kepco in order to set the voltage accordingly to give the needed field. Figure 4.19 shows a snippet of the code. Figure 4.19: PID loop on the Arduino This control procedure continues running until it is stopped by the user. This section covered the implementation details of the various development stages and processes involved. The results obtained are given in Section 5. 66

68 5. TESTING AND RESULTS Intelligent Magnetic Field Controller Based on Suitable Microcontroller Platform A lot of work had gone into the implementation of the system as it is a large project with many individual parts, sub-systems and topics that had to be understood, built and tested to make up the full working system. This section covers the testing and evaluation of the various subsystems and the system as a whole. Section 5.1 gives a breakdown of the test procedure and the following sections give the results of the tests as described. 5.1 Software Testing and Evaluation To test the software of the entire system and ensure correct working of every part, the following areas need to be checked and evaluated. The test criteria include the following: The control action of the PID- This needs to be tested by simulation before implementation to ensure the performance of the controller and that the tuning is done optimally. This involves testing with various parameters and plotting the graphs to view the response. MATLAB is efficient for such simulation. Arduino and USB shield interaction- This is necessary to ensure that there is actual communication between these boards before actually connecting the intended devices. Testing of this will involve connecting the boards and trying test devices such as flash drives, mouse etc. Arduino and LCD Screen- Output of messages to the screen and how choices are made with the keypad buttons. Arduino, power supply, and Gauss meter- This is to ensure there is communication between the Arduino, the power supply and gauss meter. A handshake should be established so that the Arduino can send a prompt to both connected hardware and get a response signal back from both of them. This is a major test and backbone for every other communication. Computer, power supply and Gauss meter- ensure there is communication between computer and rest of the hardware. Test the working of the PID control action on the computer before trying implementation on Arduino. PID implemented on Arduino- repeat same test performed on the control action on the computer on the Arduino. 67

69 The areas for testing after implementation in order to ensure correct functionality includes both hardware and software. As stated earlier, the next subsections now cover details on each individual area mentioned here. 5.2 Instruments Communication Response Following on from the implementation, this section shows the instruments responding to the queries sent to them and sending back the readings Gauss meter communication The initial test message sent to the Lakeshore was the identification query. This sent back the model of the equipment. The response received by the program is shown in Figure 5.1 Figure 5.1: Identification query to Gauss meter and response received With the identification response obtained, the sending and receiving were confirmed working. Thereafter, the query for field readings was sent to get values. The value on the Gauss meter and that received in the program are shown in Figure

70 Figure 5.2: Gauss meter reading and value received by program Kepco Power supply communication The same identification test was used to confirm communication from the Kepco. This also sent back the model of the equipment and is as shown in Figure 5.3. Figure 5.3: Kepco Identification received from device After the identification, the next test was to set the power supply voltage and also read back the voltage. This is shown in Figure 5.4. Notice that the format of the readings sent by the Kepco are in powers of ten. So a value of 15V is received as 1.499E1. 69

71 Figure 5.4: Kepco voltage set remotely and printed by program Kepco and Gauss meter combined communication Having tested both the individual equipment, it was pertinent to test the combined software implementation and see the field value produced as a result of the power supply setting. The figure shows the value of 15V set to the Kepco and the field generated which was 0.038T; values which correspond to the ones read into the program. It is necessary to note that the field values might change slightly depending on the distance of the probe to the electromagnet. 70

72 Figure 5.5: Value of 15V set to Kepco producing a field of 0.038T as shown on Gauss meter The values read in by the program corresponds to these values on the instruments as shown. Figure 5.6: Received values of the Kepco and Gauss meter 71

73 This communication of both equipment setting and receiving was pivotal to the PID action. 5.3 PID Results using Manual Tuning The developed programme for the PID action has been discussed in section 0. Manual tuning was used and the results are presented here. The data sets gotten from the PID action are printed showing the field produced, the time taken to set each intermediary field and then the overall time taken to go from one field value to the set value. The magnetic field changes each time a voltage is supplied therefore an approximate calculation was done to find out by how much the magnetic field changes for each volt applied. This was done by setting the voltage to 10V initially and waiting for a steady state value which was obtained as 0.024T. After this initial steady state, the supply voltage was stepped to 15V and again the steady state field value was recorded which was 0.037T. Using these values, the change in the magnetic field per voltage was calculated as shown below. Change in magnetic field Change in voltage = = T/V Note that this value could change depending on the distance of the sensor to the electromagnet. The results presented here start by showing the printed data in the program followed by the plots of the system response with and without PID action. The system response was first done without PID action using a set point of 0.015T and the system started from rest. The voltage value was increased by the smallest possible value. The Kepco power supply s calibration moves in steps of 1V so the smallest possible change between two values that can be set with noticeable change is 0.5V. Now, the output from the program and the graph are shown in Figure 5.7 and Figure 5.8 respectively. 72

74 Field(Tesla) Intelligent Magnetic Field Controller Based on Suitable Microcontroller Platform Figure 5.7: Data from the program run without PID SYSTEM'S RESPONSE WITHOUT PID Time(seconds) Figure 5.8: System's response without PID with set point at 0.015T The results show a total time of about 12.44s with oscillation, overshoot and settled at giving a steady state error. This response time is not as bad as it is still fairly fast but can be improved. 73

75 Field(Tesla) Intelligent Magnetic Field Controller Based on Suitable Microcontroller Platform Next, the tuning parameters were tried and this started with only proportional action. The final tuning parameters obtained from the manual tuning that gave a satisfactory response are: K P : 200 K I : 15 K D : 3.0 The set point was again 0.015T and using these values, the response time was faster, less oscillation but a little steady state error and this was due to the loop boundaries used. These loop boundary was not changed so that accurate comparison could be done between the response with and without the PID. The total time taken is shown in Figure 5.9 and the plotted response is shown in Figure Figure 5.9: Program output with PID System's Response with PID Time(seconds) Figure 5.10: PID System's response with better response and little steady state error for a set point of 0.015T Comparing both graphs is one figure is done in Figure The changes are more easily seen in this graph. 74

CHAPTER 2 PID CONTROLLER BASED CLOSED LOOP CONTROL OF DC DRIVE

CHAPTER 2 PID CONTROLLER BASED CLOSED LOOP CONTROL OF DC DRIVE 23 CHAPTER 2 PID CONTROLLER BASED CLOSED LOOP CONTROL OF DC DRIVE 2.1 PID CONTROLLER A proportional Integral Derivative controller (PID controller) find its application in industrial control system. It

More information

PYKC 7 March 2019 EA2.3 Electronics 2 Lecture 18-1

PYKC 7 March 2019 EA2.3 Electronics 2 Lecture 18-1 In this lecture, we will examine a very popular feedback controller known as the proportional-integral-derivative (PID) control method. This type of controller is widely used in industry, does not require

More information

Comparative Analysis of a PID Controller using Ziegler- Nichols and Auto Turning Method

Comparative Analysis of a PID Controller using Ziegler- Nichols and Auto Turning Method International Academic Institute for Science and Technology International Academic Journal of Science and Engineering Vol. 3, No. 10, 2016, pp. 1-16. ISSN 2454-3896 International Academic Journal of Science

More information

Sensors and Sensing Motors, Encoders and Motor Control

Sensors and Sensing Motors, Encoders and Motor Control Sensors and Sensing Motors, Encoders and Motor Control Todor Stoyanov Mobile Robotics and Olfaction Lab Center for Applied Autonomous Sensor Systems Örebro University, Sweden todor.stoyanov@oru.se 13.11.2014

More information

The Discussion of this exercise covers the following points: Angular position control block diagram and fundamentals. Power amplifier 0.

The Discussion of this exercise covers the following points: Angular position control block diagram and fundamentals. Power amplifier 0. Exercise 6 Motor Shaft Angular Position Control EXERCISE OBJECTIVE When you have completed this exercise, you will be able to associate the pulses generated by a position sensing incremental encoder with

More information

Optimal Control System Design

Optimal Control System Design Chapter 6 Optimal Control System Design 6.1 INTRODUCTION The active AFO consists of sensor unit, control system and an actuator. While designing the control system for an AFO, a trade-off between the transient

More information

Different Controller Terms

Different Controller Terms Loop Tuning Lab Challenges Not all PID controllers are the same. They don t all use the same units for P-I-and D. There are different types of processes. There are different final element types. There

More information

Fundamentals of Servo Motion Control

Fundamentals of Servo Motion Control Fundamentals of Servo Motion Control The fundamental concepts of servo motion control have not changed significantly in the last 50 years. The basic reasons for using servo systems in contrast to open

More information

QuickBuilder PID Reference

QuickBuilder PID Reference QuickBuilder PID Reference Doc. No. 951-530031-006 2010 Control Technology Corp. 25 South Street Hopkinton, MA 01748 Phone: 508.435.9595 Fax: 508.435.2373 Thursday, March 18, 2010 2 QuickBuilder PID Reference

More information

Figure 1: Unity Feedback System. The transfer function of the PID controller looks like the following:

Figure 1: Unity Feedback System. The transfer function of the PID controller looks like the following: Islamic University of Gaza Faculty of Engineering Electrical Engineering department Control Systems Design Lab Eng. Mohammed S. Jouda Eng. Ola M. Skeik Experiment 3 PID Controller Overview This experiment

More information

Switch Mode Power Conversion Prof. L. Umanand Department of Electronics System Engineering Indian Institute of Science, Bangalore

Switch Mode Power Conversion Prof. L. Umanand Department of Electronics System Engineering Indian Institute of Science, Bangalore Switch Mode Power Conversion Prof. L. Umanand Department of Electronics System Engineering Indian Institute of Science, Bangalore Lecture - 30 Implementation on PID controller Good day to all of you. We

More information

TC LV-Series Temperature Controllers V1.01

TC LV-Series Temperature Controllers V1.01 TC LV-Series Temperature Controllers V1.01 Electron Dynamics Ltd, Kingsbury House, Kingsbury Road, Bevois Valley, Southampton, SO14 OJT Tel: +44 (0) 2380 480 800 Fax: +44 (0) 2380 480 801 e-mail support@electrondynamics.co.uk

More information

-binary sensors and actuators (such as an on/off controller) are generally more reliable and less expensive

-binary sensors and actuators (such as an on/off controller) are generally more reliable and less expensive Process controls are necessary for designing safe and productive plants. A variety of process controls are used to manipulate processes, however the most simple and often most effective is the PID controller.

More information

IJESRT. Scientific Journal Impact Factor: (ISRA), Impact Factor: 1.852

IJESRT. Scientific Journal Impact Factor: (ISRA), Impact Factor: 1.852 IJESRT INTERNATIONAL JOURNAL OF ENGINEERING SCIENCES & RESEARCH TECHNOLOGY Design of Self-tuning PID controller using Fuzzy Logic for Level Process P D Aditya Karthik *1, J Supriyanka 2 *1, 2 Department

More information

Experiment 9. PID Controller

Experiment 9. PID Controller Experiment 9 PID Controller Objective: - To be familiar with PID controller. - Noting how changing PID controller parameter effect on system response. Theory: The basic function of a controller is to execute

More information

OVEN INDUSTRIES, INC. Model 5C7-362

OVEN INDUSTRIES, INC. Model 5C7-362 OVEN INDUSTRIES, INC. OPERATING MANUAL Model 5C7-362 THERMOELECTRIC MODULE TEMPERATURE CONTROLLER TABLE OF CONTENTS Features... 1 Description... 2 Block Diagram... 3 RS232 Communications Connections...

More information

CHAPTER 7 HARDWARE IMPLEMENTATION

CHAPTER 7 HARDWARE IMPLEMENTATION 168 CHAPTER 7 HARDWARE IMPLEMENTATION 7.1 OVERVIEW In the previous chapters discussed about the design and simulation of Discrete controller for ZVS Buck, Interleaved Boost, Buck-Boost, Double Frequency

More information

COMPARISON OF TUNING METHODS OF PID CONTROLLER USING VARIOUS TUNING TECHNIQUES WITH GENETIC ALGORITHM

COMPARISON OF TUNING METHODS OF PID CONTROLLER USING VARIOUS TUNING TECHNIQUES WITH GENETIC ALGORITHM JOURNAL OF ELECTRICAL ENGINEERING & TECHNOLOGY Journal of Electrical Engineering & Technology (JEET) (JEET) ISSN 2347-422X (Print), ISSN JEET I A E M E ISSN 2347-422X (Print) ISSN 2347-4238 (Online) Volume

More information

EE 4314 Lab 3 Handout Speed Control of the DC Motor System Using a PID Controller Fall Lab Information

EE 4314 Lab 3 Handout Speed Control of the DC Motor System Using a PID Controller Fall Lab Information EE 4314 Lab 3 Handout Speed Control of the DC Motor System Using a PID Controller Fall 2012 IMPORTANT: This handout is common for all workbenches. 1. Lab Information a) Date, Time, Location, and Report

More information

CHAPTER 4 PID CONTROLLER BASED SPEED CONTROL OF THREE PHASE INDUCTION MOTOR

CHAPTER 4 PID CONTROLLER BASED SPEED CONTROL OF THREE PHASE INDUCTION MOTOR 36 CHAPTER 4 PID CONTROLLER BASED SPEED CONTROL OF THREE PHASE INDUCTION MOTOR 4.1 INTRODUCTION Now a day, a number of different controllers are used in the industry and in many other fields. In a quite

More information

GE420 Laboratory Assignment 8 Positioning Control of a Motor Using PD, PID, and Hybrid Control

GE420 Laboratory Assignment 8 Positioning Control of a Motor Using PD, PID, and Hybrid Control GE420 Laboratory Assignment 8 Positioning Control of a Motor Using PD, PID, and Hybrid Control Goals for this Lab Assignment: 1. Design a PD discrete control algorithm to allow the closed-loop combination

More information

Sensors and Sensing Motors, Encoders and Motor Control

Sensors and Sensing Motors, Encoders and Motor Control Sensors and Sensing Motors, Encoders and Motor Control Todor Stoyanov Mobile Robotics and Olfaction Lab Center for Applied Autonomous Sensor Systems Örebro University, Sweden todor.stoyanov@oru.se 05.11.2015

More information

InstrumentationTools.com

InstrumentationTools.com Author: Instrumentation Tools Categories: Control Systems Ziegler-Nichols Closed-Loop Method (Ultimate Gain) Closed-loop refers to the operation of a control system with the controlling device in automatic

More information

Configuration Example of Temperature Control

Configuration Example of Temperature Control Controllers Technical Information Configuration Example of Control controllers The following is an example of the configuration of temperature control. Controller Relay Voltage Current SSR Cycle controller

More information

Chapter 10 Digital PID

Chapter 10 Digital PID Chapter 10 Digital PID Chapter 10 Digital PID control Goals To show how PID control can be implemented in a digital computer program To deliver a template for a PID controller that you can implement yourself

More information

MM7 Practical Issues Using PID Controllers

MM7 Practical Issues Using PID Controllers MM7 Practical Issues Using PID Controllers Readings: FC textbook: Section 4.2.7 Integrator Antiwindup p.196-200 Extra reading: Hou Ming s lecture notes p.60-69 Extra reading: M.J. Willis notes on PID controler

More information

Figure 1.1: Quanser Driving Simulator

Figure 1.1: Quanser Driving Simulator 1 INTRODUCTION The Quanser HIL Driving Simulator (QDS) is a modular and expandable LabVIEW model of a car driving on a closed track. The model is intended as a platform for the development, implementation

More information

DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING BANGLADESH UNIVERSITY OF ENGINEERING & TECHNOLOGY EEE 402 : CONTROL SYSTEMS SESSIONAL

DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING BANGLADESH UNIVERSITY OF ENGINEERING & TECHNOLOGY EEE 402 : CONTROL SYSTEMS SESSIONAL DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING BANGLADESH UNIVERSITY OF ENGINEERING & TECHNOLOGY EEE 402 : CONTROL SYSTEMS SESSIONAL Experiment No. 1(a) : Modeling of physical systems and study of

More information

EVALUATION ALGORITHM- BASED ON PID CONTROLLER DESIGN FOR THE UNSTABLE SYSTEMS

EVALUATION ALGORITHM- BASED ON PID CONTROLLER DESIGN FOR THE UNSTABLE SYSTEMS EVALUATION ALGORITHM- BASED ON PID CONTROLLER DESIGN FOR THE UNSTABLE SYSTEMS Erliza Binti Serri 1, Wan Ismail Ibrahim 1 and Mohd Riduwan Ghazali 2 1 Sustanable Energy & Power Electronics Research, FKEE

More information

GLOSSARY OF TERMS FOR PROCESS CONTROL

GLOSSARY OF TERMS FOR PROCESS CONTROL Y1900SS-1a 1 GLOSSARY OF TERMS FOR PROCESS CONTROL Accuracy Conformity of an indicated value to an accepted standard value, or true value. Accuracy, Reference A number or quantity which defines the limit

More information

Closed Loop Magnetic Levitation Control of a Rotary Inductrack System. Senior Project Proposal. Students: Austin Collins Corey West

Closed Loop Magnetic Levitation Control of a Rotary Inductrack System. Senior Project Proposal. Students: Austin Collins Corey West Closed Loop Magnetic Levitation Control of a Rotary Inductrack System Senior Project Proposal Students: Austin Collins Corey West Advisors: Dr. Winfred Anakwa Mr. Steven Gutschlag Date: December 18, 2013

More information

Procidia Control Solutions Dead Time Compensation

Procidia Control Solutions Dead Time Compensation APPLICATION DATA Procidia Control Solutions Dead Time Compensation AD353-127 Rev 2 April 2012 This application data sheet describes dead time compensation methods. A configuration can be developed within

More information

Simulation and Analysis of Cascaded PID Controller Design for Boiler Pressure Control System

Simulation and Analysis of Cascaded PID Controller Design for Boiler Pressure Control System PAPER ID: IJIFR / V1 / E10 / 031 www.ijifr.com ijifr.journal@gmail.com ISSN (Online): 2347-1697 An Enlightening Online Open Access, Refereed & Indexed Journal of Multidisciplinary Research Simulation and

More information

CSE 3215 Embedded Systems Laboratory Lab 5 Digital Control System

CSE 3215 Embedded Systems Laboratory Lab 5 Digital Control System Introduction CSE 3215 Embedded Systems Laboratory Lab 5 Digital Control System The purpose of this lab is to introduce you to digital control systems. The most basic function of a control system is to

More information

Total Hours Registration through Website or for further details please visit (Refer Upcoming Events Section)

Total Hours Registration through Website or for further details please visit   (Refer Upcoming Events Section) Total Hours 110-150 Registration Q R Code Registration through Website or for further details please visit http://www.rknec.edu/ (Refer Upcoming Events Section) Module 1: Basics of Microprocessor & Microcontroller

More information

Cantonment, Dhaka-1216, BANGLADESH

Cantonment, Dhaka-1216, BANGLADESH International Conference on Mechanical, Industrial and Energy Engineering 2014 26-27 December, 2014, Khulna, BANGLADESH ICMIEE-PI-140153 Electro-Mechanical Modeling of Separately Excited DC Motor & Performance

More information

International Journal of Research in Advent Technology Available Online at:

International Journal of Research in Advent Technology Available Online at: OVERVIEW OF DIFFERENT APPROACHES OF PID CONTROLLER TUNING Manju Kurien 1, Alka Prayagkar 2, Vaishali Rajeshirke 3 1 IS Department 2 IE Department 3 EV DEpartment VES Polytechnic, Chembur,Mumbai 1 manjulibu@gmail.com

More information

Loop Design. Chapter Introduction

Loop Design. Chapter Introduction Chapter 8 Loop Design 8.1 Introduction This is the first Chapter that deals with design and we will therefore start by some general aspects on design of engineering systems. Design is complicated because

More information

Experiment Of Speed Control for an Electric Trishaw Based on PID Control Algorithm

Experiment Of Speed Control for an Electric Trishaw Based on PID Control Algorithm International Journal of Mechanical & Mechatronics Engineering IJMME-IJENS Vol:17 No:02 38 Experiment Of Speed Control for an Electric Trishaw Based on PID Control Algorithm Shahrizal Saat 1 *, Mohd Nabil

More information

DC Motor Speed Control using PID Controllers

DC Motor Speed Control using PID Controllers "EE 616 Electronic System Design Course Project, EE Dept, IIT Bombay, November 2009" DC Motor Speed Control using PID Controllers Nikunj A. Bhagat (08307908) nbhagat@ee.iitb.ac.in, Mahesh Bhaganagare (CEP)

More information

EMPIRICAL MODEL IDENTIFICATION AND PID CONTROLLER TUNING FOR A FLOW PROCESS

EMPIRICAL MODEL IDENTIFICATION AND PID CONTROLLER TUNING FOR A FLOW PROCESS Volume 118 No. 20 2018, 2015-2021 ISSN: 1311-8080 (printed version); ISSN: 1314-3395 (on-line version) url: http://www.ijpam.eu ijpam.eu EMPIRICAL MODEL IDENTIFICATION AND PID CONTROLLER TUNING FOR A FLOW

More information

One-degree-of-freedom PID controlled Helicopter. PDE 2420 Control Systems

One-degree-of-freedom PID controlled Helicopter. PDE 2420 Control Systems One-degree-of-freedom PID controlled Helicopter PDE 2420 Control Systems Abdelati Zelbane Eduardo Abend M00374639 M00375571 Payam Rahmdel May 2013 Table of Contents 1. Introduction... 3 2. Description

More information

Lab 2, Analysis and Design of PID

Lab 2, Analysis and Design of PID Lab 2, Analysis and Design of PID Controllers IE1304, Control Theory 1 Goal The main goal is to learn how to design a PID controller to handle reference tracking and disturbance rejection. You will design

More information

Hydraulic Actuator Control Using an Multi-Purpose Electronic Interface Card

Hydraulic Actuator Control Using an Multi-Purpose Electronic Interface Card Hydraulic Actuator Control Using an Multi-Purpose Electronic Interface Card N. KORONEOS, G. DIKEAKOS, D. PAPACHRISTOS Department of Automation Technological Educational Institution of Halkida Psaxna 34400,

More information

Design of Model Based PID Controller Tuning for Pressure Process

Design of Model Based PID Controller Tuning for Pressure Process ISSN (Print) : 3 3765 Design of Model Based PID Controller Tuning for Pressure Process A.Kanchana 1, G.Lavanya, R.Nivethidha 3, S.Subasree 4, P.Aravind 5 UG student, Dept. of ICE, Saranathan College Engineering,

More information

CT435. PC Board Mount Temperature Controller

CT435. PC Board Mount Temperature Controller CT435 PC Board Mount Temperature Controller Features Two RTD temperature sensor inputs: Pt100 or Pt1000. Wide temperature sensing range: -70 C to 650 C. All controller features are configurable through

More information

Lab 23 Microcomputer-Based Motor Controller

Lab 23 Microcomputer-Based Motor Controller Lab 23 Microcomputer-Based Motor Controller Page 23.1 Lab 23 Microcomputer-Based Motor Controller This laboratory assignment accompanies the book, Embedded Microcomputer Systems: Real Time Interfacing,

More information

A Comparative Novel Method of Tuning of Controller for Temperature Process

A Comparative Novel Method of Tuning of Controller for Temperature Process A Comparative Novel Method of Tuning of Controller for Temperature Process E.Kalaiselvan 1, J. Dominic Tagore 2 Associate Professor, Department of E.I.E, M.A.M College Of Engineering, Trichy, Tamilnadu,

More information

EITN90 Radar and Remote Sensing Lab 2

EITN90 Radar and Remote Sensing Lab 2 EITN90 Radar and Remote Sensing Lab 2 February 8, 2018 1 Learning outcomes This lab demonstrates the basic operation of a frequency modulated continuous wave (FMCW) radar, capable of range and velocity

More information

6545(Print), ISSN (Online) Volume 4, Issue 1, January- February (2013), IAEME & TECHNOLOGY (IJEET)

6545(Print), ISSN (Online) Volume 4, Issue 1, January- February (2013), IAEME & TECHNOLOGY (IJEET) INTERNATIONAL International Journal of JOURNAL Electrical Engineering OF ELECTRICAL and Technology (IJEET), ENGINEERING ISSN 0976 & TECHNOLOGY (IJEET) ISSN 0976 6545(Print) ISSN 0976 6553(Online) Volume

More information

CHAPTER 4 FUZZY BASED DYNAMIC PWM CONTROL

CHAPTER 4 FUZZY BASED DYNAMIC PWM CONTROL 47 CHAPTER 4 FUZZY BASED DYNAMIC PWM CONTROL 4.1 INTRODUCTION Passive filters are used to minimize the harmonic components present in the stator voltage and current of the BLDC motor. Based on the design,

More information

Position Control of DC Motor by Compensating Strategies

Position Control of DC Motor by Compensating Strategies Position Control of DC Motor by Compensating Strategies S Prem Kumar 1 J V Pavan Chand 1 B Pangedaiah 1 1. Assistant professor of Laki Reddy Balireddy College Of Engineering, Mylavaram Abstract - As the

More information

Some Tuning Methods of PID Controller For Different Processes

Some Tuning Methods of PID Controller For Different Processes International Conference on Information Engineering, Management and Security [ICIEMS] 282 International Conference on Information Engineering, Management and Security 2015 [ICIEMS 2015] ISBN 978-81-929742-7-9

More information

Comparative Study of PID and Fuzzy Controllers for Speed Control of DC Motor

Comparative Study of PID and Fuzzy Controllers for Speed Control of DC Motor Comparative Study of PID and Fuzzy Controllers for Speed Control of DC Motor Osama Omer Adam Mohammed 1, Dr. Awadalla Taifor Ali 2 P.G. Student, Department of Control Engineering, Faculty of Engineering,

More information

Lecture 5 Introduction to control

Lecture 5 Introduction to control Lecture 5 Introduction to control Feedback control is a way of automatically adjusting a variable to a desired value despite possible external influence or variations. Eg: Heating your house. No feedback

More information

Introduction to BLDC Motor Control Using Freescale MCU. Tom Wang Segment Biz. Dev. Manager Avnet Electronics Marketing Asia

Introduction to BLDC Motor Control Using Freescale MCU. Tom Wang Segment Biz. Dev. Manager Avnet Electronics Marketing Asia Introduction to BLDC Motor Control Using Freescale MCU Tom Wang Segment Biz. Dev. Manager Avnet Electronics Marketing Asia Agenda Introduction to Brushless DC Motors Motor Electrical and Mechanical Model

More information

1. Consider the closed loop system shown in the figure below. Select the appropriate option to implement the system shown in dotted lines using

1. Consider the closed loop system shown in the figure below. Select the appropriate option to implement the system shown in dotted lines using 1. Consider the closed loop system shown in the figure below. Select the appropriate option to implement the system shown in dotted lines using op-amps a. b. c. d. Solution: b) Explanation: The dotted

More information

Digital Control of MS-150 Modular Position Servo System

Digital Control of MS-150 Modular Position Servo System IEEE NECEC Nov. 8, 2007 St. John's NL 1 Digital Control of MS-150 Modular Position Servo System Farid Arvani, Syeda N. Ferdaus, M. Tariq Iqbal Faculty of Engineering, Memorial University of Newfoundland

More information

Instrumentation and Control Systems

Instrumentation and Control Systems Unit 16: Unit Instrumentation and Control Systems D/615/1490 Unit level 4 Credit value 15 Introduction Instrumentation and control can also be described as measurement automation, which is a very important

More information

An Introduction to Proportional- Integral-Derivative (PID) Controllers

An Introduction to Proportional- Integral-Derivative (PID) Controllers An Introduction to Proportional- Integral-Derivative (PID) Controllers Stan Żak School of Electrical and Computer Engineering ECE 680 Fall 2017 1 Motivation Growing gap between real world control problems

More information

Arduino STEAM Academy Arduino STEM Academy Art without Engineering is dreaming. Engineering without Art is calculating. - Steven K.

Arduino STEAM Academy Arduino STEM Academy Art without Engineering is dreaming. Engineering without Art is calculating. - Steven K. Arduino STEAM Academy Arduino STEM Academy Art without Engineering is dreaming. Engineering without Art is calculating. - Steven K. Roberts Page 1 See Appendix A, for Licensing Attribution information

More information

Modified ultimate cycle method relay auto-tuning

Modified ultimate cycle method relay auto-tuning Adaptive Control - Autotuning Structure of presentation: Relay feedback autotuning outline Relay feedback autotuning details How close is the estimate of the ultimate gain and period to the actual ultimate

More information

Software Operational Manual

Software Operational Manual Software Operational Manual for Easy Servo Drives ES-D508/808/1008 www.leadshine.com SM-ES-R20121030 ii Leadshine reserves the right to make changes without further notice to any products herein to improve

More information

BINARY DISTILLATION COLUMN CONTROL TECHNIQUES: A COMPARATIVE STUDY

BINARY DISTILLATION COLUMN CONTROL TECHNIQUES: A COMPARATIVE STUDY BINARY DISTILLATION COLUMN CONTROL TECHNIQUES: A COMPARATIVE STUDY 1 NASSER MOHAMED RAMLI, 2 MOHAMMED ABOBAKR BASAAR 1,2 Chemical Engineering Department, Faculty of Engineering, Universiti Teknologi PETRONAS,

More information

A Case Study in Modeling and Process Control: the Control of a Pilot Scale Heating and Ventilation System

A Case Study in Modeling and Process Control: the Control of a Pilot Scale Heating and Ventilation System Dublin Institute of Technology ARROW@DIT Conference papers School of Electrical and Electronic Engineering 2006-01-01 A Case Study in Modeling and Process Control: the Control of a Pilot Scale Heating

More information

Module 08 Controller Designs: Compensators and PIDs

Module 08 Controller Designs: Compensators and PIDs Module 08 Controller Designs: Compensators and PIDs Ahmad F. Taha EE 3413: Analysis and Desgin of Control Systems Email: ahmad.taha@utsa.edu Webpage: http://engineering.utsa.edu/ taha March 31, 2016 Ahmad

More information

Auto-tuning of PID Controller for the Cases Given by Forbes Marshall

Auto-tuning of PID Controller for the Cases Given by Forbes Marshall International Journal of Electronics Engineering Research. ISSN 0975-6450 Volume 9, Number 6 (2017) pp. 809-814 Research India Publications http://www.ripublication.com Auto-tuning of PID Controller for

More information

R. W. Erickson. Department of Electrical, Computer, and Energy Engineering University of Colorado, Boulder

R. W. Erickson. Department of Electrical, Computer, and Energy Engineering University of Colorado, Boulder R. W. Erickson Department of Electrical, Computer, and Energy Engineering University of Colorado, Boulder Construction of transfer function v 2 (s) v (s) = Z 2Z Z Z 2 Z = Z out Z R C Z = L Q = R /R 0 f

More information

Effective Teaching Learning Process for PID Controller Based on Experimental Setup with LabVIEW

Effective Teaching Learning Process for PID Controller Based on Experimental Setup with LabVIEW Effective Teaching Learning Process for PID Controller Based on Experimental Setup with LabVIEW Komal Sampatrao Patil & D.R.Patil Electrical Department, Walchand college of Engineering, Sangli E-mail :

More information

PID Tuner (ver. 1.0)

PID Tuner (ver. 1.0) PID Tuner (ver. 1.0) Product Help Czech Technical University in Prague Faculty of Mechanical Engineering Department of Instrumentation and Control Engineering This product was developed within the subject

More information

TF Electronics Throttle Controller

TF Electronics Throttle Controller TF Electronics Throttle Controller Software Installation: Double click on TFEsetup.exe file to start installation. After installation there will be a shortcut on your desktop. Connecting the USB cable

More information

Rotational Speed Control Based on Microcontrollers

Rotational Speed Control Based on Microcontrollers Rotational Speed Control Based on Microcontrollers Valter COSTA Natural and Exact Science Department, Federal University of Semi-Arid Camila BARROS Natural and Exact Science Department, Federal University

More information

The PID controller. Summary. Introduction to Control Systems

The PID controller. Summary. Introduction to Control Systems The PID controller ISTTOK real-time AC 7-10-2010 Summary Introduction to Control Systems PID Controller PID Tuning Discrete-time Implementation The PID controller 2 Introduction to Control Systems Some

More information

Relay Feedback based PID Controller for Nonlinear Process

Relay Feedback based PID Controller for Nonlinear Process Relay Feedback based PID Controller for Nonlinear Process I.Thirunavukkarasu, Dr.V.I.George, * and R.Satheeshbabu Abstract This work is about designing a relay feedback based PID controller for a conical

More information

(1) Identify individual entries in a Control Loop Diagram. (2) Sketch Bode Plots by hand (when we could have used a computer

(1) Identify individual entries in a Control Loop Diagram. (2) Sketch Bode Plots by hand (when we could have used a computer Last day: (1) Identify individual entries in a Control Loop Diagram (2) Sketch Bode Plots by hand (when we could have used a computer program to generate sketches). How might this be useful? Can more clearly

More information

PID control. since Similarly, modern industrial

PID control. since Similarly, modern industrial Control basics Introduction to For deeper understanding of their usefulness, we deconstruct P, I, and D control functions. PID control Paul Avery Senior Product Training Engineer Yaskawa Electric America,

More information

2.017 DESIGN OF ELECTROMECHANICAL ROBOTIC SYSTEMS Fall 2009 Lab 4: Motor Control. October 5, 2009 Dr. Harrison H. Chin

2.017 DESIGN OF ELECTROMECHANICAL ROBOTIC SYSTEMS Fall 2009 Lab 4: Motor Control. October 5, 2009 Dr. Harrison H. Chin 2.017 DESIGN OF ELECTROMECHANICAL ROBOTIC SYSTEMS Fall 2009 Lab 4: Motor Control October 5, 2009 Dr. Harrison H. Chin Formal Labs 1. Microcontrollers Introduction to microcontrollers Arduino microcontroller

More information

Glossary of terms. Short explanation

Glossary of terms. Short explanation Glossary Concept Module. Video Short explanation Abstraction 2.4 Capturing the essence of the behavior of interest (getting a model or representation) Action in the control Derivative 4.2 The control signal

More information

Design of an Intelligent Pressure Control System Based on the Fuzzy Self-tuning PID Controller

Design of an Intelligent Pressure Control System Based on the Fuzzy Self-tuning PID Controller Design of an Intelligent Pressure Control System Based on the Fuzzy Self-tuning PID Controller 1 Deepa S. Bhandare, 2 N. R.Kulkarni 1,2 Department of Electrical Engineering, Modern College of Engineering,

More information

Hopper Spacecraft Simulator. Billy Hau and Brian Wisniewski

Hopper Spacecraft Simulator. Billy Hau and Brian Wisniewski Hopper Spacecraft Simulator Billy Hau and Brian Wisniewski Agenda Introduction Flight Dynamics Hardware Design Avionics Control System Future Works Introduction Mission Overview Collaboration with Penn

More information

ME375 Lab Project. Bradley Boane & Jeremy Bourque April 25, 2018

ME375 Lab Project. Bradley Boane & Jeremy Bourque April 25, 2018 ME375 Lab Project Bradley Boane & Jeremy Bourque April 25, 2018 Introduction: The goal of this project was to build and program a two-wheel robot that travels forward in a straight line for a distance

More information

Relay Based Auto Tuner for Calibration of SCR Pump Controller Parameters in Diesel after Treatment Systems

Relay Based Auto Tuner for Calibration of SCR Pump Controller Parameters in Diesel after Treatment Systems Abstract Available online at www.academicpaper.org Academic @ Paper ISSN 2146-9067 International Journal of Automotive Engineering and Technologies Special Issue 1, pp. 26 33, 2017 Original Research Article

More information

DC SERVO MOTOR CONTROL SYSTEM

DC SERVO MOTOR CONTROL SYSTEM DC SERVO MOTOR CONTROL SYSTEM MODEL NO:(PEC - 00CE) User Manual Version 2.0 Technical Clarification /Suggestion : / Technical Support Division, Vi Microsystems Pvt. Ltd., Plot No :75,Electronics Estate,

More information

ADVANCED EMBEDDED MONITORING SYSTEM FOR ELECTROMAGNETIC RADIATION

ADVANCED EMBEDDED MONITORING SYSTEM FOR ELECTROMAGNETIC RADIATION 98 Chapter-5 ADVANCED EMBEDDED MONITORING SYSTEM FOR ELECTROMAGNETIC RADIATION 99 CHAPTER-5 Chapter 5: ADVANCED EMBEDDED MONITORING SYSTEM FOR ELECTROMAGNETIC RADIATION S.No Name of the Sub-Title Page

More information

AVR221: Discrete PID Controller on tinyavr and megaavr devices. Introduction. AVR 8-bit Microcontrollers APPLICATION NOTE

AVR221: Discrete PID Controller on tinyavr and megaavr devices. Introduction. AVR 8-bit Microcontrollers APPLICATION NOTE AVR 8-bit Microcontrollers AVR221: Discrete PID Controller on tinyavr and megaavr devices APPLICATION NOTE Introduction This application note describes a simple implementation of a discrete Proportional-

More information

SIMULATION AND IMPLEMENTATION OF PID-ANN CONTROLLER FOR CHOPPER FED EMBEDDED PMDC MOTOR

SIMULATION AND IMPLEMENTATION OF PID-ANN CONTROLLER FOR CHOPPER FED EMBEDDED PMDC MOTOR ISSN: 2229-6956(ONLINE) DOI: 10.21917/ijsc.2012.0049 ICTACT JOURNAL ON SOFT COMPUTING, APRIL 2012, VOLUME: 02, ISSUE: 03 SIMULATION AND IMPLEMENTATION OF PID-ANN CONTROLLER FOR CHOPPER FED EMBEDDED PMDC

More information

Comparative Study of PID and FOPID Controller Response for Automatic Voltage Regulation

Comparative Study of PID and FOPID Controller Response for Automatic Voltage Regulation IOSR Journal of Engineering (IOSRJEN) ISSN (e): 2250-3021, ISSN (p): 2278-8719 Vol. 04, Issue 09 (September. 2014), V5 PP 41-48 www.iosrjen.org Comparative Study of PID and FOPID Controller Response for

More information

Design and Development of Pre-paid electricity billing using Raspberry Pi2

Design and Development of Pre-paid electricity billing using Raspberry Pi2 International Journal of Electronics Engineering Research. ISSN 0975-6450 Volume 9, Number 7 (2017) pp. 995-1005 Research India Publications http://www.ripublication.com Design and Development of Pre-paid

More information

Design of PID Control System Assisted using LabVIEW in Biomedical Application

Design of PID Control System Assisted using LabVIEW in Biomedical Application Design of PID Control System Assisted using LabVIEW in Biomedical Application N. H. Ariffin *,a and N. Arsad b Department of Electrical, Electronic and Systems Engineering, Faculty of Engineering and Built

More information

Non Linear Tank Level Control using LabVIEW Jagatis Kumaar B 1 Vinoth K 2 Vivek Vijayan C 3 P Aravind 4

Non Linear Tank Level Control using LabVIEW Jagatis Kumaar B 1 Vinoth K 2 Vivek Vijayan C 3 P Aravind 4 IJSRD - International Journal for Scientific Research & Development Vol. 3, Issue 01, 2015 ISSN (online): 2321-0613 Non Linear Tank Level Control using LabVIEW Jagatis Kumaar B 1 Vinoth K 2 Vivek Vijayan

More information

Controller Algorithms and Tuning

Controller Algorithms and Tuning The previous sections of this module described the purpose of control, defined individual elements within control loops, and demonstrated the symbology used to represent those elements in an engineering

More information

An Implementation for Comparison of Various PID Controllers Tuning Methodologies for Heat Exchanger Model

An Implementation for Comparison of Various PID Controllers Tuning Methodologies for Heat Exchanger Model An Implementation for Comparison of Various PID Controllers Tuning Methodologies for Heat Exchanger Model Akshay Dhanda 1 and Dharam Niwas 2 1 M. Tech. Scholar, Indus Institute of Engineering and Technology,

More information

Brief Course Description for Electrical Engineering Department study plan

Brief Course Description for Electrical Engineering Department study plan Brief Course Description for Electrical Engineering Department study plan 2011-2015 Fundamentals of engineering (610111) The course is a requirement for electrical engineering students. It introduces the

More information

II. PROPOSED CLOSED LOOP SPEED CONTROL OF PMSM BLOCK DIAGRAM

II. PROPOSED CLOSED LOOP SPEED CONTROL OF PMSM BLOCK DIAGRAM Closed Loop Speed Control of Permanent Magnet Synchronous Motor fed by SVPWM Inverter Malti Garje 1, D.R.Patil 2 1,2 Electrical Engineering Department, WCE Sangli Abstract This paper presents very basic

More information

Introduction to PID Control

Introduction to PID Control Introduction to PID Control Introduction This introduction will show you the characteristics of the each of proportional (P), the integral (I), and the derivative (D) controls, and how to use them to obtain

More information

Pre-Proposal Presentation Team 1: Portable Micro-sensor Reader

Pre-Proposal Presentation Team 1: Portable Micro-sensor Reader Pre-Proposal Presentation Team 1: Portable Micro-sensor Reader Sponsors: - MSU Technologies Dr. Shantanu Chakrabartty - National Science Foundation Facilitator: Dr. Fathi Salem Team Members: Ron Razalan,

More information

Magnetic Levitation System

Magnetic Levitation System Introduction Magnetic Levitation System There are two experiments in this lab. The first experiment studies system nonlinear characteristics, and the second experiment studies system dynamic characteristics

More information

Basic Electronics Learning by doing Prof. T.S. Natarajan Department of Physics Indian Institute of Technology, Madras

Basic Electronics Learning by doing Prof. T.S. Natarajan Department of Physics Indian Institute of Technology, Madras Basic Electronics Learning by doing Prof. T.S. Natarajan Department of Physics Indian Institute of Technology, Madras Lecture 26 Mathematical operations Hello everybody! In our series of lectures on basic

More information

Module: Arduino as Signal Generator

Module: Arduino as Signal Generator Name/NetID: Teammate/NetID: Module: Laboratory Outline In our continuing quest to access the development and debugging capabilities of the equipment on your bench at home Arduino/RedBoard as signal generator.

More information

TUNING OF PID CONTROLLER USING PSO AND ITS PERFORMANCES ON ELECTRO-HYDRAULIC SERVO SYSTEM

TUNING OF PID CONTROLLER USING PSO AND ITS PERFORMANCES ON ELECTRO-HYDRAULIC SERVO SYSTEM TUNING OF PID CONTROLLER USING PSO AND ITS PERFORMANCES ON ELECTRO-HYDRAULIC SERVO SYSTEM Neha Tandan 1, Kuldeep Kumar Swarnkar 2 1,2 Electrical Engineering Department 1,2, MITS, Gwalior Abstract PID controllers

More information