# PID Control for Electric Vehicles Subject to Control and Speed Signal Constraints

Authors: Amanda Danielle O. da S. Dantas; André Felipe O. de A. Dantas; João Tiago L. S. Campos; Domingos L. de Almeida Neto; Carlos Eduardo T. Dórea
Journal: Journal of Control Science and Engineering
 (2018)

---

## Abstract

A PID control for electric vehicles subject to input armature voltage and angular velocity signal constraints is proposed. A PID controller for a vehicle DC motor with a separately excited field winding considering the field current constant was tuned using controlled invariant set and multiparametric programming concepts to consider the physical motor constraints as angular velocity and input armature voltage. Additionally, the integral of the error, derivative of the error constraints, andλ were considered in the proposed algorithm as tuning parameters to analyze the DC motor dynamic behaviors. The results showed that the proposed algorithm can be used to generate control actions taking into account the armature voltage and angular velocity limits. Also, results demonstrate that a controller subject to constraints can improve the electric vehicle DC motor dynamic; and at the same time it protects the motor from overvoltage.


---

## Body

## 1. Introduction

Some researchers state that electric vehicles can be one of the renewable solutions to energy and environmental problems caused by oil based vehicles due to the various advantages associated with the use of electric energy, such as low cost [1–5]. In this scenario, direct current (DC) motors are one of the most used actuators in the construction of electric vehicles [6]. This type of actuator has numerous advantages, such as low cost, high reliability, easy maintenance, and simple control for both speed and position variables with PID being one of the main used controllers [7, 8].The Proportional Integral Derivative Controller (PID) has been widely used for most industrial process, due to its simplicity and effectiveness in control [9, 10]. This type of controller is commonly used in level, flow, temperature, and vehicular systems, as well as electric motors [10–12]. In addition, the design of the PID controller is considered easy to implement, since it is only necessary to tune three parameters Kp, Ki, and Kd and tuning methods can be performed automatically [13]. Some of most used PID tuning methods in control engineering literature are Ziegler and Nichols, Cohen and Conn, Relay method, and Relatus Apparatus. These methods are effective and achieve excellent results when controlling unconstrained monovariable systems although some of these ones are also applicable for multivariate systems [9].Despite all advantages of PID controllers, most of tuning methods do not consider the process constraints. Thus, many researches tried to consider these conditions in the control loop using antireset windup, control signal saturation, and integrator constraints. These techniques aim to limit the control action to suit the controller to constrained processes [14, 15]. However, these methods still do not take into account the constraints while tuning the controller and, therefore, such methods are not totally appropriate; i.e., they do not lead to an optimal control signal for the constrained system.In order to solve the optimal constrained problem many controllers are being proposed. One solution consists of maintaining the system trajectory withinλ-contractive controlled invariant polyhedron set defined in the state space. This set contains all states for which there is a state feedback control law that maintains the trajectory of the dynamic system within Ω [16, 17]. The state feedback control law can be calculated online, from the solution of a linear programming (LP) problem, or offline, by solving a multiparametric linear programming problem (mp-LP) [17]. This optimal solution represents an explicit PWA (PieceWise Affine) state feedback control law defined under a set of polyhedral regions in state space [14]. In a complementary way to feedback control recent research has shown that there is a state space form that allows the tuning of PID controllers using the Linear Quadratic Regulator (LQR) [13, 18], and this may allow us to combine both strategies making a new tuning method that considers constraints.Within this context, in this paper a design of a new type of gain-scheduling PID controller to control angular velocity of electric vehicle DC motors subject to constraints in angular velocity and input voltage and PID states is proposed. To this end, the formulations in the state space of the PID controller are used, as well as the concept of controlled invariant sets together with the solution of a multiparametric programming problem [6, 9, 19, 20]. In this case, we use the same techniques applied to obtain explicit controllers (which take into account system constraints) to tune similar PID controllers (mp_PID) to constrained systems.This work is organized as follows: At first, we will approach the concept of theλ-contractive controlled invariant set. In sequence, the problem of linear multiparametric programming will be described. After that, we will introduce how to tune PID controllers from multiparametric linear programming technique. An overview of electrical vehicle DC motors will be discussed later. Finally, a set of simulations will be carried out with the objective of proving the functionality of the proposed algorithm and the concept of mp_PID in the control of electrical vehicle DC motors, i.e., specified to work with electric cars.


## 2. Controlled Invariant Sets

The concept of controlled invariant sets has become important in the design of controllers for linear discrete-time systems subject to constraints since it represents a fundamental condition to maintain system stability ensuring that the constraints are not violated [21].Consider the linear time-invariant discrete-time system described by(1)xk+1=Axk+Buk,where k∈N is the sample time, x∈Rn is the state of the system with x∈Ω=x:Gx≤ρ (where G∈Rg×n and ρ∈Rg), and u(k)∈Rm is the control input subject to the constraints u(k)∈U=u:Vu≤φ.A nonempty closed setΩ⊂Rn is controlled invariant with respect to the system described in (1), if there exists a control signal u such that x(k+1) remains inside it for every x(k) belonging to the closed set. Moreover, if a given contraction rate 0<λ<1 is considered, a set Ω⊂Rn is said to be λ-contractive controlled invariant set with respect to system (1) if there exists a control signal u such that x(k+1) belongs to the set λΩ, for every x(k) belonging to the closed set [16, 21]. In general, the set of constraints Ω defined in state space is not a controlled invariant set; i.e., there is not necessarily a control law (u(k)∈U) which maintains the trajectory of the state vector completely contained in the set of constraints. However, it is possible to compute a controlled invariant set Ωc, to be as large as possible, contained within the set of constraints Ω [22]. Therefore, before starting the controller synthesis process, it is necessary to define a controlled invariant set and then to compute a suitable control law that is able to restrict the state vector to a controlled invariant set ∀x∈Ωc.By defining the maximal contractive controlled invariant set (Ωc=Gcx≤ρc) [16, 22], a state feedback control law (u(k)∈U), capable of maintaining the system dynamics (1), contained in Ωc, can be computed online by solving the linear programming problem (LP) as described in [16] or offline from the solution of the following multiparametric programming problem (mp-LP) [23]:(2)minvcTv+dTx,subject to:Dv≤W+Ex,where(3)cT=01,D=GcB-ρcV0,v=uε,W=0φ,E=GA0,where 0<ε≤λ is the contraction rate to be minimized at each time step, u(k) is the control action to be computed, and x(k) is set of states contained inside Ωc. The expression Gc(Ax(k)+Bu(k))≤ερ represents a convex polyhedron in the space Rn+m, and U=u:Vu≤φ is a convex polytope that represents the constraints in the control variable.In the design of controllers under constraints, the solution of the mp-LP (problem (2)) results in a PWA state feedback control law over the polyhedral regions in the space of parameters x(k) as follows [24]:(1)
The setΩc (controlled invariant polyhedral) is partitioned into Nq different polyhedral regions: (4)Rj=x∈Rn∣Pjx≤bjj=1,⋯,Nq,(2)
The optimal solutionu∗(x(k)):Ωc→Rm is a PWA function over Rj:(5)u∗xk=Fjxk+gjforxk∈Rj.As the system is in the state space form it is possible to find the largestλ-contractive invariant set and, in sequence, the parameters of the control law are computed which maintain the dynamics of the states within the λ-contractive invariant set. In order to associate with the PID controller, we will call this “the tuning step”, because we find the controller’s parameters that guarantee positive invariance and λ-contractivity. That is, by using this process we will be able to find a PID control law, PWA, that allows the controller to synthesize control actions capable of controlling the process under constraints.


