代写 R C math scala theory Module 1-1: Linear Space

Module 1-1: Linear Space
Linear Space
Linear Control Systems (2019)
Ding Zhao
Assistant Professor College of Engineering School of Computer Science
Carnegie Mellon University
Ding Zhao (CMU)
M1-1: Linear Space 1 / 50

Table of Contents
1 Mathematical expression of linear systems
2 Linearization
3 Field and vector space
4 Linear independency, basis, dimension
5 Change of basis
Ding Zhao (CMU) M1-1: Linear Space 2 / 50

Table of Contents
1 Mathematical expression of linear systems
2 Linearization
3 Field and vector space
4 Linear independency, basis, dimension
5 Change of basis
Ding Zhao (CMU) M1-1: Linear Space 3 / 50

Mathemathical Expression of Linear Control Systems
Partial/ordinary differential equations
Transfer functions
Y (s) = H(s) U (s)
x ̇ = f ( x , u , t )
State space equations
Ding Zhao (CMU)
M1-1: Linear Space 4 / 50

State Space Equations
general (nonlinear)
linear
time-varying
x ̇ = f ( x , u , t ) y = g(x,u,t)
x ̇ = A(t)x + B(t)u y = C(t)x + D(t)u
time-invariant
x ̇ = f ( x , u ) y = g(x, u)
x ̇ = Ax + Bu y = Cx + Du
where u ∈ Rm is input, x ∈ Rn is the states, and y ∈ Rp is the output. In this course, we will focus on the linear SS problems.
Ding Zhao (CMU) M1-1: Linear Space 5 / 50

Motivation of using Linear Space Representations
Can naturally deal with MIMO systems
Provide a convenient, compact notation, and uniform representations
Allow the application of the powerful vector-matrix theory (you will see later in this class) An ideal format for computer solution
Ding Zhao (CMU) M1-1: Linear Space 6 / 50

What is the State
State is a minimum complete summary of the status of the system at a particular point in time.
Example: the State of Driving
F = Ma = t2 v ̇ = a
p ̇ = v
p(0) = v(0) = 0
M
p(t) Which is the state?:
{p, p ̇, p ̈}, {p ̇, p ̈}, {p, p ̇}, {p} Ding Zhao (CMU)
M1-1: Linear Space
7 / 50

State Space Example (OTB)
Find a state space model for y ̈ = 5t2y ̇ + 3y + 4
Ding Zhao (CMU) M1-1: Linear Space 8 / 50

State Space Example – Alternative (OTB)
Ding Zhao (CMU) M1-1: Linear Space 9 / 50

Differential Equations to State Space – SISO System
dnya +a dn−1y+…+ady+ay=bu
dtn n−1 dtn−1
Define state variables: x
1 dt = y, x
0 0
= dyn−1 2 dt n dtn−1
010…0 001…00
 .   .  A=. B=.
000…1 b0 −a0 −a1 −a2 . . . −an−1
C=􏰇1 0 0… 0􏰈 D=0
= dy , x Then, x ̇1 = x2,x ̇2 = x3,··· ,x ̇n−1 = xn
1
x ̇ n = b 0 u − a n − 1 x n − 1 − a n − 2 x n − 2 − · · · − a 0 x 1
Write in matrix form
Ding Zhao (CMU) M1-1: Linear Space 10 / 50

Example: Simple Suspension Model (OTB)
s1
m1
m1
k1
u2 u2
s2
k1(s1 − s2) k1(s1 −s2)
m2
m2
k2
u1
k2(s2 − u1)
Ding Zhao (CMU)
M1-1: Linear Space 11 / 50

Examples (OTB)
Ding Zhao (CMU) M1-1: Linear Space 12 / 50

