diff_months: 11

Model Predictive Control for Quarter Car Suspension Model

Download Solution Now
Added on: 2024-11-24 02:30:45
Order Code: SA Student Vinay Engineering Assignment(7_23_34839_155)
Question Task Id: 492137

Model Predictive Control for Quarter Car Suspension Model

Abstract

This project aims to develop a mathematical model of a quarter car passive suspension system with input control and disturbance signal. The state space model of the suspension system is derived and a controlling strategy is created to minimize the displacement in the system. The controller is tuned to achieve a comfortable response for the car during disturbances such as bumps in the road. Suspension systems are essential to reduce vibrations and shocks when driving on uneven roadways, and high-quality suspension systems are required for this purpose. Complete state feedback MPC and Observer-based MPC are two control methods that can improve the system's performance over a limited time frame. To simulate and create the MPC Controller, a MATLAB script is used. Based on the findings, the controller is successfully designed and desired results are achieved.

Introduction

In this task we will work on the mathematical model of the quarter car passive suspension system with input control and disturbance signal. We first derive the state space model of the suspension system. We will create the controlling strategy to minimize the displacement in the system. We will tune the controller to get the good comfortable response for the car during the disturbance such as bumps in road. Vehicle suspension systems differ depending on the manufacturer, giving rise to a wide variety of models. The main goal of a suspension system is to assure safety, regardless of the design strategy selected. Uneven roadways produce oscillations in a vehicle's wheels, and these oscillations are then transferred to the axles. In order to link the axles to the automobile body and reduce vibrations and shocks when driving, the suspension system is essential. High-quality suspension systems are required for this.

A high-quality suspension system must interact with uneven road conditions properly in order to guarantee optimum performance and a comfortable ride. The car shouldn't oscillate excessively when driving over uneven ground, and if it does, it needs to be swiftly stopped. The suspension system of a vehicle is a complicated task that requires several calculations based on the planned application. There are various well-known types of suspension systems, including passive, semi-active, active, and hybrid systems. Among the common characteristics that set these systems apart are the amount of energy needed and the characteristic frequency of the actuator. The most common form is passive systems.

The two degrees of freedom model, often known as the quarter car model, is the simplest vehicle model used for assessing discomfort brought on by vibration. When quantifying discomfort, this model only takes vertical movement into account. The stiffness of the tire serves as the model's representation of it, together with the mass of the wheel and its related components, the spring and damper that act as the suspension system, and the mass of the car's body. We will use MATLAB to design and implement the MPC controller with and without observer.

Mathematical Modelling

A simplified model for examining how a vehicle's suspension system behaves is the quarter car suspension system. As a result of simply modeling the front or rear suspension, the system is known as a "quarter car system." The suspension system's performance in terms of ride comfort and stability are assessed using the model. In the quarter car suspension system, the vehicle's body is represented by a mass, while the wheel and tire are represented by a spring and a damper. A spring and a damper normally make up the suspension system, which absorbs and dissipates road energy simultaneously. The model disregards lateral and longitudinal motions and only takes vertical motion into account. The quarter car passive suspension model is shown below

The state space model is given as

x=Ax+Bu+Hwy=Cx+Du+EwA=0100-ksms-bmsksmsbms0001ksmubmu-ks+kumu-bmuB=000kumuC=-ksms-bmsksms bmsksmubmu-ks+kumu-bmuD=00H=000kumuE=00x=xsxsxuxuThe parameters of the above system are given as

Parameters Values

ms100kg

mu10kg

ks5000 N/m

ku20000 N/m

b100 Ns/m

Open Loop System

In this part we will use the state space matrix of open loop model, we will check the stability, stabilisability and detectability of the system. And choose the reasonable sampling time and predictor for the system and create the discrete system from the system. We have taken 0.001s sampling time and 10 predictor horizon. The capacity to create a feedback control law that can stabilize the system is referred to as stabilizability. When all uncontrolled modes are stable, or when all eigenvalues of the uncontrollable subsystem have negative real parts, the system is said to be stabilizable. The term "detectability" describes the capacity to infer system states from measurements of the output. If all unobservable modes are stable, or if all eigenvalues of the unobservable subsystem have negative real parts, then the system is detectable. The code for the following part is shown below.

Open Loop Response