### 2.1. Tuning of Gain-Scheduling PID Control Design (mp_PID)

Based on formulation that allows the reorganization of a second-order systems in state space form, described in [20], whose states are the tracking error, integral of the error, and derivative of the error, we propose the tuning of a type of gain-scheduling PID controller by using the PWA state feedback control law computed by multiparametric linear programming, described in (2).


#### 2.1.1. PID Controllers

Consider now the system presented in (1) is described by(6)YsUs=Ks2+2ξolωnols+ωnol2.Because the external setpoint does not affect the controller design, we assumer(t)=0 for the system of Figure 1 [20].Figure 1
System controlled by a PID.The relationy(t)=-e(t) is valid for the standard regulation problem. Thus, it is possible to place the system in function of the error and control signal, as presented in [20](7)s2+2ξolωnols+ωnol2Es=-KUs,(8)⇒e¨+2ξolωnole˙+ωnol2e=-Ku.Use the following definitions:(9)x1=∫0tetdt,x2=et,x3=detdt.Equation (8) can be rewritten as(10)x¨3+2ξolωnolx˙3+ωnol2x2=-Ku.Considering the state space, the formulation becomes [20](11)x˙1x˙2x˙3=0100010-ωnol2-2ξolωnolx1x2x3+00-Ku.In this case, we assume the reference signal equal to zero and because the system is regulatory it is organized in a way that the states tend to zero and tend to eliminate the disturbance. When applied in electrical vehicle motor control, we intend to make changes in the reference, so some considerations must be realized:(i)
The external reference does not affect the controller design.(ii)
It is possible to work step-type references in two ways, by using model illustrated in Figure1 or by forcing changes in the operational point, so the new system’s reference is forced to be at the origin likewise linearizing a nonlinear system in the operational point.Concerning the direct change of reference, it is possible to verify that as the system is stable in closed loop, it tends to converge to the reference. However, in this case, only the error and derivative of the error states will converge to zero and the integral of the error will become a value that maintains the necessary control action to force the output to zero, in the same way conventional PID does.The second way to control the system is using the linearization idea and it can be observed in Figure2.Figure 2
System controlled by a PID.Figure2 considers the reference equal to zero (step) and, to make changes in reference, we are changing the operational point using step 1. The concept is very simple; by changing the reference (step 1) in this system, the operational point will change. Thus, the zero will be shifted; i.e., the entered reference will be recognized as an instantaneous error disturbance on the system's states. The system was designed to force the error, integral of the error, and the derivative of the error to the origin, so the system will work to stabilize states in this “new zero”, which is the operational point. In this way, the system's output will be forced toward the reference using the same considerations as depicted in Figure 2. In this scheme when there is a reference change the invariant set moves along with it; i.e., if the error limit is equal to 1, for example, and the reference is 5, the output will be limited between the values 6 and 4. However, if the reference is changed to 4, the output will be limited to the interval between 3 and 5. This is particularly useful when it is desirable to constrain the error around a variable reference. However, it is needed to be careful not to vary the reference above the limits of the invariant set and not to exceed the physical limitations of the system. When the operator wants to limit the output between 4 and 6 and use the operating points 4 and 5, because of this, the constraints on the magnitude of the error would be within ±1 in the first example and in the second one between 2 and 0 (error=-y). This means that, for these examples, it would be necessary to modify the system's constraints by making a set of constraints for each operational point.Given the main considerations about the state space system, it is necessary to tune and use the controller. In this case the concept of invariant sets will be used to find an optimum tuning for a PWA PID control law, which we call mp_PID. Thus, theλ-contractive controlled invariant set is computed by using the algorithms proposed by [22]; then, mp-LP problem (2) is solved to compute the parameters Fj and gj of the affine law u(x)=Fjx+gj, where Fi multiplies the state X=[x1x2x3] corresponding to integral of the error, the error, and the derivative of the error. This means that the parameters of the proposed PID controller are defined by Fj=KijKpjKdj plus affine term gj which is associated with a polyhedral region Rj, forming a gain-scheduling PID control (mp_PID). Such approach can be obtained from the implementation of Algorithm 1.Algorithm 1
1: Convert the continuous system into a state space system, where the states are the errors and the input is the control action, according to equation (11); 2: Compute the maximalλ- contractive controlled invariant set contained in the set of constraints, which must be reexplained in terms of the new state representation; 3: Solve the mp-LP problem described in equation (2); 4: Compute the integral of error, error, and derivative of error; 5: Identify which polyhedral region the computed statex(k) belongs to. 6: Use the affine control law to control the system withFj=KijKpjKdjT and gj being the mp_PID parameters, corresponding to the j-th polyhedral region; 7: If the control routine is not interrupted, return to step 4.As described in Algorithm1, the proposed PID control design is performed from a sequence of steps, where at first the system must be rearranged in state space form, so that the input is the control action and the states are the integral of the error, error, and derivative of the error, according to (11). Then, the new system is discretized with the desired sampling period and, then given the new state space extended system, the maximal λ-contractive controlled invariant set is computed as well as the multiparametric linear programming problem (mp-LP) (2). The solution of the mp-LP problem represents a PWA control law over polyhedral regions Rj associated with a PID controller. At the end of these steps, the control law is inserted into the control loop, where the error tends to zero and the constraints are not violated as long as the initial state is inside the λ-contractive controlled invariant set.


## 2.1. Tuning of Gain-Scheduling PID Control Design (mp_PID)

Based on formulation that allows the reorganization of a second-order systems in state space form, described in [20], whose states are the tracking error, integral of the error, and derivative of the error, we propose the tuning of a type of gain-scheduling PID controller by using the PWA state feedback control law computed by multiparametric linear programming, described in (2).


### 2.1.1. PID Controllers

