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.

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 [15]. 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 [1012]. In addition, the design of the PID controller is considered easy to implement, since it is only necessary to tune three parameters , , and 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 bywhere is the sample time, is the state of the system with (where and ), and is the control input subject to the constraints .

A nonempty closed set is controlled invariant with respect to the system described in (1), if there exists a control signal such that remains inside it for every belonging to the closed set. Moreover, if a given contraction rate is considered, a set is said to be -contractive controlled invariant set with respect to system (1) if there exists a control signal such that belongs to the set , for every 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 () 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 , 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 .

By defining the maximal contractive controlled invariant set () [16, 22], a state feedback control law (), capable of maintaining the system dynamics (1), contained in , 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]:

where where is the contraction rate to be minimized at each time step, is the control action to be computed, and is set of states contained inside . The expression represents a convex polyhedron in the space , and 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 as follows [24]:(1)The set (controlled invariant polyhedral) is partitioned into different polyhedral regions: (2)The optimal solution is a PWA function over :

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

Because the external setpoint does not affect the controller design, we assume for the system of Figure 1 [20].

The relation 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]

Use the following definitions:

Equation (8) can be rewritten as

Considering the state space, the formulation becomes [20]

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 Figure 1 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 Figure 2.

Figure 2 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 in the first example and in the second one between 2 and 0 (). 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 and of the affine law , where multiplies the state 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 plus affine term which is associated with a polyhedral region , forming a gain-scheduling PID control (mp_PID). Such approach can be obtained from the implementation of 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 state belongs to.
6: Use the affine control law to control the system with and 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 Algorithm 1, 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 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 Figure 3.

The torque induced () in the motor is given bywhere is the armature current, is the inertia moment, is the angular velocity, is the friction coefficient, and is the torque constant.

The armature induced voltage () with constant field current () is given bywhere is the velocity constant.

As the DC motor has separated field, the voltage applied () in the armature windings is given bywhere is the armature inductance, and is the armature resistance.

The following second-order transfer function resulted:

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 Table 1 were used to test the proposed control algorithm performance.

Replacing the motor parameters in (17),

then, the simplified transfer function of the used motor becomes

In the model of (18) the output is the angular velocity () in the range of and the input is the voltage that will vary in the range of . 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 , 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 Table 2 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.

The system’s outputs and the control actions for test condition 1 are depicted in Figures 5 and 6. Also, Figure 4 presents the polyhedron formed by the first test case (test 1).

As seen, Figure 4 presents the polyhedron formed by the first test case (test 1), where the default value is so means 1 times and means 5 times 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.

Figure 5 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.

Figure 6 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 .

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 Table 3 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.

The system’s outputs and the control signals for test condition 2 are depicted in Figures 7 and 8.

Figure 5 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 (Figure 6) 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.

The system’s outputs and the control actions for the test condition 3 are depicted in Figures 9 and 10.

This third test resulted as the quantities of sets within the invariant sets 8, 14, and 12. Also, Figure 9 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 (Figure 10) 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 Figures 11 and 12.

Figure 11 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.

Figure 12 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.

Data Availability

The [algorithms] data used to support the findings of this study have not been made available because scientific research is still being carried out using the presented algorithms.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

The authors would like to mention the institutions that contributed to the development of this project: UFRN (Federal University of Rio Grande do Norte), DCA (Department of Computation and Automation), CNPQ (National Council for Scientific and Technological Development), UnP (Potiguar University), and LAUT (Laboratory of Automation in Petroleum).