Computer Exercise Modeling and control of a magnetic suspension system N S. magnetic. gravity. Figure 1: Sketch of the magnetic levitation system.

Similar documents
CONTROL SYSTEMS LABORATORY ECE311 LAB 1: The Magnetic Ball Suspension System: Modelling and Simulation Using Matlab

DISTURBANCE ATTENUATION IN A MAGNETIC LEVITATION SYSTEM WITH ACCELERATION FEEDBACK

YTÜ Mechanical Engineering Department

Lab 5a: Magnetic Levitation (Week 1)

Wide Range Stabilization Of A Magnetic Levitation System Using Analog Fuzzy Supervisory Phase Lead Compensated Controller

Exercise 8: Level Control and PID Tuning. CHEM-E7140 Process Automation

Inter-Ing 2005 INTERDISCIPLINARITY IN ENGINEERING SCIENTIFIC CONFERENCE WITH INTERNATIONAL PARTICIPATION, TG. MUREŞ ROMÂNIA, NOVEMBER 2005.

Lecture 5 Classical Control Overview III. Dr. Radhakant Padhi Asst. Professor Dept. of Aerospace Engineering Indian Institute of Science - Bangalore

Index. Index. More information. in this web service Cambridge University Press

Übersetzungshilfe / Translation aid (English) To be returned at the end of the exam!

EECS C128/ ME C134 Final Wed. Dec. 14, am. Closed book. One page, 2 sides of formula sheets. No calculators.

Massachusetts Institute of Technology Department of Mechanical Engineering Dynamics and Control II Design Project

H-infinity Model Reference Controller Design for Magnetic Levitation System

NONLINEAR CONTROL OF A MAGNETIC LEVITATION SYSTEM USING FEEDBACK LINEARIZATION

Inter-Ing 2005 INTERDISCIPLINARITY IN ENGINEERING SCIENTIFIC CONFERENCE WITH INTERNATIONAL PARTICIPATION, TG. MUREŞ ROMÂNIA, NOVEMBER 2005.

Prüfung Regelungstechnik I (Control Systems I) Übersetzungshilfe / Translation aid (English) To be returned at the end of the exam!

Analysis and Design of Control Systems in the Time Domain

(Refer Slide Time: 00:32)

Here are some internet links to instructional and necessary background materials:

1 x(k +1)=(Φ LH) x(k) = T 1 x 2 (k) x1 (0) 1 T x 2(0) T x 1 (0) x 2 (0) x(1) = x(2) = x(3) =

Übersetzungshilfe / Translation aid (English) To be returned at the end of the exam!

SRV02-Series Rotary Experiment # 1. Position Control. Student Handout

Lab 3: Quanser Hardware and Proportional Control

EEL2216 Control Theory CT1: PID Controller Design

Theoretical physics. Deterministic chaos in classical physics. Martin Scholtz

AP Physics C Mechanics Objectives

System Modeling: Motor position, θ The physical parameters for the dc motor are:

Modeling and Experimentation: Compound Pendulum

Lab 6a: Pole Placement for the Inverted Pendulum

Introduction to centralized control

Course Summary. The course cannot be summarized in one lecture.

YTÜ Mechanical Engineering Department

DOUBLE ARM JUGGLING SYSTEM Progress Presentation ECSE-4962 Control Systems Design

557. Radial correction controllers of gyroscopic stabilizer

Übersetzungshilfe / Translation aid (English) To be returned at the end of the exam!

Index Terms Magnetic Levitation System, Interval type-2 fuzzy logic controller, Self tuning type-2 fuzzy controller.

Lecture 14 - Using the MATLAB Control System Toolbox and Simulink Friday, February 8, 2013

Introduction to centralized control

Control Using Sliding Mode Of the Magnetic Suspension System

State Feedback MAE 433 Spring 2012 Lab 7

Inductors Maxwell s equations

Chapter 13 Digital Control

CL Digital Control

PHYSICS. Chapter 29 Lecture FOR SCIENTISTS AND ENGINEERS A STRATEGIC APPROACH 4/E RANDALL D. KNIGHT

Inverted Pendulum. Objectives

Process Control Exercise 2

University of Utah Electrical & Computer Engineering Department ECE 3510 Lab 9 Inverted Pendulum

Lecture 12. Upcoming labs: Final Exam on 12/21/2015 (Monday)10:30-12:30

Multivariable Control Laboratory experiment 2 The Quadruple Tank 1

ME scope Application Note 28

Improving the Control System for Pumped Storage Hydro Plant