% Clear Data and Figuresclcclearclose all% Define Parameters% Massms=100;mu=10;% Stiffnessks=5000;ku=20000;% Damping coefficientb=100;% Define A MatrixA=[0 1 0 0; -ks/ms -b/ms ks/ms b/ms; 0 0 0 1; ks/mu b/mu -(ks+ku)/mu -b/mu];% Define B MatrixB=[0;0;0;ku/mu];% Define C MatrixC=[-ks/ms -b/ms ks/ms b/ms; ks/mu b/mu -(ks+ku)/mu -b/mu];% Define D MatrixD=[0;0];% Define HH=[0;0;0;ku/mu];% Define EE=[0;0];% Create State Space Modelsys=ss(A,[B,H],C,[D,E]);% System Namessys.InputName={'u','d'};sys.StateName={'xs','dxs','xu','dxu'};sys.OutputName={'xs','xu'};% Time vectort=0:0.001:10;% Input Signalu=zeros(2,numel(t));u(1,:)=0.01;u(2,5000:end)=0.001;% Simulate Model[y,t,x] =lsim(sys,u,t);% Plot Simualtionfigureplot(t,x(:,[1]))grid onxlabel('Time (s)')ylabel('Displacement')legend('x_s')title('Displacement vs. Time')% Check System Stabilityif isstable(sys)==1 fprintf('System is Stablen')else fprintf('System is Unstablen')end% Check Stabilisabilityif rank(ctrb(A,B))==4 fprintf('System is Stabilisabilityn')else fprintf('System is Not Stabilisabilityn')end% Check Detectabilityif rank(obsv(A,C)) fprintf('System is Detectabilityn')else fprintf('System is Not Detectabilityn')end% Bode Response for State Space Modelfigurebode(sys)Ts=0.001;

System is StableSystem is StabilisabilitySystem is Detectability

Full state feedback MPC system with Constraints

Full state feedback Model Predictive Control is a control technique that uses a mathematical model of a system to predict its future behaviour and optimize its control inputs over a finite time horizon. The full state feedback aspect means that the entire state of the system is measured and used in the control algorithm. When constraints are introduced to the system, Full state feedback MPC is often used to ensure that the system operates within these limits. Constraints could be limits on the control inputs or limits on the system outputs. These constraints can be imposed by specifying lower and upper bounds on the input and output variables. The MATLAB code with results is shown below.

Quarter Car Passive Suspension Model (Constraints, without Observer)