State Space to Transfer functions
x ̇ = Ax + Bu y = Cx + Du
Take the Laplace transforms
sX(s) = AX(s) + BU(s)
Y(s) = CX(s) + DU(s)
Loose initial conditions here, ss(steady state) has an advantage. (sI − A)X(s) = BU(s) → X(s) = (sI − A)−1BU(s)
Also, Y(s) = 􏰚C(sI − A)−1B + D􏰛 U(s)
Ding Zhao (CMU) M1-1: Linear Space 13 / 50

Summary of State Space Representation
State space form writes high order and coupled DEQs as 1st order equations Many (infinite) different state equations represent the same DEQ
State equations can be transformed
Ding Zhao (CMU) M1-1: Linear Space 14 / 50

Table of Contents
1 Mathematical expression of linear systems
2 Linearization
3 Field and vector space
4 Linear independency, basis, dimension
5 Change of basis
Ding Zhao (CMU) M1-1: Linear Space 15 / 50

Why Linearization
All real systems are nonlinear to a certain degree
Our tools for analysis and design are much better for linear than nonlinear systems
Methods available to approximate nonlinear systems (at least smooth ones) with linear systems
Ding Zhao (CMU) M1-1: Linear Space 16 / 50

Equilibrium Point
Consider the nonlinear time invariant system:
x ̇ = f ( x , u ) , f : R n × R m → R x ̄ ∈ Rn is an equilibrium point if
∃u ̄ ∈ Rm,s.t.f(x ̄,u ̄) = 0
i.e. x ̇ (t) = 0 at equilibrium points.
Ding Zhao (CMU) M1-1: Linear Space 17 / 50

Linearization
Define the deviation variables:
Taylor Series
δx =x−x ̄,δu =u−u ̄ ⇒x=δx +x ̄,u=δu +u ̄
δ ̇x =f(x ̄+δx,u ̄+δu)≈f(x ̄,u ̄)+∂f|x=x ̄,u=u ̄δx+∂f|x=x ̄,u=u ̄δu ∂x ∂u
= ∂f |x=x ̄,u=u ̄ δx + ∂f |x=x ̄,u=u ̄ δu ∂x ∂u
A = ∂f |x=x ̄,u=u ̄ ∈ Rn×n, B = ∂f |x=x ̄,u=u ̄ ∈ Rn×m, ∂f is called “Jacobian” ∂x ∂u ∂x
Ding Zhao (CMU) M1-1: Linear Space 18 / 50

Example
1. Find equilibria
􏰉x1 − x31 + αx1x2 = 0 ⇒ x2(βx1 − 1) = 0 ⇒ x2 = 0 or x1 = 1 −x2 + βx1x2 = 0 β
􏰀x1 − x31 + αx1x2􏰁 x ̇ = − x 2 + β x 1 x 2
x2 =0⇒x1(1−x21)=0⇒x1 =0,×1 =1,×1 =−1⇒(0,0),(1,0),(−1,0) x = 1 ⇒ 1 − 1 + α x = 0 ⇒ x = 1 (−1 + 1 ) ⇒ ( 1 , − 1 + 1 )
1βββ3β2 2α β2 βααβ2
Ding Zhao (CMU) M1-1: Linear Space 19 / 50

Example
2. Linearization
􏰀1 0􏰁 (0,0):δ ̇x= 0 −1 δx
̇ 􏰀−2 −α 􏰁 (−1,0):δx= 0 −β−1 δx
∂ f ∂x =
􏰀 1 − 3 x 21 + α x 2 βx2
α x 1 􏰁 βx1 − 1
􏰀􏰁 􏰜−2α􏰝
̇ −2 α (1,0):δx= 0 β−1δx
1 1−β2 ̇ β2 β (β,αβ2):δx=1−β2 0δx
αβ2
Ding Zhao (CMU)
M1-1: Linear Space
20 / 50

Recap: State Space Equations
general (nonlinear)
linear
time-varying
x ̇ = f ( x , u , t ) y = g(x,u,t)
x ̇ = A(t)x + B(t)u y = C(t)x + D(t)u
time-invariant
x ̇ = f ( x , u ) y = g(x, u)
x ̇ = Ax + Bu y = Cx + Du
where u ∈ Rm is input, x ∈ Rn is the states, and y ∈ Rp is the output. In this course, we will focus on the linear SS problems.
Ding Zhao (CMU) M1-1: Linear Space 21 / 50

