12
PROJECT 2 DESIGN LQR FULL STATE FEEDBACK CONTROLLER FOR HIGH BANDWIDTH ACTIVE SUSPENSION SYSTEM Name : IB.P.P.Mahartana NRP : 211100177

High Bandwidth suspention modelling and Design LQR Full state Feedback Controller

Embed Size (px)

Citation preview

Page 1: High Bandwidth suspention modelling and Design LQR Full state Feedback Controller

PROJECT 2

DESIGN LQR FULL STATE FEEDBACK CONTROLLER

FOR HIGH BANDWIDTH ACTIVE SUSPENSION

SYSTEM

Name : IB.P.P.Mahartana

NRP : 211100177

Page 2: High Bandwidth suspention modelling and Design LQR Full state Feedback Controller

Design LQR Full State Feedback Controller for High Bandwidth

Active Suspension System.

A. Mathematical Model

Conventional passive suspensions use a spring and damper between the car body and

wheel assembly. The spring-damper characteristics are selected to emphasize one of several

conflicting objectives such as passenger comfort, road handling, and suspension deflection.

Active suspensions allow the designer to balance these objectives using a feedback-controller

hydraulic actuator between the chassis and wheel assembly.

For this project we use a quarter-car model of the active suspension system shown in

figure 1.

Figure 1.1 Quarter-car mathematical model for active suspension system

The mass ms represent the car chassis (body) and the mass mu represents the wheel assembly.

The spring ks and damper cs represent the passive spring and shock absorber placed between

the car body and the wheel assembly. The spring kt and damper ct represent models

compressibility of the pneumatic tire. The variables zs, zu, and zr are the body travel, wheel

travel, and road disturbance, respectively. The force Fs applied between the body and the wheel

assembly is controlled by feedback and represents the active component of the suspension

system.

Page 3: High Bandwidth suspention modelling and Design LQR Full state Feedback Controller

B. Free Body Diagram

To be able determine how the system move, we need to draw the free body diagram, shown

in figure 1.2 which are contain all the force work in the system,

zs

zu

Figure 1.2 Free body diagram for the active suspension system

B.1 Equation of motion.

The Equation of motion represent the motions each body through their acceleration, velocity

and displacement, in terms of differential equation.

∑ 𝐹𝑠 = 0

𝑚𝑠�̈�𝑠 + 𝑘𝑠(𝑧𝑠 − 𝑧𝑢) + 𝑐𝑠(�̇�𝑠 − �̇�𝑢) − 𝐹𝑠 = 0

∑ 𝐹𝑢 = 0

𝑚𝑢�̈�𝑢 − 𝑘𝑠(𝑧𝑠 − 𝑧𝑢) − 𝑐𝑠(�̇�𝑠 − �̇�𝑢) + 𝑘𝑡(𝑧𝑢 − 𝑧𝑟)+ 𝑐𝑡(�̇�𝑢 − �̇�𝑟) + 𝐹𝑠 = 0

Define

𝑥1 = 𝑧𝑠 − 𝑧𝑢 𝑥2 = 𝑧𝑢 − 𝑧𝑟 𝑥3 = �̇�𝑠 𝑥4 = �̇�𝑢

𝜔 = 𝑧𝑟

ms 𝑚𝑠�̈�𝑠

𝑐𝑠(�̇�𝑠 − �̇�𝑢)

ms

𝑘𝑠(𝑧𝑠 − 𝑧𝑢) 𝐹𝑠

𝑘𝑡(𝑧𝑢 − 𝑧𝑟) 𝑐𝑡(�̇�𝑢 − �̇�𝑟)

Page 4: High Bandwidth suspention modelling and Design LQR Full state Feedback Controller

The State Matrices

The Output Matrices

𝐶𝑧 = [−𝑘𝑠/𝑚𝑠 0 −𝑐𝑠/𝑚𝑠

1 0 0 0 1 0

𝑐𝑠/𝑚𝑠

00

]

𝐷ℎ𝑢 = [1/𝑚𝑠

00

]

𝐷ℎ𝑤 = [000

]

C. Simulink Block Diagram

We will use conventional block diagram just for showing there is another way two describe

our system instead of state space block. The first open loop block diagram is shown in figure