% Clear Data and Figuresclcclearclose all% Define Parameters% Massms=100;mu=10;% Stiffnessks=5000;ku=20000;% Damping coefficientb=100;% Define A MatrixA=[0 1 0 0; -ks/ms -b/ms ks/ms b/ms; 0 0 0 1; ks/mu b/mu -(ks+ku)/mu -b/mu];% Define B MatrixB=[0;0;0;ku/mu];% Define C MatrixC=[-ks/ms -b/ms ks/ms b/ms; ks/mu b/mu -(ks+ku)/mu -b/mu];% Define D MatrixD=[0;0];% Define HH=[0;0;0;ku/mu];% Define EE=[0;0];% Create State Space Modelsys=ss(A,[B,H],C,[D,E]);% System Namessys.InputName={'u','d'};sys.StateName={'xs','dxs','xu','dxu'};sys.OutputName={'xs','xu'};% Time vectorTs=0.001;t=0:Ts:10;% Input Signalu=zeros(2,numel(t));u(1,:)=0.01;u(2,5000:end)=0.001;% State Feedback Controllerp=[-2820,-3.2-7.7i,-3.2+7.7i,-1.3];K = place(A,[B,H],p);Aa=A-[B,H]*K;sys=ss(Aa,[B,H],C,[D,E]);% create MPC controller object with sample timesys=c2d(sys,Ts);mpc1 = mpc(sys,Ts);% specify prediction horizonmpc1.PredictionHorizon = 10;% specify control horizonmpc1.ControlHorizon = 2;% specify nominal values for inputs and outputsmpc1.Model.Nominal.U = [0;0];mpc1.Model.Nominal.Y = [0;0];% specify constraints for MV and MV Ratempc1.MV(1).Min = -10;mpc1.MV(1).Max = 10;mpc1.MV(1).RateMin = -0.1;mpc1.MV(1).RateMax = 0.1;mpc1.MV(2).Min = -10;mpc1.MV(2).Max = 10;mpc1.MV(2).RateMin = -0.1;mpc1.MV(2).RateMax = 0.1;% specify constraints for OVmpc1.OV(1).Min = -0.00001;mpc1.OV(1).Max = 0.00001;mpc1.OV(2).Min = -0.00001;mpc1.OV(2).Max = 0.00001;% specify overall adjustment factor applied to weightsbeta = 0.9;% specify weightsmpc1.Weights.MV = [0 0]*beta;mpc1.Weights.MVRate = [0.1 0.1]/beta;mpc1.Weights.OV = [1 1]*beta;mpc1.Weights.ECR = 100000;% specify overall adjustment factor applied to estimation model gainsalpha = 0.9;% adjust default output disturbance model gainssetoutdist(mpc1, 'model', getoutdist(mpc1)*alpha);% adjust default measurement noise model gainsmpc1.Model.Noise = mpc1.Model.Noise/alpha;% specify simulation optionsoptions = mpcsimopt();options.RefLookAhead = 'off';options.MDLookAhead = 'off';options.Constraints = 'on';options.OpenLoop = 'off';% run simulationout=sim(mpc1,10001,u',options);% Plot Responsefigureplot(t,out(:,1))grid onxlabel('Time (s)')ylabel('Displacement')legend('x_s')title('Displacement vs. Time')

Observer based MPC with constraints

In order to increase control performance and stability, the control approach known as Observer-based Model Predictive Control combines the ideas of MPC with observer theory. The state variables of the system are estimated by an observer and used by the MPC algorithm to forecast the system's behaviour and optimize control inputs. A mathematical model of the system and an observer that makes estimates of the system's state variables must first be created in order to execute observer-based MPC with restrictions. To estimate the unmeasured states of the system, the observer uses measurements of the system's inputs and outputs that are currently accessible. The MPC algorithm then makes use of the predicted state variables to forecast the system's future behaviour and optimize the control inputs while taking the limitations into consideration. The MATLAB code with results is shown below.

Quarter Car Passive Suspension Model (Constraints, with Observer)

% Clear Data and Figuresclcclearclose all% Define Parameters% Massms=100;mu=10;% Stiffnessks=5000;ku=20000;% Damping coefficientb=100;% Define A MatrixA=[0 1 0 0; -ks/ms -b/ms ks/ms b/ms; 0 0 0 1; ks/mu b/mu -(ks+ku)/mu -b/mu];% Define B MatrixB=[0;0;0;ku/mu];% Define C MatrixC=[-ks/ms -b/ms ks/ms b/ms; ks/mu b/mu -(ks+ku)/mu -b/mu];% Define D MatrixD=[0;0];% Define HH=[0;0;0;ku/mu];% Define EE=[0;0];% Create State Space Modelsys=ss(A,[B,H],C,[D,E]);% System Namessys.InputName={'u','d'};sys.StateName={'xs','dxs','xu','dxu'};sys.OutputName={'xs','xu'};% Time vectorTs=0.001;t=0:Ts:10;% Input Signalu=zeros(2,numel(t));u(1,:)=0.01;u(2,5000:end)=0.001;% State Feedback Controllerp=[-2820,-3.2-7.7i,-3.2+7.7i,-1.3];K = place(A,[B,H],p);Aa=A-[B,H]*K;sys=ss(Aa,[B,H],C,[D,E]);% create MPC controller object with sample timesys=c2d(sys,Ts);mpc1 = mpc(sys,Ts);% specify prediction horizonmpc1.PredictionHorizon = 10;% specify control horizonmpc1.ControlHorizon = 2;% specify nominal values for inputs and outputsmpc1.Model.Nominal.U = [0;0];mpc1.Model.Nominal.Y = [0;0];% specify constraints for MV and MV Ratempc1.MV(1).Min = -10;mpc1.MV(1).Max = 10;mpc1.MV(1).RateMin = -0.1;mpc1.MV(1).RateMax = 0.1;mpc1.MV(2).Min = -10;mpc1.MV(2).Max = 10;mpc1.MV(2).RateMin = -0.1;mpc1.MV(2).RateMax = 0.1;% specify constraints for OVmpc1.OV(1).Min = -0.00001;mpc1.OV(1).Max = 0.00001;mpc1.OV(2).Min = -0.00001;mpc1.OV(2).Max = 0.00001;% specify overall adjustment factor applied to weightsbeta = 0.9;% specify weightsmpc1.Weights.MV = [0 0]*beta;mpc1.Weights.MVRate = [0.1 0.1]/beta;mpc1.Weights.OV = [1 1]*beta;mpc1.Weights.ECR = 100000;% Specify Observer[~,M,A1,Cm1] = getEstimator(mpc1);new_poles = [.1 .2 .5 .7 .9 0.95];L = place(A1',Cm1',new_poles)';setEstimator(mpc1,L,M)% specify overall adjustment factor applied to estimation model gainsalpha = 10;% adjust default output disturbance model gainssetoutdist(mpc1, 'model', getoutdist(mpc1)*alpha);% adjust default measurement noise model gainsmpc1.Model.Noise = mpc1.Model.Noise/alpha;% specify simulation optionsoptions = mpcsimopt();options.RefLookAhead = 'off';options.MDLookAhead = 'off';options.Constraints = 'on';options.OpenLoop = 'off';% run simulationout=sim(mpc1,10001,u',options);% Plot Responsefigureplot(t,out(:,1))grid onxlabel('Time (s)')ylabel('Displacement')legend('x_s')title('Displacement vs. Time')