Introduction to Controls

MAE143A Signals & Systems, Final Exam - Wednesday March 16, 2005

FARADAY S AND LENZ LAW B O O K P G

Systems Analysis and Control

Task 1 (24%): PID-control, the SIMC method

Physics Lecture 01: MON 25 AUG

Nonlinear System Analysis

MASSACHUSETTS INSTITUTE OF TECHNOLOGY DEPARTMENT OF PHYSICS. DOCTORAL GENERAL EXAMINATION PART 1 August 27, 2012 SOLUTIONS

Module 03 Modeling of Dynamical Systems

Computer Algebra for Physics Examples

The GENESIS Project FIELD OF NEGATIVE ENERGY INTRODUCTION

is to accounting. Arithmetic provides the notation

Part II. Advanced PID Design Methods

Faraday s Law of Induction I

AP Physics C. Magnetism - Term 4

CHAPTER 10: STABILITY &TUNING

Automatic Control (TSRT15): Lecture 4

Linearize a non-linear system at an appropriately chosen point to derive an LTI system with A, B,C, D matrices

The ELECTROMAGNETIC FIELD

1 P a g e h t t p s : / / w w w. c i e n o t e s. c o m / Physics (A-level)

Feedback Control of Linear SISO systems. Process Dynamics and Control

CHAPTER 5 ROBUSTNESS ANALYSIS OF THE CONTROLLER

CALIFORNIA INSTITUTE OF TECHNOLOGY Control and Dynamical Systems

MCE693/793: Analysis and Control of Nonlinear Systems

MAGNETIC EFFECTS OF CURRENT AND MAGNETISM

11/13/2018. The Hall Effect. The Hall Effect. The Hall Effect. Consider a magnetic field perpendicular to a flat, currentcarrying

Consider a magnetic field perpendicular to a flat, currentcarrying

Outline. Classical Control. Lecture 5

CHARGED PARTICLES IN FIELDS

Lecture 9. Introduction to Kalman Filtering. Linear Quadratic Gaussian Control (LQG) G. Hovland 2004

Lecture 5: Linear Systems. Transfer functions. Frequency Domain Analysis. Basic Control Design.

Properties of Open-Loop Controllers

The Two Ball Newton s Cradle. Glendinning, Paul. MIMS EPrint: Manchester Institute for Mathematical Sciences School of Mathematics

Design of Close loop Control for Hydraulic System

First-Order Differential Equations

Control Systems I. Lecture 7: Feedback and the Root Locus method. Readings: Jacopo Tani. Institute for Dynamic Systems and Control D-MAVT ETH Zürich

Gaussian integrals. Calvin W. Johnson. September 9, The basic Gaussian and its normalization

Physics 2212 GH Quiz #4 Solutions Spring 2016

REUNotes08-CircuitBasics May 28, 2008

ECEN 420 LINEAR CONTROL SYSTEMS. Lecture 6 Mathematical Representation of Physical Systems II 1/67

Chapter 6 - Solved Problems

EEE 550 ADVANCED CONTROL SYSTEMS

Experiment # 5 5. Coupled Water Tanks

Physics 42 Exam 3 Spring 2016 Name: M T W

Advanced Machine Learning Practical 4b Solution: Regression (BLR, GPR & Gradient Boosting)

Tuning PI controllers in non-linear uncertain closed-loop systems with interval analysis

Video 5.1 Vijay Kumar and Ani Hsieh

Example: DC Motor Speed Modeling

Worksheet 1: Integrators

Transcription:

Control Systems Automatic I Computer Exercise Modeling and control of a magnetic suspension system magnetic N S x gravity N Figure 1: Sketch of the magnetic levitation system. Scope of the project and system description Magnetic levitation has become highly applicable in magnetic bearings, modern transport systems, e.g., magnetically levitated trains and moving of metallic objects in the steel industry using so-called magnetic floaters. Practical magnetic levitation systems are inherently unstable and hence need the design of a feedback control law in order to produce a desired levitation level. During this project, we will examine a simple magnetic suspension system and simulate 1