Consider now the system presented in (1) is described by(6)YsUs=Ks2+2ξolωnols+ωnol2.Because the external setpoint does not affect the controller design, we assumer(t)=0 for the system of Figure 1 [20].Figure 1
System controlled by a PID.The relationy(t)=-e(t) is valid for the standard regulation problem. Thus, it is possible to place the system in function of the error and control signal, as presented in [20](7)s2+2ξolωnols+ωnol2Es=-KUs,(8)⇒e¨+2ξolωnole˙+ωnol2e=-Ku.Use the following definitions:(9)x1=∫0tetdt,x2=et,x3=detdt.Equation (8) can be rewritten as(10)x¨3+2ξolωnolx˙3+ωnol2x2=-Ku.Considering the state space, the formulation becomes [20](11)x˙1x˙2x˙3=0100010-ωnol2-2ξolωnolx1x2x3+00-Ku.In this case, we assume the reference signal equal to zero and because the system is regulatory it is organized in a way that the states tend to zero and tend to eliminate the disturbance. When applied in electrical vehicle motor control, we intend to make changes in the reference, so some considerations must be realized:(i)
The external reference does not affect the controller design.(ii)
It is possible to work step-type references in two ways, by using model illustrated in Figure1 or by forcing changes in the operational point, so the new system’s reference is forced to be at the origin likewise linearizing a nonlinear system in the operational point.Concerning the direct change of reference, it is possible to verify that as the system is stable in closed loop, it tends to converge to the reference. However, in this case, only the error and derivative of the error states will converge to zero and the integral of the error will become a value that maintains the necessary control action to force the output to zero, in the same way conventional PID does.The second way to control the system is using the linearization idea and it can be observed in Figure2.Figure 2
System controlled by a PID.Figure2 considers the reference equal to zero (step) and, to make changes in reference, we are changing the operational point using step 1. The concept is very simple; by changing the reference (step 1) in this system, the operational point will change. Thus, the zero will be shifted; i.e., the entered reference will be recognized as an instantaneous error disturbance on the system's states. The system was designed to force the error, integral of the error, and the derivative of the error to the origin, so the system will work to stabilize states in this “new zero”, which is the operational point. In this way, the system's output will be forced toward the reference using the same considerations as depicted in Figure 2. In this scheme when there is a reference change the invariant set moves along with it; i.e., if the error limit is equal to 1, for example, and the reference is 5, the output will be limited between the values 6 and 4. However, if the reference is changed to 4, the output will be limited to the interval between 3 and 5. This is particularly useful when it is desirable to constrain the error around a variable reference. However, it is needed to be careful not to vary the reference above the limits of the invariant set and not to exceed the physical limitations of the system. When the operator wants to limit the output between 4 and 6 and use the operating points 4 and 5, because of this, the constraints on the magnitude of the error would be within ±1 in the first example and in the second one between 2 and 0 (error=-y). This means that, for these examples, it would be necessary to modify the system's constraints by making a set of constraints for each operational point.Given the main considerations about the state space system, it is necessary to tune and use the controller. In this case the concept of invariant sets will be used to find an optimum tuning for a PWA PID control law, which we call mp_PID. Thus, theλ-contractive controlled invariant set is computed by using the algorithms proposed by [22]; then, mp-LP problem (2) is solved to compute the parameters Fj and gj of the affine law u(x)=Fjx+gj, where Fi multiplies the state X=[x1x2x3] corresponding to integral of the error, the error, and the derivative of the error. This means that the parameters of the proposed PID controller are defined by Fj=KijKpjKdj plus affine term gj which is associated with a polyhedral region Rj, forming a gain-scheduling PID control (mp_PID). Such approach can be obtained from the implementation of Algorithm 1.Algorithm 1
1: Convert the continuous system into a state space system, where the states are the errors and the input is the control action, according to equation (11); 2: Compute the maximalλ- contractive controlled invariant set contained in the set of constraints, which must be reexplained in terms of the new state representation; 3: Solve the mp-LP problem described in equation (2); 4: Compute the integral of error, error, and derivative of error; 5: Identify which polyhedral region the computed statex(k) belongs to. 6: Use the affine control law to control the system withFj=KijKpjKdjT and gj being the mp_PID parameters, corresponding to the j-th polyhedral region; 7: If the control routine is not interrupted, return to step 4.As described in Algorithm1, the proposed PID control design is performed from a sequence of steps, where at first the system must be rearranged in state space form, so that the input is the control action and the states are the integral of the error, error, and derivative of the error, according to (11). Then, the new system is discretized with the desired sampling period and, then given the new state space extended system, the maximal λ-contractive controlled invariant set is computed as well as the multiparametric linear programming problem (mp-LP) (2). The solution of the mp-LP problem represents a PWA control law over polyhedral regions Rj associated with a PID controller. At the end of these steps, the control law is inserted into the control loop, where the error tends to zero and the constraints are not violated as long as the initial state is inside the λ-contractive controlled invariant set.


## 2.1.1. PID Controllers