Full state feedback control without constraint

In order to stabilize a dynamic system, full state feedback control measures the system's whole state and uses this data to generate control inputs that guide the system to a desired state. This method may be used to systems without any restrictions on the control inputs or outputs. Full state feedback control without restrictions bases all control inputs solely on the system's desired state and current state. State-space procedures, which entail creating a mathematical model of the system and a set of equations that characterize the system's behaviour, are often used to build the control rule. The MATLAB code and results is shown below.

Quarter Car Passive Suspension Model (Without Constraints, without Observer)

% Clear Data and Figuresclcclearclose all% Define Parameters% Massms=100;mu=10;% Stiffnessks=5000;ku=20000;% Damping coefficientb=100;% Define A MatrixA=[0 1 0 0; -ks/ms -b/ms ks/ms b/ms; 0 0 0 1; ks/mu b/mu -(ks+ku)/mu -b/mu];% Define B MatrixB=[0;0;0;ku/mu];% Define C MatrixC=[-ks/ms -b/ms ks/ms b/ms; ks/mu b/mu -(ks+ku)/mu -b/mu];% Define D MatrixD=[0;0];% Define HH=[0;0;0;ku/mu];% Define EE=[0;0];% Create State Space Modelsys=ss(A,[B,H],C,[D,E]);% System Namessys.InputName={'u','d'};sys.StateName={'xs','dxs','xu','dxu'};sys.OutputName={'xs','xu'};% Time vectorTs=0.001;t=0:Ts:10;% Input Signalu=zeros(2,numel(t));u(1,:)=0.01;u(2,5000:end)=0.001;% State Feedback Controllerp=[-2820,-3.2-7.7i,-3.2+7.7i,-1.3];K = place(A,[B,H],p);Aa=A-[B,H]*K;sys=ss(Aa,[B,H],C,[D,E]);% create MPC controller object with sample timesys=c2d(sys,Ts);mpc1 = mpc(sys,Ts);% specify prediction horizonmpc1.PredictionHorizon = 10;% specify control horizonmpc1.ControlHorizon = 2;% specify nominal values for inputs and outputsmpc1.Model.Nominal.U = [0;0];mpc1.Model.Nominal.Y = [0;0];% specify constraints for MV and MV Ratempc1.MV(1).Min = -10;mpc1.MV(1).Max = 10;mpc1.MV(1).RateMin = -0.1;mpc1.MV(1).RateMax = 0.1;mpc1.MV(2).Min = -10;mpc1.MV(2).Max = 10;mpc1.MV(2).RateMin = -0.1;mpc1.MV(2).RateMax = 0.1;% specify constraints for OVmpc1.OV(1).Min = -1;mpc1.OV(1).Max = 1;mpc1.OV(2).Min = -1;mpc1.OV(2).Max = 1;% specify overall adjustment factor applied to weightsbeta = 0.9;% specify weightsmpc1.Weights.MV = [0 0]*beta;mpc1.Weights.MVRate = [0.1 0.1]/beta;mpc1.Weights.OV = [1 1]*beta;mpc1.Weights.ECR = 100000;% Specify Observer% specify overall adjustment factor applied to estimation model gainsalpha = 0.9;% adjust default output disturbance model gainssetoutdist(mpc1, 'model', getoutdist(mpc1)*alpha);% adjust default measurement noise model gainsmpc1.Model.Noise = mpc1.Model.Noise/alpha;% specify simulation optionsoptions = mpcsimopt();options.RefLookAhead = 'off';options.MDLookAhead = 'off';options.Constraints = 'off';options.OpenLoop = 'off';% run simulationout=sim(mpc1,10001,u',options);% Plot Responsefigureplot(t,out(:,1))grid onxlabel('Time (s)')ylabel('Displacement')legend('x_s')title('Displacement vs. Time')

Observer based MPC without constraints

In systems where exact state measurements are unavailable or challenging to get, observer-based MPC without restrictions is frequently utilized. In this instance, an observer is employed to calculate the state variables of the system using measurements of its inputs and outputs that are now accessible. Following that, the MPC algorithm uses the estimated state variables to forecast the system's future behaviour and optimize the control inputs. Due to the observer-based MPC algorithm's lack of constraints, the control inputs are simply decided by the system's present state and the intended state, with no restrictions on the control inputs or outputs. The MATLAB code with results is shown below.

Quarter Car Passive Suspension Model (Without Constraints, with Observer)

% Clear Data and Figuresclcclearclose all% Define Parameters% Massms=100;mu=10;% Stiffnessks=5000;ku=20000;% Damping coefficientb=100;% Define A MatrixA=[0 1 0 0; -ks/ms -b/ms ks/ms b/ms; 0 0 0 1; ks/mu b/mu -(ks+ku)/mu -b/mu];% Define B MatrixB=[0;0;0;ku/mu];% Define C MatrixC=[-ks/ms -b/ms ks/ms b/ms; ks/mu b/mu -(ks+ku)/mu -b/mu];% Define D MatrixD=[0;0];% Define HH=[0;0;0;ku/mu];% Define EE=[0;0];% Create State Space Modelsys=ss(A,[B,H],C,[D,E]);% System Namessys.InputName={'u','d'};sys.StateName={'xs','dxs','xu','dxu'};sys.OutputName={'xs','xu'};% Time vectorTs=0.001;t=0:Ts:10;% Input Signalu=zeros(2,numel(t));u(1,:)=0.01;u(2,5000:end)=0.001;% State Feedback Controllerp=[-2820,-3.2-7.7i,-3.2+7.7i,-1.3];K = place(A,[B,H],p);Aa=A-[B,H]*K;sys=ss(Aa,[B,H],C,[D,E]);% create MPC controller object with sample timesys=c2d(sys,Ts);mpc1 = mpc(sys,Ts);% specify prediction horizonmpc1.PredictionHorizon = 10;% specify control horizonmpc1.ControlHorizon = 2;% specify nominal values for inputs and outputsmpc1.Model.Nominal.U = [0;0];mpc1.Model.Nominal.Y = [0;0];% specify constraints for MV and MV Ratempc1.MV(1).Min = -10;mpc1.MV(1).Max = 10;mpc1.MV(1).RateMin = -0.1;mpc1.MV(1).RateMax = 0.1;mpc1.MV(2).Min = -10;mpc1.MV(2).Max = 10;mpc1.MV(2).RateMin = -0.1;mpc1.MV(2).RateMax = 0.1;% specify constraints for OVmpc1.OV(1).Min = -1;mpc1.OV(1).Max = 1;mpc1.OV(2).Min = -1;mpc1.OV(2).Max = 1;% specify overall adjustment factor applied to weightsbeta = 0.9;% specify weightsmpc1.Weights.MV = [0 0]*beta;mpc1.Weights.MVRate = [0.1 0.1]/beta;mpc1.Weights.OV = [1 1]*beta;mpc1.Weights.ECR = 100000;% Specify Observer[~,M,A1,Cm1] = getEstimator(mpc1);new_poles = [.1 .2 .5 .7 .9 .95];L = place(A1',Cm1',new_poles)';setEstimator(mpc1,L,M)% specify overall adjustment factor applied to estimation model gainsalpha = 0.9;% adjust default output disturbance model gainssetoutdist(mpc1, 'model', getoutdist(mpc1)*alpha);% adjust default measurement noise model gainsmpc1.Model.Noise = mpc1.Model.Noise/alpha;% specify simulation optionsoptions = mpcsimopt();options.RefLookAhead = 'off';options.MDLookAhead = 'off';options.Constraints = 'off';options.OpenLoop = 'off';% run simulationout=sim(mpc1,10001,u',options);% Plot Responsefigureplot(t,out(:,1))grid onxlabel('Time (s)')ylabel('Displacement')legend('x_s')title('Displacement vs. Time')

