• No results found

PI-control of an Electrically Actuated Throttle

N/A
N/A
Protected

Academic year: 2021

Share "PI-control of an Electrically Actuated Throttle"

Copied!
52
0
0

Loading.... (view fulltext now)

Full text

(1)

Throttle

Supervisor KTH: Martin Andreasson Supervisor Scania: Anders Larsson Examiner: Jonas M˚artensson

TONY ˚ ASBERG

Master’s Degree Project

Stockholm, Sweden April 2013

(2)
(3)

PWM Pulse-Width Modulation EMF Electromagnetic Force RMS Root Mean Square

EGR Exhaust Gas Recirculation

(4)

Fast and precise controlled actuators are becoming more and more im- portant in today’s industry. One way of improving the performance of actuators is to go from a pneumatic controlled actuator to an electri- cally controlled actuator. Electrically controlled actuators are faster, more accurate and have a lower maintenance cost but are more com- plex and harder to control. In this thesis two methods for controlling an electric actuator is proposed. The actuator is a BLDC driven throt- tle valve used for controlling the air intake for a diesel engine where a precise amount of air is wanted to maintain optimal combustion in the engine. The proposed control methods are a PI position controller and a cascade controller consisting of three different controllers. In this the- sis the model construction and simulation results are presented while hardware implementation and results are presented in another thesis [1]. The results show that the electric controlled throttle meets specific requirements set by Scania for this thesis.

(5)

Snabba och presist styrda aktuatorer håller på att bli allt viktigare i dagens industri. Ett sett att förbättra prestanda på aktuatorer är att övergå från pneumatiska aktuatorer till elektriskt styrda aktuatorer.

Elektriskt styrda aktuatorer är snabbare, mer presisa och har lägre un- derhållskosnader men är mer komplexa och svårare att styra. I den här rapporten föreslås två olika metoder för att styra en elektrisk aktuator.

Aktuatorn är ett BLDC-drivet gasspjäll som används för att kontrollera luftintaget för en dieselmotor där en precis mängd luft önskas för optimal förbränning i motorn. De föreslagna styrmetoderna är en PI position- sregulator och en kaskadkopplad regulator med tre olika kontroller. I den här rapporten presenteras modellkontsruktion och simuleringsresul- tat medan hårdvaran presenteras i en annan rapport [1].

(6)

1 Introduction 1

1.1 Background . . . 1

1.2 Purpose and Goals . . . 1

2 Theory 3 2.1 The BLDC Motor . . . 3

2.1.1 Properties . . . 3

2.1.2 Mathematical Model . . . 4

2.2 State-Space . . . 5

2.2.1 State Space representation . . . 5

2.2.2 The BLDC motor . . . 5

2.2.3 I/O stability . . . 6

2.2.4 Transfer functions . . . 7

2.2.5 Control design and stability . . . 8

2.3 Current Control . . . 18

2.3.1 Direct torque control . . . 18

2.3.2 Current control using the stator current Is . . . 19

3 Simulation environment 21 3.1 Simulation Model . . . 21

3.2 Control Block . . . 21

3.3 RMS . . . 22

3.4 PWM . . . 22

3.5 Drive Stage . . . 24

3.6 BLDC Motor . . . 25

3.7 Position Sensor . . . 25

3.8 Gear and Throttle . . . 26

4 Results 27 4.1 Simulations . . . 27

4.2 Spring model and spring compensation . . . 28

4.3 Measurements . . . 29

5 Discussion and Future Work 39

(7)

5.1.2 State Space . . . 40 5.1.3 Improvements . . . 40 5.1.4 Simulation Results . . . 40

Bibliography 43

(8)
(9)

Introduction

In a modern truck engine there are several actuators that needs to be controlled with high precision. These actuators control various tasks such as EGR, Exhaust Gas Recirculation, and air intake. Traditionally these actuators have been controlled by pneumatic circuits but as higher precision and controllability is needed for today’s modern engines more and more pneumatic actuators are replaced with electronic actuators [2].

1.1 Background

Scania has for a long time been using pneumatic actuators to control the air intake for the diesel engine but are now investigating the option of replacing the pneumatic actuator for a electronic actuator. The actuator in question is a throttle valve that controls how much air is coming into the cylinders. For a diesel engine the driver controls the amount of diesel that is injected and then the throttle controls how much air is needed for optimal combustion [5][6]. Controlling the air/diesel ratio has been a goal for a long time and alot of effort has been put to study how to improve the performance. The drawback of the pneumatically controlled actuators is that they are slow and suffer from hysteresis [8][7]. There are several subcontractors that can deliver electronic actuators but Scania wants to build up knowledge and experience in developing their own electric actuators [2].

1.2 Purpose and Goals

This thesis builds upon previous work made in the thesis Modeling and control of electromechanical actuators for heavy vehicle applications [9]. The purpose of this thesis is to build upon their suggestions and results to get a electric actuator that achieves the desired performance. As suggested in [9] the electric actuator is driven by a BLDC motor controlling the throttle valve the purpose of this thesis is to find suitable methods of controlling the BLDC motor. The performance requirements are:

