identif_td1.py

Created by famille-bvc

Created on September 30, 2025

1.76 KB


/// Exo 1

Système :
  
y(k)=-ay(k-1)+bu(k-1)+e(k)

#E(k) : Epsilon(k)

E(k)=y(k)+ay(k-1)-bu(k-1)

#J(0) : J(Theta)

J(0)=1/N * sum(k=1; N; E^2(k))

J(0)=1/N * sum(y(k)
+ay(k-1)-bu(k-1))^2

avec :
  
y(k)-> x
ay(k-1)-> y
-bu(k-1)-> z

#Identites remarquables :
#(x+y)^2 = x^2+2xy+y^2
#(x+y+z)^2 = x^2+y^2+z^2+2xy+2yz+2xz

On developpe J(0) 
avec les id rem

Ca donne :
  
J(0)=1/N * sum(y(k)^2
+ ay(k-1)^2 
- bu(k-1)^2
+ 2*y(k)*ay(k-1)
+ 2*ay(k-1)*(-bu(k-1))
+ 2*y(k)*(-bu(k-1))

Ensuite deriv part :
#symbole : d rond

#tous les termes qui 
#ont du a on les divise
#par a

dJ(0)/a
dJ(0)/b

et on passe a droite
le terme qui n a
plus de a ou b
-> ca donne deux
egalites

Matrice de sortie :
Sum(k=1;N;...)

Pour dJ(0)/a
S11= sum terme en a
S12= sum terme en b
(S13)= sum egalite

Pour dJ(0)/b
S21= sum terme en b
S22= sum terme en a
(S23)= sum egalite

on doit donc avoir :
           ^
/S11 S12\ /a\   /S13\
|       |*|^| = |   |
\S21 S22/ \b/   \S23/

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

Resolution numerique :

/A B\    1  /D -B\
|   | = --- |    |
\C D/   det \-C A/

det = AD-BC
 ^
/a\    1  /D -B\ /E\
|^| = --- |    | | |
\b/   det \-C A/ \F/

^
a = 1/det * [DE-BF]
^
b = 1/det * [-CE+AF]

-------------------------
Methode MTM-1

//Vecteur parametre :
  
Theta^T = (a, b)

//Vecteur observation :
  
Phi^T = (-y(k-1), u(k-1))

//Matrice M
//Matrice M^T
//Matrice M^T*M
//Matrice M^T*Y  
//(M^T*M)^-1 * M^T * Y

//////////////////////////////

Exo 6:

methode ou on retire un param

Y(t)= a1.u^2(t)+a2.u(t)+a3

//Vecteur parametre :
  
Theta^T = (a1, a2) -> a3=1.05

//Vecteur observation :
  
Phi^T = (u^2(t), u(t))

//Matrice Y :

    /y(1)  -a3\#(1.05-1.05)
Y = |...   -a3|
    \y(N-1)-a3/#(55.6-1.05)
    
//Matrice M
//Matrice M^T
//Matrice M^T*M
//Matrice M^T*Y  
//(M^T*M)^-1 * M^T * Y

During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:

With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our cookies policy.