Consider now the system presented in (1) is described by(6)YsUs=Ks2+2ξolωnols+ωnol2.Because the external setpoint does not affect the controller design, we assumer(t)=0 for the system of Figure 1 [20].Figure 1
System controlled by a PID.The relationy(t)=-e(t) is valid for the standard regulation problem. Thus, it is possible to place the system in function of the error and control signal, as presented in [20](7)s2+2ξolωnols+ωnol2Es=-KUs,(8)⇒e¨+2ξolωnole˙+ωnol2e=-Ku.Use the following definitions:(9)x1=∫0tetdt,x2=et,x3=detdt.Equation (8) can be rewritten as(10)x¨3+2ξolωnolx˙3+ωnol2x2=-Ku.Considering the state space, the formulation becomes [20](11)x˙1x˙2x˙3=0100010-ωnol2-2ξolωnolx1x2x3+00-Ku.In this case, we assume the reference signal equal to zero and because the system is regulatory it is organized in a way that the states tend to zero and tend to eliminate the disturbance. When applied in electrical vehicle motor control, we intend to make changes in the reference, so some considerations must be realized:(i)
The external reference does not affect the controller design.(ii)
It is possible to work step-type references in two ways, by using model illustrated in Figure1 or by forcing changes in the operational point, so the new system’s reference is forced to be at the origin likewise linearizing a nonlinear system in the operational point.Concerning the direct change of reference, it is possible to verify that as the system is stable in closed loop, it tends to converge to the reference. However, in this case, only the error and derivative of the error states will converge to zero and the integral of the error will become a value that maintains the necessary control action to force the output to zero, in the same way conventional PID does.The second way to control the system is using the linearization idea and it can be observed in Figure2.Figure 2
System controlled by a PID.Figure2 considers the reference equal to zero (step) and, to make changes in reference, we are changing the operational point using step 1. The concept is very simple; by changing the reference (step 1) in this system, the operational point will change. Thus, the zero will be shifted; i.e., the entered reference will be recognized as an instantaneous error disturbance on the system's states. The system was designed to force the error, integral of the error, and the derivative of the error to the origin, so the system will work to stabilize states in this “new zero”, which is the operational point. In this way, the system's output will be forced toward the reference using the same considerations as depicted in Figure 2. In this scheme when there is a reference change the invariant set moves along with it; i.e., if the error limit is equal to 1, for example, and the reference is 5, the output will be limited between the values 6 and 4. However, if the reference is changed to 4, the output will be limited to the interval between 3 and 5. This is particularly useful when it is desirable to constrain the error around a variable reference. However, it is needed to be careful not to vary the reference above the limits of the invariant set and not to exceed the physical limitations of the system. When the operator wants to limit the output between 4 and 6 and use the operating points 4 and 5, because of this, the constraints on the magnitude of the error would be within ±1 in the first example and in the second one between 2 and 0 (error=-y). This means that, for these examples, it would be necessary to modify the system's constraints by making a set of constraints for each operational point.Given the main considerations about the state space system, it is necessary to tune and use the controller. In this case the concept of invariant sets will be used to find an optimum tuning for a PWA PID control law, which we call mp_PID. Thus, theλ-contractive controlled invariant set is computed by using the algorithms proposed by [22]; then, mp-LP problem (2) is solved to compute the parameters Fj and gj of the affine law u(x)=Fjx+gj, where Fi multiplies the state X=[x1x2x3] corresponding to integral of the error, the error, and the derivative of the error. This means that the parameters of the proposed PID controller are defined by Fj=KijKpjKdj plus affine term gj which is associated with a polyhedral region Rj, forming a gain-scheduling PID control (mp_PID). Such approach can be obtained from the implementation of Algorithm 1.Algorithm 1
1: Convert the continuous system into a state space system, where the states are the errors and the input is the control action, according to equation (11); 2: Compute the maximalλ- contractive controlled invariant set contained in the set of constraints, which must be reexplained in terms of the new state representation; 3: Solve the mp-LP problem described in equation (2); 4: Compute the integral of error, error, and derivative of error; 5: Identify which polyhedral region the computed statex(k) belongs to. 6: Use the affine control law to control the system withFj=KijKpjKdjT and gj being the mp_PID parameters, corresponding to the j-th polyhedral region; 7: If the control routine is not interrupted, return to step 4.As described in Algorithm1, the proposed PID control design is performed from a sequence of steps, where at first the system must be rearranged in state space form, so that the input is the control action and the states are the integral of the error, error, and derivative of the error, according to (11). Then, the new system is discretized with the desired sampling period and, then given the new state space extended system, the maximal λ-contractive controlled invariant set is computed as well as the multiparametric linear programming problem (mp-LP) (2). The solution of the mp-LP problem represents a PWA control law over polyhedral regions Rj associated with a PID controller. At the end of these steps, the control law is inserted into the control loop, where the error tends to zero and the constraints are not violated as long as the initial state is inside the λ-contractive controlled invariant set.


## 3. DC Motors Overview

After the definition of the PID tuning method the application must be studied in order to have mp_PID applied to it, so in this section we present an overview of electric vehicle DC motors.Recently, electric vehicles are gaining popularity among the population resulting in more demand for these types of car. Electric vehicles are efficient and need less maintenance than fuel-based cars and they do not pollute the environment [15]. However, the electric car depends heavily on battery systems that are finite and have fewer storage capabilities. Therefore, strategies to reduce and use more efficiently the energy stored in the batteries are needed.The consuming of the electric vehicles depends heavily on the used motor type and adopted control strategy. Actually, DC motors and induction motors are being proposed to be used in the electric vehicle industry, with DC motor type being a good candidate to be used in electric vehicle applications [26, 27]. DC motors are efficient, presenting high reliability and easy maintenance. They are easy to control resulting in smooth acceleration and efficient battery usage [7, 8]. Although brushed DC motor suffers from the brush maintenance, the aforementioned advantages turn the DC motor to be applicable for use in electric cars.DC motors have the advantage of being easy to control resulting in several control techniques for velocity control using PID type control. Techniques using metaheuristic PID [28, 29], multivariate PID [30], genetic algorithm method with PID [12], and Adaptive PID Dynamic, Fuzzy, and Neurofuzzy Controller [19] were proposed to control DC motors.DC motors have different configurations as compound, shunt, series, permanent magnetic DC and separated field winding where each of them has advantages and disadvantages. DC motors in series configuration are the type of motors that can be used in electric cars due to their instantaneous torque and smooth acceleration. However, these types of motors need a minimal load not to be damaged, which is a condition that occurs in electric car applications. One way to limit the damage in the DC motor series control is to limit the maximum velocity in the adopted control strategy [31]. DC motors with separated field are the most versatile because they allow controlling torque and velocity separately using the armature current and field current separately with more options for control applications. In this paper, DC motor with separated field was chosen to test the control algorithm because it allows more restrictions options to be tested by the proposed control algorithm.In sequence, we present the DC motor modelling with excited separately field and afterwards we present the numerical examples controlling the motor and testing the performance of the tuned controllers.A DC motor controlled by current armature with independent field is depicted in Figure3.Figure 3
DC motor with separated winding field with constant current (if(t)) [25].The torque induced (Tm) in the motor is given by(12)Tmt=Jdwtdt+Bwt,(13)Tmt=Kait,where i(t) is the armature current, J is the inertia moment, w is the angular velocity, B is the friction coefficient, and Ka is the torque constant.The armature induced voltage (ea(t)) with constant field current (if) is given by(14)eat=Kbwt,where Kb is the velocity constant.As the DC motor has separated field, the voltage applied (v(t)) in the armature windings is given by(15)vt=Lditdt+Rit+eat,where L is the armature inductance, and R is the armature resistance.The following second-order transfer function resulted:(16)WsVs=KaJs+BLs+R+KaKb.


## 4. Numerical Examples

(i)
The parameters of a motor suitable for use in electric cars are determined. (ii)
The mp_PID controllers are tuned. (iii)
The proposed tuning algorithm is performed using different parameters and, then, the results are compared. (iv)
The influence of each parameter on the final process performance is analyzed.


### 4.1. DC Motor Parameters

At first, in order to control an electric vehicle DC motor we specify its parameters (the motor) in such a way that it is able to move the vehicle. The voltage armature, resistance and inductance armatures, moment of inertia, velocity constant, torque constant, and friction coefficient motor parameters presented in Table1 were used to test the proposed control algorithm performance.Table 1
Motor parameters.
V n 48 V R 0.1Ω L 0.005 H Kb 0.004V.s/rad Ka 0.0036N.m/A J 0.1N.m2 B 0.05N.m.s/radReplacing the motor parameters in (17),(17)WsVs=0.0036s+0.050.005s+0.1+1.44e-5,then, the simplified transfer function of the used motor becomes(18)Gs=7.2s2+20.5s+10.03.In the model of (18) the output is the angular velocity (rad/s) in the range of ±34.56rad/s and the input is the voltage that will vary in the range of ±48V. Note that as this type of motor allows two-direction movement, we will have both positive and negative voltages and positive and negative speeds considered in the controller constraints.