(10)

• Rise time of less then a value specified by Scania.

• Steady State Error not larger then a value specified by Scania.

• Overshoot - As small as possible while fulfilling the goals above.

The hardware configuration and results are presented in the paper [1] while this paper focus simulations and modelling of the system. The model i built in Simulink which is a block diagram environment for multidomain simulation and Model-Based Design.

(11)

Theory

2.1 The BLDC Motor

Based on the suggestion from previous work done in [9], a BLDC motor is chosen for this thesis. The BLDC motor has several major advantages compared to other electric motors. The BLDC motor is almost maintenance free due to the fact that it lacks brushes, which is a major advantage when considering the use of the actuator in heavy duty vehicles where long life times with little wear is desired. The BLDC also has a high power density and high efficiency [10].

The drawback of the BLDC motor is that it is harder to control compared to other electric motors such as a regular brushed DC motor. For s BLDC motor the commutations can’t be handled by the brushes as in a regular DC motor but has to be handled manually which increases complexity and requires extra sensors. The BLDC can be controlled in a sensorless fashion but it is usually only done when the actual position of the motor does not need to be known with any precision and the motor is in constant motion [11][12].

2.1.1 Properties

The BLDC motor is usually build with permanent magnets in the rotor placed in the center and paired windings in the stator on the outside, but can also be built with the windings in the stator placed in the center and the permanent magnets in the rotor that rotates around the stator. For this thesis, a BLDC motor is used with four permanent magnets in the rotor placed in the center and with a surrounding stator with three pairs of windings. To determine the position of the motor, sensor are needed. Usually the position is detected by hall sensors that detect the presence of the permanent magnets in the rotor and determines the position depending on the magnets position. There are several other ways of detecting the position but for this thesis three hall sensors are used that can measure the position with a res- olution of 60 which is enough for commutation purposes as commutation occurs every 60.

To run the BLDC motor voltages need to be applied to the windings. These volt-

(12)

ages are DC-voltages that are pulse-width modulated. The torque of the motor is controlled by the width of the PWM pulses rather then the DC voltage. Two of the three winding pairs are applied with PWM voltages, with opposite signs, and the third is held inactive. Which windings that are active are determined by the Hall sensors and the control scheme used for controlling the BLDC motor. Due to the BLDC motor inducing a magnetic field as it rotates it will be inducing a EMF in the current carrying windings which is called the back-EMF. This back-EMF works against the torque produced by the applied voltage and results in the torque dropping as the speed of the BLDC motor increases. The BLDC motor can be de- signed with two different back-EMF configurations depending on how the windings are paired in the stator. One is trapezoidal [13] and the other one is sinusoidal [10].

The BLDC motor used in this thesis uses a trapezoidal back-EMF configuration.

2.1.2 Mathematical Model BLDC model

The motor is modelled as a Y connected machine with 4 poles. We make the as- sumptions that the magnetic circuit saturation is ignored, stator resistance, self and mutual inductance of all phases are equal and constant. Hysteresis and eddy current losses are eliminated and all semiconductor switches are ideal. The phase voltages are calculated as follows[14]

Va= Ria+ (L − M )dia

dt + Ea Vb = Rib+ (L − M )dib

dt + Eb Vc= Ric+ (L − M )dic

dt + Ec,

Where Va,b,care the phase voltages. R is the winding resistance and L is the winding inductance. M is the mutual inductance which is neglected in this thesis as it is much smaller than L [14].R and L are assumed equal for all three windings.

Ea,b,c are the induced back-emfs

Ea= KeωmF (θe)

Eb= KeωmF (θe 3 ) Ec= KeωmF (θe+

3 ),

(13)

where Ke is the back-EMF constant and ωm is the rotors angular velocity.θe is the electrical angle and F (·) is a function representing the back-EMF.

F (·) =

1 0 ≤ θe< 3 1 −6πe3 ) 3 ≤ θe < π

−1 π ≤ θe< 3

−1 + π6e3 ) 3 ≤ θe < 2π,

(2.1)

The torque induced in the motor can then be written as

Ta= ktiaF (θe) (2.2)

Tb = ktibF (θe

3 ) (2.3)

Tc= kticF (θe+

3 ), (2.4)

where ktis a torque constant.

2.2 State-Space

2.2.1 State Space representation

A state space representation of the motor is derived and transformed to a trans- fer function in order to conduct a stability analysis. This transfer function is then combined with the cascade controller and throttle dynamics to attain a state space/transfer function description of the whole system. Due to the fact that there are several nonlinear dynamics in the system and that the drive stage is very com- plex and hard to model as a state space several simplifications are made to be able to achieve a linear model of the system.

2.2.2 The BLDC motor

