29 views

Uploaded by panbuu

state space model

- Simulink-Tutorial(2).pdf
- A First Course in Predictive Control, Second Edition.pdf
- HW13A_sol
- https___isidore.udayton.edu_access_content_attachment_211f364d-62a2-495d-9ade-e848cff7f36c_Assignments_1d4b1015-19f6-4bad-88e4-57ac956e0425_hw1.pdf
- State Var
- Control Example Using Matlab
- State and Input Estimation for Descriptor Systems With Unknown Inputs
- Assignment Lcs - Assignment -01
- 09 State Space
- Ee 5307 Homeworks
- Second Order Hold Based Discretization Method Of
- Control Example Using Matlab
- KAUSHIK_CON.docx
- active suspension system lab course manual
- 6-Lecture 37 Time domain analysis.pptx
- project
- kowalewski97case
- ENEE 660 HW Sol #2
- DISTURBANCE MODELING AND STATE ESTIMATION FOR OFFSET–FREE PREDICTIVE CONTROLWITH STATE–SPACE PROCESS MODELS
- A Gentle Introduction to Predictive Filters

You are on page 1of 13

A state-space model is a structured form or representation of a set of differential equations. Statespace models are very useful in Control theory and design. The differential equations are converted

in matrices and vectors, which is the basic elements in MathScript.

Assume we have the following differential equations:

][

][

][

][

A general linear State-space model may be written on the following general form:

Function

ss

Sys_order1

Sys_order2

Description

Constructs a model in state-space form. You also can use this

function to convert transfer function models to state-space

form.

Constructs the components of a first-order system model based

on a gain, time constant, and delay that you specify. You can use

this function to create either a state-space model or a transfer

function model, depending on the output parameters you

specify.

Constructs the components of a second-order system model

Example

>A = [1 2; 3 4]

>B = [0; 1]

>C = B'

>ssmodel = ss(A, B, C)

>K = 1;

>T = 1;

>H = sys_order1(K, T)

>dr = 0.5

>wn = 20

Faculty of Technology, Postboks 203, Kjlnes ring 56, N-3901 Porsgrunn, Norway. Tel: +47 35 57 50 00 Fax: +47 35 57 54 01

step

lsim

can use this function to create either a state-space model or a

transfer function model, depending on the output parameters

you specify.

Creates a step response plot of the system model. You also can

use this function to return the step response of the model

outputs. If the model is in state-space form, you also can use this

function to return the step response of the model states. This

function assumes the initial model states are zero. If you do not

specify an output, this function creates a plot.

Creates the linear simulation plot of a system model. This

function calculates the output of a system model when a set of

inputs excite the model, using discrete simulation. If you do not

specify an output, this function creates a plot.

Example:

Given the following state-space model:

[ ]

][ ]

[

[ ]

][ ]

% Creates a state-space model

A = [1 2; 3 4];

B = [0; 1];

C = [1, 0];

D = [0];

model = ss(A, B, C, D)

Task 1.1

Given the following system:

Solutions:

State-space model:

EE4107 - Cybernetics Advanced

>[A, B, C, D] = sys_order2(wn,

dr)

>ssmodel = ss(A, B, C, D)

>num=[1,1];

>den=[1,-1,3];

>H=tf(num,den);

>t=[0:0.01:10];

>step(H,t);

>t = [0:0.1:10]

>u = sin(0.1*pi*t)'

>lsim(SysIn, u, t)

[ ]

][ ]

][ ]

[ ]

[]

Task 1.2

Given the following system:

Solution:

The state-space model becomes:

[ ]

[ ]

][ ]

[ ]

][ ]

Task 1.3

Given the following system:

Solutions:

State-space model:

[ ]

][ ]

][ ]

][

][

Given a mass-spring-damper system:

(

Where

position, speed/velocity, acceleration

- damping constant,

- mass,

- spring constant,

force

Task 2.1

Set the system on the following state-space form:

5

Assuming the control signal

Solution:

We set:

This gives:

Finally:

, i.e.:

[ ]

][ ]

[

[ ]

][ ]

i.e.:

[

[ ]

[

Task 2.2

Define the state-space model above using the ss function in MathScript.

Apply a step in u and use the step function in MathScript to simulate the result.

EE4107 - Cybernetics Advanced

6

Start with

Solution:

MathScript Code:

clear

clc

%

c

k

m

= 1;

= 1;

= 1;

%

A

B

C

D

= [0, 1; -(k/m), -(c/m)];

= [0; 1/m];

= [1, 0];

= [0];

ss_model = ss(A,B,C,D)

step(ss_model)

This gives:

Task 2.3

Convert the state-space model defined in the previous task to a transfer function ( )

MathScript code.

( )

( )

using

7

Use

Do the same using pen and paper and Laplace. Do you get the same answer?

Solution:

MathScript:

In MathScript we can simple use the tf function in order to convert the state-space model to a

transfer function.

H = tf(ss_model)

This gives:

( )

( )

( )

We have the equations:

We set

Laplace gives:

This gives:

or:

8

(

Which gives:

and

gives:

( )

( )

( )

Alternative metod:

The state-space model with

][ ]

[

[ ]

][ ]

( )

( )

( )

[ ]

where:

[

[ ]

This gives:

( )

] ([

])

[ ]

Where:

[

][

][ ]

This means:

( )

( )

( )

Given the following system:

Task 3.1

Find the state-space model from the block diagram.

Note!

and

Solution:

We get the following state-space model from the block diagram:

10

This gives:

[ ]

][ ]

[ ]

][ ]

Task 3.2

Implement the state-space model in MathScript and simulate the system using the step function in

MathScript.

Set

And

Solution:

Given the following system:

11

Task 4.1

Find the state-space model on the form (pen and paper):

Solution:

First we do:

This gives:

[ ]

][ ]

][ ]

][

][

Task 4.2

Define the state-space model in MathScript and find the step response for the system. Discuss the

results.

Solution:

MathScript code:

clear,clc

A = [0 1; -1 -3];

B = [0 0; 2 4];

C = [5 6];

D = [7 0];

ssmodel = ss(A,B,C,D)

step(ssmodel)

Step response:

12

As you see we get 2 transfer functions because this is a so-called MISO system (Multiple Input, Single

Output).

Task 4.3

Find the following transfer functions:

( )

( )

( )

( )

( )

( )

Solution:

In MathScript we can simple do as follows:

H = tf(ssmodel)

This gives the following):

Transfer Function

Input:1 Output:1

7,000s^2+33,000s+17,000

-----------------------

13

1,000s^2+3,000s+1,000

Input:2 Output:1

24,000s+20,000

--------------------1,000s^2+3,000s+1,000

As you see we get 2 transfer functions because this is a so-called MISO system (Multiple Input, Single

Output):

( )

( )

( )

( )

( )

( )

Additional Resources

http://home.hit.no/~hansha/?lab=mathscript