### 4.2. Tuning of the Controllers mp_PID

This section presents the general tuning process of the mp_PID controllers. Some important aspects to emphasize are described as follows:(i)
The output constraints can be transformed into constraints on the error, especially when assuming the operating point at zero. The output constraints for the electric vehicle DC motor case will be the maximum speed allowed at a voltage of 48V.(ii)
The control signal constraints must be limited to±48V, since we need to limit motor damage from overcurrent as the armature current is directly dependent on the applied load and armature voltage, so the algorithm is able to optimize the system within this set of constraints, unlike other techniques which only insert constraint on control action without taking in account the constraints at tuning phase resulting in lower dynamic performance of the vehicle DC motor.(iii)
The integral and derivative of the error values will be appropriately chosen; i.e., they will be used as a tuning parameter and the influence of these constraints will be evaluated in order to emphasize how the final performance of the system is changed, in aspects such as overshooting and stabilization time.(iv)
The main tuning parameter of the mp_PID controller is the value ofλ. It is related to the contractivity and will also be an observed parameter.(v)
In a specific case we observe the difference between varying the operating point and varying the reference.


### 4.3. Set of Tests

Based on these considerations, tests are performed varying the constraints on the integral of the error, derivative of the error, and theλ parameter. After that, a comparison between changing the reference and changing the operating point will be made.


#### 4.3.1. Test 1: Integral of the Error Constraints Change Effect

In this first test the objective is to observe the influence, in system’s performance, of integral of the error constraints change. Despite the direct relationship between error and the output of the motor (angular velocity), the integral of the error is an internal state of the system in state space and influences the motor dynamic performance but not necessarily forces physically the system outside its limits. Therefore, by hypothesis we assume that we can freely modify these parameters. In this way, the test conditions presented in Table2 were chosen. In these test conditions, the integral of the error limits was varied and the derivative of the error limits and λ were maintained constant.Table 2
Table with the 3 tests, varying integral of error.
Simulations λ Integral of the Error Limits Derivative of the Error Limits 1 0.999 ± 34.56 ± 172.80 2 0.999 ± 172.80 ± 172.80 3 0.999 ± 1728 ± 172.80The system’s outputs and the control actions for test condition 1 are depicted in Figures5 and 6. Also, Figure 4 presents the polyhedron formed by the first test case (test 1).Figure 4
Polyhedron test 1 for test condition 1.Figure 5
System’s outputs for test condition 1.Figure 6
Control actions for test condition 1.As seen, Figure4 presents the polyhedron formed by the first test case (test 1), where the default value is 34.56 so MaxIe=1 means 1 times 34.56 and MaxDe=5 means 5 times 34.56 and this concept is applicable to all the others figures. Because this polyhedron changes its shape for each test in all tests we present only the quantity of sets generated within the invariant set that in this case are 10, 8, and 10. The number of regions within the invariant set reveals the computational cost difference (in Algorithm 1 we need to search the region to find which PID controller parameters will be used to compute the control signal). In this case, as observed, the quantity is very similar; for a reference, there may be cases in which the amount of computed regions may be greater than 400, which in this case points out that the control signal computation will be inexpensive.Figure5 shows the output, i.e., the angular velocity in the 3 performed tests. We observe that, with lower constraint values in the integral of the error signal, the system tends to converge faster; on the other hand, with more relaxed restriction in the integral of the error signal, the system tends to stabilize slower. Another important factor to be analyzed is that the lower the restriction value in the integral of the error is, the greater the overshooting system tends to present.Figure6 corresponds to the behavior of the control signal. Here, the similarity in behavior with respect to the output signal is evident; i.e., the smaller the restriction value in the integral of the error is, the closer to the limits the signal will be, which in this case is ±48.


#### 4.3.2. Test 2: Derivative of the Error Constraints Parameters Change Effect

Similarly to the first test, in this second test our objective is to observe the influence in the performance of the system, when the derivative of the error constraints is changed. This also happened to the integral of the error constraint, the derivative of the error is an internal state of the system in state space and influences the performance but not necessarily physically forces the system outside its limits (we are not considering variation effects in this case, although in some cases they are included in problems with restrictions). Therefore, by hypothesis we assume that we can freely modify these parameters. In this way, the test conditions presented in Table3 were chosen. In these test conditions, the derivative of the error limits was varied and the integral of the error limits and λ were maintained constant.Table 3
Table with the 3 tests, varying derivative of error.
Simulations λ Integral of the Error Limits Derivative of the Error Limits 1 0.999 ± 172.80 ± 17.28 2 0.999 ± 172.80 ±172.80 3 0.999 ± 172.80 ± 1728.0The system’s outputs and the control signals for test condition 2 are depicted in Figures7 and 8.Figure 7
System’s outputs for test condition 2.Figure 8
Control actions for test condition 2.Figure5 shows the output, i.e., the angular velocity in the 3 performed tests. We observe that as the derivative of the error limits increases the system begins to present nonminimum phase and it is more difficult to stabilize it in smaller times; this means that in the case in which the limits are relaxed the integral of the error values can be larger and consequently the system tends to have a better transient.In these tests the quantity of sets generated within the controlled invariant set is 8, 8, and 12. Similarly to the previous test we emphasize that it will be very inexpensive to compute the control action.The figure of this second test (Figure6) corresponds to the behavior of the control signal. Here, the similarity in behavior with respect to the output action is evident; i.e., the smaller the constraint value in the derivative of the error is, the closer the control signal will be to its limit. A second important factor to be highlighted here is that in the case where the system tends to exceed the control action it is evident that there is a saturation and because the controller was obtained from a constrained optimization problem its performance will be optimal.


#### 4.3.3. Test 3: Effect of Changingλ

Unlike the first 2 tests, this one will not present the effect in constraints, but in the tuning parameter (λ) of the optimization problem. What should be highlighted here is that this parameter is associated with the contraction rate, which makes the invariant set smaller at each iteration and it is related to the system’s convergence speed. In this way, the test conditions presented in Table 4 were chosen. In these test conditions, λ was varied and the integral and derivative of the error limits were maintained constant.Table 4
Table with the 3 tests, varyingλ.
Simulations λ Integral of Error Limits Derivative of Error Limits 1 0.99 ± 172.80 ± 172.80 2 0.90 ± 172.80 ± 172.80 3 0.60 ± 172.80 ± 172.80The system’s outputs and the control actions for the test condition 3 are depicted in Figures9 and 10.Figure 9
System’s output for test condition 3.Figure 10
Control actions for test condition 3.This third test resulted as the quantities of sets within the invariant sets 8, 14, and 12. Also, Figure9 shows the output, i.e., the angular velocity in the 3 performed tests. We observe that the lower the λ value is the more aggressive the system's behavior is, forcing the stabilization to happen before, but reflecting in greater overshooting. This also means that by increasing the value of this parameter we have less aggressive systems, but with slower responses.The last figure of this third test (Figure10) corresponds to the behavior of the control signal. Here, the similarity to the output signal is evident; i.e., the smaller the value of λ is the closer to its limits it is.