A simplified model of the BLDC motor can be represented by the following state space model in equation 2.5 [3].

δi δωδt δtδθ δt

=

RLK3Lb 0

Kt

JDJ 0

0 1 0

i ω θ

+

1 3L

0 0

u, (2.5)

where i is the current, ω is the speed of the motor, θ is the angle and J is the inertia of the motor. R and L are the resistance and inductance while Kt and Kb are the motor and electromotive constants. u is the applied voltage to the motor.

The state space model in equation 2.5 is only valid for a motor running at no load.

By adding the effect of the spring from the throttle we get a simplified model for the load and the State space model becomes as seen in equation 2.6. In this state

(14)

space equation ω and θ are still the motor speed and angle. To attain the throttle speed and angle a simple multiplication with the gear ratio n is sufficient.

δi δωδt δtδθ δt

=

RLK3Lb 0

Kt

JDJJ nKc2

0 1 0

i ω θ

+

1 3L

0 0

u, (2.6)

where Kc is the spring constant and n which is the gear ratio. The nonlinear pretension of the spring is assumed to be compensated by the control used and is therefore not included. Additional friction from the throttle is not considered. This gives us a linear representation of the system.

2.2.3 I/O stability

This state space system has one input and three outputs. From u to i, from u to ω and from u to θ.

The characteristic polynomial of the matrix is attained by:

det (Iλ − A) = (λ +R L)



λ2+D

Jλ + Kc J n2



Kb 3L



Kt J λ



,

this gives the polynomial λ3+

R L +D

J

 λ2+

RD

J L +KtKb

3LJ + Kc

J n2

 λ +

RKc

J Ln2



Using Routh-Hurwitz criterion for a third-order polynomial which states that for a third-order polynomial, P (λ) = α3λ3 + α2λ2 + α1λ + α0 , all roots are in the open left complex half plane if αn > 0 and α2α1 > α3α0 which translates into the following requirements for stability:

R L +D

J



> 0 (2.7)

RD

3LJ +KtKb 3LJ + Kc

J n2



> 0 (2.8)

RKc

J Ln2



> 0 (2.9)

RD

J L +KtKb 3LJ + Kc

J n2

 R L +D

J



>

RKc J Ln2



(2.10) Equation 2.7 to 2.9 are always fulfilled for positive parameters. By expanding equation 2.10 we get:

R2D

J L2 +RKtKb

3L2J +KcD

J2n2 +RD2

J2L +DKtKb

3LJ2 + RKc J Ln2

!

>

RKc J Ln2



, (2.11) which makes it clear that equation 2.10 and thus all four of the equations always are fulfilled for positive parameters. In particular this implies that the system with the given values from table 2.1 will be stable.

(15)

Constant Description Value Unit

R Winding resistance 4.9

L Winding inductance 19.1 · 10−3 H

P Number of poles 4 n/a

ke Back-emf constant 0.036 Vs/rad

kt Torque constant 0.036 Nm/A

Jm Rotor inertia 1.33 · 10−6 kgm2 bm Viscous friction constant 2 · 10−6 kgm2/s

Table 2.1. Parameters of the BLDC motor

2.2.4 Transfer functions The transfer function from u to i is

Gui=

1 3L

s2+DJs +J nKc2



s3+DJ +RLs2+RDJ L +K3LJtKbJ nKc2s + J LnRKc2

(2.12)

The transfer function from u to ω is G =

Ds 3L

s3+DJ +RLs2+RDJ L +K3LJtKbJ nKc2s + J LnRKc2

(2.13)

The transfer function from u to θ is G=

D 3L

s3+DJ +RLs2+RDJ L +K3LJtKbJ nKc2s + J LnRKc2

(2.14)

The control signal u is the voltage applied to the motor. Due to the complexity of the drive stage from duty cycle to applied phase voltages a simplification is made.

The voltage applied to the motor is assumed proportional to the duty cycle, i.e. a duty cycle value of 1 will correspond to maximum applied voltage (24 V). The new simplified system based on transfer functions can be seen in Figure 2.1. Figure 2.2

torque constant

Kt 1

J.s+D Gui

Step Speed

Control Kp

Saturation1 Saturation

Position Control Kp

Kc n.s

Integrator 1/s Gears 1/n Current

Control Kp

Figure 2.1. The simplified system

and Figure 2.3 show how well the simplified linear system follows the Simulink based

(16)

model when the same control signal is used for both the Simulink based model and the linearised and simplified transfer function.

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

−1.5

−1

−0.5 0 0.5 1 1.5

Time (s)

Current (A)

Simulink Model State Space Model

Figure 2.2. Simulink model response compared to State space model response with the same input.

2.2.5 Control design and stability

The next step is to determine the PI parameters for the controllers and close the loops with the PI controllers to get a transfer function that represents the whole system. For the first system where only one PI-controller is used to control the throttle the complete transfer function for the whole system can be attained by closing the loop:

GP I = kps + ki

s (2.15)

