Title: Matlab Tutorial for State Space Analysis and System Identification
1Matlab Tutorial for State Space Analysisand
System Identification
2Overview
- Review of Chapter 7
- Review of Chapter 10
- Examples Followed in the Tutorial
- Specifying LTI systems with space-state models
- System response
- System Analysis
- Controller Design Tools
- System identification
3Chapter 7 Review
- State space models Scalable approach to model
MIMO systems - State vector x(k)
- State Model equations
- x(k 1) Ax(k) Bu(k)
- y(k) Cx(k)
4Chapter 7 Review (Contd.)
- System Analysis
- Characteristic polynomial, det(zI A)
- Poles eigenvalues of A
- Steady-state Gain C(I - A)-1B
- Equivalence w(k) Tx(k)
- w(k 1) (TAT-1)w(k) (TB)u(k)
- y(k) (CT-1)w(k)
5Chapter 7 Review (Contd.)
- Controllability system can be driven to an
arbitrary state by properly choosing a set of
inputs. - C An-1B An-2B . . . AB B
- System controllable if controllability matrix C
is invertible - Observability all the state can be inferred from
its outputs. - O CAn-1 CAn-2 . . . CA C
- System observable if observability matrix O is
invertible
6Chapter 10 Review
- State Feedback Architecture
- Static state feedback
- Similar to proportional control
- Does not include a reference point
- Static state feedback with precompensation
- Can track reference points
- Poor disturbance rejection
- Dynamic state feedback
- Similar to PI control for SISO systems
- Can track reference input and reject disturbance
7Chapter 10 Review (Contd.)
- State feedback controller design
- Pole placement
- Specify max settling time and overshoot (ks and
Mp) - Obtain desired dominant poles of the closed loop
system - Ks - 4/ log(r)
- Mp ep/?
- Construct the desired characteristic polynomial
- Other poles should have magnitude less than 0.25r
- Construct the modeled characteristic equation
- Equate coefficients of the desired and modeled
characteristic polynomial and calculate gains
8Chapter 10 Review (Contd.)
- State feedback controller design (contd.)
- LQR Linear Quadratic Regulation
- Chooses feedback gains to minimize a weighted sum
of control error and control effort - J ½ ? xT(k)Qx(k) uT(k)Ru(k)
- Select Q and R
- Compute feedback gains K
- Predict control system performance or run
simulations - Choose new Q and R and repeat the above steps if
the performance is not suitable
9Examples followed in the tutorial
- SISO System Example
- Tandem Queue
- MIMO System Example
- Apache HTTP Server
10Tandem Queue
- x1(k 1) 0.13x1(k) 0.069u(k)
- x2(k 1) 0.46x1(k) 0.63x2(k)
- y(k) x1(k) x2(k)
11Apache HTTP Server
- x1(k 1) 0.54x1(k) 0.11x2(k) 0.0085u1(k) -
0.00044u2(k) - x2(k 1) -0.026x1(k) 0.63x2(k) -
0.00025u1(k) 0.00028u2(k) - y1(k) x1(k) y2(k) x2(k)
12System Identification
- The system identification task is one of the most
time consuming tasks in advanced control
implementation projects. - Problems
- System analyst should have extensive background
knowledge about the system, control theory,
discrete time systems, optimization, statistics
etc. - Large no. of design variables.
- Solution
- Understand the various system identification
methods and associated decision variables. - Effectively use a priori knowledge regarding the
system to be identified and the purpose of the
intended controller.
13System Identification Procedure
- Design experiment and collect data.
- Examine the data. Preprocess the data.
- Detrending, prefiltering, outlier removal
- Model structure selection
- Depends on the application.
- Compute best model in the model structure.
- Examine the properties of the model obtained.
- Model validation
14System Identification Procedure
- Experimental design issues
- Which signals to measure?
- How much data is needed?
- Input signal selection
- Sampling period selection
15System Identification Procedure
- Examine the data
- Plot the data
- Preprocess the data
- Filter the data
- Remove trends in the data
- Reduce noise
- Remove outliers
- Resample the data
16System Identification Procedure
- Model Structure Selection
- Many standard model structures are available
depending on the approach (how to model the
influence of the input and the disturbances). - Model structure should suit the actual system.
- Finding the best model structure and model order
is an iterative procedure.
17System Identification Procedure
- Compute the best model in the model structure.
- Parameter Estimation
- Examine the properties of the model
- Poles and zeros
- Model Output
- Transient response
18System Identification Procedure
- Model validation techniques
- Simulation
- Plot the measured output time series versus the
predicted output from the model - Crossvalidation
- Simulate on a data set different from the one
used for parameter estimation. - For the number of different model structures,
plot the error and select the minimum.
19System Identification Toolbox
- System Identification Toolbox provides features
to build mathematical models of dynamic systems
based on observed system data. - MATLAB Example
20Questions?