SlideShare une entreprise Scribd logo
1  sur  19
STATE SPACE MODELS
MATLAB Tutorial
Why State Space Models
 The state space model represents a physical
system as n first order differential
equations. This form is better suited for
computer simulation than an nth order input-
output differential equation.
Basics
 Vector matrix format generally is given by:
where y is the output equation, and x is the
state vector
PARTS OF A STATE SPACE
REPRESENTATION
 State Variables: a subset of system variables which
if known at an initial time t0 along with subsequent
inputs are determined for all time t>t0+
 State Equations: n linearly independent first order
differential equations relating the first derivatives of
the state variables to functions of the state variables
and the inputs.
 Output equations: algebraic equations relating the
state variables to the system outputs.
EXAMPLE
 The equation gathered from the free body diagram
is: mx" + bx' + kx - f(t) = 0
 Substituting the definitions of the states into the
equation results in:
mv' + bv + kx - f(t) = 0
 Solving for v' gives the state equation:
v' = (-b/m) v + (-k/m) x + f(t)/m
 The desired output is for the position, x, so:
y = x
Cont…
 Now the derivatives of the state variables are
in terms of the state variables, the inputs,
and constants.
x' = v
v' = (-k/m) x + (-b/m) v + f(t)/m
y = x
PUTTING INTO VECTOR-MATRIX
FORM
 Our state vector consists of two variables, x
and v so our vector-matrix will be in the form:
Explanation
 The first row of A and the first row of B are
the coefficients of the first state equation for
x'. Likewise the second row of A and the
second row of B are the coefficients of the
second state equation for v'. C and D are the
coefficients of the output equation for y.
EXACT REPRESENTATION
HOW TO INPUT THE STATE
SPACE MODEL INTO MATLAB
 In order to enter a state space model into MATLAB,
enter the coefficient matrices A, B, C, and D into
MATLAB. The syntax for defining a state space
model in MATLAB is:
statespace = ss(A, B, C, D)
where A, B, C, and D are from the standard vector-
matrix form of a state space model.
Example
 For the sake of example, lets take m = 2, b = 5, and k = 3.
 >> m = 2;
 >> b = 5;
 >> k = 3;
 >> A = [ 0 1 ; -k/m -b/m ];
 >> B = [ 0 ; 1/m ];
 >> C = [ 1 0 ];
 >> D = 0;
 >> statespace_ss = ss(A, B, C, D)
Output
 This assigns the state space model under
the name statespace_ss and output the
following:
 a =
x1 x2
x1 0 1
x2 -1.5 -2.5
Cont…
 b =
u1
x1 0
x2 0.5
c =
x1 x2
y1 1 0
Cont…
 d =
u1
y1 0
Continuous-time model.
EXTRACTING A, B, C, D
MATRICES FROM A STATE
SPACE MODEL
 In order to extract the A, B, C, and D
matrices from a previously defined state
space model, use MATLAB's ssdata
command.
 [A, B, C, D] = ssdata(statespace)
where statespace is the name of the state
space system.
Example
 >> [A, B, C, D] = ssdata(statespace_ss)
 The MATLAB output will be:
 A =

 -2.5000 -0.3750
4.0000 0
Cont…
B =
0.2500
0
C =
0 0.5000
D =
0
STEP RESPONSE USING THE
STATE SPACE MODEL
 Once the state space model is entered into MATLAB it is easy
to calculate the response to a step input. To calculate the
response to a unit step input, use:
 step(statespace)
 where statespace is the name of the state space system.
 For steps with magnitude other than one, calculate the step
response using:
 step(u * statespace)
 where u is the magnitude of the step and statespace is the
name of the state space system.
State space models

Contenu connexe

Tendances

Mathematical Modelling of Control Systems
Mathematical Modelling of Control SystemsMathematical Modelling of Control Systems
Mathematical Modelling of Control SystemsDivyanshu Rai
 
Transfer function and mathematical modeling
Transfer  function  and  mathematical  modelingTransfer  function  and  mathematical  modeling
Transfer function and mathematical modelingvishalgohel12195
 
State equations for physical systems
State equations for physical systemsState equations for physical systems
State equations for physical systemsSarah Krystelle
 
State space analysis.pptx
State space analysis.pptxState space analysis.pptx
State space analysis.pptxRaviMuthamala1
 