Gc= 24 GGP I 1 + 24GGP I

(2.16) To determine controller constants, the root locus of the system was used. The root locus plot can be seen in Figure 2.4 where the PI control is represented by:

GP I = Ks + 0.1K

s (2.17)

where K is the system gain that is to be determined by the use of the root locus.

The relation between proportional gain and the integral gain was chosen as to have

(17)

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

−5 0 5 10 15 20 25 30

Time (s)

Position (degrees)

Simulink Model State Space Model

Figure 2.3. Simulink model response compared to State space model response with the same input when looking at throttle position

a large proportional part to attain a fast system, but with a small integral term to reduce the steady state error but not large enough to cause to high overshoots. The gain was determined by manually testing. The gain was increased while observing the resulting root locus and step responses with the use of Matlab’s SISO Design Tool. The chosen value for K was K = 0.8 which gives kp = 0.8, ki = 0.08. A step response of the resulting system can be seen in Figure 2.5 where a rise time of 0.066s was attained.

To attain a full transfer function for the whole system with the cascade controller we begin with first closing the innermost loop and then continue outwards. Closing the loop with the current controller yields:

GP IDc= kps + ki

s (2.18)

Gc= 24 GuiGP IDc

1 + GuiGP IDc (2.19)

The next step is to close the loop around the speed controller to attain a transfer function from a speed reference ωref to ω. Multiplying Gcwith G gives the speed:

ω = (T − TL)

n(J s + D) = (iKm− ωKnsc)

n(J s + D) ⇒ ω = i Kmns

s(J s + D)n2+ Kc ⇒ ω = iG (2.20)

(18)

Using another controller to control the speed and closing the loop gives:

Gc2= GcGP IDωG 1 + GcGP IDωG

(2.21) The out most loop is the position control loop. A simple integrator Gωθ = 1s is used to go from ω to θ. The last closed loop is given by

Gc3= Gc2GP IDθGωθ 1 + Gc2GP IDθGωθ

(2.22) The transfer function Gc3 represents the whole system from a position reference θref to the actual position θ.

To determine the PI parameters for the three controllers, the root locus method will be used here as well. Initial testing of the innermost closed loop Gc using a P-controller with varying values of the gain K is shown in Figure 2.6.

The innermost loop seen in equation 2.19, need to be the fastest loop for a cascade controller to function and looking at the step responses shown in Figure 2.6, a step from 0 to 1 is used, it becomes clear that a gain value of K > 100 is needed to be able to attain a rise time less then the requirement of the outermost loop. Such high gain would in turn result in a very high control signal u. The saturation of the control signal in the physical system will be at u = 1. With a gain of K > 100 disturbances and the impact of the PWM induced oscillations will we increased. A gain of K ≈ 5 seems most appropriate due to the initial fast gain and low steady state error but still not to high to increase disturbances to much, Figure 2.7 shows the step responses for a gain K ≈ 5 . The initial rise is very fast and the following undershoot can not be avoided without a very high gain. The undershoot is slow enough to not interfere with the system in a major way since the largest step that will occur will have a rise time of less than the required value.

The next step is to tune the speed control loop which is represented by equation 2.21. As seen in Figure 2.8 which shows three different step responses to the closed loop. We want to have a low gain while maintaining a good performance. The reason for this is that since the output will be the reference to the current loop, a high gain will result in a high reference value which in turn will lead to a saturated current due to the limitations on the allowed current. A lower gain might still lead to a saturated current but not to the same extent. The root locus of the system can be seen in Figure 2.9. The closed loop is stable and a gain of K = 0.2 is chosen which gives a peak of 0.846 and a rise time of 0.036s.

The outer loop which is the position control loop is represented by equation 2.21.

The root locus of the position loop can be seen in Figure 2.10. The goal here is to attain as fast as possible rise time while having an overshoot of < 0.1%. A gain of K = 50 fulfils the requirements and the resulting step response can be seen in

(19)

Figure 2.11. The final system will have a rise time of 0.036s and a overshoot of 0.03% and the control parameters are:

Position controller: Kp = 50, Ki = 0 Speed controller: Kp = 0.2, Ki = 0 Current controller: Kp= 5, Ki= 0

The PI parameters attained in this section will serve as a starting point for the tuning of the Simulink based model of the system. Some additional tuning is to be expected due to the fact that the Simulink based model will have limitations on the control signals which are not included in the simplified linear system when transformed to a single transfer function from a position reference to actual throttle position represented by Gc3. The difference between having saturated signals and having no limitations can be seen in Figure 2.12. The system used as comparison is the Simulink model seen in Figure 2.1 where saturation blocks are used to simulate the limitations of the real system.

(20)

Figure 2.4. Root locus and Bode plots of the system with only one PI controller

(21)

Time (seconds)

Amplitude

0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15

0 0.2 0.4 0.6 0.8 1 1.2

1.4 Step Response