and control it using Matlab / Simulink. This will be done in a sequence of steps. First, based on the physics of the system, a nonlinear model will be derived by applying Newton s law. Then you will be asked to compute a linearized model and study stability. Finally, you will synthesize a linear controller and simulate the closed-loop behaviour of the linearized model and of the nonlinear model. As pictured on the figure, a magnetic suspension is made of a solenoid in which runs an exciting current i. Solenoids provide a simple means to generate strong magnetic fields. From Biot-Savart s law, the current passing through a solenoid generates a magnetic field and subsequently an electromagnetic force. In this way, an electric current is converted into mechanical motion. For a given exciting current, the electromagnetic force is not constant but depends on the distance x to the magnetic kernel, more precisely the dependence is in 1 x 2. In the given set-up, a ferro-magnetic sphere lies close to the solenoid. If it is close enough to the coil, the electromagnetic force overcomes gravity and the sphere is attracted to the coil. On the contrary, if the sphere is far enough from the solenoid, gravity prevails and the magnet falls down. The system presented on the figure is radially symmetric, then we are only considering motion along the vertical axis, with the purpose of stabilizing the magnetic sphere around a reference position. The exciting current is an input to the system that can be adjusted to control the vertical location of the magnetic sphere. Model of the magnetic suspension system The first step for deriving a model of the magnetic suspension system is to calculate an expression of the magnetic force produced by the current running into the wired coil. We will do so by using the magnetic potential energy that is stored in the solenoid. The energy stored in an inductor is given by where W (x, i) = 1 2 L(x)i 2, (1) L(x) = L 0 + L 1 1 + x a. (2) The inductance thus depends on the distance x from the kernel. Here, a is a characteristic length. 1. Derive the equation for the magnetic force F applied to the sphere as a function of the distance x. You are given that F (x, i) = W (x, i) x 2

The minus sign corresponds to the convention we used for the direction of the forces as shown in the figure on the first page. Substituting equation (2) in (1) and performing the partial differentiation w.r.t. we acquire: W (x, i) F (x, i) = x L 1 a = 1 2 (1 + x i 2 a )2 L 1 = 2a(1 + x i 2 a )2 x 2. Sketch F (x, i cnst ) as a function of x. Explain in a few words your observations. The sketch is depicted in Figure 2. As expected, the electromagnetic force goes down with the square of the distance from the solenoid. The maximum force is applied when x = 0, or when the ball has touched the coil as depicted in Figure. Figure 2: Electromagnetic force on the sphere. 3. By applying Newton s law, derive the differential equation modeling the evolution of the location of the sphere x(t). To what class of differential equations does it belong to? 3

Writing down Newton s first law and using the sign conventions depicted in the figure, we have: F = F grav F mag L 1 mẍ(t) = mg ( ) 2 i 2 (t) 2a 1 + x(t) a What we get is a second order nonlinear differential equation. 4. By applying the change of coordinates x = 1 + x a, transform the differential equation that you have obtained into (3). Note: after the change of coordinates, x is relabeled back to x in Eq. (3). Note also that x is dimensionless in the new coordinate frame. Making the above substitution, written also as x(t) = a x(t) a we obtain L 1 a x(t) = g 2ma x 2 (t) i 2 (t) ẍ(t) = 1 ( g L 1 i 2 ) (t) a 2ma x 2, (3) (t) where we changed the notation back to x from x. 5. Now you need to identify the right parameter a of (3). For this, you are provided with a locked Simulink model that you need to download from the course website. This is an identification experiment, so the locked block is similar to a real physical systems that you model using (3), but for which you do not know the parameter a. To identify this parameter, the idea is to send input signals into the locked block and your model, compare the outputs and make them match by playing with a. Your task is schematically depicted in Figure 5. First you need to build a model of the nonlinear equation (3), and then you can run the identification experiment. Reasonable values for the input current is i = 0.3 and the initial (normalized) distance of the ball is x 0 = 10. The values for the other parameters are L 1 = 2 H and m = 100 g. Hint : the parameter a should be between 2mm and 6mm. For the comparison, we simulate both the given system model and the nonlinear model we derived. We define the error as the difference of the corresponding outputs of the 4