#### 4.3.4. Test 4: Reference Changes versus Setpoint Changes

The first three tests aimed to show the results related to the controllers tuning when the systems are subject to reference variations (step). This means that the controlled invariant set remained unchanged as well as the operating point of the system. In this fourth test, the objective is to present the changes related to the operating point. Note that there is a possibility of differences in behaviors, because although it has the same amount of variation, this test directly affects the activated regions in the control process, which consequently changes the response of the system. Thus, the test condition is to change the setpoint by 20 units and compare it with the changed operating point (setpoint 1) by 20.The system’s outputs and the control actions for the test condition 4 are depicted in Figures11 and 12.Figure 11
System’s output.Figure 12
Control action.Figure11 shows the output, i.e., the angular velocity in the 3 performed tests. We observe that the system’s response, which had its setpoint changed, was less aggressive (observing the overshooting). Despite the presented output, it is not enough to emphasize that in any and every change of operating point the response will behave accordingly, since this difference is related to the fact that different regions of the invariant set are activated in both cases. Another important fact to note is that, depending on the stabilization criteria, we observe the operating point change case stabilizing before the response to the setpoint change case; this is mainly due to a faster reaction of this response.Figure12 of the fourth test corresponds to the behavior of the control signal. Here, the similarity in behavior with respect to the output signal is evident. We observe that the initial value of control action in operating point change case is greater than that of the reference change case; this impacts on the initial response and the possibility of faster stabilization. Note that additionally to the performed tests other possibilities were investigated, i.e., the change of the objective function to minimize the integral of the error and the derivative of the error (as alternatives to changing constraints). However, the results were not satisfactory, impacting directly on the size of the set of constraints and affecting the performance of the process.


## 4.1. DC Motor Parameters

At first, in order to control an electric vehicle DC motor we specify its parameters (the motor) in such a way that it is able to move the vehicle. The voltage armature, resistance and inductance armatures, moment of inertia, velocity constant, torque constant, and friction coefficient motor parameters presented in Table1 were used to test the proposed control algorithm performance.Table 1
Motor parameters.
V n 48 V R 0.1Ω L 0.005 H Kb 0.004V.s/rad Ka 0.0036N.m/A J 0.1N.m2 B 0.05N.m.s/radReplacing the motor parameters in (17),(17)WsVs=0.0036s+0.050.005s+0.1+1.44e-5,then, the simplified transfer function of the used motor becomes(18)Gs=7.2s2+20.5s+10.03.In the model of (18) the output is the angular velocity (rad/s) in the range of ±34.56rad/s and the input is the voltage that will vary in the range of ±48V. Note that as this type of motor allows two-direction movement, we will have both positive and negative voltages and positive and negative speeds considered in the controller constraints.


## 4.2. Tuning of the Controllers mp_PID

This section presents the general tuning process of the mp_PID controllers. Some important aspects to emphasize are described as follows:(i)
The output constraints can be transformed into constraints on the error, especially when assuming the operating point at zero. The output constraints for the electric vehicle DC motor case will be the maximum speed allowed at a voltage of 48V.(ii)
The control signal constraints must be limited to±48V, since we need to limit motor damage from overcurrent as the armature current is directly dependent on the applied load and armature voltage, so the algorithm is able to optimize the system within this set of constraints, unlike other techniques which only insert constraint on control action without taking in account the constraints at tuning phase resulting in lower dynamic performance of the vehicle DC motor.(iii)
The integral and derivative of the error values will be appropriately chosen; i.e., they will be used as a tuning parameter and the influence of these constraints will be evaluated in order to emphasize how the final performance of the system is changed, in aspects such as overshooting and stabilization time.(iv)
The main tuning parameter of the mp_PID controller is the value ofλ. It is related to the contractivity and will also be an observed parameter.(v)
In a specific case we observe the difference between varying the operating point and varying the reference.


## 4.3. Set of Tests

Based on these considerations, tests are performed varying the constraints on the integral of the error, derivative of the error, and theλ parameter. After that, a comparison between changing the reference and changing the operating point will be made.


### 4.3.1. Test 1: Integral of the Error Constraints Change Effect

In this first test the objective is to observe the influence, in system’s performance, of integral of the error constraints change. Despite the direct relationship between error and the output of the motor (angular velocity), the integral of the error is an internal state of the system in state space and influences the motor dynamic performance but not necessarily forces physically the system outside its limits. Therefore, by hypothesis we assume that we can freely modify these parameters. In this way, the test conditions presented in Table2 were chosen. In these test conditions, the integral of the error limits was varied and the derivative of the error limits and λ were maintained constant.Table 2
Table with the 3 tests, varying integral of error.
Simulations λ Integral of the Error Limits Derivative of the Error Limits 1 0.999 ± 34.56 ± 172.80 2 0.999 ± 172.80 ± 172.80 3 0.999 ± 1728 ± 172.80The system’s outputs and the control actions for test condition 1 are depicted in Figures5 and 6. Also, Figure 4 presents the polyhedron formed by the first test case (test 1).Figure 4
Polyhedron test 1 for test condition 1.Figure 5
System’s outputs for test condition 1.Figure 6
Control actions for test condition 1.As seen, Figure4 presents the polyhedron formed by the first test case (test 1), where the default value is 34.56 so MaxIe=1 means 1 times 34.56 and MaxDe=5 means 5 times 34.56 and this concept is applicable to all the others figures. Because this polyhedron changes its shape for each test in all tests we present only the quantity of sets generated within the invariant set that in this case are 10, 8, and 10. The number of regions within the invariant set reveals the computational cost difference (in Algorithm 1 we need to search the region to find which PID controller parameters will be used to compute the control signal). In this case, as observed, the quantity is very similar; for a reference, there may be cases in which the amount of computed regions may be greater than 400, which in this case points out that the control signal computation will be inexpensive.Figure5 shows the output, i.e., the angular velocity in the 3 performed tests. We observe that, with lower constraint values in the integral of the error signal, the system tends to converge faster; on the other hand, with more relaxed restriction in the integral of the error signal, the system tends to stabilize slower. Another important factor to be analyzed is that the lower the restriction value in the integral of the error is, the greater the overshooting system tends to present.Figure6 corresponds to the behavior of the control signal. Here, the similarity in behavior with respect to the output signal is evident; i.e., the smaller the restriction value in the integral of the error is, the closer to the limits the signal will be, which in this case is ±48.


### 4.3.2. Test 2: Derivative of the Error Constraints Parameters Change Effect