Figure 2.5. Step response of the system with only one PI controller. Rise time 0.066 seconds

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 0

0.2 0.4 0.6 0.8 1 1.2 1.4

Step Response

Time (Seconds) (seconds)

Amplitude

K=0.1 K=1K=10 K=100

Figure 2.6. Step responses of the system Gc with varying values of the gain

(22)

Time (seconds)

Amplitude

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

1 Step response

Figure 2.7. Step responses of the system Gc with gain K=5

0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 0.045 0.05

0 0.2 0.4 0.6 0.8 1

Step Response

Time (seconds)

Speed (rad/s)

K=0.1 K=0.5 K=1

Figure 2.8. Step responses of the system Gc2 with varying values of the gain

(23)

Magnitude (dB)

−120 −100 −80 −60 −40 −20 0

−300

−200

−100 0 100 200 300

400 Root Locus

Real Axis

Imag Axis

10−4 10−2 100 102 104

−180

−135

−90

−45 0 45 90

P.M.: 48.9 deg Freq: 286 rad/s

Frequency (rad/s)

Phase (deg)

−60

−40

−20 0 20 G.M.: inf

Freq: Inf Stable loop

Open−Loop Bode

Magnitude (dB)

0

Figure 2.9. Root locus and Bode plots of the speed loop

(24)

−1000 −800 −600 −400 −200 0 200

−1000

−800

−600

−400

−200 0 200 400 600 800

1000 Root Locus

Real Axis

Imag Axis

10−4 10−2 100 102 104

−125

−120

−115

−110

−105

−100

−95

−90

P.M.: 76.6 deg Freq: 45.1 rad/s

Phase (deg)

Frequency (rad/s)

−40

−20 0 20 40 60 80 100 120

G.M.: 27.6 dB Freq: 459 rad/s Stable loop

Open−Loop Bode

Magnitude (dB)

200

Figure 2.10. Root locus and Bode plots of the position loop

(25)

Time (seconds)

Amplitude

0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

Step Response

Figure 2.11. Step response with K=50

0.990 1 1.01 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 1.1 1.11 1.12 1.13 1.14 1.15 0.2

0.4 0.6 0.8 1 1.2 1.4

1.6 Step Response

Time (Seconds)

Position (Radians)

Reference Saturated Control Unsaturated Control

Figure 2.12. Step responses showing the effect of saturated control signals

(26)

2.3 Current Control

There are various ways to design a current controller and this thesis will look into different ways to design the feedback loop. For simplicity, only one feedback signal is desired. For this purpose, three different transforms of the phase currents are evaluated.

2.3.1 Direct torque control

For a BLDC motor with trapezoidal shaped back-EMF, the electric torque can be expressed as

Te= Kt

2



iaφ (θ) + ibφ

 θ −2π

3

 + icφ

 θ −4π

3



(2.23)

Where φ (θ) is the trapezoidal shaped function of the electric angle θ [14] which is shown the Figure 2.13.

0 60 120 180 240 300 360 420 480 540 600

−1 0 1

Angle (degrees)

Amplitude

0 60 120 180 240 300 360 420 480 540 600

−1 0 1

Angle (degrees)

Amplitude

0 60 120 180 240 300 360 420 480 540 600

−1 0 1

Angle (degrees)

Amplitude

φ(θ−4π/3) φ(θ−2π/3) φ(θ)

Figure 2.13. The electromotoric force

Using Te = KtI we get:

I = 1 2



iaφ (θ) + ibφ

 θ −2π

3

 + icφ

 θ −

3



(2.24)

(27)

2.3.2 Current control using the stator current Is

For this controller design the stator current Is is used to calculate the error from the reference current. For feedback the three phase currents ia,ib and ic that are fed to the motor are measured and used to derive Is.

Is= |ia| + |ib| + |ic|

2 (2.25)

It is a natural way to transform the phase currents to a single current to be used for calculating an error for the current control. Unfortunately it has the major drawback that due to using the absolute value of the three phase currents information is lost.

Is will always stay positive and will have the same value for positive and negative phase currents. Figure 2.14 shows the difference between the actual motor current reconstructed from the torque by using the relation Te = kmI and the Is current.

0.125 0.13 0.135 0.14 0.145 0.15

−0.25

−0.2

−0.15

−0.1

−0.05 0 0.05 0.1 0.15 0.2 0.25

Time (s)

Current (A)

IsI

Figure 2.14. Comparison between Is and the current I derived in equation 2.24 The two currents are identical for currents above zero but as the torque goes negative the Iscurrent will not follow but instead show the absolute value of I.

This method is simple and works well when working with only positive torque as Is current follows the relation Te= kmI very well for positive values of Is but will not

(28)

work when using negative torques, i.e. when the motor changes direction which is needed to accomplish the desired position control of the throttle valve.

(29)

Simulation environment

3.1 Simulation Model