LQR Controller design

Quarter Car Passive Suspension Model (LQR)

% Clear Data and Figuresclcclearclose all% Define Parameters% Massms=100;mu=10;% Stiffnessks=5000;ku=20000;% Damping coefficientb=100;% Define A MatrixA=[0 1 0 0; -ks/ms -b/ms ks/ms b/ms; 0 0 0 1; ks/mu b/mu -(ks+ku)/mu -b/mu];% Define B MatrixB=[0;0;0;ku/mu];% Define C MatrixC=[-ks/ms -b/ms ks/ms b/ms; ks/mu b/mu -(ks+ku)/mu -b/mu];% Define D MatrixD=[0;0];% Define HH=[0;0;0;ku/mu];% Define EE=[0;0];% Compute GainsQ = C'*C;R = 1;K = lqr(A,[B,H],Q,R);% Recreate State Feedback MatrixAc = (A-[B,H]*K);Bc = [B,H];Cc = C;Dc = [D,E];% State Space Modelsys_cl = ss(Ac,Bc,Cc,Dc);% Create Time vectort = 0:0.001:5;% Input Signalu=zeros(2,numel(t));u(1,:)=0.01;u(2,5000:end)=0.001;% Simulate Model[y,t,x]=lsim(sys_cl,u,t);% Plot Responsefigureplot(t,y(:,1))grid onxlabel('Time (s)')ylabel('Displacement')legend('x_s')title('Displacement vs. Time')