Applications Of Laplace Transforms
Applications Of Laplace TransformsApplications Of Laplace Transforms
Applications Of Laplace TransformsKetaki_Pattani
 
Week 16 controllability and observability june 1 final
Week 16 controllability and observability june 1 finalWeek 16 controllability and observability june 1 final
Week 16 controllability and observability june 1 finalCharlton Inao
 
Stability of Control System
Stability of Control SystemStability of Control System
Stability of Control Systemvaibhav jindal
 
Controllability and observability
Controllability and observabilityControllability and observability
Controllability and observabilityjawaharramaya
 
State space courses
State space coursesState space courses
State space coursesKAMEL HEMSAS
 
NONLINEAR CONTROL SYSTEM (Phase plane & Phase Trajectory Method)
NONLINEAR CONTROL SYSTEM(Phase plane & Phase Trajectory Method)NONLINEAR CONTROL SYSTEM(Phase plane & Phase Trajectory Method)
NONLINEAR CONTROL SYSTEM (Phase plane & Phase Trajectory Method)Niraj Solanki
 
Fourier analysis of signals and systems
Fourier analysis of signals and systemsFourier analysis of signals and systems
Fourier analysis of signals and systemsBabul Islam
 
Discrete state space model 9th &10th lecture
Discrete  state space model   9th  &10th  lectureDiscrete  state space model   9th  &10th  lecture
Discrete state space model 9th &10th lectureKhalaf Gaeid Alshammery
 
Modern Control - Lec 01 - Introduction to Control System
Modern Control - Lec 01 - Introduction to Control SystemModern Control - Lec 01 - Introduction to Control System
Modern Control - Lec 01 - Introduction to Control SystemAmr E. Mohamed
 
Modern Control - Lec 02 - Mathematical Modeling of Systems
Modern Control - Lec 02 - Mathematical Modeling of SystemsModern Control - Lec 02 - Mathematical Modeling of Systems
Modern Control - Lec 02 - Mathematical Modeling of SystemsAmr E. Mohamed
 
Root locus method
Root locus methodRoot locus method
Root locus methodRavi Patel
 

Tendances (20)

Mathematical Modelling of Control Systems
Mathematical Modelling of Control SystemsMathematical Modelling of Control Systems
Mathematical Modelling of Control Systems
 
Laplace transform
Laplace transformLaplace transform
Laplace transform
 
Transfer function and mathematical modeling
Transfer  function  and  mathematical  modelingTransfer  function  and  mathematical  modeling
Transfer function and mathematical modeling
 
Time domain analysis
Time domain analysisTime domain analysis
Time domain analysis
 
State equations for physical systems
State equations for physical systemsState equations for physical systems
State equations for physical systems
 
State space analysis.pptx
State space analysis.pptxState space analysis.pptx
State space analysis.pptx
 
Applications Of Laplace Transforms
Applications Of Laplace TransformsApplications Of Laplace Transforms
Applications Of Laplace Transforms
 
Week 16 controllability and observability june 1 final
Week 16 controllability and observability june 1 finalWeek 16 controllability and observability june 1 final
Week 16 controllability and observability june 1 final
 
Stability of Control System
Stability of Control SystemStability of Control System
Stability of Control System
 
Controllability and observability
Controllability and observabilityControllability and observability
Controllability and observability
 
Stability Analysis of Discrete System
Stability Analysis of Discrete SystemStability Analysis of Discrete System
Stability Analysis of Discrete System
 
Z transfrm ppt
Z transfrm pptZ transfrm ppt
Z transfrm ppt
 
State space courses
State space coursesState space courses
State space courses
 
NONLINEAR CONTROL SYSTEM (Phase plane & Phase Trajectory Method)
NONLINEAR CONTROL SYSTEM(Phase plane & Phase Trajectory Method)NONLINEAR CONTROL SYSTEM(Phase plane & Phase Trajectory Method)
NONLINEAR CONTROL SYSTEM (Phase plane & Phase Trajectory Method)
 
Fourier analysis of signals and systems
Fourier analysis of signals and systemsFourier analysis of signals and systems
Fourier analysis of signals and systems
 
Discrete state space model 9th &10th lecture
Discrete  state space model   9th  &10th  lectureDiscrete  state space model   9th  &10th  lecture
Discrete state space model 9th &10th lecture
 
Lyapunov stability
Lyapunov stability Lyapunov stability
Lyapunov stability
 
