SlideShare a Scribd company logo
1 of 5
Suspension: System Modeling
Key MATLAB commands used in this tutorial are: ss , step
Contents
 Physical setup
 System parameters
 Equations of motion
 Transfer function models
 Entering equations in MATLAB
Physical setup
Designing an automotive suspension system is an interesting and challenging control problem.When the suspension
system is designed, a 1/4 model (one of the four wheels) is used to simplify the problem to a 1D multiple spring -
damper system.A diagram ofthis system is shown below. This model is for an active suspension system where an
actuator is included that is able to generate the control force U to control the motion of the bus body.
System parameters
(M1) 1/4 bus body mass 2500 kg
(M2) suspension mass 320 kg
(K1) spring constant of suspension system 80,000 N/m
(K2) spring constant of wheel and tire 500,000 N/m
(b1) damping constant of suspension system 350 N.s/m
(b2) damping constant of wheel and tire 15,020 N.s/m
(U) control force
Equations of motion
From the picture above and Newton's law, we can obtain the dynamic equations as the following:
(1)
(2)
Transfer function models
Assume that all of the initial conditions are zero, so that these equations represent the situation where the vehicle
wheel goes up a bump. The dynamic equations above can be expressed in the form of transfer functions by taking
the Laplace Transform.The specific derivation from the above equations to the transfer functions G1(s) and G2(s) is
shown below where each transfer function has an output of, X1-X2, and inputs of U and W, respectively.
(3)
(4)
(5)
(6)
(7)
or
(8)
Find the inverse of matrix A and then multiply with inputs U(s)and W(s) on the righthand side as follows:
(9)
(10)
When we want to consider the control input U(s) only, we set W(s) = 0. Thus we get the transfer function G1(s) as in
the following:
(11)
When we want to consider the disturbance input W(s) only, we set U(s) = 0. Thus we get the transfer function G2(s)
as in the following:
(12)
Entering equations in MATLAB
We can generate the above transfer function models in MATLAB by entering the following commands in the MATLAB
command window.
M1 = 2500;
M2 = 320;
K1 = 80000;
K2 = 500000;
b1 = 350;
b2 = 15020;
s = tf('s');
G1 = ((M1+M2)*s^2+b2*s+K2)/((M1*s^2+b1*s+K1)*(M2*s^2+(b1+b2)*s+(K1+K2))-
(b1*s+K1)*(b1*s+K1));
G2 = (-M1*b2*s^3-M1*K2*s^2)/((M1*s^2+b1*s+K1)*(M2*s^2+(b1+b2)*s+(K1+K2))-
(b1*s+K1)*(b1*s+K1));
Suspension: State-Space Controller Design
Key MATLAB commands used in this tutorial are: ss , step
Contents
 Designing the full state-feedback controller
 Plotting the closed-loop response