Recap: Linearization
Consider the nonlinear system:
x ̇ = f ( x , u ) , f : R n × R m → R x ̄ ∈ Rn is an equilibrium point:
∃u ̄ ∈ Rm,s.t.f(x ̄,u ̄) = 0
δx = x − x ̄, δu = u − u ̄ ⇒ x = δx + x ̄, u = δu + u ̄
A = ∂f |x=x ̄,u=u ̄ ∈ Rn×n, B = ∂f |x=x ̄,u=u ̄ ∈ Rn×m, ∂f is called “Jacobian” ∂x ∂u ∂x
Define the deviation variables:
Ding Zhao (CMU) M1-1: Linear Space 22 / 50

Module 1-1: Linear Space
Basis
Linear Control Systems (2019)
Ding Zhao
Assistant Professor College of Engineering School of Computer Science
Carnegie Mellon University
Ding Zhao (CMU)
M1-1: Linear Space 23 / 50

Table of Contents
1 Mathematical expression of linear systems
2 Linearization
3 Field and vector space
4 Linear independency, basis, dimension
5 Change of basis
Ding Zhao (CMU) M1-1: Linear Space 24 / 50

Table of Contents
1 Mathematical expression of linear systems
2 Linearization
3 Field and vector space
4 Linear independency, basis, dimension
5 Change of basis
Ding Zhao (CMU) M1-1: Linear Space 25 / 50

Field
Let F be a set with at least 2 elements, assume F has 2 operations:
“+” : F ×F → F (addition) and “·′′ : F ×F → F (multiplication). F is called a field iff:
A0:∀α,β∈F,∃α+β∈F⇒ ClosureunderAddition
A1 :∀α,β∈F,α+β=β+α⇒ Commutativity
A2 :∀α,β,γ∈F,(α+β)+γ=α+(β+γ)⇒ Associativity A3 :∃0∈F,∀α∈F,α+0=α⇒ Neutral
A4 :∀α∈F,∃(−α)∈F,α+(−α)=0⇒ Inverse
M0 : ∀α, β ∈ F , ∃α· β ∈ F ⇒ Closure under Multiplication M1 : ∀α,β ∈ F,α·β = β·α ⇒ Commutativity
M2 : ∀α,β ∈ F,(α·β)·γ = α·(β·γ) ⇒ Associativity
M3 :∃1∈F,∀α∈F,α·1=α⇒ Neutral
M4 : ∀α ̸= 0,∃α−1,α·α−1 = 1 ⇒ Inverse
D:α,β,γ∈F,α·(β+α)=α·β+α·β⇒ Distributivity
Ding Zhao (CMU) M1-1: Linear Space 26 / 50

Examples & Non-examples
(1) R with usual operation ⇒
(2) C ⇒
(3) {0, 1} with: some operations ⇒ 􏰂􏰀x y􏰁 􏰃
(4) −y x x∈R,y∈R withusualoperationsby2×2matrices⇒
Ding Zhao (CMU) M1-1: Linear Space 27 / 50

Examples & Non-examples
(5) Z: Set of integers ⇒
(6) R2×2: ⇒
(7) Set of non-singular matrices ⇒
Note: A set F that has all the properties of a field except M4 is called a Ring, e.g. integers, polynominal.
Ding Zhao (CMU) M1-1: Linear Space 28 / 50