Modern Control - Lec 01 - Introduction to Control System
Modern Control - Lec 01 - Introduction to Control SystemModern Control - Lec 01 - Introduction to Control System
Modern Control - Lec 01 - Introduction to Control System
 
Modern Control - Lec 02 - Mathematical Modeling of Systems
Modern Control - Lec 02 - Mathematical Modeling of SystemsModern Control - Lec 02 - Mathematical Modeling of Systems
Modern Control - Lec 02 - Mathematical Modeling of Systems
 
Root locus method
Root locus methodRoot locus method
Root locus method
 

En vedette (20)

Lec2 state space
Lec2 state spaceLec2 state space
Lec2 state space
 
Week 15 state space rep may 25 2016 final
Week 15 state space rep   may 25  2016 finalWeek 15 state space rep   may 25  2016 final
Week 15 state space rep may 25 2016 final
 
State space analysis shortcut rules
State space analysis shortcut rulesState space analysis shortcut rules
State space analysis shortcut rules
 
State Space Search(2)
State Space Search(2)State Space Search(2)
State Space Search(2)
 
State space
State spaceState space
State space
 
linear algebra in control systems
linear algebra in control systemslinear algebra in control systems
linear algebra in control systems
 
Modern Control System (BE)
Modern Control System (BE)Modern Control System (BE)
Modern Control System (BE)
 
The Space of Representation
The Space of RepresentationThe Space of Representation
The Space of Representation
 
Digital control and state variable methods by m gopal
Digital control and state variable methods by m gopalDigital control and state variable methods by m gopal
Digital control and state variable methods by m gopal
 
Solved problems 1(control volume)
Solved problems  1(control volume)Solved problems  1(control volume)
Solved problems 1(control volume)
 
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
 
Lab no.07
Lab no.07Lab no.07
Lab no.07
 
DIODES
DIODESDIODES
DIODES
 
Chap1see4113
Chap1see4113Chap1see4113
Chap1see4113
 
Systems Analysis & Control: Steady State Errors
Systems Analysis & Control: Steady State ErrorsSystems Analysis & Control: Steady State Errors
Systems Analysis & Control: Steady State Errors
 
State space search
State space search State space search
State space search
 
6주차
6주차6주차
6주차
 
Diodes
DiodesDiodes
Diodes
 
Domain State model OOAD
Domain State model  OOADDomain State model  OOAD
Domain State model OOAD
 
Er. rahul sharma circuit breaker
Er. rahul sharma circuit breakerEr. rahul sharma circuit breaker
Er. rahul sharma circuit breaker
 

Similaire à State space models

1. Introduction.pptx
1. Introduction.pptx1. Introduction.pptx
1. Introduction.pptxSungaleliYuen
 
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docxSAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docxagnesdcarey33086
 
Ingeniería de control: Tema 3. El método del espacio de estados
Ingeniería de control: Tema 3. El método del espacio de estadosIngeniería de control: Tema 3. El método del espacio de estados
Ingeniería de control: Tema 3. El método del espacio de estadosSANTIAGO PABLO ALBERTO
 
B61301007 matlab documentation
B61301007 matlab documentationB61301007 matlab documentation
B61301007 matlab documentationManchireddy Reddy
 
Lab 5 template Lab 5 - Your Name - MAT 275 Lab The M.docx
Lab 5 template  Lab 5 - Your Name - MAT 275 Lab The M.docxLab 5 template  Lab 5 - Your Name - MAT 275 Lab The M.docx
Lab 5 template Lab 5 - Your Name - MAT 275 Lab The M.docxsmile790243
 
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docxSAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docxanhlodge
 
MATLAB-Introd.ppt
MATLAB-Introd.pptMATLAB-Introd.ppt
MATLAB-Introd.pptkebeAman
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlabBilawalBaloch1
 
Matlab-free course by Mohd Esa
Matlab-free course by Mohd EsaMatlab-free course by Mohd Esa
Matlab-free course by Mohd EsaMohd Esa
 
INTRODUCTION TO MATLAB presentation.pptx
INTRODUCTION TO MATLAB presentation.pptxINTRODUCTION TO MATLAB presentation.pptx
INTRODUCTION TO MATLAB presentation.pptxDevaraj Chilakala
 
Lec4 State Variable Models are used for modeing
Lec4 State Variable Models are used for modeingLec4 State Variable Models are used for modeing
Lec4 State Variable Models are used for modeingShehzadAhmed90
 