The model of the system was implemented in Simulink. Two different models were used, one where the position of the throttle was controlled with one PI-control and one model where a cascaded PI-control was used. Figure 3.1 shows the Simulink model of the whole system. The models themselves consist of several subsystems for easier overview and handling of the models. The control block contains all the controllers used for the actuator with output u being the duty cycle for the PWM. This Includes position control as well as speed control and current control for the cascaded controller. The PWM control block is made to use the duty cycle signal from the control block and the Hall sensor signals to create the desired PWM signals. The PWM signals are then sent to the Drive Stage Block where a three phase current is created. The Motor and Gear+Throttle blocks contain the model of the BLDC motor used. More detailed description of the blocks follows in the next sections.

3.2 Control Block

The control block layout depends on if we used the simple version using just a Position regulator or if we used the cascaded controller and on the method used for current feedback. Figure 3.2 shows the layout of the position control block used for the model controlling the position with just one PI-control. An overview of the Control Block used for the cascade control can be seen in Figure 3.3. The position controller is a PI using the throttle position as feedback signal. The second controller is the speed controller using the output from the position controller as a reference and the measured speed of the throttle to calculate the error. The speed controller is a P controller, which is followed by a torque compensation block that is used to compensate for some of the some of the nonlinearities induced by the spring pre-tension and the friction. Last is the current controller that takes the output from the compensation block as reference and the measured current as

(30)

Continuous

Step

RMS A B C

A_RMS B_RMS C_RMS

Position Sensor PositionMeas_Spd

Meas_Pos PWM Control

m_ref

M_pos PWM1 PWM2 PWM3 PWM4 PWM5 PWM6

Motor Load ia

ib ic Torque Motor pos A B

C

Gears+Throttle Torque

speed in load out Throttle pos

ActuatorSpeed Drive stage

PWM1 PWM2 PWM3 PWM4 PWM5 PWM6 A B C

Control Block bldc_cntl_mod

A B C

duty cycle

Figure 3.1. Overview of the Simulink model.

inputs, here using direct torque control transformation for current control. A filter is used on the measured current to filter out the oscillations caused by the PWM.

The filter is a simple moving average filter that take the previous five sampled values together with the current value to calculate an average acording to y(n) =

y(n−5)+y(n−4)+y(n−3)+y(n−2)+y(n−1)+y(n)

6 .

3.3 RMS

The RMS block is used to get an RMS vaule of the three phase currents. First an offset of 3A is introduced, this is done to make sure we work within a region without negative values for the three currents to simplify the RMS calculations. An RMS calculator is used where the RMS is recalculated for each new sample of the current until we manually reset the RMS calculattion block. This reset is done by sending in a pulse with a frequency matching the PWM frequency. By doing this the RMS is calculated over one full period of the currents PWM induced frequency..

After the RMS is calculated the previously introduced offset is removed. The zero order hold blocks are used to sample the currents at a sample time matching the hardware.

3.4 PWM

The PWM Control block consists of three blocks, the Hall signal block, the Hall decoder and the PWM generator. The Hall signal block takes the measured motor position and convert it to Hall signals according to a script using a conversion table according to the physical properties of the hall sensors. The Hall decoder uses the Hall signals to determine which sector the rotor is in according to the hall signals.

(31)

Figure 3.2. The Control block for the system when controlled by a single PI control

duty-_cycle 1

bldc_1ms Subsystem1

1ms() In2

In1 Out1

Subsystem Electrical angle A

B C

Out1

[C]

[D]

[B]

[E] [A]

[C] [F]

[B]

[A]

Cntl_speed 1ms()

Cntl_pos 1ms()

Cntl_currentFiltCntl_1ms1 1ms()

Cntl_current 1ms() Iref I

7

6 5 4 3 2 1

r_pos

motorSpeed r_posRef

Figure 3.3. The Cascade Controller Block consisting of three controllers used in a cascade as well as compensation, filter and current conversions

(32)

This information is then sent to the PWM generator block together with the duty time signal to generate the PWM signals, sector determines which transistor that should be active and the duty cycle determines the amplitude of the applied voltage.

Hard chopping with synchronous rectificationis [15] is used to control the PWM.

Table 3.1 shows the commutating scheme used where T1-T6 are the transistors in the drive stage.

H1 H2 H3 Active transistor

1 0 1 T1,T4

1 0 0 T6,T1

1 1 0 T3,T6

0 1 0 T2,T3

0 1 1 T2,T5

0 0 1 T5,T4

Table 3.1. Commutation Scheme

3.5 Drive Stage

The drive stage seen in Figure 3.4 is modeled in the Matlab toolbox SimPowerSys- tems, and is a three-phase H-bridge inverter with MOSFET transistors. This setup uses six transistors, each controlled by the PWM signals. The A,B and C ports sends the three phase currents ia,b,c to the motor.

Figure 3.4. Overview of the transistor in the drive stage

(33)

3.6 BLDC Motor