Similarly to the first test, in this second test our objective is to observe the influence in the performance of the system, when the derivative of the error constraints is changed. This also happened to the integral of the error constraint, the derivative of the error is an internal state of the system in state space and influences the performance but not necessarily physically forces the system outside its limits (we are not considering variation effects in this case, although in some cases they are included in problems with restrictions). Therefore, by hypothesis we assume that we can freely modify these parameters. In this way, the test conditions presented in Table3 were chosen. In these test conditions, the derivative of the error limits was varied and the integral of the error limits and λ were maintained constant.Table 3
Table with the 3 tests, varying derivative of error.
Simulations λ Integral of the Error Limits Derivative of the Error Limits 1 0.999 ± 172.80 ± 17.28 2 0.999 ± 172.80 ±172.80 3 0.999 ± 172.80 ± 1728.0The system’s outputs and the control signals for test condition 2 are depicted in Figures7 and 8.Figure 7
System’s outputs for test condition 2.Figure 8
Control actions for test condition 2.Figure5 shows the output, i.e., the angular velocity in the 3 performed tests. We observe that as the derivative of the error limits increases the system begins to present nonminimum phase and it is more difficult to stabilize it in smaller times; this means that in the case in which the limits are relaxed the integral of the error values can be larger and consequently the system tends to have a better transient.In these tests the quantity of sets generated within the controlled invariant set is 8, 8, and 12. Similarly to the previous test we emphasize that it will be very inexpensive to compute the control action.The figure of this second test (Figure6) corresponds to the behavior of the control signal. Here, the similarity in behavior with respect to the output action is evident; i.e., the smaller the constraint value in the derivative of the error is, the closer the control signal will be to its limit. A second important factor to be highlighted here is that in the case where the system tends to exceed the control action it is evident that there is a saturation and because the controller was obtained from a constrained optimization problem its performance will be optimal.


### 4.3.3. Test 3: Effect of Changingλ

Unlike the first 2 tests, this one will not present the effect in constraints, but in the tuning parameter (λ) of the optimization problem. What should be highlighted here is that this parameter is associated with the contraction rate, which makes the invariant set smaller at each iteration and it is related to the system’s convergence speed. In this way, the test conditions presented in Table 4 were chosen. In these test conditions, λ was varied and the integral and derivative of the error limits were maintained constant.Table 4
Table with the 3 tests, varyingλ.
Simulations λ Integral of Error Limits Derivative of Error Limits 1 0.99 ± 172.80 ± 172.80 2 0.90 ± 172.80 ± 172.80 3 0.60 ± 172.80 ± 172.80The system’s outputs and the control actions for the test condition 3 are depicted in Figures9 and 10.Figure 9
System’s output for test condition 3.Figure 10
Control actions for test condition 3.This third test resulted as the quantities of sets within the invariant sets 8, 14, and 12. Also, Figure9 shows the output, i.e., the angular velocity in the 3 performed tests. We observe that the lower the λ value is the more aggressive the system's behavior is, forcing the stabilization to happen before, but reflecting in greater overshooting. This also means that by increasing the value of this parameter we have less aggressive systems, but with slower responses.The last figure of this third test (Figure10) corresponds to the behavior of the control signal. Here, the similarity to the output signal is evident; i.e., the smaller the value of λ is the closer to its limits it is.


### 4.3.4. Test 4: Reference Changes versus Setpoint Changes

The first three tests aimed to show the results related to the controllers tuning when the systems are subject to reference variations (step). This means that the controlled invariant set remained unchanged as well as the operating point of the system. In this fourth test, the objective is to present the changes related to the operating point. Note that there is a possibility of differences in behaviors, because although it has the same amount of variation, this test directly affects the activated regions in the control process, which consequently changes the response of the system. Thus, the test condition is to change the setpoint by 20 units and compare it with the changed operating point (setpoint 1) by 20.The system’s outputs and the control actions for the test condition 4 are depicted in Figures11 and 12.Figure 11
System’s output.Figure 12
Control action.Figure11 shows the output, i.e., the angular velocity in the 3 performed tests. We observe that the system’s response, which had its setpoint changed, was less aggressive (observing the overshooting). Despite the presented output, it is not enough to emphasize that in any and every change of operating point the response will behave accordingly, since this difference is related to the fact that different regions of the invariant set are activated in both cases. Another important fact to note is that, depending on the stabilization criteria, we observe the operating point change case stabilizing before the response to the setpoint change case; this is mainly due to a faster reaction of this response.Figure12 of the fourth test corresponds to the behavior of the control signal. Here, the similarity in behavior with respect to the output signal is evident. We observe that the initial value of control action in operating point change case is greater than that of the reference change case; this impacts on the initial response and the possibility of faster stabilization. Note that additionally to the performed tests other possibilities were investigated, i.e., the change of the objective function to minimize the integral of the error and the derivative of the error (as alternatives to changing constraints). However, the results were not satisfactory, impacting directly on the size of the set of constraints and affecting the performance of the process.


## 4.3.1. Test 1: Integral of the Error Constraints Change Effect

In this first test the objective is to observe the influence, in system’s performance, of integral of the error constraints change. Despite the direct relationship between error and the output of the motor (angular velocity), the integral of the error is an internal state of the system in state space and influences the motor dynamic performance but not necessarily forces physically the system outside its limits. Therefore, by hypothesis we assume that we can freely modify these parameters. In this way, the test conditions presented in Table2 were chosen. In these test conditions, the integral of the error limits was varied and the derivative of the error limits and λ were maintained constant.Table 2
Table with the 3 tests, varying integral of error.
Simulations λ Integral of the Error Limits Derivative of the Error Limits 1 0.999 ± 34.56 ± 172.80 2 0.999 ± 172.80 ± 172.80 3 0.999 ± 1728 ± 172.80The system’s outputs and the control actions for test condition 1 are depicted in Figures5 and 6. Also, Figure 4 presents the polyhedron formed by the first test case (test 1).Figure 4
Polyhedron test 1 for test condition 1.Figure 5
System’s outputs for test condition 1.Figure 6
Control actions for test condition 1.As seen, Figure4 presents the polyhedron formed by the first test case (test 1), where the default value is 34.56 so MaxIe=1 means 1 times 34.56 and MaxDe=5 means 5 times 34.56 and this concept is applicable to all the others figures. Because this polyhedron changes its shape for each test in all tests we present only the quantity of sets generated within the invariant set that in this case are 10, 8, and 10. The number of regions within the invariant set reveals the computational cost difference (in Algorithm 1 we need to search the region to find which PID controller parameters will be used to compute the control signal). In this case, as observed, the quantity is very similar; for a reference, there may be cases in which the amount of computed regions may be greater than 400, which in this case points out that the control signal computation will be inexpensive.Figure5 shows the output, i.e., the angular velocity in the 3 performed tests. We observe that, with lower constraint values in the integral of the error signal, the system tends to converge faster; on the other hand, with more relaxed restriction in the integral of the error signal, the system tends to stabilize slower. Another important factor to be analyzed is that the lower the restriction value in the integral of the error is, the greater the overshooting system tends to present.Figure6 corresponds to the behavior of the control signal. Here, the similarity in behavior with respect to the output signal is evident; i.e., the smaller the restriction value in the integral of the error is, the closer to the limits the signal will be, which in this case is ±48.