Scilab for real dummies j.heikell - part 2
Scilab for real dummies j.heikell - part 2Scilab for real dummies j.heikell - part 2
Scilab for real dummies j.heikell - part 2Scilab
 

Similaire à State space models (20)

1. Introduction.pptx
1. Introduction.pptx1. Introduction.pptx
1. Introduction.pptx
 
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docxSAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
 
Control assignment#2
Control assignment#2Control assignment#2
Control assignment#2
 
Ingeniería de control: Tema 3. El método del espacio de estados
Ingeniería de control: Tema 3. El método del espacio de estadosIngeniería de control: Tema 3. El método del espacio de estados
Ingeniería de control: Tema 3. El método del espacio de estados
 
B61301007 matlab documentation
B61301007 matlab documentationB61301007 matlab documentation
B61301007 matlab documentation
 
Lab 5 template Lab 5 - Your Name - MAT 275 Lab The M.docx
Lab 5 template  Lab 5 - Your Name - MAT 275 Lab The M.docxLab 5 template  Lab 5 - Your Name - MAT 275 Lab The M.docx
Lab 5 template Lab 5 - Your Name - MAT 275 Lab The M.docx
 
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docxSAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
 
MATLAB-Introd.ppt
MATLAB-Introd.pptMATLAB-Introd.ppt
MATLAB-Introd.ppt
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 
Matlab-free course by Mohd Esa
Matlab-free course by Mohd EsaMatlab-free course by Mohd Esa
Matlab-free course by Mohd Esa
 
Mechanical Engineering Assignment Help
Mechanical Engineering Assignment HelpMechanical Engineering Assignment Help
Mechanical Engineering Assignment Help
 
INTRODUCTION TO MATLAB presentation.pptx
INTRODUCTION TO MATLAB presentation.pptxINTRODUCTION TO MATLAB presentation.pptx
INTRODUCTION TO MATLAB presentation.pptx
 
Servo systems
Servo systemsServo systems
Servo systems
 
bobok
bobokbobok
bobok
 
Lec4 State Variable Models are used for modeing
Lec4 State Variable Models are used for modeingLec4 State Variable Models are used for modeing
Lec4 State Variable Models are used for modeing
 
Python Homework Help
Python Homework HelpPython Homework Help
Python Homework Help
 
Matlab variables
Matlab variablesMatlab variables
Matlab variables
 
Matlabtut1
Matlabtut1Matlabtut1
Matlabtut1
 
Scilab for real dummies j.heikell - part 2
Scilab for real dummies j.heikell - part 2Scilab for real dummies j.heikell - part 2
Scilab for real dummies j.heikell - part 2
 
Online Maths Assignment Help
Online Maths Assignment HelpOnline Maths Assignment Help
Online Maths Assignment Help
 

Plus de gudlavalleru engineering college (14)

Stld
StldStld
Stld
 
Ppt
PptPpt
Ppt
 
Formula sheet for ec&ee
Formula sheet for ec&eeFormula sheet for ec&ee
Formula sheet for ec&ee
 
Engineering mathematics, fifth edition(1)
Engineering mathematics, fifth edition(1)Engineering mathematics, fifth edition(1)
Engineering mathematics, fifth edition(1)
 
Control systems
Control systemsControl systems
Control systems
 
Induction motors
Induction motorsInduction motors
Induction motors
 
joseph sathvik
joseph sathvikjoseph sathvik
joseph sathvik
 
Ppt by joseph sathvik
Ppt by joseph sathvikPpt by joseph sathvik
Ppt by joseph sathvik
 
Power system-analysis-psr murthy
Power system-analysis-psr murthyPower system-analysis-psr murthy
Power system-analysis-psr murthy
 
building construction
building constructionbuilding construction
building construction
 
Ai chap2 state (1)
Ai chap2 state (1)Ai chap2 state (1)
Ai chap2 state (1)
 
9.ppt
9.ppt9.ppt
9.ppt
 
Thermal power-plant
Thermal power-plantThermal power-plant
Thermal power-plant
 
Introduction to iso22000 101106
Introduction to iso22000 101106Introduction to iso22000 101106
Introduction to iso22000 101106
 

Dernier

S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxSCMS School of Architecture
 