- Simulink-Tutorial(2).pdfUploaded bySami Ullah Khan Bangash
- A First Course in Predictive Control, Second Edition.pdfUploaded bymarmaduke32
- HW13A_solUploaded byHilmi Nur Ardian
- https___isidore.udayton.edu_access_content_attachment_211f364d-62a2-495d-9ade-e848cff7f36c_Assignments_1d4b1015-19f6-4bad-88e4-57ac956e0425_hw1.pdfUploaded byChethan Jalli
- State VarUploaded byIzzet Özcan
- Control Example Using MatlabUploaded byshahbaz8081
- State and Input Estimation for Descriptor Systems With Unknown InputsUploaded byAmit Shukla
- Assignment Lcs - Assignment -01Uploaded byrizwan ahmed
- 09 State SpaceUploaded byelbatch 2014-15
- Ee 5307 HomeworksUploaded byManoj Kumar
- Second Order Hold Based Discretization Method OfUploaded byvitinrj
- Control Example Using MatlabUploaded byRizkie Denny Pratama
- KAUSHIK_CON.docxUploaded byKaushik Saha
- active suspension system lab course manualUploaded byasad_asghar_janjua
- 6-Lecture 37 Time domain analysis.pptxUploaded byHamza Khan
- projectUploaded byRobert Carpenter
- kowalewski97caseUploaded byGino Pascualli
- ENEE 660 HW Sol #2Uploaded byPeacefulLion
- DISTURBANCE MODELING AND STATE ESTIMATION FOR OFFSET–FREE PREDICTIVE CONTROLWITH STATE–SPACE PROCESS MODELSUploaded bymrkntu86
- A Gentle Introduction to Predictive FiltersUploaded byShatruddha Singh Kushwaha
- Ages and NumbersUploaded byRanjith Kasu
- 902159288Uploaded bykannarock
- Lecture Notes 2016Uploaded byArmando Malone
- Pressure Fluctuation MeasurementsUploaded byAwadhesh Ranjan
- US Federal Reserve: ifdp901Uploaded byThe Fed
- Fuzzy Predictive Control of Fractional-OrderUploaded byRuchit Pathak
- Topic1 State Space SearchUploaded bySumit Mehrotra
- FeedCon[unit 2](1).pdfUploaded byPauline Luna
- 2011_Koch_Mathieu_Callaway_Modeling and Control of Aggregated Heterogeneous Thermostatically Controlled Loads for Ancillary ServicesUploaded byaq9037
- 405_gpc2Uploaded byMinn Thu Naing

- Calculator for Stiffness and Compliance of Lamina 90Uploaded bypanbuu
- Crack Tip PlasticityUploaded bypanbuu
- Materials Selection and TemperatureUploaded bypanbuu
- Failure Assessment DiagramsUploaded bypanbuu
- Paris Law TheoryUploaded bypanbuu
- Chemical Reactor VesselUploaded bypanbuu
- Linear transformation 1.pdfUploaded bypanbuu
- Solution of the State Equations - MITUploaded byUjjwal Karki
- Introduction to Linear TransformationUploaded bypanbuu
- FFF SolutionsUploaded byMohammedAL-Athari
- Converting to the State SpaceUploaded bypanbuu

- brochureUploaded byprashantpatil99k
- Course DescriptionsUploaded byRoberto Hoffman
- Galgas SoldaduraUploaded byiaguirre99
- Lecture 02 Gmpls 2016Uploaded byMohd Nazri
- Groebert Automatic.identification.of.Cryptographic.primitives.in.SoftwareUploaded byassimilat
- Pfx880 English PDFUploaded bySamuel Busnardo
- 5.1 System Modeling P1Uploaded byevo
- Microsoft SDL2Uploaded byjafaru
- memristerUploaded byShashi Nawab
- The Waterfall Development MethodologyUploaded byMuhammadZahirKhan
- NFEM.Ch01Uploaded byDouglass Gaye
- NCHRP 03-115 - Uninterrupted Flow - WP 4 - Freeway Method Integration - 20140415Uploaded byAkhilesh Kumar Maurya
- 24 Multimedia Tools That Support the Common Core - EdudemicUploaded bySaknicté Pb
- VisatUploaded bySantiago Tejada
- ZX870-5G (KS-EN191)Uploaded byKurnia Zakiy
- Working With Time Series Data in RUploaded byJose Alirio
- Bilal RseumeUploaded byBilal Javed
- The Early CatastropheUploaded byMitchell Davis
- Majid Khodi Er CvUploaded byTala Jaber
- METREL MI 2077Uploaded bykeyboard2515
- GST- Registration Process by CA. RAJAT MOHANUploaded bygstsms
- Hunting postMessage VulnerabilitiesUploaded byrhendrax2398
- LetterUploaded byMarin Kovač
- CRM and Social NetworksUploaded byMeer_Sk
- Information Security PresentationUploaded byBrian Vianney Jjuuko Mukasa
- Multi PskUploaded byMarco Alfieri
- Gesture VocalizerUploaded byIJMTST-Online Journal
- bok%3A978-3-319-26245-1Uploaded byMerino A Marco
- Sap Fiori 2 0 Administration and Developer Guide UploaddUploaded byVishakha Singh
- Packet Tracer Skills Integration ChallengeUploaded bykaloi0303