Conclusion

Complete state feedback MPC and Observer-based MPC are two control methods that can enhance a system's performance over a limited time frame. Complete state feedback. The best control inputs are determined by MPC using a mathematical model of the system and measurements of the complete system state. Observer-based MPC uses an observer to estimate the system's state, which is then used to forecast the system's future behaviour and optimize control inputs. To do the simulation and create the MPC Controller, we created a MATLAB script. Therefore, based on the findings above, we can say that we were successful in designing the controller and achieving the desired results.

Reference

Florin, A., Ioan-Cozmin, M. R., & Liliana, P. (2013). Passive suspension modeling using MATLAB, quarter-car model, input signal step type.New technologies and products in machine manufacturing technologies, 258-263.

Krtolica, R., & Hrovat, D. (1992). Optimal active suspension control based on a half-car model: An analytical solution.IEEE Transactions on Automatic Control,37(4), 528-532.

Trkay, S., & Akay, H. (2005). A study of random vibration characteristics of the quarter-car model.Journal of sound and vibration,282(1-2), 111-124.

Krtolica, R., & Hrovat, D. (1990, December). Optimal active suspension control based on a half-car model. In29th IEEE Conference on Decision and Control(pp. 2238-2243). IEEE.

  • Uploaded By : Pooja Dhaka
  • Posted on : November 24th, 2024
  • Downloads : 0
  • Views : 168

Download Solution Now

Can't find what you're looking for?

Whatsapp Tap to ChatGet instant assistance

Choose a Plan

Premium

80 USD
  • All in Gold, plus:
  • 30-minute live one-to-one session with an expert
    • Understanding Marking Rubric
    • Understanding task requirements
    • Structuring & Formatting
    • Referencing & Citing
Most
Popular

Gold

30 50 USD
  • Get the Full Used Solution
    (Solution is already submitted and 100% plagiarised.
    Can only be used for reference purposes)
Save 33%

Silver

20 USD
  • Journals
  • Peer-Reviewed Articles
  • Books
  • Various other Data Sources – ProQuest, Informit, Scopus, Academic Search Complete, EBSCO, Exerpta Medica Database, and more