A Low-cost Laboratory Experiment Setup for Frequency Domain Analysis for a Feedback Control Systems Course

A Low-cost Laboratory Experiment Setup for Frequency Domain Analysis for a Feedback Control Systems Course

Proceedings of 20th The International Federation of Congress Automatic Control Proceedings of the the 20th World World Congress Proceedings of the 20t...

1MB Sizes 11 Downloads 178 Views

Proceedings of 20th The International Federation of Congress Automatic Control Proceedings of the the 20th World World Congress Proceedings of the 20th9-14, World The International International Federation of Congress Automatic Control Toulouse, France, July 2017 The Federation of Automatic Control Available online at www.sciencedirect.com The International of Automatic Control Toulouse, France, July Toulouse, France,Federation July 9-14, 9-14, 2017 2017 Toulouse, France, July 9-14, 2017

ScienceDirect

A A A A

IFAC PapersOnLine 50-1 (2017) 15704–15709 Low-cost Laboratory Experiment Setup Low-cost Laboratory Experiment Setup Low-cost Laboratory Experiment Setup Low-cost Laboratory Experiment Setup for Frequency Domain Analysis for a for Frequency Domain Analysis for a for Frequency Domain Analysis for for Frequency Domain Analysis for a a Feedback Control Systems Course Feedback Control Systems Course Feedback Control Systems Course Feedback Control Systems Course