From the main problem, the dynamic equations in state-space form are the following where Y1 = X1 - X2.
(1)
(2)
(3)
For the original problem and the derivation of the above equations and schematic, please refer to the Suspension:
System Modeling page.
We want to design a feedback controller so that when the road disturbance (W) is simulated by a unit step input, the
output (X1-X2) has a settling time less than 5 seconds and an overshoot less than 5%. For example, when the bus
runs onto a 10 cm high step, the bus body will oscillate within a range of +/- 5 mm and will stop oscillating within 5
seconds.
The system model can be represented in MATLAB by creating a new m-file and entering the following commands
(refer to main problem for the details of getting those commands). We need to define the A, B, C, D matrices by
entering the following into the m-file:
m1 = 2500;
m2 = 320;
k1 = 80000;
k2 = 500000;
b1 = 350;
b2 = 15020;
A=[0 1 0 0
-(b1*b2)/(m1*m2) 0 ((b1/m1)*((b1/m1)+(b1/m2)+(b2/m2)))-(k1/m1) -(b1/m1)
b2/m2 0 -((b1/m1)+(b1/m2)+(b2/m2)) 1
k2/m2 0 -((k1/m1)+(k1/m2)+(k2/m2)) 0];
B=[0 0
1/m1 (b1*b2)/(m1*m2)
0 -(b2/m2)
(1/m1)+(1/m2) -(k2/m2)];
C=[0 0 1 0];
D=[0 0];
sys=ss(A,B,C,D);
Designing the full state-feedback controller
First, let's design a full state-feedback controller for the system.Assuming for now that all the states can be measured
(this assumption is probably not true but is sufficient for this problem), the schematic of the system is shown below.
The characteristic polynomial for this closed-loop system is the determinant of (sI-(A-B[1,0]'K)). Note that it's not sI-
(A-BK) because the controller K can only control the force input u but not the road disturbance W. Recall that our B
matrix is a 4 x 2 matrix, and we only need the first column of B to control U.
For this example,we have to use integral action to achieve zero steady-state error, so we add an extra state which is
int(X1-X2) = int(Y1). In reality the bus will eventually reach an equilibrium that yields a zero steady-state error. The
new states are X1, X1_dot, Y1, Y1_dot, and Y2. Also the state-space matrices, A, B, and C, become the following
after the addition of the new state.
Aa=[0 1 0 0 0
-(b1*b2)/(m1*m2) 0 ((b1/m1)*((b1/m1)+(b1/m2)+(b2/m2)))-(k1/m1) -(b1/m1) 0
b2/m2 0 -((b1/m1)+(b1/m2)+(b2/m2)) 1 0
k2/m2 0 -((k1/m1)+(k1/m2)+(k2/m2)) 0 0
0 0 1 0 0];
Ba=[0 0
1/m1 (b1*b2)/(m1*m2)
0 -(b2/m2)
(1/m1)+(1/m2) -(k2/m2)
0 0];
Ca=[0 0 1 0 0];
Da=[0 0];
sys=ss(Aa,Ba,Ca,Da);
Actually, there is a shortcut for MATLAB to achieve the same result.
Aa = [[A,[0 0 0 0]'];[C, 0]];
Ba = [B;[0 0]];
Ca = [C,0];
Da = D;
sys=ss(Aa,Ba,Ca,Da);
Add the above MATLAB code into the m-file. In this case, we treat the problem like a PID controller design. The
integral control is obtained from the new state. The proportional control is obtained from a gain on Y1 or X1-X2. The
direct derivative control of the output isn't possible, since derivative of Y1 or X1-X2 isn't a state. Instead we use the
derivative of X1, which is available for feedback. (While X1 maybe hard to measure, X1_dot could be obtained by
integrating the output of an accelerometer mounted on the bus.) It is similar to adding more damping to the velocity of
the oscillation of the bus suspension. Add the following MATLAB code for controller K in the m-file:
K = [0 2.3e6 5e8 0 8e6]
K =
0 2300000 500000000 0 8000000
We arrived at this value of the K, matrix by trial and error, adjusting the gain for derivative of X1, Y1 and integral of
Y1, as previously mentioned.
Plotting the closed-loop response
Looking at the schematic above again, we see that after adding the K matrix into the system, the state -space
equations become:
(4)
(5)
We can now obtain the closed-loop response by simply adding the following code into the m-file. Note that we need
to multiply B matrix by 0.1 to simulate the 0.1-m high step disturbance.
t = 0:0.01:2;
sys_cl = ss(Aa-Ba(:,1)*K,-0.1*Ba,Ca,Da);
step(sys_cl*[0;1],t)
title('Closed-Loop Response to a 0.1-m Step')
From the plot we see that the percent overshoot and settling time requirements are satisfied. Moreover the steady-
state error approaches zero as well. Therefore, we will determine that the response is satisfactory. Feel free to play
around with the gain for matrix K.

More Related Content

What's hot

Generation of dsbsc ring modulator
Generation of dsbsc ring modulatorGeneration of dsbsc ring modulator
Generation of dsbsc ring modulatorLearn By Watch
 
EEP306: Frequency modulation
EEP306: Frequency modulationEEP306: Frequency modulation
EEP306: Frequency modulationUmang Gupta
 
Trilateration Calculation Program for Location Tracking System
Trilateration Calculation Program for Location Tracking SystemTrilateration Calculation Program for Location Tracking System
Trilateration Calculation Program for Location Tracking SystemNiko Simon
 
Industrial Control Systems - PID Controllers
Industrial Control Systems - PID ControllersIndustrial Control Systems - PID Controllers
Industrial Control Systems - PID ControllersBehzad Samadi
 
Course 10 example application of random signals - oversampling and noise sh...
Course 10   example application of random signals - oversampling and noise sh...Course 10   example application of random signals - oversampling and noise sh...
Course 10 example application of random signals - oversampling and noise sh...wtyru1989
 
State space analysis.pptx
State space analysis.pptxState space analysis.pptx
State space analysis.pptxRaviMuthamala1
 
bask, bfsk, bpsk
bask, bfsk, bpskbask, bfsk, bpsk
bask, bfsk, bpskblzz2net
 
Lecture 12 ME 176 6 Steady State Error
Lecture 12 ME 176 6 Steady State ErrorLecture 12 ME 176 6 Steady State Error
Lecture 12 ME 176 6 Steady State ErrorLeonides De Ocampo
 
Chapter 4 frequency modulation
Chapter 4 frequency modulationChapter 4 frequency modulation
Chapter 4 frequency modulationHattori Sidek
 
Block diagram Examples
Block diagram ExamplesBlock diagram Examples
Block diagram ExamplesSagar Kuntumal
 
Amplitude modulation
Amplitude modulationAmplitude modulation
Amplitude modulationRumah Belajar
 
Amplitute modulation
Amplitute modulationAmplitute modulation
Amplitute modulationZunAib Ali
 
SKEL 4273 CAD with HDL Topic 3
SKEL 4273 CAD with HDL Topic 3SKEL 4273 CAD with HDL Topic 3
SKEL 4273 CAD with HDL Topic 3alhadi81
 
signal space analysis.ppt
signal space analysis.pptsignal space analysis.ppt
signal space analysis.pptPatrickMumba7
 
Quadrature phase shift keying
Quadrature phase shift keyingQuadrature phase shift keying
Quadrature phase shift keyingSneheshDutta
 
EEP301: Process control trainer II
EEP301: Process control trainer IIEEP301: Process control trainer II
EEP301: Process control trainer IIUmang Gupta
 
Overlap save method and overlap add method in dsp
Overlap save method and overlap add method in dspOverlap save method and overlap add method in dsp
Overlap save method and overlap add method in dspchitra raju
 
digital signal-processing-lab-manual
digital signal-processing-lab-manualdigital signal-processing-lab-manual
digital signal-processing-lab-manualAhmed Alshomi
 

What's hot (20)

Generation of dsbsc ring modulator
Generation of dsbsc ring modulatorGeneration of dsbsc ring modulator
Generation of dsbsc ring modulator
 
EEP306: Frequency modulation
EEP306: Frequency modulationEEP306: Frequency modulation
EEP306: Frequency modulation
 
Trilateration Calculation Program for Location Tracking System
Trilateration Calculation Program for Location Tracking SystemTrilateration Calculation Program for Location Tracking System
Trilateration Calculation Program for Location Tracking System
 
Industrial Control Systems - PID Controllers
Industrial Control Systems - PID ControllersIndustrial Control Systems - PID Controllers
Industrial Control Systems - PID Controllers
 
Control chap3
Control chap3Control chap3
Control chap3
 
Course 10 example application of random signals - oversampling and noise sh...
Course 10   example application of random signals - oversampling and noise sh...Course 10   example application of random signals - oversampling and noise sh...
Course 10 example application of random signals - oversampling and noise sh...
 
State space analysis.pptx
State space analysis.pptxState space analysis.pptx
State space analysis.pptx
 
bask, bfsk, bpsk
bask, bfsk, bpskbask, bfsk, bpsk
bask, bfsk, bpsk
 
Lecture 12 ME 176 6 Steady State Error
Lecture 12 ME 176 6 Steady State ErrorLecture 12 ME 176 6 Steady State Error
Lecture 12 ME 176 6 Steady State Error
 
Chapter 4 frequency modulation
Chapter 4 frequency modulationChapter 4 frequency modulation
Chapter 4 frequency modulation
 
Block diagram Examples
Block diagram ExamplesBlock diagram Examples
Block diagram Examples
 
Amplitude modulation
Amplitude modulationAmplitude modulation
Amplitude modulation
 
Amplitute modulation
Amplitute modulationAmplitute modulation
Amplitute modulation
 
SKEL 4273 CAD with HDL Topic 3
SKEL 4273 CAD with HDL Topic 3SKEL 4273 CAD with HDL Topic 3
SKEL 4273 CAD with HDL Topic 3
 
signal space analysis.ppt
signal space analysis.pptsignal space analysis.ppt
signal space analysis.ppt
 
Quadrature phase shift keying
Quadrature phase shift keyingQuadrature phase shift keying
Quadrature phase shift keying
 
EEP301: Process control trainer II
EEP301: Process control trainer IIEEP301: Process control trainer II
EEP301: Process control trainer II
 
Overlap save method and overlap add method in dsp
Overlap save method and overlap add method in dspOverlap save method and overlap add method in dsp
Overlap save method and overlap add method in dsp
 
digital signal-processing-lab-manual
digital signal-processing-lab-manualdigital signal-processing-lab-manual
digital signal-processing-lab-manual
 
Pid control for line follwoers
Pid control for line follwoersPid control for line follwoers
Pid control for line follwoers
 

Similar to MATLAB Suspension System Modeling and State-Space Control Design

Raymond.Brunkow-Project-EEL-3657-Sp15
Raymond.Brunkow-Project-EEL-3657-Sp15Raymond.Brunkow-Project-EEL-3657-Sp15
Raymond.Brunkow-Project-EEL-3657-Sp15Raymond Brunkow
 
D0372027037
D0372027037D0372027037
D0372027037theijes
 
A simplified method of designing a phase lead compensator to improve the m-s-...
A simplified method of designing a phase lead compensator to improve the m-s-...A simplified method of designing a phase lead compensator to improve the m-s-...
A simplified method of designing a phase lead compensator to improve the m-s-...eSAT Journals
 
A simplified method of designing a phase lead compensator to improve the m-s-...
A simplified method of designing a phase lead compensator to improve the m-s-...A simplified method of designing a phase lead compensator to improve the m-s-...
A simplified method of designing a phase lead compensator to improve the m-s-...eSAT Journals
 
PID Tuning using Ziegler Nicholas - MATLAB Approach
PID Tuning using Ziegler Nicholas - MATLAB ApproachPID Tuning using Ziegler Nicholas - MATLAB Approach
PID Tuning using Ziegler Nicholas - MATLAB ApproachWaleed El-Badry
 
Feedback Control of Dynamic Systems 8th Edition Franklin Solutions Manual
Feedback Control of Dynamic Systems 8th Edition Franklin Solutions ManualFeedback Control of Dynamic Systems 8th Edition Franklin Solutions Manual
Feedback Control of Dynamic Systems 8th Edition Franklin Solutions ManualDakotaFredericks
 
The Controller Design For Linear System: A State Space Approach
The Controller Design For Linear System: A State Space ApproachThe Controller Design For Linear System: A State Space Approach
The Controller Design For Linear System: A State Space ApproachYang Hong
 
EENG519FinalProjectReport
EENG519FinalProjectReportEENG519FinalProjectReport
EENG519FinalProjectReportDaniel K
 
Modeling, simulation and control of a robotic arm
Modeling, simulation and control of a robotic armModeling, simulation and control of a robotic arm
Modeling, simulation and control of a robotic armcesarportilla8
 
suspension system project report
suspension system project reportsuspension system project report
suspension system project reportUET Taxila
 
OConnor_SimulationProject
OConnor_SimulationProjectOConnor_SimulationProject
OConnor_SimulationProjectKevin O'Connor
 
Ece 415 control systems, fall 2021 computer project 1
Ece 415 control systems, fall 2021 computer project  1 Ece 415 control systems, fall 2021 computer project  1
Ece 415 control systems, fall 2021 computer project 1 ronak56
 

Similar to MATLAB Suspension System Modeling and State-Space Control Design (20)

Raymond.Brunkow-Project-EEL-3657-Sp15
Raymond.Brunkow-Project-EEL-3657-Sp15Raymond.Brunkow-Project-EEL-3657-Sp15
Raymond.Brunkow-Project-EEL-3657-Sp15
 
D0372027037
D0372027037D0372027037
D0372027037
 
A simplified method of designing a phase lead compensator to improve the m-s-...
A simplified method of designing a phase lead compensator to improve the m-s-...A simplified method of designing a phase lead compensator to improve the m-s-...
A simplified method of designing a phase lead compensator to improve the m-s-...
 
A simplified method of designing a phase lead compensator to improve the m-s-...
A simplified method of designing a phase lead compensator to improve the m-s-...A simplified method of designing a phase lead compensator to improve the m-s-...
A simplified method of designing a phase lead compensator to improve the m-s-...
 
Assignment2 control
Assignment2 controlAssignment2 control
Assignment2 control
 
PID Tuning using Ziegler Nicholas - MATLAB Approach
PID Tuning using Ziegler Nicholas - MATLAB ApproachPID Tuning using Ziegler Nicholas - MATLAB Approach
PID Tuning using Ziegler Nicholas - MATLAB Approach
 
Feedback Control of Dynamic Systems 8th Edition Franklin Solutions Manual
Feedback Control of Dynamic Systems 8th Edition Franklin Solutions ManualFeedback Control of Dynamic Systems 8th Edition Franklin Solutions Manual
Feedback Control of Dynamic Systems 8th Edition Franklin Solutions Manual
 
The Controller Design For Linear System: A State Space Approach
The Controller Design For Linear System: A State Space ApproachThe Controller Design For Linear System: A State Space Approach
The Controller Design For Linear System: A State Space Approach
 
Servo systems
Servo systemsServo systems
Servo systems
 
EENG519FinalProjectReport
EENG519FinalProjectReportEENG519FinalProjectReport
EENG519FinalProjectReport
 
Modeling, simulation and control of a robotic arm
Modeling, simulation and control of a robotic armModeling, simulation and control of a robotic arm
Modeling, simulation and control of a robotic arm
 
suspension system project report
suspension system project reportsuspension system project report
suspension system project report
 
OConnor_SimulationProject
OConnor_SimulationProjectOConnor_SimulationProject
OConnor_SimulationProject
 
Tutorials questions
Tutorials questionsTutorials questions
Tutorials questions
 
Bode
BodeBode
Bode
 
Ece 415 control systems, fall 2021 computer project 1
Ece 415 control systems, fall 2021 computer project  1 Ece 415 control systems, fall 2021 computer project  1
Ece 415 control systems, fall 2021 computer project 1
 
Simulink
SimulinkSimulink
Simulink
 
Quiz
QuizQuiz
Quiz
 
Ball and beam
Ball and beamBall and beam
Ball and beam
 
Chapter10
Chapter10Chapter10
Chapter10
 

Recently uploaded

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 

Recently uploaded (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 

MATLAB Suspension System Modeling and State-Space Control Design

  • 1. Suspension: System Modeling Key MATLAB commands used in this tutorial are: ss , step Contents  Physical setup  System parameters  Equations of motion  Transfer function models  Entering equations in MATLAB Physical setup Designing an automotive suspension system is an interesting and challenging control problem.When the suspension system is designed, a 1/4 model (one of the four wheels) is used to simplify the problem to a 1D multiple spring - damper system.A diagram ofthis system is shown below. This model is for an active suspension system where an actuator is included that is able to generate the control force U to control the motion of the bus body. System parameters (M1) 1/4 bus body mass 2500 kg (M2) suspension mass 320 kg (K1) spring constant of suspension system 80,000 N/m (K2) spring constant of wheel and tire 500,000 N/m (b1) damping constant of suspension system 350 N.s/m (b2) damping constant of wheel and tire 15,020 N.s/m (U) control force Equations of motion From the picture above and Newton's law, we can obtain the dynamic equations as the following:
  • 2. (1) (2) Transfer function models Assume that all of the initial conditions are zero, so that these equations represent the situation where the vehicle wheel goes up a bump. The dynamic equations above can be expressed in the form of transfer functions by taking the Laplace Transform.The specific derivation from the above equations to the transfer functions G1(s) and G2(s) is shown below where each transfer function has an output of, X1-X2, and inputs of U and W, respectively. (3) (4) (5) (6) (7) or (8) Find the inverse of matrix A and then multiply with inputs U(s)and W(s) on the righthand side as follows: (9) (10) When we want to consider the control input U(s) only, we set W(s) = 0. Thus we get the transfer function G1(s) as in the following: (11) When we want to consider the disturbance input W(s) only, we set U(s) = 0. Thus we get the transfer function G2(s) as in the following: (12) Entering equations in MATLAB We can generate the above transfer function models in MATLAB by entering the following commands in the MATLAB command window. M1 = 2500; M2 = 320; K1 = 80000; K2 = 500000; b1 = 350; b2 = 15020; s = tf('s'); G1 = ((M1+M2)*s^2+b2*s+K2)/((M1*s^2+b1*s+K1)*(M2*s^2+(b1+b2)*s+(K1+K2))- (b1*s+K1)*(b1*s+K1)); G2 = (-M1*b2*s^3-M1*K2*s^2)/((M1*s^2+b1*s+K1)*(M2*s^2+(b1+b2)*s+(K1+K2))- (b1*s+K1)*(b1*s+K1));
  • 3. Suspension: State-Space Controller Design Key MATLAB commands used in this tutorial are: ss , step Contents  Designing the full state-feedback controller  Plotting the closed-loop response From the main problem, the dynamic equations in state-space form are the following where Y1 = X1 - X2. (1) (2) (3) For the original problem and the derivation of the above equations and schematic, please refer to the Suspension: System Modeling page. We want to design a feedback controller so that when the road disturbance (W) is simulated by a unit step input, the output (X1-X2) has a settling time less than 5 seconds and an overshoot less than 5%. For example, when the bus runs onto a 10 cm high step, the bus body will oscillate within a range of +/- 5 mm and will stop oscillating within 5 seconds. The system model can be represented in MATLAB by creating a new m-file and entering the following commands (refer to main problem for the details of getting those commands). We need to define the A, B, C, D matrices by entering the following into the m-file: m1 = 2500; m2 = 320; k1 = 80000; k2 = 500000; b1 = 350; b2 = 15020; A=[0 1 0 0 -(b1*b2)/(m1*m2) 0 ((b1/m1)*((b1/m1)+(b1/m2)+(b2/m2)))-(k1/m1) -(b1/m1) b2/m2 0 -((b1/m1)+(b1/m2)+(b2/m2)) 1 k2/m2 0 -((k1/m1)+(k1/m2)+(k2/m2)) 0]; B=[0 0 1/m1 (b1*b2)/(m1*m2) 0 -(b2/m2) (1/m1)+(1/m2) -(k2/m2)]; C=[0 0 1 0]; D=[0 0]; sys=ss(A,B,C,D); Designing the full state-feedback controller First, let's design a full state-feedback controller for the system.Assuming for now that all the states can be measured (this assumption is probably not true but is sufficient for this problem), the schematic of the system is shown below.
  • 4. The characteristic polynomial for this closed-loop system is the determinant of (sI-(A-B[1,0]'K)). Note that it's not sI- (A-BK) because the controller K can only control the force input u but not the road disturbance W. Recall that our B matrix is a 4 x 2 matrix, and we only need the first column of B to control U. For this example,we have to use integral action to achieve zero steady-state error, so we add an extra state which is int(X1-X2) = int(Y1). In reality the bus will eventually reach an equilibrium that yields a zero steady-state error. The new states are X1, X1_dot, Y1, Y1_dot, and Y2. Also the state-space matrices, A, B, and C, become the following after the addition of the new state. Aa=[0 1 0 0 0 -(b1*b2)/(m1*m2) 0 ((b1/m1)*((b1/m1)+(b1/m2)+(b2/m2)))-(k1/m1) -(b1/m1) 0 b2/m2 0 -((b1/m1)+(b1/m2)+(b2/m2)) 1 0 k2/m2 0 -((k1/m1)+(k1/m2)+(k2/m2)) 0 0 0 0 1 0 0]; Ba=[0 0 1/m1 (b1*b2)/(m1*m2) 0 -(b2/m2) (1/m1)+(1/m2) -(k2/m2) 0 0]; Ca=[0 0 1 0 0]; Da=[0 0]; sys=ss(Aa,Ba,Ca,Da); Actually, there is a shortcut for MATLAB to achieve the same result. Aa = [[A,[0 0 0 0]'];[C, 0]]; Ba = [B;[0 0]]; Ca = [C,0]; Da = D; sys=ss(Aa,Ba,Ca,Da); Add the above MATLAB code into the m-file. In this case, we treat the problem like a PID controller design. The integral control is obtained from the new state. The proportional control is obtained from a gain on Y1 or X1-X2. The direct derivative control of the output isn't possible, since derivative of Y1 or X1-X2 isn't a state. Instead we use the derivative of X1, which is available for feedback. (While X1 maybe hard to measure, X1_dot could be obtained by integrating the output of an accelerometer mounted on the bus.) It is similar to adding more damping to the velocity of the oscillation of the bus suspension. Add the following MATLAB code for controller K in the m-file: K = [0 2.3e6 5e8 0 8e6] K = 0 2300000 500000000 0 8000000 We arrived at this value of the K, matrix by trial and error, adjusting the gain for derivative of X1, Y1 and integral of Y1, as previously mentioned. Plotting the closed-loop response Looking at the schematic above again, we see that after adding the K matrix into the system, the state -space equations become: (4)
  • 5. (5) We can now obtain the closed-loop response by simply adding the following code into the m-file. Note that we need to multiply B matrix by 0.1 to simulate the 0.1-m high step disturbance. t = 0:0.01:2; sys_cl = ss(Aa-Ba(:,1)*K,-0.1*Ba,Ca,Da); step(sys_cl*[0;1],t) title('Closed-Loop Response to a 0.1-m Step') From the plot we see that the percent overshoot and settling time requirements are satisfied. Moreover the steady- state error approaches zero as well. Therefore, we will determine that the response is satisfactory. Feel free to play around with the gain for matrix K.