Bridge Jacking Design Sample Calculation.pptx
Bridge Jacking Design Sample Calculation.pptxBridge Jacking Design Sample Calculation.pptx
Bridge Jacking Design Sample Calculation.pptxnuruddin69
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationBhangaleSonal
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
Air Compressor reciprocating single stage
Air Compressor reciprocating single stageAir Compressor reciprocating single stage
Air Compressor reciprocating single stageAbc194748
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086anil_gaur
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityMorshed Ahmed Rahath
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadhamedmustafa094
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptMsecMca
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdfKamal Acharya
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesRAJNEESHKUMAR341697
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network DevicesChandrakantDivate1
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptNANDHAKUMARA10
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARKOUSTAV SARKAR
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaOmar Fathy
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 

Dernier (20)

Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
Bridge Jacking Design Sample Calculation.pptx
Bridge Jacking Design Sample Calculation.pptxBridge Jacking Design Sample Calculation.pptx
Bridge Jacking Design Sample Calculation.pptx
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Air Compressor reciprocating single stage
Air Compressor reciprocating single stageAir Compressor reciprocating single stage
Air Compressor reciprocating single stage
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal load
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planes
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 

State space models

  • 2. Why State Space Models  The state space model represents a physical system as n first order differential equations. This form is better suited for computer simulation than an nth order input- output differential equation.
  • 3. Basics  Vector matrix format generally is given by: where y is the output equation, and x is the state vector
  • 4. PARTS OF A STATE SPACE REPRESENTATION  State Variables: a subset of system variables which if known at an initial time t0 along with subsequent inputs are determined for all time t>t0+  State Equations: n linearly independent first order differential equations relating the first derivatives of the state variables to functions of the state variables and the inputs.  Output equations: algebraic equations relating the state variables to the system outputs.
  • 5. EXAMPLE  The equation gathered from the free body diagram is: mx" + bx' + kx - f(t) = 0  Substituting the definitions of the states into the equation results in: mv' + bv + kx - f(t) = 0  Solving for v' gives the state equation: v' = (-b/m) v + (-k/m) x + f(t)/m  The desired output is for the position, x, so: y = x
  • 6. Cont…  Now the derivatives of the state variables are in terms of the state variables, the inputs, and constants. x' = v v' = (-k/m) x + (-b/m) v + f(t)/m y = x
  • 7. PUTTING INTO VECTOR-MATRIX FORM  Our state vector consists of two variables, x and v so our vector-matrix will be in the form:
  • 8. Explanation  The first row of A and the first row of B are the coefficients of the first state equation for x'. Likewise the second row of A and the second row of B are the coefficients of the second state equation for v'. C and D are the coefficients of the output equation for y.
  • 10. HOW TO INPUT THE STATE SPACE MODEL INTO MATLAB  In order to enter a state space model into MATLAB, enter the coefficient matrices A, B, C, and D into MATLAB. The syntax for defining a state space model in MATLAB is: statespace = ss(A, B, C, D) where A, B, C, and D are from the standard vector- matrix form of a state space model.
  • 11. Example  For the sake of example, lets take m = 2, b = 5, and k = 3.  >> m = 2;  >> b = 5;  >> k = 3;  >> A = [ 0 1 ; -k/m -b/m ];  >> B = [ 0 ; 1/m ];  >> C = [ 1 0 ];  >> D = 0;  >> statespace_ss = ss(A, B, C, D)
  • 12. Output  This assigns the state space model under the name statespace_ss and output the following:  a = x1 x2 x1 0 1 x2 -1.5 -2.5
  • 13. Cont…  b = u1 x1 0 x2 0.5 c = x1 x2 y1 1 0
  • 14. Cont…  d = u1 y1 0 Continuous-time model.
  • 15. EXTRACTING A, B, C, D MATRICES FROM A STATE SPACE MODEL  In order to extract the A, B, C, and D matrices from a previously defined state space model, use MATLAB's ssdata command.  [A, B, C, D] = ssdata(statespace) where statespace is the name of the state space system.
  • 16. Example  >> [A, B, C, D] = ssdata(statespace_ss)  The MATLAB output will be:  A =   -2.5000 -0.3750 4.0000 0
  • 18. STEP RESPONSE USING THE STATE SPACE MODEL  Once the state space model is entered into MATLAB it is easy to calculate the response to a step input. To calculate the response to a unit step input, use:  step(statespace)  where statespace is the name of the state space system.  For steps with magnitude other than one, calculate the step response using:  step(u * statespace)  where u is the magnitude of the step and statespace is the name of the state space system.