## 4.3.2. Test 2: Derivative of the Error Constraints Parameters Change Effect

Similarly to the first test, in this second test our objective is to observe the influence in the performance of the system, when the derivative of the error constraints is changed. This also happened to the integral of the error constraint, the derivative of the error is an internal state of the system in state space and influences the performance but not necessarily physically forces the system outside its limits (we are not considering variation effects in this case, although in some cases they are included in problems with restrictions). Therefore, by hypothesis we assume that we can freely modify these parameters. In this way, the test conditions presented in Table3 were chosen. In these test conditions, the derivative of the error limits was varied and the integral of the error limits and λ were maintained constant.Table 3
Table with the 3 tests, varying derivative of error.
Simulations λ Integral of the Error Limits Derivative of the Error Limits 1 0.999 ± 172.80 ± 17.28 2 0.999 ± 172.80 ±172.80 3 0.999 ± 172.80 ± 1728.0The system’s outputs and the control signals for test condition 2 are depicted in Figures7 and 8.Figure 7
System’s outputs for test condition 2.Figure 8
Control actions for test condition 2.Figure5 shows the output, i.e., the angular velocity in the 3 performed tests. We observe that as the derivative of the error limits increases the system begins to present nonminimum phase and it is more difficult to stabilize it in smaller times; this means that in the case in which the limits are relaxed the integral of the error values can be larger and consequently the system tends to have a better transient.In these tests the quantity of sets generated within the controlled invariant set is 8, 8, and 12. Similarly to the previous test we emphasize that it will be very inexpensive to compute the control action.The figure of this second test (Figure6) corresponds to the behavior of the control signal. Here, the similarity in behavior with respect to the output action is evident; i.e., the smaller the constraint value in the derivative of the error is, the closer the control signal will be to its limit. A second important factor to be highlighted here is that in the case where the system tends to exceed the control action it is evident that there is a saturation and because the controller was obtained from a constrained optimization problem its performance will be optimal.


## 4.3.3. Test 3: Effect of Changingλ

Unlike the first 2 tests, this one will not present the effect in constraints, but in the tuning parameter (λ) of the optimization problem. What should be highlighted here is that this parameter is associated with the contraction rate, which makes the invariant set smaller at each iteration and it is related to the system’s convergence speed. In this way, the test conditions presented in Table 4 were chosen. In these test conditions, λ was varied and the integral and derivative of the error limits were maintained constant.Table 4
Table with the 3 tests, varyingλ.
Simulations λ Integral of Error Limits Derivative of Error Limits 1 0.99 ± 172.80 ± 172.80 2 0.90 ± 172.80 ± 172.80 3 0.60 ± 172.80 ± 172.80The system’s outputs and the control actions for the test condition 3 are depicted in Figures9 and 10.Figure 9
System’s output for test condition 3.Figure 10
Control actions for test condition 3.This third test resulted as the quantities of sets within the invariant sets 8, 14, and 12. Also, Figure9 shows the output, i.e., the angular velocity in the 3 performed tests. We observe that the lower the λ value is the more aggressive the system's behavior is, forcing the stabilization to happen before, but reflecting in greater overshooting. This also means that by increasing the value of this parameter we have less aggressive systems, but with slower responses.The last figure of this third test (Figure10) corresponds to the behavior of the control signal. Here, the similarity to the output signal is evident; i.e., the smaller the value of λ is the closer to its limits it is.


## 4.3.4. Test 4: Reference Changes versus Setpoint Changes

The first three tests aimed to show the results related to the controllers tuning when the systems are subject to reference variations (step). This means that the controlled invariant set remained unchanged as well as the operating point of the system. In this fourth test, the objective is to present the changes related to the operating point. Note that there is a possibility of differences in behaviors, because although it has the same amount of variation, this test directly affects the activated regions in the control process, which consequently changes the response of the system. Thus, the test condition is to change the setpoint by 20 units and compare it with the changed operating point (setpoint 1) by 20.The system’s outputs and the control actions for the test condition 4 are depicted in Figures11 and 12.Figure 11
System’s output.Figure 12
Control action.Figure11 shows the output, i.e., the angular velocity in the 3 performed tests. We observe that the system’s response, which had its setpoint changed, was less aggressive (observing the overshooting). Despite the presented output, it is not enough to emphasize that in any and every change of operating point the response will behave accordingly, since this difference is related to the fact that different regions of the invariant set are activated in both cases. Another important fact to note is that, depending on the stabilization criteria, we observe the operating point change case stabilizing before the response to the setpoint change case; this is mainly due to a faster reaction of this response.Figure12 of the fourth test corresponds to the behavior of the control signal. Here, the similarity in behavior with respect to the output signal is evident. We observe that the initial value of control action in operating point change case is greater than that of the reference change case; this impacts on the initial response and the possibility of faster stabilization. Note that additionally to the performed tests other possibilities were investigated, i.e., the change of the objective function to minimize the integral of the error and the derivative of the error (as alternatives to changing constraints). However, the results were not satisfactory, impacting directly on the size of the set of constraints and affecting the performance of the process.


## 5. Conclusion

This paper presented a PID controller for electric vehicle DC motors based on proving the functionality of the proposed algorithm from a set of simulations. The algorithm proved that it is possible to generate control actions that consider the 48V limits of the motor, as well as forcing the output speed of the motors to be limited to their specified values. In addition, it was verified that the integral and derivative of the error constraints make tuning parameters “constrain” the performance of the process output. In other words, we found a direct relationship between error constraints and the DC motor dynamics. Another important point to note is that changes inλ also interfere with system’s performance and the output behavior also depends on how the error is changed. In this second case, we verify the behavior of the system to reference and setpoint variations.In conclusion, control of electric vehicle DC motors under constraints and tuning controllers adjusting the behavior of the system's output is possible by using the proposed algorithm. In this sense, important improvements can be proposed. The first one would be to use a methodology to automatically tune parameters, since there are no tuning rules for these constraints (in the integral of the error and in the derivative of the error). A second improvement would be to extend the tests by verifying that the behavior presented to the DC motors, i.e., verified, can be extended to other processes.


## 6. Future Works

Although DC motor with excited separately field can be used in an electric vehicle, new types of motors as permanent magnet synchronous motor (PMSM) are being used recently [11, 32, 33]. The usage of the proposed algorithm in this type of motors will be investigated.



---

*Source: 6259049-2018-08-01.xml*