1.4 below.

Figure 1.3 HBAS Open-loop system

Page 5: High Bandwidth suspention modelling and Design LQR Full state Feedback Controller

C.1 Block Diagram Associated with the state and output matrices.

Figure 1.4 Block diagram associated with the state and output matrices

D. Matlab source code.

In this part, we will loads all the parameters, so we can run the simulink block.

%% Load all Phsyical Parameters ms=300; % mu=40; ks=20000; cs=1000; kt=200000; ct=10;

%% Derive State & output matrices Ah=[0 0 1 -1; 0 0 0 1; -ks/ms 0 -cs/ms cs/ms; ks/mu -kt/mu cs/mu -

(cs+ct)/mu]; Bhw=[0; -1; 0; ct/mu]; Bhu=[0; 0; 1/ms; -1/mu]; Cz=[-ks/ms 0 -cs/ms cs/ms; 1 0 0 0; 0 1 0 0] Dhu=[1/ms; 0; 0] Dhw=[0; 0; 0]

%% Simulation control dt=0.001; t = 0:dt:3; Am=0.5; f=2; T=1/f; for ki=1:1:length(t); tdata=t(ki); if tdata>T; ni(ki)=0; else

Page 6: High Bandwidth suspention modelling and Design LQR Full state Feedback Controller

ni(ki)=(Am)*(sin((2*pi*f)*tdata)); end end in=transpose([t; ni]); [t,x]=sim('HBAS_LQR',t);

%% plotting open loop respon figure(1) plot(t,x3ddot(:,1),'r',t,x3ddot(:,2),'g',t,x3ddot(:,3),'b','linewidth',3) legend ('Body Acceleration','Body travel','Wheel deflection');

% Obtain magnificion axes ('position',[0.25 0.25 0.5 0.5]); box on h =x3ddot(:,2); g = x3ddot(:,3); my_index = 0 & 3; plot(t,h,'g', t,g,'b','linewidth',3); axis tight grid on

E. Open Loop system Plot Result .

Figure 1.5 Open loop response .

As shown above, the open loop system has large body acceleration while the suspension has

oscillation amplitude range about -0.05 m to 0.05 . From this result , we need to add controller

which provides force to actuator to maintain the balance of passenger comfort due to body

acceleration, body travel and suspension deflection.

Page 7: High Bandwidth suspention modelling and Design LQR Full state Feedback Controller

F. LQR Fullstate Feedback Controller .

F.1 Block Diagram associated

Figure 1.6 Associated block diagram for close loop system.

F.2 Subsystem blocks diagram

Figure 1.7 Subsystem.

F.3 Matlab source code.

We will vary the value of state cost by changing the weight of Q, also we will vary the physical

parameter of the system to see how the system behave when all parameters had changed. The

varying parameters listed in table 1.1.

Page 8: High Bandwidth suspention modelling and Design LQR Full state Feedback Controller

Table 1.1 Vary weight of Q

Weight of Q

Q11 Q21 Q31

1 5000 1000

800 60000 18000

4000 100000 80000

12000 800000 120000

For varying the phsysical parameter we will improve each value by 10% change .

%% Load all Phsyical Parameters ms=300; % up to 10 mu=40; % up to 10 ks=20000; % up to 10 cs=1000; % up to 10 kt=200000; % up to 10 ct=10; % up to 10

%% State & output matrices Ah=[0 0 1 -1; 0 0 0 1; -ks/ms 0 -cs/ms cs/ms; ks/mu -kt/mu cs/mu -

(cs+ct)/mu]; Bhw=[0; -1; 0; ct/mu]; Bhu=[0; 0; 1/ms; -1/mu]; Cz=[-ks/ms 0 -cs/ms cs/ms; 1 0 0 0; 0 1 0 0] Dhu=[1/ms; 0; 0] Dhw=[0; 0; 0]

%% Obtain LQR Fullstate Feedback Gain q1l=1; % vary based on tabel 1.1 q2l=5000; % vary based on tabel 1.1 q3l=1000; % vary based on tabel 1.1 Ql=diag([q1l q2l q3l]); Qlq=Cz'*Ql*Cz Rl=Dhu'*Ql*Dhu N=Cz'*Ql*Dhu [Klq,S,e] = lqr(Ah,Bhu,Qlq,Rl,N); Klqr=-Klq