Real!system! Input!! Model!!! a /! a Figure 3: Identification setup. two models. The procedure for identifying the missing parameter a is basically a trialand-error. After a few efforts, it turns out that the value a = 4mm results to perfect fitting of the two responses (see first scope in Figure 5). A Simulink diagram for the aforementioned comparison is presented in Figure 5. The second scope in Figure 5 indicates the sensitivity of the system s response to the value of the parameter a. In that case, we used a value of a = 3.8mm instead of the correct one and the error is already large due to this small mismatch. Finally, note that identifying the parameter a was relatively straightforward in this case due to the fact that it was the only unknown and we already had an estimate of the region within which it resides. In practice though we might have to identify more than one uncertain parameters of a model. In these cases more sophisticated system identification and/or optimization methods are used. 6. Consider a numerical instance with, i = 300 ma. Plot the acceleration L 1 2ma x as a 2 function of x for x varying from 3 up to 8, using a grid of 100 points. On the same figure, plot the gravitational acceleration g. What do you observe? At what distance away from the inductor will the sphere start falling towards the ground? Consider the gravitational acceleration as g = 9.88 m s. 2 i 2 At any distance x > 4.7721, the gravitational acceleration will become bigger than the one caused by the magnet and the sphere will start falling towards the ground. This result is depicted in Figure 6, along with the Matlab code given below. 1 i = 0.3; m = 0.1; L1 = 2; a = 0.004; g = 9.88; 2 x =linspace(3, 8); 3 acc_mag = @(x)(l1*i^2./ (2*m*a*x.^2)); 5

In1 Out1 Step Scope System b Constant 1 s Integrator 1 s Integrator1 Gain1 Divide c Nonlinear Model Math Function u 2 Math Function1 u 2 Figure 4: Comparison of real system and nonlinear model for parameter identification. Figure 5: Model matching error for a = 4mm and a = 3.8mm. 6

Accelerations as a function of the distance x 3.5 4 4.5 5 5.5 6 6.5 7 x (dimensionless quantity) Figure 6: Intersection point of gravitational (green) and magnetic (blue) acceleration. 7

4 plot(x, acc_mag(x)); hold on; plot(x, g, 'g','linewidth',2); 5 lgd1 = title('accelerations as a function of the distance $x$'); 6 lgd2 = xlabel('$x$ (dimensionless quantity)'); ylabel('accelerations'); 7 lgd3 = legend('$\alpha_{\mathrm{magnetic}}$','g'); 8 set(lgd1,'interpreter','latex'); 9 set(lgd2,'interpreter','latex'); 10 set(lgd3,'interpreter','latex'); 11 12 pt = fzero(@(x) acc_mag(x) g, 5); % Find intersection point 13 coord = [pt, acc_mag(pt)] % The coordinates Linearization The nonlinear model (3) translates to ẍ = c x 2 i 2 + b, (4) where c = L 2ma 2 and b = g/a. In order to apply linear control theory (which is the exclusive topic of this course) you need to linearize the nonlinear model (4) at an equilibrium point. An equilibrium point is characterized by ẋ = 0 and ẍ = 0. To each value of the current i e, there corresponds an equilibrium point x e. 7. Your first task is to compute 1 the equilibrium current i e given that you want to control the ball in the vicinity of an equilibrium x e = 10. Setting the acceleration ẍ = 0 in (4) yields 0 = c xe 2 ie 2 + b i e = ±x e b c (5) The equlibrium current (we consider positive current values) is i e = 0.6286A. 8. Next, you need to linearize the model in the neighborhood of the equilibrium (x e, i e ). To this end, define f (x, i) := c x i 2 + b to be the right hand side of (4). The linearized 2 equation (4) will have the form δẍ = f δx + f x i (6) (xe,ie)δi, (xe,i e) 1 This task may be nontrivial for more complex systems; in that case the matlab function trim may help. 8