Vector Space
Vector spaces → Linear spaces Let F be a field, let V be a set that has an ”addition” operation“+”:V ×V →V. V iscalledavectorspaceoverF iff:
A0 :∀x,y∈V,∃x+y∈V Closure under Addition
A1 :∀x,y∈V,x+y=y+x Commutativity
A2 :∀x,y,z∈V,(x+y)+z=x+(y+z) Associativity A3 :∅∈V,∀x∈V,x+∅=x Neutral
A4 :∀x∈V,∃(−x)∈V,x+(−x)=∅ Inverse
SM0 : ∀α ∈ F , ∀x ∈ V , ∃α· x ∈ V Closure under Scalar Multiplication SM1 : ∀α,β ∈ F,∃x ∈ V ,(α·β)x = α(β·x) Scalar Associativity
SM2 :∀α∈F,∀x,y,∈V,α(x+y)=αx+αy Scalar-Vector Distributivity SM3 :∀α,β∈F,∀x∈V,(α+β)x=αx+βx Vector-ScalarDistributivity SM4 :∀x∈V,1·x=x Neutral
Ding Zhao (CMU) M1-1: Linear Space 29 / 50

Examples & Non-examples
(Fn,F),F isafield,Fn ={(x1,x2,…,xn)T,xi ∈F,1≤i≤n}⇒ Continuous Functions
C ([a, b], R): Set of continuous functions from ([a, b] → R) with usual definitions (f + g)(t) = f(t) + g(t) ⇒
Matrices
Set of 2×2 real matrices over R ⇒
Set of 2 × 2 complex matrices over C ⇒
Set of 2 × 2 complex matrices over R ⇒
Set of 2×2 real matrices over C ⇒
Set of all 2 × 2 real non-singular matrices over R ⇒
Ding Zhao (CMU) M1-1: Linear Space 30 / 50

Subspace
Let (X , F ) be a vector space. Y is called a subspace iff
1 Y ⊂X (“sub”)
2 Y is a space
Ding Zhao (CMU) M1-1: Linear Space 31 / 50

Examples & Non-examples
Is (X ,F) = (R2,R) a vector space? 􏰀β􏰁
IsY ={ 2β |β∈R}asubspaceofX? 􏰀α􏰁􏰀1􏰁
IsY ={ 2α + 0 |α∈R}asubspaceofX?
Ding Zhao (CMU) M1-1: Linear Space 32 / 50

Table of Contents
1 Mathematical expression of linear systems
2 Linearization
3 Field and vector space
4 Linear independency, basis, dimension
5 Change of basis
Ding Zhao (CMU) M1-1: Linear Space 33 / 50

Linear Combination
A linear combination is any finite sum of the form
α1×1 +α2×2 +…+αnxn
whereαi ∈F,xi ∈X,1≤i≤n,nisanarbitraryinteger ≥1
Ding Zhao (CMU) M1-1: Linear Space 34 / 50

Linear Independence
A finite set of vectors x1, …, xk ∈ X is linearly dependent if there exist scalars α1, …, αk ∈ F NOT ALL ZERO, such that
α1×1+α2×2+…+αkxk =0
Otherwise, the set is linearly independent.
An arbitrary set of vectors S ⊂ X is linearly independent if every finite subset is linearly independent.
Question: if a set X1 is linearly independent and X2 is linearly dependent, then is {X1,X2} linearly independent?
Ding Zhao (CMU) M1-1: Linear Space 35 / 50

Dimension
The maximal number of elements in any linearly independent set of vectors in (X , F ), is called the dimension of (X , F ).
dim(Fn,F)= n
dim(C2,C)= 2
dim(C,R)= 2
dim(C,C)= 1 dim(P(t)=setofpoly’swithrealcoeffcients,R)= ∞
xT = [x1,x2,x3,··· ,xn] which satisfy x1 = x2 = x3 = ··· = xn. 1
Ding Zhao (CMU) M1-1: Linear Space 36 / 50