The BLDC motor seen in Figure 3.5 is a SimPowerSystem block using the equations derived in section 2.1.2. As input we have the A, B and C currents from the drive stage block containing current and voltage information for the three phases.

Friction, spring and gears are connected to the load input. The friction always working as a load reducing the output torque while the spring either adds to the torque or work against it depending on the direction, opening or closing the valve.

The outputs from BLDC motor model are stator currents, stator voltages, back EMFs as well as position, speed and torque. For this thesis we will only use the motor position and the stator currents as outputs as they are the only signals we can measure in the hardware implementation.

Figure 3.5. Overview of the motor

3.7 Position Sensor

The position sensor block is used to simulate the sensor used in the hardware im- plementation by quantizing the position signal from the BLDC Motor block. The output from the BLDC Motor block is continuous while the sensor used in the

(34)

hardware only can sense an increase of 0.35. To simulate this the position signal is quantized with a step of 0.35. The result of the quantization can be seen in Figure 3.6.

Figure 3.6. Effect of the quantization on the position sensing

3.8 Gear and Throttle

The Gear and Throttle block simulates the behavior of the gears and throttle. The gears are assumed ideal with an gear ratio in the range of 23-25 and are seen as a gain in the system. A gain that convert motor speed to throttle speed K = GearRatio1 and also converts the load of the throttle back to the motor through the gears. The throttle speed is integrated to get the position of the throttle. The Spring block contain the calculation of the effect of the spring on the torque and the Friction block contain static, viscous and coulomb friction calculations.

(35)

Results

In this section the results from the simulations are presented

4.1 Simulations

Two different models were used for simulation, one with only one PI controller with the position as feedback and one with a cascaded controller using current, speed and position as feedback. Due to the difficulties of finding and implementing a good model of the spring with both pre-tension and consisting of a linear spring, a simplified model is considered.

According to the analysis done in chapter 2.2 a good choice of PI parameters for a position controlled system with one PI control should be Kp= 0.8, Ki= 0.08. The resulting step response with these parameters can be seen in Figure 4.1. This shows that there is a difference between the simplified state space model and the more complex Simulink when using the same parameters. After some manual tuning a better result was achieved with the following values: Kp = 0.35, Ki = 0.035 and Kt= 0.0175. The results and a comparison between the Simulink based model and the state space based model can be seen in Figure 4.2. The rise time of the system is 0.077s and the steady state error is 0.11.

For the cascade control the same method is used, first the PI values attained for the State Space based model are used followed by further tuning if needed. Figure 4.3 shows the result when using the parameters used for the simplified State space based model. Further tuning of the Simulink based model was needed to increase the rise time and reduce the steady state error. A better result was attained using the following PI values:

Position controller: Kp = 60, Ki= 10 Speed controller: Kp = 0.2, Ki = 0 Current controller: Kp= 5, Ki= 0

(36)

0 0.5 1 1.5

−10 0 10 20 30 40 50 60 70 80

Time (Seconds)

Position (degrees)

Step Responses (Kp =0.8, Ki =0.08)

Simulated Result Reference

Figure 4.1. Step response from Sinulink using the State Space based parame- ters. Several different steps are used to illustrate the behavior of the system.

Figure 4.4 shows the resulting step responses using the tuned Simulink based model compared to the the State Space based model. The rise time is 0.065s and the steady state error with a reference at 80 is 0.23 − 0.25 degrees as seen in Figure 4.5.

4.2 Spring model and spring compensation

An effort was made to implement a model of the pre-tension of the spring which proved difficult due to how the Simulink model of the spring and motor was im- plemented. The motor block seen in Figure 3.5 can only be controlled by applying a positive torque, done by applying a voltage to the motor, and a negative torque represented by the load. The real throttle has a spring with a pre-tension, with a mechanical stop at 0 degrees. The spring will be applying the pre-tension force against the mechanical stop and the motor will need to overcome this force before the throttle will start to move. When the pre-tension of the spring is added to the model of the spring it will have a large impact on the behavior of the system.

Figure 4.6 and Figure 4.7 shows how the step response of both the single controlled and cascaded controlled systems change with the increased load. It shows that the cascaded controlled system is a lot better to handle the new load condition. The increased load from the spring will make the throttle turn faster in the direction of the spring load due to the motor torque and spring load working in the same direc- tion and against each other in the other direction. This leads to a slower response in one direction and a undershoot.

(37)

Manual tuning was attempted for the single PI controlled system but no satis- factory step response was achieved. If a high gain was chosen, rise time increased but over- and undershoots also increased. If a lower gain was chosen, the rise time became too high. Another option would be to try to implement a compensation for the spring load by adjusting the control signal if the spring load is known and the the relation between the control signal and torque is well known. Unfortunately there is no clear proportional relation between the control signal and the torque in this case which makes compensation hard to implement. A small compensation was tried by adding a small value ( 0.05 duty cycle) to the control signal which improved the response but still had large problems with undershoots as the spring would make the throttle turn fast even with no output from the controller. The best result achieved can be seen in Figure 4.8. For the cascade controlled system a compensator for the spring load is much simpler to implement since the current is one of the control signals and the relation between current and torque is known.