%% Simulation control dt=0.001; t = 0:dt:3; Am=0.5; f=2; T=1/f; for ki=1:1:length(t); tdata=t(ki); if tdata>T; ni(ki)=0; else ni(ki)=(Am)*(sin((2*pi*f)*tdata)); end end in=transpose([t; ni]); [t,x]=sim('HBAS_LQR',t);

%% plotting closed loop respon figure(1) %changes the outputmatrix to closedloop plot(t,x3ddot(:,1),'b',t,x2(:,1),'r','linewidth',3)

Page 9: High Bandwidth suspention modelling and Design LQR Full state Feedback Controller

xlabel('Time

[s]','FontSize',20,'Fontname','SansSerif','Interpreter','latex') ylabel('Amplitude

$\ddot{z}_{s}$','FontSize',20,'Fontname','SansSerif','Interpreter','latex') set(gca,'FontSize',18, 'Fontname','Times New Roman') title ('Body Acceleration'); grid on hold on

figure(2) %changes the outputmatrix to closedloop plot(t,x3ddot(:,2),'k''linewidth',3) xlabel('Time

[s]','FontSize',20,'Fontname','SansSerif','Interpreter','latex') ylabel('Amplitude ${z}_{s}-

{z}_{u}$','FontSize',20,'Fontname','SansSerif','Interpreter','latex') set(gca,'FontSize',18, 'Fontname','Times New Roman') title ('Suspension Travel'); grid on hold on

figure(3) %changes the outputmatrix to closedloop plot(t,x3ddot(:,3),'k', 'linewidth',3) xlabel('Time

[s]','FontSize',20,'Fontname','SansSerif','Interpreter','latex') ylabel('Amplitude ${z}_{u}-

{z}_{r}$','FontSize',20,'Fontname','SansSerif','Interpreter','latex') set(gca,'FontSize',18, 'Fontname','Times New Roman') title ('Wheel travel'); grid on hold on

F.4 Plotting Result

Figure 1.8 Body Acceleration Response due to vary weighting parameter

Page 10: High Bandwidth suspention modelling and Design LQR Full state Feedback Controller

Figure 1.9 Suspension Travel Response due to vary weighting parameter

Figure 2.0 Wheel Travel Response due to vary weighting parameter

Page 11: High Bandwidth suspention modelling and Design LQR Full state Feedback Controller

G. Analysis of changing the physical parameters and weighting matrices Q in LQR

Controller

The design matrices Q and R hold the penalties on the deviations of state

variables from their setpoint and the control actions, respectively. When element of Q

is increased, therefore the cost function increases the penalty associated with any

deviations from the desired setpoint of that state variable, and thus the specific control

gain will be large. When the values of the R matrix are increased, a large penalty is

applied to the aggressiveness of the control action, and the control gains are uniformly

decreased. From figure 1.8 until figure 2.0 we’d vary the diagonal element of Q matrices

into 3 step first we changed the q11 which is represented the body acceleration and then

q21 represented the suspension travel and then the last is changed 31. Every changed

of the Q element will change the gain K value. we’ve increased the value of each

weighting parameter and the response shown in figure 1.8 until 2.0. For body

acceleration the more value was given, the small body acceleration we’ve got so far.

Then if we take a look at suspension travel, the reason show large overshoot in negative

direction and then the system started to oscillate, the same behavior we’ve got for the

wheel travel, since we had added more weighting value, the system started to have more

oscillated.

G.1 Increased physical parameters up to 10%

Changing the physical parameter up until 10% won't change the system response

significantly as shown in figure 2.1 until 2.3.

Figure 2.1 Body Acceleration Response due to vary weighting parameter

Page 12: High Bandwidth suspention modelling and Design LQR Full state Feedback Controller

Figure 2.2 Suspension Travel Responses due to vary weighting parameter

Figure 2.3 Wheel Travel Responses due to vary weighting parameter

From figure 2.1 until 2.3 as we can see all the state responded are still same. These meant that

our LQR controller won't worked anymore against the physical parameter changed. In

practiced we can see the physical car parameters always change, like the total mass of the car

will change because the presented of the passenger's load.