Get["../simulin/simulineaire.m"];

inverseur[r1_,r2_,g0_,w0_]:=Module[{n,A,B,g},
    n=4;
    A=Table[0,{n},{n}];
    B=Table[0,{n}];
    A=ajouterResistance[A,1,2,r1];
    A=ajouterResistance[A,2,3,r2];
    g=g0/(1+s/w0);
    {A,B}=ajouterSourceTensionSTCT[A,B,3,4,4,2,g];
    {A,B}=ajouterMasse[A,B,4];
    {A,B}=definirEntree[A,B,1];
    Return[{A,B}];
]
            
{A,B}=inverseur[r1,r2,g0,w0];
h=transfert[A,B,3]/.s->I*omega
            
{A,B}=inverseur[10^3,10^4,10^5,20*N[Pi]];
h=transfert[A,B,3];
                
bodeGain[h,0,6,0,60]
{A,B}=inverseur[10^3,10^6,10^5,20*N[Pi]];
h=transfert[A,B,3];
                
bodeGain[h,0,6,0,60]
bodePhase[h,0,6]