˙ Bahadır C ¸ atalba¸s and Ismail Uyanık ˙˙ Bahadır ¸ Uyanık Bahadır C C ¸ atalba¸ atalba¸ss and and Ismail Ismail Uyanık ˙ Bahadır C ¸ atalba¸s and Ismail Uyanık Department of Electrical and Electronics Engineering, Department Electrical Electronics Engineering, Department ofUniversity, Electrical and and Electronics Engineering, Bilkentof 06800 Ankara, Turkey Department ofUniversity, Electrical and Electronics Engineering, Bilkent Bilkent{cbahadir,uyanik}@ee.bilkent.edu.tr) University, 06800 06800 Ankara, Ankara, Turkey Turkey (e-mail: Bilkent{cbahadir,uyanik}@ee.bilkent.edu.tr) University, 06800 Ankara, Turkey (e-mail: (e-mail: {cbahadir,uyanik}@ee.bilkent.edu.tr) (e-mail: {cbahadir,uyanik}@ee.bilkent.edu.tr) Abstract: Increasing need in automation systems increases the need for control engineers that Abstract: Increasing need in systems the need control that Abstract: Increasing needfrom in automation automation systems increases increases the Having need for forabstract control engineers engineers that have practical experience their undergraduate education. mathematical Abstract: Increasing needfrom in automation systems increases the Having need forabstract control engineers that have practical experience their undergraduate education. mathematical have practical experience from their undergraduate Havingclasses abstract concepts and condense theoretical materials, Feedbackeducation. Control Systems aremathematical not generally have practical experience from their undergraduate education.Systems Havingclasses abstract mathematical concepts and theoretical Feedback are generally concepts and condense condense theoretical materials, materials, Feedback Control Systems classes are not notlaboratory generally well-comprehended by undergraduate students. In thisControl paper, we propose a low-cost concepts and condense theoretical materials, Feedback Control Systems classes are notlaboratory generally well-comprehended undergraduate In paper, propose aa low-cost well-comprehended byControl undergraduate students. In this this paper, we welearning propose of low-cost laboratory setup for Feedbackby Systemsstudents. education to support frequency domain well-comprehended byControl undergraduate students. In this paper, welearning propose of a low-cost laboratory setup for Feedback Systems education to support frequency domain setup for Feedback education support of frequency domain characteristics of LTI Control systems. Systems The proposed setup to works based learning on identification and control of setup for Feedback Control Systems education to support learning of frequency domain characteristics of LTI The proposed works identification and control of characteristics of includes LTI systems. systems. The proposed setup works based based on identification and control of a DC motor and Matlab interface to setup be programmed byon high level control design tools of LTI systems. The proposed setup works based on identification and control of acharacteristics DC motor and Matlab interface to by level design asuch DCas motor and includes includes Matlab interface to be be programmed programmed by high high validate level control control design tools tools Simulink. This paper shows how students can experimentally the concepts like a DCas motor and includes Matlab interface to be programmed by high validate level control design tools such Simulink. This paper shows how students can experimentally the concepts like such Simulink. This paper shows howand students experimentally validate the concepts like Bodeas plots, gain margin, phase margin delay can margin. such as Simulink.margin, This paper shows how students can experimentally validate the concepts like Bode Bode plots, plots, gain gain margin, phase phase margin margin and and delay delay margin. margin. Bode margin, phase margin and delay margin. © 2017,plots, IFACgain (International Federation of Automatic Control) Hosting by Elsevier Ltd. All rights reserved. Keywords: Control education, laboratory setups, arduino, system identification, frequency Keywords: Control education, laboratory setups, arduino, Keywords:time Control education, laboratory setups, arduino, system system identification, identification, frequency frequency response, delay. Keywords:time Control education, laboratory setups, arduino, system identification, frequency response, delay. response, time delay. response, time delay. 1. INTRODUCTION design and frequency response. Experimental inquiry of 1. design and inquiry 1. INTRODUCTION INTRODUCTION designconcepts and frequency frequency response. Experimental inquiry of of such increasesresponse. students’Experimental ability to comprehend 1. INTRODUCTION design and frequency response. Experimental inquiry of such concepts increases students’ ability to comprehend suchmaterials conceptsasincreases students’ ability to comprehend well as develops their practical experience. Feedback control systems has a wide application area in the suchmaterials concepts increases students’ ability to comprehend Feedback control has aa wide area the materials as as well well as as develops develops their their practical practical experience. experience. Feedback control systems hasThe wide application area in in the both academia andsystems industry. deep application theoretical content the materials as well as develops their practical experience. There are various ways to support student learning via Feedback control systems has a wide application area in both academia and deep both academia and industry. industry. The deep theoretical theoretical content as well as the requirement for The regularizing outputs content in most There are various ways to support student learning via There are various ways to supportallstudent learning can via laboratory experiments. However, such methods both academia and industry. The deep theoretical content as well as the requirement for regularizing outputs in most are various ways to supportallstudent learning can via as well asmake the requirement for regularizing outputsproblems in most There systems the area applicable to various laboratory experiments. However, such methods laboratory experiments. However, all as such methods can mainly divided into two categories virtual and real as well asmake the requirement for regularizing outputsproblems in most be systems the area applicable to various experiments. However, all as such methods can systems makeresearch the areadisciplines. applicableOntothe various problems from different other hand, the laboratory be mainly divided into two categories virtual and real be mainly divided into two categoriescase, as virtual and real experiments. In virtual experiments each section in systems makeresearch the area applicableOntothe various hand, problems from different the mainly divided into two categoriescase, as virtual and real from different research disciplines. disciplines. On the other the be abstract mathematical content results in aother deephand, learning experiments. In virtual experiments each section in experiments. In virtual experiments case, each section in the experiment is performed in computer environment. from different research disciplines. On the other hand, the abstract mathematical content results in learning In virtual experiments case, each section in abstract mathematical contentfor results in aatodeep deep learning curve, which makes it difficult students establish an experiments. the experiment is performed in computer environment. the experiment is experiments performed incan computer Such computerized be furtherenvironment. classified as abstract mathematical contentfor results in atodeep learning curve, which makes it difficult students establish an experiment is experiments performed incan computer environment. curve, makes difficult forthe students toproblems. establish an the analogywhich between theittheory and real life classified Such computerized computerized experiments can be be further further classified as as simulations and emulations. In simulations, input–output curve, which makes ittheory difficult forthe studentslife to establish an Such analogy Such computerized experiments can be further classified as analogy between between the the theory and and the real real life problems. problems. simulations and emulations. In simulations, input–output simulations and emulations. In simulations, input–output representations of physical systems are used as plants to analogy between the theory and the real life problems. Nowadays, with increasing need in automation technology, simulations and emulations. In simulations, input–output representations of are used plants to Nowadays, with increasing need automation representations of physical physical systems areOn used as plants to feedback control theorysystems problems. theas other hand, Nowadays, withfor increasing need in in automation technology, industry seeks expert control engineers, whotechnology, can adapt solve representations of physical systems areOn used as plants to Nowadays, withfor increasing need in automation technology, solve feedback control theory problems. the other hand, industry seeks expert control engineers, who can adapt solve feedback problems. On of thesimulations, other hand, arecontrol more theory advanced versions industry seeks for control engineers, who can adapt and implement theexpert Feedback Control Theory solutions to emulations solve feedback control theory problems. On the other hand, industry seeks for expert control engineers, who can adapt are more versions of and implement the Feedback Control Theory solutions to emulations are components more advanced advanced versions plants of simulations, simulations, since nonlinear of employed are also and implement theproblems. Feedback To Control Theorythis, solutions to emulations various real-world accomplish curricuare components more advanced versions plants of simulations, and implement theproblems. Feedback To Control Theorythis, solutions to emulations since nonlinear of employed are also various real-world accomplish curricusince nonlinear components of employed plants also modeled in them, so that students get experience in various problems. ToFeedback accomplish this, curriculums in real-world engineering, especially Control Theory since nonlinear components of employed plants are are also various real-world problems. ToFeedback accomplish this, curricumodeled in them, so that students get experience in lums in engineering, especially Control Theory modeled with in them, thatmodels students get experience in realisticsoplant (Goodwin et al., 2010). lums in should engineering, especially Control Theory working classes, be updated to Feedback include more experimenin them, soplant thatmodels students get experience in lums in should engineering, especially Feedback Control Theory modeled working with realistic (Goodwin et al., 2010). classes, be updated to include more experimenwith realistic plant models (Goodwin et al., 2010). classes, should as bea updated to include moremethodology experimen- working tal experience part of their education working with realistic plant models (Goodwin et al., 2010). Different than their virtual counterparts, real experiments classes, should be updated to include more experimental experience as aa part of their education tal experience as 2010). part In of fact, their importance education methodology methodology (Goodwin et al., of practical Different than virtual real experiments Differentphysical than their their virtual counterparts, counterparts, realdifferent experiments include components and can have realtal experience as 2010). a part In of fact, their importance education methodology (Goodwin et al., than their virtual counterparts, realdifferent experiments (Goodwin et al., 2010). In fact, importance ofapractical practical experience in engineering curriculums has beenof long de- Different include physical components and can have realinclude levels physical and can haveremote different realization likecomponents benchtop experiments, labora(Goodwin et al., 2010). In fact, importance ofapractical experience in engineering curriculums has been long dephysical components and can haveremote different realexperience engineering curriculums has been a long de- include bated issue in (Kheir et al., 1996). Besides, laboratory experization levels like benchtop experiments, laboraization levels like benchtop experiments, remote laboratories and pilot plants. As the realization level increases, experience in engineering curriculums has been a long de- ization levels like benchtop experiments, remote laborabated issue (Kheir et al., 1996). Besides, laboratory experbated (Kheir et fundamental al., 1996). Besides, laboratory exper- tories imentsissue is one of the requirements in ABET and pilot plants. As the realization level increases, tories and pilot plants. realization level increases, learning benefit andAs thethe cost also increase. Although bated issue (Kheir et al., 1996). Besides, laboratory exper- the iments is of requirements in and pilot plants. As the realization level increases, iments is one one of the the fundamental fundamental requirements in ABET ABET tories accrediated engineering curriculums (ABET, 2012). the learning benefit and the cost also increase. Although learning benefit and the cost also increase. Although the highest educational benefit can be obtained with pilot iments is one of the fundamental requirements in ABET accrediated the highest learningeducational benefit andbenefit the cost also increase. with Although accrediated engineering engineering curriculums curriculums (ABET, (ABET, 2012). 2012). can be obtained the highest educational can be with pilot pilot (Goodwin et al., benefit 2010), they areobtained not affordable for accrediated engineering curriculums (ABET, 2012). One of the key functionalities of laboratory experiments plants the highest educational benefit they can be obtained with pilot plants (Goodwin al., are affordable for One the functionalities experiments plantscolleges. (Goodwin et this al., 2010), 2010), are not not affordableand for Foret reason,they remote laboratories One of the key key functionalities offorlaboratory laboratory experiments is to of support students’ learningof fundamental concepts most plants (Goodwin et al., 2010), they are not affordable for One of the key functionalities of laboratory experiments most colleges. For this reason, remote laboratories and is to students’ learning for concepts most colleges. For thisbecome reason,more remote laboratories experiments favorable optionsand for is to support support students’needs learning for fundamental fundamental concepts based on educational of instructors. However, note benchtop most colleges. For thisbecome reason,more remote laboratories and is to support students’needs learning for fundamental concepts benchtop experiments favorable options for based on educational of instructors. However, note benchtop experiments become more favorable options for engineering colleges. Remote laboratories become based of instructors. note most that iton is educational not feasible needs to cover all topics inHowever, a laboratory experiments become more favorable options for basediton educational needs of instructors. However, note benchtop most become that not to cover in most engineering engineering colleges. Remote laboratories become with the colleges. spread ofRemote internetlaboratories and they successthat it is isTherefore, not feasible feasible to experiments cover all all topics topics in aabelaboratory laboratory session. such should carefully popular most engineering colleges. Remote laboratories become that it is not feasible to cover all topics in a laboratory popular with the spread of internet and they successsession. such experiments should be popular with the spread of internet and they successbring low-cost solutions for laboratory experiments session. Therefore, such the experiments shouldbased be carefully carefully designedTherefore, to emphasize desired topics on the fully popular with the spread of internet and they successsession. Therefore, such the experimentstopics shouldbased be carefully fully experiments designed to fully bring bringetlow-cost low-cost solutions for laboratory experiments al., 2015;solutions Kal´ uz etfor al.,laboratory 2014). However, workdesigned to emphasize emphasize the desired desired topics experiments based on on the the course curriculum. For example, laboratory in (Reguera fully bringetlow-cost solutions for laboratory experiments designed to emphasize the desired topics experiments based on the (Reguera al., 2015; Kal´ u z et al., 2014). However, workcourse curriculum. For example, laboratory in (Reguera 2015;hardware Kal´ uz et does al., 2014). However, workwith et a al., remote not give the feeling course curriculum. For example, experiments in ing Feedback Control Theory classeslaboratory generally focus on inveset al., 2015;hardware Kal´ uz et does al., 2014). However, workcourse curriculum. For example, laboratory experiments in (Reguera ing with a remote not give the feeling Feedback Control Theory classes generally focus on invesingworking with a with remote hardware does not give operational the feeling a physical system. Besides, Feedback Control Theory classes generally focuscontroller on inves- of tigating the abstract concepts such as stability, ing with a remote hardware does not give the feeling Feedback Control Theory classes generally focus on invesof working with a physical system. Besides, operational tigating of working with alimit physical system. Besides, safety issues the learning outcomesoperational (Goodwin tigating the the abstract abstract concepts concepts such such as as stability, stability, controller controller and  of working with alimit physical system. Besides, operational tigating abstract such as stability, controller and safety issues the learning outcomes (Goodwin Authorsthe would like toconcepts thank the Scientific and Technological and safety issues limit the learning outcomes (Goodwin et al., 2010). Therefore, benchtop experiments become an  Authors would like to thank Scientific and Technological  ¨ ITAK) ˙the and safety issues limit the learning outcomes (Goodwin Research Council of Turkey (T UB for financial support. Authors would like to thank the Scientific and Technological et al., 2010). Therefore, benchtop experiments become an  et al., 2010). Therefore, benchtop experiments become an ¨ ˙ AuthorsCouncil would oflike to thank the Scientific and Technological Research Turkey (T UB ITAK) for financial support. ¨ ITAK) ˙ et al., 2010). Therefore, benchtop experiments become an Research Council of Turkey (TUB for financial support. ¨ ˙

Research Council of Turkey (TUBITAK) for financial support. Copyright 16274Hosting by Elsevier Ltd. All rights reserved. 2405-8963 © © 2017 2017, IFAC IFAC (International Federation of Automatic Control) Copyright © 2017 16274 Copyright © under 2017 IFAC IFAC 16274Control. Peer review responsibility of International Federation of Automatic Copyright © 2017 IFAC 16274 10.1016/j.ifacol.2017.08.2410

Proceedings of the 20th IFAC World Congress Bahadır Çatalbaş et al. / IFAC PapersOnLine 50-1 (2017) 15704–15709 Toulouse, France, July 9-14, 2017

optimal choice for engineering colleges to obtain maximum educational benefit at an affordable cost. Unfortunately, commercially available benchtop experiment kits also present expensive solutions, especially if the goal is to give a laboratory setup for each student. One advantage of such kits are their interfaces for easy programming of the desired control problems (Quanser, 2013). Otherwise, the electromechanical architecture is generally simple to build for most examples. Motivated by these problems, we adopt Matlab/Simulink interfaces with simple micro-controllers to design a low-cost laboratory setup for Feedback Control Theory classes. The proposed lab setup is easy to program by students via Simulink’s block diagram interface and low-cost to build for any college around the world. In this paper, we show how difficult concepts in control theory such as frequency response, gain and phase margins can be observed experimentally by using this simple laboratory setup. 2. OVERVIEW 2.1 Students’ Background The laboratory experiment kits are designed and built to be used in EEE342 Feedback Control Systems course, which is a third year course in Department of Electrical and Electronics Engineering curriculum of Bilkent University, Turkey. This course is an introductory class to the area of feedback control systems and includes fundamentals of mathematical modeling of dynamical systems, analysis of open/closed loop systems, their characteristics and performance analysis, stability, root locus and frequency response. The frequency response part covers almost half of the curriculum, since it is respectively a more complex topic. In this part, students learn the Bode plots, gain and phase margins, Nyquist plots and lead/lag compensators. Prior to this course, students are required to take EEE321 Signals and Systems and MATH242 Engineering Mathematics II courses. Thus, students will have the basic knowledge on differential equations, Laplace and Fourier transforms as well as frequency domain analysis. 2.2 Desired Learning Outcomes: Theoretical Experience EEE342 Feedback Control Systems course has three independent laboratory assignments in a one-semester class. Our goal in this study is to design a laboratory assignment to support students’ learning in frequency domain analysis. Some of the topics that are investigated with the proposed laboratory setup are listed as follows: • Bode plots and frequency domain analysis of LTI systems • Stability analysis in frequency domain • Gain margin, phase margin and delay margin • Time delay and its effect on frequency response plots

An ideal laboratory assignment should be designed to relate theoretical concepts that are explained in class to physical experiments to support students learning by experimental inquiries. Therefore, our desired learning outcome here is to emphasize the above listed concepts and strengthen students’ learning for these topics.

15705

In previous offerings of EEE342 Feedback Control Systems course, students are used to perform simulation-based experiments for investigating the feedback control theory problems. Unfortunately, designing controllers for transfer functions in simulation and observing the responses only in data does not yield the impact of working with a physical system. Especially, the abstract concepts such as frequency response require a solid understanding that needs to be supported by practical experience. 2.3 Desired Learning Outcomes: Practical Experience Working with physical components definitely help students to gain experience with hardware and it increases students’ self-confidence for working with physical components for their future projects. Therefore, the learning outcome in our experimental setups can be summarized as to support students’ learning by exposing them to physical control systems problems and increase their self-confidence for practical experience. In Bilkent University, we have nearly 200 students that take Feedback Control Systems course in a specific semester. Therefore, we decided to build 100 laboratory setups, which can be used by 200 students when they are working in pairs. Note that working with a group-mate both supports team work and decreases student’s effort for dealing with a physical system during the experiment. Another important issue here is that EEE342 Feedback Control Systems class is quite different than a microcontrollers or embedded systems course. Therefore, we aim to decrease students effort on micro-controller level programming, since the goal of these lab experiments are to support students’ learning for Feedback Control Theory topics. Therefore, our main criterion in this step is to build a simple, low-cost laboratory setup that will support students’ investigation on different feedback control theory topics such as frequency response without distracting their attention with the details of embedded programming. 3. THE LOW-COST LABORATORY SETUP FOR FEEDBACK CONTROL SYSTEMS EXPERIMENTS In this section, we introduce the proposed low-cost laboratory setup that supports practical realization of the desired course topics such as analysis of frequency response characteristics. We utilize a DC motor with an encoder as our hardware plant in this system since most of the concepts in the course content can be simply implemented and illustrated on a DC motor application. The encoders on the DC motor is used to measure the rotation of the DC motor, so that we can compute the angular position and speed. To accomplish this, we use a micro-controller and a motor driver to both generate necessary control signals for the DC motor and to measure its rotation. In addition, an interface to a computer is required, so that we can program the laboratory setup to measure and observe the outputs. 3.1 Software Architecture for the Experimental Setup In the design of the our laboratory experiment setup, we first determined some design decisions to choose the optimal, low-cost solution in the market. Our main decision criteria are as follows:

16275

Proceedings of the 20th IFAC World Congress 15706 Bahadır Çatalbaş et al. / IFAC PapersOnLine 50-1 (2017) 15704–15709 Toulouse, France, July 9-14, 2017

• Experimental setup must be flexible, so that students can use it for different tasks in their future projects. • Students should be familiar with widely used and preferred programs in industry to make sure that our graduates have practical experience with the state of the art control engineering tools. Matlab is a well-known and widely used multi-purpose software language in many branches of industry and academic environments (Michalowski (2011)). It contains various toolbox and library infrastructure by which it reaches a wide usage area from computational finance analysis to computer vision applications. For control theory studies, Matlab includes a Control Theory toolbox as well as a block diagram based control environment, Simulink. These two built-in control tools allow simulating open/closed loop systems, designing controllers and implementation of them in physical systems. For all these reasons, we aim to use Matlab as the programming tool in our laboratory experiments. Thus, our lab setup should be interfaced with Matlab via necessary communication protocols. Nowadays, block diagram based programming approach is preferred in industry and academia to decrease the implementation time, avoid possible implementation errors and use an algorithm with the most optimized code blocks available in the literature. For this reason, there are lots of block diagram based programming tools for digital signal processing (DSP) processors, micro-controller and field programming gate arrays (FPGA) and applications based on these libraries (Joki´c et al. (2013)). Simulink embedded coder is also able to program many of the aforementioned hardwares by compiling C/C++ codes from prepared block diagrams (Kheir et al. (1996)). In addition, Simulink also provides interface to simple, low-cost micro-controllers such as Arduino without any embedded programming. Given these criteria, we decided to utilize Matlab/Simulink environment for programming and interfacing our laboratory setup. Working with Simulink first ensures students’ interaction with high level control design tools. In addition, using Simulink increases students’ experience in modern control equipments. Finally, implementing the feedback control problems in Simulink prevents distraction of students’ attention in micro-controller level programming. Last but not least, Matlab is a primarily preferred software tool in most engineering colleges, it does not bring an additional cost to our laboratory experiments.

with a first order transfer function. Therefore, for our hardware system, second order dynamics should not be dominant, so that students can obtain sufficiently accurate results with a first order transfer function. • The DC motor and encoder that measure motor velocity should allow us to observe both the transient and steady-state behavior. • The micro-controller and the motor driver should work with high frequency characteristics to examine frequency response characteristics of the DC motor. • The whole experimental setup should be low-cost (less than 100 U SD) to give one setup to each student pairs in the lab. Fortunately, the low-cost Arduino Uno micro-controllers provide open source hardware and software options to developers from varying backgrounds. Benefiting from this platform, there are different applications from a wide range has been implemented such as sampled-data cooperative adaptive cruise control of vehicles (Guo and Yue (2014)), reconfigurable antenna system with movable ground plane control (Costantine et al. (2014)) and laboratory equipment for students (Sarik and Kymissis (2010)). Another utility of Arduino boards is that there are different purpose-based Arduino shields to be utilized in different needs of developers. For instance, Arduino Motor Driver shields help us to drive DC motors by using pulse width modulation signals. Therefore, the motor driver part is also chosen based on Arduino interfaces. In addition to that Arduino has Matlab/Simulink interface support by using which we can program Arduino via Simulink’s block diagram based language. This is a key idea in our experimental setups because our students develop the feedback controllers in Simulink environment and then download them to Arduino to physically implement their control diagrams in our experimental setup. Although there are a variety of solutions similar to Arduino, our setup uses Arduino and its motor driver shield due to their practicality, Simulink support and flexibility to be used in different projects. Table 1 shows a list of equipments used in our laboratory setup including their prices. One setup costs 97.06 U SD, which is much affordable than commercially available laboratory experiments. This way, we can provide one lab setup for each student pair. Please see Fig. 1 for our setup. Table 1. Equipment price list Equipments Arduino Uno Arduino Motor Shield DC Motor with Encoder Power Adaptor Mechanical Components Plexiglass Base Consumables Total Cost:

3.2 Hardware Architecture for the Experimental Setup This part introduces the hardware architecture used to design our laboratory setup. Note that there are so many laboratory setups in the market, which provides high accuracy data collection. However, cost of these setups also increases with the increasing accuracy in the system. Therefore, we need to find a low-cost solution to our hardware selection problem based on some design decisions which are listed below. • Our setup must have sufficient accuracy to demonstrate the key concepts such as frequency response characteristics, time delays, gain and phase margins. • To ease students’ analysis, we ask students to perform model-based system identification of a DC motor

Price (USD) 15.49 21.99 39.99 2.3 10.29 6 1 97.06

4. INVESTIGATING FREQUENCY RESPONSE CHARACTERISTICS OF A DC MOTOR In this section, we explain the lab experiments that will be used with our proposed laboratory setup to strengthen students’ knowledge on Bode plots, frequency domain

16276

Proceedings of the 20th IFAC World Congress Bahadır Çatalbaş et al. / IFAC PapersOnLine 50-1 (2017) 15704–15709 Toulouse, France, July 9-14, 2017

15707

Fig. 1. Proposed experiment kit for laboratory sessions. analysis techniques, gain margin, phase margin, delay margin and stability. To accomplish this, we use two system identification processes mentioned in Section 4.1 and Section 4.2 and compare their results to obtain better transfer function estimations for the DC motor example. Note that since we upload the software for Arduino via Simulink, all the necessary code blocks for motor driver and encoder reading must be also implemented with Simulink blocks. However, as mentioned before, our goal is to keep students’ hand clean in terms of micro-controller level programming. Therefore, we supply some previously compiled code blocks to students, illustrated in Fig. 2, as a DC motor plant transfer function block which handles both motor driving tasks as well as encoder reading. Students use this block as a plant transfer function in their control diagrams, so that they can focus on feedback control problems based on this plant transfer function. In addition, students use the Simulink block diagram depicted in Fig. 3, which includes a serial receive block to read angular velocity data from the DC motor.

Fig. 4. Step response of the DC motor obtained with the proposed lab setup. students’ task in this part is to perform a parametric identification where the goal is to represent the step response of the DC motor by using a simple first order transfer function. Fig. 4 illustrates a sample step response collected from our laboratory setup. By using the step response data, students estimate a first order transfer function as 60.73 G(s) = (1) s + 7.06 to represent the DC motor plant with a simple transfer function. Note that Fig. 4 also includes the step response obtained from the transfer function estimation in (1) to compare the predicted and the actual step response. Our results in Fig. 4 yields that our DC motor selection does satisfy our design criteria for being represented with a first order transfer function. The accuracy of the DC motor encoders also allow us to track transient and steady-state characteristics of the system as seen in Fig. 4. 4.2 System Identification via Single-Sine Inputs

Fig. 2. The simulink diagram for step response. 4.1 System Identification via Step Response The goal on this section is to explain how our students perform system identification based on step response of the DC motor plant. As explained above, students use the previously compiled code blocks in their control diagrams and apply a step input to the DC motor. Then, they obtain the step response of the DC motor by using the serial receive block. Having collected system step response,

Fig. 3. The simulink diagram reading data from the laboratory setup.

In this part, our goal is to perform system identification studies on our experimental setup in frequency domain. Students will perform input–output system identification with frequency domain signals. The system identification process will be based on the fundamental principles of frequency response of linear time-invariant (LTI) systems. Our goal here is to emphasize that LTI systems produce outputs only in the input frequency with possibly different magnitude and phase. Students will use the deviations in magnitude and phase response for each specific frequency data to obtain the Bode plots of the DC motor plant. In order to apply sinusoidal inputs with varying frequencies to the DC motor, students design a new control diagram by using the DC motor plant supplied to them (a sample of which is shown in Fig. 5). Students perform the single-sine input experiments for different frequencies

Fig. 5. A Simulink diagram for sinusoidal input tests

16277

Proceedings of the 20th IFAC World Congress 15708 Bahadır Çatalbaş et al. / IFAC PapersOnLine 50-1 (2017) 15704–15709 Toulouse, France, July 9-14, 2017

by changing the input signal frequency. A list of frequency inputs and associated test durations are listed in Table 2. Table 2. Test frequencies and durations Angular Frequency (rad/s) 0.1 0.2 0.3 0.6 1 2 3 6 10 20 30 60 100

domain for a specific frequency, wc . Then, students find the gain at wc as Kwc = |Ywc |/|Uwc | (2) Similarly, the phase shift in this frequency is computed as φ wc =  Y w c −  U w c (3)

Simulink Duration (s) 70 70 70 70 25 25 25 25 10 10 10 10 10

Having obtained Kwc and φwc for each frequency listed in Table 2, Bode plot of the DC motor plant is obtained as in Fig. 8 based on the gain and phase shift at each frequency. 4.3 Investigation of Frequency Response Characteristics: Time Delay, Phase, Gain and Delay Margins

Fig. 6 illustrates sample input–output responses for given sinusoidal input signals. Time domain observation of these signals give the initial idea about how the LTI systems modulate the input signal magnitude in the output. However, a detailed investigation requires observation of these signals in frequency domain, where any changes in signal frequency, magnitude and phase can be clearly observed. Thus, students perform Fast Fourier Transformation to obtain frequency domain representations of input and output signals. Fig. 7 illustrates frequency domain representation of the input–output signals of Fig. 6.

Our investigation of frequency response characteristics starts with evaluation of Bode plots obtained via input– output system identification with sinusoidal tests signals. To start with, we use Matlab’s built-in commands to obtain the Bode plot of the system transfer function given in (1). Fig. 8 shows a comparison between the data-driven estimation of Bode plots and Matlab’s output for the system transfer function. As seen in Fig. 8, magnitude plots of our data-driven system identification method fits well to the Bode plot of the system transfer function. What we want to emphasize here for students is the cause of increasing difference between the phase plots.

In order to compute magnitude and phase shifts, students use classical frequency conversion method to convert time axis to frequency axis and find Uwc and Ywc , which are complex-valued input and output data in frequency

Note that since we are using fixed step size, discrete time implementations for our micro-controller, there is a sampling delay of 10 ms due to our 100 Hz sampling frequency. Note that although this is a small value, the effect of delay increases proportionally with increasing frequency in the phase response. Therefore, why students

Fig. 6. Sample input–output data for single-sine experiments in time domain.

Fig. 7. Sample input–output data for single-sine experiments in frequency domain.

16278

Proceedings of the 20th IFAC World Congress Bahadır Çatalbaş et al. / IFAC PapersOnLine 50-1 (2017) 15704–15709 Toulouse, France, July 9-14, 2017

15709

5. CONCLUSION

Phase (deg)

Magnitude

In this paper, we proposed a simple, low-cost laboratory setup for Feedback Control Systems course experiments. The proposed setup includes Matlab/Simulink interface, so that students can develop their control diagrams in Simulink and then test them on a physical system. In addition, its low cost, which is below 100 U SD, makes it an affordable choice for most countries including our country, Turkey. One of the key results in this paper is that although it is a low-cost system, the proposed setup allows investigation of frequency characteristics of LTI systems. Students can obtain Bode plots, compute gain, phase and delay margins by using this system.

Fig. 8. Comparison of Bode plots for data-driven system identification, first order system transfer function and first order transfer function including time delay. observe this increasing phase shift in phase plots of the two systems. To overcome this issue, students are asked to use a Pade approximation for the 10 ms sampling delay with their transfer function given in (1) as in Gdelayed (s) = G(s)

1 − 0.005s 1 + 0.005s

(4)

ACKNOWLEDGEMENTS ¨ We are grateful to Prof. Hitay Ozbay for his invaluable ¨ guidance and encouragement and thank him, Prof. Omer ¨ uler for giving the change Morg¨ ul and Prof. A. B¨ ulent Ozg¨ for trying our kits in their lectures. Furthermore, we are ˙ indebted to Hasan Hamza¸cebi, Ali Nail Inal, Hasan Eftun ¨ urk for their help in Orhon, Mustafa G¨ ul and A. Safa Ozt¨ the development stage of the kits. REFERENCES

The resulting Bode plots with time delay is also given in Fig. 8. Now, the angular response of the transfer function with time delay now matches the real system data. In addition, students are asked to find gain margin, phase margin and delay margins of the system. Fig. 9 illustrates how gain and phase margins are computed from Bode plots. In our DC motor example, students compute it to be 10.7 dB. Similarly, phase margin and delay margin are computed as 63.1o and 0.018s, respectively.

Phase (deg)

Magnitude

The important part here is that the proposed laboratory setup supports experimental computation of the gain margin, phase margin and the delay margin. To accomplish this, students add virtual gains and time delays to the DC motor plant. To compute the delay margin, they continuously increase the virtual time delay and detect the delay value for which the system loses its stability. Such observations on an experimental setup increases students’ learning for these abstract topics on real data.

Fig. 9. Gain margin and phase margin of the DC motor.

ABET (2012). Criteria for accrediting engineering programs. Costantine, J., Tawk, Y., Woodland, J., Flaum, N., and Christodoulou, C.G. (2014). Reconfigurable antenna system with a movable ground plane for cognitive radio. IET Microwaves, Antennas & Propagation, 8, 858–863. Goodwin, G.C., Medioli, A.M., Sher, W., Vlacic, L.B., and Welsh, J.S. (2010). Emulation-based virtual laboratories: A low-cost alternative to physical experiments in control engineering education. IEEE Transactions on Education, 54, 48–55. Guo, G. and Yue, W. (2014). Sampled-data cooperative adaptive cruise control of vehicles with sensor failures. IEEE Transactions on Intelligent Transportation Systems, 15, 2404–2418. ˇ Lubura, S.D., and Lukaˇc, D. (2013). DevelJoki´c, D.Z., opment of integral environment in matlab/simulink for fpga. IFAC Proceedings Volumes, 46(28), 50–55. ˇ Kal´ uz, M., Cirka, L., Valo, R., and Fikar, M. (2014). Arpi lab: A low-cost remote laboratory for control education. IFAC Proceedings Volumes, 47(3), 9057–9062. Kheir, N., ˚ Astr¨om, K.J., Auslander, D., Cheok, K.C., Franklin, G.F., Masten, M., and Rabins, M. (1996). Control systems engineering education. Automatica, 32(2), 147–166. Michalowski, T. (2011). Application of matlab in science and engineering. Rijeka: InTech. Quanser (2013). The Quanser Method. Quanser Consulting Inc. Reguera, P., Garc´ıa, D., Dom´ınguez, M., Prada, M., and Alonso, S. (2015). A low-cost open source hardware in control education. case study: Arduino-feedback ms-150. IFAC-PapersOnLine, 48(29), 117–122. Sarik, J. and Kymissis, I. (2010). Lab kits using the arduino prototyping platform. In Frontiers in Educational Conference (FIE), T3C–1–T3C–5.

16279