where δx = x x e and δi = i i e. Note that the origin of the coordinate frame is shifted to the equilibrium for the linear model. Linearization of the system corresponds to forming the Taylor expansion of the nonlinear function around the given (equilibrium) point and keeping only the linear term, discarding higher order ones. In this sense, we can write f (x, i) f (x e, i e ) + f (x x e ) + f x i i e ) + O (xe,ie)(i 2 (x, i) (7) (xe,i e) The first term of the above equation vanishes from the definition of the equilibrium point, hence we are left with equation (6). Hence we have to compute the partial derivatives appearing above. These are easily derived as f x = 2ci e 2 (xe,ie) xe 3 f = 2ci e i xe 2 (xe,i e) The quality of the approximation of the nonlinear model with the linear one depends heavily on the nonlinearities that appear in the original system. Accordingly, the linear model might perform reasonably only in the very close proximity of the equilibrium point (x e, i e ). 9. The linearized model is now a second order ordinary differential equation of the form δẍ = a 0 δx + b 0 δi, where a 0 and b 0 are equal to the partial derivatives found in (6). From a linear control perspective δi is now the input of the system and δx the output of the system. Find the transfer function from δi to δx, that is, a function of the form G(s) = Y (s) U(s), where Y (s) is the Laplace transform of δx and U(s) the Laplace transform of δi. 9

Taking the Laplace transform of second order ODE, and after using the notation introduced above, we have s 2 Y (s) = a 0 Y (s) + b 0 U(s) Y (s) U(s) = b 0 s 2 a 0 Y (s) U(s) = 7858.1 s 2 494, (8) using the numbers computed above. Note that the transfer function has zero initial condition, since the linearized system is shifted to the origin, as mentioned above. 10. Create a simulink model for both the linear, and the nonlinear models of your systems. Validate your model by comparing the trajectories of the nonlinear system and the linear system starting from initial conditions close to the equilibrium (x e, i e ). What do you conclude about the region of validity of your linear model? Hint: Do not forget to add the the equilibrium value of the state when simulating the system. The Simulink model is depicted in Figure 10. Observe that we have to ensure that the input of the linear model δi = i i e is kept small, i.e., we operate close to the equilibrium point. Accordingly, the output of the linear system is δx = x x e, thus we have to add the equilibrium position x e when we compare the response with that of the nonlinear model. In the simulated case we used i = 0.7A. The responses of the two models are depicted in Figure 10. Note that the simulation time is very small (0.1 s) and the two responses have already started to deviate. This is a result of the highly unstable nonlinear model which renders the linearization valid for only a small region around the equilibrium. 11. Optional: repeat point 8 but now use Matlab to do the linearization for you. The following code 2 returns directly the transfer function of the linearized model: [A,B,C,D] = linmod('levitation',xe,ie); sys_lin = tf(ss(a,b,c,d)); where levitation is the following Simulink diagram and xe and ie are the equilibrium values obtained in point 7. 2 Note that the function linmod returns the so-called state-space representation of the system given by matrices A, B, C and D; this representation is then converted to a transfer function by tf. State-space representation is not covered in this course and is the topic of a follow-up more advanced control course. 10

b Constant 1 s Integrator 1 s Integrator1 Math Gain1 c Divide Function u 2 Scope1 Math Function1 u 2 Step i_e b_0 s 2+ a_0 Transfer Fcn Constant2 x_e Constant1 Figure 7: Linear and nonlinear model simulation. Figure 8: Linear and nonlinear model comparison. 11

The constants b and c are the constants from Equation (4). Executing the commands above, we end up with a state-space and a transfer function representation of the linearized model around (x e, i e ). The state-space matrices are [ ] 0 1 A =, Controller 494 0 [ 0 B = 7858.1 ], C = [ 1 0 ], D = 0 The resulting transfer function is the one given in equation (8). After the modeling and the linearization, you should have the linear and the non-linear models of the system. The objective of this section is to design controller based on the linear model by using Ziegler-Nichols second method and Model-Matching method, and to apply the controllers to both the linear and the non-linear models. Figure 9 shows the top-level block diagram of the closed-loop system, where C(s) denotes the controller and G(s) denotes the linear model of the system. Recall the results from the precious steps. The linear model of the system is: G(s) = Y (s) U(s) = 7858.1 s 2 494, (9) and the equilibrium is i e = 0.6286 and x e = 10. 12

Figure 9: The top-level block diagram of the closed-loop system 13. Your first task is to use Ziegler-Nichols method to design a PID controller and apply it to both the linear and non-linear models. Note that the Z-N rule assumes that the system has a transfer function of the following form Ke st s+a. However, our system G(s) is a second order system. So the parameters given by the Z-N rule might not be perfect. In this case, you need to tune the PID parameters manually. Hint: For the first step of Z-N method, you can choose K pc ( 1, 0.5). For the second step, you can use the Matlab commands feedback() and step() to check whether the performance of the closed-loop system is good enough. If it is not, try to increase the values of T d and T i. : Firstly, we pick K pc = 0.75 and apply it as a proportional controller to the linear system. The plot is depicted in Figure 10, along with the Matlab code given below. Figure 10: The step response of the closed-loop system with K pc = 0.75 13

1 g = 9.88; a = 0.004; m = 0.1; L = 2; 2 b = g/a; 3 c = L/(2*m*a^2); 4 5 xe = 10; 6 ie = sqrt(b/c)*abs(xe); 7 8 a0 = 2*c*ie^2/xe^3; 9 b0 = 2*c*ie/xe^2; 10 sys_lin = tf(b0,[1 0 a0]); 11 12 Kpc = 0.75; 13 sys_cl1 = feedback(sys_lin*kpc,1); 14 step(sys_cl1); The frequency of oscillation can be measured T c = 0.0855. By applying the second step of Z-N method, the PID parameters are set to be K p = 0.6 K pc, T i = 0.5 T c, T d = 0.125 T c. (10) Figure 11: The closed-loop performance with K p = 0.6 K pc, T i = 0.5 T c, T d = 0.125 T c. The closed-loop performance with the parameters in (10) is shown in Figure 11. Recall 14

the hint given in question (13). The performance can be improved by increasing T i and T d. Then we set: T i = 2 0.5 T c, T d = 4 0.125 T c. (11) The step response of the closed-loop system with the tuned parameters in (11) is depicted in Figure 12. The Matlab code can be found below. Figure 12: The closed-loop performance with tuned parameters, K p = 0.6 K pc, T i = 2 0.5 T c, T d = 4 0.125 T c. 1 Kpc = 0.75; Tc = 0.0855; 2 Kp = 0.6 * Kpc; Ti = 0.5 * Tc*2; Td = 0.125 * Tc*4; 3 Ki = Kp / Ti; 4 Kd = Kp * Td; 5 Tf = 0.001 6 controller_pid = pid(kp,ki,kd,tf); 7 8 sys_cl2 = sys_lin*pid_c/(1+sys_lin*controller_pid); 9 step(sys_cl2); 14. Recall the simulink file, which was created in the linearisation step. Create a model for the PID controller and apply it to both the linear and non-linear models. (Hint: use 15

the blocks integrator and derivative, and don t forget to subtract the equilibrium offset x e from the output, and add i e to the input when you apply the controller to the non-linear model). Note that in practice we usually place the derivative block directly after the system and take the output of the system as the input of the derivative. The reason for this is that, if the derivative block is placed after the reference signal, which in our case is a step signal, we will have a impulse signal for the derivative block (recall that the derivative of step signal is an impulse), which is often unexpected in a real system. The structure of the PID controller is shown in Figure 13. : Figure 13: A practical structure of PID controller The Simulink diagram in Figure 14 depicts the structure of the closed-loop systems for both the linear and non-linear models. Figure 15 shows the step response of the closed-loop systems w.r.t different reference, where the yellow curve represents the performance of the linear model and the purple curve depicts the performance of the non-linear model. It is obvious that by increasing the reference, the difference between these two systems becomes bigger. When the reference is greater than 2.65, the PID controller cannot stabilize the non-linear system any more. The reason is that the greater the value of the reference is, the bigger the distance between the state of the non-linear model and the equilibrium will be. Then the linear model cannot approximate the non-linear model. Of course the PID controller designed on the linear model won t work any more. 15. Optional Design a PID controller using Model-Matching method. Suppose the desired system is: τ(s) = 1 τ m s + 1. (12) where τ m = 0.1. Compute the controller and find the parameters K P, K I and K D. Apply the PID controller to the linear model and compare the behaviour of the closed- 16

Figure 14: The Simulink diagram for both linear and non-linear models loop system with the desired system. (Hint: you can use the Matlab commands pid(), feedback() and step().). Is the closed-loop system stable? If not, why? : The parameters are equal to: K p = 0, K i = a 0 b 0 τ m, K d = 1 b 0 τ m. (13) By the theory, we know that the PID controller with the parameters in (13) should be able to stabilize the linear system. However, by applying the PID controller to the linear system in Matlab (The code is given below.), we can observe that the closed-loop system s T f s+1, is unstable. The reason is that Matlab uses an approximate derivative D Mat (s) = where T f is filter time constant. So actually we are using an approximate PID controller to stabilize our system. It yields that we can not guarantee that in any case all the unstable poles of the original system can be cancelled by the approximate PID controller. Then the closed-loop system can be unstable. 1 tau_m = 0.1; 2 sys_desired = tf([1],[tau_m 1]); 3 17

4 Kp = 0; 5 Ki = a0/b0/tau_m; 6 Kd = 1/b0/tau_m; 7 8 Tf = 0.001 9 controller_pid = pid(kp,ki,kd,tf); 10 controller_t = tf([1 0 a0],[b0*tao 0]); 11 CL_PID = sys_lin*controller_pid/(1+sys_lin*controller_pid); 12 CL_T = sys_lin*controller_t/(1+sys_lin*controller_t); 13 14 figure(1); 15 step(sys_desired); 16 figure(2); 17 step(cl_pid); 18 figure(3); 19 step(cl_t); 18

(a) r = 0.5 (b) r = 2.6 (c) r = 2.65 19 Figure 15: The step response of the closed-loop system w.r.t difference r.