The compensation adjust the reference to the current control according to the spring load.

Currentref = Currentref +Tpre+ Kc∗ θ Kt

(4.1) Where Tpre is the pre-tension load, Kcis the spring constant, θ is the throttle angle and Ktis the torque constant. With this compensator in place the system becomes more linear and easier to control. With all of the load contribution from the spring removed the system needs to be tuned again as the previous tuned settings now has to high gain as there is less load. The new tuned PI parameters are:

Position controller: Kp = 47, Ki = 2 Speed controller: Kp = 0.2, Ki = 0 Current controller: Kp= 5, Ki= 0 The resulting step response can be seen in Figure 4.9.

4.3 Measurements

To be able to model the spring an estimation of the spring parameters had to be done. An experiment was done where a reference value for the throttle position was set and the current used to maintain that position was measured. By using the torque constant the torque needed for the positions is determined

Figure 4.10 show the measured torques and positions. The resulting values seem to be varying a lot which is most likely due to how the torque needed for a specific position is dependent on the position of the rotor magnets compared to the coils.

Ideally more data would have been gathered but due to time constraints it was decided to do an estimation of the current collected data. The resulting estimation

(38)

of the load from the spring becomes:

Springload = 0.0092 + 0.0007θ (4.2)

This gives us the following parameters, pretenstion of the spring is 92mN m and the spring constant Kc= 0.7mN m.

(39)

0 0.05 0.1 0.15 0.2 0.25 0.3 0

10 20 30 40 50 60 70 80

Time (Seconds)

Position (Degrees)

Step Response

Reference State Space Model Simulink Model

Figure 4.2. Step responses of the system based on Simulink and State Space.

(40)

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0

10 20 30 40 50 60 70 80 90 100

Time (Seconds)

Position (Degrees)

Step Response

Throttle Position Reference

Figure 4.3. Plot showing the result of the system based on the Simulink Model when several steps are made in the reference. One large and one small step is taken in both positive and negative direction to show how the system behaves both when increasing the angle as well as decreasing the angle. The system behaves well in both directions but a small steady state error is still visible for the largest positive step.

(41)

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0

10 20 30 40 50 60 70 80 90

100 Step Response

Time (Seconds)

Position (Degrees)

Reference Simulink Model State Space Model

Figure 4.4. Plot showing the behaviour of the system with a cascade controlled system

0.2 0.22 0.24 0.26 0.28 0.3

79 79.1 79.2 79.3 79.4 79.5 79.6 79.7 79.8 79.9 80 80.1 80.2 80.2

Time (Seconds)

Position (Degrees)

Step Response

Reference Simulink Model State Space Model

Figure 4.5. A closer look at the steady state error of the cascade controlled system.

(42)

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0

10 20 30 40 50 60 70

Time (Seconds)

Position (Degrees)

Step Response

Throttle Position Reference

Figure 4.6. Step response showing how the implementation of the pre-tension of the spring effects the previously tuned system controlled by a single PI control.

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7

0 10 20 30 40 50 60 70 80 90

100 Step Response

Time (Seconds)

Position (Degrees)

Throttle Position Reference

Figure 4.7. Step response showing how the implementation of the pre-tension of the spring effects the previously tuned system controlled by a cascade con- troller.

(43)

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0

10 20 30 40 50 60 70 80

Time (Seconds)

Position (Degrees)

Step Response

Throttle Position Reference

Figure 4.8. Several steps in the reference showing how the implementation of the pre-tension of the spring effects the newly tuned system controlled by a single PI control.

References

Related documents

I have investigated a method that makes it possible to compute the individual consumption of several internal system parts from a single current measurement point by combining

När jag var ute i skolorna på praktik verkade det som om många barn bara satt av tiden under matematiklektionerna. De förstod inte hur de skulle göra, de tyckte att det var

För den aktuella studien formulerades fem utmaningar. Alla fem utmaningar varierade i målbeteende och var placerade i prototypens sida för Utmaningar. Utmaningarna

För det tredje har det påståtts, att den syftar till att göra kritik till »vetenskap», ett angrepp som förefaller helt motsägas av den fjärde invändningen,

Samtidigt som man redan idag skickar mindre försändelser direkt till kund skulle även denna verksamhet kunna behållas för att täcka in leveranser som

Internal sovereignty means that the state is the highest authority within its territory, it is supreme, and a citizen cannot appeal against the state to any other authority

The ambiguous space for recognition of doctoral supervision in the fine and performing arts Åsa Lindberg-Sand, Henrik Frisk &amp; Karin Johansson, Lund University.. In 2010, a

Criterion 1, gives the performance of the forest authority in fulfillment of their tasks towards the private sector (e.g. weaker or “-“ in private forests); the