Span
Let S ⊂ X be a subset of (X ,F).The span of S is the set of all linear combinations of elements of S :
span{S} = {x ∈ X |∃k < ∞ x1,...,xk ∈ S,α1,...,αk ∈ F, x=α1x1 +α2x2 +...+αkxk} Ding Zhao (CMU) M1-1: Linear Space 37 / 50 Basis A set of vectors B in (X,F) is a basis iff: 1 B is linearly independent 2 span{B} = X Ding Zhao (CMU) M1-1: Linear Space 38 / 50 Examples of Basis n 1 0 0 010       .   .   .   .   .   .  001 {e1,...,en,je1,...,jen}  n1020n0 (F ,F) n  (R ,R) → e = ,e = ,...,e = ←nelements (C ,C) (Cn,R) → Ding Zhao (CMU) M1-1: Linear Space 39 / 50 Coordinates Let (V ,F) be a n-dimensional vector space and (v1 ···vn) be a basis. ∀x ∈ V , there always exists a unique sequence of scalars (β1 . . . βn) ∈ F such that n x = 􏰑βivi i=1 (β1 ...βn) are called the coordinates of x with the basis (v1 ···vn) . Example: Consider (Rn,R) with basis ei = 􏰇 0 ··· 1  x1  n .n 􏰑 letx= . ∈R ⇒x= ··· 0 􏰈T xiei, βi =xi xn i=1 Ding Zhao (CMU) M1-1: Linear Space 40 / 50 Uniqueness of Coordinates using One Basis Theorem: Suppose B = {b1,b2,...,bk} is a basis for (X ,F). Let x ∈ X and suppose that x=α1b1 +...+αkbk and Thenαi =βi forall1≤i≤k. x=β1b1 +...+βkbk Theorem: In an n-dimensional vector space ANY set of n linearly independent vectors is a basis. Ding Zhao (CMU) M1-1: Linear Space 41 / 50 Examples (OTB) Ding Zhao (CMU) M1-1: Linear Space 42 / 50 Table of Contents 1 Mathematical expression of linear systems 2 Linearization 3 Field and vector space 4 Linear independency, basis, dimension 5 Change of basis Ding Zhao (CMU) M1-1: Linear Space 43 / 50 Change of Basis Any linearly independent set is a basis, so there are infinite numbers of bases. How are the corresponding coordinates related? Let B = [v] = (v1,...,vn) and Bˆ = [vˆ] = (vˆ1,...,vˆn) be two bases for the n-dimensional ˆˆˆ vector space (V ,F). Given x ∈ V ,∃ β = (β1 ...βn) and β = (β1 ...βn) such that 􏰉x = β1v1 + · · · + βnvn x = βˆ 1 vˆ 1 + · · · + βˆ n vˆ n Since Bˆ is a basis, all vectors in B can be expressed in Bˆ. For each vj, where j = 1...n, ∃(α1j...αnj)suchthat⇒ vj =α1jvˆ1+···+αnjvˆn =􏰄ni=1αijvˆi. Therefore, x = j=1 βjvj = βj αijvˆi =  i=1 i=1 αijβjvˆi= nnnnnn 􏰑􏰑􏰑􏰑􏰑􏰑 βˆivˆi j=1 j=1 i=1 Ding Zhao (CMU) M1-1: Linear Space 44 / 50 Change of Basis (cont.) nnn n 􏰑 i=1 v1 α11 ... α1nTvˆ1 . . .. 􏰑 􏰑 􏰑 βˆivˆi Recall: vj =α1jvˆ1 +···+αnjvˆn = ⇒ vi = 􏰄nj=1 αjivˆj αijvˆi αijβjvˆi = By the uniqueness of coordinates, ⇒⇒βˆi=􏰄nj=1αijβj i=1 j=1 i=1  βˆ1 α11...α1n β1 .. .. ⇒.=. ..      ⇒.= . . .⇒β=Aβ βˆn αn1...αnnβn n n1 nn 􏰉T ˆT n ˆ ⇒ β = Aβ A = [αij] is called change of basis matrix Ding Zhao (CMU) [v] = AT [vˆ] jth col of A is the representation of vj in Bˆ M1-1: Linear Space 45 / 50 ˆ vα...αvˆ Summary: x=β [v]=β [vˆ] Recap: Fields Let F be a set with at least 2 elements, assume F has 2 operations: “ + ” : F × F → F (addition) and “· ” : F × F → F (multiplication). F is called a field if: A0:∀α,β∈F,∃α+β∈F⇒ ClosureunderAddition A1 :∀α,β∈F,α+β=β+α⇒ Commutativity A2 :∀α,β,γ∈F,(α+β)+γ=α+(β+γ)⇒ Associativity A3 :∃0∈F,∀α∈F,α+0=α⇒ Neutral A4 :∀α∈F,∃(−α)∈F,α+(−α)=0⇒ Inverse M0:∀α,β∈F,∃α·β∈F⇒ ClosureunderMultiplication M1 : ∀α,β ∈ F,α·β = β·α ⇒ Commutativity M2 : ∀α,β ∈ F,(α·β)·γ = α·(β·γ) ⇒ Associativity M3 :∃1∈F,∀α∈F,α·1=α⇒ Neutral M4 : ∀α ̸= 0,∃α−1,α·α−1 = 1 ⇒ Inverse D:α,β,γ∈F,α·(β+α)=α·β+α·β⇒ Distributivity Ding Zhao (CMU) M1-1: Linear Space 46 / 50 Recap: Vector Space Vector spaces → Linear spaces Let F be a field, let V be a set that has an ”addition” operation“+”:V ×V →V. V iscalledavectorspaceoverF if: A0 :∀x,y∈V,∃x+y∈V Closure under Addition A1 :∀x,y∈V,x+y=y+xCommutativity A2 :∀x,y,z∈V,(x+y)+z=x+(y+z)Associativity A3 :∅∈V,∀x∈V,x+∅=xNeutral A4 :∀x∈V,∃(−x)∈V,x+(−x)=∅Inverse SM0 : ∀α ∈ F , ∀x ∈ V , ∃α· x ∈ V Closure under Scalar Multiplication SM1 : ∀α,β ∈ F,∃x ∈ V ,(α·β)x = α(β·x) Scalar Associativity SM2 :∀α∈F,∀x,y,∈V,α(x+y)=αx+αy Scalar-Vector Distributivity SM3 :∀α,β∈F,∀x∈V,(α+β)x=αx+βxVector-ScalarDistributivity SM4 :∀x∈V,1·x=xNeutral Ding Zhao (CMU) M1-1: Linear Space 47 / 50 Recap: Subspace Let (X , F ) be a vector space. Y is called a subspace iff 1 Y ⊂X (“sub”) 2 Y is a space X and ∅ are always subspace of X . Ding Zhao (CMU) M1-1: Linear Space 48 / 50 Recap: Linear Combination, Independency , Dimension, Span xi ∈X,αi ∈F,1≤i≤n A linear combination is any finite sum of the form α1x1 +α2x2 +...+αnxn A finite set of vectors x1, ..., xk ∈ X is linearly dependent if ∃[α1, ..., αk]T ̸= 0 s.t. α1x1+α2x2+...+αkxk =0 Otherwise, the set is linearly independent. The maximal number of elements in any linearly independent set of vector in (X , F ), is called the dimension of (X , F ). The span of S ⊂ X is the set of all linear combinations of elements of S : span{S} = {x ∈ X |∃k < ∞,x1,...,xk ∈ S,α1,...,αk ∈ F, x=α1x1 +α2x2 +...+αkxk} Ding Zhao (CMU) M1-1: Linear Space 49 / 50 Recap: Basis, Change of Basis A set of vectors B in (X,F) is a basis if: 1 B is linearly independent 2 span{B} = X Change of Basis: The jth column of A contains the coordinates of vj in {vˆ1...vˆn} x,{v1:n} ∈ X [ · ] v ↕ A xˆ,{vˆ1:n} ∈ X ↕ [ · ] vˆ  α 1   .  n A  αˆ 1   .  n = α  .  ∈ F αn −→ αˆ =  .  ∈ F αˆm −→ Ding Zhao (CMU) M1-1: Linear Space 50 / 50